Phase: Completion
Related source file:
src/agentmux/workflow/handlers/completing.pyDirectory:08_completion/| Optional: no
The reviewer writes a human-readable summary of the implementation. The pipeline then awaits user approval or a change request via the native completion UI.
Conditions
Entered from reviewing when the review passes (review_passed event) or when the review loop cap is reached.
Role
reviewer agent — writes summary.md while still in the reviewing phase (with awaiting_summary: true in state.json). After the summary is written, the pipeline transitions to completing and the completion UI takes over (native terminal TUI or auto-approval depending on config).
Artifacts
| File | Writer | Reader | Format |
|---|---|---|---|
summary_prompt.md | orchestrator | reviewer agent | Markdown prompt |
summary.md | reviewer agent | PR description, humans | Markdown |
approval.json | completion UI (user approves) | orchestrator | JSON |
changes.md | completion UI (user requests changes) | orchestrator | Markdown |
Transitions
| From | Event | To |
|---|---|---|
reviewing (pass or loop cap) | review_passed / review_failed | completing |
completing | approval_received (on approval.json) | done (pipeline ends) |
completing | changes_requested (on changes.md) | architecting (re-planning) |
Flow
Summary written — The reviewing handler sends
summary_prompt.mdto the reviewer (while still inreviewingwithawaiting_summary: true). Whensummary.mdappears, the reviewer pane is killed andcompletingis entered.Completion mode — Controlled by
workflow_settings.completion.skip_final_approval:false(default): native terminal UI is launched in the tmux content zone.true: auto-approval writesapproval.jsonwith{"action": "approve", "exclude_files": []}.
Native UI — Displays the summary, changed file count, and a
[Y] / [N]panel.Ywritesapproval.json;Nprompts for feedback and writeschanges.md./cancelorCtrl+Creturns to the panel.Commit + PR — On approval, the pipeline stages changed files, commits, and optionally creates a GitHub branch + PR if
ghis available. The feature directory is deleted only on a successful commit.Post-completion artifact — On success, writes
<project_dir>/.agentmux/.last_completion.jsonbefore cleanup so the goodbye screen can display commit and PR info.
See Artifact: completion-artifacts.md for full schemas of approval.json, changes.md, and .last_completion.json.
Notes
- When the user approves, the pipeline commits locally and optionally opens a draft PR if
ghis available and configured. - When the user requests changes, the architect receives a re-planning prompt with the description from
changes.mdand the cycle restarts. - GitHub branch/PR failures do not roll back the local commit.
- Reviewer-stage preferences (via
submit_reviewtool'spreferencesparameter) are written to.agentmux/prompts/agents/<role>.mdunder## Approved Preferences.