Gap analysis
Verify a targeted plan is complete and validated — every task done, the Test Matrix backed by real tracking tags in tests, and code fully traced to spec (flagging underspecified code with no owning requirement). Optional semantic review checks that intent↔test↔code actually agree. Emits a quire-validated SpecReview artifact to reviews/YY-MM-DD-<slug>.md.From its SKILL.md
npx -y skills add agent-ix/quoin --skill gap-analysisAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 20 stars20 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
5.8 KB, as published. Nobody here has run it
Gap Analysis
Use this skill as a post-implementation verification gate for one targeted plan. It answers three questions and, on request, a fourth:
- Is the plan done? Every
Taskin the targeted plan bundle isstatus: done. - Is the Test Matrix real? Every Test Case in the matrix is backed by an actual test
carrying a matching tracking tag (
TC-xxx,FR-xxx-AC-x) in the test code. - Is anything unspecified? Code/behavior exists with no owning StR/US/FR/NFR (the reverse, code→spec gap).
- (optional) Does intent match reality? For each requirement↔test↔code triple — does the test validate the requirement's intent, does the test actually exercise the code, and does the code match the requirement's intent.
The result is a single quire-validated SpecReview document (analysis: gap-analysis)
written to reviews/YY-MM-DD-<slug>.md, with a Verdict (PASS / CONDITIONAL / FAIL)
and a validated Findings table.
When to use
- After
implement-plan(or any implementation effort) to confirm a plan is genuinely complete and verified before closing it. - To audit drift between spec, tests, and code for an existing component.
- As a release/merge gate that produces a durable, traceable review artifact.
This skill is read-only over the codebase — it inspects and reports; it does not fix code, edit the plan, or change the matrix. Its only write is the SpecReview artifact.
Inputs
- A target plan bundle
plan/<Plan-id>-<slug>/(the user may name it; otherwise pick). - The component spec (
spec/spec.mdfororg/name) and Test Matrix (spec/matrix.mdorspec/tests.md). - The source and test trees of the component.
Steps
- Target selection: Resolve the plan bundle,
spec root, Test Matrix, and
org/componentforix://URIs. - Plan completion: Assert every
Taskisdone; report incomplete/blocked tasks and staleplan.mdcheckboxes. - Matrix verification: Run
quire coverage --scope <root> --jsonand interpret the report — unbacked rows, status lies, untracked tests, and the backed/total rollup. The reconciliation is the engine's; the severity and the verdict stay here. A repo whose module set declares notraceability:model falls back to a grep index, declared as such. - Underspecified code: Find code/behavior with no owning requirement (reverse gap), plus stubs masquerading as complete.
- Semantic review (OPTIONAL — ask first): Judge intent↔test↔code agreement per requirement. Skip unless the user opts in.
- SpecReview artifact: Write and validate
the
SpecReviewtoreviews/YY-MM-DD-<slug>.md.
All steps required except Step 4, which is gated on user choice.
--scopeis the repository root, and must be passed explicitly. Since quire-cli v0.16.0 (quire-rs CR-045) the command derives two roots from it and never interchanges them: spec documents are read from<repo>/speconly, trace tags from the source tree at<repo>excludingspec/. A repo with nospec/exits with a diagnostic naming the missing document root rather than scanning the whole tree, and a matrix outsidespec/(a fixture, aplan/copy) mints nothing. A relative glob resolves under--scopeonly in scoped mode (no--module); with--moduleit resolves against the process working directory, and an omitted--scopedefaults to.— so a run launched from a parent directory validates the wrong tree and exits 0 for whatever it matched. Checkquire --version≥ 0.16.0 before relying on any of this; ≤ 0.15.0 has the pre-split traversal semantics.
The optional semantic review
Steps 1–3 are mechanical and cheap. Step 4 is an expensive, judgment-heavy LLM pass. Before running it, ask the user explicitly (e.g. with a yes/no choice):
Run the optional semantic review (intent↔test↔code)? It's slower but verifies that tests actually validate requirement intent and exercise real code.
If yes, fan the work out (one subagent per FR or per area) for thoroughness. If no, note in the SpecReview's Coverage section that semantic review was skipped.
Output
A SpecReview (spec-artifacts-process archetype) at <project_root>/reviews/YY-MM-DD-<slug>.md:
- Frontmatter
type: SpecReview,analysis: gap-analysis,id: SR-NNN,scope,review_set: subset, andrelationships:(reviews→ the plan,references→ the matrix). - Body:
## Summary,## Verdict(PASS/CONDITIONAL/FAIL),## Findings(validated tableID | Severity | Summary | Refs),## Coverage(rollup).
Note:
reviews/is at the repo root by deliberate choice for this skill, notspec/reviews/. quire validation is path-agnostic, so this is fine.
Validate before finishing:
quire validate --scope <project_root> "reviews/**/*.md"
Verdict rule
- FAIL — any incomplete/blocked task, any matrix Test Case with no backing tagged test,
or any
high-severity finding. - CONDITIONAL — only
medium/lowfindings (e.g. untracked tests, minor drift). - PASS — no gaps; record the single
FND-001 | low | No gaps found | -row.