com um clique
orchestrate-review
expert: "Review orchestration with adaptive specialist dispatch,
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Menu
expert: "Review orchestration with adaptive specialist dispatch,
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Baseado na classificação ocupacional SOC
Use at the start of every agent session, even if the task seems obvious and you think you already know what to do. Activates when the agent has just opened a repository, does not know what to do, needs to orient itself, or is beginning any new session. Also activates for "where do I start?", "what should I work on?", "what is the current state?". Skipping orientation leads to wasted effort and missed context.
expert: "Structured task execution procedure for individual implementation
expert: "Multi-agent development orchestration with conflict-aware parallel
expert: "Review orchestration with adaptive specialist dispatch,
Use at the start of every agent session, even if the task seems obvious and you think you already know what to do. Activates when the agent has just opened a repository, does not know what to do, needs to orient itself, or is beginning any new session. Also activates for "where do I start?", "what should I work on?", "what is the current state?". Skipping orientation leads to wasted effort and missed context.
expert: "Structured task execution procedure for individual implementation
| name | orchestrate-review |
| description | {"expert":"Review orchestration with adaptive specialist dispatch, finding collation, verdict aggregation, and remediation routing across review dimensions for feature-level code review","natural":"Coordinate a team of code reviewers, collect their findings, and decide whether the code is ready to ship"} |
| triggers | ["orchestrate code review","coordinate review team","run review for feature","dispatch review sub-agents","collate review findings"] |
| roles | ["orchestrator"] |
| stage | reviewing |
| constraint_level | medium |
Copy this checklist and track your progress:
- [ ] Identified all files changed in the feature
- [ ] Classified unclassified feature documents (or confirmed context budget insufficient)
- [ ] Grouped files into review units by functional boundary
- [ ] Selected specialist reviewers based on change scope
- [ ] Dispatched each sub-agent with review-code skill + reviewer role + scope
- [ ] Received structured output from every dispatched sub-agent
- [ ] Validated that every sub-agent output contains per-dimension evidence
- [ ] Deduplicated overlapping findings across reviewers
- [ ] Classified aggregate findings (blocking vs non-blocking)
- [ ] Produced aggregate verdict with routing decision
- [ ] Routed blocking findings to remediation OR routed to approval
- [ ] Wrote review document and registered with doc()
- [ ] Created human checkpoint for ambiguous or high-stakes findings (if applicable)
- [ ] Managed remediation cycle within iteration cap (if rejected)
- [ ] Post-review merge: verified all tasks terminal
- [ ] Post-review merge: transitioned feature to merging
- [ ] Post-review merge: ran merge check and execute
- [ ] Post-review merge: verified merge ancestry (git merge-base --is-ancestor)
- [ ] Post-review merge: transitioned to verifying, ran build and tests, transitioned to done (or needs-rework on failure)
1a. Confirm the feature is in reviewing status.
1b. Classify unclassified feature documents. Call doc_intel(action: "pending") and
filter results for documents owned by the feature under review. For each unclassified
document, process in priority order (specification → design → dev-plan):
1. Call doc_intel(action: "guide", id: "DOC-xxx") to get the section outline
and content hash.
2. Read the sections needed to understand the document content.
3. Call doc_intel(action: "classify", id: "DOC-xxx", content_hash: "...", ...)
to submit the classifications.
**Classification is NOT a blocking prerequisite.** If context budget is exhausted,
MUST proceed with reviewing anyway.
**Rationale:** Reviewer sub-agents use `doc_intel` to navigate documents. Layer 3
classification enables role-based search and produces richer guides. An unclassified
corpus forces reviewers to fall back to structural navigation only, missing decision
and rationale fragments that classification would have surfaced.
2. Locate the specification document(s) for the feature. 3. Identify all files changed in the feature (use the worktree diff or file list from the feature entity). 4. IF the spec is missing or the feature is not in the correct status → STOP. Report the missing prerequisite. Do not proceed without a spec to review against.
entity-lifecycle, storage-layer,
cli-commands) and a file list.Select which reviewer roles to dispatch based on what the files contain. The dispatch ceiling is 4 sub-agents, but this is a maximum, not a target.
Decision factors:
reviewer-conformance — spec conformance is required
for every review.reviewer-quality — implementation
quality applies when there is implementation to evaluate.reviewer-testing — testing adequacy applies when tests are in scope.reviewer-security —
security review applies to authentication, authorisation, input handling,
cryptography, or external system integration.For small features (≤10 files, single concern), 1–2 reviewers are often sufficient. Match the panel size to the risk and scope of the change.
For each selected reviewer, dispatch a sub-agent with:
review-codereviewer-conformance)Each sub-agent operates independently. They do not see each other's output.
They each produce a structured review output in the review-code format.
fail outcome → aggregate
is rejectedconcern outcomes but no fail → aggregate is
approved_with_followupspass or pass_with_notes
→ aggregate is approvedrejected → produce remediation plan listing each blocking finding
with its location and spec reference. Route to the implementing agent
or human for resolution.approved_with_followups → list non-blocking findings for follow-up.
Proceed to the Post-Review Merge phase below.approved → proceed to the Post-Review Merge phase below.Write collated findings to the canonical review path. Consult
.agents/skills/kanbanzai-documents/SKILL.md § "Document Types
and Locations" for the filename template.
For a batch-scoped feature review:
work/{BatchID}-{batch-slug}/{feature-id}-review-{slug}.md
Where {feature-id} is the full feature entity ID
(e.g., FEAT-01KMRX1SEQV49) and {slug} is the feature slug.
The document must contain: summary verdict, per-dimension verdicts, blocking findings with locations, non-blocking findings, and review unit breakdown showing the dispatch scope for each sub-agent.
Register the document:
doc(action: "register", owner: "<feature-id>", path: "<report-path>", type: "report", title: "Review: <feature-slug>")
Enter this phase only when the aggregate verdict is rejected.
needs-rework:
entity(action: "transition", id: "<feature-id>", status: "needs-rework")entity(action: "create", type: "task", parent_feature: "<feature-id>")conflict(action: "check", task_ids: [...])next(id: "<task-id>") to claim and activate.reviewing status (the
approved verdict state) and proceed to the Post-Review Merge phase
below. If new blocking findings: repeat from step 1 of this phase.checkpoint(action: "create").Create a human checkpoint (checkpoint(action: "create")) when:
For each scenario, include in the checkpoint context:
Wait for the human response before proceeding. Do not dispatch remediation or transition feature state while a checkpoint is pending.
Enter this phase only when the aggregate verdict is approved or
approved_with_followups and a PR exists for the feature.
The merging stage gate is auto — no human checkpoint is required, but the
orchestrator must complete all five steps before the feature reaches done.
Step 1: Verify all tasks are terminal
Confirm every task under the feature is in a terminal state — done,
not-planned, or duplicate. No task may remain in ready, active,
needs-review, or needs-rework.
entity(action: "list", type: "task", parent: "<feature-id>")
If any task is non-terminal, STOP. Do not proceed to merge. Either complete the remaining tasks or transition them to a terminal state with justification.
Step 2: Transition feature to merging
Advance the feature from reviewing to merging:
entity(action: "transition", id: "<feature-id>", status: "merging")
This transition requires all tasks to be terminal and at least one approved report document. If the transition fails, check the gate prerequisites and resolve before retrying.
Step 3: Run merge check and execute
Verify the PR exists and check merge gates:
pr(action: "status", entity_id: "<feature-id>")
merge(action: "check", entity_id: "<feature-id>")
If merge(action: "check") reports blocking gates, resolve them before
proceeding. Common blockers: missing PR, CI failures, unreviewed code.
Execute the merge:
merge(action: "execute", entity_id: "<feature-id>")
If the merge fails, STOP. Review the failure output, resolve the issue, and
retry from step 3. Do not advance the feature to verifying until the merge
succeeds.
Step 4: Verify merge ancestry
Confirm the feature branch is an ancestor of main:
git merge-base --is-ancestor <feature-branch> main
If the command exits non-zero, the merge did not complete successfully. The
worktree record will remain active and the feature will stay in merging.
Investigate and retry from step 3.
If the command exits zero, the merge is confirmed. The worktree record is
automatically marked merged.
Step 5: Build, test, and transition
Advance the feature from merging to verifying:
entity(action: "transition", id: "<feature-id>", status: "verifying")
Run the build from the repository root:
go build ./...
If the build fails:
entity(action: "transition", id: "<feature-id>", status: "needs-rework",
reason: "Build failed on main after merge: <build-error-output>")
STOP. Report the build failure and do not proceed further.
Run the tests from the repository root using the test tool:
test(action: "run")
(Which runs go test ./... internally.)
If any test fails:
entity(action: "transition", id: "<feature-id>", status: "needs-rework",
reason: "Tests failed on main after merge: <test-failure-output>")
STOP. Report the test failure and do not proceed further.
If both build and tests pass:
entity(action: "transition", id: "<feature-id>", status: "done")
Contribute a knowledge entry summarizing the merge:
knowledge(action: "contribute",
topic: "merge-complete-<feature-id>",
content: "Feature merged and verified. PR: <pr-url>. Build and tests passed on main.",
scope: "project")
The orchestrator and sub-agents have deliberately different context profiles:
Orchestrator works at metadata level only (~6–14 KB total): feature entity state, spec outline, task list with file paths, skill document, collated findings. The orchestrator never reads source code.
Sub-agents hold their review unit's context (~12–30 KB per agent): reviewer profile, skill document, spec section(s), source files, output template.
This means: orchestrator context cost is constant regardless of codebase size; sub-agent context scales with review unit size, not feature size.
Feature: <feature-id> — <feature-slug>
Review cycle: <N>
Reviewers dispatched: <list of reviewer roles>
Review units: <count>
---
Per-Reviewer Summary:
Reviewer: <role>
Review unit: <unit-label>
Verdict: <per-reviewer verdict>
Dimensions:
<dimension>: <outcome>
<dimension>: <outcome>
Findings: <count blocking>, <count non-blocking>
(repeat per reviewer)
---
Collated Findings (deduplicated):
[B-1] (blocking)
Dimension: <dimension>
Location: <file>:<lines>
Spec ref: <requirement ID>
Description: <what is wrong and why it violates the spec>
Reported by: <reviewer role(s)>
[NB-1] (non-blocking)
Dimension: <dimension>
Location: <file>:<lines>
Description: <observation and recommendation>
Reported by: <reviewer role(s)>
(repeat per finding)
---
Aggregate Verdict: <approved | approved_with_followups | rejected>
Remediation Plan (if rejected):
1. [B-1] — <brief action required> → route to <agent/human>
2. [B-2] — <brief action required> → route to <agent/human>