Tunal/ORCHESTRATOR.md
astar76 a994992c17 S000: workflow scaffold
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 08:55:46 -06:00

3.8 KiB

Orchestrator — Tunal

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/4X8YCk3cQjUGyuyCqGuU7v — 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 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//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 at most 2 sessions run at once (they share Cargo's target/); a plan that edits the workspace Cargo.toml members or the shared Theme/Motion token files 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 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.

Project-specific

  • 🧑 stops (relay to the user and wait): visual review at the end of phases 2, 3 and 6; the sudo prompt flow with a real password (phase 5); real iPhone / Android devices (phase 9); every C-library choice listed in CLAUDE.md §2.
  • Git is local only: never add a remote or push until the user says so.
  • Keep FEATURES.md in step: a plan that adds a feature updates its row.