Files
Claude-Code-Game-Studios/.claude/skills/dev-story/SKILL.md
Donchitos 4ca6500a21 Split /create-epics-stories into /create-epics + /create-stories; add /dev-story
- NEW /create-epics (agent: technical-director): architect-level epic scoping,
  one epic per architectural module. Does not create stories.
- NEW /create-stories (agent: lead-programmer): decomposes a single epic into
  story files with embedded TR-IDs, ADR guidance, and test evidence paths.
- NEW /dev-story: the missing implementation skill — reads a story, loads full
  context (TR registry, ADR, control manifest, engine prefs), routes to the
  correct programmer agent via Task, and drives implementation to completion
  including writing the test.
- DEPRECATED /create-epics-stories: added redirect notice; original content
  preserved for reference.
- Updated /gate-check: Pre-Prod→Production artifact check and follow-up actions
  now reference the two new skills.
- Updated workflow-catalog.yaml: replaced create-epics-stories step with two
  separate steps; implement step now references /dev-story with command field.

Story loop is now explicit:
  /story-readiness → /dev-story → /code-review → /story-done

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-16 14:57:39 +11:00

10 KiB

name, description, argument-hint, user-invocable, allowed-tools, context
name description argument-hint user-invocable allowed-tools context
dev-story 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. [story-path] true Read, Glob, Grep, Write, Edit, Bash, Task fork

Dev Story

This 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:

/story-readiness [path]   ← validate before starting
/dev-story [path]         ← implement it  (this skill)
/code-review [files]      ← review it
/story-done [path]        ← verify and close it

Output: Source code + test file in the project's src/ and tests/ directories.


Phase 1: Find the Story

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.


Phase 2: Load Full Context

Read everything in this order — do not start implementation until all is loaded:

The story file

Extract and hold:

  • Story title, ID, layer, type (Logic / Integration / Visual/Feel / UI / Config/Data)
  • TR-ID — the GDD requirement identifier
  • Governing ADR reference
  • Manifest Version embedded in story header
  • Acceptance Criteria — every checkbox item, verbatim
  • Implementation Notes — the ADR guidance section in the story
  • Out of Scope boundaries
  • Test Evidence — the required test file path
  • Dependencies — what must be DONE before this story

The TR registry

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).

The governing ADR

Read docs/architecture/[adr-file].md. Extract:

  • The full Decision section
  • The Implementation Guidelines section (this is what the programmer follows)
  • The Engine Compatibility section (post-cutoff APIs, known risks)
  • The ADR Dependencies section

The control manifest

Read docs/architecture/control-manifest.md. Extract the rules for this story's layer:

  • Required patterns
  • Forbidden patterns
  • Performance guardrails

Check: does the story's embedded Manifest Version match the current manifest header date? If they differ: "Story was written against manifest v[story-date]. Current manifest is v[current-date]. New rules may apply — reviewing the diff before implementing." Read the manifest carefully for any new rules added since the story was written.

Engine reference

Read .claude/docs/technical-preferences.md:

  • Engine: value — determines which programmer agents to use
  • Naming conventions (class names, file names, signal/event names)
  • Performance budgets (frame budget, memory ceiling)
  • Forbidden patterns

Phase 3: Route to the Right Programmer

Based on the story's Layer, Type, and system name, determine which specialist to spawn via Task.

Primary agent routing table

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)

Engine specialist — always spawn as secondary for code stories

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.


Phase 4: Implement

Spawn the chosen programmer agent(s) via Task with the full context package:

Provide the agent with:

  1. The complete story file content
  2. The current GDD requirement text (from TR registry)
  3. The ADR Decision + Implementation Guidelines (verbatim — do not summarise)
  4. The control manifest rules for this layer
  5. The engine naming conventions and performance budgets
  6. Any engine-specific notes from the ADR Engine Compatibility section
  7. The test file path that must be created
  8. Explicit instruction: implement this story and write the test

The agent should:

  • Create or modify files in src/ following the ADR guidelines
  • Respect all Required and Forbidden patterns from the control manifest
  • Stay within the story's Out of Scope boundaries (do not touch unrelated files)
  • Write clean, doc-commented public APIs

Config/Data stories (no agent needed)

For 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.

Visual/Feel stories

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.


Phase 5: Write the Test

For Logic and Integration stories, the test must be written as part of this implementation — not deferred to later.

Remind the programmer agent:

"The test file for this story is required at: [path from Test Evidence section]. The story cannot be closed via /story-done without it. Write the test alongside the implementation, not after."

Test requirements (from coding-standards.md):

  • File name: [system]_[feature]_test.[ext]
  • Function names: test_[scenario]_[expected_outcome]
  • Each acceptance criterion must have at least one test function covering it
  • No random seeds, no time-dependent assertions, no external I/O
  • Test the formula bounds from the GDD Formulas section

For Visual/Feel and UI stories: no automated test. Remind the agent to note in the implementation summary what manual evidence will be needed: "Evidence doc required at production/qa/evidence/[slug]-evidence.md."

For Config/Data stories: no test file. A smoke check will serve as evidence.


Phase 6: Collect and Summarise

After the programmer agent(s) complete, collect:

  • Files created or modified (with paths)
  • Test file created (path and number of test functions written)
  • Any deviations from the story's Out of Scope boundary (flag these)
  • Any questions or blockers the agent surfaced
  • Any engine-specific risks the specialist flagged

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]

Ready for: `/code-review [file1] [file2]` then `/story-done [story-path]`

Phase 7: Update Session State

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."


Collaborative Protocol

  • Load before implementing — do not start coding until all context is loaded (story, TR-ID, ADR, manifest, engine prefs). Incomplete context produces code that drifts from design.
  • The ADR is the law — implementation must follow the ADR's Implementation Guidelines. If the guidelines conflict with what seems "better," flag it in the summary rather than silently deviating.
  • Stay in scope — the Out of Scope section is a contract. If implementing the story requires touching an out-of-scope file, stop and surface it: "Implementing [criterion] requires modifying [file], which is out of scope. Shall I proceed or create a separate story?"
  • Test is not optional for Logic/Integration — do not mark implementation complete without the test file existing
  • Visual/Feel criteria are deferred, not skipped — mark them as DEFERRED in the summary; they will be manually verified in /story-done
  • Ask before large structural decisions — if the story requires an architectural pattern not covered by the ADR, surface it before implementing: "The ADR doesn't specify how to handle [case]. My plan is [X]. Proceed?"