S244 Platform Generation Quality V3

Documentation for Sessions

S244: Platform Generation Quality v3

Date: 2026-03-19 to 2026-03-20 Session: 244 Status: In Progress (core infrastructure complete, refinement ongoing)


What This Session Achieved (Plain Language)

This session transformed the platform generation pipeline from producing blank, non-functional previews to rendering real working platforms with live data from the database.

Before S244

When a user asked Vitto to generate a platform:

After S244


Timeline of Changes

Phase 1: Research & Design (2026-03-19)

What happened: Deep analysis of both monorepos (gspace1 and gmodules1) to understand the quality gap.

Key finding: gspace1 already had 21 core libraries covering every building block pattern gmodules1 uses. The gap wasn't infrastructure — it was that the LLM generation prompt (implement.prompt.md) only taught ~30% of the available SDK. The LLM can only generate what it's told exists.

Deliverables:

Phase 2: Pipeline Enrichment (2026-03-19)

7 tasks executed to enrich the generation pipeline:

# What Changed Why It Matters
1 Added @libs-core/workflow-engine to platform template Generated code can now import workflow components
2 Added BuildingBlockSpec, SchemaSpec, SeedDataSpec types Pipeline can carry workflow/filter/seed metadata
3 Enriched ANALYZE prompt with building block detection LLM now identifies which entities need workflows, filters, etc.
4 Added 5 building block patterns to EXECUTE prompt LLM generates workflow definitions, filter panels, entity lookups, module registration, seed data
5 Wired ANALYZE→EXECUTE metadata flow Building block decisions propagate to code generation
6 Added seed data seeding in INTEGRATE phase Generated platforms have data on first load
7 Fixed Generations tab initialization Tab loads generation history instead of showing empty state

Phase 3: Preview System Fixes (2026-03-20)

3 critical infrastructure bugs found and fixed:

Bug 1: Module Detection Regex (THE reason preview was blank)

Bug 2: Missing SDK Component Stubs (caused ɵmod TypeError)

Bug 3: Missing formatDate in useCrudDetail stub

Phase 4: Prompt Hardening (2026-03-20)


Files Modified (Complete List)

Generation Pipeline (backend-vitto-api)

File Change
APIs/backend-vitto-api/src/prompts/module-gen/implement.prompt.md +226 lines: 5 building block patterns, schemas/seedData output, CDN URL ban
APIs/backend-vitto-api/src/prompts/module-gen/system-analyze.prompt.md +19 lines: buildingBlocks detection rules per entity
APIs/backend-vitto-api/src/app/module-generation/module-generation.types.ts New types: BuildingBlockSpec, SchemaSpec, SeedDataSpec; updated EntitySpec, ModuleGenExecuteResult, normalizeAnalyzeResult()
APIs/backend-vitto-api/src/app/module-generation/phases/execute.phase.ts Enriches specs with buildingBlocks; extracts schemas/seedData from LLM output
APIs/backend-vitto-api/src/app/module-generation/phases/integrate.phase.ts Seeds data to backend-api after validation

Preview System (platform-preview)

File Change
libs/libs-structural/platform-preview/src/lib/config/sdk-preview-stubs.ts Expanded from 2 to 13 UI component stubs; added formatDate/formatDateTime

Studio UI (vitto-studio)

File Change
libs/libs-structural/vitto-studio/src/lib/services/preview.service.ts Fixed module detection regex for 2-level directory paths
libs/libs-structural/vitto-studio/src/lib/services/studio-generation-listener.service.ts Calls loadGenerations() on completion so Generations tab populates
libs/libs-structural/vitto-studio/src/lib/panels/generations-panel.component.ts Added effect() to auto-load generations/drafts on panel init

Platform Template

File Change
repo-templates/platform-base-template/tsconfig.base.json Added @libs-core/workflow-engine path mapping
repo-templates/platform-base-template/libs/core/workflow-engine/ Copied workflow-engine library

What's Working Now

  1. Live Preview renders generated platforms with real CRUD data from backend-api:3000
  2. Module detection works for both flat and categorized directory structures
  3. 13 UI components are stubbed for preview rendering (shells, badges, buttons, filters, inputs, selects, etc.)
  4. LLM prompt teaches workflows, filters, entity lookups, module registration, seed data
  5. ANALYZE phase detects building block requirements per entity
  6. Generations tab loads history on open
  7. All TypeScript compiles cleanly across all modified projects

What Still Needs Work

Pending Activation (requires backend-vitto-api restart)

Known Remaining Issues

  1. Preview UI/UX needs theme integration — The stub components render with minimal CSS. They should inherit the theme-system's CSS variables for a polished look.
  2. Tab switching feels jumpy — Each module route lazy-loads and triggers a re-render. Consider preloading adjacent routes or adding transition animations.
  3. Slow reload — The rspack WASM compilation takes ~500ms cold. For subsequent reloads, the bundler should use incremental/patch compilation (infrastructure exists but may not be triggering correctly).
  4. Generations tab shows only the active draft. Previous generations and the main branch reference are not displayed (may need backend endpoint or data model investigation).
  5. Duplicate component naming — The LLM sometimes generates both child-profile-list/ and childprofile-list/ directories. The prompt should enforce consistent hyphenated naming.

Future Improvements


Decisions Logged (MCP Intelligence)

Decision ID Topic Confidence
dev_1774027803329_1giur1w Module detection regex fix (blank preview) 0.97
dev_1774027825040_zmbluyz SDK preview stubs expansion (ɵmod TypeError) 0.98
dev_1774027858330_t40mkst Pipeline enrichment with building blocks 0.93

Conventions Added

Convention Rule
platform-generation When adding UI component to implement.prompt.md, add corresponding stub to sdk-preview-stubs.ts
platform-generation Module paths support both 1-level and 2-level directory structures

For Non-Developers: What Does This Mean?

Before this session: When Vitto generated a platform, you saw navigation tabs but the actual pages were blank. It felt broken even though the code was being created correctly behind the scenes.

After this session: Generated platforms now show real, functional pages — lists with data, editable forms, detail views. The system pulls real data from the database. When you click "Edit" on a badge or reward, you see a proper form with fields, labels, and validation.

What's next: The visual polish needs improvement (matching the GoGrab theme), the performance can be smoother (less jumping between tabs), and the system needs to generate even richer features automatically (workflow status transitions, filter panels, entity relationship lookups). These improvements are designed and coded — they just need a backend restart to activate fully.

Bottom line: We went from "preview shows nothing" to "preview shows working CRUD apps with real data" in one session. The foundation is now solid for iterative quality improvements.