feat(ce-review): add base: and plan: arguments, extract scope detection#405
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7555f80901
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1e62612d38
ℹ️ 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".
Inspired by obra/superpowers requesting-code-review skill which has callers pass context instead of making the reviewer infer everything. - Add Argument Parsing section with base: and plan: tokens - base: fast path skips 150-line scope detection shell when caller already knows the diff base - plan: triggers Stage 2b plan discovery for requirements verification with confidence tagging (explicit vs inferred) - Extract duplicated branch/standalone base-detection shell into references/resolve-base.sh - Inferred plan gaps route as P3/advisory (no todos, no autonomous follow-up); explicit plan gaps route as P1/manual - Add Requirements Completeness section to Stage 6 report - Verdict reflects unmet explicit plan requirements
lfg and slfg record the plan file path from ce:plan and pass it as plan:<path> to ce:review so requirements verification uses the correct document. ce:work and ce:work-beta pass plan:<path> when available.
The test expected 3 inline ERROR strings in SKILL.md, but branch and standalone modes now delegate to resolve-base.sh. Update the test to verify the fail-closed contract through the script path instead. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
- Show explicit variable capture from script output in branch and standalone scope paths so $BASE is defined before diff commands - Guard jq calls in resolve-base.sh with || true so missing jq falls through to origin/HEAD and common-branch-name fallbacks instead of terminating the script under set -euo pipefail Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
1e62612 to
dddc21e
Compare
Multiple or stale plan references in a PR body now demote to inferred confidence instead of blindly using the first match as explicit. Only a single unambiguous PR-body match gets explicit/blocking weight. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b21cb3c964
ℹ️ 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".
- Check script exit code and empty output before parsing BASE, so a failed or silent script errors instead of silently scoping to unstaged - Reject base: combined with PR number or branch target to prevent scope/intent mismatches where diff base and code come from different sources Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 998956855a
ℹ️ 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".
Capture base_arg into a quoted variable before using it in git merge-base and git diff to prevent shell expansion of special characters in the ref name. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 56abad42d4
ℹ️ 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".
Add existence check for inferred PR-body plan candidates so stale or copied plan links in PR descriptions don't cause missing-file errors during requirements verification. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Summary
Adds caller-supplied context arguments to
ce:reviewto improve effectiveness of the code review. This is going to be helpful especially later when we want to improve the/lfgskill to be a true autopilot.Two new optional tokens in ce:review's argument parser:
base:<ref>— skips the ~150-line scope detection shell when the caller already knows the diff base (SHA, branch name,origin/main). Automated callers like lfg/slfg/ce:work benefit most; the full detection remains as fallback for interactive use.plan:<path>— triggers a new Stage 2b that loads the plan's requirements trace and checks each requirement against the diff in Stage 6. Routing depends on how the plan was found: explicit plans (caller-provided or PR body) produce P1/actionable findings; auto-discovered plans produce P3/advisory findings that stay in the report only.The duplicated branch-mode and standalone-mode base-detection shell (~120 lines repeated twice) is extracted into
references/resolve-base.sh. Both paths now call the same script.Workflow callers (lfg, slfg, ce:work, ce-work-beta) updated to record the plan file path from ce:plan and pass it as
plan:<path>to ce:review.A
description:argument was considered and rejected during development — Stage 2's git-log inference is cheap and already has the diff in front of it, so having callers summarize "what was implemented" just moves work upstream without adding signal. The interactive question ("What is the primary goal of these changes?") handles the ambiguous-intent case better than a formatted argument.🤖 Generated with Claude Opus 4.6 (1M context, extended thinking) via Claude Code