@crown-dev-studios/review-council 0.1.0 → 0.3.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.
package/README.md CHANGED
@@ -1,13 +1,12 @@
1
1
  # Review Council
2
2
 
3
- Review Council is a package-first CLI for multi-agent code review orchestration. It runs Claude, Codex, or other local reviewer CLIs against the same target, collects raw artifacts, runs a judge pass, and renders a static review bundle.
3
+ Review Council is a standalone skill repo for model-parallel code review. It runs Claude and Codex in parallel with selected skill references (architecture-review, testing-philosophy, plan-compliance) passed into reviewer prompts as additional review lenses, then synthesizes all findings through an LLM judge with semantic deduplication, contradiction detection, and dependency ordering.
4
4
 
5
5
  Use it when you want:
6
6
 
7
- - side-by-side raw reviews before creating final todos
8
- - isolated reviewer runs or separate worktrees
9
- - a judge step that confirms, contests, or rejects findings
10
- - a static HTML report plus machine-readable JSON output
7
+ - model-parallel review where Claude and Codex each independently apply specialized review skills
8
+ - a judge that deduplicates across both models, detects contradictions, and orders findings by dependency
9
+ - automated self-review integrated into agentic workflows
11
10
 
12
11
  ## Status
13
12
 
@@ -15,7 +14,6 @@ The orchestrator handles the happy path and common failure modes:
15
14
 
16
15
  - Stage timeouts with two-phase kill (SIGTERM then SIGKILL) prevent hung runs
17
16
  - Automatic retry with exponential backoff handles transient failures
18
- - Schema validation catches malformed reviewer and judge output
19
17
  - Interactive prompts from reviewer CLIs are detected and relayed to the user
20
18
  - Partial reviewer failure still allows the judge to run on available data
21
19
  - Failed stages surface stderr excerpts and validation errors in the HTML report
@@ -23,24 +21,14 @@ The orchestrator handles the happy path and common failure modes:
23
21
  ## Requirements
24
22
 
25
23
  - Node.js 20+
24
+ - `pnpm` 10.30.3+
26
25
  - `claude` and/or `codex` on `PATH`
27
26
  - a Git working tree to review
28
- - reviewer CLIs authenticated and able to run non-interactively when possible
29
27
 
30
28
  ## Install
31
29
 
32
- Run it directly:
33
-
34
30
  ```bash
35
- npx @crown-dev-studios/review-council --help
36
- ```
37
-
38
- Other package install paths:
39
-
40
- ```bash
41
- pnpm dlx @crown-dev-studios/review-council --help
42
- npm install -g @crown-dev-studios/review-council
43
- review-council --help
31
+ npx @crown-dev-studios/review-council --target "staged changes" --open-html
44
32
  ```
45
33
 
46
34
  ## Quick Start
@@ -50,62 +38,48 @@ From the project root you want to review:
50
38
  ```bash
51
39
  npx @crown-dev-studios/review-council \
52
40
  --target "staged changes" \
53
- --review-id staged-changes-review \
54
- --claude-command 'claude -p --disable-slash-commands --permission-mode acceptEdits "$(cat "$CLAUDE_DIR/claude-review-export.md")" < /dev/null' \
55
- --codex-command 'codex exec --sandbox workspace-write -o "$CODEX_DIR/last-message.txt" "$(cat "$CODEX_DIR/codex-review-export.md")"' \
56
- --judge-command 'codex exec --sandbox workspace-write -o "$JUDGE_DIR/last-message.txt" "$(cat "$JUDGE_DIR/judge.md")"'
41
+ --open-html
57
42
  ```
58
43
 
59
- That writes a run bundle under `docs/reviews/<review-id>/runs/<run-id>/` in the project being reviewed. Pass `--review-id` explicitly when you want the same review to be easy to correlate across reruns.
44
+ That's it. Claude + Codex review in parallel, Codex judge, HTML report opens in your browser. Output goes to `docs/reviews/<run-id>/`.
60
45
 
61
46
  Main outputs:
62
47
 
63
48
  - `judge/summary.md`
64
49
  - `judge/verdict.json`
50
+ - `follow-ups.md`
65
51
  - `bundle.json`
66
52
  - `index.html`
67
53
 
68
- ## Skill Install
69
-
70
- Optional: install it as a slash-invocable skill by copying or symlinking this directory:
71
-
72
- ```bash
73
- cp -R ~/src/review-council ~/.claude/skills/review-council
74
- cp -R ~/src/review-council ~/.codex/skills/review-council
75
- ```
76
-
77
- The skill docs and the published package describe the same runtime: invoke `npx @crown-dev-studios/review-council ...` from the repo you want to review so outputs stay rooted in that caller repo.
78
-
79
54
  ## CLI Options
80
55
 
81
56
  ```
82
57
  --target <target> Review target label (required)
83
- --review-id <id> Stable review identifier
84
58
  --run-dir <dir> Output directory for this run
85
- --review-profile <id> Reviewer prompt profile (default: default)
86
- --judge-profile <id> Judge prompt profile (default: default)
87
- --claude-prompt-template <path> Override Claude reviewer prompt template
88
- --codex-prompt-template <path> Override Codex reviewer prompt template
89
- --judge-prompt-template <path> Override judge prompt template
90
- --claude-command <command> Shell command for the Claude reviewer
91
- --codex-command <command> Shell command for the Codex reviewer
92
- --judge-command <command> Shell command for the judge stage
93
- --allow-missing-sentinel Treat exit code 0 as success without done.json
59
+ --no-claude Skip Claude reviewer
60
+ --no-codex Skip Codex reviewer
94
61
  --skip-judge Skip the judge stage
95
- --skip-html Skip HTML rendering
62
+ --skill-paths <paths> Comma-separated paths to skill directories
96
63
  --open-html Open index.html after rendering (macOS)
64
+ --skip-html Skip HTML rendering
97
65
  --timeout <ms> Stage timeout in ms (default: 300000)
98
66
  --retries <n> Max retries per stage on failure (default: 2)
99
67
  ```
100
68
 
101
- ## Operating Notes
69
+ ### Overrides (optional)
70
+
71
+ ```
72
+ --claude-command <command> Override default Claude reviewer command
73
+ --codex-command <command> Override default Codex reviewer command
74
+ --judge-command <command> Override default judge command
75
+ --allow-missing-sentinel Treat exit code 0 as success without done.json
76
+ ```
77
+
78
+ ## Operational Rules
102
79
 
103
80
  - Use non-interactive reviewer commands when possible. Interactive prompts are detected and relayed to the user, but explicit non-interactive mode is more reliable.
104
- - Use `claude -p --disable-slash-commands --permission-mode acceptEdits ... < /dev/null` for Claude reviewer runs. This keeps the run in headless mode, disables skills, allows artifact writes into the stage directory without interactive approval prompts, and prevents Claude from waiting on stdin during fully non-interactive runs.
105
- - Codex reviewer and judge commands must run with a writable sandbox, for example `codex exec --sandbox workspace-write ...`, because they need to write review artifacts into the run directory.
106
- - `--skip-judge` disables judge prompt rendering, judge command validation, and judge execution.
107
81
  - Keep reviewer artifacts inside the run directory.
108
- - Every reviewer and judge JSON artifact should carry the same `review_id` and `run_id` as `run.json`.
82
+ - Selected skills are passed into reviewer prompts as additional review lenses for the run; the orchestrator does not inline local `SKILL.md` contents.
109
83
  - Do not create authoritative files in `todos/` during raw review.
110
84
  - If you reuse `workflows-review`, run each reviewer in a separate worktree.
111
85
 
@@ -118,53 +92,47 @@ If a run fails or stalls, inspect:
118
92
  - `<run>/judge/status.json`
119
93
  - each stage's `stdout.log` and `stderr.log`
120
94
 
121
- The `status.json` for each stage includes `review_id`, `run_id`, `exit_code`, `timed_out`, `attempts`, `missing_artifacts`, `failure_reason`, and `validation_errors`. The HTML report surfaces missing artifacts, stderr excerpts, and validation errors for failed stages in a diagnostics section.
95
+ The `status.json` for each stage includes `exit_code`, `timed_out`, `attempts`, `retried`, and `validation_errors` fields. The HTML report surfaces stderr excerpts and validation errors for failed stages in a diagnostics section.
122
96
 
123
97
  If a stage exits `0` but does not write `done.json`, the stage is incomplete and the run should be treated as failed.
124
98
 
125
- ## Development
99
+ ## Publishing (maintainers)
126
100
 
127
- Contributor workflow from a source checkout:
101
+ Canonical release version lives in the [`VERSION`](VERSION) file and must match `version` in [`package.json`](package.json).
128
102
 
129
- ```bash
130
- cd ~/src/review-council
131
- pnpm install
132
- pnpm typecheck
133
- pnpm test
134
- ```
103
+ **Prerequisites**
135
104
 
136
- Package verification:
105
+ - [`npm login`](https://docs.npmjs.com/cli/v11/commands/npm-login) (or another auth method `pnpm publish` can use for the public registry)
106
+ - A **clean** git working tree in this repository
107
+ - Git tag `vX.Y.Z` present locally before deploy (created by the bump script or manually)
108
+ - Permission to publish `@crown-dev-studios/review-council` on npm
137
109
 
138
- ```bash
139
- pnpm verify:package
140
- ```
110
+ **Scripts (same idea as `simple-auth`)**
141
111
 
142
- That verification path:
112
+ | Step | Command |
113
+ |------|---------|
114
+ | Preflight only (build, test, pack dry-run) | `pnpm run release:preflight` or `./scripts/prepare-release.sh` |
115
+ | Confirm `VERSION` ↔ `package.json` | `pnpm run release:check-version` or `./scripts/check-version.sh` |
116
+ | Require local tag exists | `./scripts/check-version.sh --require-tag` |
117
+ | Bump version, refresh lockfile, commit + tag (+ push) | `pnpm run release:bump -- patch` (or `major` / `minor` / `1.2.3`) |
118
+ | Publish to npm | `pnpm run release:deploy` or `./scripts/deploy.sh` |
143
119
 
144
- - builds `dist/`
145
- - inspects `npm pack --dry-run` output with a repo-local npm cache
146
- - installs the local tarball into a temporary caller repo
147
- - verifies `review-council --help` and a minimal end-to-end run
120
+ **Typical release**
148
121
 
149
- First publish and post-publish checks:
122
+ 1. `./scripts/bump-version.sh patch` — updates `VERSION`, `package.json`, `pnpm-lock.yaml`, commits, tags `v…`, pushes (omit `--no-push` / `--no-tag` as needed).
123
+ 2. `./scripts/check-version.sh --require-tag`
124
+ 3. `./scripts/deploy.sh --dry-run` (optional)
125
+ 4. `./scripts/deploy.sh` — pushes branch + tag (unless `--skip-git`), runs install/build/test/verify, then `pnpm publish --access public`.
150
126
 
151
- ```bash
152
- pnpm release:manual
153
- npm view @crown-dev-studios/review-council version
154
- npx @crown-dev-studios/review-council --help
155
- ```
127
+ Options: `./scripts/deploy.sh --dry-run` (no push/publish), `./scripts/deploy.sh --skip-git` (publish only; you already pushed).
128
+
129
+ Update [`package.json`](package.json) `repository` / `homepage` / `bugs` if the GitHub repo URL differs from `@crown-dev-studios/review-council` on GitHub.
156
130
 
157
131
  ## Files
158
132
 
159
133
  - [SKILL.md](SKILL.md)
160
134
  - [references/cli-integration.md](references/cli-integration.md)
161
135
  - [references/output-contract.md](references/output-contract.md)
162
- - [src/cli.ts](src/cli.ts)
163
136
  - [src/orchestrate-review-council.ts](src/orchestrate-review-council.ts)
164
137
  - [src/render-review-html.ts](src/render-review-html.ts)
165
138
  - [src/interaction-queue.ts](src/interaction-queue.ts)
166
- - [src/review-session.ts](src/review-session.ts)
167
- - [src/schemas.ts](src/schemas.ts)
168
- - [src/types.ts](src/types.ts)
169
- - [test/package-smoke.test.mjs](test/package-smoke.test.mjs)
170
- - [test/validate-schema.test.ts](test/validate-schema.test.ts)
package/SKILL.md CHANGED
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: review-council
3
- description: Orchestrate Claude, Codex, or other local CLI reviewers against the same target, wait for their exported findings, run a judge pass, and generate a static HTML plus markdown review bundle. Use when you want side-by-side raw reviews before creating final todos.
3
+ description: Orchestrate model-parallel code review with selected skill references. Runs Claude and Codex in parallel with those skill references listed in reviewer prompts as additional review lenses, then synthesizes all findings through an LLM judge with semantic deduplication, contradiction detection, and dependency ordering.
4
4
  argument-hint: [staged|branch main..HEAD|pr 123|commit abc123]
5
5
  disable-model-invocation: true
6
6
  ---
@@ -9,254 +9,140 @@ disable-model-invocation: true
9
9
 
10
10
  ## Purpose
11
11
 
12
- `/review-council` is the manual entrypoint for multi-agent code review orchestration.
12
+ `/review-council` orchestrates multi-source code review:
13
13
 
14
- This directory is intended to be both a standalone skill repo and the source for the published npm package. The prompt templates, schemas, renderer, and orchestrator all live here.
14
+ - **Model reviewers** (Claude + Codex) provide general-purpose parallel review via CLI processes
15
+ - **Selected review skills** (architecture-review, testing-philosophy, plan-compliance) are listed in each model reviewer's prompt for that run
16
+ - **Judge** synthesizes all findings with semantic dedup, contradiction detection, and dependency ordering
15
17
 
16
- It is intentionally separate from `workflows-review`:
17
-
18
- - `workflows-review` is optimized for single-agent review and immediate todo creation
19
- - `review-council` is optimized for parallel raw review, adjudication, and artifact rendering
20
-
21
- Use this when you want:
22
-
23
- - a Claude review and a Codex review on the same target
24
- - isolated worktrees or isolated CLI runs per reviewer
25
- - raw reviewer artifacts stored outside `todos/`
26
- - a judge step that decides which findings are valid
27
- - a static HTML page next to the final markdown judge summary
18
+ All reviewers run in parallel. The judge adjudicates the combined results. A static HTML report is rendered for human review.
28
19
 
29
20
  ## Prerequisites
30
21
 
31
- - Node.js 20+
32
- - `claude` and/or `codex` on `PATH` for the stages you want to run
22
+ - Node.js and pnpm (for the TS orchestrator)
23
+ - `claude` and/or `codex` on `PATH` for model reviewers
33
24
  - A Git working tree to review
34
- - Reviewer CLIs must already be authenticated and able to run non-interactively
35
-
36
- ## Quick Start
25
+ - Skill directories available for `--skill-paths` (e.g., `~/.agents/skills/architecture-review`)
37
26
 
38
- 1. Put this directory somewhere stable, for example `~/src/review-council`.
39
-
40
- 2. Optional: install it as a slash-invocable skill by copying or symlinking this directory to one or both skill locations:
41
-
42
- ```bash
43
- cp -R ~/src/review-council ~/.claude/skills/review-council
44
- cp -R ~/src/review-council ~/.codex/skills/review-council
45
- ```
46
-
47
- 3. Review or customize the command templates in [cli-integration.md](references/cli-integration.md).
48
-
49
- No external `/review-export` command is required. The orchestrator renders self-contained prompt files into each stage directory before launching reviewer CLIs.
50
-
51
- 4. From the project root you want to review, run the published CLI. By default it writes each run under `docs/reviews/<review-id>/runs/<run-id>/` in the current project:
52
-
53
- ```bash
54
- npx @crown-dev-studios/review-council \
55
- --target "staged changes" \
56
- --review-id staged-changes-review \
57
- --claude-command 'claude -p --disable-slash-commands --permission-mode acceptEdits "$(cat "$CLAUDE_DIR/claude-review-export.md")" < /dev/null' \
58
- --codex-command 'codex exec --sandbox workspace-write -o "$CODEX_DIR/last-message.txt" "$(cat "$CODEX_DIR/codex-review-export.md")"' \
59
- --judge-command 'codex exec --sandbox workspace-write -o "$JUDGE_DIR/last-message.txt" "$(cat "$JUDGE_DIR/judge.md")"' \
60
- --timeout 300000 \
61
- --retries 2
62
- ```
63
-
64
- - `--timeout <ms>`: per-stage timeout (default 300000 — 5 minutes). On timeout the process receives SIGTERM, then SIGKILL after a 5-second grace period.
65
- - `--retries <n>`: max retries per stage on non-timeout failure (default 2). Uses exponential backoff starting at 2 seconds.
66
- - For Claude reviewer runs, use `claude -p --disable-slash-commands --permission-mode acceptEdits ... < /dev/null`. This keeps the run headless, disables skills, allows artifact writes into the stage directory without interactive approval prompts, and avoids stdin wait warnings.
67
- - When using Codex for reviewer or judge stages, include `--sandbox workspace-write` so it can write artifacts into the run directory.
68
- - `--skip-judge` disables judge prompt rendering, judge command validation, and judge execution.
69
- - Pass `--review-id` explicitly when you want the same review to be easy to correlate across reruns.
70
-
71
- If the package is already installed globally, `review-council --target ...` is equivalent.
27
+ ## Workflow
72
28
 
73
- ### Development from a Source Checkout
29
+ ### Step 1: Scope Detection
74
30
 
75
- The packaged CLI is the supported runtime. Contributor workflow remains source-first:
31
+ Normalize the argument into one of these forms:
76
32
 
77
- ```bash
78
- cd ~/src/review-council
79
- pnpm install
80
- pnpm typecheck
81
- pnpm test
82
- pnpm verify:package
83
- ```
84
-
85
- This produces:
86
-
87
- - `docs/reviews/<review-id>/runs/<run-id>/judge/summary.md`
88
- - `docs/reviews/<review-id>/runs/<run-id>/judge/verdict.json`
89
- - `docs/reviews/<review-id>/runs/<run-id>/bundle.json`
90
- - `docs/reviews/<review-id>/runs/<run-id>/index.html`
91
-
92
- ### Example findings.json
93
-
94
- ```json
95
- {
96
- "review_id": "staged-changes-review",
97
- "run_id": "20260318-143000123-abc12345",
98
- "reviewer": "claude",
99
- "target": "staged changes",
100
- "generated_at": "2026-03-07T18:30:00Z",
101
- "summary": "Found two issues: one SQL injection and one missing index.",
102
- "findings": [
103
- {
104
- "id": "F001",
105
- "title": "SQL injection in search endpoint",
106
- "severity": "p1",
107
- "confidence": "high",
108
- "category": "security",
109
- "description": "Unsanitized user input passed directly to raw SQL query.",
110
- "evidence": "db.query(`SELECT * FROM users WHERE name = '${input}'`)",
111
- "recommended_fix": "Use parameterized queries instead of string interpolation.",
112
- "files": [
113
- { "path": "src/routes/search.ts", "line": 42 }
114
- ]
115
- },
116
- {
117
- "id": "F002",
118
- "title": "Missing index on users.email",
119
- "severity": "p3",
120
- "confidence": "medium",
121
- "category": "performance",
122
- "description": "The users.email column is queried frequently but has no index.",
123
- "evidence": "Query plan shows sequential scan on users table.",
124
- "recommended_fix": "Add a B-tree index on users.email.",
125
- "files": [
126
- { "path": "db/migrations/001_create_users.sql" }
127
- ]
128
- }
129
- ]
130
- }
131
- ```
33
+ - `staged changes` — review staged (cached) changes
34
+ - `branch main..feature-branch` — review branch diff
35
+ - `pr 123` — review a pull request
36
+ - `commit abc123` — review a specific commit
132
37
 
133
- ### Example verdict.json
134
-
135
- ```json
136
- {
137
- "review_id": "staged-changes-review",
138
- "run_id": "20260318-143000123-abc12345",
139
- "target": "staged changes",
140
- "generated_at": "2026-03-07T14:30:00Z",
141
- "overall_verdict": "needs-fixes",
142
- "summary_markdown": "Two confirmed issues require attention before merge.",
143
- "confirmed_findings": [
144
- {
145
- "title": "SQL injection in search endpoint",
146
- "status": "confirmed",
147
- "reason": "Both reviewers flagged unsanitized user input passed to raw query.",
148
- "final_priority": "p1",
149
- "reviewer_ids": ["claude", "codex"]
150
- }
151
- ],
152
- "contested_findings": [
153
- {
154
- "title": "Missing index on users.email",
155
- "status": "contested",
156
- "reason": "Claude flagged as p2 but Codex noted the table has <1k rows.",
157
- "final_priority": "p3",
158
- "reviewer_ids": ["claude"]
159
- }
160
- ],
161
- "rejected_findings": [
162
- {
163
- "title": "Unused import in helpers.ts",
164
- "status": "rejected",
165
- "reason": "Import is used in a type-only context; no runtime impact."
166
- }
167
- ],
168
- "todo_recommendations": [
169
- {
170
- "title": "Parameterize search query to prevent SQL injection",
171
- "priority": "p1",
172
- "reason": "Confirmed by both reviewers as a security vulnerability."
173
- }
174
- ]
175
- }
176
- ```
38
+ Generate the diff for analysis:
39
+ - Staged: `git diff --cached`
40
+ - Branch: `git diff main..HEAD`
41
+ - PR: `gh pr diff 123`
42
+ - Commit: `git show abc123`
177
43
 
178
- ## Workflow
44
+ ### Step 2: Intent Discovery
179
45
 
180
- ### Step 1: Choose the Review Target
46
+ Analyze the diff to understand what changed and guide reviewer selection:
181
47
 
182
- Normalize the target into one of these forms:
48
+ 1. **Categorize changed files:** source code, tests, config, docs, migrations, schemas.
49
+ 2. **Identify modules/services touched:** which packages, directories, or service boundaries are affected.
50
+ 3. **Classify change nature:** new feature, bug fix, refactor, test addition, config change.
51
+ 4. **Gather stated intent:**
52
+ - PR mode: read the PR description and linked issues.
53
+ - Branch mode: read commit messages.
54
+ 5. **Check for a plan:** look in `docs/plans/active/` and `docs/plans/` for a plan that references the changed files.
183
55
 
184
- - `staged changes`
185
- - `branch main..feature-branch`
186
- - `pr 123`
187
- - `commit abc123`
56
+ Output a brief intent summary that will be included in all reviewer prompts.
188
57
 
189
- ### Step 2: Spawn Reviewer CLIs
58
+ ### Step 3: Select Review Skills
190
59
 
191
- The parent agent is the orchestrator. It should not do the review itself.
60
+ Based on intent discovery, select which review skills to include:
192
61
 
193
- Its job is to:
62
+ | Signal | Skill |
63
+ |--------|-------|
64
+ | Service boundary, data model, or migration files changed | `architecture-review` |
65
+ | Test files or test-adjacent source code changed | `testing-philosophy` |
66
+ | Plan exists in `docs/plans/` or ticket has a linked plan | `plan-compliance` |
194
67
 
195
- 1. Create a run directory
196
- 2. Spawn reviewer CLIs with explicit commands
197
- 3. Wait for both reviewers to finish
198
- 4. Confirm each reviewer wrote `done.json`
199
- 5. Run the judge step
200
- 6. Render HTML
68
+ If the diff is trivial (<20 lines, single file, obvious fix), skip additional review skills.
201
69
 
202
- Use the environment variables documented in [cli-integration.md](references/cli-integration.md). Prefer the rendered stage prompt files under `$CLAUDE_DIR`, `$CODEX_DIR`, and `$JUDGE_DIR` over the source templates under `templates/`.
70
+ ### Step 4: Run Review
203
71
 
204
- ### Step 3: Export Raw Reviewer Artifacts
72
+ Run the orchestrator with `--skill-paths` pointing at the selected skill directories:
205
73
 
206
- Each reviewer should write only raw artifacts:
74
+ ```bash
75
+ npx @crown-dev-studios/review-council \
76
+ --target "<target>" \
77
+ --skill-paths "/path/to/architecture-review,/path/to/plan-compliance" \
78
+ --open-html
79
+ ```
207
80
 
208
- - `report.md`
209
- - `findings.json`
210
- - `done.json`
81
+ This single invocation:
82
+ 1. Lists the selected review skills in both Claude and Codex reviewer prompts
83
+ 2. Runs Claude + Codex in parallel — each applies the selected skills independently
84
+ 3. Runs the judge to merge, deduplicate, and resolve contradictions across both outputs
85
+ 4. Renders the HTML report
211
86
 
212
- Do not create authoritative todos during raw review.
87
+ Use `--no-claude` or `--no-codex` to skip one model reviewer.
213
88
 
214
- If you want to reuse the heuristics from `workflows-review`, copy its review bar and agent choices into the reviewer prompts, but stop before todo creation.
89
+ The judge performs:
90
+ - **Semantic deduplication** — merges equivalent findings across Claude and Codex
91
+ - **Contradiction detection** — flags disagreements between reviewers
92
+ - **Dependency ordering** — orders findings so foundational issues come first
93
+ - **Confidence from corroboration** — findings flagged by both reviewers carry higher confidence
215
94
 
216
- ### Step 4: Judge the Combined Result
95
+ ### Step 5: Present Findings
217
96
 
218
- The judge reads both raw reviewer outputs and decides:
97
+ Present findings to the user in this order:
98
+ 1. **Contradictions** — need human resolution
99
+ 2. **Confirmed P1 findings** — in dependency order
100
+ 3. **Confirmed P2 findings** — in dependency order
101
+ 4. **Contested findings** — plausible but unverified
102
+ 5. **Summary of rejected/low-confidence findings** — counts only
219
103
 
220
- - which findings are confirmed
221
- - which findings are contested
222
- - which findings are rejected
223
- - which findings are worth turning into final todos
104
+ ## Mode Parameter
224
105
 
225
- The judge writes:
106
+ The skill supports a mode argument (design for all, only interactive is implemented):
226
107
 
227
- - `summary.md`
228
- - `verdict.json`
229
- - `done.json`
108
+ - **Default (interactive):** present findings, user responds
109
+ - **`mode:autofix`** (future): apply safe fixes automatically
110
+ - **`mode:report-only`** (future): generate artifacts without interaction
230
111
 
231
- ### Step 5: Render the Reading View
112
+ ## Output
232
113
 
233
- Render `index.html` after the judge completes.
114
+ All artifacts are written to `docs/reviews/<run-id>/`:
234
115
 
235
- The HTML page should make these easy to scan:
116
+ ```
117
+ docs/reviews/<run-id>/
118
+ run.json # Run metadata
119
+ bundle.json # Consolidated data for HTML
120
+ follow-ups.md # Human-readable next-step list from the judge verdict
121
+ index.html # Static review report
122
+ claude/ # Claude model reviewer
123
+ report.md, findings.json, done.json, status.json
124
+ codex/ # Codex model reviewer
125
+ report.md, findings.json, done.json, status.json
126
+ judge/ # Judge adjudication
127
+ summary.md, verdict.json, done.json, status.json
128
+ ```
236
129
 
237
- - judge summary
238
- - candidate findings from each reviewer
239
- - confirmed versus contested verdicts
240
- - raw markdown reports from Claude and Codex
130
+ Add `docs/reviews/` to `.gitignore` to keep review artifacts out of version control.
241
131
 
242
- ## Important Constraints
132
+ ## Constraints
243
133
 
244
- - Do not run `workflows-review` twice in the same working tree if it will write directly to `todos/`
245
- - If you must reuse `workflows-review` unchanged, run each reviewer in a separate worktree so each run has its own local `todos/`
246
- - Keep final todo creation as a later, explicit step owned by the judge or a follow-up workflow
247
- - Interactive prompts from reviewer CLIs are detected and relayed to the user one at a time; explicit non-interactive commands such as `claude -p --disable-slash-commands --permission-mode acceptEdits < /dev/null` or `codex exec` remain the standard mode for raw review runs
134
+ - The parent agent is the orchestrator. It should not do the review itself.
135
+ - Do not create files in `todos/` the judge recommends todos and Review Council derives `follow-ups.md`, but neither creates authoritative todo files.
136
+ - Skills are passed to each model reviewer as additional review lenses for the run, not inlined prompt bodies.
137
+ - Model reviewers (Claude, Codex) run as CLI processes via the TS orchestrator.
138
+ - Interactive prompts from reviewer CLIs are detected and relayed; prefer explicit non-interactive mode (`claude --dangerously-skip-permissions -p`, `codex exec --dangerously-bypass-approvals-and-sandbox`) for reliability.
248
139
 
249
140
  ## Supporting Files
250
141
 
251
142
  - Output contract: [output-contract.md](references/output-contract.md)
252
143
  - CLI examples: [cli-integration.md](references/cli-integration.md)
253
- - Review schema: [review-findings.schema.json](schemas/review-findings.schema.json)
254
- - Judge schema: [judge-verdict.schema.json](schemas/judge-verdict.schema.json)
255
- - Reviewer template: [reviewer-export.md](templates/reviewer-export.md)
144
+ - Review findings schema: [review-findings.schema.json](schemas/review-findings.schema.json)
145
+ - Judge verdict schema: [judge-verdict.schema.json](schemas/judge-verdict.schema.json)
146
+ - Model reviewer template: [reviewer-export.md](templates/reviewer-export.md)
256
147
  - Judge template: [judge.md](templates/judge.md)
257
148
  - HTML template: [report.html](templates/report.html)
258
- - CLI entrypoint: [src/cli.ts](src/cli.ts)
259
- - Orchestrator runtime: [src/orchestrate-review-council.ts](src/orchestrate-review-council.ts)
260
- - Renderer: [src/render-review-html.ts](src/render-review-html.ts)
261
- - TypeScript package: [package.json](package.json)
262
- - TypeScript config: [tsconfig.json](tsconfig.json)
package/dist/cli.js CHANGED
File without changes