Expand description
Code-generation harness — a domain-specific agent harness for writing and
verifying code, mirroring browser but for the code
domain.
The browser harness needed an LLM judge because page state is not reducible
to a boolean. Code is different: a build/test command’s exit code is the
ground truth. So this harness centers on one primitive the rest of the
framework lacked — a structured, configured, gate-able verification tool —
and otherwise composes existing machinery (AgentRunner, GoalCondition’s
independent-judge repair loop, builtins rooted at a workspace, guardrails).
VerifyCommandToolruns the harness-configured verify command(s) and emits a machine-greppableVERIFY_RESULT:sentinel (PASS/FAIL + exit code). Its two reasons to exist over rawbash: the command is configured (the agent never guesses it) and the result is structured and gate-able.parse_latest_verifyreads that sentinel back out of a transcript — the seam for a deterministic completion gate.
See tasks/codegen-harness-2026-06-02.md for the full design + non-duplication
rationale (what we deliberately do NOT build from claw-code).
Re-exports§
pub use builder::CODE_SYSTEM_PROMPT;pub use builder::CodeAgentBuilder;pub use builder::code_goal;pub use builder::code_tools;pub use verify::VerifyCommandTool;pub use verify::VerifyOutcome;pub use verify::parse_latest_verify;pub use verify::render_verify_result;
Modules§
- builder
CodeAgentBuilder— a domain-specific harness for code generation, mirroringBrowserAgentBuilder. It curates the code builtins rooted at a workspace, adds theVerifyCommandTool, installs a loop-invariant system prompt, and (optionally) gates completion on aGoalConditionwhose independent judge keys on the deterministicVERIFY_RESULT:sentinel. Everything else (the ReAct loop, the goal-driven repair continuation, workspace jailing, guardrails) is reused, not rebuilt.- verify
- Deterministic verification: the
verifytool + the pure render/parse of its machine-greppableVERIFY_RESULT:sentinel.