S204 Deprecation Cleanup Prompt
Documentation for Plans
S204 Handoff: Deprecate ai-generation-hub in Favor of vibe-universe
Session: 204 | Date: March 2026 | Priority: High Estimated effort: ~1 hour | Risk: Low (deprecation only, no deletions)
Background
The platform has TWO competing generation UIs that both trigger code generation:
1. @libs-ai/ai-generation-hub (DEPRECATED - to be removed)
- Location:
libs/libs-ai/ai-generation-hub/ - Routes:
/space/:spaceSlug/ai-generation-hubwith child routes/module,/galaxy,/universe - Service:
GenerationHubService— has its OWN parallel SSE implementation - Problem: Duplicates
WorkflowStateServicelogic, usesbackend-ai-api/workflowendpoint (broken template-selection system that never decomposed requirements — always produced 0 modules) - S204.5 patched it to delegate to Vitto but it's still redundant code
- Components:
AIGenerationHubComponent,ModuleBuilderComponent,GalaxyBuilderComponent,UniverseBuilderComponent - Import in app.routes.ts: line 20
import { AIGenerationHubRoutes } from '@libs-ai/ai-generation-hub' - Route definition: lines 616-628 in
apps/gograb-space/src/app/app.routes.ts
2. @libs-structural/vibe-universe (KEEP - this is the correct path)
- Location:
libs/libs-structural/vibe-universe/ - Routes:
/space/:spaceSlug/universe/:universeSlug/vibe(universe-scoped) AND/space/:spaceSlug/vibe(space-scoped) - Service: Uses
WorkflowStateServicefrom@libs-ai/gograb-ai-lib— the CORRECT shared SSE service - Connects to:
backend-vitto-api/module-generation/startvia SSE (Vitto's 7-phase pipeline) - Components:
VibeUniverseGeneratorComponent, sub-components for input, progress, summary, deployment - This is the sole generation UI going forward
What You Must Do
Phase 1: Remove ai-generation-hub route from app
In
apps/gograb-space/src/app/app.routes.ts:- Remove line 20:
import { AIGenerationHubRoutes } from '@libs-ai/ai-generation-hub'; - Replace the route block at lines 616-628 with a redirect to
/vibe:{ path: 'ai-generation-hub', redirectTo: 'vibe', pathMatch: 'prefix' }, - Also redirect
ai-generation-hub/**sub-paths
- Remove line 20:
Search for ANY other imports of
@libs-ai/ai-generation-hubin app code and remove them
Phase 2: Deprecate the library (DO NOT DELETE YET)
- Add a
DEPRECATED.mdfile tolibs/libs-ai/ai-generation-hub/with:- Clear deprecation notice
- What replaced it (
vibe-universe) - When it was deprecated (S204, March 2026)
- Link to this prompt for context:
docs/english/Plans/handoff-plans/s204-deprecation-cleanup-prompt.md
- Add
@deprecatedJSDoc to the main export inlibs/libs-ai/ai-generation-hub/src/index.ts
Phase 3: Clean up backend-ai-api workflow endpoint
- Find
APIs/backend-ai-api/src/app/workflow/— the old workflow controller that handledfull-configuration - Check if anything else uses it (besides the now-deprecated generation-hub)
- If nothing else uses it, mark it deprecated with a comment
- DO NOT delete it yet — just deprecate and document
Phase 4: Remove duplicate SSE logic from GenerationHubService
- In
libs/libs-ai/ai-generation-hub/src/lib/services/generation-hub.service.ts:- The
startStreamingWorkflow()method (line 422+) duplicatesWorkflowStateService.startWorkflow() - The
eventSourcefield, all SSE event handling — all duplicated - Since the library is deprecated, just add clear deprecation warnings
- The
Phase 5: Verify no broken references
- Search for
GenerationHubServiceusage outside ofai-generation-hubitself - Search for
AIGenerationHubRoutesusage - Search for
AIGenerationHubComponentusage - Any external references must be updated or removed
Phase 6: Clean up tsconfig paths
tsconfig.base.jsonhas paths for@libs-ai/ai-generation-huband@libs-ai/ai-generation-hub/*- These should remain until the library is fully deleted (Phase 2 only deprecates)
- But note them for future deletion
Files to Check
| File | Action |
|---|---|
apps/gograb-space/src/app/app.routes.ts |
MUST update — remove import, replace route with redirect |
libs/libs-ai/ai-generation-hub/src/**/*.ts |
Deprecate — add JSDoc warnings |
libs/libs-ai/ai-generation-hub/DEPRECATED.md |
Create — deprecation notice |
libs/libs-ai/gograb-ai-lib/src/lib/services/workflow-state.service.ts |
Reference only — DO NOT modify |
libs/libs-structural/vibe-universe/src/**/*.ts |
Reference only — DO NOT modify |
APIs/backend-ai-api/src/app/workflow/** |
Check and deprecate |
tsconfig.base.json |
Note for future cleanup — do NOT edit |
config/tsconfig-paths/modules/generated.paths.json |
Note for future cleanup — do NOT edit |
Anti-Patterns to Avoid
- Do NOT delete the library entirely — just deprecate. Other libs may have transitive imports.
- Do NOT modify
WorkflowStateService— it's already correct. - Do NOT modify
vibe-universe— it's already correct. - Do NOT create new libraries or services.
- Do NOT modify
tsconfig.base.json(follow the project's tsconfig-module-paths protocol). - Do NOT use
git add .orgit add -A— stage specific files only.
Git Protocol
- Branch:
session-204(already exists) - Commit format:
[S204.X] chore: deprecate ai-generation-hub in favor of vibe-universe - Staging:
git add <file1> <file2>— NEVERgit add . - Find the last sub-session number by running
git log --oneline -5and increment from there
Decision Logging
After cleanup:
log_decision({
type: "refactor",
question: "How to handle deprecated ai-generation-hub",
chosen: "Deprecate in place with redirect, not delete",
reasoning: "Transitive imports may exist; safe deprecation first, deletion in future session",
confidence: 0.95
})
Verification Checklist
After all changes:
- Run
yarn build gograb-space— must succeed with no errors - Navigate to
/space/test/ai-generation-hub— should redirect to/space/test/vibe - Navigate to
/space/test/ai-generation-hub/module— should also redirect - No console errors related to missing imports
vibe-universegeneration flow still works end-to-end (start generation, see progress, see summary)- Run
git diff --stat— verify only expected files are changed
Success Criteria
- The
ai-generation-hubroute redirects tovibeinstead of loading the deprecated UI - The
ai-generation-hublibrary is clearly marked as deprecated (DEPRECATED.md + JSDoc) - The backend workflow endpoint is marked deprecated if unused by anything else
- No build errors
- No broken references to removed imports
- All changes committed with proper
[S204.X]format onsession-204branch