@zigrivers/scaffold 3.22.0 → 3.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/README.md +44 -23
  2. package/content/knowledge/core/automated-review-tooling.md +3 -3
  3. package/content/knowledge/core/multi-model-review-dispatch.md +13 -4
  4. package/content/knowledge/data-science/README.md +23 -0
  5. package/content/knowledge/data-science/data-science-architecture.md +163 -0
  6. package/content/knowledge/data-science/data-science-conventions.md +233 -0
  7. package/content/knowledge/data-science/data-science-data-versioning.md +198 -0
  8. package/content/knowledge/data-science/data-science-dev-environment.md +159 -0
  9. package/content/knowledge/data-science/data-science-experiment-tracking.md +194 -0
  10. package/content/knowledge/data-science/data-science-model-evaluation.md +160 -0
  11. package/content/knowledge/data-science/data-science-notebook-discipline.md +170 -0
  12. package/content/knowledge/data-science/data-science-observability.md +161 -0
  13. package/content/knowledge/data-science/data-science-project-structure.md +178 -0
  14. package/content/knowledge/data-science/data-science-reproducibility.md +164 -0
  15. package/content/knowledge/data-science/data-science-requirements.md +151 -0
  16. package/content/knowledge/data-science/data-science-security.md +151 -0
  17. package/content/knowledge/data-science/data-science-testing.md +183 -0
  18. package/content/knowledge/ml/README.md +10 -0
  19. package/content/methodology/data-science-overlay.yml +39 -0
  20. package/content/pipeline/build/multi-agent-resume.md +7 -6
  21. package/content/pipeline/build/multi-agent-start.md +7 -6
  22. package/content/pipeline/build/single-agent-resume.md +7 -6
  23. package/content/pipeline/build/single-agent-start.md +7 -6
  24. package/content/pipeline/environment/automated-pr-review.md +79 -27
  25. package/content/skills/mmr/SKILL.md +72 -2
  26. package/content/skills/scaffold-runner/SKILL.md +65 -19
  27. package/content/tools/review-code.md +74 -16
  28. package/content/tools/review-pr.md +25 -6
  29. package/dist/cli/commands/check.d.ts.map +1 -1
  30. package/dist/cli/commands/check.js +28 -17
  31. package/dist/cli/commands/check.js.map +1 -1
  32. package/dist/config/schema.d.ts +672 -126
  33. package/dist/config/schema.d.ts.map +1 -1
  34. package/dist/config/schema.js +8 -0
  35. package/dist/config/schema.js.map +1 -1
  36. package/dist/config/schema.test.js +2 -2
  37. package/dist/config/schema.test.js.map +1 -1
  38. package/dist/config/validators/data-science.d.ts +4 -0
  39. package/dist/config/validators/data-science.d.ts.map +1 -0
  40. package/dist/config/validators/data-science.js +15 -0
  41. package/dist/config/validators/data-science.js.map +1 -0
  42. package/dist/config/validators/index.d.ts.map +1 -1
  43. package/dist/config/validators/index.js +2 -0
  44. package/dist/config/validators/index.js.map +1 -1
  45. package/dist/core/assembly/knowledge-loader.d.ts.map +1 -1
  46. package/dist/core/assembly/knowledge-loader.js +6 -0
  47. package/dist/core/assembly/knowledge-loader.js.map +1 -1
  48. package/dist/core/assembly/knowledge-loader.test.js +34 -0
  49. package/dist/core/assembly/knowledge-loader.test.js.map +1 -1
  50. package/dist/e2e/project-type-overlays.test.js +73 -0
  51. package/dist/e2e/project-type-overlays.test.js.map +1 -1
  52. package/dist/project/adopt.d.ts.map +1 -1
  53. package/dist/project/adopt.js +3 -1
  54. package/dist/project/adopt.js.map +1 -1
  55. package/dist/project/detectors/coverage.test.d.ts +2 -0
  56. package/dist/project/detectors/coverage.test.d.ts.map +1 -0
  57. package/dist/project/detectors/coverage.test.js +78 -0
  58. package/dist/project/detectors/coverage.test.js.map +1 -0
  59. package/dist/project/detectors/data-science.d.ts +4 -0
  60. package/dist/project/detectors/data-science.d.ts.map +1 -0
  61. package/dist/project/detectors/data-science.js +32 -0
  62. package/dist/project/detectors/data-science.js.map +1 -0
  63. package/dist/project/detectors/data-science.test.d.ts +2 -0
  64. package/dist/project/detectors/data-science.test.d.ts.map +1 -0
  65. package/dist/project/detectors/data-science.test.js +62 -0
  66. package/dist/project/detectors/data-science.test.js.map +1 -0
  67. package/dist/project/detectors/disambiguate.d.ts +2 -0
  68. package/dist/project/detectors/disambiguate.d.ts.map +1 -1
  69. package/dist/project/detectors/disambiguate.js +3 -2
  70. package/dist/project/detectors/disambiguate.js.map +1 -1
  71. package/dist/project/detectors/disambiguate.test.js +10 -1
  72. package/dist/project/detectors/disambiguate.test.js.map +1 -1
  73. package/dist/project/detectors/index.d.ts.map +1 -1
  74. package/dist/project/detectors/index.js +2 -0
  75. package/dist/project/detectors/index.js.map +1 -1
  76. package/dist/project/detectors/library.d.ts.map +1 -1
  77. package/dist/project/detectors/library.js +1 -0
  78. package/dist/project/detectors/library.js.map +1 -1
  79. package/dist/project/detectors/resolve-detection.test.js +31 -0
  80. package/dist/project/detectors/resolve-detection.test.js.map +1 -1
  81. package/dist/project/detectors/types.d.ts +6 -2
  82. package/dist/project/detectors/types.d.ts.map +1 -1
  83. package/dist/project/detectors/types.js.map +1 -1
  84. package/dist/types/config.d.ts +8 -1
  85. package/dist/types/config.d.ts.map +1 -1
  86. package/dist/wizard/copy/core.d.ts.map +1 -1
  87. package/dist/wizard/copy/core.js +4 -0
  88. package/dist/wizard/copy/core.js.map +1 -1
  89. package/dist/wizard/copy/data-science.d.ts +3 -0
  90. package/dist/wizard/copy/data-science.d.ts.map +1 -0
  91. package/dist/wizard/copy/data-science.js +15 -0
  92. package/dist/wizard/copy/data-science.js.map +1 -0
  93. package/dist/wizard/copy/index.d.ts.map +1 -1
  94. package/dist/wizard/copy/index.js +2 -0
  95. package/dist/wizard/copy/index.js.map +1 -1
  96. package/dist/wizard/copy/types.d.ts +5 -1
  97. package/dist/wizard/copy/types.d.ts.map +1 -1
  98. package/dist/wizard/copy/types.test-d.js +7 -0
  99. package/dist/wizard/copy/types.test-d.js.map +1 -1
  100. package/dist/wizard/questions.d.ts +2 -1
  101. package/dist/wizard/questions.d.ts.map +1 -1
  102. package/dist/wizard/questions.js +9 -1
  103. package/dist/wizard/questions.js.map +1 -1
  104. package/dist/wizard/questions.test.js +14 -0
  105. package/dist/wizard/questions.test.js.map +1 -1
  106. package/dist/wizard/wizard.d.ts.map +1 -1
  107. package/dist/wizard/wizard.js +1 -0
  108. package/dist/wizard/wizard.js.map +1 -1
  109. package/package.json +1 -1
  110. package/skills/mmr/SKILL.md +72 -2
  111. package/skills/scaffold-runner/SKILL.md +65 -19
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: automated-pr-review
3
- description: Agent-driven automated PR review with external reviewers (Codex Cloud, Gemini Code Assist, or custom)
4
- summary: "Configures automated code review using Codex and/or Gemini CLIs for dual-model review when available, or an external bot with severity definitions and review criteria tailored to your project."
3
+ description: "Agent-driven automated code review via MMR (Codex, Gemini, Claude CLIs + Superpowers as 4th channel in wrappers), for PRs and non-PR targets"
4
+ summary: "Configures agent-driven automated code review: mandatory after `gh pr create` and also usable on any non-PR target. Direct `mmr review` runs three CLI channels (Codex, Gemini, Claude); `scaffold run review-pr` / `scaffold run review-code` add the Superpowers code-reviewer agent as a complementary 4th channel. An external GitHub App reviewer is supported as a fallback when CLIs are unavailable."
5
5
  phase: "environment"
6
6
  order: 340
7
7
  dependencies: [git-workflow]
@@ -12,10 +12,21 @@ knowledge-base: [review-methodology, automated-review-tooling]
12
12
  ---
13
13
 
14
14
  ## Purpose
15
- Configure an agent-driven automated PR review system using local CLI reviewers
16
- (Codex, Gemini — runs both when available for dual-model quality) or external
17
- GitHub App reviewers. Zero GitHub Actions workflows. The agent manages the
18
- entire review-fix loop locally.
15
+ Configure an agent-driven automated code review system using local CLI
16
+ reviewers dispatched through MMR (Codex, Gemini, Claude — runs all three when
17
+ available) plus the Superpowers code-reviewer agent as a complementary 4th
18
+ channel when using the MMR wrappers `scaffold run review-pr` and
19
+ `scaffold run review-code`. The review is mandatory after `gh pr create` and
20
+ also runs on non-PR targets (local staged/unstaged code, branch diffs,
21
+ specific files) via the same `mmr review` CLI.
22
+ `scaffold run post-implementation-review` is a separate full-codebase review
23
+ (Codex CLI + Gemini CLI + Superpowers code-reviewer) that runs after an AI
24
+ agent completes all implementation tasks; it does not currently use Claude
25
+ CLI as a standard channel and is not an MMR wrapper, though it can inject
26
+ findings into an existing MMR job via `mmr reconcile`.
27
+ External GitHub App reviewers remain supported as a fallback when CLIs are
28
+ unavailable. Zero GitHub Actions workflows. The agent manages the entire
29
+ review-fix loop locally.
19
30
 
20
31
  ## Inputs
21
32
  - docs/coding-standards.md (required) — review criteria reference
@@ -26,7 +37,7 @@ entire review-fix loop locally.
26
37
  ## Expected Outputs
27
38
  - AGENTS.md — Reviewer instructions with project-specific rules
28
39
  - docs/review-standards.md — severity definitions (P0-P3) and review criteria
29
- - scripts/cli-pr-review.sh (local CLI mode) — dual-model review with reconciliation
40
+ - scripts/cli-pr-review.sh (legacy dual-model fallback) — Codex+Gemini review with manual reconciliation, used when MMR / `scaffold run review-pr` is unavailable
30
41
  - scripts/await-pr-review.sh (external bot mode) — polling script with JSON output
31
42
  - docs/git-workflow.md updated with review loop integration
32
43
  - CLAUDE.md updated with agent-driven review workflow and review-pr hook
@@ -36,23 +47,27 @@ entire review-fix loop locally.
36
47
  - (mvp) Review standards document matches project coding conventions
37
48
  - (deep) Await script handles all exit conditions (approved, findings, cap, skip, timeout)
38
49
  - (mvp) CLAUDE.md workflow documents the agent-driven loop
50
+ - (mvp) CLAUDE.md review block covers both PR and non-PR targets (staged, branch diff, single file)
39
51
  - (mvp) No GitHub Actions workflows created (zero Actions minutes)
40
52
  - (mvp) No ANTHROPIC_API_KEY secret required
41
53
  - (mvp) Post-PR-creation hook configured in settings to remind agents to run review-pr
42
54
  - (deep) Legacy GitHub Actions workflows detected and cleanup offered
43
- - (deep) Dual-model review enabled when both CLIs available
55
+ - (deep) Three-CLI review (Codex, Gemini, Claude) enabled when all three CLIs available, with per-channel auth checks and compensating passes
56
+ - (deep) The MMR scaffold wrappers (review-pr, review-code) add the Superpowers code-reviewer agent as a complementary 4th channel and reconcile its findings through MMR. `post-implementation-review` follows a separate channel layout (Codex + Gemini + Superpowers, with optional `mmr reconcile` injection) and is not one of the MMR wrappers.
44
57
 
45
58
  ## Methodology Scaling
46
- - **deep**: Full setup with local CLI review (dual-model when both available),
47
- review-standards.md, AGENTS.md, and comprehensive CLAUDE.md workflow.
48
- Falls back to external bot review if no CLIs available.
59
+ - **deep**: Full setup with local three-CLI review dispatched through MMR
60
+ (Codex, Gemini, Claude), scaffold wrappers adding the Superpowers
61
+ code-reviewer as a complementary 4th channel, review-standards.md,
62
+ AGENTS.md, and comprehensive CLAUDE.md workflow covering PR and non-PR
63
+ targets. Falls back to external bot review if no CLIs available.
49
64
  - **mvp**: Step is disabled. Local self-review from git-workflow suffices.
50
65
  - **custom:depth(1-5)**:
51
66
  - Depth 1: disabled — local self-review from git-workflow suffices.
52
67
  - Depth 2: disabled — same as depth 1.
53
- - Depth 3: basic review-standards.md + single-CLI review (whichever CLI is available).
54
- - Depth 4: add dual-model review when both CLIs available, AGENTS.md with project-specific rules.
55
- - Depth 5: full suite with dual-model review, legacy Actions cleanup, and comprehensive CLAUDE.md workflow integration.
68
+ - Depth 3: basic review-standards.md + MMR dispatch using whichever CLIs are available (graceful compensating Claude passes for missing Codex or Gemini channels; if Claude CLI itself is unavailable, the review proceeds with the remaining channels — no compensating pass for missing Claude).
69
+ - Depth 4: three-CLI review via MMR when all CLIs available, plus AGENTS.md with project-specific rules and the Superpowers 4th channel on wrapper invocations.
70
+ - Depth 5: full suite three-CLI + Superpowers review, legacy GitHub Actions cleanup, comprehensive CLAUDE.md workflow integration covering PR and non-PR targets.
56
71
 
57
72
  ## Conditional Evaluation
58
73
  Enable when: project uses GitHub for version control, team size > 1 or CI/CD is
@@ -74,10 +89,14 @@ Check if AGENTS.md exists first. If it exists, check for scaffold tracking comme
74
89
  script customizations
75
90
  - **Triggers for update**: coding-standards.md changed (new review criteria),
76
91
  tdd-standards.md changed (coverage expectations), new external reviewer
77
- CLI became available, git-workflow.md changed PR workflow steps
92
+ CLI became available, git-workflow.md changed PR workflow steps, review
93
+ scope expanded beyond PRs (e.g., MMR now supports staged / diff / branch
94
+ / file targets)
78
95
  - **Conflict resolution**: if review criteria changed in coding-standards.md,
79
- update AGENTS.md review rules to match; if both CLI reviewers are now
80
- available, offer to enable dual-model review
96
+ update AGENTS.md review rules to match; if additional CLI reviewers have
97
+ become available, offer to enable the full three-CLI MMR flow (Codex,
98
+ Gemini, Claude) and, on wrapper invocations, surface Superpowers
99
+ code-reviewer as the complementary 4th channel
81
100
 
82
101
  ## Instructions
83
102
 
@@ -99,7 +118,7 @@ Add this to `.claude/settings.json`:
99
118
  "hooks": [
100
119
  {
101
120
  "type": "command",
102
- "command": "if echo \"$CC_BASH_COMMAND\" | grep -q 'gh pr create'; then echo '\\n⚠️ MANDATORY: Run all 3 code review channels before proceeding to the next task:\\n\\n 1. Codex CLI:\\n Auth: codex login status 2>/dev/null\\n Run: codex exec --skip-git-repo-check -s read-only --ephemeral \"REVIEW_PROMPT\" 2>/dev/null\\n\\n 2. Gemini CLI:\\n Auth: NO_BROWSER=true gemini -p \"respond with ok\" -o json 2>&1\\n Run: NO_BROWSER=true gemini -p \"REVIEW_PROMPT\" --output-format json --approval-mode yolo 2>/dev/null\\n\\n 3. Superpowers code-reviewer:\\n Dispatch superpowers:code-reviewer subagent with BASE_SHA and HEAD_SHA\\n\\nIf auth fails: tell user to run ! codex login or ! gemini -p \"hello\"\\nFix all P0/P1/P2 findings before moving on. Do NOT skip any channel.\\nFull instructions: scaffold run review-pr'; fi"
121
+ "command": "if echo \"$CC_BASH_COMMAND\" | grep -q 'gh pr create'; then echo '\\n⚠️ MANDATORY: Run all 3 CLI review channels plus the Superpowers 4th channel before proceeding to the next task:\\n\\n 1. Codex CLI:\\n Auth: codex login status 2>/dev/null\\n Run: codex exec --skip-git-repo-check -s read-only --ephemeral \"REVIEW_PROMPT\" 2>/dev/null\\n\\n 2. Gemini CLI:\\n Auth: NO_BROWSER=true gemini -p \"respond with ok\" -o json 2>&1\\n Run: NO_BROWSER=true gemini -p \"REVIEW_PROMPT\" --output-format json --approval-mode yolo 2>/dev/null\\n\\n 3. Claude CLI:\\n Auth: claude -p \"respond with ok\" 2>/dev/null\\n Run: claude -p \"REVIEW_PROMPT\" --output-format json 2>/dev/null\\n\\n 4. Superpowers code-reviewer (complementary 4th channel):\\n Dispatch superpowers:code-reviewer subagent with BASE_SHA and HEAD_SHA\\n\\nIf auth fails: tell user to run ! codex login, ! gemini -p \"hello\", or ! claude login (as applicable).\\nDo not silently skip channels — surface auth failures and let MMR decide: missing Codex/Gemini get compensating Claude passes (degraded-pass verdict); missing Claude proceeds without compensation.\\nFix all P0/P1/P2 findings before moving on.\\nFull instructions: scaffold run review-pr'; fi"
103
122
  }
104
123
  ]
105
124
  }
@@ -120,21 +139,54 @@ the actual CLI invocations ensures the agent can execute reviews even if the
120
139
 
121
140
  ### Add Review Workflow to CLAUDE.md
122
141
 
123
- Add the following to the project's CLAUDE.md in the Code Review section:
142
+ Add the following to the project's CLAUDE.md in the Code Review section. Wrap
143
+ the managed section in the `<!-- scaffold:automated-pr-review:claude-md -->`
144
+ markers shown below so Update Mode can idempotently rewrite this block without
145
+ duplicating it on re-run. If a prior version of the block exists **without**
146
+ markers, replace it in place and add the markers.
124
147
 
125
148
  ```markdown
126
149
  ## Code Review
127
150
 
128
- After creating a PR, run `/scaffold:review-pr <PR#>` to execute all three review
129
- channels (Codex CLI, Gemini CLI, Superpowers code-reviewer). Fix P0/P1/P2 findings
130
- before moving to the next task. A post-hook on `gh pr create` will remind you.
131
-
132
- | Command | Purpose |
133
- |---------|---------|
134
- | `/scaffold:review-pr <PR#>` | Run all 3 review channels on a PR |
135
- | `scripts/cli-pr-review.sh <PR#>` | Run dual-model CLI review only |
151
+ <!-- scaffold:automated-pr-review:claude-md start -->
152
+ **Mandatory after `gh pr create`** run `/scaffold:review-pr <PR#>` to execute
153
+ all three review channels (Codex CLI, Gemini CLI, Claude CLI), plus the
154
+ Superpowers code-reviewer agent as a complementary 4th channel. Fix P0/P1/P2
155
+ findings before moving to the next task. A post-hook on `gh pr create` will
156
+ remind you.
157
+
158
+ **Optional but supported** for non-PR targets the review is not PR-gated.
159
+ Direct `mmr review` runs the three CLI channels (Codex, Gemini, Claude) on
160
+ any diff or file. `scaffold run review-code` adds the Superpowers
161
+ code-reviewer agent as a complementary 4th channel on top of those three
162
+ CLIs for the local pre-commit review path.
163
+
164
+ | When | Command |
165
+ |------|---------|
166
+ | After creating a PR | `/scaffold:review-pr <PR#>` |
167
+ | Before commit / push (tracked local code: committed + staged + unstaged) | `scaffold run review-code` |
168
+ | Pending edits to a tracked file (changes since HEAD) | `git diff HEAD -- <path> \| mmr review --diff - --sync --format json` |
169
+ | Current contents of any file (tracked-with-no-changes, untracked, or brand-new) | `(diff -u /dev/null <path> \|\| true) \| mmr review --diff - --sync --format json` |
170
+ | Branch diff | `mmr review --base <ref> --head <ref> --sync --format json` |
171
+ | Staged changes only | `mmr review --staged --sync --format json` |
172
+ | All tracked uncommitted changes (staged + unstaged, no untracked) | `git diff HEAD \| mmr review --diff - --sync --format json` |
173
+ | Existing patch or diff file | `mmr review --diff <path.patch> --sync --format json` |
174
+ | Dual-model CLI only (no reconciliation) | `scripts/cli-pr-review.sh <PR#>` |
175
+
176
+ Note: `mmr review --diff` expects diff-format content; use the `git diff …`
177
+ or `(diff -u /dev/null … || true)` wrappers shown above to review plain
178
+ files. The `|| true` guard on `diff` is required because `diff` exits with
179
+ status 1 whenever files differ, which breaks pipelines under `pipefail`.
180
+ <!-- scaffold:automated-pr-review:claude-md end -->
136
181
  ```
137
182
 
183
+ **Idempotency note:** In Update Mode, find the `<!-- scaffold:automated-pr-review:claude-md start -->`
184
+ and `<!-- scaffold:automated-pr-review:claude-md end -->` markers and replace
185
+ everything between them with the current version of the block above. If the
186
+ markers are missing (pre-marker versions), locate the prior block by its
187
+ "After creating a PR, run `/scaffold:review-pr`" lead-in and replace it in
188
+ place, adding the markers around the new content. Never append a second copy.
189
+
138
190
  ### Configure AGENTS.md, Review Standards, and CLI Scripts
139
191
 
140
192
  Follow the existing instructions for creating AGENTS.md, docs/review-standards.md,
@@ -14,10 +14,38 @@ Dispatch code reviews to multiple AI model CLIs, poll for results, and collect r
14
14
 
15
15
  ## Quick Reference
16
16
 
17
+ `mmr review` works for any review target — not just PRs. Pick the input mode
18
+ that matches what you want reviewed:
19
+
17
20
  ```bash
18
- # Dispatch a review for a PR
21
+ # GitHub PR (fetches diff via `gh pr diff`)
19
22
  mmr review --pr <number> --focus "description of what to focus on"
20
23
 
24
+ # Staged git changes (pre-commit review)
25
+ mmr review --staged --focus "..."
26
+
27
+ # All tracked uncommitted changes (staged + unstaged) — excludes untracked
28
+ # files; use `scaffold run review-code` for full-worktree coverage
29
+ git diff HEAD | mmr review --diff - --focus "..."
30
+
31
+ # Branch diff / ref range
32
+ mmr review --base main --head <branch> --focus "..."
33
+
34
+ # Changes to a specific tracked file since HEAD (pending edits only).
35
+ # If the file has no local changes this pipeline sends an empty diff
36
+ # and MMR will refuse with "no diff content"; use the next form instead
37
+ # to review the file's current contents regardless of git state.
38
+ git diff HEAD -- path/to/file.md | mmr review --diff - --focus "..."
39
+
40
+ # A file's current contents, regardless of git state (tracked-with-no-
41
+ # changes, untracked, or brand-new). Synthesizes an "all added" diff.
42
+ # `|| true` is required: diff exits 1 whenever files differ, which breaks
43
+ # pipelines under `set -o pipefail`.
44
+ (diff -u /dev/null path/to/file.md || true) | mmr review --diff - --focus "..."
45
+
46
+ # Existing patch or diff file
47
+ mmr review --diff path/to/changes.patch --focus "..."
48
+
21
49
  # Check progress
22
50
  mmr status <job-id>
23
51
 
@@ -28,7 +56,20 @@ mmr results <job-id>
28
56
  mmr config test
29
57
  ```
30
58
 
31
- ## After Creating a PR
59
+ All input modes accept `--focus`, `--sync`, `--format`, and `--fix-threshold`
60
+ the same way. The "3-channel review" is not PR-specific — it reviews whatever
61
+ diff you point it at.
62
+
63
+ **`--diff` contract:** the flag expects diff-format content (a path to a
64
+ `.patch`/`.diff` file, or `-` for stdin). It does not read raw document
65
+ content — wrap the target in a diff first (see the `git diff …` and
66
+ `(diff -u /dev/null … || true)` patterns above). The `|| true` guard is
67
+ required because `diff` exits 1 whenever files differ, which breaks
68
+ pipelines under `set -o pipefail`.
69
+
70
+ ## Common Workflows
71
+
72
+ **After creating a PR**
32
73
 
33
74
  1. Run `mmr review --pr <number>`
34
75
  2. Note the job ID from the output
@@ -38,6 +79,35 @@ mmr config test
38
79
  6. If gate failed: fix findings at or above the threshold severity
39
80
  7. If gate passed: proceed to merge
40
81
 
82
+ **Reviewing a document or arbitrary file**
83
+
84
+ Pick the case that matches what the user wants reviewed:
85
+
86
+ - **Just the pending edits** to a tracked file (what changed since last
87
+ commit): `git diff HEAD -- path/to/doc.md | mmr review --diff -
88
+ --focus "..."`. Fails with "no diff content" if the file has no
89
+ local changes.
90
+ - **The file's current contents**, whether it's tracked-with-no-
91
+ changes, untracked, or brand-new: wrap as a synthetic "all added"
92
+ diff first: `(diff -u /dev/null path/to/doc.md || true) |
93
+ mmr review --diff - --focus "..."`. The `|| true` guard avoids
94
+ `diff`'s exit-1-on-differences breaking the pipeline under
95
+ `set -o pipefail`.
96
+
97
+ Same dispatch / status / results flow as above.
98
+
99
+ **Reviewing uncommitted work before push**
100
+
101
+ 1. `git add` the files you want reviewed
102
+ 2. Run `mmr review --staged`
103
+ 3. Fix findings at or above the gate threshold, re-stage, re-run as needed
104
+
105
+ Prefer the wrapper tools (`scaffold run review-pr`, `scaffold run review-code`)
106
+ when they cover your target — they add auth checks, compensating passes, and
107
+ the agent-review channel on top of `mmr review`. Call `mmr review` directly
108
+ for targets the wrappers don't cover (docs, arbitrary diffs, ref ranges
109
+ outside `main`).
110
+
41
111
  ## Auth Failures
42
112
 
43
113
  If `mmr review` reports auth failures, follow the recovery instructions in the output:
@@ -202,9 +202,9 @@ When the user asks "what tools are available?", "what can I build?", or "show me
202
202
  | `scaffold run update` | Update scaffold to the latest version |
203
203
  | `scaffold run dashboard` | Open a visual progress dashboard in your browser |
204
204
  | `scaffold run prompt-pipeline` | Print the full pipeline reference table |
205
- | `scaffold run review-code` | Run all 3 code review channels on local code before commit or push |
206
- | `scaffold run review-pr` | Run all 3 code review channels (Codex CLI, Gemini CLI, Superpowers) on a PR |
207
- | `scaffold run post-implementation-review` | Full 3-channel codebase review after an AI agent completes all tasks |
205
+ | `scaffold run review-code` | Run all 3 CLI review channels (Codex CLI, Gemini CLI, Claude CLI) on tracked local code (committed branch diff + staged + unstaged — no untracked files) before commit or push, plus Superpowers code-reviewer as a complementary 4th channel |
206
+ | `scaffold run review-pr` | Run all 3 code review channels (Codex CLI, Gemini CLI, Claude CLI) on a PR, plus Superpowers code-reviewer as a complementary 4th channel |
207
+ | `scaffold run post-implementation-review` | Full codebase review (Codex CLI, Gemini CLI, Superpowers code-reviewer) after an AI agent completes all tasks |
208
208
  | `scaffold run session-analyzer` | Analyze Claude Code session logs for patterns and insights |
209
209
 
210
210
  **Display rules:**
@@ -240,7 +240,8 @@ Respond to these natural language requests:
240
240
  | "Is X applicable?" / "Do I need X?" | Run `scaffold check <step>` to detect platform and brownfield status |
241
241
  | "Set up memory" / "Configure AI memory" / "Add memory" | Run `scaffold run ai-memory-setup` — sets up modular rules, optional MCP memory server, and external context |
242
242
  | "Set up testing" / "Add Playwright" / "Add Maestro" | Run `scaffold run add-e2e-testing` — auto-detects web/mobile and configures the right framework(s) |
243
- | "Run multi-model review" / "Review stories with other models" | Run `scaffold run review-user-stories` at depth 5 (multi-model capabilities are now built into review-user-stories) |
243
+ | "Run multi-model review" / "Review X with all three models" | Route by target see [Multi-Model Review Routing](#multi-model-review-routing) |
244
+ | "Review stories with other models" | Run `scaffold run review-user-stories` at depth 5 (multi-model capabilities are built into review-user-stories) |
244
245
  | "Skip X" | Run `scaffold skip <step> --reason "<user's reason>"` |
245
246
  | "Skip X, Y, and Z" | Run `scaffold skip <step1> <step2> <step3> --reason "<reason>"` |
246
247
  | "What's left?" / "Show remaining" | Run `scaffold status --compact`, show only pending/in-progress steps |
@@ -338,28 +339,73 @@ scaffold check add-e2e-testing
338
339
 
339
340
  This is useful when the user asks "Do I need this step?" or when previewing which optional steps apply before running them.
340
341
 
342
+ ### Multi-Model Review Routing
343
+
344
+ When the user asks for a "multi-model review", "review this with all three models",
345
+ "run MMR on X", or similar — **do not assume the target is a PR**. Route based on
346
+ what the user is pointing at:
347
+
348
+ | Target | Command |
349
+ |---|---|
350
+ | GitHub PR (explicit number or current branch's PR) | `scaffold run review-pr [<PR#>]` |
351
+ | Local uncommitted / staged code, before commit or push | `scaffold run review-code` |
352
+ | Pending edits to a tracked file (changes since HEAD) | `git diff HEAD -- <path> \| mmr review --diff - --sync --format json` |
353
+ | Current contents of any file (tracked-with-no-changes, untracked, or brand-new) | `(diff -u /dev/null <path> \|\| true) \| mmr review --diff - --sync --format json` |
354
+ | A branch diff against main (or another ref) | `mmr review --base <ref> --head <ref> --sync --format json` |
355
+ | An existing patch or diff file | `mmr review --diff <path.patch> --sync --format json` |
356
+ | A diff piped from another command | `<cmd> \| mmr review --diff - --sync --format json` (stdin) |
357
+ | A user-story review specifically at depth 5 | `scaffold run review-user-stories` |
358
+
359
+ If the user's target is ambiguous ("review this with MMR"), ask once which of
360
+ the above applies — don't default to `review-pr` just because it's the most
361
+ common entry point. Doc reviews and uncommitted-work reviews are equally
362
+ first-class.
363
+
364
+ Pass `--focus "..."` to MMR when the user describes what to evaluate (clarity,
365
+ completeness, security, performance, etc.). See the `mmr` skill for all input
366
+ modes and flags.
367
+
368
+ **Note on `--diff`:** the flag requires diff-format content (path to a
369
+ `.patch`/`.diff` file, or `-` for stdin). To review a regular document or
370
+ source file, wrap it in a diff first using `git diff HEAD -- <path>`
371
+ (tracked) or `(diff -u /dev/null <path> || true)` (untracked — the
372
+ `|| true` guard is required because `diff` exits 1 whenever files
373
+ differ, which breaks pipelines under `set -o pipefail`) and pipe the
374
+ result into `mmr review --diff -`.
375
+
341
376
  ### Multi-Model Review at Depth 4-5
342
377
 
343
- All review and validation steps now support independent multi-model validation at depth 4-5 using Codex and/or Gemini CLIs. The `multi-model-dispatch` skill documents the correct invocation patterns:
378
+ All review and validation steps support independent multi-model validation at depth 4-5. Two distinct paths exist **never mix them** pick based on what step is running:
344
379
 
345
- - **Codex**: `codex exec --skip-git-repo-check -s read-only --ephemeral "prompt" 2>/dev/null` (NOT bare `codex`)
346
- - **Gemini**: `NO_BROWSER=true gemini -p "prompt" --output-format json --approval-mode yolo 2>/dev/null`
380
+ #### Path A: MMR-backed review (PREFERRED always use for these steps)
347
381
 
348
- **`NO_BROWSER=true` is required for all Gemini invocations** from Claude Code's Bash tool. Without it, Gemini's child process relaunch shows a consent prompt that hangs in non-TTY shells.
382
+ Applies to: `scaffold run review-pr`, `scaffold run review-code`, and any pipeline review step that invokes `mmr review` directly.
349
383
 
350
- **Auth verification is mandatory before dispatch.** CLI tokens expire mid-session. Before running any review at depth 4-5:
351
- 1. Check Codex auth: `codex login status`
352
- 2. Check Gemini auth: `NO_BROWSER=true gemini -p "respond with ok" -o json` (exit 41 = auth failure)
353
- 3. If auth fails, tell the user to re-authenticate: `! gemini -p "hello"` or `! codex login` (the `!` prefix runs it interactively with TTY access)
354
- 4. **Never silently skip a CLI due to auth failure** surface it to the user
384
+ - **Channel model:** three CLIs (Codex + Gemini + Claude) dispatched and reconciled by the MMR CLI; scaffold wrappers add the Superpowers code-reviewer agent as a complementary 4th channel reconciled into the same MMR job via `mmr reconcile`.
385
+ - **Note:** `scaffold run post-implementation-review` follows a different channel layout (raw-CLI dispatch of Codex + Gemini + Superpowers, with optional `mmr reconcile` injection if a prior `mmr review` job exists). Treat it as its own path — consult `content/tools/post-implementation-review.md` for specifics.
386
+ - **Invocation:** go through the wrapper (`scaffold run …`) or call `mmr review …` directly. Do NOT shell out to `codex`/`gemini`/`claude` yourself for these steps — MMR handles dispatch, parsing, compensating passes, and verdict.
387
+ - **Auth pre-flight:** run `mmr config test` once per session it probes all three CLIs and reports status in one call.
388
+ - **If auth fails** for any channel, surface recovery commands to the user: `! codex login`, `! gemini -p "hello"`, or `! claude login`. MMR will emit a compensating pass (via `claude -p`) for each missing external channel, labelled `[compensating: Codex-equivalent]` / `[compensating: Gemini-equivalent]`. Maximum achievable verdict in that case is `degraded-pass`.
389
+ - **Never silently skip a CLI due to auth failure** — surface it to the user.
390
+
391
+ #### Path B: Legacy / non-MMR direct dispatch
392
+
393
+ Applies to: some older depth-5 validation steps and any ad-hoc manual dispatch not routed through MMR. The `multi-model-dispatch` skill documents the raw invocation patterns:
394
+
395
+ - **Codex:** `codex exec --skip-git-repo-check -s read-only --ephemeral "prompt" 2>/dev/null` (NOT bare `codex`)
396
+ - **Gemini:** `NO_BROWSER=true gemini -p "prompt" --output-format json --approval-mode yolo 2>/dev/null`
397
+ - **Claude CLI:** `claude -p "prompt" --output-format json 2>/dev/null`
398
+
399
+ **`NO_BROWSER=true` is required for all Gemini invocations** from Claude Code's Bash tool. Without it, Gemini's child process relaunch shows a consent prompt that hangs in non-TTY shells.
355
400
 
356
- When running a review step at depth 4-5:
357
- 1. Check CLI availability before dispatching
358
- 2. If both available, run dual-model review for highest quality
359
- 3. If one available, run single-model external review
360
- 4. If neither available, fall back to Claude-only adversarial self-review
401
+ Auth pre-flight for Path B dispatch:
402
+ 1. Codex: `codex login status`
403
+ 2. Gemini: `NO_BROWSER=true gemini -p "respond with ok" -o json` (exit 41 = auth failure)
404
+ 3. Claude CLI: `claude -p "respond with ok"` (typically uses the active Claude Code session)
405
+ 4. If any fail: `! codex login`, `! gemini -p "hello"`, or `! claude login` (the `!` prefix runs it interactively with TTY access).
406
+ 5. **Never silently skip a CLI due to auth failure** — surface it to the user.
361
407
 
362
- The runner should surface the depth choice as a decision point for review steps, noting that depth 4-5 enables multi-model validation if CLIs are available.
408
+ The runner should surface the depth choice as a decision point for review steps, noting that depth 4-5 enables three-CLI multi-model validation when the CLIs are available.
363
409
 
364
410
  ## Batch Execution
365
411
 
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: review-code
3
3
  description: Run all configured code review channels on local code before commit or push
4
- summary: "Review the current local delivery candidate with Codex CLI, Gemini CLI, and Superpowers before committing or pushing, using staged changes, an explicit ref range, or the current branch diff."
4
+ summary: "Review the current local delivery candidate with the three MMR CLI channels (Codex CLI, Gemini CLI, Claude CLI) plus the Superpowers code-reviewer agent as a complementary 4th channel reconciled into the same MMR job, before committing or pushing. Supports staged changes, an explicit ref range, or the full local delivery candidate (committed branch diff + staged + unstaged); untracked files are not included."
5
5
  phase: null
6
6
  order: null
7
7
  dependencies: []
@@ -15,15 +15,27 @@ argument-hint: "[--base <ref>] [--head <ref>] [--staged] [--report-only]"
15
15
 
16
16
  ## Purpose
17
17
 
18
- Run the same three-channel review stack used by `review-pr`, but on local code
19
- before commit or push. This is the preflight review entry point for bug fixes,
20
- small features, and quick tasks when the user wants multi-model review before
21
- anything leaves the machine.
18
+ Run the same review stack used by `review-pr` (three MMR CLI channels plus
19
+ the Superpowers code-reviewer agent as a complementary 4th channel), but on
20
+ local code before commit or push. This is the preflight review entry point
21
+ for bug fixes, small features, and quick tasks when the user wants
22
+ multi-model review before anything leaves the machine.
22
23
 
23
- The three channels are:
24
+ The three CLI channels are:
24
25
  1. **Codex CLI** — implementation correctness, security, API contracts
25
26
  2. **Gemini CLI** — architectural patterns, broad-context reasoning
26
- 3. **Claude CLI** — Claude subagent review of code quality, tests, and plan alignment
27
+ 3. **Claude CLI** — code quality, tests, and plan alignment
28
+
29
+ Plus the 4th channel:
30
+ 4. **Superpowers code-reviewer** — agent-based review dispatched via the
31
+ `superpowers:code-reviewer` skill, reconciled into the same MMR job via
32
+ `mmr reconcile` for a unified verdict.
33
+
34
+ Scope: the full local delivery candidate (committed branch diff + staged +
35
+ unstaged changes) by default, or a narrower slice when `--staged` or
36
+ `--base`/`--head` flags are provided. **Untracked files are not reviewed** —
37
+ use `(diff -u /dev/null <path> || true) | mmr review --diff -` directly for
38
+ brand-new files.
27
39
 
28
40
  ## Inputs
29
41
 
@@ -40,7 +52,7 @@ The three channels are:
40
52
 
41
53
  ## Expected Outputs
42
54
 
43
- - A three-channel review summary for the local delivery candidate
55
+ - A reconciled four-channel review summary for the local delivery candidate (three MMR CLI channels + Superpowers code-reviewer)
44
56
  - One of these verdicts: `pass`, `degraded-pass`, `blocked`, `needs-user-decision`
45
57
  - Fixed code when findings are resolved in normal mode
46
58
 
@@ -48,16 +60,58 @@ The three channels are:
48
60
 
49
61
  ### Primary: MMR CLI + Agent Reconcile
50
62
 
51
- When the MMR CLI is installed, use it as the primary entry point:
63
+ When the MMR CLI is installed, use it as the primary entry point. Pick the
64
+ invocation that matches the scope the user asked for:
52
65
 
53
66
  ```bash
54
- # Staged changes
67
+ # Default (no flags) — full local delivery candidate:
68
+ # committed branch diff (vs origin/main or main) + staged + unstaged.
69
+ # `mmr review` with no input flags defaults to `git diff` alone
70
+ # (unstaged only), so we MUST synthesize the combined bundle explicitly
71
+ # and pipe it in via --diff -:
72
+ # Resolve the TRUNK ref (not the branch's own upstream — we want the
73
+ # full delivery candidate, not just un-pushed work). Precedence:
74
+ # origin/HEAD (the remote's default branch) → origin/main → main →
75
+ # origin/master → master → HEAD~1 → HEAD (working-tree-only fallback).
76
+ # NOTE: do NOT use `@{u}` / branch upstream here — on a feature branch
77
+ # that tracks `origin/<branch>`, `@{u}` is that remote branch, so
78
+ # diffing against its merge-base would silently exclude already-pushed
79
+ # branch commits from the review.
80
+ BASE_REF=""
81
+ if ORIGIN_HEAD=$(git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null); then BASE_REF="${ORIGIN_HEAD#refs/remotes/}"
82
+ elif git rev-parse --verify origin/main >/dev/null 2>&1; then BASE_REF=origin/main
83
+ elif git rev-parse --verify main >/dev/null 2>&1; then BASE_REF=main
84
+ elif git rev-parse --verify origin/master >/dev/null 2>&1; then BASE_REF=origin/master
85
+ elif git rev-parse --verify master >/dev/null 2>&1; then BASE_REF=master
86
+ elif git rev-parse --verify HEAD~1 >/dev/null 2>&1; then BASE_REF=HEAD~1
87
+ else BASE_REF=HEAD
88
+ fi
89
+ # Compute the merge-base so we only review the local delivery candidate,
90
+ # not unrelated upstream changes that have accumulated on BASE_REF since
91
+ # the branch diverged. `git diff <merge-base>` then compares that point
92
+ # to the working tree (including the index), giving one coherent patch
93
+ # that covers committed branch work + staged + unstaged edits, with
94
+ # repeated edits to the same file collapsed into a single final hunk.
95
+ MERGE_BASE=$(git merge-base "$BASE_REF" HEAD 2>/dev/null || echo "$BASE_REF")
96
+ git diff "$MERGE_BASE" | mmr review --diff - --sync --format json
97
+
98
+ # Staged changes only:
55
99
  mmr review --staged --sync --format json
56
100
 
57
- # Branch diff against main
101
+ # Branch diff against main (committed only, no staged/unstaged):
58
102
  mmr review --base main --sync --format json
103
+
104
+ # Explicit ref range:
105
+ mmr review --base <base-ref> --head <head-ref> --sync --format json
59
106
  ```
60
107
 
108
+ Routing rules:
109
+ - If `--staged` flag passed to the tool → use the `--staged` MMR invocation
110
+ - If `--base`/`--head` flags passed → use the ref-range MMR invocation
111
+ - Otherwise (no flags) → use the synthesized full-delivery-candidate form
112
+ above. Do NOT fall back to bare `mmr review` — it would miss committed
113
+ and staged work.
114
+
61
115
  After the CLI review completes, dispatch the agent's code-reviewer skill (4th channel) and inject findings into the MMR job for unified reconciliation:
62
116
 
63
117
  ```bash
@@ -89,11 +143,14 @@ Determine the delivery candidate to review.
89
143
 
90
144
  #### Mode A: Explicit ref range
91
145
 
92
- If both `BASE_REF` and `HEAD_REF` are provided:
146
+ If `BASE_REF` is provided (with or without `HEAD_REF`):
93
147
 
94
148
  ```bash
95
149
  git rev-parse --verify "$BASE_REF"
96
- git rev-parse --verify "$HEAD_REF"
150
+ # When --head is omitted, default head to HEAD so the base-only form
151
+ # mirrors the MMR primary path (`mmr review --base <ref>`).
152
+ HEAD_REF="${HEAD_REF:-HEAD}"
153
+ [ "$HEAD_REF" != "HEAD" ] && git rev-parse --verify "$HEAD_REF"
97
154
  REVIEW_DIFF=$(git diff "$BASE_REF...$HEAD_REF")
98
155
  CHANGED_FILES=$(git diff --name-only "$BASE_REF...$HEAD_REF")
99
156
  ```
@@ -198,7 +255,7 @@ codex login status 2>/dev/null
198
255
  - If `codex` is not installed: skip this channel and record root-cause `not_installed`
199
256
  - If auth fails: tell the user to run `! codex login`, retry after recovery, and if recovery is not possible, record root-cause `auth_failed` and continue with the remaining channels
200
257
 
201
- If auth cannot be recovered, or if Codex is not installed, queue a compensating Claude self-review pass focused on implementation correctness, security, and API contracts. Label findings as `[compensating: Codex-equivalent]`. If auth check times out (~5s), retry once; if still failing, record `timeout` and queue compensating pass. This pass runs after all channel dispatch attempts complete.
258
+ If auth cannot be recovered, or if Codex is not installed, queue a compensating Claude self-review pass focused on implementation correctness, security, and API contracts. Label findings as `[compensating: Codex-equivalent]`. If the auth check times out (the configured `channels.codex.auth.timeout`; 5s by default since Codex's check is a local file probe), retry once; if still failing, record `timeout` and queue compensating pass. This pass runs after all channel dispatch attempts complete.
202
259
 
203
260
  Build the prompt in a temporary file and pass it over stdin:
204
261
 
@@ -222,7 +279,7 @@ NO_BROWSER=true gemini -p "respond with ok" -o json 2>&1
222
279
  - If `gemini` is not installed: skip this channel and record root-cause `not_installed`
223
280
  - If auth fails (including exit 41): tell the user to run `! gemini -p "hello"`, retry after recovery, and if recovery is not possible, record root-cause `auth_failed` and continue with the remaining channels
224
281
 
225
- If auth cannot be recovered, or if Gemini is not installed, queue a compensating Claude self-review pass focused on architectural patterns, design reasoning, and broad context. Label findings as `[compensating: Gemini-equivalent]`. If auth check times out (~5s), retry once; if still failing, record `auth timeout` and queue compensating pass. This pass runs after all channel dispatch attempts complete.
282
+ If auth cannot be recovered, or if Gemini is not installed, queue a compensating Claude self-review pass focused on architectural patterns, design reasoning, and broad context. Label findings as `[compensating: Gemini-equivalent]`. If the auth check times out (the configured `channels.gemini.auth.timeout`; 20s by default since Gemini's check is a full LLM round-trip), retry once; if still failing, record `auth timeout` and queue compensating pass. This pass runs after all channel dispatch attempts complete.
226
283
 
227
284
  Build the prompt in a temporary file and pass it as a single prompt string:
228
285
 
@@ -348,7 +405,8 @@ Output a concise summary in this format:
348
405
  ### Channels Executed
349
406
  - Codex CLI — root cause: [completed / not_installed / auth_failed / timeout / failed], coverage: [full / compensating (Codex-equivalent)]
350
407
  - Gemini CLI — root cause: [completed / not_installed / auth_failed / timeout / failed], coverage: [full / compensating (Gemini-equivalent)]
351
- - Claude CLI — root cause: [completed / not_installed / auth_failed / timeout / failed], coverage: [full / compensating]
408
+ - Claude CLI — root cause: [completed / not_installed / auth_failed / timeout / failed], coverage: [full / none (Claude is never compensated — it IS the compensator for Codex/Gemini)]
409
+ - Agent review (Superpowers code-reviewer, 4th channel) — [completed / skipped], injected via `mmr reconcile`
352
410
 
353
411
  ### Findings
354
412
  [consensus findings first, then single-source findings]
@@ -14,9 +14,28 @@ argument-hint: "<PR number or blank for current branch>"
14
14
 
15
15
  ## Purpose
16
16
 
17
- Run all three code review channels on a pull request and reconcile findings.
18
- This is the single entry point for PR code review agents call this once instead
19
- of remembering three separate review invocations.
17
+ Run the three CLI review channels (Codex, Gemini, Claude) on a pull request
18
+ **plus** the Superpowers code-reviewer agent as a complementary 4th channel,
19
+ and reconcile all findings through MMR. This is the single entry point for
20
+ **PR-scoped** code review — agents call this once instead of remembering four
21
+ separate review invocations.
22
+
23
+ **For non-PR targets**, don't use this tool. Call `mmr review` directly with
24
+ the appropriate input mode, or use `scaffold run review-code` for local
25
+ pre-commit review:
26
+
27
+ - `mmr review --staged` — staged changes
28
+ - `mmr review --base <ref> --head <ref>` — branch diff
29
+ - `mmr review --diff <path.patch>` — existing diff/patch file
30
+ - `<git diff …> | mmr review --diff -` — any piped diff (including a single
31
+ tracked file via `git diff HEAD -- <path>`, or a new file via
32
+ `(diff -u /dev/null <path> || true)` — the `|| true` guard is required
33
+ because `diff` exits 1 whenever files differ, which breaks pipelines
34
+ under `set -o pipefail`)
35
+
36
+ The `--diff` flag expects diff-format content; it does not read raw document
37
+ content. The three-channel review itself is not PR-specific — this tool is
38
+ just the PR wrapper around the more general `mmr review` CLI.
20
39
 
21
40
  The three channels are:
22
41
  1. **Codex CLI** — OpenAI's code analysis (implementation correctness, security, API contracts)
@@ -34,7 +53,7 @@ in the review criteria config rather than read at dispatch time.
34
53
 
35
54
  ## Expected Outputs
36
55
 
37
- - All three review channels executed (or fallback documented)
56
+ - All three CLI review channels executed (or fallback documented) plus the Superpowers code-reviewer 4th channel reconciled via `mmr reconcile`
38
57
  - P0/P1/P2 findings fixed before proceeding
39
58
  - Review summary with per-channel results and reconciliation
40
59
 
@@ -161,7 +180,7 @@ Output a review summary in this format:
161
180
  ### Channels Executed
162
181
  - [ ] Codex CLI — root cause: [completed / not installed / auth failed / timeout / failed], coverage: [full / compensating (Codex-equivalent)]
163
182
  - [ ] Gemini CLI — root cause: [completed / not installed / auth failed / timeout / failed], coverage: [full / compensating (Gemini-equivalent)]
164
- - [ ] Claude CLI — root cause: [completed / not_installed / auth_failed / timeout / failed], coverage: [full / compensating]
183
+ - [ ] Claude CLI — root cause: [completed / not_installed / auth_failed / timeout / failed], coverage: [full / none (Claude is never compensated — it IS the compensator for Codex/Gemini)]
165
184
  - [ ] Agent review — [completed / skipped], injected via mmr reconcile
166
185
 
167
186
  ### Consensus Findings (High Confidence)
@@ -226,7 +245,7 @@ Do NOT proceed to the next task or merge until this confirmation is output.
226
245
  ## Process Rules
227
246
 
228
247
  1. **Foreground only** — Always run Codex, Gemini, and Claude CLI commands as foreground Bash calls. Never use `run_in_background`, `&`, or `nohup`.
229
- 2. **All three channels are mandatory** — Codex CLI, Gemini CLI, and Claude CLI. Skip only when a tool is genuinely not installed, never by choice.
248
+ 2. **All three CLI channels are mandatory** — Codex CLI, Gemini CLI, and Claude CLI. Plus the Superpowers code-reviewer agent as a complementary 4th channel reconciled via `mmr reconcile` (Step 3). Skip a CLI channel only when a tool is genuinely not installed or auth cannot be recovered (in which case MMR emits a compensating pass for missing Codex/Gemini channels; a missing Claude CLI has no compensator). Never skip by choice.
230
249
  3. **Auth failures are not silent** — always surface to the user with the exact recovery command.
231
250
  4. **Independence** — never share one channel's output with another. Each reviews the diff independently.
232
251
  5. **Fix before proceeding** — P0/P1/P2 findings must be resolved before moving to the next task.
@@ -1 +1 @@
1
- {"version":3,"file":"check.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/check.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAW1C,UAAU,SAAS;IACjB,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AA+FD,QAAA,MAAM,YAAY,EAAE,aAAa,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,SAAS,CA0NnE,CAAA;AAED,eAAe,YAAY,CAAA"}
1
+ {"version":3,"file":"check.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/check.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAW1C,UAAU,SAAS;IACjB,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AA+FD,QAAA,MAAM,YAAY,EAAE,aAAa,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,SAAS,CAmOnE,CAAA;AAED,eAAe,YAAY,CAAA"}