watchdog: signal handoffs off claim()/review() commit prefixes (robust) + codify the convention
Replaces the brittle markdown prose-match ("Gate: … CLAIMED, awaiting Adversary") with detection of
the loops' conventional commit prefixes on origin/main: a new `claim(...)` commit pings the
Adversary; a new `review(...)` commit pings the Builder. Edge-triggered on the origin/main SHA
(append-only — no force-push), no file parsing, can't mis-route. The loops already use these
prefixes consistently; codified as a load-bearing contract in plan.md §6.1 + both prompts so it
stays reliable. INBOX detection unchanged (pushed-state, file-routed).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
+11
-5
@@ -637,11 +637,17 @@ its own pacing. To make concurrent writes conflict-free:
|
||||
- **Git discipline (both loops, every write):** `git pull --rebase` before editing, make the
|
||||
smallest change, commit, `git push`. On a rebase conflict, it will be inside the *other* agent's
|
||||
file/section only if a rule was broken — re-pull and keep to your own files. Never `--force`.
|
||||
- **Gate handshake via STATUS.md.** When the Builder believes a milestone gate is met, it sets in
|
||||
`STATUS.md`: `Gate: <Mn> — CLAIMED, awaiting Adversary` and stops advancing past it. The
|
||||
Adversary, on its next wake, sees the claim, runs the acceptance check cold, and writes the
|
||||
verdict to `REVIEW.md` (`<Mn>: PASS @<ts>` with evidence, or `FAIL` + an `[adversary]` item).
|
||||
The Builder only proceeds past the gate after seeing `PASS` in `REVIEW.md`.
|
||||
- **Gate handshake via STATUS.md + commit-prefix signalling.** When the Builder believes a milestone
|
||||
gate is met, it sets in `STATUS.md`: `Gate: <Mn> — CLAIMED, awaiting Adversary`, **commits it with a
|
||||
`claim(...)` prefix**, and stops advancing past it. The Adversary runs the acceptance check cold and
|
||||
writes the verdict to `REVIEW.md` (`<Mn>: PASS @<ts>` with evidence, or `FAIL` + an `[adversary]`
|
||||
item), **committed with a `review(...)` prefix**. The Builder only proceeds past the gate after
|
||||
seeing `PASS` in `REVIEW.md`.
|
||||
- **The watchdog signals the handoff off these commit prefixes** (not by parsing prose): a new
|
||||
`claim(...)` commit on origin/main pings the Adversary; a new `review(...)` commit pings the
|
||||
Builder. So the prefixes are **load-bearing** — a gate claim MUST be a `claim(...)` commit and a
|
||||
verdict MUST be a `review(...)` commit, or the counterpart isn't promptly woken (it falls back to
|
||||
its slower self-poll). STATUS/REVIEW remain the durable source of truth; the prefix is the signal.
|
||||
- **DONE handshake.** Builder may write `## DONE` to `STATUS.md` **only** when `REVIEW.md` shows a
|
||||
PASS dated within 24h for every D1–D10. The Adversary can write `## VETO <reason>` to
|
||||
`REVIEW.md` at any time, which forbids DONE until cleared.
|
||||
|
||||
Reference in New Issue
Block a user