diff --git a/formulas/run-supervisor.toml b/formulas/run-supervisor.toml index ceaf340..9efeefe 100644 --- a/formulas/run-supervisor.toml +++ b/formulas/run-supervisor.toml @@ -137,15 +137,14 @@ 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, 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 + 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. Do NOT file vault items for stale PRs unless they remain stale for >3 consecutive runs. ### Cannot auto-fix → file vault item @@ -252,6 +251,7 @@ 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, the agent session completes automatically. +After writing the journal, write the phase signal: + echo 'PHASE:done' > "$PHASE_FILE" """ needs = ["report"] diff --git a/supervisor/AGENTS.md b/supervisor/AGENTS.md index db162d0..b2ea5e4 100644 --- a/supervisor/AGENTS.md +++ b/supervisor/AGENTS.md @@ -31,6 +31,8 @@ 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).