fix(ce-doc-review): activate product-lens only on a product position - #1517
Conversation
…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.
PR SummaryMedium Risk Overview 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: Reviewed by Cursor Bugbot for commit c55368f. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
💡 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".
…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.
This reverts commit b262f2a.
…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.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ 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.
…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.
There was a problem hiding this comment.
💡 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".
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).

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-reviewchanges: 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.mdfollows.tests/pipeline-review-contract.test.ts— a pin on the new condition (fails onmain).tests/skill-eval-cell/— fource-doc-reviewrows with fixtures that probe the condition in both directions, and the grader support they need: amust_not_includeterm, with roster terms matched against the run's trailingTEAM:line so narration or an output path containing a persona's name does not grade;pack.tspairs pre/post for rows with their ownbaseline_ref. Fixture configs turn the cross-model pass off so the probe grades one thing.Validation
bun run test3,561 pass;release:validateandplugin:validateclean.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(run20260822-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.mdsuppresses 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 inTRAILER_NAMES/wrapPrompt.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
Claude Code · claude-fable-5