Skip to content

Legacy-Cleanup after Blueprint-Rework #318

Description

@DaniloTatti

User Story

As the AI/backend team, I want the orphaned onboarding generation routes and
their modules removed, so that nobody reads, extends, or accidentally calls AI
endpoints that no backend flow uses anymore.

Context & Motivation

In Scope (verify before deleting — each AC names its evidence)

  • Audit callers first: grep backend (Kotlin) for calls to
    /onboarding/path, /onboarding/path/yaml, /onboarding/blueprints/generate;
    confirm zero remaining callers after [Story]: Vibe Coding — shared guidelines, tips & best practices (cross-team + per-repo) #223/[Story]: Industry detection — consumer chain (onboarding path, re-anchored) #296 (AI route files are
    api/routes/onboarding.py and api/routes/blueprints.py).
  • Remove api/routes/onboarding.py (POST /onboarding/path,
    POST /onboarding/path/yaml) from the AI service and unregister the router in
    api/app.py.
  • Remove api/routes/blueprints.py (POST /onboarding/blueprints/generate)
    and unregister it in api/app.py.
  • Remove modules that become orphaned as a result — candidates to verify:
    onboarding/orchestrator.py, onboarding/pipeline.py,
    onboarding/synthesis.py, onboarding/generation.py (blueprint drafting only),
    onboarding/registry.py, onboarding/similarity.py (only if no other module
    imports them). Keep everything the phase assembly still needs
    (onboarding/phase.py, phase_models.py, citations.py, retrieval/rag, …).
  • Remove/adjust the corresponding schemas (OnboardingPathRequest,
    GenerateBlueprintsRequest, and any schema only they use) from
    api/schemas.py, unless still referenced.
  • Delete or migrate the now-orphaned tests
    (tests/onboarding/test_pipeline.py, test_synthesis.py,
    test_generation.py, tests/api/test_onboarding.py (path parts),
    tests/api/test_blueprints.py — keep any parts covering /onboarding/phase).
  • Never touch: /api/v1/onboarding/phase[/stream], the ingestion routes,
    the backend's OnboardingPersonalizationService contract, and any schema the
    backend still sends.

Acceptance Criteria

  • No code references to the removed routes remain (app.py registration
    removed, no imports).
  • pyright src/ has 0 errors; no dead imports.
  • ruf check / pytest green with the removed tests deleted; no test still
    hits a removed endpoint.
  • The backend suite is unaffected (no backend change required — verify by
    running its tests against the AI service's updated contract, if locally available).
  • The repo's OpenAPI no longer lists /onboarding/path,
    /onboarding/path/yaml, or /onboarding/blueprints/generate.

Technical Notes

Sub-Tasks (by team)

  • AI — caller audit, route/module removal, test cleanup, verification.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    team:aiAI / Retrieval team (sprintstart-ai, Python)team:backendBackend team (sprintstart-backend, Kotlin/Spring Boot)

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions