net-kingdom/.claude/rules/worker-protocol.md
tegwick c63aa398d6 NK-WP-0058-T08 worker protocol and excerpt tool; T06 window watch (row O5), first use of the protocol
T08: .claude/rules/worker-protocol.md (imported by CLAUDE.md, pointed to from AGENTS.md) and
tools/contract-tests/excerpt.py: name the rows, hand every worker one excerpt, one owner per step, check
with the excerpt's tests. A test requires every table row to have details and a contract test (found O4).
T06: bounded-executor/window_watch.py flags or closes the write role when no run Job is active or recent;
stub tests; in the image. Built from the excerpt for O5, E1, C1, E8, E9, R2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Assistant: claude-code
Assistant-Model: opus
Assistant-Process: 943911@bnt-lap001
Assistant-Session: fc322940-1c8e-4bed-ab39-86cec99f23a0
2026-11-06 01:36:09 +01:00

1.4 KiB

Cross-repo worker protocol (NK-WP-0058-T08)

Applies when a change touches an interface on the bounded-execution path, or work is split across repositories or worker agents. On 2026-11-04, workers in two repos built competing seeders and used different Secret names.

  1. Name the rows. List the rows of docs/bounded-execution-contract-table.md the change touches. A new interface gets its row first: owner and source of truth, consumer, the exact contract, and the test that will cover it.
  2. Hand out one excerpt. Run python3 tools/contract-tests/excerpt.py <rows> and give every worker that excerpt verbatim. Names, paths, roles, payloads and exit codes come from it. A worker never invents a second name or a parallel script for a step that already has an owning script.
  3. One owner per step. A worker changes only its own repository's part. Another repository's part is a request to that owner, unless the founder has instructed otherwise; record the instruction.
  4. Check against the excerpt. Before reporting done:
    • run the excerpt's contract tests;
    • run make contract-test and make conventions-lint;
    • move a pin in contracts/owner-pins.json only to a pushed owner commit;
    • record in the workplan result which rows and excerpt the work used.
  5. Parallel workers use unique scratch file names and run State Hub syncs one at a time.