agentleFS
tovrleaftovrleaf/openkata/skills/spec-workflow/SKILL.md

spec-workflow

Skill1 starsChanged 13 days agoMITView on GitHub

Drives feature development through a repo-stored, phased spec workflow: specify requirements, design architecture, break into atomic tasks, then implement autonomously with frequent per-task commits and a progress log for session continuity. Use when the user says "let's spec this", "new feature", or "let's plan", or when a change touches 3+ files, adds dependencies, alters infrastructure, or requires trade-off decisions. Distinct from general coding assistance: this skill manages a persistent spec directory lifecycle (Draft → Implementing → Done) with explicit phase gates and user confirmation checkpoints before each transition.

10 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

11 rules. 0 are common, 6 are distinctive, and 5 are very specific to this project.

  • 0

    Common

    Most of the 9 edited versions we read keep these.

  • 6

    Distinctive

    This author's own choices. Worth a look.

  • 5

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Ask user about validation → validate in fresh session

    line 34
  2. Very specific:

    Read specs/_current to determine state:

    line 38
  3. Very specific:

    All tasks Done, no validation-report.md → Validate

    line 43
  4. Very specific:

    If no specs/ directory exists, create it.

    line 46
  5. Very specific:

    When specs/_current points to an active spec:

    line 76
  6. Distinctive:

    Read the progress log for context from prior sessions

    line 78
  7. Distinctive:

    Check git status and git log --oneline -5 to see what was last committed

    line 79
  8. Distinctive:

    Commit after each task (not at the end).

    line 103
  9. Distinctive:

    Keep tasks to one commit, one concern — split if a task needs multiple commits

    line 104
  10. Very specific:

    Create feature branches when asked.

    line 109
  11. Distinctive:

    Delete or overwrite existing specs

    line 114

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

Spec-Driven Dev

Phase details: See references/phase-*.md for step-by-step instructions per phase.

Drive feature work from idea to implementation through repo-stored specs. Five phases: specify → design → tasks → implement → validate.

Execution Flow

  1. Detect state → enter correct phase
  2. Specify requirements with user
  3. Design architecture (deep only)
  4. Break into atomic tasks → confirm
  5. Implement tasks sequentially with commits
  6. Ask user about validation → validate in fresh session

Mode Detection

Read specs/_current to determine state:

  • File missing or empty → New feature (start at Specify)
  • Directory exists, no tasks.md → Specify or Design
  • tasks.md exists, tasks Pending → Implement (resume)
  • All tasks Done, no validation-report.md → Validate
  • validation-report.md exists → Complete

If no specs/ directory exists, create it.

Spec Directory Structure

specs/
  _current          # plain text: path to active spec dir, e.g. specs/0001-auth
  0001-auth/
    spec.md         # requirements (Draft → Implementing → Done)
    design.md       # architecture notes (deep depth only)
    tasks.md        # task list with Status fields + progress log
    validation-report.md  # created during Phase 5
  0002-payments/
    ...

Sample specs/_current content:

specs/0001-auth

Sample specs/0001-auth/tasks.md excerpt:

## Task 0001-03 — Add JWT middleware
Status: Pending
Files: src/middleware/auth.ts, src/routes/index.ts

Resuming

When specs/_current points to an active spec:

  1. Read the progress log for context from prior sessions
  2. Check git status and git log --oneline -5 to see what was last committed
  3. Find the first task with Status: Pending or In Progress
  4. Summarize to the user: "Resuming spec NNNN, task N: [title]. Last completed: [summary]." Then continue Phase 4.

Phases

PhaseWhenOutputReference
1. SpecifyNew featurespec.md with sections: Problem, Requirements, Constraints, Acceptance Criteriaphase-specify.md
2. DesignDeep depth onlydesign.md with sections: Architecture, Key Components, Data Flow, Trade-offsphase-design.md
3. TasksAfter spec confirmedtasks.md with atomic, commit-sized tasks, each listing Status and Filesphase-tasks.md
4. ImplementTasks are PendingCode commits (one per task) + progress log entriesphase-implement.md
5. ValidateAll tasks Donevalidation-report.md summarising acceptance criteria resultsphase-validate.md

See example-spec.md for a complete output example.

Rules

Do:

  • One spec directory per feature; 4-digit zero-padded numbering (0001, 0002, …)
  • Commit after each task (not at the end); reference the spec and task number
  • Keep tasks to one commit, one concern — split if a task needs multiple commits
  • Investigate code before asking — read first, ask second
  • Log progress after every task for session continuity
  • Spec statuses: Draft → Implementing → Done. Spec is frozen once Implementing.
  • Spec the why; tasks the what. Quick depth for < 3 files, Standard for features.
  • Create feature branches when asked; create and update files in specs/

Do not:

  • Skip phase gates or proceed to implementation without user confirmation on spec or tasks
  • Modify files outside the current task's boundary
  • Delete or overwrite existing specs
  • Push without explicit user permission

Common failures:

  • Skipping confirmation — building without sign-off leads to building the wrong thing.
  • Tasks too large — if a task needs multiple commits, split it.
  • No progress log — without log entries, the next session can't resume correctly.

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.