Read a story file and implement it. Loads the full context (story, GDD requirement, ADR guidelines, control manifest), routes to the right programmer agent for the system and engine, implements the code and test, and confirms each acceptance criterion. The core implementation skill — run after /story-readiness, before /code-review and /story-done.
60
72%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Low
Low-risk findings worth noting
Fix and improve this skill with Tessl
tessl review fix ./.claude/skills/dev-story/SKILL.mdThis skill bridges planning and code. It reads a story file in full, assembles all the context a programmer needs, routes to the correct specialist agent, and drives implementation to completion — including writing the test.
The loop for every story:
/qa-plan sprint ← define test requirements before sprint begins
/story-readiness [path] ← validate before starting
/dev-story [path] ← implement it (this skill)
/code-review [files] ← review it
/story-done [path] ← verify and close itAfter all sprint stories are done: run /team-qa sprint to execute the full QA cycle and get a sign-off verdict before advancing the project stage.
Output: Source code + test file in the project's src/ and tests/ directories.
If a path is provided: read that file directly.
If no argument: check production/session-state/active.md for the active
story. If found, confirm: "Continuing work on [story title] — is that correct?"
If not found, ask: "Which story are we implementing?" Glob
production/epics/**/*.md and list stories with Status: Ready.
Before loading any context, verify required files exist. Extract the ADR path from the story's ADR Governing Implementation field, then check:
| File | Path | If missing |
|---|---|---|
| TR registry | docs/architecture/tr-registry.yaml | STOP — "TR registry not found at docs/architecture/tr-registry.yaml. Run /architecture-review to bootstrap the registry from your GDDs and ADRs." |
| Governing ADR | path from story's ADR field | STOP — "ADR file [path] not found. Run /architecture-decision to create it, or correct the filename in the story's ADR field." |
| Control manifest | docs/architecture/control-manifest.md | WARN and continue — "Control manifest not found — layer rules cannot be checked. Run /create-control-manifest." |
If the TR registry or governing ADR is missing, set the story status to BLOCKED in the session state and do not spawn any programmer agent.
Read all of the following simultaneously — these are independent reads. Do not start implementation until all context is loaded:
Extract and hold:
Read docs/architecture/tr-registry.yaml. Look up the story's TR-ID.
Read the current requirement text — this is the source of truth for what the
GDD requires now. Do not rely on any inline text in the story file (may be stale).
Read docs/architecture/[adr-file].md. Extract:
Read docs/architecture/control-manifest.md. Extract the rules for this story's layer:
Check: does the story's embedded Manifest Version match the current manifest header date?
If they differ, use AskUserQuestion before proceeding:
[A] Update story manifest version and implement with current rules (Recommended)[B] Implement with old rules — I accept the risk of non-compliance[C] Stop here — I want to review the manifest diff firstIf [A]: edit the story file's Manifest Version: field to the current manifest date before spawning the programmer. Then read the manifest carefully for new rules.
If [B]: edit the story file's Manifest Version: field to the current manifest date AND add a Manifest-Note: Proceeded with old manifest rules on [date] — non-compliance risk accepted. line to the story header. Read the manifest for new rules anyway. Note the decision in the Phase 6 summary under "Deviations". /story-done will include the Manifest-Note in its deviations section without re-checking staleness.
If [C]: stop. Do not spawn any agent. Let the user review and re-run /dev-story.
After extracting the Dependencies list from the story file, validate each:
production/epics/**/*.md to find each dependency story file.Status: field.Complete or Done:
AskUserQuestion:
[A] Proceed anyway — I accept the dependency risk[B] Stop — I'll complete the dependency first[C] The dependency is done but status wasn't updated — mark it Complete and continueIf a dependency file cannot be found: warn "Dependency story not found: [path]. Verify the path or create the story file."
Read .claude/docs/technical-preferences.md:
Engine: value — determines which programmer agents to useSilently update two things before spawning any agent:
production/sprint-status.yaml (if it exists): find the entry matching this story's file path and set status: in_progress. Update the top-level updated field to today's date. If the file does not exist, skip silently.
The story file itself: edit the Last Updated: field in the story header to today's date (format: YYYY-MM-DD). If the field does not exist in the story header, add it after the Status: line. This enables sprint-status staleness detection for this story.
Based on the story's Layer, Type, and system name, determine which specialist to spawn via Task.
Config/Data stories — skip agent spawning entirely:
If the story's Type is Config/Data, no programmer agent or engine specialist is needed. Jump directly to Phase 4 (Config/Data note). The implementation is a data file edit — no routing table evaluation, no engine specialist.
| Story context | Primary agent |
|---|---|
| Foundation layer — any type | engine-programmer |
| Any layer — Type: UI | ui-programmer |
| Any layer — Type: Visual/Feel | gameplay-programmer (implements) |
| Core or Feature — gameplay mechanics | gameplay-programmer |
| Core or Feature — AI behaviour, pathfinding | ai-programmer |
| Core or Feature — networking, replication | network-programmer |
| Config/Data — no code | No agent needed (see Phase 4 Config note) |
Read the Engine Specialists section of .claude/docs/technical-preferences.md
to get the configured primary specialist. Spawn them alongside the primary agent
when the story involves engine-specific APIs, patterns, or the ADR has HIGH
engine risk.
| Engine | Specialist agents available |
|---|---|
| Godot 4 | godot-specialist, godot-gdscript-specialist, godot-shader-specialist |
| Unity | unity-specialist, unity-ui-specialist, unity-shader-specialist |
| Unreal Engine | unreal-specialist, ue-gas-specialist, ue-blueprint-specialist, ue-umg-specialist, ue-replication-specialist |
When engine risk is HIGH (from the ADR or VERSION.md): always spawn the engine specialist, even for non-engine-facing stories. High risk means the ADR records assumptions about post-cutoff engine APIs that need expert verification.
Spawn the chosen programmer agent(s) via Task with the full context package:
Brief the agent with file paths and targeted reading instructions — do not serialize document content into the Task prompt. The agent reads what it needs directly:
[story-path] — read in full[TR-XXX-NNN] in docs/architecture/tr-registry.yaml — use the requirement field as source of truthdocs/architecture/[adr-file].md — read the Decision and Implementation Guidelines sections onlydocs/architecture/control-manifest.md — read rules for the [layer] layer only.claude/docs/technical-preferences.md — read naming conventions and performance budgets[path from story's Test Evidence section] — this file must be created as part of implementation[path from the story's Test Evidence section]. Write the test alongside the implementation — do not defer it. The story cannot be closed via /story-done without this file present. Each acceptance criterion must have at least one test function covering it. Test file naming: [system]_[feature]_test.[ext]. Function naming: test_[scenario]_[expected_outcome]. No random seeds, no time-dependent assertions, no external I/O.The agent should:
src/ following the ADR guidelinesFor Type: Config/Data stories, no programmer agent is required. The implementation is editing a data file. Read the story's acceptance criteria and make the specified changes to the data file directly. Note which values were changed and what they changed from/to.
Spawn gameplay-programmer to implement the code/animation calls. Note that
Visual/Feel acceptance criteria cannot be auto-verified — the "does it feel right?"
check happens in /story-done via manual confirmation.
The test requirement was included in the Phase 4 programmer agent brief (item 7). This phase summarizes what evidence each story type requires — used when collecting the Phase 6 summary.
| Story Type | Required Evidence | Notes |
|---|---|---|
| Logic | Automated unit test at path from story's Test Evidence section | BLOCKING — included in Phase 4 agent brief |
| Integration | Integration test OR documented playtest record | BLOCKING — included in Phase 4 agent brief |
| Visual/Feel | Evidence doc at production/qa/evidence/[slug]-evidence.md | ADVISORY — note in Phase 6 summary |
| UI | Manual walkthrough doc or interaction test | ADVISORY — note in Phase 6 summary |
| Config/Data | None — smoke check serves as evidence | N/A |
For Visual/Feel and UI stories, include in the Phase 6 summary: "Manual evidence required at production/qa/evidence/[slug]-evidence.md before this story can be fully closed."
After the programmer agent(s) complete, collect:
Present a concise implementation summary:
## Implementation Complete: [Story Title]
**Files changed**:
- `src/[path]` — created / modified ([brief description])
- `tests/[path]` — test file ([N] test functions)
**Acceptance criteria covered**:
- [x] [criterion] — implemented in [file:function]
- [x] [criterion] — covered by test [test_name]
- [ ] [criterion] — DEFERRED: requires playtest (Visual/Feel)
**Deviations from scope**: [None] or [list files touched outside story boundary]
**Engine risks flagged**: [None] or [specialist finding]
**Blockers**: [None] or [describe]
**Before running `/story-done`:** run your test suite locally and confirm the tests you wrote pass. `/story-done` will re-run them automatically, but a failing test discovered there means returning to implementation context.
Ready for: `/code-review [file1] [file2]` then `/story-done [story-path]`Silently append to production/session-state/active.md:
## Session Extract — /dev-story [date]
- Story: [story-path] — [story title]
- Files changed: [comma-separated list]
- Test written: [path, or "None — Visual/Feel/Config story"]
- Blockers: [None, or description]
- Next: /code-review [files] then /story-done [story-path]Create active.md if it does not exist. Confirm: "Session state updated."
If any spawned agent (via Task) returns BLOCKED, errors, or cannot complete:
Common blockers:
/architecture-decision first/create-stories/story-done/code-review [file1] [file2] to review the implementation before closing the story/story-done [story-path] to verify acceptance criteria and mark the story complete/team-qa sprint for the full QA cycle before advancing the project stage984023d
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.