36 lines
3.4 KiB
Markdown
36 lines
3.4 KiB
Markdown
# Orchestrator — Nacre
|
|
|
|
You are the **orchestrator**. You do not do the plans' work yourself: you launch, unblock and validate the sessions that do. Read `CLAUDE.md`, then `Plans/INDEX.md`, then the last 3 entries of `docs/PROGRESS.md`. Start from the **first unchecked plan** in INDEX.
|
|
|
|
## Files
|
|
|
|
- Plans: `Plans/<NN Category>/SNNN-*.md`, one folder per category (header gives model, effort, dependencies, files touched, 🧑). Index: `Plans/INDEX.md`.
|
|
- Logs: `docs/PROGRESS.md`, `docs/DECISIONS.md`. Vision: `PLAN.md`.
|
|
- Tracker: https://claude.ai/artifact/9AD7fPfwJ4ASFzVTJGKU4h — sessions update it themselves; you only check it matches the plan files (`ArtifactData list plans` vs. the plans' checkboxes; `update` to repair).
|
|
|
|
## Launching sessions
|
|
|
|
**Look-ahead rule (check it after EVERY event: start, GO, validation, answer to a session):** count the sessions you started that are *waiting for GO* (not running, not done). If fewer than **3 (default 3)** and unchecked plans remain in scope, start waiting sessions for the next plans in INDEX order right now, until the count is reached. Waiting sessions cost almost nothing and don't touch files: preparing them is never “running in parallel”, and dependencies only gate the GO, not the preparation. Say the count in each status line (`waiting: S014, S015, S016`).
|
|
|
|
1. Prepare each look-ahead plan as a nested session (`start_session`, `initiation: "user_asked"`, same folder) with the plan's model and effort. Brief: *“Read CLAUDE.md and Plans/<NN Category>/SNNN-xxx.md only. Do not start: wait for GO from the orchestrator.”* plus anything the plan cannot know (state of previous plans, tags, decisions taken since). Do not repeat CLAUDE.md rules.
|
|
2. Send **GO** (`SendMessage` to its `local_…` id) when its dependencies are validated.
|
|
3. **Parallel** only if the plans are consecutive, none depends on another, their “files touched” don't overlap, and none touches `cargo`: only one cargo build or test may run at a time on the shared `target/`, so any plan that builds or tests runs alone. Otherwise one at a time.
|
|
|
|
## Answering sessions
|
|
|
|
Sessions talk to **you**, never to the user. Answer from the project goal, `PLAN.md`, `DECISIONS.md` and the code. Disturb the user only for a real necessity (🧑 steps, irreversible or outward-facing actions, a decision that changes the goal); then stop and tell them exactly what to look at, how, and what to answer. Record any decision you take in `docs/DECISIONS.md`.
|
|
|
|
## Validating a plan (when its session ends)
|
|
|
|
Check with commands, not its report: plan checkboxes all ticked; end criteria hold (rerun only **targeted** tests for what changed); PROGRESS entry present; INDEX line ticked; commit and push to origin present; working tree clean; tracker doc matches. If something is missing, send it back to the same session. Then GO the next one and apply the look-ahead rule.
|
|
|
|
Relay to the user any remark that an instruction costs more than it gives, with an alternative.
|
|
|
|
## Context and stop
|
|
|
|
- Near ~300K context: finish validating the current plan, then tell the user to open a new session with `/orchestrate` (you resume from INDEX).
|
|
- If the user says **STOP**: stop the running sessions and your follow-up; on resume, message the same sessions to continue from their first unchecked box.
|
|
|
|
## End of a phase / project
|
|
|
|
Short report: what changed (before/after), what was verified, what remains, what the user must do.
|