S201 Handoff Prompt

Context and instructions for the next agent continuing platform code generation work

S201 Handoff Prompt — Validating & Hardening Platform Code Generation

Who You Are

You are continuing work on GoGrab Space's Generate → Edit → Deploy pipeline. Session 200 connected the frontend to the backend infrastructure and fixed critical generation bugs. Your job is to validate the fixes work end-to-end and harden the remaining rough edges.

What Was Built in S200 (5 Commits)

Commit What Key Files
S200.1 Frontend wiring — VfsSyncService GitLab loading, auto-commit, SSE reconnect, MR URL libs/libs-structural/vitto-studio/.../vfs-sync.service.ts, libs/libs-ai/vitto-chat/.../vitto-chat-engine.service.ts
S200.2 Deploy pipeline + code quality + chat integration APIs/backend-vitto-api/.../studio-deploy.controller.ts, APIs/backend-vitto-api/.../auto-correction.service.ts, APIs/backend-vitto-api/.../context-assembly.service.ts
S200.3 MongoDB schema fix — empty content in task messages APIs/backend-ai-api/.../sessions.schema.ts
S200.4 Generation pipeline fixes — GitLab 403 fallback, scaffold templates, parallel execution, progress UX APIs/backend-vitto-api/.../module-gen-phase.executor.ts, APIs/backend-vitto-api/.../execute.phase.ts, APIs/backend-vitto-api/.../universe-git.service.ts
S200.5 Module path aliases include category — @module/{category}/{slug} APIs/backend-vitto-api/.../module-gen-phase.executor.ts, APIs/backend-vitto-api/.../app-shell-generator.service.ts

The Full Plan

Read: docs/english/Plans/perfecting-platform-code-gen.plan.md

Phases 1-4 are implemented. Phase 5 (Production Hardening) remains.

Your Priority: Validate & Fix

Priority 1: Verify Generation End-to-End

The S200 fixes need validation with a real generation run. Key things to verify:

  1. Category assignment — Are modules getting meaningful categories (layout, analytics, etc.) or still defaulting to structural?
  2. GitLab repo creation — Does the personal namespace fallback work? Check for any repo path issues.
  3. Scaffold templates — Do generated form/list/detail components compile? Check for:
    • crud.onSubmit() not form.submit()
    • crud.isFieldInvalid('name') not isFieldInvalid('name')
    • crud.form() not form.formGroup()
  4. Path aliases — Are they @module/{category}/{slug} format?
  5. package.json — Does each module get one?
  6. Parallel execution — Are modules batched? Check logs for "PARALLEL: Executing batch of N modules"
  7. modules.map error — Should be gone. Verify tool handler gets actual module array.

Priority 2: Studio Visualization

Vitto Studio's file tree should show generated modules. If it doesn't:

Priority 3: Production Hardening (Phase 5)

From the plan:

Key Architecture Context

Critical Conventions (from S200)

  1. session.result.executeResult.modules MUST be an array, never a count
  2. Scaffold templates must use crud.* prefix (useCrudForm/useCrudList return objects)
  3. GitLab initializeRepo falls back to personal namespace on 403
  4. normalizeDecomposeResult → inferModuleCategory() maps names to categories
  5. Every module needs package.json with name @module/{category}/{slug}
  6. IntelligentMessageDoc.content is required: false (task messages have empty content)

Existing Infrastructure

Service Port What It Does
VfsSyncService (frontend) — Mode-aware: GitLab or disk, setRepoContext() controls mode
StudioDeployController (backend-vitto-api) 3003 POST /studio/deploy — SSE-streaming deploy from GitLab
UniverseGitService (backend-vitto-api) 3003 GitLab API with personal namespace fallback
ExecutePhaseService (backend-vitto-api) 3003 Parallel module generation via dependency-aware batching
AutoCorrectionService (backend-vitto-api) 3003 42 rules, now enforces BaseEntity + BaseCrudApiService
ContextAssemblyService (backend-vitto-api) 3003 Module instructions enrichment in system prompts

What NOT to Do

Commit Convention

[S201.N] type: description

Example: [S201.1] fix: verify generation produces compilable modules