Conversation
Switch the default execution engine from "plan" to "react" (ReAct) across CLI, API, and runtime layers. Update all documentation to reflect the new default and mark Phase 2.5 as complete. Closes #355
WalkthroughSwitches the default execution engine from "plan" to "react" across CLI, API, runtime, conductor, docs, and tests; adds React-centric modules (react_agent, tools, editor) and updates documentation/roadmap to mark ReAct as the default while preserving Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 6✅ Passed checks (6 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
Code Review: PR #388 - Switch Default Engine to ReAct✅ Overall AssessmentThis PR successfully completes Phase 2.5 by switching the default execution engine from 🎯 Strengths
🔍 Code Quality ObservationsConsistency ✅All help text updates follow the same pattern:
Test Updates ✅Mock patches correctly updated: # Old: @patch("codeframe.core.agent.Agent")
# New: @patch("codeframe.core.react_agent.ReactAgent")Return value mocking properly adjusted: # ReactAgent.run() returns AgentStatus, not AgentState
mock_agent.run.return_value = AgentStatus.COMPLETED # ✅ CorrectDocumentation Updates ✅
🚨 Potential IssuesNone identified. This PR is ready to merge. 💡 Recommendations (Post-Merge)
📋 Checklist VerificationAll acceptance criteria met:
🎉 ConclusionLGTM - Recommend Merge This PR delivers exactly what Phase 2.5 promised: switching to ReAct as the default while preserving backward compatibility. The documentation updates are comprehensive and the test coverage validates the change thoroughly. Great work maintaining consistency across 11 files and 90+ test assertions! 🚀 |
Set ReAct as the default engine across CLI, API, runtime, and batch execution, and update docs to reflect Phase 2.5 completionSwitch default engine from 📍Where to StartStart with the CLI engine switch in Macroscope summarized 373b419. |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
codeframe/cli/app.py (1)
1996-2060:⚠️ Potential issue | 🟡 MinorUpdate engine label logic to reflect the new default.
engine_modecurrently hides the label only whenengine == "plan"(Line 2059), so the new default "react" always prints while legacy "plan" does not. Consider flipping the condition to hide the default and surface explicit legacy selection.Suggested adjustment
- engine_mode = f" [dim](engine={engine})[/dim]" if engine != "plan" else "" + engine_mode = f" [dim](engine={engine})[/dim]" if engine != "react" else ""CLAUDE.md (1)
248-301:⚠️ Potential issue | 🟡 MinorAdd languages to the fenced code blocks (markdownlint MD040).
This will satisfy the lint rule and improve rendering in some viewers.🔧 Suggested fix
-``` +```text cf work start <id> --execute [--verbose] │ ├── runtime.start_task_run() # Creates run, transitions task→IN_PROGRESS │ └── runtime.execute_agent(engine="react") @@ -``` +``` @@ -``` +```text cf work start <id> --execute --engine plan │ ├── runtime.start_task_run() │ └── runtime.execute_agent(engine="plan") @@ -``` +```
🤖 Fix all issues with AI agents
In `@docs/V2_STRATEGIC_ROADMAP.md`:
- Around line 370-374: The Phase 2 summary row in the roadmap table (the row
with "Phase 2" / "Server Layer") conflicts with the earlier "90% complete" text;
update the table row status to reflect remaining work (e.g., change the Status
cell from "✅ **COMPLETE**" to "⚠️ **90% COMPLETE**" or "In progress — WebSocket,
OpenAPI, pagination") or alternatively update the earlier "90% complete" section
to mark Phase 2 as complete; ensure the change references the "Phase 2" /
"Server Layer" row and mentions the outstanding items WebSocket, OpenAPI, and
pagination so the two places are consistent.
- Fix engine_mode label to hide default "react" instead of "plan" - Add language annotations to execution flow code blocks in CLAUDE.md - Update CLAUDE.md last-updated date to 2026-02-15 - Reconcile Phase 2 status in V2_STRATEGIC_ROADMAP.md (now ✅ COMPLETE) - Update test assertion to match new default engine label behavior
Code Review - PR #388: Switch Default Engine to ReActSummaryThis PR successfully completes Phase 2.5 by switching the default execution engine from ✅ Strengths1. Comprehensive and Consistent Changes
2. Excellent Documentation Updates
3. Backward Compatibility Preserved
4. Thorough Test Coverage
5. Smart Console Output
🔍 Code Quality ObservationsConsistency ✅ Test Updates ✅
Documentation ✅
📋 All Acceptance Criteria Met
💡 Minor Observations (Non-Blocking)1. Date Consistency 2. CodeRabbit's Suggestion on engine_mode Label engine_mode = f" [dim](engine={engine})[/dim]" if engine != "react" else ""This is already implemented correctly in the PR! The code hides the default ( 3. Roadmap Table Status 🚨 Issues FoundNone. This PR is ready to merge. 🎯 Recommendation✅ APPROVE - Ready to Merge This PR is exemplary in its execution:
The switch to ReAct as default is a significant architectural improvement, and this implementation ensures a smooth transition with zero breaking changes. Great work! 🚀 Post-Merge Recommendations
|
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
CLAUDE.md (1)
489-497:⚠️ Potential issue | 🟡 MinorVerify OpenAPI completion status matches the roadmap.
This section marks OpenAPI docs as complete, but the roadmap still lists OpenAPI as open/partial. Please align the two documents to avoid mixed signals.
🤖 Fix all issues with AI agents
In `@CLAUDE.md`:
- Around line 34-41: The document is inconsistent: the "What's Working Now"
section mentions "up to 5 attempts" while the "Agent Self-Correction &
Observability" section still says "3 retries"; update the latter so both places
match (change the text in the "Agent Self-Correction & Observability" section
from "3 retries" to "up to 5 attempts" or vice versa if you prefer 3), ensuring
the phrases "up to 5 attempts" and "Agent Self-Correction & Observability" are
consistent across the file.
| ## Current Reality (Phase 1, 2 & 2.5 Complete) | ||
|
|
||
| ### What's Working Now | ||
| - **Full agent execution**: `cf work start <task-id> --execute` | ||
| - **Full agent execution**: `cf work start <task-id> --execute` (uses ReAct engine by default) | ||
| - **Engine selection**: `--engine react` (default) or `--engine plan` (legacy) | ||
| - **Verbose mode**: `cf work start <task-id> --execute --verbose` shows detailed progress | ||
| - **Dry run mode**: `cf work start <task-id> --execute --dry-run` | ||
| - **Self-correction loop**: Agent automatically fixes failing verification gates (up to 3 attempts) | ||
| - **Self-correction loop**: Agent automatically fixes failing verification gates (up to 5 attempts with ReAct) |
There was a problem hiding this comment.
Align self-correction retry count across the doc.
Line 41 says “up to 5 attempts,” but the later “Agent Self-Correction & Observability” section still states 3 retries. Please reconcile the count in one place or the other.
🤖 Prompt for AI Agents
In `@CLAUDE.md` around lines 34 - 41, The document is inconsistent: the "What's
Working Now" section mentions "up to 5 attempts" while the "Agent
Self-Correction & Observability" section still says "3 retries"; update the
latter so both places match (change the text in the "Agent Self-Correction &
Observability" section from "3 retries" to "up to 5 attempts" or vice versa if
you prefer 3), ensuring the phrases "up to 5 attempts" and "Agent
Self-Correction & Observability" are consistent across the file.
Summary
"plan"to"react"(ReAct) across all 9 code locations (runtime, CLI, API, conductor)"plan"as default to expect"react"Acceptance Criteria
"react"inruntime.py--engine planstill available as fallbackCLAUDE.mdupdated: architecture, execution flow, commands, Phase 2.5docs/V2_STRATEGIC_ROADMAP.mdupdated: Phase 2.5 marked completedocs/AGENT_V3_UNIFIED_PLAN.mdstatus updated to "Implemented"cf work start <task-id> --execute(no --engine flag) uses ReactAgentTest plan
uv run pytest -m v2 -q— 1855 passeduv run ruff check— all checks passed--engine planflagCloses #355
Summary by CodeRabbit
New Features
Documentation
Chores
Tests