Simple Spec — Write a Specification Document
You are writing a product/feature specification. Your job is to produce a spec.md file inside docs/<feature-name>/
that gives an AI coding agent (or a human developer) everything they need to understand what to build
and why, without prescribing how to build it (that's the design document's job).
Folder convention
All feature artifacts live in docs/<feature-name>/:
docs/
index.json ← feature manifest (created/updated by this skill)
visual.md ← from simple-visual (app-level, optional)
<feature-name>/
spec.md ← THIS SKILL'S OUTPUT
spec/ ← optional: detail files when spec.md is split
<area>.md
design.md ← from simple-design
issues.json ← from simple-tasks
progress-log.md ← from simple-implement
The <feature-name> token is a short kebab-case identifier (e.g., auth, workspace-sharing,
csv-export) that ties all artifacts together by directory.
Workflow
1. Gather context
Start by collecting as much information as you can before asking the user anything.
From the user's input:
- Read the user's message carefully. Extract the feature name, intent, and any constraints they've stated.
- If the user provided an input file (e.g., a brief, PRD, issue, or notes), read it fully.
From the codebase:
- Search for files, modules, and code related to the feature area. Look at directory structure,
existing models, API routes, UI components, tests — whatever helps you understand the current state
of the system the spec is targeting.
- Pay attention to naming conventions, architectural patterns, and existing abstractions. These inform
scope, constraints, and edge cases.
- If durable app-level docs exist, read them first:
docs/capabilities.md for what the product
already does and docs/visual.md for UI conventions. These describe current product truth and
keep the spec grounded without re-deriving it from scratch.
- If there's existing documentation (README, CONTRIBUTING, docs/), skim it for relevant context.
The goal is to arrive at the follow-up question phase already knowing a lot, so you can ask sharp,
specific questions rather than generic ones.
2. Ask follow-up questions (only if needed)
After gathering context, assess what's still unclear or ambiguous. Common gaps:
- Who is this for? (user type, persona, internal vs. external)
- What's the boundary? (what's in scope vs. explicitly out of scope)
- What does success look like? (measurable outcomes, acceptance criteria)
- Are there constraints? (timeline, backward compatibility, dependencies, tech mandates)
- Edge cases the code context surfaced (e.g., "I see there's a legacy auth flow — should this work with both?")
Only ask questions where the answer materially affects the spec. If you can make a reasonable assumption
based on the codebase and state it explicitly, prefer that over asking. You can note assumptions in the
spec's "Open questions" section for the user to confirm.
Present your questions to the user — keep it to one round of 1-4 focused questions.
Use whatever mechanism is available (a structured question tool, a chat message, etc.).
3. Write the spec
Read the template at references/spec_template.md in this skill's directory. Use only applicable
sections; remove unused headings and placeholders.
Key principles:
Be specific, not generic. Every item should reference actual entities from the codebase or the user's
description. "The system must handle errors" is useless. "The system must return a 409 Conflict when the
user attempts to create a duplicate workspace name" is useful.
Acceptance criteria are the behavioral contract. Write concise, testable criteria; use
GIVEN/WHEN/THEN when it improves clarity. Do not restate them as functional requirements or
edge cases. Include cross-cutting requirements and global edge cases only when they apply to
multiple scenarios. Omit story priority and rationale unless material.
Scope is a decision, not a description. The "In scope" and "Out of scope" sections are where you
make explicit choices. If something is borderline, put it in "Out of scope" with a note about why.
This prevents scope creep during implementation.
Current state is selective. Use codebase research to validate existing product behavior, but
document only the current behavior needed to understand the requested change.
Edge cases should be actionable. Put each edge case and its expected behavior with the closest
scenario unless it affects the whole feature.
Open questions are honest. If something is genuinely unresolved, say so. Don't paper over
uncertainty with vague language.
Concision
Research broadly; write only material facts. Keep each fact in one place and link instead of
repeating content across sections, parent/child documents, or upstream artifacts.
Prefer one file. Split only for independently implementable areas; move detail out of the parent
rather than summarizing it twice. Keep the complete spec, including children, under ~2,500 words.
If that is insufficient, split the feature scope.
Before saving, remove content that does not clarify scope, required behavior, a material constraint,
or verification.
4. Save the output
- Derive a short kebab-case feature name from the spec title (e.g., "workspace-sharing", "auth-jwt-migration").
- Create the directory
docs/<feature-name>/ if it doesn't exist.
- Save to
docs/<feature-name>/spec.md relative to the project root.
- If you split the spec, save the child files under
docs/<feature-name>/spec/ and make sure
spec.md indexes them. Otherwise a single spec.md is the complete output.
- Update (or create)
docs/index.json at the project root:
{
"features": {
"<feature-name>": {
"status": "planning",
"path": "docs/<feature-name>/"
}
}
}
- Tell the user the file path and give a brief summary of what's covered.
5. Suggest next step (optional)
If a simple-design skill is available in the environment, mention that the user can run it to
produce the corresponding technical design document (docs/<feature-name>/design.md). The typical
workflow is: simple-spec → simple-design → simple-tasks → simple-implement (or
simple-run). This is a suggestion, not a requirement — the spec stands on its own as a
complete deliverable.
Important notes
- This skill produces a product spec, not a technical design — focus on what and why, not
how. If you find yourself writing about database schemas, API implementations, or code
architecture, you've crossed into design territory; pull back.
1---2name: simple-spec3description: Write a product/feature specification (docs/<feature-name>/spec.md) defining what to build and why — scope, user stories, acceptance criteria, edge cases — from a user message, input file, or codebase context. Use when the user wants to spec a feature, define requirements, write acceptance criteria, or scope work before implementation. Triggers: "write a spec", "create requirements", "define the feature", "scope this out", "what should we build", "spec this".4---56# Simple Spec — Write a Specification Document78You are writing a product/feature specification. Your job is to produce a `spec.md` file inside `docs/<feature-name>/`9that gives an AI coding agent (or a human developer) everything they need to understand **what** to build10and **why**, without prescribing **how** to build it (that's the design document's job).1112## Folder convention1314All feature artifacts live in `docs/<feature-name>/`:1516```17docs/18 index.json ← feature manifest (created/updated by this skill)19 visual.md ← from simple-visual (app-level, optional)20 <feature-name>/21 spec.md ← THIS SKILL'S OUTPUT22 spec/ ← optional: detail files when spec.md is split23 <area>.md24 design.md ← from simple-design25 issues.json ← from simple-tasks26 progress-log.md ← from simple-implement27```2829The `<feature-name>` token is a short kebab-case identifier (e.g., `auth`, `workspace-sharing`,30`csv-export`) that ties all artifacts together by directory.3132## Workflow3334### 1. Gather context3536Start by collecting as much information as you can **before** asking the user anything.3738**From the user's input:**39- Read the user's message carefully. Extract the feature name, intent, and any constraints they've stated.40- If the user provided an input file (e.g., a brief, PRD, issue, or notes), read it fully.4142**From the codebase:**43- Search for files, modules, and code related to the feature area. Look at directory structure,44 existing models, API routes, UI components, tests — whatever helps you understand the current state45 of the system the spec is targeting.46- Pay attention to naming conventions, architectural patterns, and existing abstractions. These inform47 scope, constraints, and edge cases.48- If durable app-level docs exist, read them first: `docs/capabilities.md` for what the product49 already does and `docs/visual.md` for UI conventions. These describe current product truth and50 keep the spec grounded without re-deriving it from scratch.51- If there's existing documentation (README, CONTRIBUTING, docs/), skim it for relevant context.5253The goal is to arrive at the follow-up question phase already knowing a lot, so you can ask sharp,54specific questions rather than generic ones.5556### 2. Ask follow-up questions (only if needed)5758After gathering context, assess what's still unclear or ambiguous. Common gaps:5960- **Who is this for?** (user type, persona, internal vs. external)61- **What's the boundary?** (what's in scope vs. explicitly out of scope)62- **What does success look like?** (measurable outcomes, acceptance criteria)63- **Are there constraints?** (timeline, backward compatibility, dependencies, tech mandates)64- **Edge cases the code context surfaced** (e.g., "I see there's a legacy auth flow — should this work with both?")6566Only ask questions where the answer materially affects the spec. If you can make a reasonable assumption67based on the codebase and state it explicitly, prefer that over asking. You can note assumptions in the68spec's "Open questions" section for the user to confirm.6970Present your questions to the user — keep it to one round of 1-4 focused questions.71Use whatever mechanism is available (a structured question tool, a chat message, etc.).7273### 3. Write the spec7475Read the template at `references/spec_template.md` in this skill's directory. Use only applicable76sections; remove unused headings and placeholders.7778**Key principles:**7980- **Be specific, not generic.** Every item should reference actual entities from the codebase or the user's81 description. "The system must handle errors" is useless. "The system must return a 409 Conflict when the82 user attempts to create a duplicate workspace name" is useful.8384- **Acceptance criteria are the behavioral contract.** Write concise, testable criteria; use85 GIVEN/WHEN/THEN when it improves clarity. Do not restate them as functional requirements or86 edge cases. Include cross-cutting requirements and global edge cases only when they apply to87 multiple scenarios. Omit story priority and rationale unless material.8889- **Scope is a decision, not a description.** The "In scope" and "Out of scope" sections are where you90 make explicit choices. If something is borderline, put it in "Out of scope" with a note about why.91 This prevents scope creep during implementation.9293- **Current state is selective.** Use codebase research to validate existing product behavior, but94 document only the current behavior needed to understand the requested change.9596- **Edge cases should be actionable.** Put each edge case and its expected behavior with the closest97 scenario unless it affects the whole feature.9899- **Open questions are honest.** If something is genuinely unresolved, say so. Don't paper over100 uncertainty with vague language.101102**Concision**103104Research broadly; write only material facts. Keep each fact in one place and link instead of105repeating content across sections, parent/child documents, or upstream artifacts.106107Prefer one file. Split only for independently implementable areas; move detail out of the parent108rather than summarizing it twice. Keep the complete spec, including children, under ~2,500 words.109If that is insufficient, split the feature scope.110111Before saving, remove content that does not clarify scope, required behavior, a material constraint,112or verification.113114### 4. Save the output115116- Derive a short kebab-case feature name from the spec title (e.g., "workspace-sharing", "auth-jwt-migration").117- Create the directory `docs/<feature-name>/` if it doesn't exist.118- Save to `docs/<feature-name>/spec.md` relative to the project root.119- If you split the spec, save the child files under `docs/<feature-name>/spec/` and make sure120 `spec.md` indexes them. Otherwise a single `spec.md` is the complete output.121- Update (or create) `docs/index.json` at the project root:122123```json124{125 "features": {126 "<feature-name>": {127 "status": "planning",128 "path": "docs/<feature-name>/"129 }130 }131}132```133134- Tell the user the file path and give a brief summary of what's covered.135136### 5. Suggest next step (optional)137138If a **simple-design** skill is available in the environment, mention that the user can run it to139produce the corresponding technical design document (`docs/<feature-name>/design.md`). The typical140workflow is: **simple-spec** → **simple-design** → **simple-tasks** → **simple-implement** (or141**simple-run**). This is a suggestion, not a requirement — the spec stands on its own as a142complete deliverable.143144## Important notes145146- This skill produces a **product spec**, not a technical design — focus on *what* and *why*, not147 *how*. If you find yourself writing about database schemas, API implementations, or code148 architecture, you've crossed into design territory; pull back.