fix(doc-review): cut review noise on plans, scope personas to doc shape#780
Merged
fix(doc-review): cut review noise on plans, scope personas to doc shape#780
Conversation
Default ce-doc-review at ce-plan Phase 5.3.8 to mode:headless so safe_auto fixes apply silently and remaining findings surface as a one-line summary above the post-generation menu. Add Run deeper doc review as a first-class menu fixture so interactive engagement is opt-in but obvious; hide it when no actionable findings remain (FYI-only state included, since the walkthrough is gated to anchor 75/100 gated_auto/manual findings and would otherwise dead-end). Tighten the adversarial activation trigger so routine plans no longer trip it just for having structural rationale; activation now keys on real high-stakes signals (high-stakes domains, new abstractions, missing or extended origin, requirements-shape premise content, explicit alternatives). Move document-type classification into the orchestrator using content-shape signals (frontmatter, R-IDs vs U-IDs, section structure) with file path as a tie-breaker only. Add an Origin: slot to the subagent template so personas that adapt on origin (product-lens, adversarial, scope-guardian) read it authoritatively instead of re-parsing frontmatter themselves -- one classification, all personas trust the slots. Per-persona doc-type adaptation: - product-lens, adversarial, scope-guardian suppress premise/prioritization/ simplification techniques on plan-shape docs with Origin: set, since the brainstorm validated those upstream - feasibility scopes shadow-path tracing, implementability, and migration mechanics to plan-shape docs only; requirements-shape gets a tight check for fundamental-rework signals - coherence, design-lens, security-lens carry light doc-type framing (different identifiers and granularity expected per type) since they are net-positive at both levels Net effect: routine plans dispatch the cheap minimum (coherence + feasibility), high-stakes plans dispatch the full team, and the user is never asked to adjudicate findings from auto-runs unless they explicitly opt into the deeper review. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c828af5dcd
ℹ️ 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".
- Restore chat-numbered-list fallback for the 5-option overflow menu when the platform's blocking question tool is unavailable or errors (Codex edit modes, Pi `ask_user` no-match), matching the AGENTS.md mandate to never silently skip a blocking question. Mirrored in SKILL.md. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Merged
tmchow
added a commit
that referenced
this pull request
May 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The problem
ce-doc-reviewhas been a culprit of being too noisy and heavy-handed, especially when it runs at the end ofce-plan.Adversarial and other persona reviewers were applying high-scrutiny techniques to routine plans, surfacing many "manual" findings that re-litigated decisions the brainstorm phase already settled. The post-plan flow forced a 4-option routing question into a per-finding walkthrough, producing a "review tax" that didn't match what users actually wanted after planning (which is to start work).
The goal
Make doc review feel right-sized:
Approach at a high level
1. Default to headless at
ce-planPhase 5.3.8ce-doc-reviewnow runs inmode:headlessautomatically at the end ofce-plan. In headless mode,safe_autofixes (typos, count mismatches, broken refs, terminology drift, missing list entries) apply silently.gated_auto,manual, and FYI findings return as structured text — no walkthrough, no per-finding routing, no blocking prompts. The user sees a single summary line above the post-generation menu (Doc review applied 3 fixes. 2 decisions, 1 proposed fix remain.) and picks what to do next.2. Deeper review is a first-class menu option, not a hidden free-form path
Added
Run deeper doc reviewas option 2 in the post-generation menu so users can opt into the full interactive walkthrough explicitly. Renders as a 5-option numbered list per the AGENTS.md narrow exception when actionable findings remain; collapses cleanly to 4 options onAskUserQuestionwhen there's nothing actionable to walk through (FYI-only state included, sincece-doc-review's walkthrough is gated to anchor 75/100gated_auto/manualfindings and would otherwise dead-end).3. Scope each reviewer persona by document shape
Previously every persona ran every technique on every doc, regardless of whether it was a brainstorm or a plan. That over-scrutinized plans (re-litigating premise the brainstorm already settled) and under-scrutinized requirements (running implementation feasibility checks on docs that intentionally have no implementation yet). Now:
ce-product-lens-reviewer— full 5 techniques on requirements-shape docs. On plan-shape docs withOrigin:set, suppresses premise challenge and prioritization coherence; runs only strategic-consequences (when the plan introduces new strategic weight), implementation alternatives, and goal-requirement alignment.ce-adversarial-document-reviewer— full 5 techniques on requirements-shape docs and origin-less plans. On plan-shape docs withOrigin:set, suppresses premise challenging and simplification pressure entirely; runs only technical-assumption surfacing, technical-decision stress-testing, and architectural alternative blindness.ce-scope-guardian-reviewer— full review on requirements. On plan-shape docs withOrigin:set, focuses on implementation-time abstractions and scope-creep into deferred work; tightens the completeness principle to flag missing coverage only when origin demanded it.ce-feasibility-reviewer— scopes shadow-path tracing, implementability, dependency analysis, and migration mechanics to plan-shape docs only. On requirements-shape docs, runs a tight "would this direction force a fundamental rework?" check.ce-coherence-reviewer,ce-design-lens-reviewer,ce-security-lens-reviewer— light doc-type framing only (different identifiers and granularity expected per type), since they are net-positive at both levels.4. Tighten the
ce-adversarial-document-revieweractivation triggerDropped the "more than 5 distinct requirements or implementation units" criterion — that fired on virtually every Standard plan and was the biggest source of unwarranted dispatch. Activation now keys on real high-stakes signals: high-stakes domains (auth/payments/migrations), new abstractions, missing or extended origin, requirements-shape premise content, or explicit alternatives. Routine plans with structural rationale no longer trip adversarial.
5. Centralize document-type classification in the orchestrator
Moved doc-type classification into
ce-doc-reviewusing content-shape signals (frontmatter, R-IDs vs U-IDs, section structure) with file path as a tie-breaker hint only — path-based classification was brittle and the agent should read the doc. Added anOrigin:slot to the subagent template so personas that adapt on origin read it authoritatively from a single source instead of re-parsing frontmatter themselves. One classification, all personas trust the slots.Net effect
ce-coherence-reviewer+ce-feasibility-reviewer)Test plan
bun run release:validate— cleanbun test— 1344 passtests/pipeline-review-contract.test.tsto assert the new contract: headless default atce-plan, deeper-review menu fixture, summary line above menu, FYI-only state hides the deeper-review option🤖 Generated with Claude Code