Skip to content

feat: autonomous orchestrators p3d — shift digest, proof packets, one comment - #569

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/autonomous-orchestrators-p3d
Nov 4, 2026
Merged

Jammy2211 merged 1 commit into
mainfrom
feature/autonomous-orchestrators-p3d

Conversation

@Jammy2211

Copy link
Copy Markdown
Contributor

Closes #568. Phase 3d of the autonomous-orchestrators epic — closes phase 3. Read with the PyAutoMind PR (merge that one first).

What changes

  • _digest.py (new): build writes the ## Digest in the PyAutoMind/batches/AGENTS.md format. Brief work and backlog picks are kept apart, and each pick carries the brief rule it was picked under. Every started task gets one proof packet, quoted verbatim from <task>.proof.md, or a stub saying the worker wrote none. Every counter is printed, including zeros. validate is the digest half of batch brief --check. pr_health makes one read-only gh pr checks call per PR (exit 0 → HEALTHY, 8 → RUNNING, otherwise FAILED or NO-CHECKS).
  • _brief.py: pick_reason returns one of named task, scoped epic|tag|tier <x> or backlog: fill-idle. The scoped match is factored into _scoped_match, which scope now uses as well. check now validates any ## Digest the record carries.
  • _orchestrator.py:
    • Each spawn records picks[task] = {prompt, why, tier}.
    • The reap keeps a worker's .done lines as outcomes and moves its proof.md to <slot>/proofs/. Before this change the .done file was deleted, taking the PR URLs with it.
    • The first tick after review-at: runs finish_shift. It writes digest.md, appends the digest to the record through the one Mind writer, and writes digest.html only under packet: yes. It then exclusive-creates digest.posted before making one gh issue comment on the brief's issue:.
    • A crash between the marker and the post leaves no comment, never two. A failed post is not retried. Nothing is read back from GitHub.
    • STOP still wins after review-at.
  • _mind_writer.queue_op: bin/shift_ledger.py now uses it, and so does the orchestrator.
  • batch digest --record <file> prints the digest and writes nothing.
  • worker_template.md: workers write <task>.proof.md and use merged <url> lines.
  • Docs: conductor AGENTS.md and skills/batch/batch.md.

Departure from the approved plan: merges is counted from workers' merged <url> lines, not from batch collect. The watcher's network surface only allows gh pr checks, which cannot tell it whether a PR merged.

API Changes

None to the libraries. Two new things inside the organ: the batch digest verb, and the <task>.proof.md and merged <url> worker contract.

Witness

tests/test_orchestrator_digest.py — 23 passed
  brief work vs backlog picks with reasons; one packet per task + honest stub; every counter
  brief --check accepts a whole digest; refuses a missing counter / a pick without why: / a task without a packet
  posted once, second tick and a direct finish_shift post nothing; a failed post is never retried
  the digest lands in batches/<record>.md on Mind main through the one Mind writer (real git), canonical tree untouched
  control: recording no pick reason → 3 failures
LIVE: sandbox issue PyAutoLabs/PyAutoMind#530 — first tick: {"action": "digest", "post": {"posted": true}}
      (real gh pr checks read PyAutoBrain#567 HEALTHY); second tick: idle; issue has exactly 1 comment
full suites (PYAUTO_* unset): Brain 1512 passed, 1 skipped, 2 failed (test_prompt_budget [50001-*], same on main) · Mind 712 passed
tenant firewall (organ code) --root <worktree>: OK

Tier: judge — merge mode: human /prm. Heart YELLOW (autofit_test MultiStartResumeNaNCounters.py timeout; no release rehearsal) acknowledged by the human at ship.

🤖 Generated with Claude Code

… comment

The first tick after review-at writes the ## Digest (brief work vs backlog
picks with the brief rule each was picked under, one proof packet per started
task or an honest stub, every counter) into the record through the one Mind
writer and posts it once on the brief's issue. digest.posted is created
exclusively before the post: a crash leaves no comment, never two; nothing is
read back. batch digest --record prints it; batch brief --check refuses a
digest missing a section, counter, pick reason or packet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Jammy2211
Jammy2211 merged commit 67d1087 into main Nov 4, 2026
2 checks passed
@Jammy2211
Jammy2211 deleted the feature/autonomous-orchestrators-p3d branch November 4, 2026 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: autonomous orchestrators p3d — shift digest, proof packets, one comment

1 participant