Skip to content

Add Manager/Worker orchestration design decision entry#42

Open
gering wants to merge 6 commits into
mainfrom
task/design-manager-worker-orchestration
Open

Add Manager/Worker orchestration design decision entry#42
gering wants to merge 6 commits into
mainfrom
task/design-manager-worker-orchestration

Conversation

@gering

@gering gering commented Jul 18, 2026

Copy link
Copy Markdown
Owner

Summary

  • Design/spike output for evolving work-system into a coordinated Manager/Worker model (user direction 2026-07-15).
  • Deliverable to main: one decision knowledge entry (an ADR). The 7 spawned implementation tasks live in the local, untracked backlog (tasks/*.md by convention) — not in this PR.
  • Gate verified live (herdr 0.7.0): agent_status IS pollable for agent-start tabs (idle|working|blocked|done), hook-integration-based; agent read returns clean TUI text — resolving the previously-UNVERIFIED agent-status flag.

Changes

  • +.claude/knowledge/architecture/manager-worker-orchestration.md — the decision record: the Manager/Worker/Lane model (identity = worktree path), the cross-agent constraint (workers may be claude/codex/grok; only claude+codex are hook-integrated → git/PR is the one uniform bus, contract is agent-agnostic, claude-first), the .mailbox/ protocol (outbox+inbox single-writer, offset-drain, Claude Code hook push, herdr idle-wake as the only residual push), milestone-defined worker autonomy, the deterministic merge sequencer, and roadmap-as-derived-view co-equal with the GitHub board.
  • ~.claude/knowledge/_index.md — index the new entry.

Readiness

  • ✅ Structure check (scripts/check-structure.py) — 0 errors
  • ➖ Version / Changelog / Build / Lint — N/A (knowledge-only, no plugin bump, declarative repo)
  • ✅ Knowledge — this PR is the knowledge entry
  • ✅ Rebased onto latest main (da19bee)

Test plan

  • python3 scripts/check-structure.py stays green
  • Entry reads coherently and cross-links resolve (skill-composition, idempotent-scaffolding, herdr-kickoff-automation, herdr-tab-glyphs)

🤖 Generated with Claude Code

gering and others added 6 commits July 18, 2026 15:07
Design/spike output for the coordinated Manager/Worker model:

- Gate verdict (verified live, herdr 0.7.0): agent_status is pollable for
  agent-start tabs (idle|working|blocked|done), hook-integration-based;
  agent read returns clean TUI text. Resolves the previously-UNVERIFIED
  agent-status flag.
- Cross-agent constraint: workers may be claude/codex/grok; only claude+codex
  are hook-integrated (status + session UUID), grok is TUI-scrape-only. git/PR
  state is the one uniform bus; the contract is agent-agnostic.
- The .mailbox/ protocol: outbox+inbox (single-writer, single-sequencer),
  offset-drain, Claude Code hook push (Stop/SessionStart/Notification),
  herdr idle-wake as the only residual push.
- Milestone-defined worker autonomy, deterministic merge sequencer,
  roadmap-as-derived-view co-equal with the GH board.

Spawns 7 implementation task files (local backlog): add-lane-registry,
add-lane-mailbox, add-manager-watch-loop, extend-worker-autonomy,
add-merge-sequencer, add-roadmap-skill, add-mailbox-statusline.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Two design additions (2026-07-19):
- ready-to-close becomes a handoff report {summary, follow_ups, deploy,
  updates, learnings} so the worker's fresh context transfers to the
  Manager (→ /define, /curate, deploy-from-main-post-merge).
- Mailbox moves to a central ~/.agent_messaging/ store (id = encoded
  absolute path): unlocks a broadcast channel + Manager presence registry
  for cross-Manager / system-wide coordination, and makes never-commit
  automatic. Broadcast ships as a follow-up task (add-agent-broadcast);
  aligns with plugin-settings-system's [related_projects] peering.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Prior-art research (2026-07-19): the mailbox is the recognized inbox/outbox
pattern; AMQ (avivsinai/agent-message-queue) already implements our design
(Maildir delivery, .agent-mail store, swarm/agent-teams, federation, presence).

Decisions:
- name the store ~/.agent-mail/ (community convention)
- fix mechanics: Maildir (atomic rename, lockless, tmp/new/cur) + a
  CloudEvents-aligned envelope; align concepts with A2A for future interop
- add spike-agent-mail-substrate (decide adopt-AMQ-adapter vs build-thin)
  before add-lane-mailbox; document the protocol in the work-system README

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
`amq swarm`'s self-reported claim/block/complete is NOT adopted as a
task-state authority — it fights the derived-from-git/PR lanes model.
AMQ owns message transport; herdr-derived lanes own state.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LTZx9DqrXPXQFoTrCvcJmD
- `amq swarm` explicitly out of scope: it bridges Claude Code's native
  Agent Teams (~/.claude/tasks/), a competing orchestration substrate —
  we use only AMQ core messaging (send/inbox-outbox/who/receipts/dlq/wake).
- Drop the thin-Maildir fallback: AMQ is a prerequisite (brew install),
  absent degrades to the git/PR floor + manual relay (already the base).
- Envelope is AMQ-native, not CloudEvents; CloudEvents/A2A stay conceptual
  alignment for a future HTTP bridge.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LTZx9DqrXPXQFoTrCvcJmD
Answers the obvious reviewer question: CC's native Agent Teams is
Claude-only, no worktree isolation, self-reported status, no
PR/merge lifecycle — complementary, not competing. Note the shared
Maildir envelope and the TeammateIdle / auto-unblock ideas worth reusing.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LTZx9DqrXPXQFoTrCvcJmD
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.

1 participant