Skill Tracer
Skills › Compound Engineering › ce-work › review-findings-followup.md

review-findings-followup.md

82 lines · skills/ce-work/references/review-findings-followup.md at 3449230

Open on GitHub

Most marks come from matching words in the file, so treat them as pointers.

1# Apply Code Review Findings (after `ce-code-review`)
2
3Load this reference when `ce-code-review` has finished and **ce-work** (or another caller) should apply fixes before the Residual Work Gate.
4
5`ce-code-review` is invoked here with `mode:agent`, so it is **review-only** in this context — it reports findings and writes artifacts and does not mutate the checkout, commit, push, or file tickets. **The caller decides which fixes to apply and how.** Standalone review is also report-only unless local apply was explicitly authorized.
6

Apply Code Review Findings (after ce-code-review)

Load this reference when ce-code-review has finished and ce-work (or another caller) should apply fixes before the Residual Work Gate.

ce-code-review is invoked here with mode:agent, so it is review-only in this context — it reports findings and writes artifacts and does not mutate the checkout, commit, push, or file tickets. The caller decides which fixes to apply and how. Standalone review is also report-only unless local apply was explicitly authorized.

Raw lines 1 to 6
Names a skill ce-code-review :1
7## Consume the completed review (do not re-run it)
8
9This reference loads **after** review has run. In the ce-work shipping flow, step 3a already invoked `ce-code-review`; this apply step **consumes that output**. Do not start a second review, which would waste reviewer dispatches and risk overwriting the artifact the Residual Work Gate reconciles.
11Reuse the review output already in hand:
13- Parsed JSON (`status`, `actionable_findings`, `findings`, `artifact_path`, `run_id`) **or** the markdown Actionable Findings summary captured by the caller
14- Run artifact dir: `<artifact-path>/` (`review.json`, per-reviewer JSON for `why_it_matters`)
16If `status` is `failed`, stop shipping and report `reason`. If `degraded`, note partial reviewer coverage before applying anything.

Consume the completed review (do not re-run it)

This reference loads after review has run. In the ce-work shipping flow, step 3a already invoked ce-code-review; this apply step consumes that output. Do not start a second review, which would waste reviewer dispatches and risk overwriting the artifact the Residual Work Gate reconciles.

Reuse the review output already in hand:

  • Parsed JSON (status, actionable_findings, findings, artifact_path, run_id) or the markdown Actionable Findings summary captured by the caller
  • Run artifact dir: <artifact-path>/ (review.json, per-reviewer JSON for why_it_matters)

If status is failed, stop shipping and report reason. If degraded, note partial reviewer coverage before applying anything.

Raw lines 7 to 17
Names a skill ce-code-review :9
Starts an agent dispatches :9
18### Fallback — invoke `ce-code-review` only for cold callers
20Only when the caller reached this file **without** already running review (no review output in hand): invoke `ce-code-review` once, then proceed to apply. Do not invoke when the caller already ran review (e.g., ce-work shipping step 3a).
22Invoke the skill explicitly. Do not treat a casual "review my changes" prompt as a substitute unless the harness routed it to `ce-code-review`.
24```
25ce-code-review mode:agent plan:<plan-path> base:<merge-base-or-ref>
26```
28- `mode:agent` — JSON output (`review.json` + primary JSON response) for programmatic parsing; same review pipeline as default.
29- `plan:` — when Phase 1 used a plan file (requirements completeness).
30- `base:` — when the diff base is already resolved on the current checkout; omit when reviewing a PR number/URL or standalone current branch.
31- Do **not** pass deprecated `mode:autofix`.
33For human-facing shipping, invoke `ce-code-review` without `mode:agent` if markdown tables are preferred. It still reports only unless the invocation explicitly authorizes local apply. Capture the Actionable Findings and artifact dir before caller-owned apply.

Fallback — invoke ce-code-review only for cold callers

Only when the caller reached this file without already running review (no review output in hand): invoke ce-code-review once, then proceed to apply. Do not invoke when the caller already ran review (e.g., ce-work shipping step 3a).

Invoke the skill explicitly. Do not treat a casual "review my changes" prompt as a substitute unless the harness routed it to ce-code-review.

ce-code-review mode:agent plan:<plan-path> base:<merge-base-or-ref>
  • mode:agent — JSON output (review.json + primary JSON response) for programmatic parsing; same review pipeline as default.
  • plan: — when Phase 1 used a plan file (requirements completeness).
  • base: — when the diff base is already resolved on the current checkout; omit when reviewing a PR number/URL or standalone current branch.
  • Do not pass deprecated mode:autofix.

For human-facing shipping, invoke ce-code-review without mode:agent if markdown tables are preferred. It still reports only unless the invocation explicitly authorizes local apply. Capture the Actionable Findings and artifact dir before caller-owned apply.

Raw lines 18 to 34
Names a skill ce-code-review :18
35## Inputs for apply
37- `actionable_findings` from JSON, or the Actionable Findings section from markdown
38- Full finding detail when needed: `review.json` / artifact `findings`, or `{reviewer}.json` for `why_it_matters` and `evidence`
39- Stable finding `#`: reuse it in commits, in the record of unapplied findings (PR section or tracker ticket), and in subagent prompts

Inputs for apply

  • actionable_findings from JSON, or the Actionable Findings section from markdown
  • Full finding detail when needed: review.json / artifact findings, or {reviewer}.json for why_it_matters and evidence
  • Stable finding #: reuse it in commits, in the record of unapplied findings (PR section or tracker ticket), and in subagent prompts
Raw lines 35 to 40
Starts an agent subagent :39
41## Check findings before applying fixes
43The calling agent decides which findings are valid and which fixes it has permission to apply. Verify each finding against the evidence and the requested outcome. Reject incorrect claims, problems with no supporting evidence, and preferences whose benefit does not justify the change. Record why they were rejected; do not carry them forward as unfinished work.
45Apply justified fixes within the agreed scope when they can be reversed. Use project evidence and conventions to choose technical fixes; a design choice does not automatically need a user decision. Neither `confidence`, `autofix_class`, nor a concrete `suggested_fix` proves benefit or grants permission. If a significant problem has no suggested fix, investigate it before deciding to defer it.
47Defer a fix when essential evidence is unavailable, the user must choose a product preference, the work would expand the agreed scope, or the calling agent lacks permission. Passing tests do not prove an unverified safety property or authorize changing an agreed requirement. At the Residual Work Gate, explain what decision is needed and what depends on it.
49Read the relevant source or assign a subagent to investigate a specific question. Use `ce-pov` only when an important, specific choice needs an independent assessment beyond ordinary inspection. Reviewer disagreement alone is not enough. Give it the subject, known constraints, and locations of supporting evidence. Use its answer or explanation of missing context to inform your decision. Neither gives permission to edit or automatically start a panel of models.

Check findings before applying fixes

The calling agent decides which findings are valid and which fixes it has permission to apply. Verify each finding against the evidence and the requested outcome. Reject incorrect claims, problems with no supporting evidence, and preferences whose benefit does not justify the change. Record why they were rejected; do not carry them forward as unfinished work.

Apply justified fixes within the agreed scope when they can be reversed. Use project evidence and conventions to choose technical fixes; a design choice does not automatically need a user decision. Neither confidence, autofix_class, nor a concrete suggested_fix proves benefit or grants permission. If a significant problem has no suggested fix, investigate it before deciding to defer it.

Defer a fix when essential evidence is unavailable, the user must choose a product preference, the work would expand the agreed scope, or the calling agent lacks permission. Passing tests do not prove an unverified safety property or authorize changing an agreed requirement. At the Residual Work Gate, explain what decision is needed and what depends on it.

Read the relevant source or assign a subagent to investigate a specific question. Use ce-pov only when an important, specific choice needs an independent assessment beyond ordinary inspection. Reviewer disagreement alone is not enough. Give it the subject, known constraints, and locations of supporting evidence. Use its answer or explanation of missing context to inform your decision. Neither gives permission to edit or automatically start a panel of models.

Raw lines 41 to 50
Starts an agent subagent :49
Names a skill ce-pov :49
51## Execution — orchestrator reviews and groups findings, then applies or delegates
53The lead agent decides which findings to act on, groups the work, reviews the diffs, runs tests, and checks what remains at the Residual Work Gate. It may investigate a small question directly; delegate broader research rather than loading every cited file. Subagents confirm that the evidence still matches the code before applying fixes within the agreed scope. They return any unresolved decisions with supporting evidence.

Execution — orchestrator reviews and groups findings, then applies or delegates

The lead agent decides which findings to act on, groups the work, reviews the diffs, runs tests, and checks what remains at the Residual Work Gate. It may investigate a small question directly; delegate broader research rather than loading every cited file. Subagents confirm that the evidence still matches the code before applying fixes within the agreed scope. They return any unresolved decisions with supporting evidence.

Raw lines 51 to 55
Starts an agent Subagents :53
56### Where each fix runs
58Dispatch file-grouped subagent batches when fixes need code you have not read, or when fixes on disjoint files form a real parallel wave. Apply every other fix in this context: one whose code is already in your context from this session's work, or a small region you can read without materially growing this context. The lead agent stays active through tests, commits, and the handoff, so loading many cited files here is the cost delegation avoids.
60**Batching (primary rule: group by file):**
621. Sort applicable findings by severity (P0 first).
632. **Group by `file`.** All eligible findings on the same file → **one subagent** (it loads the file once and works through its `#` list in severity order).
643. **Parallel waves:** batches with **disjoint file sets** may run in parallel (same worktree / shared-directory rules as `ce-work`'s execution strategy in `references/execution-strategy.md`).
654. **Same file, many findings:** keep one subagent per file. If the prompt would exceed a comfortable size (~8 findings), split into **serial** subagent passes on that file (first batch highest severity, then next batch after merge or after the prior agent returns).
665. **Cross-file coupling:** do not merge unrelated files into one subagent just to reduce agent count; file grouping is the default. Only co-batch multiple files when findings explicitly reference the same small related change (rare); when in doubt, separate by file.
68**Subagent prompt (per batch):** the assigned findings only (`#`, severity, file, line, title, `suggested_fix`, `requires_verification`; add `why_it_matters` from `{reviewer}.json` in the run artifact when useful), plus:
69- Work through assigned `#` in severity order; at each `file:line`, skip with a one-line reason if evidence no longer matches
70- Follow the review and permission rules above; choose technical fixes from project evidence and return decisions that still need the user
71- Do not re-run `ce-code-review`
72- Shared-directory fallback: do not stage or commit; return which `#` were applied or skipped and which files changed
74**After inline fixes and after each wave:** orchestrator reviews diffs (scope = assigned `#` only), runs tests (`requires_verification: true` on any applied finding → at least targeted tests; multi-file → broader suite), commits (`fix(review): apply findings #…`) unless worktree-isolated subagents merge per Phase 1. Repeat until all batches complete.

Where each fix runs

Dispatch file-grouped subagent batches when fixes need code you have not read, or when fixes on disjoint files form a real parallel wave. Apply every other fix in this context: one whose code is already in your context from this session's work, or a small region you can read without materially growing this context. The lead agent stays active through tests, commits, and the handoff, so loading many cited files here is the cost delegation avoids.

Batching (primary rule: group by file):

  1. Sort applicable findings by severity (P0 first).
  2. **Group by file. All eligible findings on the same file → one subagent** (it loads the file once and works through its # list in severity order).
  3. Parallel waves: batches with disjoint file sets may run in parallel (same worktree / shared-directory rules as ce-work's execution strategy in references/execution-strategy.md).
  4. Same file, many findings: keep one subagent per file. If the prompt would exceed a comfortable size (~8 findings), split into serial subagent passes on that file (first batch highest severity, then next batch after merge or after the prior agent returns).
  5. Cross-file coupling: do not merge unrelated files into one subagent just to reduce agent count; file grouping is the default. Only co-batch multiple files when findings explicitly reference the same small related change (rare); when in doubt, separate by file.

Subagent prompt (per batch): the assigned findings only (#, severity, file, line, title, suggested_fix, requires_verification; add why_it_matters from {reviewer}.json in the run artifact when useful), plus:

  • Work through assigned # in severity order; at each file:line, skip with a one-line reason if evidence no longer matches
  • Follow the review and permission rules above; choose technical fixes from project evidence and return decisions that still need the user
  • Do not re-run ce-code-review
  • Shared-directory fallback: do not stage or commit; return which # were applied or skipped and which files changed

After inline fixes and after each wave: orchestrator reviews diffs (scope = assigned # only), runs tests (requires_verification: true on any applied finding → at least targeted tests; multi-file → broader suite), commits (fix(review): apply findings #…) unless worktree-isolated subagents merge per Phase 1. Repeat until all batches complete.

Raw lines 56 to 75
Starts an agent Dispatch :58
Starts an agent subagent :58
Starts an agent Subagent :68
Names a skill ce-code-review :71
Starts an agent subagents :74
76### Summary (required)
78Report which `#` you applied inline and which batches you dispatched, `#` applied vs skipped, artifact path, verification results, and justified work still unresolved. Save the reasons for rejected claims with the review evidence. A skipped low-value suggestion is not a deferred concern to repeat in the handoff.

Summary (required)

Report which # you applied inline and which batches you dispatched, # applied vs skipped, artifact path, verification results, and justified work still unresolved. Save the reasons for rejected claims with the review evidence. A skipped low-value suggestion is not a deferred concern to repeat in the handoff.

Raw lines 76 to 79
Starts an agent dispatched :78
80## Handoff to Residual Work Gate
82Any justified finding still unresolved after this pass is **residual work**. Proceed to the Residual Work Gate with an updated count. Do not re-invoke `ce-code-review` solely to re-apply the same findings unless the diff changed materially after fixes.

Handoff to Residual Work Gate

Any justified finding still unresolved after this pass is residual work. Proceed to the Residual Work Gate with an updated count. Do not re-invoke ce-code-review solely to re-apply the same findings unless the diff changed materially after fixes.

Raw lines 80 to 82
Names a skill ce-code-review :82