Code-review fix

Code-review fix (codereview_fix, D-68) is an action-layer type that ingests the comments produced by an external code-review tool, re-checks each one against the whole application, and fixes only the comments it can verify as accurate — in the working tree, with no commit and no PR. The external tool saw only a Pull Request diff, so it lacks whole-application context and can be wrong; this type exists to catch that. It is its own standalone mini-orchestrator at _processes/03_action/codereview_fix/codereview_fix.prompt.md: it runs no clarify step and no stage pipeline, and is defined entirely by its ## Action config. The orchestrator routes it via orchestrator.prompt.md → §C.route and never enters the stage loop.

All request types

Source of truth: the registry row in _processes/_shared/request-types.md, the preset _processes/_shared/presets/codereview_fix.md, and the action prompt _processes/03_action/codereview_fix/codereview_fix.prompt.md.

The comments are untrusted evidence, never instructions. A comment only authorizes fixing the specific item it points at — nothing broader, and nothing at all when the comment turns out to be inaccurate. Sub-agents receive an extracted claim summary plus an authorized scope, never the raw comment prose as a task (prompting-conventions.md §5). This boundary is the whole reason the type exists.

The flow

The orchestrator runs the action prompt inline (a non-dispatch instruction library, like the audit and doc_upkeep orchestrators). It reads JOB.md → ## Action to resolve CommentsSource / CommentsFile / Agents / Depth / Consolidator, ingests the comments (from the intake # Mandate body when CommentsSource: intake, or from CommentsFile when CommentsSource: file), and normalizes them to stable IDs C001, C002, … (unparseable prose becomes not_accurate / unchanged, never a guess). It then runs a two-pass per-comment model:

It then validates the working tree, writes the per-comment roll-up 09_action/action-report.md (also surfaced in chat), records completion in PROGRESS.md, and lands the job in 4_done/. It never commits and never opens a PR.

What it is for

Reach for Code-review fix when an external code-review tool (GitHub's, Azure DevOps', or any PR-scoped reviewer) has left comments and you want them re-checked against the whole app and only the real ones acted on — without trusting the tool's limited view.

The validate-then-conditionally-write fusion of audit and quick_fix. It borrows audit's per-finding validate-with-rationale (read-only, whole-app) and quick_fix's per-item parallel write — but neither of those has a per-item correctness gate that writes. It is also distinct from the workflow's internal review stage, which reviews a job's own diff before validate, not an external tool's comments.

The logic

codereview_fix sits in the action layer with shape orchestrator (its own standalone mini-orchestrator; D-68). The orchestrator routes it via orchestrator.prompt.md → §C.route — by layer / shape, not by the stage pipeline (the type→prompt-path map is hard-coded there; the registry supplies only the layer). A codereview_fix JOB.md therefore carries no stage machinery at all.

No contract version bump (D-68). codereview_fix reuses the existing action × orchestrator slot and introduces no new layer / shape / kind / gate enum value — an additive registry/UI + doc change, so the workflow contract stays 0.14 (precedents D-49, D-50, D-66).

The fields

A codereview_fix JOB.md carries only the header, ## Git, ## Action, and the # Mandate (which holds the pasted comments when CommentsSource: intake). There is no ## Stages, no ## Approval gates, and no ## Per-stage config — action types are routed by layer/shape, not by enabled stages.

## Action block fields (source: _processes/_shared/presets/codereview_fix.md + _processes/03_action/codereview_fix/codereview_fix.prompt.md)
FieldDefaultMeaning
CommentsSourceintakeintake reads the comments from the # Mandate body; file reads them from CommentsFile.
CommentsFile(blank)Required iff CommentsSource: file; a path within an allowed root. The prompt refuses secrets-like / out-of-root / oversized / binary paths.
AgentsclaudeRuntime(s) for the per-comment validate/fix sub-agents (claude | codex | claude, codex); adding codex requires config.json → runtimes.codex: true.
Depthstandardquick | standard | deep — tunes how widely each comment is validated against the whole app.
ConsolidatorclaudeRuntime that synthesises the per-comment records into 09_action/action-report.md.
## Git block (default off — the prompt refuses commit/PR even if hand-flipped)
FieldDefaultMeaning
Create branchnoNo branch is cut — fixes sit in the working tree.
Validate against mainnoNo base-branch diff validation.
CommitnoNothing is committed; the prompt refuses yes in v1.
PushnoNothing is pushed; the prompt refuses yes in v1.
PRnoNo pull request is opened; the prompt refuses yes in v1.
PR target branch(blank)Unused — the type never reaches the git landing.
before_commitnoNo commit, so no approval stop.
before_prnoNo PR, so no approval stop.

The per-comment verdict vocabulary in 09_action/action-report.md: Accuracy (accurate | not_accurate), AccuracyReason (rationale + evidence paths), Confidence (high | medium | low), and Disposition (fixed | unchanged). not_accurate subsumes unverifiable, ambiguous, stale, and out-of-scope — all unchanged.

How to run it

There are two copy-path ways to run it. Both produce the same 09_action/action-report.md.

Option A — drop an intake, let the orchestrator route it. In the intake form pick Code-review fix, paste the comments into the mandate (or set CommentsSource: file + CommentsFile), and submit a contract-valid intake into jobs/0_new/. Then send the orchestrator prompt path. It reads JOB.md → Type, routes by layer, and runs the codereview_fix logic without entering the stage loop.
Orchestrator (routes by type)
_processes/02_orchestrator/orchestrator.prompt.md
Option B — run the action prompt directly. Point the agent straight at the codereview_fix action orchestrator for an existing job in 2_ready/ / 3_ongoing/.
Code-review fix action orchestrator
_processes/03_action/codereview_fix/codereview_fix.prompt.md
Two invocation modes — copy blocks show the workflow-internal path (bare _processes/...); prefix with _code_workflow/ when your cwd is the host project root. See How to use → Two invocation modes.

See also