spec-driven-development
できること
このツールは、コードを書き始める前に詳細な計画(仕様書)を作成する手助けをします。何を作るのか、なぜ作るのか、完成をどう判断するのかを、関係者全員が理解できるようにします。
使う場面
- ✓新しいプロジェクトや機能を始めるとき。
- ✓何を作るべきかのアイデアがまだはっきりしないとき。
- ✓プロジェクトの構成について重要な判断をする前。
スキルのリンク
https://github.com/addyosmani/agent-skills/blob/main/skills/spec-driven-development/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“Webサイト用のログインシステムを作るための計画が必要です。”
毎週5つの新しいスキル。1分で読めます。
仕組み
このツールは、目的、必要なコマンド、フォルダ構成、コードのスタイル、テスト方法、やるべきことと避けるべきことを定義するよう案内します。各段階で人間が確認しながら進めます。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Spec-Driven Development
Overview
Write a structured specification before writing any code. The spec is the shared source of truth between you and the human engineer — it defines what we're building, why, and how we'll know it's done. Code without a spec is guessing.
When to Use
- Starting a new project or feature
- Requirements are ambiguous or incomplete
- The change touches multiple files or modules
- You're about to make an architectural decision
- The task would take more than 30 minutes to implement
When NOT to use: Single-line fixes, typo corrections, or changes where requirements are unambiguous and self-contained.
The Gated Workflow
Spec-driven development has four phases, preceded by a scope check (Phase 0) that activates only when one request bundles several independently testable capabilities. Do not advance to the next phase until the current one is validated.
SPECIFY ──→ PLAN ──→ TASKS ──→ IMPLEMENT
│ │ │ │
▼ ▼ ▼ ▼
Human Human Human Human
reviews reviews reviews reviews
Phase 0: Scope Check
Most requests describe one capability. If this one does, skip this phase and go straight to Specify — Phase 0 exists for the exception, not the rule, and it puts no hierarchy on single-capability features.
Detection. Decompose before specifying when a single requirement bundles several independently testable capabilities:
- The requirement names distinct capabilities with their own consumers or data (e.g. identity, billing, notifications, reporting)
- Acceptance criteria cluster into groups that could ship and be verified separately
- One capability could be cut or replaced without rewriting the others' requirements
Propose a capability map before writing any spec. Small and reviewable — a module table plus a build order, not a project plan:
# Capability Map: [Initiative Name]
| Module id | Responsibility | Depends on |
|---|---|---|
| identity | Accounts, sessions, SSO | — |
| billing | Plans, invoices, payments | identity |
| notifications | Email and webhook fan-out | identity |
| reporting | Usage dashboards | billing, notifications |
Build order: identity → billing, notifications → reporting
- Stable module ids. Kebab-case, chosen once, never renamed mid-initiative. Specs, plans, and downstream commands select work by these ids instead of guessing which spec is active.
- Dependency direction, no cycles. Arrows point one way. If two modules each need the other, they are one module.
- Interfaces live at the boundary. The map records that
billingdepends onidentity; the contract between them belongs in the provider module's spec (seeapi-and-interface-designfor designing it).
The map is gated like every phase. The human reviews module boundaries, dependency direction, and build order before any module spec is written. Getting the map wrong is expensive; reviewing ten lines is not.
Then recurse per module. Run Specify → Plan → Tasks → Implement for each module in dependency order. Each module gets its own spec, scoped to that module's objective, boundaries, and success criteria. Save the approved map at the project root and each module's spec alongside it, named by module id (SPEC-identity.md, SPEC-billing.md) — the map, not filename guessing, is the index of what exists.
Phase 1: Specify
Start with a high-level vision. Ask the human clarifying questions until requirements are concrete.
Surface assumptions immediately. Before writing any spec content, list what you're assuming:
ASSUMPTIONS I'M MAKING:
1. This is a web application (not native mobile)
2. Authentication uses session-based cookies (not JWT)
3. The database is PostgreSQL (based on existing Prisma schema)
4. We're targeting modern browsers only (no IE11)
→ Correct me now or I'll proceed with these.
Don't silently fill in ambiguous requirements. The spec's entire purpose is to surface misunderstandings before code gets written — assumptions are the most dangerous form of misunderstanding.
Write a spec document covering these six core areas:
Objective — What are we building and why? Who is the user? What does success look like?
Commands — Full executable commands with flags, not just tool names.
Build: npm run build Test: npm test -- --coverage Lint: npm run lint --fix Dev: npm run dev
…
よくある質問
このツールを使うべきでないのはどんなときですか?
誤字の修正のような簡単な修正や、要件がとてもシンプルで明らかな場合には使わないでください。
「機能マップ」とは何ですか?
大きなプロジェクトの各部分と、それらのつながりを示す図です。1つのタスクが独立した複数の部分にまたがる場合に役立ちます。
「前提条件」を明記することがなぜ重要なのですか?
データベースの種類やブラウザなど、前提としていることを明記しておくと、後で誤解が生じにくくなります。コーディングを始める前に、他の人が修正できるようになるためです。
詳細
作者による元の説明
Creates specs before coding. Use when starting a new project, feature, or significant change and no specification exists yet. Use when drafting a PRD or requirements document with objectives and scope, or when requirements are unclear, ambiguous, or only exist as a vague idea. Use when a single requirement spans several independently testable capabilities and needs decomposing into a capability ma
repo: addyosmani/agent-skills
人気
- GitHubのスター
- 107k
- ランキング
- #783
- ライセンス
- MIT
- 更新日
- 2026/10/13
コメント
- …
このリポジトリの他のスキル
api-and-interface-design
107k明確に定義されたAPIやインターフェースの作成を支援します。ソフトウェアの異なる部分がどのように通信するかを設計する際に役立ちます。
browser-testing-with-devtools
107k実際のブラウザでコードを直接テストできるよう支援します。実際の利用環境での動作を確認し、エラーやパフォーマンスの問題を見つけるのに役立ちます。
ci-cd-and-automation
107kAIエージェントに、反復的な作業の自動化、プロジェクトのリリース、インフラの管理を教えます。
code-review-and-quality
107k複数の観点から詳細なコードレビューを行います。新しい変更をマージする前に、品質を確保し、将来の問題を防ぐのに役立ちます。
似ているスキル
technical-documentation
394k明確な技術ドキュメントやエージェントの指示ファイルを書いて確認し、人やAIツールが簡単に従えるようエージェントを支援します。
architecture-decision-records
280kエージェントがプロジェクト構成に関する重要な決定を記録できるようにします。選択の理由を把握しやすくし、変更履歴を明確に残すのに役立ちます。
code-tour
280kエージェントが正確なファイル名と行番号を示しながら、コードを段階的に解説できるようにします。紹介、説明、レビューに役立ちます。