2.6 KiB
2.6 KiB
Generation Kernel And Legacy RuoYi Adapter Plan
Goal: Separate deterministic ProjectSpec orchestration from the current RuoYi projection/template implementation and give the first Adapter a versioned, fingerprinted capability contract.
Architecture: ProjectSpecGenerationService remains the authenticated version orchestrator. It delegates source production to DeterministicGenerationKernel, which resolves a GeneratorAdapter, validates the returned target set, inspects archives, and builds stable manifests. LegacyRuoYiGeneratorAdapter owns LegacyProjectProjection and IFrontProjectPreviewService. Its Template Pack descriptor fingerprints effective database template files plus bundled classpath template resources.
Task 1: Adapter SPI
- Add adapter ID/version selection to ProjectSpec deliverables without invalidating older V1 snapshots.
- Define
GeneratorAdapter, request/result, capability, Adapter descriptor, Template Pack descriptor, and raw archive contracts. - Add a registry that rejects unknown adapters, version mismatches, and unsupported schema versions.
Task 2: Legacy Adapter
- Wrap LegacyProjectProjection and the current preview renderer in
LegacyRuoYiGeneratorAdapter. - Declare supported schema, output targets, and runtime capabilities.
- Fingerprint selected database template files and bundled qing/VM/business-block resources using stable resource paths.
Task 3: Deterministic Kernel
- Move ZIP safety checks and stable manifest construction out of
ProjectSpecGenerationService. - Require the Adapter to return every selected target exactly once.
- Keep file count, uncompressed byte, duplicate path, and traversal limits in the target-independent kernel.
Task 4: Run Identity And UI
- Build Generation Run Adapter and Template fingerprints from formal descriptors.
- Expose Adapter capability and Template resource identity in existing run responses.
- Update Factory source contracts and labels where needed.
Task 5: Verification
- Run Adapter, Kernel, Factory generation, run persistence, controller, and frontend regression tests.
- Run the Vite build and
git diff --check. - Record P2-A completion and remaining Prompt/Stage Pipeline work in the roadmap.
Boundaries
- This phase keeps the existing templates and Legacy projection behavior intact.
- It does not yet implement Prompt Registry, Model Gateway, Stage Handler checkpoints, Plugin resolution, or a second technology Adapter.
- Template Pack version is a Legacy contract label plus a real content fingerprint; a publishable Template Pack version entity remains future work.