skills/spec-audit/SKILL.md
This skill should be used when the user asks to "audit the implementation against the spec", "run the spec audit", "check spec conformance", "verify the branch against the criteria", or "spec audit". Executes the frozen conformance checklist from .specs/<slug>/criteria/ against the implementation diff and reports PASS/VIOLATION/UNVERIFIABLE per criterion with file:line evidence. Report-only; never edits production code.
npx skillsauth add ryan-mahoney/ryan-llm-skills spec-auditInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Execute a compiled conformance checklist against an implementation. This skill answers "is it the thing the spec described", not "is it correct" — correctness review (roborev, generic code review) is a separate, orthogonal gate. A criterion can be violated while every test passes; most criteria exist precisely because tests cannot see them. "All tests pass" is never exculpatory evidence here.
Run this at the end of a branch, after correctness review. Re-running after fixes is cheap because the criteria are frozen.
Resolve the spec target in this order:
$ARGUMENTS is a path to a markdown file, use that file.$ARGUMENTS names a folder under .specs/, use .specs/<feature-slug>/spec.md.$ARGUMENTS is a GitHub issue number and the current repository is hosted on GitHub, read the issue with gh issue view <issue-number> --json body --jq .body, extract its Spec folder: .specs/<feature-slug>/ footer, and use the local .specs/<feature-slug>/spec.md. If the local file is missing but the issue body has a valid footer, create the folder and write the issue body to spec.md..specs/*/spec.md.Then locate the checklist from local artifacts. A worktree does not need to know that it is "phase N"; phase is only a planning/checklist artifact.
Use this order:
spec.md footer or body contains a phase marker such as (phase N) or Phase N of M, use .specs/<feature-slug>/criteria/phase-<n>.md..specs/<feature-slug>/criteria.md exists, use it..specs/<feature-slug>/criteria/phase-*.md file exists, use that file and treat its phase number as the checklist identity for report naming.criteria/phase-*.md files exist and no phase marker was resolved, stop and ask the user to pass the phase-specific criteria path or add a phase marker to the local spec.md. Do not infer the phase from the worktree branch name.If no checklist exists, stop and instruct the user to run spec-criteria first. Do not derive criteria inline from the spec: compiling criteria while reading the implementation defeats the epistemic firewall the checklist exists to provide — an auditor that interprets the spec and judges the code in the same pass will harmonize them.
Also load .specs/<feature-slug>/invariants.md in full when it exists — every entry from every phase, not just the current one.
git diff $(git merge-base <default-branch> HEAD)...HEAD), plus the changed-file list.$ARGUMENTS includes a PR number or commit range, audit that instead (gh pr diff <number> or the given range).The diff defines what this branch is accountable for. Checks read whole files where the criterion demands it, but every finding must cite code this branch introduced or changed; pre-existing violations of a criterion are reported separately as pre-existing, not charged to the branch.
Work through every criterion block in the checklist, by mode:
file:line. Do not reinterpret the expectation — if the compiled expectation seems wrong, that is an UNVERIFIABLE with a note, not a silent adjustment.invariants.md entry not marked superseded, including invariants established by earlier phases. A current-phase change that violates an earlier phase's invariant is a finding of the current phase — phase boundaries are where ownership violations happen.Verdict vocabulary, per criterion:
PASS — check executed, expectation met; record the evidence, not just the verdict.VIOLATION — check executed, expectation not met; file:line evidence required.UNVERIFIABLE — the check could not be executed as compiled (precedent moved, file renamed, command matches nothing it should, question ambiguous). Never silently skip or guess: UNVERIFIABLE items are criteria-quality feedback to route back to spec-criteria.Do not soften verdicts. A behaviorally-silent violation — same observable behavior, wrong placement, duplicated rule, unlicensed divergence — is still a VIOLATION. Equivalence of behavior is not conformance.
Write the audit report next to the spec, overwriting any previous run:
criteria/phase-<n>.md, write .specs/<feature-slug>/audit/phase-<n>.md.criteria.md, write .specs/<feature-slug>/audit.md.file:line plus the offending excerpt), and a one-paragraph description of what conforming code would look like. Describe; do not patch.pre-existing section if applicable.Summarize in conversation with violations first, then counts. If there are zero violations, say so plainly.
spec-review or spec-criteria.Do not add Co-Authored-By trailers, "Generated with" footers, or any AI model attribution.
documentation
This skill should be used when the user asks to "write a spec", "create a spec", "spec this out", "plan this feature", or "write an implementation plan" for a feature or change. Creates a structured implementation spec in .specs/<slug>/spec.md and mirrors it to GitHub only when the current repository is hosted on GitHub.
data-ai
This skill should be used when the user asks to "execute the spec", "run the plan", "implement the spec", "implement the issue", "run all steps", or "run spec". Implements all steps from .specs/<slug>/spec.md, using a subagent per step when the harness supports subagents.
testing
This skill should be used when the user asks to "review a spec", "review an issue", "check the plan", "review the implementation plan", "find gaps in the spec", or "review spec". Reviews .specs/<slug>/spec.md for gaps and viability, edits it when needed, and mirrors changes to GitHub only when a GitHub mirror exists.
development
This skill should be used when the user asks to "remediate the audit findings", "fix the spec violations", "close the audit findings", "fix conformance violations", or "spec remediate". Reads a spec-audit report, drives one smart subagent per VIOLATION to converge the code back to the frozen spec, and re-audits until clean. Edits production code; never rewrites the spec.