hylo.codeagents.harness_evolution¶
Package: hylo-code-agents · Core contracts
harness_evolution ¶
Optional phase-guided program evolution, independently implemented from a design study.
Plan observable phases -> develop and repair solve(robot) -> seal evidence-linked repair notes -> return a code candidate to Hylo's existing gate. No upstream HarnessPAI code is included, no weight training is performed, and development success never activates code.
PLAN
module-attribute
¶
PLAN = 'Plan observable phases for a robot control program. Return JSON only:\n{"phases": [{"name": "...", "goal": "...", "completion": "...", "fallback": "...", "step_budget": 100}]}.\nUse 1-12 phases. Completion checks must use deployment observations or public tool results,\nnever hidden simulator state, task IDs or evaluator success. Propose bounded handovers and\nfallbacks. Use a frozen action-model tool only if the supplied toolkit actually provides\none; otherwise use its available control tools. Retrieved repairs are hypotheses with\nlimited provenance, not universal instructions. Do not infer phase competence from a\nwhole-task score. This is a plan for code generation, not an executable state machine.'
DISTILL
module-attribute
¶
DISTILL = 'Summarize reusable repairs from the supplied development submissions and the\nselected program. Return JSON only: {"repairs": [{"phase": "a supplied phase name",\n"trigger": "observable failure pattern", "repair": "what changed and why it may help",\n"limitation": "where it may not apply", "failure_refs": ["submission-1/case-0"],\n"success_refs": ["submission-2/case-0"]}]}.\nUse at most 8 notes, or an empty list when no repair is supported. Each note must cite a\nfailed case and a successful replay of that same case in the selected program. Cite only\nprovided evidence IDs. Do not claim cross-task transfer or independent phase validation.\nDo not include executable code or hard-coded simulator coordinates in the repair text.'
HarnessEvolutionProposer ¶
HarnessEvolutionProposer(model='ollama:qwen3.5:35b-a3b', *, dev: int = 6, budget=None, out_root='runs/harness-evolution', repair_campaigns=(), tools=None, family=None, program_params=None, reply_tokens: int = 2048, block_timeout_s: float = 60, program_timeout_s: float = 300)
A selectable strategy, distinct from the existing research.llm proposer.
budget.turns includes planning and optional distillation calls. Session submissions,
resets and total model token/cost budgets remain bounded. Token/cost limits are checked
between calls, as in ResearchSession; one model call can exceed the remaining estimate.