From 7b84e325b0c44e98f7cae87f4f43623edc560987 Mon Sep 17 00:00:00 2001 From: giles knap Date: Sat, 10 Oct 2026 20:48:17 +0000 Subject: [PATCH] orchestrate: lint the state file from the hooks, script the Now/Done edits and the updated= marker Adds a state.md lint run from the hooks (#108), rewrites the skill's state-file rules to one row per item with dated Done lines (#110), has goal.sh write the updated= marker (#111) and adds goal.sh now/land helpers (#112). Stacked on #114. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01AJKFfYT7qdSfhkZGj6syCo --- docs/how-to/use-orchestrate-mode.md | 27 +++ .../orchestrate/.claude-plugin/plugin.json | 2 +- plugins/orchestrate/README.md | 3 +- plugins/orchestrate/scripts/goal.sh | 92 ++++++++++- plugins/orchestrate/scripts/lib.sh | 27 ++- plugins/orchestrate/scripts/session-start.sh | 3 +- plugins/orchestrate/scripts/state-lint.sh | 144 ++++++++++++++++ plugins/orchestrate/scripts/stop.sh | 21 ++- .../orchestrate/skills/orchestrate/SKILL.md | 39 ++++- .../orchestrate/references/state-file.md | 8 +- tests/fixtures/orchestrate/log-drifted.md | 6 + tests/fixtures/orchestrate/state-drifted.md | 44 +++++ tests/orchestrate_plugin.sh | 154 +++++++++++++++++- 13 files changed, 546 insertions(+), 24 deletions(-) create mode 100755 plugins/orchestrate/scripts/state-lint.sh create mode 100644 tests/fixtures/orchestrate/log-drifted.md create mode 100644 tests/fixtures/orchestrate/state-drifted.md diff --git a/docs/how-to/use-orchestrate-mode.md b/docs/how-to/use-orchestrate-mode.md index a58c7c33..7665af78 100644 --- a/docs/how-to/use-orchestrate-mode.md +++ b/docs/how-to/use-orchestrate-mode.md @@ -83,6 +83,33 @@ new session) and an agent listed under `Now` has no report yet, the orchestrator is told, so an agent lost to a crash is noticed rather than assumed to be running. +## The state file + +The goal's `state.md` is written by the orchestrator only, in one format: + +- `## Now` lists what is running, one line per agent, and holds + `- (nothing running)` when idle. +- `## Done` is the last section: one line per finished item, `- YYYY-MM-DD HH:MMZ `, + appended in time order. Agent returns and review rounds go to the log. +- `## Decided` holds rulings only, each ending `(, YYYY-MM-DD)`. + +The orchestrator makes the most common edits with `goal.sh` rather than by +hand: `goal.sh now ''` records a launch, `goal.sh land