Field manual · 11

Team mode and planning

The plan, the deterministic critic, role-based team tasks, blocked_by dependencies, write scopes, delegation prompts, and what to do when an agent stalls.

One agent can run an engagement. A team can run it faster, provided the work is written down, ordered, scoped and checked. The plan is the contract; the team board is who is doing what; the critic is the part that refuses to lie.

The plan: objective, steps, budget

pentest_plan manages one plan at state.plan. Actions are create, status, update, consume, critic and close. create needs an objective and accepts steps plus optional maxTools, maxTokens, maxMinutes and maxParallel. Another plan cannot be created while one is active — close the old one first.

Each step carries phase, objective, owner, status, tools, deliverable and a budget. Statuses are pending, in_progress, done, blocked and skipped, and transitions are constrained: a step gets to done only from in_progress, and done is terminal. maxParallel is enforced when you start a step, not advised. A plan starts as draft and becomes active on the first status change or usage record. Percent complete counts done plus skipped over the total — a reasoned skip is progress, a silently dropped step is not.

Budgets are advisory ceilings in the honest sense: consume only records work that happened (tools, tokens, minutes) and the critic reports an overrun instead of clamping it. Defaults are 1000 tools, 2,000,000 tokens, 480 minutes and two parallel steps; the hard caps are 50 steps, 10,000 tools, 50,000,000 tokens, 20,160 minutes and eight parallel steps.

{ "action": "create",
 "objective": "Prove /ping + privesc",
 "maxParallel": 2,
 "steps": [
  { "phase": "vulnerability-analysis",
    "objective": "Confirm injection",
    "owner": "agent-web" },
  { "phase": "exploitation",
    "objective": "Minimal proof of exec",
    "owner": "agent-exploit" },
  { "phase": "privilege-escalation",
    "objective": "Prove sudo find to root",
    "owner": "agent-privesc" }
 ] }

The critic: deterministic, six checks

action: "critic" runs six checks and returns a verdict with a score. It is deterministic — fixed order, no clock, no randomness, no model call — so the same state always produces the same verdict. It blocks on three things: an exploited finding with no evidence, a hard budget overrun, and a risk flag that says the work left scope or turned destructive. It warns on a verified finding without evidence, phases that are not done or skipped, approvals still waiting, budgets at or above 90%, duplicate step objectives, and unreviewed risk flags.

The score starts at 100 and loses 40 per blocking failure and 10 per warning. pass, warn and block are the verdicts, and an unresolved block is meant to stop reporting: fix the evidence or record the limitation. The critic is the cheapest independent review you will ever get, and it is the reason “the agent said it was fine” is not a review.

Sequence from plan creation through task delegation and critic verdict to engagement completion Lead pentest_plan pentest_team Subagents 1 create objective + steps + maxParallel 2 plan roles/phases → tasks t-01…, dependencies, write scopes 3 publish:true → native tasks in dependency order (blocked_by) 4 prompt per task → subagent claims, works, reports evidence 5 update status; blocked / handoff / reassign when it stalls 6 critic → pass | warn | block, with checks and score 7 close team, close plan, complete engagement A blocking critic check must be fixed or recorded as a limitation — it is not advisory.
Figure 11.1 — Plan → tasks → delegation → critic. The critic runs before reporting, and its verdict is the last gate before the engagement is closed.

Nine roles, nine phases

pentest_team action: "plan" builds tasks from the roles and phases you select; both default to the full set. A role supplies the objective, tools, stop conditions, deliverable and write scope that go into the delegation prompt.

RolePrimary phaseCovers
lead — Engagement leadpre-engagementpre-engagement, reporting
recon — Reconnaissancereconrecon
network — Service enumerationenumerationenumeration, lateral-movement
web-api — Web and API testervulnerability-analysisvulnerability-analysis, exploitation
exploitation — Exploitationexploitationexploitation
privesc-ad — Privilege escalation / ADprivilege-escalationprivilege-escalation, lateral-movement, post-exploitation
cloud — Cloud / post-exploitationpost-exploitationpost-exploitation
evidence-qc — Evidence reviewerreportingreporting
reporting — Reportingreportingreporting

When evidence-qc and reporting are both selected, a QC task is inserted before the reporting task — an independent check that did not execute the work. The team defaults to safe mode, has at most 50 tasks, 9 roles and 8 parallel tasks, and distributes a default budget of 500 tools, 1,000,000 tokens and 480 minutes evenly across tasks.

Team tasks: statuses, dependencies, write scopes

pentest_team actions are plan, status, add, update, focus, reassign, handoff, prompt and close. A task carries title, role, phase, status, dependencies, owner, focus, writeScopes, priority, budget, deliverable, a generated prompt and a handoffs history.

Task statuses are pending, in_progress, review, done and blocked, with a stricter graph than the plan: pending → in_progress or blocked; in_progress → pending, review or blocked; review → in_progress, done or blocked. New tasks must start pending. Entering in_progress, review or done requires every dependency to be done — a blocked upstream task therefore blocks its dependents, and that is visible in status's blockedReasons and ready flags.

Dependencies are validated against cycles and self-reference when the task is created or updated, and maxParallel is enforced on entry to in_progress. An active task needs an owner: if you start one without naming an owner, the role becomes the owner, and two active tasks cannot share an owner. Write scopes default to deliverables/ for every role; up to 32 scopes of 200 characters each can be declared, and the doctrine is explicit that two agents may never hold the same scope at once. Order the dependent task after its blocker rather than hoping the scheduler is polite.

Task status machine: pending to in progress to review to done, with blocked as the side state that blocks dependents pending ready when deps done in_progress owner + maxParallel review independent check done terminal blocked reason required A blocked task keeps its dependents not-ready until it is resumed and completed.
Figure 11.2 — Task statuses. blocked is reachable from the three active states and returns to pending or in_progress; dependents stay unready meanwhile.

Delegation, without inventing a second truth

The doctrine's sequence is six steps: read the plan and team status; create each parallel-ready task with acceptance criteria, write scopes and blocked_by ids; start each agent with the generated role prompt naming its task id, scope, budget and deliverables; poll team_task_list and the critic rather than the agents' prose; require every agent to claim and complete through team_task_update and report facts and evidence ids; close with the critic verdict and pentest_complete_engagement.

action: "prompt" returns the complete delegation prompt plus a payload for native task creation. With publish: true on plan or prompt, the plugin also creates native Agent Teams tasks in dependency order, maps blockedBy to the native ids and passes the write scopes — but only when Agent Teams is enabled for the session. Otherwise it returns a warning and keeps the local team plan, which is the authoritative board either way.

{ "action": "plan", "publish": true,
  "roles": ["lead", "recon", "web-api", "evidence-qc", "reporting"],
  "phases": ["pre-engagement", "recon", "vulnerability-analysis", "reporting"],
  "maxParallel": 2 }

The board stays truthful only if the lead updates it. Claiming work in the prompt but never in the task board produces a plan that looks untouched while the subagents are far ahead — and a report that cannot explain where the work came from.

When an agent fails or a task is blocked

Failure has a vocabulary. An agent that loses scope, waits for credentials, hits an approval or finds the target unstable reports blocked with a note — a real transition, not a silent stop. From blocked the task can return to pending, in_progress, or be left blocked and recorded as a limitation. reassign changes the owner; handoff records from, to and a mandatory note, refuses a stale hand-off when the current owner does not match, and refuses an owner already active elsewhere.

Two rules keep the team honest under pressure. Do not close the team — or the engagement — while tasks are in_progress or review; the close action refuses. And do not let two agents hold one critical task without a single accountable owner: focus can add several roles to one task, but the owner stays unique and the others are read-only.

The critic is not a rubber stamp

An independent QC agent that did not execute the step checks evidence sufficiency, reproducibility, scope and severity. Unresolved blocking checks stop the report; fix them, or write the limitation into the report and the plan note. “The subagent said it worked” is not evidence.

Closing the plan and the team

pentest_plan action: "close" requires that no step is in_progress; it records a note and closes the plan. pentest_team action: "close" requires that no task is in_progress or review. Then the engagement close runs the phase gate, generates the final report set and — if you export it — the bundle, whose process/engagement-process.md carries the phase, tool-run and approval record. The plan and team board live in the state document, so they travel with the audit trail even though they are not printed in the client report.

Deep reference: documentation, tool reference, wiki, sample artefacts, resources.

What good looks like

  • A plan with an objective, ordered steps, real owners, a parallel limit and a budget you actually consume against.
  • One task per step, one accountable owner, dependencies declared as blocked_by instead of assumed.
  • Write scopes that do not overlap while two agents are active.
  • A critic verdict read and acted on — blocking checks resolved or documented before reporting.
  • Every task ending done or explicitly blocked with a reason, before the team and plan are closed.