[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-81854":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":12,"contributorsCount":12,"subscribersCount":12,"size":12,"stars1d":14,"stars7d":15,"stars30d":16,"stars90d":12,"forks30d":12,"starsTrendScore":17,"compositeScore":18,"rankGlobal":9,"rankLanguage":9,"license":19,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":20,"hasPages":20,"topics":22,"createdAt":9,"pushedAt":9,"updatedAt":23,"readmeContent":24,"aiSummary":25,"trendingCount":12,"starSnapshotCount":12,"syncStatus":26,"lastSyncTime":27,"discoverSource":28},81854,"UseCaseCoverage","pedrovgs\u002FUseCaseCoverage","pedrovgs","CLI tool to measure and collect use case coverage for any app or repository!",null,"Rust",30,0,25,3,4,5,9,48.5,"Apache License 2.0",false,"main",[],"2026-06-12 04:01:35","# 🚀 Use Case Coverage (UCC)\n\n[![License](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-Apache%202.0-blue.svg)](LICENSE)\n[![Rust](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Frust-stable-brightgreen.svg)](https:\u002F\u002Fwww.rust-lang.org\u002F)\n\n🛡️ **Use Case Coverage** is a simple but powerful developer tool designed to bridge the gap between feature specifications and test implementations. It helps you track, calculate, and visualize your test coverage against declared use cases, features, and bugs using a simple yet strict `.ucc` YAML format. \n\n🤖 **AI-Ready Quality Assurance**: In the age of AI-driven development, tracking the coverage of your AI agents is vital for maintaining software excellence. **UseCaseCoverage (UCC)** empowers you to measure that impact with precision and ease. ✨\n\n🧞 **Privacy First & Zero Infrastructure**: UseCaseCoverage is designed to run entirely on your local machine or within your CI pipeline. There is **no backend**, no data is ever uploaded to any server, and your specifications remain completely private and secure. Since it is a standalone CLI tool, there is no infrastructure to host or maintain.\n\n🤔 **Why is code coverage not enough?** You may think your coverage is above 80% of the lines of code, yet you still don't know how many distinct real-world use cases your tests cover, or even which tests cover specific use cases. You probably know the code you don't cover with automated tests but you probably don't know how many real world use cases are impacted because of this. Code coverage is designed for software engineers; use case coverage is designed for people.\n\n### 🧠 Why UCC is an Awesome Tool for the LLM & Agent Era\n\nLarge Language Models (LLMs) and autonomous coding agents represent the future of software development, but they need guardrails. UCC is uniquely positioned as the best validation tool for AI agents:\n- **No Need for Expensive MCP Servers**: While other tools require complex, resource-heavy Model Context Protocol (MCP) integrations or background daemons, UCC is a lightweight, zero-dependency CLI that reads directly from files.\n- **Minimizes Token Usage & Context Window Load**: Standard tools can bloat the agent's context window with thousands of lines of raw code, logs, or database queries. UCC provides a concise, structured YAML interface for requirements and high-level test mappings, conserving expensive tokens.\n- **Substantially Improves Agent Performance**: Since agents don't have to navigate massive, fragmented codebases or build systems to understand feature coverage, they operate much faster and make fewer reasoning errors.\n- **Perfect for Spec-Driven Development**: By defining `.ucc` specs before coding, agents can automatically generate code and test suites that adhere strictly to those requirements, making the agent's goal-seeking behavior 100% deterministic and measurable.\n- **Framework & Language Agnostic**: AI agents work across diverse multi-language monorepos. UCC can scan across all files, whether Swift, Kotlin, TypeScript, or Rust, without needing language-specific compilers.\n\n---\n\n### 🖼️ Screenshots\n\n| Dashboard | Inventory |\n| :---: | :---: |\n| ![Dashboard](art\u002F1%20dashboard.png) | ![Inventory](art\u002F2%20inventory.png) |\n\n| Feature Detail | Coverage Gaps |\n| :---: | :---: |\n| ![Feature Detail](art\u002F3%20feature-detail.png) | ![Coverage Gaps](art\u002F4%20coverage-gaps.png) |\n\n| Tags |\n| :---: |\n| ![Tags](art\u002F5%20tags.png) |\n\n---\n\n\n\n## 📦 Installation\n\n**One-liner (Linux & macOS):**\n```bash\ncurl -fsSL https:\u002F\u002Fraw.githubusercontent.com\u002Fpedrovgs\u002FUseCaseCoverage\u002Fmain\u002Finstall.sh | bash\n```\n\n**Homebrew (macOS):**\nAssuming you have [Homebrew](https:\u002F\u002Fbrew.sh\u002F) installed:\n\n```bash\nbrew tap pedrovgs\u002Ftap\nbrew install use_case_coverage_cli\n```\n\nAlternatively, you can install it in a single command:\n```bash\nbrew install pedrovgs\u002Ftap\u002Fuse_case_coverage_cli\n```\n\n**Linux (.deb):**\nDownload the latest `.deb` package from the [releases page](https:\u002F\u002Fgithub.com\u002Fpedrovgs\u002FUseCaseCoverage\u002Freleases) and install it using:\n\n```bash\nsudo dpkg -i use-case-coverage-cli_*.deb\n```\n\n---\n\n## 🛠 Usage\n\nTracking your coverage with UCC follows a simple three-step workflow:\n\n1. 📝 **Define your Specs**: Write your features, use cases, bugs, and regressions in the simple `.ucc` YAML format anywhere in your project.\n2. 🏷️ **Annotate your Tests**: Include the unique ID of your artifacts in your test code (as a comment or within a string). UCC scans your codebase to find these matches automatically. **You can annotate any type of test even in monorepos using different proramming languages and frameworks.**\n3. 🚀 **Generate & Analyze**: Run `ucc report` to compute coverage metrics and generate a beautiful, interactive dashboard. You can execute `ucc` locally or integrate it in your CI\u002FCD pipeline.\n\n---\n\n### ⌨️ CLI Options\n\nUCC provides several flags to customize its behavior:\n\n| Option | Description |\n| :--- | :--- |\n| `-i, --input \u003Cpath>` | Root directory to scan for `.ucc` files (default: current directory). |\n| `-o, --output \u003Cpath>` | Output directory for reports or file for linting. |\n| `--as, --additional-sources \u003Cpath>` | Additional directories to scan for `.ucc` and test files (repeatable). |\n| `-s, --single` | Disable recursive `.ucc` file discovery (only scan top-level directory). |\n\n---\n\n### 🏷️ Annotation Examples\n\nUCC is language-agnostic. You can annotate your tests by simply including the artifact ID anywhere in your test file (e.g., in a comment, test name, or metadata). **A single test can reference multiple artifacts** using comma or space separators:\n\n#### 🍎 Swift (XCTest \u002F Swift Testing)\n```swift\n\u002F\u002F You can mention multiple IDs in a comment\n\u002F\u002F ucc-feat-1, ucc-feat-2\n@Test(\"Successful login flow for ucc-feat-3\")\nfunc testLoginFlow() {\n    ...\n}\n```\n\n#### 🔷 TypeScript (Jest \u002F Mocha \u002F Vitest)\n```typescript\n\u002F\u002F IDs can be part of the test description separated by commas or spaces\ntest('should authenticate user (ucc-feat-1, ucc-feat-2)', () => {\n    ...\n});\n```\n\n#### 🦀 Rust (Cargo Test)\n```rust\n#[test]\nfn test_artifact_parsing_ucc_feat_1() {\n    \u002F\u002F Artifact IDs in test names are automatically discovered\n    ...\n}\n```\n\n#### ☕ Kotlin (JUnit \u002F Spek)\n```kotlin\n@Test\nfun testSecureLogin() {\n    \u002F* Multiple IDs in a block comment: ucc-feat-1 ucc-feat-2 *\u002F\n    ...\n}\n```\n\n> **Note on IDs:** Artifact and Feature IDs **cannot contain commas**, as commas are reserved as separators for multi-artifact annotations in test files.\n\n---\n\n## 📄 The `.ucc` Format\n\nUseCaseCoverage relies on `.ucc` files—standard YAML files that live alongside your code.\n\n### ✨ Basic Structure\n\n```yaml\nschema_version: \"1.0\"\n\nfeature:\n  id: user-authentication\n  title: User Authentication\n  created_at: \"2026-05-10\"\n  description: >\n    Handles user login, signup, and session management.\n\nrelated_features: []\n\nartifacts:\n  - id: ucc-feat-1\n    title: Successful login with valid credentials\n    priority: high\n    created_at: \"2026-05-10\"\n    steps:\n      - Enter username\n      - Enter password\n      - Click submit\n    expected:\n      - User is redirected to dashboard\n\n  - id: ucc-feat-2\n    type: bug\n    title: Login fails on slow connections\n    priority: highest\n    created_at: \"2026-05-10\"\n    related: [ucc-auth-001]\n    tags: [auth, secure]\n    platforms: [web, android, ios]\n    coverage_gap_reason: \"Impossible to test on Android automatically\"\n\n### 🧬 Tags & Platforms Inheritance\n\nTo avoid repetition, you can define `tags` and `platforms` at the **feature level**. All artifacts within that `.ucc` file will automatically inherit them unless they provide their own overrides.\n\n```yaml\nfeature:\n  id: user-authentication\n  tags: [auth]\n  platforms: [web, ios]\n...\nartifacts:\n  - id: ucc-feat-1 # Inherits tags: [auth] and platforms: [web, ios]\n    ...\n  - id: ucc-feat-2\n    platforms: [android] # Overrides platforms to [android], still inherits tags: [auth]\n```\n```\n\n### ✅ Linting `.ucc` files\n\nEnsure your specifications are perfect before generating reports. The `lint` command validates your `.ucc` files recursively, checking for:\n- Correct YAML schema.\n- **Unique IDs**: Ensures no two features or artifacts share the same ID across the entire project.\n- **Unique File Names**: Ensures `.ucc` file names are unique to prevent reporting conflicts.\n\n```bash\nucc lint\n```\n\n> **Tip:** You can specify an input directory or an output file for automated audits:\n> ```bash\n> ucc report --input .\u002Fspecs --output output_folder\n> ```\n\n### 📊 Generating Visual Reports\n\nTransform your YAML files into a stunning, interactive HTML dashboard that visualizes your project's health. The report includes:\n- **Coverage Metrics**: Global and feature-level coverage percentage.\n- **Artifact Inventory**: A searchable list of all your use cases, bugs, and regressions.\n- **Coverage Gaps**: A dedicated section with a **word cloud** visualization of common reasons for missing coverage.\n\n```bash\nucc report\n```\n\nBy default, reports are neatly organized in `.ucc\u002Freports\u002FYYYY-MM-DD_HH-MM-SS`. \n\n---\n\n### 🧩 Key Components\n\n- **Use Cases**: Standard artifacts capturing user requirements.\n- **Bugs & Regressions**: Explicitly tracked items with `type: bug` or `type: regression`.\n- **Cross-Platform Tracking**: Granularly track coverage across `android`, `apple`, `web`, `windows`, or any other platform you define in the `platforms` field.\n- **Coverage Gaps**: Document known missing coverage with `coverage_gap_reason` to keep the team informed about missing automated coverage.\n\n---\n\n## 🤖 GitHub Actions Integration\n\nAutomate your coverage tracking with a simple workflow. UseCaseCoverage can be installed on GitHub Actions runners (Ubuntu or macOS) using our universal installation script.\n\n```yaml\nname: Use Case Coverage\non: [push]\n\njobs:\n  coverage:\n    runs-on: ubuntu-latest # or macos-latest\n    steps:\n      - uses: actions\u002Fcheckout@v4\n      \n      - name: Install ucc\n        run: curl -fsSL https:\u002F\u002Fraw.githubusercontent.com\u002Fpedrovgs\u002FUseCaseCoverage\u002Fmain\u002Finstall.sh | bash\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Optional but recommended to avoid rate limits\n        \n      - name: Lint UCC files\n        run: ucc lint\n        \n      - name: Generate Report\n        run: ucc report\n        \n      - name: Upload Report\n        uses: actions\u002Fupload-artifact@v4\n        with:\n          name: ucc-report\n          path: .ucc\u002Freports\u002F\n```\n\n> [!TIP]\n> For a working example of installation via **Homebrew** or **Debian packages** in CI, check out our [verification workflow](.github\u002Fworkflows\u002Fverify-installers.yml).\n\n---\n\n## 👨‍💻 Developer Guide\n\n### 🛠 Prerequisites\n\n- Rust stable toolchain (`rustup` + `cargo`)\n- Git\n\n### 🚀 Initial Setup\n\n```bash\nrustup toolchain install stable\nrustup default stable\nrustup component add rustfmt clippy\n```\n\n### 🧪 Workspace Commands\n\n| Command | Action |\n| :--- | :--- |\n| `cargo fmt --all` | Format the entire codebase |\n| `cargo clippy --workspace` | Run the linter |\n| `cargo test --workspace` | Run all unit and e2e tests |\n| `cargo run -p use_case_coverage_cli -- report` | Run the CLI locally |\n\n---\n\n## Developed By\n------------\n\n* Pedro Vicente Gómez Sánchez - \u003Cpedrovicente.gomez@gmail.com>\n\n\u003Ca href=\"https:\u002F\u002Fx.com\u002Fpedro_g_s\">\n  \u003Cimg alt=\"Follow me on X\" src=\"https:\u002F\u002Fimg.icons8.com\u002F?size=100&id=6Fsj3rv2DCmG&format=png&color=000000\" height=\"60\" width=\"60\"\u002F>\n\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fes.linkedin.com\u002Fin\u002Fpedrovgs\">\n  \u003Cimg alt=\"Add me to Linkedin\" src=\"https:\u002F\u002Fimg.icons8.com\u002F?size=100&id=447&format=png&color=000000\" height=\"60\" width=\"60\"\u002F>\n\u003C\u002Fa>\n\n---\n\n## 📄 License\n\n```text\nCopyright 2026 Pedro Vicente Gómez Sánchez\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http:\u002F\u002Fwww.apache.org\u002Flicenses\u002FLICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n","UseCaseCoverage 是一个用于测量和收集任何应用程序或代码库用例覆盖率的CLI工具。它通过简单的`.ucc` YAML格式帮助开发者跟踪、计算并可视化测试覆盖率，确保测试覆盖了所有声明的用例、功能和错误。该工具采用Rust语言编写，具有隐私优先、零基础设施的特点，完全在本地运行或集成到CI流水线中，无需后端支持，保障数据安全。此外，UseCaseCoverage特别适合于AI驱动的开发环境，能够有效减少上下文窗口负载，提高AI代理性能，并且支持多种编程语言和框架，非常适合规格驱动开发场景。",2,"2026-06-11 04:06:57","CREATED_QUERY"]