Skip to content

feat: Phase D — config, StreamRenderer, Orchestrator/REPL wiring#50

Merged
chocks merged 6 commits into
mainfrom
feat/v03-phase-d-streaming
Mar 21, 2026
Merged

feat: Phase D — config, StreamRenderer, Orchestrator/REPL wiring#50
chocks merged 6 commits into
mainfrom
feat/v03-phase-d-streaming

Conversation

@chocks
Copy link
Copy Markdown
Owner

@chocks chocks commented Mar 21, 2026

Summary

  • Add AgentConfigSchema to config with max_iterations, auto_confirm, show_plan, run_validation, validation_command
  • Add AgentStream and StreamRenderer for real-time CLI output (phases, plans, diffs, validation, errors)
  • Wire CodingAgent into OrchestratorisCodingTask() detects action verbs and routes to coding agent before the classifier
  • Wire StreamRenderer into REPL for streaming output during coding tasks
  • 5 new StreamRenderer tests, all passing

This is Phase D (final phase) of the v0.3 coding agent plan (Tasks 9–11).

v0.3 Complete

All 5 PRs merged/ready:

  1. PR feat: v0.3 design spec, plan, and search_code prerequisite #44 — search_code tool (merged)
  2. PR feat: Phase A — editor types, CodeEditor, DiffRenderer #46 — editor types, CodeEditor, DiffRenderer (merged)
  3. PR feat: Phase B — coding agent types and AgentMemory #48 — coding types, AgentMemory (merged)
  4. PR feat: Phase C — Planner, toolCalls, CodingAgent #49 — Planner, toolCalls, CodingAgent + prompt fixes (merged)
  5. This PR — config, streaming, integration

Test Plan

  • All 279 tests pass (npm test)
  • TypeScript compiles clean (npx tsc --noEmit)
  • Build succeeds (npm run build)
  • File structure matches plan exactly
  • Manual test: locode → type a coding task → verify streaming output

🤖 Generated with Claude Code

chocks and others added 6 commits March 20, 2026 21:51
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Renders phase transitions, tool calls, edit plans, colored diffs,
validation results, and errors during coding agent runs. Uses
raw ANSI codes consistent with the rest of the codebase.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Orchestrator creates CodingAgent from config.agent settings
- isCodingTask() detects action verbs (add/fix/implement/etc.)
  while excluding explanatory prompts (explain/describe/how/etc.)
- process() routes coding tasks to CodingAgent before classifier
- REPL attaches StreamRenderer for real-time phase/plan/diff output

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Two safety fixes:
- CodingAgent now pauses after PLAN phase when auto_confirm is false,
  showing the edit plan and asking for confirmation before applying
- Planner prompt now instructs LLM to use "create" for new files and
  only "insert/replace" when modifying existing code, preventing
  overwrites of existing files with unrelated content

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…include file content

Three fixes for coding agent edit failures:
- ANALYZE pre-reads files mentioned in the prompt (e.g. "index.ts")
  instead of relying on the LLM to decide what to read
- Planner normalizes invalid operations (edit_file → replace,
  write_file → create, etc.) instead of passing them through
- Execute step includes actual file content in the prompt so the
  LLM can generate accurate search strings

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ile as content

The LLM was putting the whole file in "content" for insert operations
instead of just the new lines. Now explicitly documents each operation
type's semantics and states "content must NEVER contain the entire file".

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@chocks chocks merged commit 7d0662d into main Mar 21, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant