Story-Driven Development: split PRDs into stories, implement them end-to-end, and review code quality.
AI 没有读心术,精准描述你的需求,AI 会帮你完成剩下的。
This skill adds four commands to your AI coding agent:
| Command | Purpose |
|---|---|
create |
Split a PRD into independently implementable stories |
update |
Revise existing PRDs or stories based on new requirements |
start |
Implement a story end-to-end (code, tests, docs) |
review |
Review staged git changes for type safety, style, and code quality |
Large features are hard to ship in one pass. This skill enforces a disciplined flow:
- Write a PRD — capture requirements in
docs/prd/. - Create stories — the skill breaks the PRD into small, independently deliverable stories in
docs/story/. - Implement one story at a time — the agent reads the story, writes code, runs tests, and marks it done.
- Review before commit — catch type issues, magic numbers, duplicated logic, and style violations.
Each story file follows a consistent structure: goal, acceptance criteria, functional points, and test case designs — all in natural language, no code in story files.
Copy and send the following prompt to your AI coding agent:
Download https://raw.githubusercontent.com/Yidadaa/sdd.skill/main/story/SKILL.md and save it to
.agents/skills/story/SKILL.mdin this project.
Linux / macOS:
mkdir -p .agents/skills/story && curl -fsSL -o .agents/skills/story/SKILL.md https://raw.githubusercontent.com/Yidadaa/sdd.skill/main/story/SKILL.mdWindows (PowerShell):
New-Item -ItemType Directory -Force -Path .agents\skills\story | Out-Null; Invoke-WebRequest -Uri "https://raw.githubusercontent.com/Yidadaa/sdd.skill/main/story/SKILL.md" -OutFile ".agents\skills\story\SKILL.md"The skill is automatically picked up by AI coding agents that support custom skills.
In your AI coding agent, reference the skill naturally:
# Manually create docs/prd/my-feature.md first — write this file yourself to fully describe your requirements
# Create stories from a PRD
/story create stories from docs/prd/my-feature.md
# Start implementing a specific story
/story start story 2.1
# Update a story with new requirements
/story update story 3.2 — add pagination support to the list API
# Review staged changes
/story review my staged changes
docs/prd/<topic>.md # initial version
docs/prd/<topic>-v2.md # revised version (old version is preserved)
docs/story/<M>.<N>-<status>.md
M— main story number (starts from 1)N— sub-story number (0 = overview, 1+ = sub-stories)status—plan|wip|done
Examples:
1.0-plan.md— Main story 1 overview1.1-wip.md— Sub-story 1 of main story 1 (in progress)1.2-done.md— Sub-story 2 of main story 1 (completed)
Every story file contains these sections:
# Story M.N — Short Title
## Main Goal
What this story aims to achieve.
## Acceptance Criteria
- [ ] Criterion 1
- [ ] Criterion 2
## Functional Points
Natural-language description of what to implement.
## Unit Test Case Design
Test scenarios described in natural language.
## Behavior Test Case Design
End-to-end test scenarios described in natural language.The review command analyzes staged diffs for:
- Type safety — avoid overly broad types, prefer type inference and derivation, fix type warnings properly
- Redundant logic — extract repeated code, consolidate copy-pasted branches
- Magic values — no hard-coded numbers or string identifiers
- Code style — no empty catch blocks, no debug logging in production, follow existing project conventions
The SKILL.md file is self-contained. You can adapt it to your project by:
- Editing the review rules to match your team's coding standards
- Adjusting the story file structure to fit your workflow
- Adding project-specific clarification question templates
- Changing file path conventions (
docs/prd/,docs/story/)
- Any AI coding agent that supports custom skills
MIT