S200 Handoff Prompt

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

S200 Handoff Prompt — Perfecting Platform Code Generation

Who You Are

You are continuing work on GoGrab Space's Generate → Edit → Deploy pipeline. Session 200 built the backend infrastructure. Your job is to perfect the platform code generation process and close the remaining gaps so the full pipeline works end-to-end.

What Was Built in S199 (6 Commits)

Commit What Key Files
S199.1 Scaffold generator rewrite — models extend BaseEntity, services extend BaseCrudApiService, components use composables, authGuard on routes, domain events, .vitto/instructions.json APIs/backend-vitto-api/.../module-gen-phase.executor.ts (generateScaffoldFiles method ~line 1209), APIs/backend-ai-api/.../module-code-generator.service.ts (generateEntityModel method)
S199.2 App shell generator — produces complete Angular app wrapping all modules APIs/backend-vitto-api/.../generators/app-shell-generator.service.ts (new file)
S199.3 GitLab-backed Studio — StudioRepoController proxies file ops to GitLab APIs/backend-ai-api/.../module-files/studio-repo.controller.ts (new file), libs/libs-structural/vitto-studio/.../studio-api.service.ts (new GitLab methods)
S199.4 Draft MR — createDraftMR replaces auto-merge, emits MR URL via SSE APIs/backend-vitto-api/.../module-gen-phase.executor.ts (~line 580), APIs/backend-vitto-api/.../universe-git.service.ts (createDraftMR method)
S199.5 edit_module_file tool — commits code changes to GitLab from Vitto chat APIs/backend-vitto-api/.../tools/tool-registry.service.ts (~line 1440)
S199.6 SSE reconnection — getActiveSessionBySpace + poll endpoint APIs/backend-vitto-api/.../session/module-gen-session.manager.ts, APIs/backend-vitto-api/.../module-generation.controller.ts (GET /active/:spaceId)

The Full Plan

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

This has the complete gap analysis with 17 tasks across 5 phases. Phase 1 is your priority.

Your Priority: Phase 1 — Frontend Wiring

These 4 tasks connect the S199 backend infrastructure to the frontend. Without them, the backend work is invisible to users.

Task 1.1: VfsSyncService — Load from GitLab Instead of Disk

File: libs/libs-structural/vitto-studio/src/lib/services/vfs-sync.service.ts

What to do:

How to detect mode: If the project has a spaceSlug and universeSlug in its context, use GitLab. Otherwise fall back to disk.

Task 1.2: Edit → GitLab Auto-Commit

File: libs/libs-structural/vitto-studio/src/lib/services/vfs-sync.service.ts

What to do:

Task 1.3: Chat SSE Reconnection

File: libs/libs-ai/vitto-chat/src/lib/services/vitto-chat-engine.service.ts

What to do:

Task 1.4: MR URL Display in Chat

File: libs/libs-ai/vitto-chat/src/lib/services/vitto-chat-engine.service.ts

What to do:

Key Architecture Context

Existing Infrastructure You Can Use

Service Port What It Does
StudioApiService (frontend) → 3001 Has both disk-based and GitLab-backed file methods
StudioRepoController (backend-ai-api) 3001 Proxies GitLab file operations
UniverseGitService (backend-vitto-api) 3003 Direct GitLab API calls (branches, commits, MRs)
GitLabProviderService (backend-api) 3000 Full GitLab REST API wrapper (1343 lines)
CloudflarePagesService (backend-api) 3000 Direct upload to Cloudflare Pages
DirectCloudflareDeployService (backend-ai-api) 3001 Collects files + uploads to Cloudflare

What NOT to Do

Testing

Environment

Commit Convention

[S200.N] type: description

Example: [S200.1] feat: VfsSyncService loads modules from GitLab repo