refactor: remove v1 multi-agent domain cluster (#599 PR1/3)#602
Conversation
Cut the reachability threads that kept the legacy multi-agent stack alive, then
delete it. The plan engine (--engine plan -> core/agent.py via BuiltinPlanAdapter)
is verified LIVE and kept.
Threads cut (live files, surgery not deletion):
- codeframe/__init__.py, core/__init__.py: drop Project/LeadAgent/WorkerAgent
(the top-level package __init__ ran on every import, keeping the cluster alive)
- cli/__init__.py: emptied (real entry point is cli/app.py per pyproject scripts)
- agents/__init__.py: trimmed to dependency_resolver (kept; used by cf scheduling)
- ui/shared.py: removed SharedState/start_agent/running_agents/review_cache
(kept ConnectionManager + SessionChatManager, used by live v2 server/WS)
- deleted shadowed dead module codeframe/cli.py (the cli/ package always wins)
Deleted: multi-agent classes (lead/worker/factory/pool/definitions/...), v1 cli
*_commands, core/{project,session_manager,port_utils}, deployment/ discovery/
indexing/ providers/ testing/, dead lib/* (checkpoint_manager,context_manager,
lint_utils,quality_gate*,task_classifier,token_counter), config/{security,
quality_gates_config}, planning/task_decomposer, ui/websocket_broadcasts,
a dead migration script, and 86 dead test files.
Deferred (coupled): enforcement/ + the v1 persistence repos + Database slim -> PR2;
persistence/ -> platform_store/ rename + CLAUDE.md -> PR3.
Verified: pytest --collect-only clean (3866 collected, 0 errors);
pytest -m v2 green (2824 passed); TestClient /health -> 200;
cf --help + cf status work; ruff + mypy clean.
Address codex cross-family review: the initial cleanup left checked-in consumers of now-deleted modules behind (collect-ignored or skip-marked, so they did not break CI but referenced deleted code). Remove them and the matching collect_ignore entries so the tree is genuinely v2-only: - tests/test_review_api.py (imported ui.shared.review_cache) - tests/api/test_discovery_endpoints.py, test_api_discovery_progress.py (imported agents.lead_agent.LeadAgent) - tests/cli/test_cli_session.py (skip-marked; tested v1 clear-session/start + core.session_manager, none of which exist in the v2 CLI) - tests/context/test_context_stats.py (used deleted lib.context_manager/token_counter) - examples/agent_factory_usage.py, examples/agent_definition_usage.py (imported AgentFactory / definition_loader / WorkerAgent) - test_mock_check.py, test_standalone.py (root scratch scripts using deleted agents) Verified: git ls-files '*.py' shows zero references to any PR1-deleted module; pytest --collect-only clean (3863).
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (175)
💤 Files with no reviewable changes (61)
WalkthroughThis pull request performs a comprehensive removal of v1 codeframe legacy infrastructure, including all agent orchestration systems, CLI commands, project lifecycle management, discovery workflows, indexing, and supporting utilities. Package-level exports are updated to reflect the new minimal scope, retaining only version and author metadata at the root level. Changesv1 Legacy Code Removal
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related issues
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Code Review — PR 1/3: Remove v1 Multi-Agent Domain ClusterThis is a large, well-scoped cleanup PR. The overall approach is sound — cutting "reachability threads" in 5 surgical file edits before deleting the bulk of dead code is the right strategy for this kind of cleanup. Modified Files
One pre-existing minor concern (not introduced by this PR): in Tests90 deleted test files all corresponded to deleted source modules — correct. The remaining Minor Items
SummaryApproved with minor notes. This PR does exactly what it says: cuts the import reachability threads cleanly, then deletes the dead cluster. The deferral of coupled changes (Database slim, |
Final Triage Summary (PR #602)Cutoff: 2026-05-29T16:56:17Z (last push). CI: all checks green. Review passes
New findings since cutoff: 2 (both advisory/low-priority) Skipped (with justification)
OutcomeNo unresolved Critical/Major findings. Demo: all 10 acceptance criteria mapped to outcome evidence. Ready to merge. |
## Summary Final PR (3 of 3) for #599. Renames the slim control-plane store to its real role, refreshes CLAUDE.md, and removes the last v1 stragglers. - git mv codeframe/persistence -> codeframe/platform_store; updated all 31 imports across codeframe/, tests/, scripts/, plus CI yaml + active docs (CONTRIBUTING.md, PRD.md, TESTING.md) and the embedded Python in tests/e2e/global-setup.ts (caught by codex). - CLAUDE.md: dropped stale codeframe/server/ references (Legacy rule + repo- structure tree line); refreshed tests/agents/ note now that only dependency_resolver remains. - Stragglers: removed orphan sample_project_config fixture, deleted the 5 remaining #597-era v1 tests, un-ignored and fixed tests/api/test_health_endpoint.py (live /health coverage restored), emptied root collect_ignore. - Pre-existing PR2 leftovers caught by CodeRabbit: deleted tests/blockers/test_blocker_expiration_simple.py and tests/lib/test_metrics_tracker.py (both referenced removed Database methods / dropped tables; both deselected by -m v2, so prior CI green was misleading). ## Validation - Tests: pytest -m v2 green (2824 passed); Backend + Frontend CI green - Lint/Type: ruff + mypy clean (181 files); CI Code Quality green - Collect: pytest --collect-only clean (3424); zero active references to codeframe.persistence remain - Boot: TestClient /health -> 200 - Cross-family review: codex (1 P2 fixed) + CodeRabbit (2 inline Major fixed) - claude-bot advisory: 4 minor (3 fixed, 1 partly rebutted -- the flagged "dead" Database guard in tests/ui/conftest.py is actually used by the running_server fixture; simplified to a direct import) - Demo: all 12 PR3 + 9 cumulative #599 acceptance criteria verified ## Cumulative -- #599 fully complete across PRs #602 + #603 + #604 - [x] No legacy multi-agent classes remain (PR1) - [x] core/project.py + dead dirs removed (PR1) - [x] Database exposes only control-plane methods (PR2) - [x] persistence -> platform_store rename + CLAUDE.md (PR3) - [x] codeframe serve boots (every PR) - [x] pytest --collect-only clean; pytest -m v2 green (every PR) - [x] cf --help + golden path; ruff + mypy clean (every PR) - [x] Plan engine kept (verified live via engine_registry -> BuiltinPlanAdapter) Closes #599.
Summary
PR 1 of 3 for #599 (remove remaining v1 infrastructure). This PR removes the legacy multi-agent domain cluster and the import "reachability threads" that kept it alive. Net: 174 files changed, ~+15 / −62k, almost entirely deletions of dead code.
Reachability threads cut (live files — surgery, not deletion):
codeframe/__init__.py&core/__init__.py— droppedProject/LeadAgent/WorkerAgentre-exports. The top-level package__init__ran on every import, so these kept the entire dead cluster reachable.cli/__init__.py— emptied to a docstring (the real entry point iscli/app.pyperpyprojectscripts; the old__init__was a shadow v1 CLI dragging in v1 command modules).agents/__init__.py— trimmed todependency_resolver(kept; used by livecfscheduling).ui/shared.py— removedSharedState/start_agent/running_agents/review_cache(kept the liveConnectionManager/SessionChatManagerused by the v2 server + WS).codeframe/cli.py(thecli/package always wins on import).Deleted: multi-agent classes (
lead_agent,worker_agent,factory,agent_pool_manager,definition_loader, backend/frontend/hybrid/test/review workers,simple_assignment,tactical_patterns,definitions/); v1cli/*_commands;core/{project,session_manager,port_utils}.py;deployment/ discovery/ indexing/ providers/ testing/; deadlib/*(checkpoint_manager,context_manager,lint_utils,quality_gate*,task_classifier,token_counter);config/{security,quality_gates_config}.py;planning/task_decomposer.py;ui/websocket_broadcasts.py; a dead migration script; 90 dead test files + 2 deadexamples/scripts.Acceptance Criteria (PR1 subset of #599)
codeframe/agents/(onlydependency_resolver)codeframe/core/project.pyand the confirmed-dead top-level dirs (deployment/ discovery/ indexing/ providers/ testing/) removed--engine planis LIVE (engine_registry.resolve_engine→BuiltinPlanAdapter→core.agent.Agent), socore/{agent,planner,executor}.pyare KEPTcodeframe serveboots (TestClient lifespan/health→ 200)pytest --collect-onlyclean;uv run pytest -m v2greencf --help+ golden-path (cf status) work; ruff + mypy cleanDeferred to later PRs (see Known Limitations):
Databaseslim,enforcement/+ v1 repos removal (PR2);persistence/→platform_store/rename + CLAUDE.md (PR3).Test Plan
pytest --collect-onlyclean (3863 collected, 0 errors)uv run pytest -m v2green (2824 passed, 0 failed)/health→ 200cf --help+cf statusworkruff check codeframe/clean;mypy codeframe/clean (204 files).pyfiles reference any deleted moduleKnown Limitations / Intentionally Deferred
Databaseslim +enforcement/+ 16 v1 persistence repos → PR2.enforcement/is reachable only viatask_repository, which is reachable only becausedatabase.pyimports the whole repo package — so its removal is coupled to the Database slim and is intentionally out of scope here. These remain present and tested in this PR.persistence/→platform_store/rename + CLAUDE.md repo-structure update → PR3.collect_ignoreentries for refactor: remove orphaned v1 web layer (routers + services) #597-era v1 web-layer tests (e.g.api/test_api_metrics.py,auth/test_dual_auth.py) are left untouched — not part of the multi-agent cluster.Implementation Notes
codeframe/__init__.pywas the dominant thread holder, not justcli/__init__.py/agents/__init__.py.--engine plandecision" criterion.Part of #599 (does not close it — PR2/PR3 follow).
Summary by CodeRabbit