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:
- Identify cohesive groups of functions/classes
- Extract to separate modules
- Create package with init.py re-exports
- 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