-
Notifications
You must be signed in to change notification settings - Fork 148
refactor: Stage 1 strangler-fig -- extract mcp_integrator.py::install #1004
Copy link
Copy link
Open
Labels
area/cliCLI command surface, flags, help text (cross-cutting).CLI command surface, flags, help text (cross-cutting).good first issueGood for newcomersGood for newcomerspriority/lowAccepted but not time-sensitiveAccepted but not time-sensitivestatus/acceptedDirection approved, safe to start work.Direction approved, safe to start work.status/triagedInitial agentic triage complete; pending maintainer ratification (silence = approval).Initial agentic triage complete; pending maintainer ratification (silence = approval).tech-debttype/refactorInternal restructure, no behavior change.Internal restructure, no behavior change.
Milestone
Metadata
Metadata
Assignees
Labels
area/cliCLI command surface, flags, help text (cross-cutting).CLI command surface, flags, help text (cross-cutting).good first issueGood for newcomersGood for newcomerspriority/lowAccepted but not time-sensitiveAccepted but not time-sensitivestatus/acceptedDirection approved, safe to start work.Direction approved, safe to start work.status/triagedInitial agentic triage complete; pending maintainer ratification (silence = approval).Initial agentic triage complete; pending maintainer ratification (silence = approval).tech-debttype/refactorInternal restructure, no behavior change.Internal restructure, no behavior change.
Type
Projects
Status
Todo
Context
PR #999 introduced Ruff code quality guardrails with complexity thresholds set just above current codebase maximums (strangler-fig pattern). This is the first tightening stage.
Problem
src/apm_cli/integration/mcp_integrator.py::installis the single worst complexity outlier, owning three metrics simultaneously:max-statementsmax-complexity(McCabe)max-branchesRefactoring this one method unlocks threshold reductions across all three metrics for the entire codebase.
Suggested approach
installmethod into private helper methods (e.g.,_validate_inputs,_resolve_dependencies,_deploy_files,_run_hooks)pyproject.tomlto the Stage 1 valuesuv run ruff check src/ tests/to confirm no new violationsFiles to touch
src/apm_cli/integration/mcp_integrator.py-- refactorinstallpyproject.toml-- tightenmax-statements,max-complexity,max-branchesFull strangler-fig roadmap
From the simulation in #999:
References