refactor: split worldgen modules#682
Conversation
📋 SummaryNo linked issues found in the PR description. This is a structural refactor that splits the monolithic 📌 Review Metadata
This PR cleanly decouples generator implementations from the registry/facade, introduces a proper 🔴 Critical Issues (Must Fix - Blocks Merge)None identified.
|
| Principle | Score | Notes |
|---|---|---|
| Single Responsibility | 9 | Clean split: API types, registry, and each generator implementation now live in dedicated modules. |
| Open/Closed | 8 | New generators can be added by creating a new module and registering its descriptor without modifying existing generator code. |
| Liskov Substitution | 8 | All generators implement the same Generator vtable via worldgen-api; consumers are unaffected by the internal refactor. |
| Interface Segregation | 9 | worldgen-api exposes only the shared contract; individual modules only import what they need. |
| Dependency Inversion | 9 | Registry depends on abstract descriptors, not concrete generator implementations. |
| Average | 8.6 |
🎯 Final Assessment
Overall Confidence Score: 75%
How to interpret: 61-80%: Minor concerns, mostly ready with some fixes
Confidence Breakdown:
- Code Quality: 85% (clean refactor, good module boundaries)
- Completeness: 70% (missing lighting calls are a real regression)
- Risk Level: 70% (the lighting regression affects flat/shadow-test worlds)
- Test Coverage: 80% (existing tests pass, but no new tests for the descriptor system)
Merge Readiness:
- All critical issues resolved
- SOLID average score >= 6.0
- Overall confidence >= 60%
- No security concerns
- Tests present and passing (if applicable)
Verdict:
MERGE WITH FIXES
The refactor is architecturally sound and preserves backward compatibility, but the missing lighting computation in flat and shadow-test generators must be restored before merging.
{
"reviewed_sha": "ab0cbf2f742627ac9c969aa30bd4f977494f4720",
"critical_issues": 0,
"high_priority_issues": 1,
"medium_priority_issues": 0,
"overall_confidence_score": 75,
"recommendation": "MERGE WITH FIXES"
}
📋 SummaryNo linked issues found in the PR description. This is a structural refactor splitting the monolithic 📌 Review Metadata
This PR cleanly decouples generator implementations from the registry/facade, introduces a proper 🔴 Critical Issues (Must Fix - Blocks Merge)✅ All previously reported critical issues have been resolved.
|
| Principle | Score | Notes |
|---|---|---|
| Single Responsibility | 9 | Clean split: API types, shared lighting utilities, registry, and each generator implementation live in dedicated modules. |
| Open/Closed | 8 | New generators can be added by creating a new module and registering its descriptor without modifying existing generator code. |
| Liskov Substitution | 8 | All generators implement the same Generator vtable via worldgen-api; consumers are unaffected by the internal refactor. |
| Interface Segregation | 9 | worldgen-api exposes only the shared contract; individual modules only import what they need. |
| Dependency Inversion | 9 | Registry depends on abstract descriptors, not concrete generator implementations. |
| Average | 8.6 |
🎯 Final Assessment
Overall Confidence Score: 90%
How to interpret: 81-100%: High confidence, ready to merge or with trivial fixes
Confidence Breakdown:
- Code Quality: 90% (clean refactor, good module boundaries, lighting regression fixed)
- Completeness: 90% (descriptor system fully implemented, auto-world resolution dynamic, backward compatibility preserved)
- Risk Level: 85% (structural refactor touching 58 files, but well-contained to worldgen and verified by tests)
- Test Coverage: 90% (existing tests pass, no new descriptor-specific tests but the refactor preserves all existing behavior)
Merge Readiness:
- All critical issues resolved
- SOLID average score >= 6.0
- Overall confidence >= 60%
- No security concerns
- Tests present and passing (if applicable)
Verdict:
MERGE
The refactor is architecturally sound, all previously identified issues have been resolved, backward compatibility is preserved, and the full test suite passes.
{
"reviewed_sha": "e6eb39a6953862714c19c02a3fe74d6a077caf2a",
"critical_issues": 0,
"high_priority_issues": 0,
"medium_priority_issues": 0,
"overall_confidence_score": 90,
"recommendation": "MERGE"
}

Summary
world-worldgenas the facade/registry while preserving existing re-export access patterns.Verification
nix develop --command zig fmt src/ modules/ build.zignix develop --command zig build test