Skip to content

feat: v0.3 design spec, plan, and search_code prerequisite#44

Merged
chocks merged 6 commits into
mainfrom
feat/v03-coding-agent
Mar 14, 2026
Merged

feat: v0.3 design spec, plan, and search_code prerequisite#44
chocks merged 6 commits into
mainfrom
feat/v03-coding-agent

Conversation

@chocks
Copy link
Copy Markdown
Owner

@chocks chocks commented Mar 14, 2026

Summary

  • Add v0.3 coding agent design spec (docs/superpowers/specs/)
  • Add phased implementation plan (docs/superpowers/plans/)
  • Add search_code tool to the v0.2 tool registry — structured code search returning { file, line, match } results, needed by the coding agent's ANALYZE phase

What's in the spec

Turn Locode from a chat router into a coding agent with:

  • Structured code editing (search-based matching, not line numbers)
  • Plan-before-edit workflow (LLM generates plan, then executes)
  • Session memory (avoid re-reading files)
  • Diff-first presentation
  • Auto-escalation to Claude for complex tasks

Implementation phases (separate PRs)

  1. This PR — docs + search_code prerequisite tool
  2. Phase A — CodeEditor + DiffRenderer
  3. Phase B — AgentMemory
  4. Phase C — Planner + CodingAgent loop
  5. Phase D — Streaming + Config + Integration

Test plan

  • search_code tool tests pass (metadata, matches, no matches, glob filtering)
  • All existing tests pass (238 tests)
  • npm run build succeeds

🤖 Generated with Claude Code

chocks and others added 6 commits March 13, 2026 21:17
Phased implementation plan for the coding agent:
- Phase A: CodeEditor + DiffRenderer
- Phase B: AgentMemory
- Phase C: Planner + CodingAgent loop
- Phase D: Streaming UX + REPL integration

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add search_code tool as prerequisite
- Fix Planner constructor (inject LLM agents)
- Define EditValidationResult (avoid name collision with registry)
- Document search field semantics per operation type
- Add rollback policy for partial failures
- Define classification precedence (isCodingTask before Router)
- Route CodeEditor writes through SafetyGate
- Rename src/agent/ to src/coding/ to avoid confusion with src/agents/
- Set 4096 minimum context window, add degradation path
- Remove hybrid agent type (one agent per run)
- Add JSON fallback parsing note for Planner

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add CodeEditor constructor with SafetyGate + cwd params
- Clarify cross-iteration rollback ownership (CodingAgent holds initialOriginals)
- Sketch search_code tool interface (params, return type, category)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
12 tasks across 7 chunks covering:
- Prerequisite: search_code tool
- Phase A: CodeEditor + DiffRenderer
- Phase B: AgentMemory
- Phase C: Planner + CodingAgent loop
- Phase D: Streaming + Config + Integration

Addresses review findings: AgentResult toolCalls field,
validation via execFileSync (not shell allow-list), mode flag
respect, listener leak prevention, no dead config.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Implements the search_code tool definition with grep-backed file search
returning structured { file, line, match } results. Registers it in the
default registry and updates the registry test count to reflect the new
total of 7 built-in tools.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Only pass --include when a glob filter is specified.
Previously passed --include * which works by accident
via fnmatch but is not correct by design.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@chocks chocks merged commit d22d02f into main Mar 14, 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