Langsung ke konten
Skillpedia
Dokumentasi107k ยท #783

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.md

Salin 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

Gunakan skill ini untuk membantu saya: https://github.com/addyosmani/agent-skills/blob/main/skills/spec-driven-development/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit โ†’

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 billing depends on identity; the contract between them belongs in the provider module's spec (see api-and-interface-design for 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:

  1. Objective โ€” What are we building and why? Who is the user? What does success look like?

  2. 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

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • โ€ฆ

Skill lain dari repositori ini

Skill serupa