mirror of
https://github.com/JuliusBrussee/cavekit.git
synced 2026-09-14 16:32:40 +08:00
T-009: Add /bp:codex-review standalone command
New slash command that invokes Codex adversarial review on demand. Supports --base <ref> override, outputs findings in Blueprint format, appends to impl-review-findings.md, and handles missing Codex gracefully. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
---
|
||||
name: bp-codex-review
|
||||
description: "Invoke Codex adversarial review on demand — diffs current tier against worktree base and outputs findings"
|
||||
argument-hint: "[--base REF]"
|
||||
allowed-tools: ["Bash(${CLAUDE_PLUGIN_ROOT}/scripts/codex-review.sh:*)"]
|
||||
---
|
||||
|
||||
# /bp:codex-review — Codex Adversarial Review
|
||||
|
||||
Run an on-demand adversarial code review using the Codex CLI. This sends the current diff to Codex for analysis of bugs, security issues, logic errors, and spec violations.
|
||||
|
||||
## Execution
|
||||
|
||||
Run the review script, forwarding any arguments the user provided:
|
||||
|
||||
```!
|
||||
"${CLAUDE_PLUGIN_ROOT}/scripts/codex-review.sh" $ARGUMENTS
|
||||
```
|
||||
|
||||
## Behavior
|
||||
|
||||
- **Default target**: diffs the current build tier's changes against the worktree base (auto-detected from upstream tracking branch, or falls back to `main`/`master`/`develop`).
|
||||
- **`--base <ref>`**: override the diff base to any git ref (branch, tag, or commit SHA).
|
||||
- Findings are printed to stdout in Blueprint's standard finding format (`F-NNN` numbered, severity `P0`–`P3`, source tagged as `codex`).
|
||||
- Findings are automatically appended to `context/impl/impl-review-findings.md`.
|
||||
- If Codex is not installed or not available, the script prints a clear message and exits gracefully — no error is thrown.
|
||||
|
||||
## After the script completes
|
||||
|
||||
1. **If findings were reported**: summarize them for the user — count by severity, highlight any P0/P1 items, and note the findings file path.
|
||||
2. **If no findings**: confirm a clean review to the user.
|
||||
3. **If Codex was unavailable**: inform the user that Codex CLI is required and suggest installing it (`npm install -g @openai/codex` or equivalent).
|
||||
+23
-3
@@ -14,6 +14,16 @@ description: Show Blueprint commands and usage
|
||||
/bp:inspect → gap analysis + peer review (the CHECK)
|
||||
```
|
||||
|
||||
### Quick Mode
|
||||
|
||||
```bash
|
||||
/bp:quick <describe your feature> # runs all 4 phases end-to-end, no stops
|
||||
/bp:quick add JWT auth --skip-inspect
|
||||
/bp:quick refactor the API layer --peer-review
|
||||
```
|
||||
|
||||
Streamlined draft + architect (no interactive Q&A, no user gates) followed by the full build and inspect. Best for small-to-medium features where you trust the decomposition.
|
||||
|
||||
## Commands
|
||||
|
||||
### `/bp:draft` — Write Blueprints
|
||||
@@ -39,14 +49,14 @@ Reads blueprints, decomposes requirements into tasks, organizes into dependency
|
||||
### `/bp:build` — Run the Loop
|
||||
|
||||
```bash
|
||||
/bp:build # ralph loop from site
|
||||
/bp:build # auto-parallel build from site
|
||||
/bp:build --filter v2 # scope to v2
|
||||
/bp:build --peer-review # add Codex (GPT-5.4) review
|
||||
/bp:build --max-iterations 30 # iteration limit
|
||||
/bp:build --peer-review --codex-model gpt-5.4-mini
|
||||
```
|
||||
|
||||
Auto-archives any previous cycle, then starts a Ralph Loop. Each iteration: pick unblocked task → read blueprint → implement → validate → commit.
|
||||
Auto-archives any previous cycle, then builds the site. Automatically parallelizes by grouping ready tasks into a few coherent work packets based on shared files, subsystem, and complexity. Progresses through tiers autonomously without manual intervention. If multiple build sites exist, asks which one to implement.
|
||||
|
||||
With `--peer-review`: alternates build and review iterations, calling Codex via MCP.
|
||||
|
||||
@@ -72,10 +82,20 @@ Produces a verdict: APPROVE / REVISE / REJECT with prioritized findings.
|
||||
|
||||
Shows tasks done/ready/blocked, progress bar, current tier, and next tasks.
|
||||
|
||||
### `/bp:codex-review` — On-Demand Codex Review
|
||||
|
||||
```bash
|
||||
/bp:codex-review # review current tier diff
|
||||
/bp:codex-review --base v1.0 # review diff against a specific ref
|
||||
```
|
||||
|
||||
Sends the current diff to Codex for adversarial review. Outputs findings in Blueprint format and appends them to `context/impl/impl-review-findings.md`. Requires Codex CLI to be installed.
|
||||
|
||||
### Maintenance (optional)
|
||||
|
||||
| Command | When |
|
||||
|---------|------|
|
||||
| `/bp:codex-review` | On-demand Codex adversarial review of current diff |
|
||||
| `/bp:gap-analysis` | After a loop — compare built vs intended |
|
||||
| `/bp:revise` | After manual code fixes — trace back to blueprints |
|
||||
| `/bp:compact-specs` | When impl tracking files exceed ~500 lines |
|
||||
@@ -95,7 +115,7 @@ These still work but are superseded by the three main commands:
|
||||
| `/blueprint implement` | `/bp:build` (one task at a time vs full loop) |
|
||||
| `/blueprint spec-loop` | `/bp:build` |
|
||||
| `/blueprint peer-review-loop` | `/bp:build --peer-review` |
|
||||
| `/blueprint quick` | `/bp:draft` + `/bp:architect` + `/bp:build` |
|
||||
| `/blueprint quick` | `/bp:quick` (end-to-end with no stops) |
|
||||
|
||||
## Skills (reference docs)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user