You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
More core compilation pipeline work with generated config system and DI framework (#186)
## Major Components
### Configuration System
- Auto-generated configuration classes from YAML schema using Jinja2
templates
- Layered configuration with DefaultProvider and YamlFileProvider
- Comprehensive config validation with detailed multi-line error
messages
- Support for domain, app, and infrastructure configuration layers
### Domain Architecture
- Refactored models to use template classes (PixelTile<T>, Palette<T>)
- New models: ColorIndex, ColorIndexMap for improved type safety
- Removed RGBA-specific subclasses in favor of generic implementations
- Algorithm modules for palette matching and tile conversions
### Dependency Injection
- Integrated Google Fruit DI framework
- Component-based architecture for service composition
### Core Services
- PrimaryTilesetCompiler: Read and process palette data
- LayerModeConverter: Handle triple-layer and dual-layer conversions
- MetatileDecompiler: Decompose metatiles into constituent parts
- ImageTileizer and LayerImageMetatileizer: Template-based tileization
- TilePrinter and PalettePrinter: Diagnostic output utilities
### Error Handling & Diagnostics
- Multi-line error messages with source details
- YAML source line highlighting with formatting
- Enhanced BufferedUserDiagnostics with tag support
### Testing & Documentation
- Comprehensive test coverage for new algorithms and services
- Updated architectural notes and planning documents
- Enhanced code style guidelines and documentation
@@ -73,30 +106,32 @@ Uses `clang-format` with project-specific style configuration.
73
106
## Key Design Patterns
74
107
Porytiles2 implements:
75
108
- Domain-driven design with clear separation of concerns
76
-
-Library-based architecture inspired by clang
77
-
-Template-based utilities in `Porytiles2/templates/`
109
+
-Utilities in `Porytiles2/utilities/` and `Porytiles2/xcut/`
110
+
-Fruit DI code in `Porytiles2/di/`
78
111
79
112
## 7 Claude rules
80
113
1. First think through the problem, read the codebase for relevant files, and write a plan to `Porytiles2/claudetasks/TODO.md`.
81
114
2. The plan should have a list of todo items that you can check off as you complete them.
82
115
3. Before you begin working, check in with me and I will verify the plan.
83
116
4. Then, begin working on the todo items, marking them as complete as you go.
84
117
5. Every step of the way, give me a high-level explanation of what changes you made.
85
-
6. Make every task and code change you do as simple as possible. We want to avoid making any massive or complex changes. Every change should impact as little code as possible. Everything is about simplicity. Run the format script, unit, and integration tests after you make a code change.
118
+
6. Make every task and code change you do as simple as possible. We want to avoid making any massive or complex changes. Every change should impact as little code as possible. Everything is about simplicity. Run the format scriptand full test suite after you make a code change.
86
119
7. Finally, add a review section to the `Porytiles2/claudetasks/TODO.md` file with a summary of the changes you made and any other relevant information.
87
120
88
121
## Development Workflow Tools
89
122
1. Format code: `./Scripts/format.sh`
90
123
2. Build: `cmake --build build -j7`
91
124
3. Unit Tests: `./build/Porytiles2/tests/Porytiles2UnitTests`
0 commit comments