From sdd
Writes a functional specification for a feature, bug fix, or change. Describes WHAT to build, not HOW. Uses Given/When/Then acceptance criteria. Technology-agnostic. Use when user says "write spec", "specify feature", "define requirements", "what should this do", or pastes a user story / PRD / feature request. Do NOT include implementation details — use /plan for that.
npx claudepluginhub robertraf/rob-agent-workflow --plugin sddThis skill is limited to using the following tools:
You are writing a functional specification: **Define WHAT to build, not HOW.**
Mandates invoking relevant skills via tools before any response in coding sessions. Covers access, priorities, and adaptations for Claude Code, Copilot CLI, Gemini CLI.
Share bugs, ideas, or general feedback.
You are writing a functional specification: Define WHAT to build, not HOW.
The spec is the functional layer. It describes what the feature does — not how it's implemented. It is technology-agnostic on purpose. Separating functional from technical reduces LLM uncertainty.
The user will provide a user story, PRD, feature request, or bug report:
$ARGUMENTS
If $ARGUMENTS is empty, ask the user to describe the feature, change, or bug they want to address.
Before interviewing the user, check the repo-scoped wiki for prior specs on related topics. This avoids redoing work already captured in past sessions.
bash "${CLAUDE_PLUGIN_ROOT}/skills/wiki-ingest/scripts/wiki-query.sh" <keywords from $ARGUMENTS>
Extract 3-6 meaningful keywords from $ARGUMENTS (skip fluff). Run the query:
"Found related pages in
.wiki/. Reuse one, extend one, or ignore and write a fresh spec?" If the user chooses to reuse or extend, read the selected page(s) and treat them as part of the conversation context for the interview in Step 1.
.wiki/): continue silently to Step 1. Absence of a wiki is not an error.Do not block the flow. If the query script is missing or errors, continue with Step 1 — the wiki is optional context, not a hard dependency.
Do not guess. Interview the user to eliminate ambiguity before writing anything.
Think Before Coding: The most common LLM failure is silently picking one interpretation and building to it. If "export user data" could mean a file download, an API endpoint, or a background job — present all three and ask. Surface tradeoffs, don't hide them.
If $ARGUMENTS provides only a brief description or user story, use this interview approach:
Questions to cover (skip any the user already answered):
If $ARGUMENTS is detailed enough (contains clear scope, actors, behavior, and acceptance criteria), you may skip the interview and proceed directly to Step 2. State what you're assuming so the user can correct you.
Do not proceed until you have enough information to write an unambiguous spec.
Output the following structure:
Feature: [feature name] Date: [today's date] Author: [user's name if known, otherwise "—"]
One paragraph. What problem does this solve? Why does it need to exist? Write from the user's perspective.
List every user role, system, or external service that interacts with this feature.
Numbered list of requirements. Each one describes observable behavior — what the system does, not how.
Use Given / When / Then format. Each criterion must be testable and unambiguous.
Given [precondition]
When [action]
Then [expected result]
Write criteria for:
Explicitly list what this feature does NOT do. This prevents scope creep and agent guessing.
These are common failure modes when writing specs. Watch for them:
$ARGUMENTS is brief (one sentence, a vague idea), Claude often jumps straight to writing a spec full of assumptions. If the input is ambiguous, interview first — even if it feels slow./plan.After the spec is reviewed and approved, run:
/plan
The spec you just wrote becomes the input for the technical plan.