feat: 0.1.0
Some checks failed
distribution-gate / distribution-gate (push) Failing after 1m56s

This commit is contained in:
eric
2026-04-04 18:41:34 +02:00
parent 32147d4552
commit ebb6b488fe
48 changed files with 2541 additions and 139 deletions

View File

@@ -93,25 +93,7 @@ struct StageWorkingSet {
}
pub fn planning_schema() -> serde_json::Value {
let legacy = json!({
"type": "object",
"additionalProperties": false,
"required": ["kind", "question", "goal_md", "standards_md", "plan"],
"properties": {
"kind": { "type": "string", "enum": ["question", "final"] },
"question": { "type": ["string", "null"] },
"goal_md": { "type": ["string", "null"] },
"standards_md": { "type": ["string", "null"] },
"plan": {
"anyOf": [
model::plan_schema(),
{ "type": "null" }
]
}
}
});
json!({ "anyOf": [legacy, model::planner_contract_schema()] })
model::planner_contract_schema()
}
pub fn build_planning_prompt(
@@ -480,7 +462,7 @@ pub fn build_persona_planning_prompt(
"- Keep the output minimal and execution-safe.\n",
"- Do not invent repository details.\n",
"- Always include all response keys.\n",
"- Use null for any field that does not apply in this response.\n",
"- Use null for any field that does not apply in this response, except quality_gate which must always be a full object.\n",
"- Output goal_md, standards_md, and plan should be complete enough for autonomous execution.\n",
"- Return plan steps with one-sentence notes and stable field order.\n",
"- Prefer 3-6 steps unless the goal truly needs more.\n",
@@ -1044,13 +1026,6 @@ mod tests {
#[test]
fn planning_schema_requires_all_declared_keys() {
let schema = planning_schema();
let legacy_schema = json!([
"kind",
"question",
"goal_md",
"standards_md",
"plan"
]);
let contract_schema = json!([
"kind",
"question",
@@ -1062,9 +1037,8 @@ mod tests {
"persona_passes",
"single_pass_projection"
]);
assert!(schema["anyOf"].is_array());
assert_eq!(schema["anyOf"][0]["required"], legacy_schema);
assert_eq!(schema["anyOf"][1]["required"], contract_schema);
assert_eq!(schema["required"], contract_schema);
assert_eq!(schema["type"], "object");
}
#[test]