fix(create-plan): clarify reviewer extraction order
This commit is contained in:
@@ -117,7 +117,7 @@ Be specific and actionable. If the plan is solid, end with exactly: VERDICT: APP
|
|||||||
If changes are needed, end with exactly: VERDICT: REVISE"
|
If changes are needed, end with exactly: VERDICT: REVISE"
|
||||||
```
|
```
|
||||||
|
|
||||||
Capture the Codex session ID from output (line `session id: <uuid>`). Store as `CODEX_SESSION_ID` for session resume in subsequent rounds.
|
Do not try to capture the Codex session ID yet. When using the helper, extract it from `/tmp/plan-review-${REVIEW_ID}.runner.out` after the command completes (look for `session id: <uuid>`), then store it as `CODEX_SESSION_ID` for resume in subsequent rounds.
|
||||||
|
|
||||||
**If `REVIEWER_CLI` is `claude`:**
|
**If `REVIEWER_CLI` is `claude`:**
|
||||||
|
|
||||||
@@ -156,14 +156,7 @@ If changes are needed, end with exactly: VERDICT: REVISE" \
|
|||||||
> /tmp/plan-review-${REVIEW_ID}.json
|
> /tmp/plan-review-${REVIEW_ID}.json
|
||||||
```
|
```
|
||||||
|
|
||||||
Extract session ID and review text (requires `jq`):
|
For `cursor`, the command script writes raw JSON to `/tmp/plan-review-${REVIEW_ID}.json`. Do not run `jq` extraction until after the helper or fallback execution completes. If `jq` is not installed, inform the user: `brew install jq` (macOS) or equivalent.
|
||||||
|
|
||||||
```bash
|
|
||||||
CURSOR_SESSION_ID=$(jq -r '.session_id' /tmp/plan-review-${REVIEW_ID}.json)
|
|
||||||
jq -r '.result' /tmp/plan-review-${REVIEW_ID}.json > /tmp/plan-review-${REVIEW_ID}.md
|
|
||||||
```
|
|
||||||
|
|
||||||
If `jq` is not installed, inform the user: `brew install jq` (macOS) or equivalent.
|
|
||||||
|
|
||||||
Run the command script through the shared helper when available:
|
Run the command script through the shared helper when available:
|
||||||
|
|
||||||
@@ -188,7 +181,7 @@ CURSOR_SESSION_ID=$(jq -r '.session_id' /tmp/plan-review-${REVIEW_ID}.json)
|
|||||||
jq -r '.result' /tmp/plan-review-${REVIEW_ID}.json > /tmp/plan-review-${REVIEW_ID}.md
|
jq -r '.result' /tmp/plan-review-${REVIEW_ID}.json > /tmp/plan-review-${REVIEW_ID}.md
|
||||||
```
|
```
|
||||||
|
|
||||||
- If `REVIEWER_CLI=codex` and the review text is only in `/tmp/plan-review-${REVIEW_ID}.runner.out`, move or copy the actual review body into `/tmp/plan-review-${REVIEW_ID}.md` before verdict parsing.
|
- If `REVIEWER_CLI=codex`, extract `CODEX_SESSION_ID` from `/tmp/plan-review-${REVIEW_ID}.runner.out` after the helper or fallback run. If the review text is only in `.runner.out`, move or copy the actual review body into `/tmp/plan-review-${REVIEW_ID}.md` before verdict parsing.
|
||||||
|
|
||||||
#### Step 4: Read Review & Check Verdict
|
#### Step 4: Read Review & Check Verdict
|
||||||
|
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ Be specific and actionable. If the plan is solid, end with exactly: VERDICT: APP
|
|||||||
If changes are needed, end with exactly: VERDICT: REVISE"
|
If changes are needed, end with exactly: VERDICT: REVISE"
|
||||||
```
|
```
|
||||||
|
|
||||||
Capture the Codex session ID from output (line `session id: <uuid>`). Store as `CODEX_SESSION_ID` for session resume in subsequent rounds.
|
Do not try to capture the Codex session ID yet. When using the helper, extract it from `/tmp/plan-review-${REVIEW_ID}.runner.out` after the command completes (look for `session id: <uuid>`), then store it as `CODEX_SESSION_ID` for resume in subsequent rounds.
|
||||||
|
|
||||||
**If `REVIEWER_CLI` is `claude`:**
|
**If `REVIEWER_CLI` is `claude`:**
|
||||||
|
|
||||||
@@ -179,14 +179,7 @@ If changes are needed, end with exactly: VERDICT: REVISE" \
|
|||||||
> /tmp/plan-review-${REVIEW_ID}.json
|
> /tmp/plan-review-${REVIEW_ID}.json
|
||||||
```
|
```
|
||||||
|
|
||||||
Extract session ID and review text (requires `jq`):
|
For `cursor`, the command script writes raw JSON to `/tmp/plan-review-${REVIEW_ID}.json`. Do not run `jq` extraction until after the helper or fallback execution completes. If `jq` is not installed, inform the user: `brew install jq` (macOS) or equivalent.
|
||||||
|
|
||||||
```bash
|
|
||||||
CURSOR_SESSION_ID=$(jq -r '.session_id' /tmp/plan-review-${REVIEW_ID}.json)
|
|
||||||
jq -r '.result' /tmp/plan-review-${REVIEW_ID}.json > /tmp/plan-review-${REVIEW_ID}.md
|
|
||||||
```
|
|
||||||
|
|
||||||
If `jq` is not installed, inform the user: `brew install jq` (macOS) or equivalent.
|
|
||||||
|
|
||||||
Run the command script through the shared helper when available:
|
Run the command script through the shared helper when available:
|
||||||
|
|
||||||
@@ -211,7 +204,7 @@ CURSOR_SESSION_ID=$(jq -r '.session_id' /tmp/plan-review-${REVIEW_ID}.json)
|
|||||||
jq -r '.result' /tmp/plan-review-${REVIEW_ID}.json > /tmp/plan-review-${REVIEW_ID}.md
|
jq -r '.result' /tmp/plan-review-${REVIEW_ID}.json > /tmp/plan-review-${REVIEW_ID}.md
|
||||||
```
|
```
|
||||||
|
|
||||||
- If `REVIEWER_CLI=codex` and the review text is only in `/tmp/plan-review-${REVIEW_ID}.runner.out`, move or copy the actual review body into `/tmp/plan-review-${REVIEW_ID}.md` before verdict parsing.
|
- If `REVIEWER_CLI=codex`, extract `CODEX_SESSION_ID` from `/tmp/plan-review-${REVIEW_ID}.runner.out` after the helper or fallback run. If the review text is only in `.runner.out`, move or copy the actual review body into `/tmp/plan-review-${REVIEW_ID}.md` before verdict parsing.
|
||||||
|
|
||||||
Fallback is allowed only when the helper is missing or not executable.
|
Fallback is allowed only when the helper is missing or not executable.
|
||||||
|
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ Be specific and actionable. If the plan is solid, end with exactly: VERDICT: APP
|
|||||||
If changes are needed, end with exactly: VERDICT: REVISE"
|
If changes are needed, end with exactly: VERDICT: REVISE"
|
||||||
```
|
```
|
||||||
|
|
||||||
Capture the Codex session ID from output (line `session id: <uuid>`). Store as `CODEX_SESSION_ID` for session resume in subsequent rounds.
|
Do not try to capture the Codex session ID yet. When using the helper, extract it from `/tmp/plan-review-${REVIEW_ID}.runner.out` after the command completes (look for `session id: <uuid>`), then store it as `CODEX_SESSION_ID` for resume in subsequent rounds.
|
||||||
|
|
||||||
**If `REVIEWER_CLI` is `claude`:**
|
**If `REVIEWER_CLI` is `claude`:**
|
||||||
|
|
||||||
@@ -185,12 +185,7 @@ If changes are needed, end with exactly: VERDICT: REVISE" \
|
|||||||
> /tmp/plan-review-${REVIEW_ID}.json
|
> /tmp/plan-review-${REVIEW_ID}.json
|
||||||
```
|
```
|
||||||
|
|
||||||
Extract session ID and review text:
|
For `cursor`, the command script writes raw JSON to `/tmp/plan-review-${REVIEW_ID}.json`. Do not run `jq` extraction until after the helper or fallback execution completes.
|
||||||
|
|
||||||
```bash
|
|
||||||
CURSOR_SESSION_ID=$(jq -r '.session_id' /tmp/plan-review-${REVIEW_ID}.json)
|
|
||||||
jq -r '.result' /tmp/plan-review-${REVIEW_ID}.json > /tmp/plan-review-${REVIEW_ID}.md
|
|
||||||
```
|
|
||||||
|
|
||||||
Notes on Cursor flags:
|
Notes on Cursor flags:
|
||||||
- `--mode=ask` — read-only mode, no file modifications
|
- `--mode=ask` — read-only mode, no file modifications
|
||||||
@@ -221,7 +216,7 @@ CURSOR_SESSION_ID=$(jq -r '.session_id' /tmp/plan-review-${REVIEW_ID}.json)
|
|||||||
jq -r '.result' /tmp/plan-review-${REVIEW_ID}.json > /tmp/plan-review-${REVIEW_ID}.md
|
jq -r '.result' /tmp/plan-review-${REVIEW_ID}.json > /tmp/plan-review-${REVIEW_ID}.md
|
||||||
```
|
```
|
||||||
|
|
||||||
- If `REVIEWER_CLI=codex` and the review text is only in `/tmp/plan-review-${REVIEW_ID}.runner.out`, move or copy the actual review body into `/tmp/plan-review-${REVIEW_ID}.md` before verdict parsing.
|
- If `REVIEWER_CLI=codex`, extract `CODEX_SESSION_ID` from `/tmp/plan-review-${REVIEW_ID}.runner.out` after the helper or fallback run. If the review text is only in `.runner.out`, move or copy the actual review body into `/tmp/plan-review-${REVIEW_ID}.md` before verdict parsing.
|
||||||
|
|
||||||
#### Step 4: Read Review & Check Verdict
|
#### Step 4: Read Review & Check Verdict
|
||||||
|
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ Be specific and actionable. If the plan is solid, end with exactly: VERDICT: APP
|
|||||||
If changes are needed, end with exactly: VERDICT: REVISE"
|
If changes are needed, end with exactly: VERDICT: REVISE"
|
||||||
```
|
```
|
||||||
|
|
||||||
Capture the Codex session ID from output (line `session id: <uuid>`). Store as `CODEX_SESSION_ID` for session resume in subsequent rounds.
|
Do not try to capture the Codex session ID yet. When using the helper, extract it from `/tmp/plan-review-${REVIEW_ID}.runner.out` after the command completes (look for `session id: <uuid>`), then store it as `CODEX_SESSION_ID` for resume in subsequent rounds.
|
||||||
|
|
||||||
**If `REVIEWER_CLI` is `claude`:**
|
**If `REVIEWER_CLI` is `claude`:**
|
||||||
|
|
||||||
@@ -173,14 +173,7 @@ If changes are needed, end with exactly: VERDICT: REVISE" \
|
|||||||
> /tmp/plan-review-${REVIEW_ID}.json
|
> /tmp/plan-review-${REVIEW_ID}.json
|
||||||
```
|
```
|
||||||
|
|
||||||
Extract session ID and review text (requires `jq`):
|
For `cursor`, the command script writes raw JSON to `/tmp/plan-review-${REVIEW_ID}.json`. Do not run `jq` extraction until after the helper or fallback execution completes. If `jq` is not installed, inform the user: `brew install jq` (macOS) or equivalent.
|
||||||
|
|
||||||
```bash
|
|
||||||
CURSOR_SESSION_ID=$(jq -r '.session_id' /tmp/plan-review-${REVIEW_ID}.json)
|
|
||||||
jq -r '.result' /tmp/plan-review-${REVIEW_ID}.json > /tmp/plan-review-${REVIEW_ID}.md
|
|
||||||
```
|
|
||||||
|
|
||||||
If `jq` is not installed, inform the user: `brew install jq` (macOS) or equivalent.
|
|
||||||
|
|
||||||
Run the command script through the shared helper when available:
|
Run the command script through the shared helper when available:
|
||||||
|
|
||||||
@@ -205,7 +198,7 @@ CURSOR_SESSION_ID=$(jq -r '.session_id' /tmp/plan-review-${REVIEW_ID}.json)
|
|||||||
jq -r '.result' /tmp/plan-review-${REVIEW_ID}.json > /tmp/plan-review-${REVIEW_ID}.md
|
jq -r '.result' /tmp/plan-review-${REVIEW_ID}.json > /tmp/plan-review-${REVIEW_ID}.md
|
||||||
```
|
```
|
||||||
|
|
||||||
- If `REVIEWER_CLI=codex` and the review text is only in `/tmp/plan-review-${REVIEW_ID}.runner.out`, move or copy the actual review body into `/tmp/plan-review-${REVIEW_ID}.md` before verdict parsing.
|
- If `REVIEWER_CLI=codex`, extract `CODEX_SESSION_ID` from `/tmp/plan-review-${REVIEW_ID}.runner.out` after the helper or fallback run. If the review text is only in `.runner.out`, move or copy the actual review body into `/tmp/plan-review-${REVIEW_ID}.md` before verdict parsing.
|
||||||
|
|
||||||
#### Step 4: Read Review & Check Verdict
|
#### Step 4: Read Review & Check Verdict
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user