Skip to content

fix(ce-doc-review): activate product-lens only on a product position - #1517

Merged
tmchow merged 17 commits into
mainfrom
tmchow/doc-review-right-size-a
Aug 23, 2026
Merged

fix(ce-doc-review): activate product-lens only on a product position#1517
tmchow merged 17 commits into
mainfrom
tmchow/doc-review-right-size-a

Conversation

@tmchow

@tmchow tmchow commented Aug 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

ce-doc-review's product-lens reviewer ran on almost every plan. Its activation rule included "solution selection where alternatives plausibly exist", which is true of any plan with a decision in it — so routine fixes paid for a product-judgment reviewer and, because product-lens is one of the three lenses that trigger the cross-model pass, for an external model review as well.

It now activates when the plan stakes a product position (what to build, why, or what ships first) that nobody upstream settled, or when the work carries strategic weight. Choosing between mechanisms for an agreed outcome is not a product position.

Follow-up to #1514. Nothing else in ce-doc-review changes: adversarial review, the cross-model pass, the other personas, and the plan template are as before. skills/ce-plan/ is untouched.

What's in the diff

  • skills/ce-doc-review/references/persona-selection.md — the product-lens block, restated as one condition. docs/skills/ce-doc-review.md follows.
  • tests/pipeline-review-contract.test.ts — a pin on the new condition (fails on main).
  • tests/skill-eval-cell/ — four ce-doc-review rows with fixtures that probe the condition in both directions, and the grader support they need: a must_not_include term, with roster terms matched against the run's trailing TEAM: line so narration or an output path containing a persona's name does not grade; pack.ts pairs pre/post for rows with their own baseline_ref. Fixture configs turn the cross-model pass off so the probe grades one thing.

Validation

  • bun run test 3,561 pass; release:validate and plugin:validate clean.
  • Activation on this branch: routine bootstrap fix → not activated (Claude, Codex); brainstorm-sourced plan with settled decisions → not activated (Claude, Codex); plan that ranks work and predicts an outcome → activated (both hosts, both arms). On main, five reviews of routine plans earlier the same day all activated it. Not run: the strategic-weight fixture and the pre arms for the two negative fixtures.
  • ce-code-review (run 20260822-213609-52e7d514, six reviewers including an independent Codex adversarial pass): one finding, applied — the roster grade read all of stdout.

An earlier revision of this PR also persisted per-review artifacts and wrote a depth: label into plan metadata; both were dropped — the artifacts served maintainers' measurement at every user's expense, and a recorded depth label invites consumers to route on it instead of reasoning about the document.

Plan: docs/plans/2026-08-22-2100-fix-product-lens-activation-condition-plan.md.

Known Residuals

  • product-lens-reviewer.md suppresses its premise and prioritization techniques whenever the plan has an origin, keyed on origin presence rather than on which claims the origin settled. Pre-existing; this change only narrows when the persona runs.
  • TEAM: is an instruction in the four probe rows' tasks, not a registered trailer in TRAILER_NAMES / wrapPrompt.
  • Three of the four probe fixtures are authored; one is a captured real plan. The strategic-weight row is unexercised.

Post-Deploy Monitoring & Validation

No production impact: plugin prose and tests. Watch for product-lens not activating on plans that rank work or predict outcomes.

Security Disclosure

No security-relevant changes.

Agent Disclosure

  • Model: Claude Code · claude-fable-5

Compound Engineering

tmchow added 11 commits August 22, 2026 21:29
…ist local persona returns

Only cross-model peer files landed on disk, so the local roster's
contribution could not be measured. dispatch.md now owns the scratch
preamble, a per-invocation run id, and a run.json manifest (document,
type, depth, team, dispatch time); the cross-model reference consumes
the resolved path instead of restating the block. A reviewer with a
file-write tool writes <run-dir>/<reviewer>.json with its return time;
the orchestrator writes it only for an inline-run reviewer (U1).
Plans carried deepened: but never their depth, so document size and
review cost could not be read by depth. plan-sections.md defines the
field (lightweight|standard|deep); the write step sets it, the deepening
pass rewrites it to its own classification, HTML renders it in the
visible header. Consumers key-match fields, so older plans stay valid (U2).
…ition, not plausible alternatives

The premise leg listed "solution selection where alternatives plausibly
exist", which holds for nearly any fix, so a judgment persona and the
cross-model pass ran on routine bootstrap plans. The leg is now one
condition: a product position (what to build, why, what comes first) a
stakeholder could challenge and no upstream Product Contract settled; a
choice among mechanisms is an implementation decision, not a product
position. Strategic weight is unchanged (U3).
…not_include grade term

Four ce-doc-review rows (routine bootstrap fix, settled-origin plan,
staked product position, strategic weight) graded on the reviewer team
the non-interactive run names. must_exclude reads only the ACTIONS
trailer, so a roster probe needed a final-answer negative term. Fixtures
disable the cross-model pass so the probe grades one dimension (U4).
…ss its three copies

html-rendering.md is byte-duplicated into ce-brainstorm and ce-ideate
(tests/compound-support-files.test.ts); the depth addition to the
visible-header field list lands in all three. Neither sibling writes
depth, so the list entry is inert there (U2).
…names the persona artifact path

Code review #2 (adversarial peer + correctness): must_not_include read
all of stdout, so narration that names a persona could fail or pass a
roster probe. Both text terms now read the trailing TEAM: line when the
answer carries one. Hardening from the same review: the orchestrator
fills {run_dir}/{reviewer_name}.json from the allowlisted persona name
instead of the reviewer deriving it, and run.json's keys are fixed
(Claude and Codex chose different names on the first runs).
…own baseline_ref

The pack paired pre/post only for the resized cohort, so a row outside
the sweep with an explicit baseline ran post-only.
@cursor

cursor Bot commented Aug 23, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Changes when a judgment persona (and thus often the cross-model pass) runs on document review. Under-firing would skip product review on real product bets; over-firing is the status quo this PR is trying to leave.

Overview
Stops ce-doc-review's product-lens from firing on almost every plan. The old premise included “solution selection where alternatives plausibly exist,” which pulled a product-judgment persona (and often the cross-model pass) onto routine bootstrap fixes.

Product-lens now activates only when the doc stakes an unsettled product position (what to build, why, or what ships first) that no upstream Product Contract settled, or when the work has strategic weight. Choosing mechanisms for an agreed outcome is explicitly not a product position. Other personas, adversarial activation, and the plan template are unchanged.

Adds a contract pin on the restated block, four eval-cell probes (routine/settled-origin off; staked-position/strategic-weight on), and grader support: must_not_include against a TEAM: trailer so narration cannot fake a roster, plus A/B packing for rows with their own baseline_ref. Fixtures turn cross_model_review_mode off so the probe grades one dimension.

Reviewed by Cursor Bugbot for commit c55368f. Bugbot is set up for automated code reviews on this repo. Configure here.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cafa7e263f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread skills/ce-doc-review/references/subagent-template.md Outdated
tmchow added 4 commits August 22, 2026 22:48
…bsent

A dispatched reviewer with no file-write tool, or whose write failed,
still returns in memory; the orchestrator now writes the file whenever
it is absent rather than only for inline runs (PR #1517 review).
…cal across its three copies"

This reverts commit 04fa65e.
…a depth label

A recorded depth classification invites consumers to route on it; the
counts are observable from the document and answer the size question.
The ce-plan depth metadata change is reverted.
@tmchow tmchow changed the title fix(ce-doc-review): measurable review cost, narrower product-lens fix(ce-doc-review): persist review results, narrow product-lens Aug 23, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit f91d05b. Configure here.

Comment thread skills/ce-doc-review/references/dispatch.md Outdated
…tifact persistence

The run directory, manifest, and per-persona findings files served the
maintainers' measurement at every user's expense. ce-doc-review now
differs from main only in the product-lens activation block; the eval
rows, fixtures, and grader support stay. Plan renamed to match.
@tmchow tmchow changed the title fix(ce-doc-review): persist review results, narrow product-lens fix(ce-doc-review): activate product-lens only on a product position Aug 23, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 553ec1682c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tests/skill-eval-cell/catalog.ts
Comment thread tests/skill-eval-cell/grade.ts Outdated
must_not_include reads only the declared team and fails when the run
declared none, so a run cannot pass a roster probe by not naming its
reviewers (PR #1517 review).
@tmchow
tmchow merged commit 2d77dee into main Aug 23, 2026
9 of 11 checks passed
@github-actions github-actions Bot mentioned this pull request Aug 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant