Analyze coverage
Skill Omar-Hegazy-Integrant/buddy-council-plugin/skills/analyze-coverage
Internal (used by /bc:coverage) — Analyze normalized requirements and test cases to identify coverage gaps, untested requirements, orphan test cases, and weak coverage.From its SKILL.md
npx -y skills add Omar-Hegazy-Integrant/buddy-council-plugin --skill analyze-coverageAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
4.9 KB, as published. Nobody here has run it
Analyze Coverage — Skill
Identify coverage gaps between requirements and test cases after they have been fetched, normalized, and cross-linked.
When to Use
After artifacts have been fetched and normalized. This is the core analysis skill invoked by the coverage agent.
Preconditions (MANDATORY)
This skill requires normalized requirements AND test cases. If you were handed zero test cases, do NOT report "0% coverage" as a finding — a zero-test-case input almost always means the fetch was skipped or failed. Stop and tell the calling agent to verify the test-case fetch (empty result vs. provider error). Only compute true 0% coverage when the caller has confirmed the scope genuinely has no test cases.
Coverage Categories
1. Untested Requirements
Requirements where linked_ids is empty — no test cases are linked to them.
2. Orphan Test Cases
Test cases where linked_ids is empty — no requirements are linked to them.
3. Weak Coverage
Requirements that have linked test cases, but the test cases do not meaningfully exercise the requirement's acceptance criteria. Examples:
- Test only covers the happy path but requirement specifies error handling
- Test checks a UI element but requirement defines a behavioral constraint
- Test validates a subset of conditions but requirement lists multiple
Analysis Approach
For Scoped Analysis (single requirement or feature)
- Check each requirement in scope for empty
linked_ids→ untested - Check each test case in scope for empty
linked_ids→ orphan - For requirements with linked test cases: compare the requirement description against test case steps and expected results to assess coverage depth
- Compute coverage metrics for the scope
For Full Analysis (all requirements)
For large scopes the coverage agent drives this as a per-feature loop, invoking this skill once per feature so all artifacts never sit in context at once. Whether called per-feature or all at once, apply the same logic:
- Group requirements and test cases by feature
- Analyze each feature independently
- Aggregate into a summary with per-feature breakdown
- Flag features with the lowest coverage percentages
Weak Coverage Detection
For each requirement that has at least one linked test case:
- Read the requirement description for acceptance criteria, conditions, and constraints
- Read each linked test case's steps and expected results
- Identify gaps: criteria in the requirement that no test case exercises
- Only flag cases with clear gaps — do not flag stylistic differences
Important: Weak coverage findings require human judgment. Label them clearly as suggestions, not definitive gaps.
Coverage Metrics
Compute these for every analysis:
- Total requirements in scope
- Tested: requirements with at least one linked test case
- Untested: requirements with no linked test cases
- Coverage %:
(tested / total) * 100 - Total test cases in scope
- Linked: test cases with at least one linked requirement
- Orphan: test cases with no linked requirements
Output Format
Produce a human-readable report:
# Coverage Analysis Report
## Summary
- **Scope**: [what was analyzed]
- **Requirements**: [total] ([tested] tested, [untested] untested)
- **Test cases**: [total] ([linked] linked, [orphans] orphans)
- **Coverage**: [percentage]%
## Feature Coverage Breakdown
| Feature | Requirements | Tested | Untested | Coverage |
|---------|-------------|--------|----------|----------|
| [name] | [n] | [n] | [n] | [n]% |
## Untested Requirements
### [Feature Name]
- **CWA-REQ-XX**: "[title]" — [brief note on what is untested]
## Orphan Test Cases
- **TC-XXXX**: "[title]" — no linked requirement found
## Weak Coverage
- **CWA-REQ-XX**: "[title]" — linked to TC-XXXX but test only covers [aspect]; requirement also specifies [missing aspect]
## Recommendations
1. [Highest priority: safety-critical untested requirements]
2. [Feature areas with lowest coverage %]
3. [Orphan test cases that may need linking or removal]
Severity Classification
| Severity | Criteria |
|---|---|
| HIGH | Safety-critical or core functionality requirement with zero test coverage |
| MEDIUM | Non-critical requirement with zero coverage, or orphan test case |
| LOW | Weak coverage — test exists but is superficial |
Guidelines
- Do NOT flag requirements with status "Deprecated" or "Deferred" as untested
- Do NOT flag documentation-only requirements (e.g., "Document Identification", "Referenced Documents") as gaps
- Be specific: quote requirement IDs and test case IDs
- Provide actionable recommendations ordered by priority
- When coverage is 100%, still check for weak coverage