krishpunjabi.com ~/skills

← all commands

/manager

/manager agents

Owns one task inside a worktree — briefs an implementer subagent, reviews its diff and reruns tests itself, restarts a fresh implementer from skilleddocs/HANDOFF.md when one stalls (≤3 rounds). Never pushes or merges. Use from pair, or from meta-orchestrator with shape pair.

Install

Install just this, from a clone of the repo. Anything it needs comes with it.

./scripts/install-skills.sh --skill manager   # bash, Git Bash, macOS, Linux
.\scripts\install-skills.ps1 -Skill manager   # Windows PowerShell

Needs: handoff-auto, kanban-setup, next, session-handoff, implementer, the guard-git hook (installed with it).

What it does

Owns one task end to end in a worktree.

  • Never implements itself: briefs an implementer, then reviews its work as if it didn't trust it.
  • maxTurns: 150.

How to invoke

Agent(subagent_type="manager", prompt=…)

You pass: - Working directory (absolute, usually a worktree on the task branch).

  • Task + acceptance checklist.
  • Rules (branch prefix, protected branch, commit style, CONTRIBUTING.md/AGENTS.md path).
  • max_rounds (default 3).
  • decisions (ask|assume, default ask).

How it works

  1. Orients read-only; confirms every file the task cites exists; detects the test command.
  2. Writes a ≤40-line brief (includes "if stuck, write skilleddocs/HANDOFF.md, commit only if TRACKING.md says so, stop").
  3. Spawns an implementer (not fork, no isolation) on the model it was given, else by size (trivial → haiku, small/medium → sonnet, large or risky → opus) with run_in_background unset so the call blocks.
    • Some Agent tool versions have no foreground mode. In that case, or if the call returns early, it never makes up a result or sleep-polls. It ends the turn with a plain-text status and lets the completion notification wake it.
    • Only with no notification path does it return INTERIM — implementer still running (callers must not act on it).
  4. Reviews every round itself, inline:
    • Commit scope, git diff <base>...HEAD, reruns tests + lint.
    • Checks that git diff --name-only <base>...HEAD holds no handoff files: never skilleddocs/HANDOFF.md. When handoffs are committed, nothing in the handoff folder (the one AGENTS.md/CLAUDE.md names, else skilleddocs/handoffs/). When they are untracked, nothing under skilleddocs/ or that folder.
    • Fixes one-liners; larger gaps go to the next round.
    • Never spawns reviewer subagents.
  5. Retries with a fresh implementer + skilleddocs/HANDOFF.md/findings, up to max_rounds; deletes HANDOFF.md once picked up (in a commit if tracked).

Design principles

  • Never implements, only briefs and reviews, treating the implementer's "pass" as a claim to rerun.
  • Review stays inline in its own context (no reviewer subagents, because nested fan-out stalls).
  • A stalled round restarts a fresh implementer from HANDOFF.md instead of stretching one context.

Shared context for these principles: Matt Pocock's video.

Use cases

  • One task inside a worktree for pair.
  • Each task of a meta-orchestrator run with shape: pair.
  • The fix brief after a swarm batch's review.

Tips

  • Pass the working directory as an absolute path; it is handed to the implementer verbatim.
  • Raise max_rounds only for tasks you expect to need several fresh starts.
  • An INTERIM report means the implementer is still running, so don't act on it.

Example

One issue through planner, manager and verifier, as an orchestrator (or you) calls them. The manager briefs and spawns its own implementer inside its turn, so only the manager's report comes back. You push and merge in between:

Agent(subagent_type="planner", prompt="~/code/myrepo; exclusions: label needs-design; order: priority label") (+7 lines)
Issue: #31 Add CSV export (checklist: 3 items) Key files: src/export.py, tests/test_export.py Constraints: none Branch: feat/issue-31-csv-export Gotchas: none Size, shape, model: small, pair, sonnet: narrow and well-specified Divide: no
Agent(subagent_type="manager", prompt="working directory: /home/you/code/_worktrees/myrepo-issue-31-csv-export; <the brief, verbatim>; prefix=feat; protected=main; max_rounds=3; never push or merge") (+7 lines)
Branch: feat/issue-31-csv-export, base 1a2b3c4, head 5d6e7f8 Commits: 5d6e7f8 feat: CSV export (#31) Tests: pytest, 118 passed; lint clean (run by me) Findings: none Rounds: 1 of 3 Unfinished: none Manual steps for caller: push, open the PR, merge
Bash(git push -u origin feat/issue-31-csv-export && gh pr create --fill) (+1 line)
https://github.com/you/myrepo/pull/44
Merged PR #44; saved the manager's report to skilleddocs/orchestrator/reports/.
Agent(subagent_type="verifier", prompt="skilleddocs/orchestrator/reports/<#31 report>; interview=park; review-done=yes") (+5 lines)
Verified by: 118 passed · CI run 9876543210 Findings: none Decided for you: none Manual steps for user: none 1. #28 Rework auth flow (unestimated, strong model: needs-design)

Prereqs

  • The implementer agent and handoff-auto skill installed.
  • Python 3.8+ (and Git Bash on Windows) for the guard hook.

You get back

  • Branch + base/head SHA.
  • Commits.
  • Tests (command + counts) and lint run by it.
  • Review findings and who fixed each.
  • Rounds used.
  • Assumed open A-n ids.
  • skilleddocs/HANDOFF.md path (or the last SHA that held it, if tracked) if unfinished.
  • Manual steps (e.g. the push).

Guard

Same guard-git.py hook as the implementer.

  • Never pushes, merges or opens PRs — the caller does.
  • gh is read-only (plus gh pr create), so card moves, issue comments and labels go to the caller as manual steps.
  • Never deletes links or worktrees either, and never a recursive delete through a linked node_modules/.venv — teardown is the caller's job.

Sample workflows

Source

Use cases & tips from the community