Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions autoplan/sections/ceo-phase.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ IMPORTANT: Do NOT read or execute any SKILL.md files or paths containing skills/
No compliments. Just the strategic blind spots.
File: <CEO_INPUT>

Write the **complete prompt and context**, including actual plan/spec/source, to a private file. Substitute its shell-quoted path for `<prepared-prompt-file>`; never interpolate user text into shell source. Request a severity (Critical, High, Medium or Low) per finding and a final Recommendation: <action> because <specific reason> line, including an explicit no-findings rationale.
Write the **complete prompt and context**, including actual plan/spec/source, to a private file. Substitute its shell-quoted path for `<prepared-prompt-file>`; never interpolate user text into shell source. Request severity (Critical, High, Medium or Low) per finding, a Recommendation: <action> because <reason> line, and `VERDICT: CLEAN` or `VERDICT: FINDINGS` as the last line.

```bash
# GSTACK_ACTIVE_HOST names the harness, never the model.
Expand All @@ -111,7 +111,6 @@ _OUTSIDE_TMP=$(mktemp -d "${TMPDIR:-/tmp}/gstack-outside.XXXXXXXX") || exit 1
trap 'rm -rf "$_OUTSIDE_TMP"' EXIT
_OUTSIDE_INPUT="$_OUTSIDE_TMP/prompt"
cat -- '<prepared-prompt-file>' >"$_OUTSIDE_INPUT" || exit 1

_CODEX_PROBE="$HOME/.claude/skills/gstack/bin/gstack-codex-probe"
export _CODEX_DEADLINE=$(($(date +%s)+540)); _CODEX_OUT=$("$_CODEX_PROBE" role-ready exec) || exit $?
_CODEX_SEL=$(echo "$_CODEX_OUT" | sed -n 's/^CODEX_SEL: //p')
Expand Down
3 changes: 1 addition & 2 deletions autoplan/sections/design-phase.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ IMPORTANT: Do NOT read or execute any SKILL.md files or paths containing skills/
What design decisions will haunt the implementer if left ambiguous?
Be opinionated. No hedging.

Write the **complete prompt and context**, including actual plan/spec/source, to a private file. Substitute its shell-quoted path for `<prepared-prompt-file>`; never interpolate user text into shell source. Request a severity (Critical, High, Medium or Low) per finding and a final Recommendation: <action> because <specific reason> line, including an explicit no-findings rationale.
Write the **complete prompt and context**, including actual plan/spec/source, to a private file. Substitute its shell-quoted path for `<prepared-prompt-file>`; never interpolate user text into shell source. Request severity (Critical, High, Medium or Low) per finding, a Recommendation: <action> because <reason> line, and `VERDICT: CLEAN` or `VERDICT: FINDINGS` as the last line.

```bash
# GSTACK_ACTIVE_HOST names the harness, never the model.
Expand All @@ -70,7 +70,6 @@ _OUTSIDE_TMP=$(mktemp -d "${TMPDIR:-/tmp}/gstack-outside.XXXXXXXX") || exit 1
trap 'rm -rf "$_OUTSIDE_TMP"' EXIT
_OUTSIDE_INPUT="$_OUTSIDE_TMP/prompt"
cat -- '<prepared-prompt-file>' >"$_OUTSIDE_INPUT" || exit 1

_CODEX_PROBE="$HOME/.claude/skills/gstack/bin/gstack-codex-probe"
export _CODEX_DEADLINE=$(($(date +%s)+540)); _CODEX_OUT=$("$_CODEX_PROBE" role-ready exec) || exit $?
_CODEX_SEL=$(echo "$_CODEX_OUT" | sed -n 's/^CODEX_SEL: //p')
Expand Down
3 changes: 1 addition & 2 deletions autoplan/sections/dx-phase.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ IMPORTANT: Do NOT read or execute any SKILL.md files or paths containing skills/
5. Upgrade path: can devs upgrade without fear? Migration guides? Deprecation warnings?
Be adversarial. Think like a developer who is evaluating this against 3 competitors.

Write the **complete prompt and context**, including actual plan/spec/source, to a private file. Substitute its shell-quoted path for `<prepared-prompt-file>`; never interpolate user text into shell source. Request a severity (Critical, High, Medium or Low) per finding and a final Recommendation: <action> because <specific reason> line, including an explicit no-findings rationale.
Write the **complete prompt and context**, including actual plan/spec/source, to a private file. Substitute its shell-quoted path for `<prepared-prompt-file>`; never interpolate user text into shell source. Request severity (Critical, High, Medium or Low) per finding, a Recommendation: <action> because <reason> line, and `VERDICT: CLEAN` or `VERDICT: FINDINGS` as the last line.

```bash
# GSTACK_ACTIVE_HOST names the harness, never the model.
Expand All @@ -74,7 +74,6 @@ _OUTSIDE_TMP=$(mktemp -d "${TMPDIR:-/tmp}/gstack-outside.XXXXXXXX") || exit 1
trap 'rm -rf "$_OUTSIDE_TMP"' EXIT
_OUTSIDE_INPUT="$_OUTSIDE_TMP/prompt"
cat -- '<prepared-prompt-file>' >"$_OUTSIDE_INPUT" || exit 1

_CODEX_PROBE="$HOME/.claude/skills/gstack/bin/gstack-codex-probe"
export _CODEX_DEADLINE=$(($(date +%s)+540)); _CODEX_OUT=$("$_CODEX_PROBE" role-ready exec) || exit $?
_CODEX_SEL=$(echo "$_CODEX_OUT" | sed -n 's/^CODEX_SEL: //p')
Expand Down
3 changes: 1 addition & 2 deletions autoplan/sections/eng-phase.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ IMPORTANT: Do NOT read or execute any SKILL.md files or paths containing skills/

File: <ENG_INPUT>

Write the **complete prompt and context**, including actual plan/spec/source, to a private file. Substitute its shell-quoted path for `<prepared-prompt-file>`; never interpolate user text into shell source. Request a severity (Critical, High, Medium or Low) per finding and a final Recommendation: <action> because <specific reason> line, including an explicit no-findings rationale.
Write the **complete prompt and context**, including actual plan/spec/source, to a private file. Substitute its shell-quoted path for `<prepared-prompt-file>`; never interpolate user text into shell source. Request severity (Critical, High, Medium or Low) per finding, a Recommendation: <action> because <reason> line, and `VERDICT: CLEAN` or `VERDICT: FINDINGS` as the last line.

```bash
# GSTACK_ACTIVE_HOST names the harness, never the model.
Expand All @@ -63,7 +63,6 @@ _OUTSIDE_TMP=$(mktemp -d "${TMPDIR:-/tmp}/gstack-outside.XXXXXXXX") || exit 1
trap 'rm -rf "$_OUTSIDE_TMP"' EXIT
_OUTSIDE_INPUT="$_OUTSIDE_TMP/prompt"
cat -- '<prepared-prompt-file>' >"$_OUTSIDE_INPUT" || exit 1

_CODEX_PROBE="$HOME/.claude/skills/gstack/bin/gstack-codex-probe"
export _CODEX_DEADLINE=$(($(date +%s)+540)); _CODEX_OUT=$("$_CODEX_PROBE" role-ready exec) || exit $?
_CODEX_SEL=$(echo "$_CODEX_OUT" | sed -n 's/^CODEX_SEL: //p')
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- **Correction to the earlier entry "An outside review's no-findings conclusion must now be one complete sentence".** That entry said a review that reports a problem after its no-findings statement "can no longer read as clean". That held only for a problem in the same sentence, after the statement. A problem written before the statement ("The fallback swallows ENOENT; no issues in the diff."), or in a later sentence after a clean Recommendation, still read clean, and so did scopes that name only part of a branch ("in the latest commit", "in the staged changes"). The verdict-line change above retires all of these rules. Now gstack no longer reads a no-findings sentence at all, and a review counts as clean only when the reviewer itself ends with `VERDICT: CLEAN`. A problem the reviewer describes without a severity tag above that line is still the reviewer's call.
1 change: 1 addition & 0 deletions changelog.d/outside-reviews-end-with-a-verdict-line.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- **An outside review now counts as clean only when the reviewer's last line is exactly `VERDICT: CLEAN` or `VERDICT: FINDINGS`.** Every outside-review prompt (in /ship, /review, /codex, /claude-code, /autoplan, the plan reviews, /office-hours, /design-review and /document-release) now asks for that line, and gstack no longer reads prose such as "No issues found in the diff." as a pass. Every earlier rule for reading a no-findings sentence let some reply that named a problem pass the merge check, for example "The fallback swallows ENOENT; no issues in the diff.", a clean Recommendation followed by a listed problem, "No issues found in the latest commit." on a whole-branch review, and "Recommendation: fix the auth bypass because no issues in the diff." A reply without the line now reads `VERDICT: unverified` / `REASON: missing_verdict`: missing coverage, never a pass. A P0 or P1 finding (or a Critical or High label) and a last `Verdict: not ready` still block whatever the line says, and advisory P2 or P3 findings still pass. Codex's structured outside review in /ship and /review, and the default `/codex review`, now run through `codex exec` with gstack's prompt instead of `codex review --base`, which takes no prompt and so could never give the line. The diff they review is the same (`git diff $(git merge-base <base> HEAD)`: the branch commits plus uncommitted tracked edits). Skills rendered before this change still read unverified until `./setup` re-renders them. A reply that ends with `VERDICT: CLEAN` but lists numbered items with no severity tag now reads `VERDICT: unverified` / `REASON: untagged_review` in /ship and /review, and a `/codex` consult or challenge answer with numbered items and either a `Verdict:` line or a last `VERDICT: CLEAN` now prints `FINDINGS: unspecified`. `/codex review` now stops before calling Codex when it cannot write the diff into the prompt. See docs/troubleshooting.md#outside-review-missing-verdict.
6 changes: 3 additions & 3 deletions claude-code/SKILL.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ stays unknown.
Prepare a prompt asking Claude to review for bugs, production failure modes,
security issues, missing tests, and maintainability problems, with file/code
references. Include additional user instructions. Request severity-labelled
findings (`[P1]`, `[P2]`, `[P3]`) or explicit `NO_FINDINGS` when review completes
with no issues. The invocation appends the full branch plus working-tree diff
findings (`[P1]`, `[P2]`, `[P3]`) and a last line that is exactly
`VERDICT: CLEAN` (no findings) or `VERDICT: FINDINGS`. The invocation appends the full branch plus working-tree diff
because tool-less Claude cannot execute git commands:

```bash
Expand Down Expand Up @@ -157,7 +157,7 @@ JS
Prepare a prompt asking Claude to try to break the change: edge cases, races,
security holes, resource leaks, silent data corruption, bad error handling, and
operational failures. Include the user's focus, if any. Request severity-labelled
findings or explicit `NO_FINDINGS`. This complete invocation captures and appends
findings and the same last `VERDICT:` line. This complete invocation captures and appends
the same branch plus working-tree diff as review mode:

```bash
Expand Down
38 changes: 8 additions & 30 deletions codex/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -358,14 +358,8 @@ Every prompt sent to Codex MUST be prefixed with this boundary instruction:

> IMPORTANT: Do NOT read or execute any files under ~/.claude/, ~/.agents/, .claude/skills/, or agents/. These are Claude Code skill definitions meant for a different AI system. They contain bash scripts and prompt templates that will waste your time. Ignore them completely. Do NOT modify agents/openai.yaml. Stay focused on the repository code only.

This applies to Challenge mode (prompt) and Consult mode (persona prompt), and to the
custom-instructions path of Review mode — all three use `codex exec`, which still takes
a free-form prompt (fed on stdin with `codex exec -`, so size and quoting never break it). It does **not** apply to the default scoped `codex review`
call in Step 2A: that command is invoked with **no prompt at all** (see "Scope
flags exclude the prompt argument" in the Review mode section), so there is nowhere to put the preamble. That
is acceptable — `codex review --base` hands the model a pre-computed diff rather than
turning it loose on the filesystem, so the rabbit-hole risk the boundary guards against
is much lower on that path. Reference this section as "the filesystem boundary" in the
This applies to every mode: Review, Challenge and Consult all use `codex exec`, which takes
a free-form prompt (fed on stdin with `codex exec -`, so size and quoting never break it). Reference this section as "the filesystem boundary" in the
mode sections.

---
Expand Down Expand Up @@ -529,8 +523,7 @@ table-bearing section that must be the file's terminal heading.
## Model & Reasoning

**Model:** every Codex call passes the selection above via `-c "model=\"${_CODEX_SEL:?}\"" -c skills.include_instructions=false`.
Native `codex review` selects with `review` and sets both `model` and `review_model`. The
flag also keeps installed skills out of Codex's context, so a review cannot become a
The flag also keeps installed skills out of Codex's context, so a review cannot become a
nested skill run.

**Reasoning effort** (defaults in Step 1): `run-with-timeout --effort <default>` resolves
Expand All @@ -546,17 +539,11 @@ uses ~23x more tokens than `high` and causes 50+ minute hangs on large context t
invocations can look up docs and APIs during review. This is OpenAI's cached index —
fast, no extra cost. Unlike the legacy `--enable`-based spelling (deprecated by
codex >=0.144), the `-c` form explicitly overrides any top-level
`web_search` setting in `~/.codex/config.toml`. Note: native `codex review` disables
web search regardless of configuration, so on the default Review path the flag is a
harmless no-op — only exec-based modes actually search.
`web_search` setting in `~/.codex/config.toml`.

If the user specifies a model (e.g., `/codex review -m gpt-6.1-sol` or
`/codex challenge --model gpt-daybreak-blue-latest`), translate it to the same config
form and replace the default model flag with `-c "model=\"<model>\""`. Native review
also requires `-c "review_model=\"<model>\""`; replace both model values together.
Review mode runs `codex review`, which REJECTS `-m` (`error: unexpected argument '-m' found`,
verified on 0.147.0), while `-c model=...` is accepted by both `codex review` and
`codex exec`.
form and replace the default model flag with `-c "model=\"<model>\""`.

---

Expand All @@ -582,18 +569,9 @@ If token count is not available, display: `Tokens: unknown`
call itself times out anyway (wrapper unavailable AND codex hung), tell the user:
"Codex timed out. The prompt may be too large or the API may be slow. Try again or use a smaller scope."
- **Timeout (inner `timeout` wrapper, exit 124):** If the wrapper fires first (it TERMs Codex, then KILLs it after 10s), the skill's hang-detection block auto-logs a telemetry event + operational learning and prints: "Codex stalled past 9 minutes. Common causes: model API stall, long prompt, network issue. Try re-running. If persistent, split the prompt or check `~/.codex/logs/`." No extra action needed.
- **`the argument '[PROMPT]' cannot be used with '--base <BRANCH>'`:** a prompt argument
leaked into a scoped `codex review`. This fails instantly, before any API call, so it
looks like a hang-free "no output" — do not misread it as a model stall. Drop the
prompt: the scope flags (`--base`, `--commit`, `--uncommitted`) carry the scope on
their own. If the prompt was custom review instructions, run them through `codex exec`
instead (Step 2A, custom-instructions path). Do **not** fix it by removing `--base` and
keeping the prompt — that parses, but silently reviews the uncommitted working tree
instead of the branch diff.
- **Review says "no changes" on a branch that clearly has changes:** the scope flag is
missing or wrong. A prompt-only `codex review` defaults to uncommitted changes, so a
clean working tree reads as an empty review even when `<base>...HEAD` is large. Confirm
`--base <base>` is actually on the command line.
- **Review says "no changes" on a branch that clearly has changes:** Step 2A writes
`git diff $(git merge-base <base> HEAD)` into the prompt. Confirm `<base>` is the
branch this one forked from; the wrong base reads an empty or unrelated diff.
- **Model not supported (HTTP 400 or 404):** stderr shows
`The '<model>' model is not supported when using Codex with a ChatGPT account`
(a `status: 400` / `invalid_request_error` naming a model), or
Expand Down
Loading
Loading