spec-generator
Skill0 starsChanged 28 days agoMITView on GitHub
Turn a PRD into architecture decisions (ADRs) and an engineering spec (.specs/02-tech-spec.md and .specs/02-tech-spec/). Use when the user provides a PRD or asks for an architecture review, ADR, or technical specification. Do not use when requirements are still being brainstormed (use prd-generator) or when the task is already implementation.
5 other projects use a version of this.
Adopted by
Most recently taken up by
- ll6074729/skillstheir own version, first seen Oct 17, 2026
- anyoneanderson/agent-skillstheir own version, first seen Oct 13, 2026
- Meet-08/skillstheir own version, first seen Sep 27, 2026
- zhao-wuyan/ccw-command-explorertheir own version, first seen May 8, 2026
- unlearndev/skillstheir own version, first seen Mar 24, 2026
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- unlearndev/skills★ 106same name
- zhao-wuyan/ccw-command-explorer★ 45same name
- anyoneanderson/agent-skills★ 3same name
- ll6074729/skills★ 1same name
- Meet-08/skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository24 other files it gives its agents.
- AGENTS.mdAGENTS.md
- changeSkill
- convergeSkill
- devSkill
- diagnose-windows-sandbox-aclSkill
- plan-linterSkill
- prd-generatorSkill
- qaSkill
- quality-engineeringSkill
- reviewSkill
- spec-generatorSkill
- task-decompositionSkill
- test-engineeringSkill
- diagnose-windows-sandbox-aclSkill
- changeSkill
- convergeSkill
- devSkill
- plan-linterSkill
- prd-generatorSkill
- qaSkill
- quality-engineeringSkill
- reviewSkill
- task-decompositionSkill
- test-engineeringSkill
The file
We split this skill into the rules it gives an agent
11 rules. 0 are common, 8 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
8
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 23
Do not use when:
- Distinctive: line 51
Architecture review from four perspectives: Prefer independent reviewers when the host provides subagent tools.
- Very specific: line 60
Author the artifacts: Follow references/spec-format.md and the project conventions in references/project-conventions.md.
- Very specific: line 70
All helpers are stdlib-only Python and resolve paths from their own location, so the skill directory can be copied anywhere.
- Very specific: line 88
Create .specs/02-tech-spec/ and .specs/adr/.
- Distinctive: line 94
Write one ADR per accepted decision, using the ADR template.
- Distinctive: line 101
Every Mermaid block has a matching fence and balanced brackets.
- Distinctive: line 102
Every relative link resolves.
- Distinctive: line 103
Every ADR contains Status, Context, Considered Options, Decision, Consequences.
- Distinctive: line 104
No requirement, component or table lacks a trace to a REQ or ADR.
- Distinctive: line 108
Do not add components, tables or interfaces that the PRD/ADRs do not require.
“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Spec Generator
Turn a PRD into explicit architecture decisions and a technical specification that a task planner can slice. The skill supplies judgment (architecture review, trade-offs, decision records) and templates; it does not invent requirements.
When to use
- The user provides a PRD (or PRD directory) and asks for architecture, ADRs, or a technical spec.
- A requirement contains
FORK-*items that must become recorded decisions. - A downstream planner needs stable
#sec-*anchors,NFR-###targets andINV-###invariants.
Do not use when:
- Requirements are still ambiguous or missing: use
prd-generatorfirst. - The request is implementation or task slicing: use the downstream skills.
- The user only asks to explain an existing spec: answer directly.
Inputs
.specs/01-prd.md(aggregate) or.specs/01-prd/(bundle). Prefer the aggregate.- Any existing ADRs, constraints, and the target repository's conventions.
Outputs
| Path | Contents |
.specs/adr/NNN-title.md | One ADR per accepted architectural decision |
.specs/02-tech-spec.md | Aggregate technical specification |
.specs/02-tech-spec/01-topology.md | Topology and component responsibilities |
.specs/02-tech-spec/02-database-schema.sql | Data model and illustrative DDL (only if data is persisted) |
.specs/02-tech-spec/03-api-contracts.ts | API contract example (transport and language are project-specific) |
.specs/02-tech-spec/04-system-invariants.md | Invariants and enforcement |
The aggregate file is authoritative; the bundle is its modular copy.
Workflow
- Ingest the PRD. Extract every
REQ-*,CON-*,NFR-*andFORK-*item and reuse its#sec-*anchor. Do not rename anchors that downstream tasks consume. - Architecture review from four perspectives. Prefer independent reviewers when the host provides subagent tools. Otherwise run the same four roles as an explicit in-context review. Roles, veto, scoring and tie-break are in references/architecture-review-protocol.md.
- Decide every fork. For each
FORK-*, evaluate at least two options, record the decision and its consequences as an ADR under.specs/adr/. An unresolved fork must be reported, not silently chosen. - Scaffold (optional). From the repository root:
python .agents/skills/spec-generator/scripts/scaffold.py --out .specs(add--dry-runfirst). - Author the artifacts. Follow references/spec-format.md
and the project conventions in references/project-conventions.md.
Replace every
{{UPPER_SNAKE}}placeholder; keep anchors consistent with the PRD. - Lint (optional).
python .agents/skills/spec-generator/scripts/lint_spec.py .specs(or the aggregate file). Fix every error before handing off. - Hand off. State the ADR list, the spec paths, and any open technical questions.
The next step is
task-decomposition.
Tooling (optional)
All helpers are stdlib-only Python and resolve paths from their own location, so the
skill directory can be copied anywhere. Run them from the repository root with
--help instead of reading the source.
| Command | Purpose |
python .agents/skills/spec-generator/scripts/scaffold.py --out .specs [--dry-run] [--force] [--json] | Copy templates into the output tree; creates .specs/adr/ |
python .agents/skills/spec-generator/scripts/lint_spec.py .specs [--json] | Structural gate: placeholders, anchors, required tokens, Mermaid blocks, links, ADR sections |
python .agents/skills/spec-generator/scripts/engine.py run --prd .specs/01-prd.md --output-dir .specs | Optional engine proxy |
Exit codes: 0 success, 1 content/gate failure, 2 optional dependency or usage
unavailable, 3 unexpected error.
The engine is optional and never required. If it is not installed, engine.py exits
2 with install guidance. Scaffolding, authoring and linting still work.
Manual fallback (no Python)
- Create
.specs/02-tech-spec/and.specs/adr/. - Copy each
*.template.*file underassets/templates/into.specs/, removing the.templatesegment from the name (02-tech-spec.template.md->02-tech-spec.md); skipREADME.md.adr.template.mdis a shape for writing individual ADRs; it is not copied. - Fill every placeholder, then self-check against the quality gate below.
- Write one ADR per accepted decision, using the ADR template.
Quality gate
- No
{{...}},[TBD], orTODOtokens remain in the spec or ADRs. - At least one
#sec-*anchor; anchors reuse PRD identifiers and repeated references are fine. - At least one
NFR-###and oneINV-###; every NFR has a verification method. - Every Mermaid block has a matching fence and balanced brackets.
- Every relative link resolves.
- Every ADR contains Status, Context, Considered Options, Decision, Consequences.
- No requirement, component or table lacks a trace to a REQ or ADR.
Anti-hallucination rules
- Do not add components, tables or interfaces that the PRD/ADRs do not require.
- Templates are shapes, not content: never copy their illustrative values into the output.
- Mark unresolved forks and open questions explicitly; do not fabricate a decision.
References
- references/architecture-review-protocol.md - roles, rounds, veto, scoring, tie-break.
- references/spec-format.md - artifact contract, anchors, Mermaid/DDL/API guidance.
- references/project-conventions.md - configurable team conventions.
- references/zh-CN.md - optional Chinese quick reference.
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.

