Help us improve
Share bugs, ideas, or general feedback.
From prd-os
Run Codex native + adversarial review against the active issue, scoped to allowed_files, capped per kind
npx claudepluginhub assafkip/prd-os --plugin prd-osHow this command is triggered — by the user, by Claude, or both
Slash command
/prd-os:issue-reviewThe summary Claude sees in its command listing — used to decide when to auto-load this command
Run the required reviews for the active DSSE issue. Execute in order:
1. Run `python3 "${CLAUDE_PLUGIN_ROOT}/scripts/issue_runner.py" status`. Confirm an issue is loaded AND `receipts.verified` is set. If `verified` is null, stop. Tell the founder to run `/issue-verify` first. Reviewing unverified code wastes Codex runtime.
2. Pull the snapshotted scope. The runner stamped `allowed_files` into state at load/approve so mid-issue spec edits cannot expand the review surface:
`$ALLOWED` is a JSON array (e.g. `["q-ktlyst/.q-system/agent-pipeline/schemas/**","q-ktlyst/.q-system/scripts...Share bugs, ideas, or general feedback.
Run the required reviews for the active DSSE issue. Execute in order:
Run python3 "${CLAUDE_PLUGIN_ROOT}/scripts/issue_runner.py" status. Confirm an issue is loaded AND receipts.verified is set. If verified is null, stop. Tell the founder to run /issue-verify first. Reviewing unverified code wastes Codex runtime.
Pull the snapshotted scope. The runner stamped allowed_files into state at load/approve so mid-issue spec edits cannot expand the review surface:
ALLOWED=$(python3 "${CLAUDE_PLUGIN_ROOT}/scripts/issue_runner.py" allowed-files)
ISSUE_ID=$(python3 "${CLAUDE_PLUGIN_ROOT}/scripts/issue_runner.py" status | python3 -c "import sys,json; print(json.load(sys.stdin).get('issue_id',''))")
$ALLOWED is a JSON array (e.g. ["q-ktlyst/.q-system/agent-pipeline/schemas/**","q-ktlyst/.q-system/scripts/**"]). If empty, stop and tell the founder the spec has no scope.
Try to claim a "standard" review slot before invoking Codex:
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/issue_runner.py" record-review standard
ISSUE_ALLOW_REVIEW_REPEAT=1 for a single retry, OR triage and close with the existing review.Invoke codex:review (Codex native review) against origin/main. Build the focus text with the scope filter inline so Codex stays inside the contracted surface:
Scope filter: $ALLOWED
Limit findings to changes inside these paths. Code outside these paths is out of contract for this issue. If a finding requires touching files outside this list, mark it out-of-scope explicitly and do not propose a patch.
Use --base origin/main --background unless the diff is trivially small (1-2 files). When the command returns, wait for completion via codex:result / codex:status. Paste the full verdict block to the founder verbatim.
Immediately pipe the standard-review findings to disk (compaction hardening: if the conversation compacts after this point, the findings survive because they are on disk, not in narrative memory). Translate Codex's free-form verdict into [{severity, body, affected_path}]. The writer assigns sequential ids, stamps created_at, marks out_of_scope=true for paths outside $ALLOWED, and sets disposition=pending:
echo '<JSON_ARRAY>' | python3 "${CLAUDE_PLUGIN_ROOT}/scripts/issue_findings.py" \
add "$ISSUE_ID" --source codex-review --allowed-files-json "$ALLOWED"
If the standard review returned approve with no findings, skip the writer call for this source. Do this before invoking the adversarial pass in step 6.
Try to claim an "adversarial" review slot:
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/issue_runner.py" record-review adversarial
ISSUE_ALLOW_REVIEW_REPEAT=1 OR proceed straight to closeout.Invoke codex:adversarial-review against origin/main with focus text built from $ALLOWED plus the contract directive:
Scope filter: $ALLOWED
Contract slice: this issue ships ONLY the change visible in the diff above. Limit findings to defects inside these paths. Do not raise edge cases that would require new follow-up issues. Do not flag pre-existing patterns in unchanged code. Do not propose architectural rewrites. If you have no defect inside the contract slice, return approve.
Same --base origin/main --background pattern. Wait for completion. Paste verdict verbatim.
Immediately pipe the adversarial-review findings to disk (same compaction reason as step 4):
echo '<JSON_ARRAY>' | python3 "${CLAUDE_PLUGIN_ROOT}/scripts/issue_findings.py" \
add "$ISSUE_ID" --source codex-adversarial --allowed-files-json "$ALLOWED"
If the adversarial review returned approve with no findings, skip the writer call for this source.
If both reviews completed (regardless of verdict, even if findings exist):
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/issue_runner.py" mark reviewed./issue-closeout triage."If either review failed to complete (Codex error, timeout, parse error):
mark reviewed./issue-review will hit the cap. Tell the founder to retry with ISSUE_ALLOW_REVIEW_REPEAT=1 if the failure was transient.Do not fix findings in this command. Codex is the reviewer. Triage and disposition happen in /issue-closeout. Do not relaunch /issue-review on your own initiative; founder must opt in to a repeat round.