mcpField
B
build-by-story

build-by-story

github.com/jayden-dangAgent workflows158 installsUpdated today
Repository

About build-by-story

build-by-story is an execution skill for carrying an approved story-unit plan through implementation and review. It derives review units from requirement stories, pauses for human approval between units, and performs a whole-branch review at the end.

Key features

  1. 01Derive review units from requirement stories
  2. 02Schedule tasks within each unit
  3. 03Pause for human approval after units
  4. 04Resume from a progress ledger
  5. 05Review the complete branch

Use cases

  1. 01Executing an approved plan in story-based stages
  2. 02Resuming work after a unit review
  3. 03Maintaining human review gates during implementation

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/jayden-dang/skills --skill build-by-story

After installing, type/build-by-storyin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

eval.json
story-unit-mode.md
TESTS.md
templates/
skills-ephemera-paths.md

Details

From the project README

Ephemera paths: resolve FEATURE_CODE / <CODE> then follow templates/skills-ephemera-paths.md (feature root .skills/<CODE>/). Resolve pack seeds in this order, first path that exists: (1) templates/ beside this SKILL.md, (2) ${CLAUDE_PLUGIN_ROOT}/templates when that variable is set, (3) ../../../templates relative to this SKILL.md.

Build By Story

Drive an approved story-unit plan to completion: derive review units from requirement stories, run the shared continuous scheduler inside each unit, stop for a human after each unit, resume from the unit ledger, and finish with whole-branch review.

Continuous multi-task orchestration without unit barriers is build-in-waves. Controller-implements-without-subagents is build-inline. Invoking this skill selects story-unit execution; continuous-header handoff is in Mode ownership below. If the user wants no subagents, name build-inline.

Shared controller recipe: REQUIRED SUB-SKILL: use execute-common — the one home for preflight/ledger/todos/close, applied where each Setup step below says. This file owns story-unit barriers and unit derivation; load ../execute-common/task-lifecycle.md for task dispatch/review and use the continuous scheduler rules from build-in-waves inside each unit.

Narration: at most one short line between tool calls. Ledger + tool results carry the record.

The Iron Law

NO NEXT UNIT WITHOUT HUMAN UNLOCK (OR A WRITTEN MODE CHANGE)

Agent-clean is not human unlock. EOD, demo pressure, and "whole PR later" do not drop the barrier. "Stop stopping" is a mode change: write Execution-mode: continuous into tasks.md before dropping barriers.

Iron laws (story-unit)

  1. Review units are derived, never authored in tasks.md (ignore PM "Human review order" comments for partition).
  2. After each unit's tasks are clean: unit agent review → STOP for human → unlock.
  3. "continue" after looking = next unit only. "stop stopping" / "just run it all" = write Execution-mode: continuous into tasks.md first, then hand remaining work to build-in-waves. Chat-only is not a mode change.
  4. Ledger Unit <k>: complete (tasks …, range <base>..<head>) — resume reads it.
  5. Whole-branch agent review still runs after the last unit. Human unit reviews are not a substitute.
ThoughtReality
"User said keep going — no need to edit tasks.md""Stop stopping" is a mode change; write the header or the plan lies
"Unit agent review was clean — skip human barrier"Agent unit review is not the human stop
"EOD / whole PR later — drop unit stops"Time and later review do not rewrite Execution-mode
"continue means run everything left""continue" unlocks one next unit; run-it-all needs mode-change language
"PM review waves are clearer than stories"Partition is derived from requirement story IDs, not authored lists

Mode ownership

Align tasks.md to the story-unit route and continue:

Execution-mode: on tasks.mdAction
story-unitProceed
continuousREQUIRED SUB-SKILL: use build-in-waves
missing / unset / invalidWrite Execution-mode: story-unit into tasks.md (commit if tracked). Proceed

Setup

  1. Mode ownership. Apply the table above. Done when: header is story-unit and you stay on this skill, or you have handed off to build-in-waves.
  2. Session preflight. Apply ../execute-common/SKILL.md Session preflight. Done when: that section's Done when holds.
  3. Ledger check. Apply ../execute-common/SKILL.md Ledger check (its story-unit clause covers skipping units already ledgered complete). Done when: next task/unit is known.
  4. Read the plan. Read tasks.md once. Record the canonical Global Constraints path and content hash; dispatches reference and take verify commands from it instead of pasting it into every reviewer prompt. If docs/agents/project.md is missing, say so and suggest configure-repo. When ## Team has roster/band, load band packaging only — never skip dual-verdict review for Solo. Done when: constraints captured word-for-word.
  5. Derive units — GATE. Load story-unit-mode.md beside this file. Run Derive partition + File count + print the Unit table. Hard-fail blocks dispatch. Done when: table printed; hard-fails resolved or reported.
  6. Todos — GATE. Apply ../execute-common/SKILL.md Todos — GATE. Done when: the list mirrors the plan and includes the Close branch todo.
  7. Pre-flight plan review. One batch question for plan-internal defects before dispatch. Clean scan → no comment. Done when: conflicts ruled or none.
  8. Unit order. Fixed already by step 5's Derive partition. Inside each unit, use the shared ready-set scheduler: serial when only one task is ready or surfaces overlap; parallel only for disjoint surfaces with safe worktree isolation. Done when: concurrency is fixed per unit.

Per-unit loop

For each unit U in order:

A. Tasks in the unit

Run ../execute-common/task-lifecycle.md for every ready task in U. The scheduler supplies the lane, worker/reviewer lease IDs, base revision, brief, report, and diff-package paths. A clean task review is ledgered before the unit barrier; that file's single-task close-out and no-duplicate-reviewer rule governs whether B below still needs to dispatch.

B. Unit barrier (after every task in U is ledgered)

Load story-unit-mode.md Per-unit barrier and run it in full. The human-facing STOP message MUST fill every REQUIRED slot in that recipe — no freeform abbreviation under time pressure. A multi-task unit's one unit-scope dispatch (from A) is its synthesis; a single-task unit already closed in A and is not re-reviewed here.

Unlock:

User saysAction
continue / LGTM / looks good (after looking)Ledger Unit <k>: complete (tasks …, range <base>..<head>). Next unit only. Mode stays story-unit.
stop stopping / just run it allWrite Execution-mode: continuous into tasks.md (commit if tracked). Ledger this unit complete. REQUIRED SUB-SKILL: use build-in-waves for remaining tasks (no further unit barriers).
stop / hold / changes neededStay stopped; do not start the next unit.
C. Next unit

Resume the per-unit loop. After the last unit's unlock and ledger line → After the last unit.

Implementer status handling

StatusYour move
DONEPackage diff → task review.
DONE_WITH_CONCERNSRead concerns and .skills/<CODE>/implementation-notes.md. Entries must match the nine-field Deviations recipe in ../execute-common/implementer-prompt.md. Missing notes path, incomplete fields, or five-field-only while claiming deviation → incomplete — re-dispatch to log first. Map impact reroute-plan / realign-spec or plan-falsifying → REQUIRED SUB-SKILL: use reroute-plan (do not accept as clean DONE).
NEEDS_CONTEXTSupply what was named; re-dispatch same model.
BLOCKEDContext → supply; ceiling → stronger model; too large → split; plan wrong → REQUIRED SUB-SKILL: use reroute-plan.

Cap redispatches at 2 per task; still not DONE → escalate to the user.

Model tiering

State the model explicitly on every dispatch.

  • Cheap: transcription / single-file mechanical fixes.
  • Mid floor: every reviewer; every implementer working from prose.
  • Top: design judgment, broad codebase understanding, whole-branch review.

Reviewer-prompt hygiene

  • Never pre-judge findings in the dispatch ("do not flag X", "Minor at most").
  • A plan-mandated defect is still a finding — ask the user which governs.
  • No open-ended "check everything" directives without a concrete reason.
  • Do not re-run tests the implementer already evidenced in the report.

Durable progress

  • Never re-dispatch a task or re-open a unit the ledger marks complete.
  • After compaction, resume at the first task without a complete line; unit complete lines mean the human barrier already closed for that unit.
  • .skills/ is git-ignored scratch; if wiped, reconstruct from git log.

After the last unit

Apply ../execute-common/SKILL.md Close sequence in full. Inspect base is git merge-base main HEAD — never a last-unit-only range.

Done when: that section's Done when holds.

Red Flags — Never

  • Skip the tracker-sync, occupancy, or workspace preflight
  • Invent a tracker or ticket set when config is absent or the user declined sync
  • Start the next unit (or ledger unit complete as if unlocked) without human unlock or a written mode change
  • Treat "stop stopping" as chat-only without writing Execution-mode: continuous
  • Over-read "continue" as run-all-remaining-units
  • Author or prefer PM review-order lists over derived story units
  • Skip unit agent review and send the raw unit to the human first
  • Skip whole-branch review because every unit was human-approved
  • Use HEAD~1 as a review base
  • Hand a subagent the whole plan file
  • Move on with open Critical/Important findings
  • Fix reviewer findings in the controller context
  • Re-dispatch work the ledger marks complete
  • Dispatch before the todo list exists (tasks and Close branch)
  • Skip the close sequence, silent-skip polish, or treat EOD/demo as a polish predicate
  • Implement on main/master without explicit consent
  • Create a worktree without asking
  • Silently switch to continuous rules while the header still says story-unit

Comments

Markdown supported