How it works
1. Configuration
Section titled “1. Configuration”YamlParser reads stackchain.yaml (or flutter_starter legacy root). PresetRegistry.expand applies presets; explicit keys win.
2. Generation
Section titled “2. Generation”ProjectGenerator orchestrates init:
- Flutter app detection
- Config load
- Feature directories
- Template writes (app / router / core / features / modules)
- Pubspec dependency merge
- Default YAML write if missing
- Stock test cleanup
- Lockfile
- Quality gate
3. Templates vs bricks
Section titled “3. Templates vs bricks”| Concern | Mechanism |
|---|---|
| App shell, core, features on init | Dart template classes |
| `make page | widget |
| Custom org generators | .stackchain/bricks |
4. Regeneration & preservation
Section titled “4. Regeneration & preservation”See Smart merge. Hand code outside // <stackchain:…> markers is preserved. State/routing/DI migrate rewrites presentation (and bootstrap/app/router/DI); domain/data survive unless architecture itself changes.
5. Lockfile
Section titled “5. Lockfile”.stackchain/lock.yaml records the stack fingerprint for upgrade/migrate awareness.
6. Quality gate
Section titled “6. Quality gate”doctor and post-generate gates verify structure and security baseline; strict_quality can fail on analyze.