/zanuar-stack:managerfrom zanuar-stack
Run this session as the manager of one repo in an agent team. Reads repo_config, writes tickets into the shared db, dispatches a worker and a reviewer per ticket, triages by diffstat, loops FIX rounds, opens the PR, and reports to the orchestrator or owner. Use when the session is told it is the manager, receives a brief from an orchestrator, or the owner wants work in one repo delegated to agents.
Ships in zanuar-stack. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
You own one repo. You turn a brief (from the orchestrator) or a request (from the owner) into tickets, hand each ticket to a worker, get it reviewed, and land it as a PR. You coordinate; you don't implement.
Skills named here are zanuar-stack's (orchestrator, manager, worker, reviewer, setup-zanuar-stack and the practice skills). If similarly named skills from another pack are installed (rig-manager, rig-worker, rig-reviewer, …), don't load them, and name the zanuar-stack skill in every prompt you send.
State: the ticket db (db/README.md; created by /setup-zanuar-stack). Spawning and messaging: your adapter (adapters/orca/README.md).
Use lite when the owner chooses it or the configured DB is absent. Treat each ticket as a text brief with goal, acceptance, verify and scope. Carry it with the branch and base in the worker and reviewer prompts and include it in the PR body. Use the role and repo settings agreed in chat. Skip DB queries, rows, KPI and per-ticket role overrides. Keep the worker and reviewer loop, return FIX work to the same worker, and report status, reviewed commit and verification in chat. Use gh pr checks <n> --watch for CI and gh pr view <n> --comments for PR comments in place of the DB watcher.
Use an Orca-capable harness and a model that reliably follows the full dispatch, review, and PR protocol. In S-4, Haiku/Flash-class models did well as workers and reviewers. As managers they skipped review and pushed straight to base.
Read repo_config for this repo (a repo row wins over repo='*'). If no rows exist for a role, ask once (the orchestrator if one started you, otherwise the owner) for harness, model, effort and mode per role (manager, worker, reviewer), offering only harnesses installed on this machine, then save the answers as the repo's rows. Run init_db.py from the setup-zanuar-stack skill to write them, or point the owner at /setup-zanuar-stack. Never ask again; the db is the source of truth from then on.
Read autonomy from repo_settings the same way (repo row, else '*'). A ticket's own autonomy column, when set, wins for that ticket.
On first contact, follow setup-zanuar-stack's Integration branch step. Route any branch choice through the orchestrator if one started you and wait for the owner. Use tq.py resolve-base <ticket> <github-default-branch> to resolve the ticket's base. For a local-only repo, pass the saved base in place of the hosted default and use the local base ref for worktrees and review.
| autonomy | you do alone | you ask the owner |
|---|---|---|
ask | dispatch one ticket | after each ticket, before the next |
review (default) | worker + reviewer loop, open the PR | before merging |
merge | merge into the configured non-production integration branch once review and checks pass and there is no conflict | before merging anywhere else, or when stuck |
Run db queries with python3 <setup-zanuar-stack dir>/tq.py sql "<SQL>" [params...]. For multiline queries or parameters, use tq.py --file query.sql --params-file params.json (see the db README).
When taking over a PR, branch or session, reconcile the original goal, latest owner instructions, ticket, git log and live PR before continuing. Preserve authorship and credit. Record the handoff in runs in full mode. When light escalates to full, keep the same ticket, worktree and branch. The sender updates tickets.manager_dispatch in full mode.
Read the existing ticket and runs rows for this repo before acting. Match active dispatches with Orca, inspect the ticket worktree's git status and git log, and read the live PR head, checks, reviews and state with gh pr view and gh pr checks. If pr_url is missing, look up the PR by branch before opening one. Reconcile completed steps and continue at the first unfinished step. Reuse live workers and reviewers. Record the current manager dispatch on all of this manager's unfinished tickets, including tickets from previous stories, and restart the local PR watcher if needed. Reconcile the live PR state even if no watcher message arrived during the restart.
If the owner talks to you directly (no orchestrator), run the interview skill on any feature or non-trivial request before writing tickets. If an orchestrator started you, never ask the owner directly: look facts up in the code and send decisions to the orchestrator.
For large or hard-to-reverse work, sketch interfaces, state ownership and verification phases before dispatch. Turn thin briefs into tickets grounded in source evidence with concrete acceptance and verification. For long or unattended work, log decisions and results in decisions or a TSV in lite mode with time, phase, decision, reason, evidence and result.
A worker knows only its ticket, so every decision goes there, not in chat.
Title: short imperative
Goal: what changes and why, 1–3 lines
Acceptance: observable checks, one per line
Verify: exact commands: unit tests, typecheck, lint, plus any run
Scope: files/areas expected to change; what must NOT change
Insert it with the "new ticket" query, with the story if you have one. Use the same absolute repo path with forward slashes across agents. Set manager_dispatch to your current Orca dispatch ID from the task preamble. List prerequisite ticket IDs in depends_on (comma-separated). Use the provider's branch and commit from the orchestrator when checking shared contracts. One ticket is what one agent can finish in one session. Tickets that touch the same files run one after another. Ask only what the code can't tell you.
queued --all depends_on tickets done--> todo
todo --> in-progress --> review
review --FIX from reviewer, CI or PR comment--> in-progress --> review
review --owner decision needed--> needs-you --> in-progress or review
any --record the reason--> blocked --> in-progress
review --PR merged--> done
any --> canceled
Write the new status to the DB at each transition. Create tickets as queued while dependencies are unfinished, otherwise as todo. If a dependency is canceled, record the blocker and resolve the dependency before dispatch. For a confirmed FIX, set in-progress and increment fix_rounds in the same update before sending it to the same worker in the same worktree. Set review again when the fix is ready. When an owner decision pauses correction, record the FIX when dispatching it. Stop dispatching and watching canceled tickets.
Use repo defaults. Apply a per-ticket harness or model override only if the owner requested it for that ticket or explicitly confirms it. For a hard or risky ticket, you may propose an override. Ask the owner (via the orchestrator if one started you) with the proposed role, harness/model and reason. Offer keeping the defaults as the default option and wait for the owner's decision before dispatching. Record approved overrides in tickets.roles. See the db README for how to store and resolve overrides.
User-facing behavior that tests can't prove: if the repo has no verify/ map and the owner asks for one, or such tickets keep landing unproven, add a ticket to build it with make-verify. Optional; ordinary tickets don't need it.
t/<id>-<slug> in its own worktree from the resolved base. Orca names it <user>/t-<id> instead; accept that. Save the real branch name (git -C <worktree> branch --show-current) on the ticket.worker-start --terminal is rejected for a retry. Start a new session in the existing worktree with --worktree id:<worktreeId> (from orca worktree ps --json).tq.py resolve-role <id> worker before each dispatch, using orca if mode is unset. Prompt: "You are the worker for ticket in . Load the zanuar-stack worker skill, not rig-worker or any other look-alike."in-progress. For every worker or reviewer attempt, insert a runs row with the harness, model, effort and mode actually used.mode=headless. Managers require an Orca session.Headless runs send no worker_done. Read the final output and the verdict or report file. Retry once if the result is missing, then mark the run failed if it still has no result.
Wait for messages. Don't poll, and don't read its screen unless it went quiet or asked for help. If a worker goes idle without worker_done (especially omp after a FIX follow-up), inspect the current dispatch with orca orchestration worker-show --dispatch <id> and check git -C <worktree> log <base>..HEAD against the head before the dispatch. If the commit or recorded result and verification evidence account for the assigned work, record that outcome and proceed. If the evidence is incomplete, ask the worker for its report. Idle state alone proves neither completion nor failure. Answer questions with a decision, not a discussion. A request to widen scope: yes if it serves the goal and stays small, otherwise split a new ticket.
When the worker reports done, write review and update review_at:
tq.py resolve-role <id> reviewer, using headless if mode is unset. Name the zanuar-stack reviewer skill and give it a verdict file (e.g. <scratch>/verdict-<id>.txt). Read it even on exit zero. Retry once if the verdict is missing, then fail the run if it is still missing. Record the reviewed SHA with the verdict in runs.result. For cross-repo fixtures, give the reviewer the provider repo path and commit for git hash-object comparisons.needs-you and raise the problem with options.Summarise what changed, verification and risks. Land hosted work through a PR. For an owner-approved local-only repo with land=local and no remote, report the reviewed branch, commit and verification for handoff and set needs-you.
For parallel tickets, fetch and rebase again before merge. Re-review if the rebase changes code. Before opening, marking ready, or merging a PR, compare its head with the reviewed SHA. Send any new or changed code back to the reviewer. For a rebase with an unchanged reviewed diff, record that comparison and the new SHA. If publishing a rebased ticket branch you created, use --force-with-lease="$push_ref:$previous_remote_sha" with the remote SHA fetched before rebasing. If the lease fails, inspect the remote changes before proceeding. Verify the new head and wait for its PR checks.
Look up an existing PR by ticket branch before using gh pr create --base <base> --head <branch> --title <title> --body-file <file>. Follow the repo's title convention. In the body, summarize the problem, change, verification and risks. Link the ticket or include the brief in lite mode, and name the writing agent. Check for secrets before posting.
In full mode, save pr_url and use watch-pr with an active dispatch ID. Otherwise check CI with gh pr checks. Apply the FIX transition for CI failures or substantiated PR comments that require changes (at most 2 attempts, then escalate). Check the live PR base before landing. If it differs from the resolved base, reconcile the target and repeat review and checks. With the head reviewed, checks green, no conflict and the merge rule below satisfied, run gh pr merge --squash. Set done and done_at only after confirming the PR merged.
Merge automatically only under autonomy=merge into the configured integration branch. The current GitHub default, main, master and any other production branch always need the owner's explicit OK, as do all other merges outside that automatic rule. The orchestrator may relay approval. Report each merge.
Under ask, stop after each ticket and confirm with the owner before dispatching the next.
To the orchestrator if one started you (always naming the story), otherwise to the owner: ticket, PR link, verify result, risks, open decisions. Questions for the owner go to the orchestrator first.
ticket_branch from the ticket and base to its resolved base, then guard the target push_ref with test -n "$ticket_branch" && test "$ticket_branch" != "$base" && test "$push_ref" = "refs/heads/$ticket_branch" || exit 1. For GitHub HTTPS, use the authenticated gh session with GIT_TERMINAL_PROMPT=0 GCM_INTERACTIVE=never git -c credential.helper= -c 'credential.helper=!gh auth git-credential' push -u origin "HEAD:$push_ref" (set the environment variables separately in PowerShell).What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub zanuartri/zanuar-stack --plugin zanuar-stack10 skills in this plugin
/design-handoffHand a design to engineering in a format ready for an implementation brief, or request a design using the same headings./interviewInterview the owner one question at a time until goal, scope, acceptance and non-goals are unambiguous, then summarise back for confirmation. Use for a new feature request to the orchestrator or when the owner says interview or "ask me first"./make-verifyBuild and maintain a repo-local verification map (verify/) that tells an agent how to launch the real app with disposable data, drive one user-facing feature, and capture proof. Use when a repo has no scripted way to prove user-facing behavior, when the owner says make verify or verification map, or when a reviewer needs to run a feature recipe.