-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Goal
Make Terraphim easy to "teach" to coding agents (Claude Code / OpenCode) by providing a stable, self-documenting tool surface and deterministic guardrails.
This issue focuses on the RLM branch work needed to reach nanocode-like parity: expose terraphim_rlm MCP tools through terraphim_mcp_server, with clear session handling and docs.
Why
crates/terraphim_rlmalready implements an RLM query loop + executor abstraction + MCP tool service (rlm_code,rlm_bash,rlm_query,rlm_context,rlm_snapshot,rlm_status).- But those tools are not currently visible/dispatchable from the main MCP server, which is what external agents integrate with.
Proposed changes
1) Wire RLM MCP tools into terraphim_mcp_server
- Add
terraphim_rlmdependency tocrates/terraphim_mcp_server. - Instantiate
TerraphimRlm+RlmMcpServiceduring MCP server init. - Extend MCP
list_toolsto includeRlmMcpService::get_tools(). - Extend MCP
call_toolto delegaterlm_*tool calls toRlmMcpService.
2) Decide/implement session UX
Pick one (recommend explicit session tools for deterministic external orchestration):
- Option A: Add
rlm_session_create,rlm_session_set_current,rlm_session_destroytools. - Option B: Require
session_idon allrlm_*calls and provide a default session if omitted.
3) Backend readiness / fallbacks
- Document requirements for Firecracker backend (Linux +
/dev/kvm). - Ensure a non-Firecracker fallback works (e.g., SSH/local) for dev environments.
4) Docs for agent integration (Claude Code / OpenCode)
Add a short doc describing:
- the tool list + expected JSON schemas
- recommended "roles" workflow (Retriever/Planner/Executor/Verifier)
- where to plug deterministic replacements (hooks) vs relying on model memory
Acceptance criteria
tools/listfrom MCP includes allrlm_*tools.call_toolworks for:rlm_bash(simple command)rlm_code(simple Python snippet)rlm_query(iterative loop until FINAL)
- Session handling is documented and testable.
- Minimal E2E demo documented (MCP client →
rlm_queryto solve a small task).
Notes
If needed, scope to the feat/terraphim-rlm-experimental branch first, then merge back once stable.
Metadata
Metadata
Assignees
Labels
No labels