Skip to content

[JULES] refactor(code): Split oversized modules (>500 lines) - CODE-005 #36

@JuanCS-Dev

Description

@JuanCS-Dev

Summary

Several modules exceed the 500-line limit from CODE_CONSTITUTION.

Files to Refactor

File Lines Priority
vertice_cli/shell_main.py 806 HIGH
vertice_cli/core/python_sandbox.py 798 HIGH
vertice_cli/cli_app.py 727 MEDIUM

Already Resolved

  • ✅ vertice_cli/maestro.py: 733 → 55 lines (package)
  • ✅ memory/cortex/memory.py: 695 → 223 lines (cortex.py facade)
  • ✅ agents/orchestrator/agent.py: 630 → 301 lines (composition)

Refactoring Strategy

Follow the pattern used for Maestro:

  1. Identify cohesive groups of functions/classes
  2. Extract to separate modules
  3. Create package with init.py re-exports
  4. Maintain backward compatibility

Example for shell_main.py:

vertice_cli/shell/
├── __init__.py      # Re-exports
├── main.py          # Entry point (~50 lines)
├── commands.py      # Command handlers (~200 lines)
├── completions.py   # Tab completion (~150 lines)
├── history.py       # History management (~100 lines)
└── formatters.py    # Output formatters (~150 lines)

Acceptance Criteria

  • At least 2 modules refactored
  • Each module under 500 lines
  • Backward compatibility maintained
  • All tests pass

Metadata

Metadata

Assignees

No one assigned

    Labels

    julesTask for Jules AImediumMedium priorityrefactorCode refactoring

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions