Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat(ce-review): add base: and plan: arguments, extract scope detection#405

Merged
tmchow merged 8 commits into
mainfrom
feat/review-skill-analysis
Mar 27, 2026
Merged

feat(ce-review): add base: and plan: arguments, extract scope detection#405
tmchow merged 8 commits into
mainfrom
feat/review-skill-analysis

Conversation

@tmchow
Copy link
Copy Markdown
Collaborator

@tmchow tmchow commented Mar 27, 2026

Summary

Adds caller-supplied context arguments to ce:review to improve effectiveness of the code review. This is going to be helpful especially later when we want to improve the /lfg skill 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.


Compound Engineering v2.54.1
🤖 Generated with Claude Opus 4.6 (1M context, extended thinking) via Claude Code

Copy link
Copy Markdown

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

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: 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".

Comment thread plugins/compound-engineering/skills/ce-review/SKILL.md Outdated
Comment thread plugins/compound-engineering/skills/ce-review/references/resolve-base.sh Outdated
Copy link
Copy Markdown

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

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: 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".

Comment thread plugins/compound-engineering/skills/ce-review/SKILL.md Outdated
tmchow and others added 4 commits March 27, 2026 01:13
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]>
@tmchow tmchow force-pushed the feat/review-skill-analysis branch from 1e62612 to dddc21e Compare March 27, 2026 08:16
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]>
Copy link
Copy Markdown

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

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: 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".

Comment thread plugins/compound-engineering/skills/ce-review/SKILL.md Outdated
Comment thread plugins/compound-engineering/skills/ce-review/SKILL.md Outdated
- 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]>
Copy link
Copy Markdown

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

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: 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".

Comment thread plugins/compound-engineering/skills/ce-review/SKILL.md Outdated
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]>
@tmchow
Copy link
Copy Markdown
Collaborator Author

tmchow commented Mar 27, 2026

@codex review

Copy link
Copy Markdown

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

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: 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".

Comment thread plugins/compound-engineering/skills/ce-review/SKILL.md Outdated
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]>
@tmchow tmchow merged commit 914f9b0 into main Mar 27, 2026
2 checks passed
This was referenced Mar 27, 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