spec-implementation
Skill0 starsChanged 23 days agoMITView on GitHub
Implement a written spec that has acceptance criteria by looping implement, validate, fix until checks pass, then report evidence per criterion. Use when the user hands over a spec, ticket or requirements doc and wants it built and verified, not just drafted.
In this repositoryOne other file it gives its agents.
The file
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 8 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 26
Read the result. Fix ambiguity by asking the user, not by guessing.
- Distinctive: line 31
Write the list of slices to the user in a few lines.
- Distinctive: line 32
Implement one slice: Add or update a test for the criterion first when feasible, then the minimal code.
- Very specific: line 35
Read failures: Use failure_lines and output_tail in the report.
- Distinctive: line 40
Bound the loop: Default maximum is 5 validation iterations per slice and 15 overall.
- Distinctive: line 42
Do not weaken tests, delete assertions or skip checks to get green.
- Distinctive: line 47
Do not edit the spec's criteria.
- Very specific: line 48
Never mark a criterion met without evidence: a test name, command output line, or file and line reference you actually observed.
- Distinctive: line 52
Keep changes scoped to the spec.
- Distinctive: line 53
Do not commit or push unless the user asked.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Spec implementation with a validation loop
Turn a written spec into working code, and prove each acceptance criterion is met. The loop is the point: never declare success from reading your own diff; declare it from command output.
Inputs
- A spec file (markdown). Acceptance criteria are list items, ideally under an "Acceptance criteria" heading. If the spec has none, stop and propose criteria to the user before coding.
- A way to validate:
validate.json/validate.shin the repo root, or commands you discover (test runner, linter, type checker). If none exist, ask which to use or create a minimalvalidate.jsonand say so.
Scripts live in this skill's scripts/ directory (Python 3, stdlib only).
Procedure
- Parse.
python scripts/spec_checklist.py SPEC.md --out .spec-checklist.json. Read the result. Fix ambiguity by asking the user, not by guessing. Stop on exit code 2 (no criteria found). - Baseline. Run
python scripts/run_validation.py --out .validation-0.json --iteration 0before changing anything, so pre-existing failures are not blamed on you. - Plan slices. Order criteria into the smallest independently verifiable slices. Write the list of slices to the user in a few lines; do not start a large rewrite.
- Implement one slice. Add or update a test for the criterion first when feasible, then the minimal code.
- Validate.
python scripts/run_validation.py --iteration N --out .validation-N.json. - Read failures. Use
failure_linesandoutput_tailin the report. Identify the root cause before editing. If two iterations in a row fail the same way, change approach (re-read the spec, inspect assumptions) rather than repeating the same patch. - Fix and repeat from step 5. Stop when all checks are green for the current slice, then go to the next slice (step 4).
- Bound the loop. Default maximum is 5 validation iterations per slice and 15 overall. On hitting the cap, stop and report what is failing, what you tried, and your hypothesis. Do not weaken tests, delete assertions or skip checks to get green.
- Final report (format below).
Rules
- Do not edit the spec's criteria. If a criterion is wrong or impossible, say so in the report.
- Never mark a criterion
metwithout evidence: a test name, command output line, or file and line reference you actually observed. - Green validation proves only what the checks cover. A criterion with no covering test is
unverified, notmet; say what manual check would settle it. - Keep changes scoped to the spec. Note unrelated problems separately.
- Do not commit or push unless the user asked.
Final report format
## Result: <all criteria met | partially met | blocked>
Validation: <summary from last run_validation.py report> (iterations used: N)
| ID | Criterion | Status | Evidence |
|----|-----------|--------|----------|
| AC-1 | ... | met / unverified / failing | tests/test_x.py::test_y passed |
### Not done / risks
- ...See references/validation-loop.md for the report schema, stop conditions and tips for
projects without a test suite, and examples/ for a sample spec and validate.json.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

