skills/spec-run/SKILL.md
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.
npx skillsauth add ryan-mahoney/ryan-llm-skills spec-runInstall 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.
You are an orchestrator. Implement every step in a reviewed implementation spec. Delegate each spec step to a dedicated subagent when the current harness supports subagents. Do not write production code directly unless subagent execution is unavailable.
Use surgical, low-risk changes. Do not add complexity, unnecessary conditions, or unnecessary backward compatibility.
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 feature slug from the Spec folder: footer or parent folder. Capture a GitHub issue number only when it is provided or can be verified from an available mirror.
Covers: AC-n tag or traces to a stated architectural need.If the spec references files, types, or signatures that do not exist and are not explicitly part of a prior step, treat that as a spec defect and stop.
If spec-criteria was run, a compiled conformance checklist exists at .specs/<feature-slug>/criteria/phase-<n>.md (or criteria.md), with a cross-phase ledger at .specs/<feature-slug>/invariants.md. These let implementers avoid the behaviorally-silent conformance slips that pass tests but violate the spec's ownership and placement directives.
This step is best-effort and never blocking. Most violations are cheap to fix at audit time, so a missing or unreadable checklist must not stop or delay spec-run:
criteria/ file and no invariants.md exist, skip this section silently and proceed. Do not run spec-criteria, do not warn, do not block — spec-audit is the backstop either way.spec.md, else criteria.md, else the single criteria/phase-*.md if exactly one exists. If the phase is ambiguous (multiple phase files, no marker), skip silently — do not guess.When a checklist is found, extract guardrails with two deliberate limits:
Source: quote (the spec sentence). Never include the Check: command, grep pattern, or expected hit set. The implementer must satisfy the property, not the proxy — handing it the grep invites letter-not-spirit evasion and destroys the audit's independence as verification.X-mode (cross-phase ownership) criteria and invariants.md entries not marked superseded, plus any D/S criterion whose violation would be expensive to fix once later code depends on it (ownership, placement, layering). Skip G trivia and anything already pinned by an acceptance criterion (T). These are the "built on the wrong foundation" failures worth preventing up front; the rest stays a pure end-audit.Collect the selected Source: quotes verbatim into a short guardrail list. This list is injected into every step's prompt (below). If the list is empty after filtering, omit the guardrail block from the prompt entirely.
For each step, run one subagent dedicated to that step.
Preferred generic invocation for Codex, Claude, OpenCode, and harnesses with a generic subagent facility:
Agent(
subagent_type: "general-purpose",
description: "Implement <feature-slug> step <step-id>",
prompt: "<STEP_PROMPT>"
)
Augment CLI adapter:
spec-step-implementer subagent when it is configured under ~/.augment/agents/ or ./.augment/agents/.You are implementing a single step from a repository-local implementation spec.
Spec file: <absolute path to .specs/<feature-slug>/spec.md>
GitHub mirror: <issue number or "none">
Step to implement: <exact step text>
Conformance guardrails (ownership/placement constraints this step must respect;
omit this block entirely when the guardrail list is empty):
<CONFORMANCE_GUARDRAILS — one Source quote per line, or omitted>
Before coding, read:
1. The full local spec file.
2. Any source files needed to implement this step.
Rules:
- Implement ONLY this step. Do not do future steps.
- If the step cannot be implemented as written because a referenced file, type,
signature, or project convention does not exist or does not match the spec,
STOP and report the discrepancy. Do not improvise an alternative design.
- Keep changes simple, explicit, and fail-fast.
- No speculative abstractions or over-engineering.
- Prefer minimal, surgical edits.
- Follow existing project patterns.
- Add or adjust tests only when needed for this step.
- Do not run the entire test suite; run only targeted tests for changed behavior.
Engineering principles:
- Fail fast on invalid inputs. No defensive fallbacks unless explicitly required.
- Prefer raising errors over silent failures or default values.
- Simple over clever. Boring, maintainable code.
- Build for today, not imagined futures.
- Concise and idiomatic code. Small functions under 10-15 lines where practical.
- Single responsibility per function.
- Clear but concise naming.
- Rule of three: do not abstract until 3 uses.
- Contextual error messages: what failed, what was expected, how to fix.
- Propagate errors; do not suppress them.
- Do not add try/catch unless explicitly needed.
- Do not create interfaces with only one implementation.
- Do not add comments explaining what code obviously does.
Output requirements:
1. Summary of what changed and why.
2. Exact files modified.
3. Commands run for verification and their outcomes.
4. Any assumptions, risks, or spec discrepancies.
Verification is mechanical: scope, tests, build. Do not re-review the design; the spec already passed review.
type(scope): description.(#<issue-number>).feat, fix, refactor, chore, or test.Each step gets its own commit. This enables per-step review.
If verification fails, invoke one fix-up subagent:
Previous implementation for step <step-id> is incomplete or failing.
Spec file: <absolute path to spec.md>
Errors/findings: <list>
Read the local spec and relevant source files. Fix only what is required for
this step. Keep changes minimal. Run targeted verification and report results.
Allow up to 2 fix-up attempts per step. If still failing, stop and report blockers.
If a step fails because the spec conflicts with the codebase, do not burn fix-up attempts. Record the discrepancy in .specs/<feature-slug>/blockers.md. If a GitHub issue mirror is available, also post the blocker as an issue comment with gh issue comment <issue-number> --body "...".
After all steps succeed, verify the spec's Acceptance Criteria:
Covers: AC-n tags map to it. Do not run the entire test suite unless the spec explicitly names it as the only meaningful verification.After the acceptance gate passes, report:
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.
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.
development
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.