agentleFS
wavestone-sawavestone-sa/agentic-spec-skills/skills/spec-plan/SKILL.md

spec-plan

Skill2 starsChanged 5 months agoApache-2.0View on GitHub

Turn a task brief or prior research into a phased, checkbox-driven implementation plan under docs/agents/plans/. Each phase is a vertical slice with explicit success criteria, ready for spec-implement to execute.

16 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use spec-check.

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.
  • p-larssonSkill

    spec-check

    Verify code against a spec plan. Supports PR diff checks and full state audits.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

10 rules. 0 are common, 7 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 13 edited versions we read keep these.

  • 7

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If a task brief, file path, research document, or PRD came in with the invocation, go to Step 1.

    line 13
  2. Very specific:

    Read every file the user mentioned, in full.

    line 20
  3. Very specific:

    If the user did not point at a research document or PRD, dispatch one sub-agent to scan docs/agents/research/ and docs/agents/prd/ by …

    line 22
  4. Distinctive:

    Wait for every sub-agent to return before continuing.

    line 26
  5. Distinctive:

    Read central files yourself.

    line 27
  6. Distinctive:

    Before drafting phases, present to the user:

    line 31
  7. Distinctive:

    Self-check: If your outline reads "Phase 1: schemas, Phase 2: services, Phase 3: UI", stop.

    line 49
  8. Very specific:

    Create the directory if missing, then write the plan file in the shape defined in references/plan-template.md — read that file, copy its …

    line 68
  9. Distinctive:

    Code snippets optional, short: Only when the shape is not obvious from the task description.

    line 73
  10. Distinctive:

    If your change does not fit any of these, fall back to the four phase-shape rules above and build the outline by hand — do not stretch a …

    line 87

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

Implementation Plan

Produce a phased Markdown plan under docs/agents/plans/. Phases are behaviour-driven with explicit success criteria. Verify against code; do not guess.

Initial Setup

  • If a task brief, file path, research document, or PRD came in with the invocation, go to Step 1.
  • Otherwise, reply with one concise prompt asking for the task, constraints, and pointers to prior research, then wait. Do not plan against empty scope.

Process

Step 1 — Gather context

  1. Read every file the user mentioned, in full. No limit / offset. Tickets, briefs, research, code — yourself, before any sub-agent fires.
  2. Honour prior research. If docs/agents/research/ already covers the territory, treat its findings as authoritative; do not redo them. Verify its git_commit against HEAD; refresh if stale. Likewise honour a PRD under docs/agents/prd/: it is authoritative for intent and requirements (what to build), where research is authoritative for current state (what exists).
  3. If the user did not point at a research document or PRD, dispatch one sub-agent to scan docs/agents/research/ and docs/agents/prd/ by filename and front-matter only for a candidate on the same topic. Verify and refresh as above before building on it.
  4. Spawn narrow sub-agents only for gaps the research leaves open. One question per agent (e.g. "find every call site of loadUser"). Sub-agents return paths, citations, summaries — not analysis. Two gaps almost always need attention:
    • External interfaces. Third-party library or API in scope: read its source via a sub-agent if it is on disk (e.g. node_modules/); otherwise dispatch a web search.
    • Affected documentation. Identify every doc page, README, or inline comment that becomes wrong after the change.
  5. Wait for every sub-agent to return before continuing.
  6. Read central files yourself. The plan must rest on files you have read in full, not on summaries.

Step 2 — Frame the plan

Before drafting phases, present to the user:

  • Two- or three-sentence statement of what you understood.
  • Two or three viable approaches with trade-offs — only if the choice is non-obvious. Do not invent options.
  • Any technical questions you cannot resolve from code or research.
  • For user-facing surfaces (CLI prompt, TUI panel, web form, dashboard): a small ASCII mockup of the target state; before-and-after if modifying an existing surface.

Resolve every question and pick an approach before writing. The final plan contains no open questions.

Then sketch the phase outline — phase names plus a one-line summary each, nothing more — and read it back to the user. Hold for the user's sign-off on the outline before drafting full phases. Re-slicing the outline is cheap; rewriting fully-fleshed phases is not. If the user pushes back, iterate the outline and ask again. While reading the outline back, flag any phase that needs an inline manual gate — a human step a later phase depends on — so its placement is agreed before full phases are drafted.

Then apply the phase-shape rules below. Mandatory — skipping this step produces horizontal plans.

Phase shape (vertical slices)

  1. Phase 1 is end-to-end and minimal. Min data model + min service surface + min UI (if UI in scope). Proves wiring, not feature completeness.
  2. Split phases by behaviour, never by layer. "Schema only", "API only", "UI polish" is wrong. "Users can log in with email + password", "admins can revoke a session" is right.
  3. Automated tests and docs live in the behaviour phase that needs them. There is no standalone automated-testing phase at the end: the phase that adds a behaviour also adds its automated tests, doc updates, and migration notes. Manual verification is the deliberate exception — see ## Autonomous implementation for where it goes.
  4. Self-check. If your outline reads "Phase 1: schemas, Phase 2: services, Phase 3: UI", stop. Ask the user explicitly whether a horizontal plan is intended; default is to re-slice.

Autonomous implementation

Plans here are executed by spec-implement, which runs each phase unattended but halts the moment a phase carries a Manual Verification block, handing control to the user. To keep implementation flowing to completion instead of stopping at every phase:

  • Every build phase must be verifiable by automated criteria alone — type checks, linters, test suites, file-existence assertions. A build phase carries an Automated Verification block and no Manual Verification block.
  • All human-judgement and user-observable checks are collected into a single final Manual Acceptance phase at the end of the plan. That phase has no implementation tasks — only a Manual Verification block gathering the user-observable checks from every build phase. It is the one place spec-implement hands control to the user.

The result: spec-implement runs every build phase autonomously and halts for the human exactly once, at the end.

User-facing surfaces stay automated too. A phase that delivers a user-facing surface (web page, form, dashboard, TUI panel) SHOULD carry an automated browser check under its Automated Verification: drive the real UI — navigate, interact, assert on visible text / DOM state — and capture a screenshot. Use the browser-automation tool the target project already has (e.g. Playwright); when it has none, use the agent-browser skill. Only subjective visual judgement defers to the final Manual Acceptance phase (see the Manual-criteria phase rule).

The one exception — an inline blocking gate. A manual check may stay inline in a build phase only when a later phase's implementation cannot proceed until a human has verified or performed something un-automatable — e.g. provisioning an external credential, or confirming a third-party consent screen renders before its callback is wired. Write such a check as a block headed **Manual Verification (blocking - gates Phase N+1)** (plain hyphen, not an em-dash). spec-implement already halts on any Manual Verification block, so no change to it is needed; the marker is for the plan reader and signals the gate is deliberate, not a stray per-phase manual check.

Step 3 — Write the plan

  1. Capture metadata. Run scripts/metadata.py from the repo root for JSON containing ISO date, HEAD short SHA, branch, repo name. Copy values into the front-matter. If the script is unavailable, gather equivalents from git rev-parse and the current UTC clock.
  2. Pick a kebab-case slug. Filename: YYYY-MM-DD-<slug>.md under docs/agents/plans/. A repo-level AGENTS.md (or CLAUDE.md) may override the destination — honour it.
  3. Create the directory if missing, then write the plan file in the shape defined in references/plan-template.md — read that file, copy its structure, and fill every <…> placeholder before saving.

Phase rules

  • One task = one actionable change touching a single file or symbol (function, route, migration, class). Spans multiple symbols → split.
  • Code snippets optional, short. Only when the shape is not obvious from the task description.
  • Automated criteria run unattended — test suites, type checkers, linters, file-existence assertions.
  • Manual criteria need a human — performance feel, edge-case judgement, and subjective visual judgement (aesthetics, layout feel, on-brand). These defer to the single final Manual Acceptance phase, never a per-phase block — see ## Autonomous implementation for the full rule, including why automatable UI behaviour stays an automated browser check rather than a manual one. "Review the code" is not manual verification.

Phase-shape examples

Reference shapes for common change types. All reinforce the vertical-slice doctrine — each phase ships an observable, revertible behaviour rather than a layer.

  • Bug fix. One phase is usually right. Tasks: reproduce with a failing test, apply the smallest fix that makes it pass, add a regression test, update any doc whose words no longer match. Resist growing the scope while you are in there.
  • New user-facing feature. Phase 1 is one happy path end-to-end: a single button or command path, a single endpoint, a single persisted record, one automated browser check that drives the round-trip and captures a screenshot, one doc line. Each later phase adds one further behaviour — an admin variant, an error state, an edit flow — and stays shippable on its own.
  • Refactor or extraction. Phase 1 introduces the new abstraction next to the old one and migrates exactly one real caller, with tests proving parity. Each later phase migrates a coherent group of callers. Final phase removes the old code once the last caller is gone. The codebase compiles and ships after every phase.
  • Schema or data migration. Phase 1 is purely additive — new column or table, reads still come from the old shape. Phase 2 dual-writes and backfills. Phase 3 routes one real user surface to the new shape behind a flag. Phase 4 flips the default and removes the old path. Each phase is independently revertible.
  • External API / third-party integration. Phase 1 wires one read call all the way through: configuration, client, one surface that shows one field. Phase 2 adds the next read or the first write. Do not stub the full API surface up front. If a phase needs a human to provision a credential or approve a consent screen before the next phase can wire its callback, mark that check as an inline blocking gate (see ## Autonomous implementation) rather than deferring it to final acceptance.

If your change does not fit any of these, fall back to the four phase-shape rules above and build the outline by hand — do not stretch a pattern that does not match.

Step 4 — Review pass

Spawn one sub-agent to red-team the draft. Brief:

  • Are phases genuinely vertical slices, or has horizontal layering crept back in?
  • Is each success criterion concrete enough for an implementer to act on without guessing?
  • Are there hidden cross-phase dependencies that should be explicit?
  • Are there scope items that belong in "Out of Scope"?

Fold substantive feedback into the plan.

Step 5 — Hand off

Summarise the plan in two or three sentences in chat, link the file, ask whether the user wants adjustments. Iterate until accepted. On acceptance, flip the front-matter status from draft to ready. Checkboxes stay [ ] until the user invokes the implementer skill.

Status lifecycle

status starts draft at file creation and flips to ready on user acceptance (Step 5). The later values in-progress and done belong to spec-implement, which sets them as phases complete.

Global rules

DO

  • Size each phase to one implement-and-verify sitting.
  • Plan migration + rollback for any persistent-state change.
  • Account for edge cases — failure modes, retries, back-pressure.
  • Cite files as file:line. Replace every <…> placeholder before saving.

DON'T

  • Reorder steps. Read named files before sub-agents fire; frame and confirm approach before drafting phases; capture metadata before writing the file.
  • Take vague requirements at face value.

Portions of this skill are derived from HumanLayer's create_plan slash command, licensed under the Apache License, Version 2.0. See NOTICE in the repository root for full attribution.

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.