Epic-level task supervisor — owns an epic from decomposition through integration. Survives interruption. All state lives in the task file.
From aops-coworknpx claudepluginhub nicsuzor/aopsThis skill uses the workspace's default tool permissions.
instructions/decomposition-and-review.mdinstructions/knowledge-capture.mdinstructions/supervision-loop.mdinstructions/worker-dispatch.mdDesigns and optimizes AI agent action spaces, tool definitions, observation formats, error recovery, and context for higher task completion rates.
Enables AI agents to execute x402 payments with per-task budgets, spending controls, and non-custodial wallets via MCP tools. Use when agents pay for APIs, services, or other agents.
Compares coding agents like Claude Code and Aider on custom YAML-defined codebase tasks using git worktrees, measuring pass rate, cost, time, and consistency.
Own an epic from start to finish. Decompose, dispatch individual tasks via
polecat run, monitor progress, react to failures, ensure integration. The
supervisor stays responsible for the work — it doesn't walk away after dispatch.
See [[instructions/supervision-loop]] for the core orient→act→checkpoint loop.
No external state files, no environment-specific paths, no "check the log." Everything the supervisor needs to resume is in the epic's task body. The task file is a resumable work log — the next supervisor instance (possibly on a different machine, possibly a different agent) reads it and knows exactly what's happening.
Every invocation discovers what's available. The supervisor adapts dispatch strategy to what exists right now — not what existed last time. A session that starts on a Mac with local polecat and moves to a crew container with only Docker and gh is normal, not exceptional.
Write state to the task body and commit BEFORE dispatching. If killed between checkpoint and action, the next instance sees pre-action state and retries safely. Record-then-fire, not fire-then-record.
Every supervisor action is safe to repeat. Dispatching a task that's already in_progress → skip. Checking a PR that's already merged → record and move on. The worst case of a conflict is wasted work, not corruption.
The supervisor delegates execution but never delegates judgment. Methodology choices, citation accuracy, and anything published under the user's name require human decision points, surfaced clearly in the task file as pending decisions.
The supervisor is NOT a pipeline — it's a loop that enters at whatever phase the epic needs on each invocation.
ORIENT → DECOMPOSE → DISPATCH → MONITOR → REACT → INTEGRATE → COMPLETE
| Phase | What happens | Instructions |
|---|---|---|
| Orient | Read epic, verify child statuses, decide what to do next | [[instructions/supervision-loop]] |
| Decompose | Break work into PR-sized subtasks | [[instructions/decomposition-and-review]] |
| Dispatch | Send individual tasks to workers via polecat run | [[instructions/worker-dispatch]] |
| Monitor | Check PKB task statuses and GitHub PRs | [[instructions/supervision-loop]] |
| React | Handle failures, conflicts, scope changes | [[instructions/supervision-loop]] |
| Integrate | Verify, merge, sync | [[instructions/supervision-loop]] |
| Complete | Update epic, capture knowledge, file follow-ups | [[instructions/knowledge-capture]] |
Individual task dispatch only. No batch spawning.
# Claude worker
polecat run -t <task-id> -p <project>
# Gemini worker
polecat run -t <task-id> -p <project> -g
# Jules (async, Google infrastructure)
aops task <task-id> | jules new --repo <owner>/<repo>
The supervisor decides WHICH task to dispatch next based on priority, dependencies, and capacity — then dispatches one at a time.
See [[instructions/worker-dispatch]] for pre-dispatch validation, worker selection, and dispatch protocol.
PRs arrive from workers (polecat branches, Jules PRs). The
pr-review-pipeline.yml GitHub Action handles automated review. Human
merges via GitHub UI or auto-merge for clean PRs.
PR review pipeline (pr-review-pipeline.yml) has three jobs:
Pipeline limitations:
.github/workflows/) cannot get pipeline
review due to OIDC validation (workflow content must match default branch).
These PRs need manual review and admin merge.Merge flow:
gh pr merge <PR> --squash --admin --delete-branch for PRs
that can't get pipeline approval (workflow PRs, urgent fixes).Task completion on merge: When a PR merges, a GitHub Action parses the
task ID from the branch name (polecat/aops-XXXX) and marks the task done.
This closes the loop without supervisor involvement.
Jules PR workflow: Jules sessions show "Completed" when coding is done,
but require human approval on the Jules web UI before branches are pushed
and PRs are created. Check session status with jules remote list --session.
Fork PR handling: When a bot account pushes to a fork rather than the base
repo, CI workflows must use head.sha for checkout instead of head.ref.
Autofix-push steps should be guarded with head.repo.full_name == github.repository.
External triggers that start the supervision loop.
Configuration: See [[WORKERS.md]] for runner types, capabilities, and sizing defaults — the supervisor reads these at dispatch time.
| Hook | Trigger | What it does |
|---|---|---|
queue-drain | cron / manual | Checks queue, starts supervisor session |
stale-check | cron / manual | Resets tasks stuck beyond threshold |
pr-merge | GitHub Action | PR merged → mark task done |
aops-fdc9d0e2.polecat run -t <task-id> -p <project> # claude
polecat run -t <task-id> -p <project> -g # gemini
aops task <task-id> | jules new --repo <owner>/<repo> # jules
polecat list # active polecats
gh pr list --state open --limit 20 # open PRs
polecat reset-stalled --hours 4 # reset hung tasks
polecat sync # sync mirrors after merging
| Signal | Action |
|---|---|
| Reasonable adds/dels, targeted files | gh pr merge <N> --squash --delete-branch |
| Code already in main (stale branch) | gh pr close <N> --comment "Stale branch" |
| Massive deletions (stale mirror) | gh pr close <N> --comment "Repo nuke" then polecat sync |