| name | deep-review |
| description | Launch parallel deep-dive agents to review completed work for quality, standards, and completeness |
| argument-hint | [system-name or class-name] |
Deep Review
Launch 4 parallel review agents to audit the specified system or class: $ARGUMENTS
Step 0: Identify Target Files
Find all files related to $ARGUMENTS:
src_new/scripts/ โ core logic and class offenses
src_new/triggers/ โ game text pattern matching
src_new/aliases/ โ user command shortcuts
src_new/tests/ โ unit tests
.claude/classes/ โ class documentation
List all relevant files and their line counts.
Step 1: Launch 4 Parallel Review Agents (Sonnet)
Agent 1 โ Lua Standards & Quality
Review all target files for:
- Lua 5.1 compatibility โ no Lua 5.2+ features (goto, bitwise ops, string.format %a)
- Variable scoping โ
local declarations, no accidental globals (check luacheck would pass)
- Naming conventions โ camelCase for locals, UPPER_CASE for constants, dot.notation for modules
- Dead code โ unreachable branches, unused locals, commented-out blocks
- Error handling โ pcall/xpcall around GMCP parsing, nil checks on table lookups
- Performance โ avoid string concatenation in hot loops, prefer table.concat
- YAML header correctness โ valid frontmatter, matching group hierarchy
Rate each finding: CRITICAL / HIGH / MEDIUM / LOW
Agent 2 โ Combat System Correctness
Review target files for combat logic errors:
- Affliction IDs โ verify all affliction names match Achaea's canonical set
- Balance/equilibrium gating โ commands sent only when on balance
- Lock progression โ affliction combinations follow valid lock routes (reference
.claude/classes/lock_types.md)
- Illusion detection โ proper GMCP cross-referencing to reject fake afflictions
- Curing priority โ affliction priorities don't conflict with server-side curing
- State machine correctness โ state transitions are complete (no missing cases)
- GMCP data trust โ using
gmcp.Char.Vitals, gmcp.Char.Afflictions correctly
- Class-specific mechanics โ verify ability names, skill costs, cooldowns match game data
Agent 3 โ Trigger & Pattern Correctness
Review trigger files for:
- Regex correctness โ patterns match intended game text, no catastrophic backtracking
- Trigger ordering โ numbered prefixes maintain correct fire order
- False positive risk โ patterns too broad that match unintended text
- Capture group usage โ captured values used correctly in trigger scripts
- Multi-line trigger coverage โ multi-line game output handled properly
- Duplicate patterns โ two triggers matching the same text
- Missing patterns โ known game output not covered by any trigger
Agent 4 โ Completeness & Documentation
Check that the work is complete:
- Test coverage โ do unit tests exist for new/modified logic?
- CHANGELOG updated โ does CHANGELOG.md reflect the changes?
- Class doc updated โ if class offense changed, is
.claude/classes/<class>.md current?
- AGENTS.md updated โ if new patterns/conventions introduced, is AGENTS.md current?
- Build passes โ
./build.sh succeeds
- Version consistency โ 3-point version sync intact
- Missing files โ any triggers referenced in code but not created?
Step 2: Compile Report
Merge findings from all 4 agents:
DEEP REVIEW: [target]
=====================
CRITICAL: N findings
HIGH: N findings
MEDIUM: N findings
LOW: N findings
[Grouped findings by agent, with file:line references]
VERDICT: CLEAN / NEEDS FIXES / BLOCKED
Step 3: Fix Issues (if requested)
For each CRITICAL or HIGH finding:
- Make the fix
- Run
lua5.1 src_new/tests/test_runner.lua
- Run
./build.sh