huskies: merge 572_story_edit_criterion_mcp_tool_to_update_acceptance_criteria_text

This commit is contained in:
dave
2026-04-15 12:59:49 +00:00
parent 52b21c22b1
commit ec40b4771b
4 changed files with 109 additions and 4 deletions
+24 -1
View File
@@ -513,6 +513,28 @@ fn handle_tools_list(id: Option<Value>) -> JsonRpcResponse {
"required": ["story_id", "criterion_index"]
}
},
{
"name": "edit_criterion",
"description": "Update the text of an existing acceptance criterion in place, preserving its checked/unchecked state. Uses a 0-based index counting all criteria (both checked and unchecked).",
"inputSchema": {
"type": "object",
"properties": {
"story_id": {
"type": "string",
"description": "Story identifier (filename stem, e.g. '28_my_story')"
},
"criterion_index": {
"type": "integer",
"description": "0-based index of the criterion to edit (counts all criteria)"
},
"new_text": {
"type": "string",
"description": "New text for the criterion (without the '- [ ] ' or '- [x] ' prefix)"
}
},
"required": ["story_id", "criterion_index", "new_text"]
}
},
{
"name": "add_criterion",
"description": "Add an acceptance criterion to an existing story file. Appends '- [ ] {criterion}' after the last existing criterion in the '## Acceptance Criteria' section. Auto-commits via the filesystem watcher.",
@@ -1242,6 +1264,7 @@ async fn handle_tools_call(id: Option<Value>, params: &Value, ctx: &AppContext)
"accept_story" => story_tools::tool_accept_story(&args, ctx),
// Story mutation tools (auto-commit to master)
"check_criterion" => story_tools::tool_check_criterion(&args, ctx),
"edit_criterion" => story_tools::tool_edit_criterion(&args, ctx),
"add_criterion" => story_tools::tool_add_criterion(&args, ctx),
"update_story" => story_tools::tool_update_story(&args, ctx),
// Spike lifecycle tools
@@ -1426,7 +1449,7 @@ mod tests {
assert!(names.contains(&"loc_file"));
assert!(names.contains(&"dump_crdt"));
assert!(names.contains(&"get_version"));
assert_eq!(tools.len(), 63);
assert_eq!(tools.len(), 64);
}
#[test]