Summary
Add first-class rho support to dn so users can run dn --agent rho (and related env toggles) alongside OpenCode, Cursor, Claude Code, and Codex.
This depends on the harness CLI already implemented in rho (rho dn subcommand).
Goal
dn prep, dn loop, dn kickstart, dn meld, dn fixup, and scoring paths that invoke an agent harness can select rho the same way they select other backends.
- Generated GitHub Actions workflows from
dn init build can record rho as the agent choice where applicable.
Key changes
Type and registry
In sdk/github/agentHarness.ts:
- Extend
AgentHarness with "rho".
- Append
"rho" to AGENT_HARNESSES.
- In
getRunAgent, return a new runRhoAgent when harness is "rho".
- In
resolveAgentHarnessFromFlagsAndEnv:
- Accept explicit
--agent rho.
- Support
RHO_ENABLED=1 as an env toggle (mutually exclusive with CURSOR_ENABLED, CLAUDE_ENABLED, CODEX_ENABLED, OPENCODE_ENABLED).
Runner implementation
Add sdk/github/rhoAgent.ts (aligned with cursorAgent.ts, claudeAgent.ts):
-
Signature: match RunAgentFn: (phase: "plan" | "implement", combinedPromptPath: string, workspaceRoot: string, _useReadonlyConfig?: boolean) => Promise<{ code: number; stdout: string; stderr: string }>
-
Pre-flight: verify rho is on PATH; throw clear install message if missing.
-
Path handling: stat combinedPromptPath, require a file, realPath to absolute.
-
Spawn: Deno.Command with:
- cwd:
workspaceRoot
- argv: invoke
rho dn --combined-prompt <absolutePath> --phase <phase>
- stdin:
"null"
- stdout/stderr:
"piped", collect into strings
-
Timeout: read RHO_TIMEOUT_MS, then OPENCODE_TIMEOUT_MS, then default 600000; race subprocess with timer.
-
Logging: emit [dn] Running rho … prefix before spawn.
CLI wiring
- Global
--agent rho must parse and flow into orchestrator config the same as --agent cursor.
dn init build
- Extend agent enum so interactive and non-interactive flows can choose
rho.
- Generated workflow YAML: include instructions for required secrets.
Documentation
- README: agent table row for rho (install rho, put on
PATH, set provider API keys).
docs/subcommands.md: examples for dn --agent rho prep, loop, kickstart, meld, fixup.
docs/output-and-environment.md: harness table row for rho; document RHO_TIMEOUT_MS, RHO_ENABLED.
Acceptance criteria
- With
rho on PATH and required credentials: dn --agent rho prep <issue> completes plan phase with exit 0.
dn --agent rho loop --plan-file plans/…plan.md completes implement phase with exit 0.
dn init build --agent rho generates a workflow documenting rho and required secrets.
- Docs list
rho next to other agents.
Boundaries
- dn does not bundle the rho binary; users install rho separately.
- Document a minimum rho version once the harness subcommand is stable.
Dependencies
Summary
Add first-class
rhosupport to dn so users can rundn --agent rho(and related env toggles) alongside OpenCode, Cursor, Claude Code, and Codex.This depends on the harness CLI already implemented in rho (
rho dnsubcommand).Goal
dn prep,dn loop,dn kickstart,dn meld,dn fixup, and scoring paths that invoke an agent harness can selectrhothe same way they select other backends.dn init buildcan recordrhoas the agent choice where applicable.Key changes
Type and registry
In
sdk/github/agentHarness.ts:AgentHarnesswith"rho"."rho"toAGENT_HARNESSES.getRunAgent, return a newrunRhoAgentwhen harness is"rho".resolveAgentHarnessFromFlagsAndEnv:--agent rho.RHO_ENABLED=1as an env toggle (mutually exclusive withCURSOR_ENABLED,CLAUDE_ENABLED,CODEX_ENABLED,OPENCODE_ENABLED).Runner implementation
Add
sdk/github/rhoAgent.ts(aligned withcursorAgent.ts,claudeAgent.ts):Signature: match
RunAgentFn:(phase: "plan" | "implement", combinedPromptPath: string, workspaceRoot: string, _useReadonlyConfig?: boolean) => Promise<{ code: number; stdout: string; stderr: string }>Pre-flight: verify
rhois onPATH; throw clear install message if missing.Path handling:
statcombinedPromptPath, require a file,realPathto absolute.Spawn:
Deno.Commandwith:workspaceRootrho dn --combined-prompt <absolutePath> --phase <phase>"null""piped", collect into stringsTimeout: read
RHO_TIMEOUT_MS, thenOPENCODE_TIMEOUT_MS, then default600000; race subprocess with timer.Logging: emit
[dn] Running rho …prefix before spawn.CLI wiring
--agent rhomust parse and flow into orchestrator config the same as--agent cursor.dn init buildrho.Documentation
PATH, set provider API keys).docs/subcommands.md: examples fordn --agent rho prep,loop,kickstart,meld,fixup.docs/output-and-environment.md: harness table row for rho; documentRHO_TIMEOUT_MS,RHO_ENABLED.Acceptance criteria
rhoon PATH and required credentials:dn --agent rho prep <issue>completes plan phase with exit0.dn --agent rho loop --plan-file plans/…plan.mdcompletes implement phase with exit0.dn init build --agent rhogenerates a workflow documenting rho and required secrets.rhonext to other agents.Boundaries
Dependencies
rho dnsubcommand