{"id":"codex-ab","name":"codex-ab","summary":"A/Bコデックスレビュー実験を実施する — 全体的なコデックスレビューと、3つの重点的な次元パス(セキュリティ、エクト、ライブビュー)をブランチの違いで比較し、発見を分類し、パネル価値の評価を報告する。","body":"# Codex Panel A/B (contributor instrument — verdict decided)\n\nAnswer one question with evidence: **do dimension-focused codex passes find\nreal issues that one holistic `codex exec review` misses?** Runs both on the\nsame diff, then classifies every focused finding against the holistic pass.\n\n> **DECIDED 2026-07-10 after 4 runs (2 fresh): panel KILLED.** Fresh-only\n> 1 real miss / 1 false positive plus one zero-value run at 4× cost —\n> real misses did not outnumber FPs. Kept as contributor tooling (NOT\n> distributed) for one possible retest: a UI-heavy diff with a single\n> extra liveview-focused pass (2× cost). Scoreboard:\n> `.claude/research/2026-07-03-codex-review-integration.md` §7.\n\n## Usage\n\n```\n/codex-ab            # A/B against main (~5 min, 4 codex runs)\n/codex-ab develop    # explicit base branch\n```\n\n## Iron Laws\n\n1. **FRESH DIFF ONLY** — ask the user to confirm this branch has NOT been\n   codex-reviewed yet (cloud or `/phx:codex-loop`). A drained diff returns\n   NO FINDINGS everywhere and proves nothing — wasted quota\n2. **Verify every REAL MISS in the code before counting it** — a focused\n   finding only scores if the issue actually exists at that file:line\n3. **Read ONLY the findings `.md` files** — streams are diverted to `.log`\n   files; never cat a log into context (10k+ lines each)\n4. **Exactly 4 codex runs, never re-run dimensions** — bounded quota\n5. **Persist the verdict** — an unrecorded experiment is wasted quota\n\n## Workflow\n\n### Step 1: Preflight\n\nRun `command -v codex` — missing → STOP with install hint. Then:\n\n- `git status --short` dirty → warn (codex flags local dirt as findings)\n- Ask: \"Has codex already reviewed this branch (PR review or codex-loop)?\"\n  If yes → STOP, explain the fresh-diff requirement (Iron Law 1)\n\n### Step 2: Run the A/B (background, ~5 min)\n\n```bash\nbash ${CLAUDE_SKILL_DIR}/scripts/codex-panel-ab.sh {base} \\\n  .claude/reviews/codex-ab-$(date +%Y-%m-%d-%H%M)\n```\n\nUse `run_in_background` — it runs 1 holistic `codex exec review` + 3\nfocused `codex exec` workers (security / ecto / liveview) in parallel,\nall streams redirected. Do other work or wait; never poll.\n\n### Step 3: Classify\n\nRead the 4 findings files (`holistic.md`, `security.md`, `ecto.md`,\n`liveview.md` — small). For EACH focused finding:\n\n| Class | Meaning | Test |\n|-------|---------|------|\n| DUPLICATE | Holistic already found it | Same file + same defect |\n| REAL MISS | Genuine issue holistic missed | Read the code at file:line — defect confirmed (Iron Law 2) |\n| FALSE POSITIVE | Manufactured, pre-existing, or wrong | Code check fails, or issue exists on base branch too |\n\n### Step 4: Verdict\n\nPresent:\n\n```markdown\n## Codex Panel A/B — {branch} vs {base}\n| dimension | findings | duplicate | real miss | false positive |\nHolistic-only findings: {n}\nVerdict this run: {REAL MISS count} real miss vs {FP count} false positive\nDecision rule: build --codex-panel only if real misses outnumber false\npositives across 2-3 fresh branches.\n```\n\nWrite the verdict table to `.claude/reviews/codex-ab-{date}/VERDICT.md`.\nSuggest repeating on the next 1–2 fresh branches before deciding.\n\n## Integration\n\n```text\nfresh branch → /codex-ab (YOU ARE HERE) → verdict logged\n   ├─ real misses win across runs → build /phx:review --codex-panel\n   └─ duplicates/FPs win → keep holistic /phx:codex-loop, drop panel idea\n       └─ OUTCOME 2026-07-10: this branch won — panel dropped\n```\n\n## References\n\n- `${CLAUDE_SKILL_DIR}/scripts/codex-panel-ab.sh` — the 4-run harness\n- Related: `/phx:codex-loop` (holistic fix loop), `/phx:review --codex`","author":"@oliver-kriska","ownerProfile":null,"authorContacts":null,"sourceUrl":"https://github.com/oliver-kriska/claude-elixir-phoenix/tree/main/.claude/skills/codex-ab","license":"MIT","category":"document","lang":"en","tokens":987,"stars":0,"calls30d":2,"claimed":false,"visibility":"public","origin":"crawler","version":"0.1.0","createdAt":"2026-08-22","updatedAt":"2026-08-22","files":[{"path":"scripts/codex-panel-ab.sh","size":3330,"sha256":"18e1c448783beb572795b34c210c4e777b1311d0dc0b64aa89cde6c94f177475"},{"path":"triggers.json","size":719,"sha256":"41e09fa019a4b3425509202808e8df9bac934d1865a9565ad0c8c6db044d1ef9"}],"requires":{"mcp":[],"tools":[]},"safety":{"flags":[],"scannedAt":"2026-08-22","hasScripts":true,"networkEndpoints":[]}}