spec-driven-dev
БесплатноБез исполняемых скриптовНе проверенWrite specifications before code — the agent creates detailed technical specs, validates them, then implements. Use when someone asks to "write a spec first"…
от TerminalSkills★ 221 звезда на GitHubОб этом скилле
Spec-Driven Development
Overview
Most AI coding failures happen because the agent starts coding before understanding the problem. Spec-driven development reverses the flow: first write a detailed specification that describes what to build, why, and how — then validate the spec — then implement. The spec becomes both the contract and the test oracle.
When to Use
- Starting a new feature and want to think before coding
- Building something complex where wrong assumptions are expensive
- Working in a team where others need to review the design before implementation
- The agent keeps building the wrong thing because requirements are ambiguous
- Creating RFCs or architecture decision records (ADRs) for the team
Instructions
The Spec-First Workflow
User Request → Extract Requirements → Write Spec → Validate Spec → Implement → Verify Against Spec
↑ |
└── Revise ──────┘
Step 1: Requirement Extraction
Before writing anything, turn the request into testable requirements. If the answers are not in the request, ask the user; do not guess silently.
## Requirements
### REQ-001: Invite a teammate by email (must)
- Acceptance: an owner can submit an email; an invitation row is created with status `pending` and a 7-day expiry.
- Acceptance: inviting an address that is already a member returns 409 with `already_member`.
- Out of scope: bulk CSV invites.
### REQ-002: Expired invitations are rejected (must)
- Acceptance: accepting an invitation after `expires_at` returns 410 and creates no membership.
## Assumptions
- Email delivery goes through the existing transactional provider.
## Open questions
- Can admins, or only owners, send invitations?
Rules: every requirement gets an id, a MoSCoW priority (must, should, could, won't), and acceptance criteria that a test can assert. "Fast" is not a requirement; "p95 below 300 ms for 1,000 members" is. "Secure" is not one either; "invite tokens are single-use and expire after 7 days" is.
Step 2: Write the Technical Spec
Save it in the repository (for example docs/specs/<feature>.md) so it is reviewed like code.
# Technical Spec Template
## 1. Overview
One paragraph: what we're building and why.
## 2. Goals & Non-Goals
### Goals
- [Specific, measurable outcome]
- [Specific, measurable outcome]
### Non-Goals
- [Explicitly excluded scope]
- [Things we're NOT building]
## 3. Background
Why now? What's the current state? What's the problem?
## 4. Technical Design
### 4.1 Architecture
High-level architecture: components, data flow, integrations.
### 4.2 Data Model
Database schema, API types, key data structures.
### 4.3 API Design
Endpoints, request/response types, error handling.
### 4.4 Key Algorithms
Non-obvious logic. Decision trees. State machines.
## 5. Alternatives Considered
| Option | Pros | Cons | Decision |
|--------|------|------|----------|
| Option A | ... | ... | Chosen because... |
| Option B | ... | ... | Rejected because... |
## 6. Implementation Plan
### Phase 1: [Name] (Week 1)
- [ ] Task 1
- [ ] Task 2
### Phase 2: [Name] (Week 2)
- [ ] Task 3
- [ ] Task 4
## 7. Testing Strategy
- Unit tests for [what]
- Integration tests for [what]
- E2E tests for [what]
- Performance benchmarks for [what]
## 8. Rollout Plan
- Feature flag: [name]
- Rollout: 5% → 25% → 100%
- Rollback trigger: [metric] drops below [threshold]
## 9. Open Questions
- [ ] Question 1
- [ ] Question 2
## 10. References
- [Related RFC or design doc]
- [External documentation]
Step 3: Validate the spec
Read the spec as a reviewer before any code exists. Check that: every requirement has a testable criterion; failure modes (invalid input, timeouts, partial failure) are described; authorization and data exposure are addressed; there is a rollback or migration path; open questions are empty or explicitly deferred. A small linter catches the mechanical part (missing sections, vague words); save it as validate-spec.ts and run it on Node 22.7 or later (the file uses export and top-level await, which need 22.7+ syntax detection; 22.18+ and 24 need no flag):
interface Finding {
category: "completeness" | "quality" | "reliability" | "security" | "operations";
status: "fail" | "warn";
message: string;
}
const REQUIRED_HEADINGS = ["Overview", "Goals", "Non-Goals", "Technical Design", "Testing Strategy", "Rollout Plan"];
const VAGUE_TERMS = ["fast", "secure", "scalable", "user-friendly", "robust", "efficient"];
export function validateSpec(spec: string): Finding[] {
const findings: Finding[] = [];
const headings = [...spec.matchAll(/^#{1,4}\s+(?:\d+(?:\.\d+)*\.?\s+)?(.+?)\s*$/gm)].map((m) => m[1].toLowerCase());
for (const name of REQUIRED_HEADINGS) {
if (!headings.some((h) => h.includes(name.toLowerCase()))) {
findings.push({ category: "completeness", status: "fail", messag
Установить spec-driven-dev в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл spec-driven-dev?
Write specifications before code — the agent creates detailed technical specs, validates them, then implements. Use when someone asks to "write a spec first", "plan before coding", "create a technical design document", "spec-driven development", "Kiro-style development", "validate my idea before building", "write an RFC", or "create an architecture doc before implementation". Covers requirement extraction, technical spec templates, validation checklists, implementation plans, and spec-to-code workflows.
Как установить скилл spec-driven-dev?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл spec-driven-dev запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
docx
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
от AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
от Anthropicxlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
от Anthropicpptx
Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…
от Anthropic