/quoin:gap-analysisfrom quoin
Audits a repository end-to-end by verifying spec criteria against test matrix, tagged tests, and source code. Detects untested criteria, code without owning requirements, stubs, and coverage inflation. Emits a validated SpecReview artifact.
Ships in quoin. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Invoke this agent skill as quoin:gap-analysis (or /gap-analysis in a host
that exposes slash commands). It is not a shell subcommand: do not run
quoin gap-analysis. Read and execute the procedures below; their command examples identify the
shell invocations. A failed invented subcommand does not
make this skill unavailable or excuse skipping reverse-gap and stub checks.
If this plugin is not initialized or an Agent IX command fails, read the quoin setup guide for its prerequisites and local diagnosis.
Use this skill as a repository assurance audit. The chain it verifies is always the same, with or without a plan:
spec criteria ↔ computed Test Matrix ↔ tagged tests ↔ source code
It answers three questions by default, a fourth on request, and a fifth only when the caller explicitly hands it a plan:
FR-xxx-AC-x) in the test code. The Test Matrix
that answers this is computed by quire matrix (and quoin matrix, which adds run
evidence); nobody writes it by hand.Task is status: done,
done tasks did not complete out of dependency order, and plan.md checkboxes agree with
task status.The result is a single quire-validated SpecReview document (analysis: gap-analysis)
written to reviews/YYYY-MM-DD-<slug>-gap-analysis.md, with a Verdict (PASS / CONDITIONAL / FAIL)
and a validated Findings table.
Planless (the default). No plan is selected, discovered, or asked for. The repository audit — matrix verification, reverse gaps, and stubs — runs in full, and the semantic review is offered on the same terms as ever. The SpecReview records, verbatim:
Plan completion: not assessed
Plan-assisted (opt-in). The caller names a plan — /gap-analysis --plan Plan-001, or
says so in the request. The same repository audit runs identically and over the same
repository scope, and plan-completeness bookkeeping is added on top.
A plan is an addition, never a lens. It does not choose the scope, does not narrow the requirement set, does not bound the code surface inventoried, and does not suppress a finding for sitting outside its tasks.
Task, a
requirement, or an acceptance criterion. Its only write is the SpecReview artifact.spec-to-plan first as a precondition.plan/ directory containing bundles does not make this a
plan-assisted run. Only an explicit caller instruction does.spec/matrix.md or spec/tests.md, where one still exists, is not audited,
and its absence is not a finding.--plan <Plan-id>, to additionally confirm that plan is
genuinely complete.This skill is read-only over the codebase — it inspects and reports; it does not fix code, edit the plan, or add trace tags.
spec/spec.md for org/name, and its criteria).plan/<Plan-id>-<slug>/, only when the caller names one.Each step says when it runs. Nothing here is numbered, because the plan step is an overlay rather than a position in a sequence, and a number would imply the audit waits on it.
Always — Target selection. Resolve the
repository root, spec root, and org/component for ix:// URIs. Record
whether a plan was explicitly supplied.
Always — Matrix verification. Run
quoin matrix --repo <root> --json (or quire matrix --scope <root> --format json when
there is no evidence to read) and interpret the computed matrix — untagged criteria,
criteria tagged only by ignored tests, suspect or stale evidence, and stale tags. The
computation is the engine's; the severity and the verdict stay here. A repo whose module
set declares no traceability: model falls back to a provisional grep index, declared
as such; it cannot establish an engine-backed PASS.
Always — Underspecified code. Find code/behavior with no owning requirement (reverse gap), plus stubs and coverage inflation masquerading as complete.
Only when the user opts in — Semantic review. Judge intent↔test↔code agreement per requirement. Ask first; skip unless the user says yes. Opt-in works the same way in both modes.
Only with an explicit plan — Plan completeness.
Assert every Task is done, check done-task dependency order, and reconcile plan.md
checkboxes against task status. This is bookkeeping added to the audit, not a gate in front
of it.
Always — SpecReview artifact. Write and
validate the SpecReview to reviews/YYYY-MM-DD-<slug>-gap-analysis.md.
--scopeis the repository root, and must be passed explicitly. 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 document 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.
The matrix, reverse-gap, and plan-completeness steps are mechanical and cheap. The semantic review 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.
A SpecReview (spec-artifacts-process archetype) at
<project_root>/reviews/YYYY-MM-DD-<slug>-gap-analysis.md:
type: SpecReview, analysis: gap-analysis, id: SR-NNN, scope,
review_set: subset, and relationships: (references → the spec root; plus reviews
→ the plan only in plan-assisted mode).## Summary, ## Verdict (PASS/CONDITIONAL/FAIL), ## Findings
(validated table ID | Severity | Summary | Refs), ## Coverage (rollup, including the
plan-completion line).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"
high-severity finding,
or (plan-assisted only) any incomplete/blocked task.medium/low findings (e.g. untracked tests, minor drift).FND-001 | low | No gaps found | - row.A planless run can reach PASS. That PASS asserts repository assurance — criterion traceability,
reverse-gap, and stub checks — and nothing about whether the work was ever planned. The
Plan completion: not assessed line in ## Coverage is what keeps the two apart, and it is
mandatory.
references/step-1-target-selection.md (opens in a new tab)references/step-2-plan-completion.md (opens in a new tab)references/step-3-matrix-verification.md (opens in a new tab)references/step-4-underspecified-code.md (opens in a new tab)references/step-5-semantic-review.md (opens in a new tab)references/step-6-specreview-artifact.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub agent-ix/quoin --plugin quoin23 skills in this plugin
/assurance-status-reportProduce an evidence-backed status report for a Quoin/Quire epic, phase, or assurance campaign. Use when asked for progress, percent complete, before/after metrics, completed-ticket inventory, open-work classification, or readiness for the next phase. The workflow is read-only and does not comment on, close, or modify tickets or repositories./design-gatePropose and check a data-flow design, revise bounded denials, and leave acceptance to a person./formalize-requirementDraft and type-check one QSL rule for a requirement./spec-app-reviewReview an application-type spec for completeness against UI rendering requirements and golden-path structure./spec-architecture-evaluationEvaluate a repository's implemented architecture against its stated boundaries, quality goals, and operating scenarios, producing an evidence-backed SpecReview. Use for architecture reviews; do not use for general test-gap or code-style review./spec-correctnessTurn classified acceptance criteria into runnable property tests. Consumes `quire properties --json` per-criterion records, grounds each criterion's domain, precondition and oracle in the spec and the code, and emits property tests in the repo's own harness (proptest / fast-check / hypothesis) keyed on `row_id`. Emits a validated SpecReview recording every criterion it could not ground and why.Other plugins' skills for the same job