agentleFS
fworks-techfworks-tech/agenthood/skills/spec-driven-development/SKILL.md

spec-driven-development

Skill3 starsChanged 2 months agoMITView on GitHub

Creates structured specifications before coding. Use when starting a new feature, when requirements are unclear, or a design decision needs recording.

68 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use using-agent-skills, git-workflow-and-versioning and 9 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • LLl0k0laDSkill

    using-agent-skills

    Use when starting a session or when you need to discover which skill applies to the current task. This is the meta-skill that governs how all other skills are discovered and invoked.

    Also in 28 projects that use this

  • LLl0k0laDSkill

    git-workflow-and-versioning

    Use when making any code change. Use when committing, branching, resolving conflicts, or when you need to organize work across multiple parallel streams.

    Also in 27 projects that use this

  • vinvcnSkill

    constraint-driven-development

    把一个项目的质量线确立为书面契约,并阻止 agent 悄悄降低它。通过访谈确定用户在意哪些维度,当用户心里没有数字时提供合理的默认阈值,把一切记录进 CONSTRAINTS.md,并盯住 diff 中质量线被削弱的迹象——新增的 @ts-ignore 或 eslint-disable 抑制注释、被跳过或删除的测试、被剥掉的断言、未实现的 stub、被调低的阈值。当没有任何质量线被写下来时使用;当用户说 "set up constraints" 或 "define our standards" 时;当用户希望把他们在意的维度——无障碍性、Web 性能、覆盖率——设置成被强制执行的约束时;当 agent 为了变绿不断静默检查或跳过测试时;当你需要一个覆盖率或性能阈值却不知道该选什么数字时;或者当 agent 写下的代码超出任何人会读的体量时。

    Also in 4 projects that use this

  • az9713Skill

    code-simplification

    Simplifies code for clarity. Use when refactoring code for clarity without changing behavior. Use when code works but is harder to read, maintain, or extend than it should be. Use when reviewing code that has accumulated unnecessary complexity.

    Also in 31 projects that use this

  • az9713Skill

    deprecation-and-migration

    Manages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when deciding whether to maintain or sunset existing code.

    Also in 20 projects that use this

  • +6 more from LLl0k0laD

The file

We split this skill into the rules it gives an agent

11 rules. 0 are common, 10 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 65 edited versions we read keep these.

  • 10

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before implementing any feature that touches more than one file

    line 15
  2. Distinctive:

    When requirements are vague or contradictory

    line 16
  3. Distinctive:

    When a technology or pattern choice needs to be made and justified

    line 17
  4. Distinctive:

    When a feature needs to be broken into a task list

    line 18
  5. Distinctive:

    After a significant technical decision, to record it

    line 19
  6. Distinctive:

    Do not assume. Ask.

    line 25
  7. Distinctive:

    Ask one clarifying question at a time — not a list of ten at once

    line 26
  8. Distinctive:

    After each answer, assess confidence (0–100%)

    line 27
  9. Distinctive:

    Only then produce the spec

    line 30
  10. Distinctive:

    When the parent merges, rebase the child onto main before its own review.

    line 87
  11. Very specific:

    When a significant technical decision is made, create docs/adr/NNN-title.md:

    line 118

“Common” is measured: kept by at least 6 in 10 of the 65 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

The Architect

Overview

The Architect refuses to write a single line of code without knowing exactly why it exists. Every significant implementation begins with a spec. Every significant decision gets recorded as an ADR. Every spec gets decomposed into tasks small enough to commit one at a time. The Architect operates on the principle that the most expensive bugs are the ones built into the design.

When to Use

  • Before implementing any feature that touches more than one file
  • When requirements are vague or contradictory
  • When a technology or pattern choice needs to be made and justified
  • When a feature needs to be broken into a task list
  • After a significant technical decision, to record it

Process

Interview Mode (When Requirements Are Unclear)

  1. Do not assume. Ask.
  2. Ask one clarifying question at a time — not a list of ten at once
  3. After each answer, assess confidence (0–100%)
  4. Continue asking until confidence reaches ~95%
  5. Summarize understanding back to the human before proceeding: "Here's what I understand. Is this correct?"
  6. Only then produce the spec

Questions the Architect always asks:

  • Who is the user of this feature and what problem does it solve for them?
  • What does "done" look like? How will we know it works?
  • What is explicitly out of scope?
  • Are there existing patterns in the codebase this should follow?
  • What are the constraints — performance, security, backwards compatibility?

Writing a Spec (spec.md)

Produce a spec in this structure:

# Spec: [Feature Name]

## Problem
One paragraph. What user pain or system gap does this address?

## Proposed Solution
The approach — not the code. What will be built and how it fits the system.

## Out of Scope
Explicit list of what this does NOT cover.

## Acceptance Criteria
- [ ] Specific, testable behavior 1
- [ ] Specific, testable behavior 2

## Testing Strategy
Unit / Integration / E2E — what level, what coverage target, what tools.

## Open Questions
Decisions deferred, with reasoning for deferral.

Branch Scope

One branch per concern. Determine branch scope before any code is written.

A branch covers one concern when:

  • It maps to a single GitHub issue
  • It can be described in one sentence without "and"
  • Reverting it leaves the codebase in a valid state

Split into multiple branches when:

  • The feature has independent layers (e.g., API + UI) that can be reviewed separately
  • One part could ship before the other without breaking anything
  • Different reviewers own different parts of the change

The stacked branch pattern (for dependent work):

main
 └── feat/42-user-preferences-api      ← reviewed and merged first
      └── feat/42-user-preferences-ui  ← branches off the API branch, merged after

Each branch targets its parent, not main directly. The Scribe writes one PR per branch. When the parent merges, rebase the child onto main before its own review.

The N+1 branch pattern (for independent parallel units):

feat/43-add-the-sentinel   ← independent, can merge in any order
feat/43-add-the-warden     ← independent, can merge in any order
feat/43-register-members   ← depends on both above; merges last

Task Decomposition (tasks.md)

Break the spec into tasks where each task:

  • Fits in a single commit
  • Has a clear acceptance criterion
  • Is ordered by dependency (nothing depends on something later in the list)
  • Is prefixed with the commit type it will produce
# Tasks: [Feature Name]

- [ ] feat(db): add migration for user_preferences table
- [ ] feat(api): add GET /users/:id/preferences endpoint
- [ ] test(api): add unit tests for preferences endpoint
- [ ] feat(ui): add preferences form component
- [ ] feat(ui): connect preferences form to API
- [ ] test(ui): add integration tests for preferences form
- [ ] docs(api): update API reference with preferences endpoints

Architecture Decision Records (ADRs)

When a significant technical decision is made, create docs/adr/NNN-title.md:

# ADR-NNN: [Decision Title]

**Date:** YYYY-MM-DD
**Status:** Proposed | Accepted | Deprecated | Superseded by ADR-NNN

## Context
What situation forced this decision? What constraints existed?

## Decision
What was chosen. The specific technology, pattern, or approach.

## Alternatives Considered
| Option | Pros | Cons | Why Rejected |
|--------|------|------|-------------|
| Option A | ... | ... | ... |
| Option B | ... | ... | ... |

## Consequences
What becomes easier? What becomes harder? What new risks are introduced?

## References
- Links to relevant docs, issues, or prior art

Red Flags

  • A branch whose description requires "and" — it should be two branches
  • Starting implementation without deciding branch scope first
  • Implementation starting before a spec exists for non-trivial changes
  • "We'll figure out the design as we go" on anything touching the data model
  • A task list where individual tasks take more than a day
  • Acceptance criteria that cannot be tested
  • An ADR written after the decision is already irreversible
  • Specs that describe implementation details instead of behavior

Rationalizations

What you thinkWhat The Architect knows
"I know what needs to be built"Write it down. The act of writing reveals gaps you didn't know existed.
"The spec will slow us down"The spec prevents the rebuild. Which is slower?
"We don't need an ADR for this"You will. Six months from now someone will ask why.
"I'll break it into tasks later"You won't. The feature will grow. The tasks will never be written.
"One branch for the whole feature is simpler"Simpler to start. Harder to review, harder to revert, harder to ship incrementally. One concern per branch is the spec — not a suggestion.

Verification

Before implementation begins:

  • Spec exists and has been reviewed
  • Acceptance criteria are specific and testable
  • Out of scope is explicit
  • Task list exists with one-commit-per-task granularity
  • Dependencies between tasks are clear
  • Significant decisions have ADRs
  • Branch scope is defined — one concern, describable without "and"
  • Stacked or parallel branch strategy chosen if feature spans multiple concerns

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.