/project -- Project Orchestrator
Bootstraps project state on first run, reports status, and routes to the correct next
skill on every subsequent invocation. Read-only after bootstrap.
Rules
- Read fresh every time. Read all state files from disk on every invocation -- never
rely on conversation memory or cached values (STATE-03).
- Read-only after bootstrap. After the initial
progress.txt creation, /project
never modifies progress.txt or any other file (PROJ-10) -- two exceptions exist:
bootstrap (Step 2) and Gate 3 closure (Step 5, when all milestones are complete).
- Route, never dispatch. Tell the user which skill to run next via plain-language
instruction. Never auto-invoke or auto-dispatch another skill (DD-2).
- Write-ordering contract for downstream skills. When both
milestone-status.txt and
progress.txt need updates, write milestone-status.txt first -- source-of-truth-first
ordering (STATE-04). This rule applies to /build and /milestone, not to /project or /plan-feature.
- Interactive prompts. Use
AskUserQuestion for all user-facing choices (2-4 options,
max 12-character option headers).
Prerequisites
- Working directory is the project root (the directory where
progress.txt lives or will
be created).
- No other files or directories are required --
/project handles first-run detection
automatically.
Step 1 -- Detect Project State
Read progress.txt from the project root.
- If the file does not exist, proceed to Step 2 (Bootstrap).
- If the file exists but is a light
progress.txt (inline [ ] Feature X.Y lines and no
## Gates / ## Milestones sections), it is owned by /create-prd + /start-feature, not the
gated workflow. Stop and tell the user: this directory is under the light workflow — use
/start-feature here, or run /project from a directory with no light progress.txt. Do not
parse it as gated state and do not overwrite it.
- If the file exists with the gated schema (
## Gates / ## Milestones), proceed to Step 3
(Read State).
Step 2 -- Bootstrap
This is the ONLY time /project writes to disk.
- Read
references/progress-format.md for the exact bootstrap template, slug derivation
rules, and format rules.
- Detect greenfield vs brownfield:
- Greenfield: project directory is empty or contains only boilerplate files (README,
.gitignore, package.json with no src/ directory). Use the greenfield variant --
Gate 0 recorded as [-] Gate 0: Codebase Alignment Skipped (greenfield) (per DD-10).
- Brownfield: existing source code is present. Use the standard template -- Gate 0
recorded as
[ ] Gate 0: Codebase Alignment.
- Determine the project name and slug:
- Derive a candidate name from the working directory name.
- Derive a candidate slug from that name using the slug derivation rules in
references/progress-format.md (lowercase, hyphens, alphanumeric only).
- Use
AskUserQuestion to confirm or override the name before writing:
- Present the derived name and slug as the default option.
- Offer the user a chance to provide a custom name; the slug is always re-derived
from the name — it is not set independently.
- Use the Write tool to create
progress.txt with the bootstrap template, replacing
<Project Name> with the confirmed project name, <slug> with the confirmed slug,
and <ISO date> with today's date (YYYY-MM-DD).
- Read the file back and confirm it was created correctly.
- Show the user the created file content.
- Proceed to Step 3 (Read State) to display the initial status report.
Step 3 -- Read State
Read progress.txt from disk (fresh read -- STATE-03). Parse:
# Project-ID: <slug> header line -- derive the artifact base path: .project/<slug>/.
All artifact reads and writes use this base path for the remainder of the invocation.
- All gate entries in the
## Gates section (status marker, name, date, artifact path).
- All milestone summary lines in the
## Milestones section (status, name, path, feature
counts).
- All spike entries in the
## Spikes section (status, name, path, resolution date).
For each milestone found, read its milestone-status.txt at
.project/<slug>/milestones/<NN>-<name>/milestone-status.txt (path derived from the
milestone summary line's directory path, resolved against the artifact base path).
Read references/routing-logic.md for validation rules, then perform:
- Artifact validation (PROJ-04): For each
[x] gate, check that the artifact path
listed on the gate entry line exists on disk. If missing, record an inline warning.
- Consistency validation (PROJ-05): For each milestone, compare the
N/M features complete count in progress.txt against the actual [x] feature count in the
corresponding milestone-status.txt. If they diverge, record a consistency warning.
Collect all warnings. Proceed to Step 4 (Status Report).
Step 4 -- Status Report
Read references/status-report-format.md for the exact output format and structure.
Display the status report to the user following this order:
- Gate WB Pending reminder (conditional): If Gate WB is
[ ] Pending, show a gentle
reminder at the top of the report per D-09. This does NOT suppress the rest of the
report -- the full status display continues below the reminder.
- GATES: Checklist of all gates with status, dates, artifact paths. Inline warnings
(D-06) appear directly after the gate entry they affect.
- ACTIVE MILESTONE: Expanded view with per-feature status from
milestone-status.txt.
Consistency divergence warnings appear inline after the milestone header.
- COMPLETED MILESTONES: One-line summaries (shown only if any milestones are complete).
- UPCOMING MILESTONES: One-line summaries (shown only if upcoming milestones exist).
- SPIKES: All spikes -- both open and resolved (per D-02). Never remove resolved spikes.
If a consistency divergence is detected (D-07 blocking behavior): display the full status
report, but replace the RECOMMENDED section with a request for the user to acknowledge the
discrepancy before routing can proceed.
Proceed to Step 5 (Route).
Step 5 -- Route
Read references/routing-logic.md for the complete routing table and re-planning keywords.
Re-planning intent detection (D-05, PROJ-08, PROJ-09): Check if the user's message
contains keywords signaling revision intent:
- PRD revision triggers: "goals changed", "revise PRD", "pivot", "change direction",
"update requirements", "scope change" -- route to
/define in revision mode.
- Milestone revision triggers: "re-plan", "revise milestone", "regroup features",
"change milestone", "re-scope" -- route to
/milestone in revision mode.
Normal routing: Determine the recommended next action based on the current project
state using the routing table. Display per D-03:
- One RECOMMENDED action, clearly highlighted.
- 2-3 Also available alternatives listed below (per D-04: only actions valid for the
current project state).
Gate WB offer (DD-11, D-08): If Gate 0 is approved ([x]) or skipped ([-] greenfield),
no .project/{slug}/docs/working-backwards.md exists (where {slug} is the value parsed
from the # Project-ID: header), Gate WB has not been offered yet, and the customer
outcome is unclear -- offer Gate WB using AskUserQuestion with options:
- Yes -- proceed with Working Backwards exercise (routes to
/define)
- Skip -- record Gate WB as skipped
- Defer -- record Gate WB as Pending for later decision
Include a 2-3 sentence explanation of the Working Backwards value proposition.
Gate 3 closure offer (D-01 through D-05, PROJ-10): If all milestones in progress.txt
are [x] complete AND Gate 3 is still [~] In progress -- offer Gate 3 closure using
AskUserQuestion with options:
- Close Gate 3 -- write
[x] Gate 3: Milestone Review Approved: <YYYY-MM-DD> (closed by /project)
to progress.txt (replacing the [~] In progress line), where <YYYY-MM-DD> is today's date.
Then continue to routing (the "All milestones complete" row will show "Project complete").
- Leave open -- skip the write. Continue to normal routing (the "All milestones complete"
row will still show "Project complete").
Show a 1-line explanation before the prompt: "Gate 3 tracks milestone planning. Closing it
marks the milestone review phase officially complete."
After AskUserQuestion resolves (regardless of which option the user chose), continue to
normal routing table evaluation.
If the user chose Close Gate 3: use the Write tool to update the Gate 3 line in
progress.txt. Read the file first, replace [~] Gate 3: Milestone Review In progress
with [x] Gate 3: Milestone Review Approved: <YYYY-MM-DD> (closed by /project). Read the
file back and confirm the update was applied correctly before proceeding to routing.
Error Handling
- Malformed
progress.txt: If the file is missing required headers or has corrupted
entries, report the issue to the user. Suggest checking git history for a clean version.
Do not attempt to repair the file.
- Missing
milestone-status.txt: If a milestone directory exists but its
milestone-status.txt is missing, warn the user but continue -- the milestone may be
partially created. Show the warning inline in the status report.
- Ambiguous user intent: If the user's request is unclear, use
AskUserQuestion to
ask for clarification rather than guessing the intended action.
- Empty project (post-bootstrap): When all gates are pending, no milestones exist, and
no spikes exist, display the empty project report format from
references/status-report-format.md.
The only valid recommendation is to run /define.
- Interrupted bootstrap: If
/project is re-invoked after a failed bootstrap attempt
(e.g., progress.txt exists but is empty or incomplete), treat the file as malformed and
report the issue rather than attempting a second bootstrap.
1---2name: project3description: Project orchestrator. Bootstraps progress.txt on first run, reports project state, and routes to the next skill on every subsequent invocation. Use when starting a new project, checking project status, or deciding what to do next. Phrases like "where am I", "project status", "what's next" are good triggers.4---56# /project -- Project Orchestrator78Bootstraps project state on first run, reports status, and routes to the correct next9skill on every subsequent invocation. Read-only after bootstrap.1011## Rules1213- **Read fresh every time.** Read all state files from disk on every invocation -- never14 rely on conversation memory or cached values (STATE-03).15- **Read-only after bootstrap.** After the initial `progress.txt` creation, `/project`16 never modifies `progress.txt` or any other file (PROJ-10) -- two exceptions exist:17 bootstrap (Step 2) and Gate 3 closure (Step 5, when all milestones are complete).18- **Route, never dispatch.** Tell the user which skill to run next via plain-language19 instruction. Never auto-invoke or auto-dispatch another skill (DD-2).20- **Write-ordering contract for downstream skills.** When both `milestone-status.txt` and21 `progress.txt` need updates, write `milestone-status.txt` first -- source-of-truth-first22 ordering (STATE-04). This rule applies to `/build` and `/milestone`, not to `/project` or `/plan-feature`.23- **Interactive prompts.** Use `AskUserQuestion` for all user-facing choices (2-4 options,24 max 12-character option headers).2526## Prerequisites2728- Working directory is the project root (the directory where `progress.txt` lives or will29 be created).30- No other files or directories are required -- `/project` handles first-run detection31 automatically.3233## Step 1 -- Detect Project State3435Read `progress.txt` from the project root.3637- If the file **does not exist**, proceed to Step 2 (Bootstrap).38- If the file **exists but is a *light* `progress.txt`** (inline `[ ] Feature X.Y` lines and no39 `## Gates` / `## Milestones` sections), it is owned by `/create-prd` + `/start-feature`, not the40 gated workflow. **Stop** and tell the user: this directory is under the light workflow — use41 `/start-feature` here, or run `/project` from a directory with no light `progress.txt`. Do not42 parse it as gated state and do not overwrite it.43- If the file **exists** with the gated schema (`## Gates` / `## Milestones`), proceed to Step 344 (Read State).4546## Step 2 -- Bootstrap4748This is the ONLY time `/project` writes to disk.49501. Read `references/progress-format.md` for the exact bootstrap template, slug derivation51 rules, and format rules.522. Detect greenfield vs brownfield:53 - **Greenfield:** project directory is empty or contains only boilerplate files (README,54 `.gitignore`, `package.json` with no `src/` directory). Use the greenfield variant --55 Gate 0 recorded as `[-] Gate 0: Codebase Alignment Skipped (greenfield)` (per DD-10).56 - **Brownfield:** existing source code is present. Use the standard template -- Gate 057 recorded as `[ ] Gate 0: Codebase Alignment`.583. Determine the project name and slug:59 - Derive a candidate name from the working directory name.60 - Derive a candidate slug from that name using the slug derivation rules in61 `references/progress-format.md` (lowercase, hyphens, alphanumeric only).62 - Use `AskUserQuestion` to confirm or override the name before writing:63 - Present the derived name and slug as the default option.64 - Offer the user a chance to provide a custom name; the slug is always re-derived65 from the name — it is not set independently.664. Use the Write tool to create `progress.txt` with the bootstrap template, replacing67 `<Project Name>` with the confirmed project name, `<slug>` with the confirmed slug,68 and `<ISO date>` with today's date (YYYY-MM-DD).695. Read the file back and confirm it was created correctly.706. Show the user the created file content.717. Proceed to Step 3 (Read State) to display the initial status report.7273## Step 3 -- Read State7475Read `progress.txt` from disk (fresh read -- STATE-03). Parse:7677- `# Project-ID: <slug>` header line -- derive the artifact base path: `.project/<slug>/`.78 All artifact reads and writes use this base path for the remainder of the invocation.79- All gate entries in the `## Gates` section (status marker, name, date, artifact path).80- All milestone summary lines in the `## Milestones` section (status, name, path, feature81 counts).82- All spike entries in the `## Spikes` section (status, name, path, resolution date).8384For each milestone found, read its `milestone-status.txt` at85`.project/<slug>/milestones/<NN>-<name>/milestone-status.txt` (path derived from the86milestone summary line's directory path, resolved against the artifact base path).8788Read `references/routing-logic.md` for validation rules, then perform:8990- **Artifact validation (PROJ-04):** For each `[x]` gate, check that the artifact path91 listed on the gate entry line exists on disk. If missing, record an inline warning.92- **Consistency validation (PROJ-05):** For each milestone, compare the `N/M features93 complete` count in `progress.txt` against the actual `[x]` feature count in the94 corresponding `milestone-status.txt`. If they diverge, record a consistency warning.9596Collect all warnings. Proceed to Step 4 (Status Report).9798## Step 4 -- Status Report99100Read `references/status-report-format.md` for the exact output format and structure.101102Display the status report to the user following this order:1031041. **Gate WB Pending reminder (conditional):** If Gate WB is `[ ] Pending`, show a gentle105 reminder at the top of the report per D-09. This does NOT suppress the rest of the106 report -- the full status display continues below the reminder.1072. **GATES:** Checklist of all gates with status, dates, artifact paths. Inline warnings108 (D-06) appear directly after the gate entry they affect.1093. **ACTIVE MILESTONE:** Expanded view with per-feature status from `milestone-status.txt`.110 Consistency divergence warnings appear inline after the milestone header.1114. **COMPLETED MILESTONES:** One-line summaries (shown only if any milestones are complete).1125. **UPCOMING MILESTONES:** One-line summaries (shown only if upcoming milestones exist).1136. **SPIKES:** All spikes -- both open and resolved (per D-02). Never remove resolved spikes.114115If a consistency divergence is detected (D-07 blocking behavior): display the full status116report, but replace the RECOMMENDED section with a request for the user to acknowledge the117discrepancy before routing can proceed.118119Proceed to Step 5 (Route).120121## Step 5 -- Route122123Read `references/routing-logic.md` for the complete routing table and re-planning keywords.124125**Re-planning intent detection (D-05, PROJ-08, PROJ-09):** Check if the user's message126contains keywords signaling revision intent:127128- PRD revision triggers: "goals changed", "revise PRD", "pivot", "change direction",129 "update requirements", "scope change" -- route to `/define` in revision mode.130- Milestone revision triggers: "re-plan", "revise milestone", "regroup features",131 "change milestone", "re-scope" -- route to `/milestone` in revision mode.132133**Normal routing:** Determine the recommended next action based on the current project134state using the routing table. Display per D-03:135136- One **RECOMMENDED** action, clearly highlighted.137- 2-3 **Also available** alternatives listed below (per D-04: only actions valid for the138 current project state).139140**Gate WB offer (DD-11, D-08):** If Gate 0 is approved (`[x]`) or skipped (`[-]` greenfield),141no `.project/{slug}/docs/working-backwards.md` exists (where `{slug}` is the value parsed142from the `# Project-ID:` header), Gate WB has not been offered yet, and the customer143outcome is unclear -- offer Gate WB using `AskUserQuestion` with options:144145- **Yes** -- proceed with Working Backwards exercise (routes to `/define`)146- **Skip** -- record Gate WB as skipped147- **Defer** -- record Gate WB as Pending for later decision148149Include a 2-3 sentence explanation of the Working Backwards value proposition.150151**Gate 3 closure offer (D-01 through D-05, PROJ-10):** If all milestones in `progress.txt`152are `[x]` complete AND Gate 3 is still `[~] In progress` -- offer Gate 3 closure using153`AskUserQuestion` with options:154155- **Close Gate 3** -- write `[x] Gate 3: Milestone Review Approved: <YYYY-MM-DD> (closed by /project)`156 to `progress.txt` (replacing the `[~] In progress` line), where `<YYYY-MM-DD>` is today's date.157 Then continue to routing (the "All milestones complete" row will show "Project complete").158- **Leave open** -- skip the write. Continue to normal routing (the "All milestones complete"159 row will still show "Project complete").160161Show a 1-line explanation before the prompt: "Gate 3 tracks milestone planning. Closing it162marks the milestone review phase officially complete."163164After `AskUserQuestion` resolves (regardless of which option the user chose), continue to165normal routing table evaluation.166167If the user chose **Close Gate 3**: use the Write tool to update the Gate 3 line in168`progress.txt`. Read the file first, replace `[~] Gate 3: Milestone Review In progress`169with `[x] Gate 3: Milestone Review Approved: <YYYY-MM-DD> (closed by /project)`. Read the170file back and confirm the update was applied correctly before proceeding to routing.171172## Error Handling173174- **Malformed `progress.txt`:** If the file is missing required headers or has corrupted175 entries, report the issue to the user. Suggest checking git history for a clean version.176 Do not attempt to repair the file.177- **Missing `milestone-status.txt`:** If a milestone directory exists but its178 `milestone-status.txt` is missing, warn the user but continue -- the milestone may be179 partially created. Show the warning inline in the status report.180- **Ambiguous user intent:** If the user's request is unclear, use `AskUserQuestion` to181 ask for clarification rather than guessing the intended action.182- **Empty project (post-bootstrap):** When all gates are pending, no milestones exist, and183 no spikes exist, display the empty project report format from `references/status-report-format.md`.184 The only valid recommendation is to run `/define`.185- **Interrupted bootstrap:** If `/project` is re-invoked after a failed bootstrap attempt186 (e.g., `progress.txt` exists but is empty or incomplete), treat the file as malformed and187 report the issue rather than attempting a second bootstrap.