| name | review-codex |
| description | Auto-detect what was built, write a Codex adversarial prompt, dispatch, then verify results |
| argument-hint | [optional: feature-name or path-to-review.md] |
Codex Adversarial Review Pipeline
Full Codex review lifecycle.
Argument handling:
- No argument: auto-detect from git, write prompt, dispatch
- Feature name: write prompt for that feature, dispatch
- Path to
.md file: verify existing review, implement fixes
Phase 1: Detect What to Review
git diff --name-only HEAD~3..HEAD for recently changed .cs files
- Group by feature directory
- Check
docs/reviews/ for recent codex-adversarial-*.md
- Found: Phase 3. Not found: Phase 2.
Phase 2: Write Codex Prompt
2a: Gather files
Main/Features/{feature}/ — all .cs files
LOTRAOM.Tests/Features/{feature}/ — tests
Main/Adapters/ — related adapters
ModuleData/ — config files
2b: Identify Known Suspects
- Missing adapter wrapping (sealed types in services)
- Entry points over 150 lines
- Culture lookups using
.Name.ToString() instead of ICultureMapper
- GameModel overrides not calling base
- Harmony patches on non-existent methods
- Config values hardcoded instead of IConfiguration
2c: Write and dispatch
Include: feature description, LOTRAOM architecture cheatsheet, Known Suspects, file lists.
/codex:rescue [full prompt]
Phase 3: Verify Codex Review
3a: Read the review
3b: Verify each finding against source
3c: Produce assessment table
| # | Codex Severity | Your Severity | Agree? | Reason |
3d: Implement confirmed fixes
- Make code changes
./build.ps1 -RunTests -MinCoverage 80
Rules
- NEVER implement a fix without reading the source first
- Decompile vanilla targets for Harmony/GameModel findings
- Build and test after every batch of fixes