spec-generator
Skill3 starsChanged 8 days agoMITView on GitHub
Specification Generator — Generate project requirements, design documents, and task lists.
5 other projects use a version of this.
Adopted by
Most recently taken up by
- formal-you/agent-skills-suitetheir own version, first seen Oct 20, 2026
- ll6074729/skillstheir own version, first seen Oct 17, 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★ 101same name
- zhao-wuyan/ccw-command-explorer★ 45same name
- ll6074729/skills★ 1same name
- formal-you/agent-skills-suite★ 0same 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
- agent-delegateSkill
- cmux-delegateSkill
- cmux-forkSkill
- cmux-second-opinionSkill
- handoverSkill
- harness-initSkill
- harness-loopSkill
- harness-planSkill
- ja-humanizerSkill
- magiSkill
- mcp-convertSkill
- skill-suggestSkill
- spec-codeSkill
- spec-evaluateSkill
- spec-implementSkill
- spec-inspectSkill
- spec-orchestrateSkill
- spec-reviewSkill
- spec-rules-initSkill
- spec-testSkill
- spec-to-issueSkill
- spec-workflow-initSkill
- spec-writingSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
37 rules. 0 are common, 23 are distinctive, and 14 are very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
23
Distinctive
This author's own choices. Worth a look.
14
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 30
Auto mode short-circuit: If invoked with --auto --issue <n>, skip the interactive decision flow below and follow references/auto-mode.md …
- Very specific: line 38
Run pwd to see where you are
- Very specific: line 39
Run ls -la to see directory contents
- Very specific: line 47
Check for skills/ directory → might be adding a new skill
- Distinctive: line 48
Check for existing application code → might be documenting existing features
- Distinctive: line 54
If exists → list existing projects
- Distinctive: line 55
If not exists → this is a new spec workflow
- Very specific: line 58
Check docs/coding-rules.md (default path)
- Distinctive: line 59
If not found, check CLAUDE.md / AGENTS.md for alternative path
- Distinctive: line 60
If found → load and use as design constraint during design phase
- Distinctive: line 171
When a user selects "Other" and provides free-form text input:
- Distinctive: line 173
Treat the free-form response as the user's definitive answer
- Distinctive: line 174
Do NOT ask for clarification unless the input is genuinely ambiguous
- Distinctive: line 175
If system returns an error like "(No answer provided)", trust the user's actual message over system feedback
- Distinctive: line 192
Follow-up confirmations like "Any additional requirements?"
- Very specific: line 205
If source files found: Note for potential --analyze mode
- Distinctive: line 206
If no source files: Standard new project flow
- Distinctive: line 219
Existing projects found: Use AskUserQuestion:
- Distinctive: line 226
No existing projects: Ask for project name (text question):
- Very specific: line 233
Read existing requirement.md, design.md, tasks.md if they exist
- Distinctive: line 234
Use as context for updates or next phase generation
- Distinctive: line 247
If ambiguous, confirm with AskUserQuestion:
- Very specific: line 260
Before generating or revising a Japanese requirement.md or design.md—including init and design steps inside full and auto modes—resolve …
- Very specific: line 261
If found, read its complete SKILL.md, references/writing-rules.ja.md, and references/abstract-verbs.ja.md.
- Very specific: line 263
If the skill or a selected reference is unavailable, report the missing item and apply ## Specification writing fallback from the selected …
- Distinctive: line 264
Never depend on a machine-specific absolute path or provider-specific tool name when resolving the skill.
- Distinctive: line 269
Existing project selected: Use loaded specs as context
- Distinctive: line 279
Test strategy satisfies coverage requirements from coding-rules
- Very specific: line 303
After generating or revising a spec, run the projection pass in the selected references/projection-consistency*.md across every present …
- Distinctive: line 326
When invoked without parameters or continuing from conversation:
- Distinctive: line 344
All four documents are generated with zero AskUserQuestion calls
- Very specific: line 345
Every point that would need a question is written as an ASM-XXX assumption in requirement.md instead
- Distinctive: line 354
Read requirement.md → generate design.md
- Distinctive: line 355
Read design.md → generate tasks.md
- Very specific: line 356
Read requirement.md + design.md + tasks.md → generate test.md (acceptance test plan.
- Very specific: line 376
Read references/yagni-guardrails.md completely (.ja.md for Japanese) before deciding scope.
- Distinctive: line 381
After each phase, suggest next actions with AskUserQuestion:
“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 — Specification Generator
Generate structured project specifications: requirements, design documents, and task lists.
⚠️ CRITICAL: First Steps (ALWAYS EXECUTE)
Auto mode short-circuit: If invoked with --auto --issue <n>, skip the
interactive decision flow below and follow references/auto-mode.md (.ja.md)
instead. Auto mode never calls AskUserQuestion, but its Japanese init and design
steps still execute the specification-writing procedure in Step 1.5.
BEFORE asking any questions or showing options, you MUST execute these steps:
- Check current directory:
- Run
pwdto see where you are - Run
ls -lato see directory contents - Understand the project context
- Run
- Detect existing source code:
find . -maxdepth 3 -type f \( -name "*.py" -o -name "*.js" -o -name "*.ts" -o -name "*.java" -o -name "*.go" -o -name "SKILL.md" \) 2>/dev/null | head -20- Note what kind of project this is
- Check for
skills/directory → might be adding a new skill - Check for existing application code → might be documenting existing features
- Check for .specs/ directory:
ls -d .specs/ 2>/dev/null && ls -1 .specs/ 2>/dev/null- If exists → list existing projects
- If not exists → this is a new spec workflow
- Check for coding-rules.md:
- Check
docs/coding-rules.md(default path) - If not found, check CLAUDE.md / AGENTS.md for alternative path
- If found → load and use as design constraint during design phase
- Check
- Analyze context and decide:
- If in a skills repository (has
skills/directory) → User likely wants to document a new skill - If .specs/ has projects → Ask user to select existing or create new
- If no .specs/ and no clear context → Ask what they want to create
- If in a skills repository (has
Only after completing these checks, proceed with appropriate questions based on what you found.
Language Rules
- Auto-detect input language → output in the same language
- Japanese input → Japanese output, use
references/*.ja.mdas phase references - English input → English output, use
references/*.mdas phase references - Explicit override takes priority (e.g., "in English", "日本語で")
Reference file selection: Based on the detected output language, use the corresponding reference files:
- English →
references/init.md,references/design.md,references/tasks.md,references/test-plan.md,references/auto-mode.md,references/projection-consistency.md - Japanese →
references/init.ja.md,references/design.ja.md,references/tasks.ja.md,references/test-plan.ja.md,references/auto-mode.ja.md,references/projection-consistency.ja.md
Phases
| Phase | Output | Trigger Examples |
| init | requirement.md | "Create requirements", "要件定義を作って" |
| design | design.md | "Create design doc", "設計書を作って" |
| tasks | tasks.md | "Create task list", "タスクリストを作って" |
| full | All three above + test.md | "Create full spec", "仕様を全部" |
Interaction Policy: AskUserQuestion
Use AskUserQuestion for all user decisions. Present structured choices rather than free-form questions.
Decision Flow
Skill Invoked
↓
Check .specs/ directory
↓
┌───────────────────┐
│ Existing projects │
│ found? │
└─────┬─────────────┘
│
├─ Yes → AskUserQuestion: Select existing or create new
│ ├─ Existing → Load project context
│ └─ New → Ask project name (Text)
│
└─ No → Ask project name (Text)
↓
Phase Detection
├─ Clear from input → Proceed
└─ Ambiguous → AskUserQuestion: Select phase
↓
Dialogue Mode
├─ Quick mode (--quick) → Confirm inferred non-goals, then generate
└─ Dialogue → AskUserQuestion: Gather requirements
↓
Generate Specification
↓
AskUserQuestion: Next action (next phase / revise / done)When to Use AskUserQuestion vs Text Questions
| Situation | Method | Reason |
| Project Selection | ||
| Existing projects available | AskUserQuestion | Can list as options with descriptions |
| No existing projects | Text question | Open-ended project name input |
| Phase Selection | ||
| Phase ambiguous | AskUserQuestion | 4 clear options (init/design/tasks/full) |
| Phase clear from input | Direct execution | No confirmation needed |
| Requirements Gathering | ||
| Project type selection | AskUserQuestion | Common options (Web app, Mobile, CLI, etc.) |
| Tech stack selection | AskUserQuestion | Common frameworks with "Other" option |
| Feature requirements | AskUserQuestion | Guide with structured choices |
| Project concept | Text question | Need free-form explanation |
| Specific business logic | Text question | Domain-specific details |
| Post-Completion | ||
| Next action | AskUserQuestion | Clear options (next phase/revise/done) |
| Revision requests | Text question | Specific change description |
When to Use AskUserQuestion
| Situation | Example |
| Project selection | Existing projects vs new project |
| Ambiguous phase | Choosing between init / design / tasks / full |
| Init dialogue questions | Project type, tech stack, scope, etc. |
| Design decision points | Architecture choices, DB selection, etc. |
| Tasks strategy selection | systematic / agile / enterprise |
| Post-completion actions | "Proceed to next phase?", "Create GitHub Issue?" |
Question Design Rules
- 1–4 questions per round (AskUserQuestion constraint)
- User-defined options: 1-3 (Other is auto-appended, totaling 2-4 options)
- Always include description for each option (provide decision context)
- Flexible round count based on project complexity:
- Simple project → 1 round (3–4 questions) is sufficient
- Complex project → 2–3 rounds (adjust based on previous answers)
- Place recommended option first with
(Recommended)suffix - Skip questions already answered in previous rounds
Handling "Other" Option Responses
When a user selects "Other" and provides free-form text input:
- Accept the input as-is and proceed with processing
- Treat the free-form response as the user's definitive answer
- Do NOT ask for clarification unless the input is genuinely ambiguous
- If system returns an error like "(No answer provided)", trust the user's actual message over system feedback
Example:
Question: "どのスキルの仕様を作成しますか?"
Options: spec-constitution / spec-review / spec-analyze / spec-impl
User selects "Other" and writes: "仕様書自体をレビューするコマンド"
✅ Correct: Proceed to create spec for a spec-review skill
❌ Wrong: Ask "What would you like to clarify?"When to Use Text Questions (Not AskUserQuestion)
- Open-ended questions like project name (when no existing projects) or concept description
- Background information requiring free-form explanation
- Follow-up confirmations like "Any additional requirements?"
- Specific business logic or domain-specific details
Execution Flow
0. Initial Context Check
Check the current directory and existing projects before starting:
- Detect existing source code:
find . -type f \( -name "*.py" -o -name "*.js" -o -name "*.ts" -o -name "*.java" -o -name "*.go" \) | head -20- If source files found: Note for potential
--analyzemode - If no source files: Standard new project flow
- If source files found: Note for potential
- Check for .specs/ directory:
ls -d .specs/ 2>/dev/null - List existing projects (if .specs/ exists):
ls -1 .specs/ - Project selection:
- Existing projects found: Use AskUserQuestion:
question: "既存プロジェクトが見つかりました。どうしますか?" / "Found existing projects. What would you like to do?" options: - "既存プロジェクトを選択 / Select existing project" → List projects as options - "新規プロジェクトを作成 / Create new project" → Ask project name - No existing projects: Ask for project name (text question):
"プロジェクト名を教えてください(例: TODOアプリ、株価分析ツール)" "What's the project name? (e.g., todo app, stock analyzer)"
- Existing projects found: Use AskUserQuestion:
- Load existing context (if existing project selected):
- Read existing
requirement.md,design.md,tasks.mdif they exist - Use as context for updates or next phase generation
- Read existing
1. Phase Detection
Determine the phase from the user's request:
"requirements" → init
"design", "architecture" → design
"tasks", "task list" → tasks
"full", "complete", "all specs" → fullIf ambiguous, confirm with AskUserQuestion:
question: "Which specification do you want to generate?"
options:
- "Requirements document (requirement.md)" → init
- "Design document (design.md)" → design
- "Task list (tasks.md)" → tasks
- "All three documents" → full1.5. Specification Writing for Japanese Init and Design
Before generating or revising a Japanese requirement.md or design.md—including init and design steps inside full and auto modes—resolve spec-writing by name from the currently available skills.
If found, read its complete SKILL.md, references/writing-rules.ja.md, and references/abstract-verbs.ja.md.
Apply those rules during generation or revision and run their self-check before saving.
If the skill or a selected reference is unavailable, report the missing item and apply ## Specification writing fallback from the selected Japanese phase reference without stopping the phase.
Never depend on a machine-specific absolute path or provider-specific tool name when resolving the skill.
2. Project Context Gathering
- Conversation history exists: Extract and structure discussed requirements
- Existing project selected: Use loaded specs as context
- New project: Explore requirements through dialogue (using AskUserQuestion)
3. Phase Execution
Refer to the appropriate reference file (based on Language Rules):
- init:
references/init.md/references/init.ja.md— Requirements generation - design:
references/design.md/references/design.ja.md— Design document generation - design (with coding-rules.md): If
docs/coding-rules.mdexists, read it and ensure:- Naming conventions in design match
[MUST]naming rules - Test strategy satisfies coverage requirements from coding-rules
- Technology choices align with recommended libraries
- File/directory structure follows detected patterns
- Skill-derived
[SHOULD]rules (e.g., framework-specific conventions fromSource: skill/*) are considered as design recommendations
- Naming conventions in design match
- tasks:
references/tasks.md/references/tasks.ja.md— Task list generation - test (full workflow only):
references/test-plan.md/references/test-plan.ja.md— Acceptance test plan generation
4. Output Directory
.specs/[project-name]/
├── requirement.md (init)
├── design.md (design)
├── tasks.md (tasks)
└── test.md (full workflow only — acceptance test plan)Project names are converted to English kebab-case:
- "TODO app" →
todo-app - "株価分析ツール" →
stock-analysis-tool - "Stock analysis tool" →
stock-analysis-tool
5. Output Integrity and Projection Self-Check
After generating or revising a spec, run the projection pass in the selected
references/projection-consistency*.md across every present spec file. Then
re-read each tail and remove tool-call residue such as </content> or
</invoke>. Report completion only after projection checks pass and every file
ends with real document content.
Options
| Option | Description | Applicable Phase |
--quick | Generate after one inferred non-goal confirmation | init |
--auto --issue <n> | Non-interactive full generation from a GitHub Issue (no dialogue; see references/auto-mode.md) | full |
--deep | Socratic deep-dive dialogue | init |
--personas | Multi-perspective analysis/review | init, design |
--analyze | Analyze existing codebase | init, design, tasks |
--visual | Enhanced Mermaid diagrams | design |
--estimate | Estimates and risk assessment | tasks |
--hierarchy | Epic/Story/Task hierarchy | tasks |
Execution Modes
Dialogue Mode (default)
When invoked without parameters or continuing from conversation:
- Collect necessary information through questions
- Clarify requirements through user interaction
- Generate specification after confirmation
Quick Mode (--quick)
Generate from a brief project description:
- Infer typical requirements and a non-empty non-goal list
- Present the inferred non-goals once via AskUserQuestion; accept them or use the auto-added Other response as the complete replacement list
- Generate after the non-goals are confirmed
Auto Mode (--auto --issue <n>)
Non-interactive generation driven by a GitHub Issue. See
references/auto-mode.md (.ja.md) for the full procedure. Summary:
gh issue view <n>supplies the requirement source- Feature name is derived from the Issue title as kebab-case
- All four documents are generated with zero AskUserQuestion calls
- Every point that would need a question is written as an
ASM-XXXassumption in requirement.md instead
Intended for orchestrated pipelines and sufficiently concrete Issues.
Full Workflow (full)
Generate all four documents sequentially:
- Generate requirement.md
- Read requirement.md → generate design.md
- Read design.md → generate tasks.md
- Read requirement.md + design.md + tasks.md → generate test.md
(acceptance test plan; see
references/test-plan.md/.ja.md)
The three-document output of steps 1–3 is unchanged; step 4 only reads them.
Requirement ID System
Specifications use the following ID prefixes:
[REQ-XXX]: Functional requirements[NFR-XXX]: Non-functional requirements[CON-XXX]: Constraints[ASM-XXX]: Assumptions[T-XXX]: Implementation tasks (tasks.md)[T-AXX]: Acceptance test cases (test.md;T-Aprefix avoids collision withT-)
These IDs ensure traceability across documents.
YAGNI Principle
Read references/yagni-guardrails.md completely
(.ja.md for Japanese) before deciding scope; apply every listed guardrail.
Post-Completion Actions
After each phase, suggest next actions with AskUserQuestion:
After init:
question: "Requirements document generated. What's next?"
options:
- "Generate design document too" → design phase
- "Review and revise" → revision dialogue
- "Done for now" → endAfter design:
question: "Design document generated. What's next?"
options:
- "Generate task list too" → tasks phase
- "Review and revise" → revision dialogue
- "Done for now" → endAfter tasks:
question: "Task list generated. What's next?"
options:
- "Run spec-inspect (quality check)" → invoke spec-inspect skill
- "Skip to GitHub Issue" → invoke spec-to-issue skill
- "Review and revise" → revision dialogue
- "Done for now" → endAfter full:
question: "All four spec documents (3-set + test.md) are complete."
options:
- "Run spec-inspect (quality check)" → invoke spec-inspect skill
- "Skip to GitHub Issue" → invoke spec-to-issue skill
- "Review and revise specific document" → ask which document to revise
- "Done for now" → endUsage Examples
# New project - dialogue mode
"Create requirements for a todo app"
"要件定義を作って" → detects existing projects, asks to select or create new
# Existing project - update/add phases
"Create design document for todo-app" → uses existing requirement.md as context
「todo-appのタスクリストを作って」 → uses existing design.md as context
# Full specification
"Create full spec for an e-commerce platform"
「ECサイトの仕様を全部作って」
# Requirements from conversation
"Turn this into a requirements document" → structures previous discussion
# Quick mode
"Create requirements for a blog platform --quick"
# Analysis mode
"Create requirements --analyze" → analyzes existing codebase firstDoes 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.

