Skip to content

Phase: Review

Related source files: src/agentmux/workflow/handlers/reviewing.py, src/agentmux/workflow/phase_registry.py, src/agentmux/workflow/prompts.py, src/agentmux/integrations/mcp_server.py Directory: 07_review/ | Optional: no

The reviewer evaluates the implementation against the plan, producing a structured verdict. The architect nominates which reviewer roles should run via submit_architecture(reviewers=[...]).

Conditions

Entered after implementing or fixing completes (implementation_completed event).

Role

The architect nominates the reviewer set via submit_architecture(reviewers=[...]) during the architecting phase. Valid values:

RolePurpose
reviewer_logicChecks alignment to plan and functional correctness
reviewer_qualityChecks code quality, style, and maintainability
reviewer_expertChecks security, performance, and edge cases

When reviewers is omitted or empty, only reviewer_logic runs by default.

Artifacts

FileWriterReaderFormat
review_prompt.mdorchestrator (legacy fallback)reviewer agentMarkdown prompt
review_logic_prompt.mdorchestratorLogic & Alignment reviewerMarkdown prompt
review_quality_prompt.mdorchestratorQuality & Style reviewerMarkdown prompt
review_expert_prompt.mdorchestratorDeep-Dive Expert reviewerMarkdown prompt
review.yamlreviewer agent (via submit_review)orchestratorYAML
review.mdreviewer agent or orchestrator (auto-generated from review.yaml)summary, monitor, PRMarkdown
fix_prompt.mdorchestratorcoder agent (fixing phase)Markdown
fix_request.mdorchestratorcoder agent (fixing phase)Markdown

Reviewer selection

The architect nominates the reviewer set via submit_architecture(reviewers=[...]) during the architecting phase. The nominations are stored in state["reviewer_nominations"] and read by select_reviewer_roles(state) to determine which reviewer panes to dispatch.

review.yaml schema

See Artifact: review.yaml for the full schema and field-level documentation.

Summary of fields:

FieldRequiredValues
verdictyes"pass" or "fail"
summaryyesstring
findingson faillist of {location, issue, severity, recommendation}
commit_messageoptionalstring (used verbatim as commit message on pass)

Transitions

FromEventTo
implementing or fixingimplementation_completedreviewing
reviewingreview_passed (verdict: pass)completing
reviewingreview_failed (verdict: fail, below loop cap)fixing
reviewingreview_failed (verdict: fail, loop cap reached)completing

Notes

  • If review.md is missing when downstream prompts need it, AgentMux materializes it automatically from review.yaml.
  • The reviewer also writes 08_completion/summary.md after a pass verdict (while still in reviewing phase with awaiting_summary: true in state), before the pipeline transitions to completing.
  • Post-fix follow-up prompt: When re-entering reviewing after a fixing iteration (review_iteration > 0) and the previous iteration's role-specific archive review_{prev}_{pane_role}.md exists, the handler dispatches a compact follow-up prompt built from prompts/commands/review_followup.md instead of the full initial prompt. It references only the reviewer's own prior archive and the aggregated fix_request.md — no context.md, architecture.md, or plan.md includes. If the archive is missing (e.g. the previous round was killed), the handler falls back to the initial prompt.
  • See Handoff Contracts for full validation rules applied to review.yaml.

Released under the MIT License.