skills/spec-criteria/SKILL.md
This skill should be used when the user asks to "compile review criteria", "generate spec criteria", "compile the conformance checklist", "build guardrails from the spec", or "spec criteria". Compiles a frozen spec's normative prose into an executable conformance checklist at .specs/<slug>/criteria/, blind to any implementation of that spec, and accumulates cross-phase ownership invariants in .specs/<slug>/invariants.md.
npx skillsauth add ryan-mahoney/ryan-llm-skills spec-criteriaInstall 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.
Compile a reviewed, frozen spec into a conformance checklist that spec-audit can execute after implementation. Acceptance criteria are already verified by tests; this skill captures everything tests structurally cannot see: ownership directives ("validation stays store-owned"), negative constraints ("no parser definitions in appServer.ts"), and licensed deviations from precedent ("mirror X, except these deltas"). A behaviorally-silent violation of these passes every test — the checklist is the only artifact that can catch it.
Run this after spec-review passes and before spec-run. The same checklist may be injected into implementer prompts as guardrails; for negative constraints, teaching to the test is the point.
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.If no local spec can be resolved, stop and report the missing input. Local spec.md is canonical; GitHub issues are optional mirrors.
Capture the phase when one exists: a (phase N) marker in the spec footer, a "Phase N of M" line in the body, or a phase number in the issue title. Phased specs write criteria/phase-<n>.md; unphased specs write criteria.md.
This skill is one half of an epistemic firewall. Criteria compiled while reading the implementation get anchored by the implementation — the compiler will harmonize spec and code instead of pinning the spec. Therefore:
spec.md, proposal.md, critique.md, invariants.md) and from pre-existing precedent code the spec cites.(new), no commits referencing this spec or its issue. If implementation already exists when this skill runs, do not open it; record compiled blind: implementation existed but was not read in the criteria header.server/skillStore.ts" or cites appServer.ts line ranges, read those files — at the baseline the spec references — because diff targets cannot be compiled without them. Precedent is pre-existing code; the firewall applies only to code written to satisfy this spec.Walk Architecture, Design decisions, Notes, and Implementation Steps sentence by sentence. A statement is normative when it constrains the implementation: "stays", "only", "no", "must not", "exactly", "lives in", "owned by", "intentionally differ", "unlike", "do not", "instead of". Restated acceptance criteria and purely descriptive prose are not separate criteria.
Assign each normative statement exactly one verification mode:
When a statement fits two modes, prefer the cheaper deterministic one (G over D over S) and note the residual judgment in the S question only if the grep cannot carry it alone.
Write .specs/<feature-slug>/criteria/phase-<n>.md (or criteria.md). Structure:
git rev-parse HEAD at compile time), the blindness statement, and counts per mode.### C-3 (G) — slug validation stays store-owned
Source: §4 Architecture — "Once the slug is decoded, slug validation stays store-owned: OutputStyleValidationError maps to 422."
Check: rg -n "OUTPUT_STYLE_SLUG_PATTERN|OUTPUT_STYLE_SLUG_MAX_LENGTH" server/appServer.ts
Expect: no matches outside import statements.
Violation means: slug validation duplicated at the route layer instead of delegated to the store.
### C-7 (D) — routes mirror the /skill-files block
Source: §2 — "mirroring the landed /skill-files surface".
Diff target: server/appServer.ts /skill-files route block (≈ lines 1500–1660 at baseline).
Licensed deltas (each quoted from the spec):
| Delta | Quote |
| --- | --- |
| GET/:slug, POST, PUT return { style } envelope | "output-style GET /:slug, POST, and PUT return { style }" |
| POST returns 200, not 201 | "POST returns status 200, not 201" |
| DELETE returns 204 with no body | "DELETE returns new Response(null, { status: 204 })" |
Any other divergence from the precedent block is a violation.
Quality bar: every G check must be runnable verbatim; every D check must name a findable diff target; every S check must pose a question answerable yes/no from named files. A criterion the auditor cannot execute mechanically or answer decisively is a compilation defect — rewrite it.
Append every X-mode invariant to .specs/<feature-slug>/invariants.md, creating the file on first use. Per entry: the invariant statement, the establishing phase, the source quote, and a suggested check (G command or S question). The ledger is append-only across phases: never delete or rewrite earlier entries; if a later spec genuinely supersedes one, mark it superseded by phase <n> with the licensing quote and leave the original text intact.
The ledger exists because phase boundaries are where ownership violations happen: a constraint established in phase 1 ("validation lives in the store") is most at risk during phase 2, whose own spec may only mention it in passing. spec-audit checks the entire ledger on every phase, not just the current phase's criteria.
spec.md should reproduce the same checklist. If spec.md changed since the last compile, recompile fully and overwrite; note the new baseline commit.spec-review, not something to smuggle in here.Summarize in conversation: criteria counts per mode, ledger entries added, T-register size, and the paths written.
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.