spec-driven-development
Fungsinya
Tool ini membantu membuat rencana rinci (spesifikasi) sebelum Anda mulai menulis kode. Tool ini memastikan semua orang memahami apa yang akan dibangun, mengapa, dan bagaimana mengetahui kapan pekerjaan itu selesai.
Kapan dipakai
- โSaat memulai proyek atau fitur baru.
- โSaat ide tentang apa yang akan dibuat masih belum jelas.
- โSebelum mengambil keputusan penting mengenai struktur proyek.
Link skill
https://github.com/addyosmani/agent-skills/blob/main/skills/spec-driven-development/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
โSaya butuh rencana untuk membuat sistem login untuk sebuah website.โ
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Tool memandu Anda untuk menentukan tujuan, perintah yang diperlukan, struktur folder, gaya penulisan kode, cara pengujian, serta hal yang boleh dan tidak boleh dilakukan. Prosesnya bertahap, dengan tinjauan manusia di setiap langkah.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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
โฆ
Pertanyaan umum
Kapan sebaiknya tool ini TIDAK digunakan?
Jangan gunakan untuk perbaikan cepat, seperti memperbaiki salah ketik, atau saat kebutuhannya sangat sederhana dan sudah jelas.
Apa itu 'peta kemampuan'?
Ini adalah diagram yang menunjukkan berbagai bagian dari proyek yang lebih besar dan bagaimana bagian-bagian tersebut saling terhubung. Peta ini berguna ketika satu tugas melibatkan beberapa bagian yang berdiri sendiri.
Kenapa penting untuk menyatakan 'asumsi'?
Dengan menyebutkan apa yang Anda asumsikan (misalnya jenis database atau browser), Anda mencegah kesalahpahaman di kemudian hari, karena orang lain bisa mengoreksi Anda sebelum kode mulai ditulis.
Detail
Deskripsi asli dari pembuat
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
Popularitas
- Bintang GitHub
- 107k
- Peringkat
- #783
- Lisensi
- MIT
- Diperbarui
- 13/10/2026
Komentar
- โฆ
Skill lain dari repositori ini
api-and-interface-design
107kMembantu merancang API dan antarmuka yang terdefinisi dengan baik. Berguna saat merancang cara berbagai bagian perangkat lunak saling berkomunikasi.
browser-testing-with-devtools
107kMembantu agent Anda menguji kode langsung di browser sungguhan. Berguna untuk memeriksa cara kerja di lingkungan penggunaannya, serta menemukan error dan masalah performa.
ci-cd-and-automation
107kMengajarkan agent AI Anda untuk mengotomatisasi tugas berulang, mengirim proyek, dan mengelola infrastruktur.
code-review-and-quality
107kMelakukan tinjauan kode mendetail dari berbagai sisi. Berguna sebelum menggabungkan perubahan baru untuk memastikan kualitas dan mencegah masalah di kemudian hari.
Skill serupa
technical-documentation
394kMembantu agent Anda menulis dan meninjau dokumentasi teknis serta file instruksi agent yang jelas, agar orang dan alat AI dapat mengikutinya dengan mudah.
architecture-decision-records
280kMembuat agent Anda mencatat keputusan penting terkait struktur proyek. Membantu memahami alasan di balik pilihan dan menjaga riwayat perubahan yang jelas.
code-tour
280kMembuat agent Anda menyusun panduan kode langkah demi langkah dengan referensi file dan nomor baris yang tepat. Berguna untuk pengenalan, penjelasan, dan review.