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)

2. @libs-structural/vibe-universe (KEEP - this is the correct path)


What You Must Do

Phase 1: Remove ai-generation-hub route from app

  1. 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
  2. Search for ANY other imports of @libs-ai/ai-generation-hub in app code and remove them

Phase 2: Deprecate the library (DO NOT DELETE YET)

  1. Add a DEPRECATED.md file to libs/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
  2. Add @deprecated JSDoc to the main export in libs/libs-ai/ai-generation-hub/src/index.ts

Phase 3: Clean up backend-ai-api workflow endpoint

  1. Find APIs/backend-ai-api/src/app/workflow/ — the old workflow controller that handled full-configuration
  2. Check if anything else uses it (besides the now-deprecated generation-hub)
  3. If nothing else uses it, mark it deprecated with a comment
  4. DO NOT delete it yet — just deprecate and document

Phase 4: Remove duplicate SSE logic from GenerationHubService

  1. In libs/libs-ai/ai-generation-hub/src/lib/services/generation-hub.service.ts:
    • The startStreamingWorkflow() method (line 422+) duplicates WorkflowStateService.startWorkflow()
    • The eventSource field, all SSE event handling — all duplicated
    • Since the library is deprecated, just add clear deprecation warnings

Phase 5: Verify no broken references

  1. Search for GenerationHubService usage outside of ai-generation-hub itself
  2. Search for AIGenerationHubRoutes usage
  3. Search for AIGenerationHubComponent usage
  4. Any external references must be updated or removed

Phase 6: Clean up tsconfig paths

  1. tsconfig.base.json has paths for @libs-ai/ai-generation-hub and @libs-ai/ai-generation-hub/*
  2. These should remain until the library is fully deleted (Phase 2 only deprecates)
  3. 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


Git Protocol


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:

  1. Run yarn build gograb-space — must succeed with no errors
  2. Navigate to /space/test/ai-generation-hub — should redirect to /space/test/vibe
  3. Navigate to /space/test/ai-generation-hub/module — should also redirect
  4. No console errors related to missing imports
  5. vibe-universe generation flow still works end-to-end (start generation, see progress, see summary)
  6. Run git diff --stat — verify only expected files are changed

Success Criteria