diff --git a/formulas/run-supervisor.toml b/formulas/run-supervisor.toml index 9efeefe..ceaf340 100644 --- a/formulas/run-supervisor.toml +++ b/formulas/run-supervisor.toml @@ -137,14 +137,15 @@ For each finding from the health assessment, decide and execute an action. **P3 Stale PRs (CI done >20min, no push since):** Do NOT read dev-poll.sh, push branches, attempt merges, or investigate pipeline code. - Instead, nudge the dev-agent via tmux injection if a session is alive: - # Find the dev session for this issue - SESSION=$(tmux list-sessions -F '#{session_name}' 2>/dev/null | grep "dev-.*-${ISSUE_NUM}" | head -1) - if [ -n "$SESSION" ]; then - # Inject a nudge into the dev-agent session - tmux send-keys -t "$SESSION" "# [supervisor] PR stale >20min — CI finished, please push or update" Enter - fi - If no active tmux session exists, note it in the journal for the next dev-poll cycle. + Instead, file a vault item for the dev-agent to pick up: + Write $OPS_REPO_ROOT/vault/pending/stale-pr-${ISSUE_NUM}.md: + # Stale PR: ${PR_TITLE} + ## What + CI finished >20min ago but no git push has been made to the PR branch. + ## Why + P3 — Factory degraded: PRs should be pushed within 20min of CI completion. + ## Unblocks + - Factory health: dev-agent will push the branch and continue the workflow Do NOT file vault items for stale PRs unless they remain stale for >3 consecutive runs. ### Cannot auto-fix → file vault item @@ -251,7 +252,6 @@ knowledge file in the ops repo: Knowledge files: memory.md, disk.md, ci.md, forge.md, dev-agent.md, review-agent.md, git.md. -After writing the journal, write the phase signal: - echo 'PHASE:done' > "$PHASE_FILE" +After writing the journal, the agent session completes automatically. """ needs = ["report"] diff --git a/supervisor/AGENTS.md b/supervisor/AGENTS.md index b2ea5e4..db162d0 100644 --- a/supervisor/AGENTS.md +++ b/supervisor/AGENTS.md @@ -31,8 +31,6 @@ No action issues — the supervisor runs directly from cron like the planner and Claude evaluates all metrics and takes actions in a single interactive session - `$OPS_REPO_ROOT/knowledge/*.md` — Domain-specific remediation guides (memory, disk, CI, git, dev-agent, review-agent, forge) -- `supervisor/supervisor-poll.sh` — Legacy bash orchestrator (superseded by - supervisor-run.sh + formula) **Alert priorities**: P0 (memory crisis), P1 (disk), P2 (factory stopped/stalled), P3 (degraded PRs, circular deps, stale deps), P4 (housekeeping).