Turn Claude Code into a full game dev studio — 49 AI agents, 72 workflow skills, and a complete coordination system mirroring real studio hierarchy.
Skill Test Spec: /project-stage-detect
Skill Summary
/project-stage-detect [role] determines the project's development stage and
its gaps. It starts with a deterministic pass (bash .claude/scripts/artifact-check.sh, which reports PRESENT / ABSENT / SHORT /
PATTERN_MISS / NO_CHECK per artifact), then scans design/, the code root,
production/, prototypes/, docs/architecture/ and tests/.
A configured stage (project.stage in project.yaml, else legacy
production/stage.txt) is authoritative for what the stage is, but the skill
always runs its heuristics too and states explicitly when the artifacts
disagree. Heuristics, checked from most advanced backward: Production = code
root has 10+ source files; Pre-Production = engine configured, <10 source files;
Technical Setup = systems index, no engine; Systems Design = concept, no
complete systems index; Concept = no concept doc; Polish and Release are
explicit only. The resolved workflow tier decides which absent documents count
as gaps (none of GDDs/ADRs/sprints at minimal). An unresolved code root means
the source files were not counted: NOT ASSESSED — code root unresolved, never
zero files.
The report carries Stage Confidence, first match wins: FAIL (critical gaps
block progress) → CONCERNS (ambiguous signals — always when the configured and
observed stages disagree) → NOT ASSESSED (a check the stage depends on did not
run, named) → PASS (clearly detected). At workflow: minimal the configured
stage is never advanced (no /gate-check on that path), so its lag behind the
observed stage is reported but is not a disagreement. The skill shows the
summary, gaps and next steps, then asks "May I write the full stage analysis to
production/project-stage-report.md?". It never writes the stage itself. No
director gates apply.
Static Assertions (Structural)
Checked against the SKILL.md by /skill-test spec — no fixture needed.
- Has required frontmatter fields:
name,description,argument-hint,user-invocable,allowed-tools - Has ≥2 phase headings
- Contains all seven stage names: Concept, Systems Design, Technical Setup, Pre-Production, Production, Polish, Release
- Contains the Stage Confidence values PASS, CONCERNS, NOT ASSESSED and FAIL, with a first-match order
- Contains "May I write" language before writing
production/project-stage-report.md - Has a next-step handoff (Follow-Up Actions naming
/map-systems,/reverse-document,/architecture-decision,/sprint-plan,/milestone-review)
Director Gate Checks
None. /project-stage-detect is a diagnostic utility. It spawns no agents
(Agent is not in its allowed tools) and no director gates apply.
Fixture Defaults
Every case's project.yaml sets modes.rigor: minimal and
modes.automation: collaborative, with no project.local.yaml, unless its own
Fixture says otherwise. Rules: studio-tests/CLAUDE.md §
Fixture defaults.
Test Cases
Case 1: Configured Stage Matches the Artifacts
Fixture:
project.yamlhasproject.stage: Productionandengine.name: Godotsrc/has 24 source files;design/gdd/has 4 GDDs andsystems-index.md, one GDD per indexed systemdocs/architecture/hasarchitecture.mdand 5 ADRs;design/art/art-bible.mdand the UX specs exist;tests/unit/holds tests for each system — no doc type thefulltier flags is missing, so there is no gap to weighproduction/sprints/sprint-002.mdexists- Resolved workflow tier:
full
Input: /project-stage-detect
Expected behavior:
- Skill runs
bash .claude/scripts/artifact-check.shbefore hand-scanning - Skill reads the configured stage
Productionfromproject.yaml - Skill still runs the heuristics; 24 source files (10+) indicate Production
- Report states the configured and observed stages agree; Stage Confidence is PASS
- Skill shows the summary, gaps and next steps, then asks "May I write the full stage analysis to production/project-stage-report.md?"
Assertions:
-
artifact-check.shis run as the first scan step - Detected stage is Production, and the heuristic result is reported alongside the configured one
- Stage Confidence is PASS
- "May I write" names
production/project-stage-report.mdand nothing is written before approval - Neither
project.yamlnorproduction/stage.txtis modified
Case 2: No Configured Stage — Inferred From Artifacts, Role Filter Applied
Fixture:
- No
project.stageinproject.yamland noproduction/stage.txt engine.name: Godot;src/has 14 source filesdesign/gdd/has 3 GDDs;docs/architecture/has no ADRs- Resolved workflow tier:
full
Input: /project-stage-detect programmer
Expected behavior:
- Skill finds no configured stage and auto-detects from the heuristics
- 14 source files (10+) → stage Production
- The programmer role focuses recommendations on architecture docs, test coverage and missing ADRs
- The missing ADRs are surfaced as a gap with a clarifying question, and
/architecture-decisionor/reverse-document architectureis suggested - Skill asks before writing the report; no stage value is written anywhere
Assertions:
- Inferred stage is Production, based on the 10+ source-file rule
- Recommendations focus on architecture docs, tests and ADRs for the programmer role
- The ADR gap is phrased with a clarifying question, not only listed
- No stage value is written to
project.yamlorproduction/stage.txt
Case 3: Configured Stage Contradicted by the Artifacts
Fixture:
project.yamlhasproject.stage: Releaseengine.name: Godot;src/has 2 source files; no ADRs, no architecture doc, no epics- Resolved workflow tier:
full
Input: /project-stage-detect
Expected behavior:
- Skill reads the configured stage
Release - Heuristics indicate Pre-Production (engine configured, fewer than 10 source files)
- Skill reports both and says explicitly that they disagree — the configured stage may be stale, or work exists outside this repo
- The configured value is not silently replaced, and the disagreement is not hidden behind a confident result
Assertions:
- Output names both the configured stage (Release) and the observed stage (Pre-Production)
- The disagreement is stated explicitly
- Stage Confidence is CONCERNS (ambiguous signals), or FAIL if critical gaps are also found — never PASS
- The configured stage is neither silently overridden nor rewritten in any file
Case 4: Minimal Workflow Tier — Absent Docs Are Not Gaps
Fixture:
- Resolved workflow tier:
minimal project.yamlhasproject.stage: Concept, as/startwrote it — nothing on the minimal path runs/gate-check, so it has never advanceddesign/game-brief.mdexists;engine.name: Godot;src/has 5 source files- No GDDs, no art bible, no ADRs, no epics, no sprint plans
Input: /project-stage-detect
Expected behavior:
- Skill uses the resolved tier
minimalrather than assuming one - It treats a brief plus an engine as the normal state
- It does NOT flag absent GDDs, art bible, UX specs, ADRs, epics or sprint plans as gaps
- It does not suggest
/reverse-documentfor an absent GDD or/sprint-plan - The Production line reports stories through the brief's build order, never "no sprint plan"
- The heuristics observe Pre-Production (engine configured, fewer than 10 source files); the configured Concept is reported as not advanced at this tier — an expected lag, not a disagreement — so it does not by itself make Stage Confidence CONCERNS
Assertions:
- No absent GDD, art bible, ADR, epic or sprint plan is listed as a gap
-
/reverse-documentis not suggested for an absent GDD (this fixture has a brief; Case 7 covers the missing brief), and/sprint-planis not suggested - The Production completeness line refers to the brief's build order
- The configured Concept stage is not reported as a disagreement with the observed stage
- Report is still offered behind the "May I write" ask
Case 5: Director Gate Check — None; Declined Write Leaves No File
Fixture:
- Any project state
- Any review mode
- User declines the "May I write" ask
Input: /project-stage-detect
Expected behavior:
- Skill completes detection and shows the summary
- No director or other agent is spawned; no gate IDs appear
- Skill asks "May I write the full stage analysis to production/project-stage-report.md?"
- User declines; no file is created
Assertions:
- No director gate is invoked and no gate skip message appears
- No subagent is spawned
- The summary is shown before the write ask
- After a decline,
production/project-stage-report.mdis not created
Case 6: Unresolved Code Root — NOT ASSESSED, not a greenfield project
Fixture:
- No
project.stage, noproduction/stage.txt project.yamlhas noengine.name;.claude/docs/technical-preferences.mdreads[TO BE CONFIGURED]- Both
src/andAssets/exist, each holding source files (ambiguous tree) design/gdd/game-concept.mdanddesign/gdd/systems-index.mdexist, with a GDD for every indexed system;docs/architecture/holds the Foundation-layer ADRs — nothing thestandardtier flags is missing- Resolved workflow tier:
standard
Input: /project-stage-detect
Expected behavior:
- The code root cannot be resolved (no engine, two candidate roots), so the source-file count does not run
- The Source Code section reads
NOT ASSESSED — code root unresolved— not "0 source files", and the project is not called greenfield - Without the count the Production row (10+ source files) can be neither ruled in nor out — the rows below it would say Technical Setup (systems index, no engine) — so the report says which check did not run instead of settling silently on the lower stage
- No stage is configured and there are no gaps, so nothing ranks above it: Stage Confidence is NOT ASSESSED, naming the unresolved code root. The two candidate roots are the reason the check could not run, not an ambiguous signal (CONCERNS)
Assertions:
- No source-file count of zero is reported; the Source Code line is
NOT ASSESSED — code root unresolved - The code root is not assumed to be
src/ - Stage Confidence is NOT ASSESSED and names the check that did not run — not PASS
- The report is still offered behind the "May I write" ask
Case 7: Minimal Workflow, No Game Brief — The follow-up depends on how much code exists
Fixture:
- Resolved workflow tier:
minimal - No
project.stageand noproduction/stage.txt;engine.name: Godot(code rootsrc/) - No
design/game-brief.md, nodesign/gdd/files, no sprint plans - Scenario (a):
src/has 14 source files - Scenario (b):
src/has 3 source files
Input: /project-stage-detect
Expected behavior:
- Skill uses the resolved tier
minimal; the absent GDDs, ADRs, epics and sprint plans are still not gaps - The absent
design/game-brief.mdis reported, and the Follow-Up Actions address it - (a) The code root already holds the game (10 or more source files), so the follow-up is
/reverse-document design src/— the brief is written from what is built — and not/brainstorm - (b) With little code the follow-up is
/brainstorm, not/reverse-document - In both,
/sprint-planis not suggested; the report is offered behind the "May I write" ask
Assertions:
- The missing game brief is reported at
minimal - (a)
/reverse-document design <code root>is suggested, naming the resolved code root (src/), and/brainstormis not - (b)
/brainstormis suggested and/reverse-documentis not - The suggestion in both scenarios is conditioned on the source-file count (10 or more), as counted in the resolved code root
- No GDD, ADR, epic or sprint-plan gap is reported, and
/sprint-planis not suggested
Protocol Compliance
- Runs
artifact-check.shbefore hand-scanning artifacts - Reads
project.stage(thenproduction/stage.txt) when present, and always runs the heuristics as well - States explicitly when configured and observed stages disagree
- Surfaces gaps only as the resolved workflow tier allows, each with a clarifying question
- Reports Stage Confidence as PASS / CONCERNS / NOT ASSESSED / FAIL, first match FAIL → CONCERNS → NOT ASSESSED → PASS; a configured/observed disagreement is CONCERNS
- Reports an unresolved code root as
NOT ASSESSED — code root unresolved, never as zero source files - Asks "May I write" before writing
production/project-stage-report.md; never writes a stage value
Coverage Notes
- Concept (no concept doc) and Technical Setup (systems index, no engine) follow the same heuristic table and are not separately fixture-tested.
- Polish and Release are explicit-only stages; they can only come from a configured value, which Case 3 covers.
- The
standardtier (flag missing GDDs for built systems and critical ADRs only) is not separately tested.