agents: PM-orchestrated flow (@pm hub, @qa reviews, @pm/human merges) #69

Merged
ffaerber merged 1 commits from feat/pm-orchestrated-flow into main 2026-07-05 20:12:20 +02:00
Owner

Reworks the delegation/trigger choreography into the PM-orchestrated flow we speced.

Flow: issue → @pm plans (asks creator; autopilot skips) → dev builds PR → dev pings @pm on the issue → @pm hands to @qa → @qa reviews on the PR (recommends / BOUNCE:@dev, direct qa↔dev loop, max 3) → @qa APPROVE → verdict on the issue → @pm → normal: "ready to merge, @creator" (human merges); autopilot: @pm MERGE_PR.

Invariants: @pm never reads/comments on the PR (small context); @qa never merges; @pm is the only merger, and only under the autopilot label.

Changes

  • run-agent.sh — @pm = 3 phases (plan / hand-to-@qa / finalize); autopilot only drops the start gate + adds @pm MERGE_PR. @qa = reviewer (APPROVE/BOUNCE:@dev/HALT), identical in both flows.
  • publish.shpost_to()/trig()/resolve_pr() helpers + ISSN; @qa routes its reply to the PR (bounce) vs the issue (approve); @pm handles DELEGATE:@dev, DELEGATE:@qa, autopilot MERGE_PR; dev NEW=true → @pm, NEW=false → @qa. Strips APPROVE/HALT.
  • Tokens re-minted: TOKEN_PM +write:repository, TOKEN_QA → read-only.

Validated: bash syntax + logic review. Testing the full chain after merge.

Reworks the delegation/trigger choreography into the PM-orchestrated flow we speced. **Flow:** issue → @pm plans (asks creator; autopilot skips) → dev builds PR → dev pings @pm on the issue → @pm hands to @qa → @qa reviews **on the PR** (recommends / `BOUNCE:@dev`, direct qa↔dev loop, max 3) → @qa `APPROVE` → verdict **on the issue** → @pm → **normal:** "ready to merge, @creator" (human merges); **autopilot:** @pm `MERGE_PR`. Invariants: **@pm never reads/comments on the PR** (small context); **@qa never merges**; **@pm is the only merger**, and only under the autopilot label. **Changes** - `run-agent.sh` — @pm = 3 phases (plan / hand-to-@qa / finalize); autopilot only drops the start gate + adds @pm `MERGE_PR`. @qa = reviewer (`APPROVE`/`BOUNCE:@dev`/`HALT`), identical in both flows. - `publish.sh` — `post_to()`/`trig()`/`resolve_pr()` helpers + `ISSN`; @qa routes its reply to the PR (bounce) vs the issue (approve); @pm handles `DELEGATE:@dev`, `DELEGATE:@qa`, autopilot `MERGE_PR`; dev NEW=true → @pm, NEW=false → @qa. Strips `APPROVE`/`HALT`. - Tokens re-minted: `TOKEN_PM` +`write:repository`, `TOKEN_QA` → read-only. Validated: bash syntax + logic review. Testing the full chain after merge.
ffaerber added 1 commit 2026-07-05 20:12:06 +02:00
Rework the delegation/trigger choreography so @pm orchestrates end-to-end from
the issue thread while @qa reviews on the PR and never merges.

Flow: issue → @pm plans (asks creator; autopilot skips) → dev builds PR → dev
pings @pm on the issue → @pm hands to @qa → @qa reviews ON THE PR (recommends /
BOUNCE:@dev, direct qa↔dev loop, 3 max) → @qa APPROVEs → verdict on the ISSUE →
@pm → normal: tells creator "ready to merge" (human merges); autopilot: @pm
MERGE_PR. @pm never reads or comments on the PR (small context); @qa never merges.

- run-agent.sh: @pm prompt = 3 phases (plan / hand PR to @qa / finalize),
  autopilot only drops the approval gate + adds @pm MERGE_PR. @qa prompt =
  reviewer, ends with APPROVE / BOUNCE:@dev / HALT; identical in both flows.
- publish.sh: shared post_to()/trig()/resolve_pr() helpers + ISSN; @qa routes
  reply to PR (bounce) vs issue (approve) and fires @pm/@dev; @pm handles
  DELEGATE:@dev, DELEGATE:@qa (resolves the PR), and autopilot MERGE_PR; dev
  NEW=true fires @pm on the issue, NEW=false fires @qa on the PR. Strip
  APPROVE/HALT markers.

Tokens re-minted to match: TOKEN_PM gains write:repository (it merges now),
TOKEN_QA drops to read:repository (never merges).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
ffaerber merged commit 5ddad786f1 into main 2026-07-05 20:12:20 +02:00
ffaerber deleted branch feat/pm-orchestrated-flow 2026-07-05 20:12:20 +02:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: gitea/agents#69