# Opus Review

**Model:** claude-opus-4
**Generated:** 2026-03-09T12:30:00Z

---

## Overall Assessment

The plan is well-structured and correctly identifies the deferred undo/redo pattern. Pattern expansion in GDScript is sound. However, 20 issues identified from potential runtime bugs to missing specification details.

## Issues

### 1. Incomplete Line Node Count Validation
Line estimation is "approximate" but validates against 256 limit. If approximation underestimates, GDScript creates more than expected. Need precise formula or GDScript-side cap.

### 2. Missing GDScript-side Node Count Guard
256-node limit only on Python side. GDScript has no cap. Direct WebSocket callers bypass limit.

### 3. Auto-creating Parent Nodes is Risky
Typos silently create new nodes. Always creates Node3D (wrong for 2D). Inconsistent with node_ops which errors on missing parent. Recommend: remove auto-creation or make it opt-in via `create_parent: true`.

### 4. Scatter Mode Node Count Validation Needs `scatter["items"]`
Scatter is `dict | None`, must access `scatter.get("items", [])` for count. Handle missing `items` key.

### 5. Missing Required Sub-field Validation
Grid needs rows/cols validation (missing, zero, negative). Line needs 2+ points. Scatter needs non-empty items. Python should catch these before sending to addon.

### 6. `apply_output_limit` list_keys
Response is small but `errors` array could grow. Specify `list_keys=["errors"]`.

### 7. Line Endpoint Duplication Risk
If last placed node is near endpoint due to floating point, forced endpoint creates near-duplicate. Need epsilon check (spacing * 0.1).

### 8. Rotation Format Inconsistency
Grid overrides use [x, y, z] degrees. Line uses atan2 for Y only. 2D Node2D uses single float radians. Needs clarification.

### 9. No `scale` in Grid/Line Modes
No default scale parameter. Only available via per-cell overrides. Known limitation, should be documented.

### 10. No `properties` in Grid/Line Base Specs
Default properties only via overrides. Known limitation.

### 11. Save Scene Before build_scene
ResourceLoader.load() may fail on recently-created unsaved scenes. Recommend save_scene first.

### 12. Spec vs Plan Prompt File Inconsistency
Spec says godot_development.md (deleted). Plan correctly targets v2. Resolved.

### 13. _validate_build_params Export Convention
Leading underscore suggests private but tests import it directly. Minor style issue.

### 14. Missing Error Recovery in Prompt
Add build_scene-specific errors to Error Recovery section.

### 15. `scene` Parameter Name Collision
Top-level `scene` = target .tscn, inner `scene` = PackedScene to instantiate. Confusing for AI agent.

### 16. Performance Target for 256 Nodes
~1536 undo entries for 256 nodes. Should set concrete performance target.

### 17. Node Name Uniqueness
Calling build_scene twice creates nodes with mangled names (@2). Not addressed.

### 18. WebSocket Payload Size for nodes/scatter
nodes mode sends full specs (up to ~50KB for 256). "Small payload" only applies to grid/line.

### 19. Test Coverage Gaps
Missing edge cases: rows=0, identical points, empty items, duplicate names, wrong types.

### 20. detail Default "brief" vs Other Tools' "normal"
Inconsistency with other bridge tools. Minor but worth noting.
