Skip to content

Issue-217: Rearchitect monitor-prs as a dev_team-driven workflow - #231

Open
jodavis-claude wants to merge 1 commit into
mainfrom
dev/claude/Issue-217-rebased
Open

Issue-217: Rearchitect monitor-prs as a dev_team-driven workflow#231
jodavis-claude wants to merge 1 commit into
mainfrom
dev/claude/Issue-217-rebased

Conversation

@jodavis-claude

Copy link
Copy Markdown
Collaborator

Summary

  • Splits dev_team.py into a generic engine plus two leaf scripts (implement.py for the implement/fix task pipeline, monitor_prs.py for the new long-lived PR monitor) so each pipeline's Step subclasses/state map live separately from the shared state-machine/context-file infrastructure.
  • monitor_prs.py drives two new Mermaid workflow assets (monitor-stack-plan.md, monitor-pr-plan.md) that expose every real scripted operation (gh stack sync, event scanning, worktree bootstrap, rebase-cascade continuation, cleanup) as its own individually-failable state, replacing monitor-prs's previous flat, untested prose loop.
  • workflow-orchestrate gains a --script argument (symmetric with --workflow), a notify action verb for human-comment reactions (direct PushNotification, no agent spawn), item.context_file-aware dispatch routing (needed since monitor Steps act on a task's own context file, not the monitor's), a fix for needs_user_input when AskUserQuestion is unavailable to an Agent-spawned session (propagates via a new pending_user_question field instead), and a universal one-retry-then-hard-stop troubleshooter bound.
  • concurrent-orchestrate gets a matching two-pass check to notice a spawned child's pending_user_question, answer it, and respawn.
  • Also fixes a latent bug: merge_pending_deliverables() was never called against a task's own context file when fix-pr/resolve-rebase-conflict ran post-hand-off, so their scratch deliverables were silently never merged in.

Test plan

  • python3 -m pytest plugins/dev-team/skills/workflow-orchestrate/scripts/ — 409 passed

Splits dev_team.py into a generic engine plus two leaf scripts (implement.py
for the implement/fix task pipeline, monitor_prs.py for the new long-lived PR
monitor) so each pipeline's Step subclasses/state map live separately from
the shared state-machine/context-file infrastructure. monitor_prs.py drives
two new Mermaid workflow assets (monitor-stack-plan.md, monitor-pr-plan.md)
that expose every real scripted operation (gh stack sync, event scanning,
worktree bootstrap, rebase-cascade continuation, cleanup) as its own
individually-failable state, replacing monitor-prs's previous flat,
untested prose loop.

workflow-orchestrate gains a --script argument (symmetric with --workflow),
a "notify" action verb for human-comment reactions (direct PushNotification,
no agent spawn), item.context_file-aware dispatch routing (needed since
monitor Steps act on a task's own context file, not the monitor's), a fix
for needs_user_input when AskUserQuestion is unavailable to an Agent-spawned
session (propagates via a new pending_user_question field instead), and a
universal one-retry-then-hard-stop troubleshooter bound. concurrent-orchestrate
gets a matching two-pass check to notice a spawned child's pending_user_question,
answer it, and respawn.

Also fixes a latent bug: merge_pending_deliverables() was never called against
a task's own context file when fix-pr/resolve-rebase-conflict ran post-hand-off,
so their scratch deliverables were silently never merged in.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown

build-and-test: Python test results

Status: ✅ Passed

Test log

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.

2 participants