# /adopt — Phase 1: Detect Project State > Part of `/adopt`. `SKILL.md` names when to read this file; the settings it > resolved and the rules under its later headings still apply here. ## Phase 1: Detect Project State Emit one line before reading: `"Scanning project artifacts..."` — this confirms the skill is running during the silent read phase. Then read silently before presenting anything else. ### Existence check - `project.stage` in `project.yaml` (fallback `production/stage.txt`) — if either is present, use that value (authoritative phase) - `design/gdd/game-concept.md` (or, at the minimal tier, `design/game-brief.md`) — concept exists? - `design/gdd/systems-index.md` — systems index exists? - Count GDD files: `design/gdd/*.md` (excluding game-concept.md and systems-index.md) - Count ADR files: `docs/architecture/adr-*.md` - Count story files: `production/epics/**/*.md` (excluding EPIC.md) - `project.yaml` (`engine.name`) / `.claude/docs/technical-preferences.md` — engine configured? - `docs/engine-reference/` — engine reference docs present? - Glob `docs/adoption-plan-*.md` — note the filename of the most recent prior plan if any exist ### Infer phase (if no project.stage / stage.txt) Use the same heuristic as `/project-stage-detect`: - 10+ source files in the code root → Production - Stories in `production/epics/` → Pre-Production - ADRs exist → Technical Setup - systems-index.md exists → Systems Design - game-concept.md (or `design/game-brief.md`) exists → Concept - Nothing → Fresh (not a brownfield project — suggest `/start`) If the project appears fresh (no artifacts at all), use `AskUserQuestion`: - "This looks like a fresh project — no existing artifacts found. `/adopt` is for projects with work to migrate. What would you like to do?" - "Run `/start` — begin guided first-time onboarding" - "My artifacts are in a non-standard location — help me find them" - "Cancel" Then stop — do not proceed with the audit regardless of which option the user picks (each option leads to a different skill or manual investigation). Report: "Detected phase: [phase]. Found: [N] GDDs, [M] ADRs, [P] stories." ---