Skip to content

[Refactor] Reduce complexity in createSwarmRoutes (799 LOC) #37

Description

@djimit

Auto-Generated Issue

Category: complexity
Severity: medium
Generated by: DjimFlo Self-Analysis Bridge

Description

createSwarmRoutes in swarms.ts is 799 lines with 456 graph connections (highest degree in codebase). This is a single point of failure for the entire API layer.

Recommended Action

Split into:

  • createProofRunRoutes() — proof-run endpoints
  • createSwarmIntelligenceRoutes() — intelligence endpoints
  • createFleetRoutes() — fleet management endpoints
  • createAssuranceRoutes() — agent assurance endpoints

Progress

  • ✅ route() helper introduced (reduced from 799 to ~650 LOC)
  • ⏳ Further splitting needed

Auto-generated by DjimFlo Self-Analysis Bridge.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions