mirror of
https://github.com/hanzoai/dev.git
synced 2026-10-25 03:32:32 +00:00
hanzo-kai linked hanzoai/decision's control and program crates by git. That repository is private: the public build, CI, and every cargo install of dev failed to fetch it. Kai is now a client of POST /v1/decisions at api.hanzo.ai, signed with the Hanzo credential Dev already sends; nothing of hanzoai/decision is linked, .cargo/config.toml goes, and Cargo.lock loses 89 packages and every private source. The programs Dev asks (tools.select, router.model, reasoning.budget, context.select, agent.command-risk, agent.progress, agent.complete, and the fix flow's fix.pick and fix.next) ship in crates/hanzo-kai/programs as typed questions with their thresholds, verdict rules and calibration pins. The gate that reads the answers is Dev's own: a noul holds at its threshold, a choice or score is accepted at its certainty, a verdict rule joins the policy on allow < ask < deny only when enforced, and an answer under another calibration runs in shadow. When Kai does not answer (refused, timed out, 401, 404, 5xx, or no state of the decision answered) the decision fails at once and Kai is down for 60 s: no request is made in that window, the loop does exactly what it does without Kai, one line goes to the log and no trace line is written. Only a decision asked after the failure brings Kai back. A decision's states are asked in parallel; tier and budget together. The tool shortlist is decided again when the tools on offer change, since an MCP server that finishes starting mid-turn adds its tools. dev flow is now dev flow fix, a fixed pipeline rather than a Decision Program run by the private executor: retrieval, Kai's pick, Zen's diff, the tests, Kai's next. --control rule, or Kai not answering, leaves the tests and the budget to decide, and the report says so once. An attempt whose patch no longer reverses ends the flow instead of retrying over it. Tests serve the Decisions API and chat completions from wiremock: Kai on (tools shortlisted, tier and effort hinted, verdict tightened, one trace line per decision with its distributions), Kai answering 404, Kai unreachable, Kai answering with a page that is not the API, tools arriving mid-turn, and an answer under another calibration. Claude-Session: https://claude.ai/code/session_018Gt5TvrE2rxXuZikWSauv3
31 lines
1.2 KiB
JSON
31 lines
1.2 KiB
JSON
{
|
|
"id": "router.model@1",
|
|
"description": "Which model tier should serve a request: the smallest that answers it correctly. State: {request, system, turns, tools, prompt_tokens, images}.",
|
|
"calibration": "cal_6dbb072f8109a222",
|
|
"questions": {
|
|
"tier": {
|
|
"type": "choice",
|
|
"instructions": "What is the smallest model tier that would answer this request correctly?",
|
|
"criteria": {
|
|
"small": "a small fast model: lookup, formatting, extraction, short factual answers",
|
|
"medium": "a mid-size model: ordinary code edits, summaries, one or two reasoning steps",
|
|
"large": "a large model: multi-step reasoning, non-trivial code, long context",
|
|
"frontier": "the strongest model: hard proofs, research-grade problems, long plans under ambiguity"
|
|
}
|
|
},
|
|
"long_context": {
|
|
"type": "noul",
|
|
"instructions": "Does answering require reading a long document, many files or a long history?"
|
|
},
|
|
"private_model_required": {
|
|
"type": "noul",
|
|
"instructions": "Must the request stay on a private, self-hosted model because of the data it involves?"
|
|
}
|
|
},
|
|
"thresholds": {
|
|
"tier": 0.5,
|
|
"long_context": 0.5,
|
|
"private_model_required": 0.3
|
|
}
|
|
}
|