spec-driven-development
Skill2 starsChanged 40 days agoMITView on GitHub
Use when starting new Android projects, features, or changes with unclear requirements. Guides writing a structured spec (SPEC.md) that becomes the shared source of truth before any code is written. Also use when one request spans several independently testable capabilities and needs a capability map of modules before specifying.
103 other projects use a version of this, 23 of them edited.
Adopted by
Most recently taken up by
- thistleknot/skillstheir own version, first seen Nov 8, 2026
- mariano-aguero/spec-driven-development-skilltheir own version, first seen Nov 8, 2026
- ishandutta2007/Awesome-Agent-Skillstheir own version, first seen Nov 8, 2026
- MMACABRE/SKILLSedited, first seen Nov 8, 2026
- steven123397/nexuskit-skillstheir own version, first seen Nov 1, 2026
- rumotion/ai-agent-project-templatetheir own version, first seen Nov 1, 2026
Other versions103 projects use a version of this.
Word for word · 0
None found.
Edited · 23
- addyosmani/agent-skills★ 114k19% same
- ollaya-dev/ollaya★ 1.4k18% same
- jaskirat1616/grok-skills★ 2218% same
- coreplanelabs/switchboard★ 517% same
- Marvellbrazil/my-agentic-skills★ 417% same
- Shelra/ShelraCode★ 317% same
- yosoyjavieruiz/Distroia★ 317% same
- yosoyjavieruiz/ShelraCode★ 317% same
- AgnesAI-Labs/agnet-skills-cn★ 118% same
- MMACABRE/SKILLS★ 117% same
13 more not listed
Wrote their own version · 80
- kdlbs/kandev★ 1.1ksame name
- jasonkneen/kiro★ 753same name
- shashankswe2020-ux/whoop-mcp★ 174same name
- magnus919/agent-skills★ 172same name
- FredAntB/Spec-Driven-Development★ 153same name
- tranhieutt/software_development_department★ 71same name
- drvoss/everything-copilot-cli★ 48same name
- vinvcn/addyosmani-agent-skills-zh★ 46same name
- krzysztofsurdy/code-virtuoso★ 36same name
- jmxt3/gitscape.ai★ 33same name
70 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository31 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- android-accessibilitySkill
- android-architectureSkill
- android-background-workSkill
- android-data-persistenceSkill
- android-device-testingSkill
- android-e2e-verificationSkill
- android-ui-engineeringSkill
- api-and-interface-designSkill
- ci-cd-and-automationSkill
- code-review-and-qualitySkill
- code-simplificationSkill
- constraint-driven-developmentSkill
- context-engineeringSkill
- debugging-and-error-recoverySkill
- deprecation-and-migrationSkill
- documentation-and-adrsSkill
- doubt-driven-developmentSkill
- git-workflow-and-versioningSkill
- idea-refineSkill
- incremental-implementationSkill
- interview-meSkill
- observability-and-instrumentationSkill
- performance-optimizationSkill
- planning-and-task-breakdownSkill
- security-and-hardeningSkill
- shipping-and-launchSkill
- source-driven-developmentSkill
- test-driven-developmentSkill
- using-agent-skillsSkill
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 4 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 96 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 15
Write a structured specification before writing code.
- Very specific: line 22
Before writing a tasks/plan.md
- Distinctive: line 65
Ask clarifying questions: before writing anything:
- Distinctive: line 115
Ask the human to approve it or request changes
- Very specific: line 116
End your turn: Don't start Phase 2, invoke planning-and-task-breakdown, or write code in the same turn.
- Distinctive: line 130
Every PR references the spec section it addresses
“Common” is measured: kept by at least 6 in 10 of the 96 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Spec-Driven Development
Overview
Write a structured specification before writing code. The spec becomes the shared source of truth — a development contract that prevents misalignment, scope creep, and wasted effort. Every implementation decision traces back to the spec.
When to Use
- Starting a new Android project or module
- Adding a feature that spans multiple files or layers
- Requirements are ambiguous or come from multiple stakeholders
- Before writing a
tasks/plan.md
Skip when: Single-line fixes or changes that are unambiguous and self-contained.
Core Process
Four phases, preceded by a scope check (Phase 0) that activates only when one request bundles several independently testable capabilities. Don't advance to the next phase until the current one is approved.
Phase 0: Scope Check
Most requests describe one capability — skip straight to Specify. Phase 0 is for the exception.
Detection. Decompose before specifying when a single requirement bundles several independently testable capabilities:
- It names distinct capabilities with their own consumers or data (e.g. sign-in, checkout, push notifications, order history)
- 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. A module table plus a build order — not a project plan. On Android, module ids usually line up with the Gradle modules they will become:
# Capability Map: [Initiative Name]
| Module id | Gradle module | Responsibility | Depends on |
|---------------|--------------------------|---------------------------------|-------------------|
| auth | :feature:auth | Sign-in, session, token refresh | — |
| checkout | :feature:checkout | Cart, payment, confirmation | auth |
| notifications | :core:notifications | FCM registration, channels | auth |
| order-history | :feature:order-history | Past orders list and detail | checkout |
Build order: auth → checkout, notifications → order-history- Stable module ids. Kebab-case, chosen once, never renamed mid-initiative. Specs and plans select work by these ids instead of guessing which spec is active.
- Dependency direction, no cycles. Arrows point one way — the same rule Gradle enforces between modules. If two modules each need the other, they are one module.
- Interfaces live at the boundary. The map records that
checkoutdepends onauth; the contract between them belongs in the provider module's spec (seeapi-and-interface-design).
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. Save the approved map at the project root and each module's spec next to it, named by module id (SPEC-auth.md, SPEC-checkout.md) — the map, not filename guessing, is the index of what exists.
Phase 1: Specify
- Ask clarifying questions before writing anything:
- What problem does this solve? Who is the user?
- Which features are in scope? Which are explicitly out?
- What is the tech stack? (minSdk, target SDK, Compose vs XML, DI framework)
- What are the boundaries? (offline support? accessibility? tablet?)
- Write SPEC.md with these sections:
# Feature Name — Specification
## Objective
What we're building and why. One paragraph.
## Commands
Key Gradle tasks and how to use them:
- `./gradlew assembleDebug` — build debug APK
- `./gradlew test` — run unit tests
- `./gradlew connectedAndroidTest` — run instrumented tests
- `./gradlew lint` — run Android Lint
## Project Structure
Where new code lives in the module hierarchy:
- `:app` — main application module
- `:feature:feature-name` — new feature module
- `:core:data` — data layer (repositories, data sources)
- `:core:domain` — domain layer (use cases, models)
## Code Style
- Kotlin with Jetpack Compose for UI
- MVVM/MVI architecture with ViewModel + StateFlow
- Hilt for dependency injection
- Coroutines + Flow for async operations
- Material 3 design system
## Testing Strategy
- Unit tests: JUnit5 + MockK for ViewModels, use cases, repositories
- UI tests: Compose test rules for screen-level testing
- Integration tests: Room in-memory database, MockWebServer
- Target: critical paths covered, not arbitrary coverage %
## Boundaries
What is explicitly NOT in scope:
- [ ] List exclusions here- Save as
SPEC.mdin the project or module root - Stop after writing the spec. Once it is saved:
- Summarize it and list any open questions
- Ask the human to approve it or request changes
- End your turn. Don't start Phase 2, invoke
planning-and-task-breakdown, or write code in the same turn. Planning starts only after the human approves the spec in a later turn.
Phase 2: Plan
- With the approved spec, use
planning-and-task-breakdownto create implementation tasks
Phase 3: Tasks
- Break spec into vertical slices (see
planning-and-task-breakdown) - Each task references the spec section it implements
Phase 4: Implement
- Build incrementally (see
incremental-implementation) - Every PR references the spec section it addresses
- Spec evolves with the project — update it when requirements change
Common Rationalizations
| Shortcut | Why It Fails |
| "The feature is simple, no spec needed" | Simple features have hidden edge cases (configuration changes, process death, deep links). A brief spec still beats none. |
| "We'll figure it out as we go" | Without a spec, each developer builds a different mental model. Alignment costs compound. |
| "The ticket/issue IS the spec" | Tickets describe what to build. Specs describe how it fits into the system, what's excluded, and how to verify. |
| "Writing specs slows us down" | Rework from misalignment costs 3–10x more than a spec. |
| "It's one big feature; splitting it is overhead" | If acceptance criteria cluster into independently testable groups, a monolithic spec forces every task to reason over the whole contract. A ten-line capability map is the cheap alternative. |
| "I'll decompose during planning" | Planning slices tasks within a spec. Module boundaries and dependency direction must be decided before the spec is written, not after. |
| "The spec is obviously fine, I'll start the plan now" | Approval you didn't wait for isn't approval. The human's corrections are cheapest before a plan is built on the spec. |
Red Flags
- Implementation started without written spec
- Writing the spec and starting the plan or code in the same turn
- One spec whose requirements span several independently testable capabilities
- Module boundaries or build order decided implicitly during implementation
- Spec has no "Boundaries" or exclusions section
- Spec doesn't specify testing strategy
- Multiple developers have different understandings of scope
- Spec never updated after requirement changes
Verification
- SPEC.md exists in version control
- All six sections filled in (Objective, Commands, Structure, Style, Testing, Boundaries)
- Human has reviewed and approved the spec — the turn ended after saving it; approval came in a later turn
- If the request bundled several independently testable capabilities, a capability map (module ids, dependency direction, build order) was approved before any module spec was written
- Implementation tasks reference spec sections
- Spec updated when requirements changed during development
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

