Skip to content

[Refactor] Reduce complexity in loop-service.ts (5718 LOC) #31

Description

@djimit

Auto-Generated Issue

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

Description

loop-service.ts is 5718 lines of code, making it the largest service in the codebase. This creates maintenance risk and makes testing difficult.

Recommended Action

Extract sub-modules:

  • loop-planning-service.ts — goal decomposition, scheduling (~800 LOC)
  • loop-execution-service.ts — maker/worker/checker execution (~1200 LOC)
  • loop-budget-service.ts — token/dollar/wall-clock budgets (~600 LOC)

Impact

  • Blast radius: 500 nodes, 88 files affected
  • Risk: high (requires careful incremental refactoring)

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