sdd-spec
Skill0 starsChanged 8 months agoMITView on GitHub
Generates a specification (PRD) with traceability IDs and testable acceptance criteria for a feature. Produces context/specs/spec-{slug}.md following SDD methodology. Use when starting a new feature, defining requirements, or creating a PRD.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- felipefontoura/pi-sdd-kittheir own version, first seen May 15, 2026
- Maicololiveras/praxisgenai-agent-orchestratortheir own version, first seen Mar 16, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- felipefontoura/pi-sdd-kit★ 34same name
- Maicololiveras/praxisgenai-agent-orchestrator★ 1same 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 repository13 other files it gives its agents.
- AGENTS.mdAGENTS.md
- sdd-adrSkill
- sdd-implementSkill
- sdd-initSkill
- sdd-iterateSkill
- sdd-monitorSkill
- sdd-planSkill
- sdd-reviewSkill
- sdd-runSkill
- sdd-standupSkill
- sdd-statusSkill
- sdd-triageSkill
- sdd-ux-validateSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
25 rules. About 0 are common, 8 are distinctive, and 17 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.
17
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 18
Check that context/specs/ exists.
- Very specific: line 22
If $ARGUMENTS is brief (<20 words) or ambiguous, ask 2-3 targeted clarifying questions:
- Distinctive: line 28
Do NOT ask more than 3 questions.
- Very specific: line 32
Search context/specs/ for related specs to avoid duplicating work
- Very specific: line 33
Read progress.txt (if it exists) for recent session context
- Very specific: line 34
If this is brownfield (modifying existing code), delegate to the sdd-researcher agent:
- Distinctive: line 36
Do NOT tell the researcher what you are building — this prevents implementation bias
- Very specific: line 42
Before generating the spec body, ask the operator to classify the primary external interface this PRD touches.
- Distinctive: line 44
Ask one targeted question:
- Distinctive: line 57
Grandfather rule: Do NOT backfill this field on existing PRDs that lack it.
- Very specific: line 59
Opaque consequence note: If the operator classifies as opaque-external, emit a single advisory line in the skill output after the spec is …
- Very specific: line 69
Use the PRD template at ${CLAUDE_PLUGIN_ROOT}/templates/spec/prd.md.
- Very specific: line 81
Write the spec's normative sections (Problem statement, Non-goals, Boundaries, Technical approach, Dependencies, requirements, Success …
- Very specific: line 106
Prefer test validation (unit/integration tests) over manual
- Very specific: line 126
Before save, optionally invoke the sdd-skeptic agent (if user wants extra scrutiny on a high-stakes spec):
- Very specific: line 135
If context/specs/spec-overview.md exists, append an entry
- Very specific: line 140
Run the spec template's "Self-audit checklist" (the trailer at the bottom of prd.md).
- Distinctive: line 153
If the spec has open questions (advisory, non-blocking), flag them: "Resolve open questions before planning if practical"
- Very specific: line 160
Every requirement has a SPEC-{slug}-NNN traceability ID
- Very specific: line 161
Every requirement has a Serves: field naming the user story it advances (no orphan requirements — orphan requirements block approval)
- Very specific: line 162
Every requirement has Given/When/Then acceptance criteria — outcome-shaped (not implementation-altitude)
- Distinctive: line 163
Every requirement has a validation method
- Distinctive: line 164
No banned vague verbs without measurable thresholds
- Distinctive: line 167
No existing files are overwritten without confirmation
- Very specific: line 169
If interface_maturity is opaque-external, the skill output includes the one-line advisory that this PRD will route to characterization at …
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 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
SDD Spec
Generate a specification with traceability IDs and testable acceptance criteria.
Arguments
$ARGUMENTS — feature description (e.g., "user authentication with JWT", "rate limiting for API endpoints")
Process
1. Validate SDD structure
Check that context/specs/ exists. If not, suggest running /sdd-init first.
2. Clarify intent (if needed)
If $ARGUMENTS is brief (<20 words) or ambiguous, ask 2-3 targeted clarifying questions:
- What is the core user problem?
- What are the key constraints or non-negotiables?
- Is this greenfield or brownfield (modifying existing code)?
- Who is the user? (Push for persona depth — name a person or role with situational context, not "a user".)
Do NOT ask more than 3 questions. If the user gave a detailed prompt, skip straight to step 3.
3. Research existing context
- Search
context/specs/for related specs to avoid duplicating work - Read
progress.txt(if it exists) for recent session context - If this is brownfield (modifying existing code), delegate to the
sdd-researcheragent:- Provide ONLY research questions derived from the feature description
- Do NOT tell the researcher what you are building — this prevents implementation bias
- The researcher emits a structured
findings.json(schema at${CLAUDE_PLUGIN_ROOT}/templates/research/findings.json.schema.json) with separable Decisions / Open Questions / Constraints / Patterns / Prior Art / Sources sections - Ingest the findings programmatically: any
openQuestions[].blocking: truebecomes a[NEEDS CLARIFICATION]marker in the spec; anyconstraints[]feeds the Boundaries section
4. Classify interface maturity (gate)
Before generating the spec body, ask the operator to classify the primary external interface this PRD touches. This gate is REQUIRED for new PRDs authored after v1.0.0; the classification drives downstream characterization decisions in /sdd-plan (§2.6).
Ask one targeted question:
What is the maturity of the primary external interface this PRD depends on?
controlled-internal— fully owned, stable interface (most common case)documented-external— third-party with a stable, well-documented contractopaque-external— third-party or runtime with an unstable or undocumented contract (e.g. ComfyUI WebSocket, Showdown subprocess, vendor SDKs without firm guarantees)
Record the answer in the spec's frontmatter-style metadata block at the top of the file (alongside **Spec ID:**, **Author:**, etc.) as a snake_case field:
interface_maturity:
controlled-internal|documented-external|opaque-external
This is the canonical schema location. /sdd-plan (§2.6) reads interface_maturity from this exact field at the top of the spec to decide whether to attach a characterization tag — do NOT move it elsewhere in the document.
Grandfather rule. Do NOT backfill this field on existing PRDs that lack it. The §2.6 sdd-plan side handles tagless legacy PRDs via an operator prompt at plan time; that is out of scope here. This gate enforces the field on NEW PRDs only.
Opaque consequence note. If the operator classifies as opaque-external, emit a single advisory line in the skill output after the spec is saved:
Note: this PRD is classified
opaque-externaland will route to characterization at/sdd-plantime.
This nudge surfaces the downstream consequence at spec-write time so the operator is not surprised when planning produces characterization stories.
Forward reference. /sdd-plan (§2.6) reads this interface_maturity field at plan start and routes opaque-external work to a characterization story tag with wider budgets (2.5x tokens, 2.0x time) and explicit outputs (probes, transcript corpus, replay harness, parity checks, discovery notes). Operators who classify as opaque-external here can expect characterization stories to appear in the generated plan; see skills/sdd-plan/SKILL.md §2.6 for the routing rules.
5. Generate the spec
Use the PRD template at ${CLAUDE_PLUGIN_ROOT}/templates/spec/prd.md. Fill in all sections including the new ones:
- Spec ID:
SPEC-{slug}where slug is a short kebab-case identifier (e.g.,SPEC-auth,SPEC-rate-limit) - Problem statement: One crisp sentence
- Non-goals: Be specific about what you are NOT building
- User stories (human-experience): Connextra/Cohn format with persona depth. Reject "as a user, I want X". Require named/contextual personas —
Maya-context-switching-mid-flow,Sam-debugging-at-1am,a new contributor on day one. Each story surfaces a distinct human context. The lived experience of a specific persona surfaces edge cases prose specs miss. - Boundaries (Always / Ask first / Never): Hard constraints the implementer treats as non-negotiable. Always = invariants; Ask first = decisions that need human input; Never = forbidden moves.
- Technical approach: Architecture, components, data flow — grounded in researcher findings if brownfield
- Dependencies: Services, libraries, APIs needed
5b. Writing style — STE-100 controlled language
Write the spec's normative sections (Problem statement, Non-goals, Boundaries, Technical approach, Dependencies, requirements, Success criteria) in STE-100 controlled language per ${CLAUDE_PLUGIN_ROOT}/rules/ste100-writing.md (an ASD-STE100 adaptation): active voice with a named actor, one instruction per sentence, one term per concept, 20-word instructions / 25-word descriptions, 6-sentence paragraphs.
Exempt sections: Desired outcomes, JTBD, and Personas & user stories keep their situational voice — Article 13's human-outcome spine is NOT flattened into controlled language. Code identifiers, commands, and quoted output stay verbatim. When STE style conflicts with a required technical term, precision wins.
6. Write requirements with traceability
This is the most critical section. Each requirement MUST have:
- Traceability ID:
SPEC-{slug}-001,SPEC-{slug}-002, etc. Sequential, never reused. - Serves: field naming the user story this requirement advances. Orphan requirements (no
Serves:link) block approval — every requirement must trace up to a user story. - Given/When/Then acceptance criteria — outcome-shaped (see §2.9 asymmetry below)
- Validation method: One of
test | build | lint | manual | browser
§2.9 asymmetry: acceptance criteria must be outcome-shaped. Criteria must describe the user-visible outcome, NOT the implementation mechanism. The asymmetry is the entire point: an outcome-shaped criterion cannot be designed to fit the code, so a passing criterion is evidence about the user-visible system, not about whatever implementation happens to live behind it today.
- Good (outcome-shaped): "login completes within 200ms", "deletion is recoverable for 24 hours", "the validator never advances on a same-family wiring audit"
- Bad (implementation-altitude — reject and request a rewrite): "LoginController returns HTTP 200", "the auth service sets a cookie", "the database row is updated"
When a criterion is at implementation-altitude, flag it explicitly: "This criterion is implementation-altitude ('LoginController returns HTTP 200'). Rewrite it as the user-visible outcome this implementation is supposed to produce (e.g., 'login completes within 200ms with no visible error')." Do not accept implementation-altitude criteria — they produce tests that verify the code's own implementation choices, not user outcomes.
Banned vague verbs. Reject the spec if requirements use these words without a measurable threshold: support, handle, robust, fast, secure, scalable, reliable, intuitive, seamless. Replace with measurable conditions (latency in ms, throughput in rps, specific failure modes prevented). This rule applies alongside the outcome-altitude rule — both must hold: no vague verbs AND outcome-shaped altitude.
Rules for good requirements:
- Each requirement describes ONE behavior. If you write "and", split it.
- Acceptance criteria must be falsifiable — an agent must be able to check pass/fail
- Prefer
testvalidation (unit/integration tests) overmanual - Include edge cases as separate requirements, not footnotes
- Aim for 3-10 requirements per spec. If you have more than 15, the spec is too broad — split it.
- Spec budget: ≤300 lines. LeanSpec / Anthropic context-engineering: longer specs lose agent attention.
7. [NEEDS CLARIFICATION] discipline (middle ground)
- A marker inside any
### SPEC-{slug}-NNNrequirement section is BLOCKING: refuse to finalize the spec until resolved. Either ask the user, or move the question to "Open questions" and remove the dependent requirement. - A marker in non-requirement sections (Open questions list, "Future work" notes) is advisory: spec can finalize, but
/sdd-planwill surface them again.
8. Sibling-repo heads-up
After drafting the spec, scan its file references (Technical approach, Dependencies, requirements). If any reference paths with a leading sibling-repo prefix — i.e., a top-level segment that is NOT a workspace directory like context/, spec/, scripts/, templates/ (examples that ARE sibling-repo prefixes: web-app/src/..., api-service/scripts/..., mobile-app/app/...) — emit a one-line reminder in the skill output:
Heads up: this spec references paths in
<repo-name>/. When you run/sdd-planagainst this spec, the generated PRD should setrepoRootto the absolute path of that repo. Seecontext/decisions/sdd-reporoot-convention-2026-04-22.md.
The spec itself does NOT carry repoRoot — that field lives on the PRD. This step exists only to nudge the user so the prompt isn't skipped during /sdd-plan.
9. Optional adversarial review
Before save, optionally invoke the sdd-skeptic agent (if user wants extra scrutiny on a high-stakes spec):
- Skeptic looks for: ambiguous shoulds, missing NFRs, contradictions between requirements, personas that lack situational depth, banned vague verbs slipped through.
- Output: list of concrete weaknesses; spec author decides which to address before save.
This is opt-in — say "Run skeptic review on this spec? (y/n)". Default no.
10. Save and index
- Save to
context/specs/spec-{slug}.md - If
context/specs/spec-overview.mdexists, append an entry - Append to
progress.txt:[{timestamp}] Created spec: context/specs/spec-{slug}.md — {title}
11. Self-audit
Run the spec template's "Self-audit checklist" (the trailer at the bottom of prd.md). Every box must check before reporting success. The implementer agent re-runs this checklist before claiming PASS on the final story.
Article 13 gates (must pass before reporting success):
- outcomes/personas precede technical approach — Desired outcomes / JTBD and Personas & user stories both appear before Problem statement and Technical approach. If Technical approach leads, block Approved and request a reorder.
- every requirement traces to a user story — Each
SPEC-{slug}-NNNblock carries aServes:field naming the user story it advances. Any requirement with noServes:link is an orphan requirement and blocks Approved. Flag each orphan explicitly: "Orphan requirement SPEC-{slug}-NNN: add a Serves: line naming the user story this requirement advances."
Both gates are deterministic: if either fails, the spec cannot be marked Approved. Do not emit an Approved status while either gate is open. These gates are also re-enforced by sdd_validate_prd at plan time (per Article 13).
12. Suggest next steps
- "Run
/sdd-planto decompose this spec into implementable tasks" - "Run
/sdd-spec [another feature]to spec the next feature" - If the spec has open questions (advisory, non-blocking), flag them: "Resolve open questions before planning if practical"
Output contract
context/specs/spec-{slug}.mdexists with all template sections filled (Desired outcomes, Personas & user stories, Boundaries, self-audit included)- The spec's frontmatter-style metadata block contains an
interface_maturityfield with one ofcontrolled-internal|documented-external|opaque-external(new PRDs only; existing PRDs without the field are grandfathered) - The spec leads with Desired outcomes / JTBD and Personas & user stories before Problem statement and Technical approach
- Every requirement has a
SPEC-{slug}-NNNtraceability ID - Every requirement has a
Serves:field naming the user story it advances (no orphan requirements — orphan requirements block approval) - Every requirement has Given/When/Then acceptance criteria — outcome-shaped (not implementation-altitude)
- Every requirement has a validation method
- No banned vague verbs without measurable thresholds
- Normative sections follow the STE-100 writing rules (
rules/ste100-writing.md); persona/outcome sections keep their situational voice - No
[NEEDS CLARIFICATION]markers inside requirement blocks - No existing files are overwritten without confirmation
progress.txtis updated- If
interface_maturityisopaque-external, the skill output includes the one-line advisory that this PRD will route to characterization at/sdd-plantime
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.

