Build Automation (Just)
The project uses just as a command runner. All common tasks are defined injustfile.
Common Commands
justfile for 50+ available commands.
Testing Tools
pytest
Primary test runner:Syrupy (Snapshot Testing)
Captures and verifies complex data structures:Code Quality Tools
Ruff (Linter)
Fast Python linter:pyproject.toml:
- Line length: 120
- Enabled rules: B007, B017, B023, B904, COM812, I001, PGH003, PT017, RUF012, RUF100, S113, S607, TRY004, UP035
ty (Type Checker)
Fast Python type checker:import-linter
Enforces architectural boundaries:pyproject.toml:
grimmust not importcrimson- Perk implementations isolated from selection logic
ast-grep (Structural Search)
Structural code search and transformation:prek (Pre-commit Hooks)
Manages git hooks:Asset Tools
PAQ Archive Extraction
Extract original game archives:Atlas Tools
Sprite atlas analysis:Font Samples
Generate font rendering samples:Analysis Scripts (40+)
Located inscripts/, these tools support reverse engineering and analysis.
Ghidra Tools
- Ghidra Analysis
- IDA Pro (Windows)
analysis/ghidra/scripts/:ApplyNameMap.java- Apply name mappingsApplyDataMap.java- Apply data structure layoutsExportAll.java- Export decompiles
Frida Tools (Windows)
Runtime instrumentation for capturing native behavior:- Gameplay Captures
- Quest Analysis
- UI Tracing
- Demo/Trial Analysis
$CRIMSON_FRIDA_DIR (default: C:\share\frida).Frida Import/Reduce (Unix)
Import Windows captures to Unix for analysis:Code Analysis Scripts
Duplication Detection
pylint with R0801 rule (duplicate-code).
Documentation Tools
Zensical (Docs Site Generator)
Documentation Validation
Replay Tools
Replay analysis and verification:Debugging Tools
WinDbg (Windows)
Debugger for native binary:PE Analysis (Unix)
Portable Executable metadata:rabin2 from radare2.
Zig Tools
For Zig runtime development:Utility Scripts
Select utility scripts inscripts/:
| Script | Purpose |
|---|---|
atlas_scan.py | Scan sprite atlases for usage |
atlas_export.py | Export atlas frames to PNG |
check_docs.py | Validate documentation structure |
extract_weapon_table.py | Extract weapon stats to table |
gen_spawn_templates.py | Generate creature spawn templates |
entrypoint_trace.py | Trace call graph from entrypoints |
function_hotspots.py | Identify hot functions |
dat_hotspots.py | Analyze data access patterns |
schema_inventory.py | Inventory data structures |
save_status.py | Analyze save file structure |
zensical_fix_md.py | Auto-fix Markdown formatting |
Tool Installation Summary
- Python (uv)
- Rust (cargo)
- System (apt/brew)
- Tools (uv tool)
All Python tools are installed via Includes:
uv sync:- pytest, ruff, ty, import-linter
- syrupy, pytest-mock, pytest-cov
- Frida analysis scripts (Unix)
Next Steps
Testing Guide
Learn how to run and write tests
Verification Process
Complete verification workflow
Parity Workflow
Understand parity-first development
Code Style
Follow project coding standards