Fix invalid model names and preserve worktrees for debugging
model = "sonnet-4.6" is not a valid Claude CLI model identifier, causing all coder/qa/mergemaster agents to get 404 errors from the API and exit immediately with no work done. Change to "claude-sonnet-4-6". Also disable automatic worktree cleanup on archive so agent work can be inspected post-mortem. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -51,7 +51,7 @@ system_prompt = "You are a supervisor agent. Read CLAUDE.md and .story_kit/READM
|
|||||||
[[agent]]
|
[[agent]]
|
||||||
name = "coder-1"
|
name = "coder-1"
|
||||||
role = "Full-stack engineer. Implements features across all components."
|
role = "Full-stack engineer. Implements features across all components."
|
||||||
model = "sonnet-4.6"
|
model = "claude-sonnet-4-6"
|
||||||
max_turns = 50
|
max_turns = 50
|
||||||
max_budget_usd = 5.00
|
max_budget_usd = 5.00
|
||||||
prompt = "You are working in a git worktree on story {{story_id}}. Read CLAUDE.md first, then .story_kit/README.md to understand the dev process. The story details are in your prompt above. Follow the SDTW process through implementation and verification (Steps 1-3). The worktree and feature branch already exist - do not create them. Check .mcp.json for MCP tools. Do NOT accept the story or merge - commit your work and stop. If the user asks to review your changes, tell them to run: cd \"{{worktree_path}}\" && git difftool {{base_branch}}...HEAD\n\nIMPORTANT: Commit all your work before your process exits. The server will automatically run acceptance gates (cargo clippy + tests) when your process exits and advance the pipeline based on the results."
|
prompt = "You are working in a git worktree on story {{story_id}}. Read CLAUDE.md first, then .story_kit/README.md to understand the dev process. The story details are in your prompt above. Follow the SDTW process through implementation and verification (Steps 1-3). The worktree and feature branch already exist - do not create them. Check .mcp.json for MCP tools. Do NOT accept the story or merge - commit your work and stop. If the user asks to review your changes, tell them to run: cd \"{{worktree_path}}\" && git difftool {{base_branch}}...HEAD\n\nIMPORTANT: Commit all your work before your process exits. The server will automatically run acceptance gates (cargo clippy + tests) when your process exits and advance the pipeline based on the results."
|
||||||
@@ -60,7 +60,7 @@ system_prompt = "You are a full-stack engineer working autonomously in a git wor
|
|||||||
[[agent]]
|
[[agent]]
|
||||||
name = "coder-2"
|
name = "coder-2"
|
||||||
role = "Full-stack engineer. Implements features across all components."
|
role = "Full-stack engineer. Implements features across all components."
|
||||||
model = "sonnet-4.6"
|
model = "claude-sonnet-4-6"
|
||||||
max_turns = 50
|
max_turns = 50
|
||||||
max_budget_usd = 5.00
|
max_budget_usd = 5.00
|
||||||
prompt = "You are working in a git worktree on story {{story_id}}. Read CLAUDE.md first, then .story_kit/README.md to understand the dev process. The story details are in your prompt above. Follow the SDTW process through implementation and verification (Steps 1-3). The worktree and feature branch already exist - do not create them. Check .mcp.json for MCP tools. Do NOT accept the story or merge - commit your work and stop. If the user asks to review your changes, tell them to run: cd \"{{worktree_path}}\" && git difftool {{base_branch}}...HEAD\n\nIMPORTANT: Commit all your work before your process exits. The server will automatically run acceptance gates (cargo clippy + tests) when your process exits and advance the pipeline based on the results."
|
prompt = "You are working in a git worktree on story {{story_id}}. Read CLAUDE.md first, then .story_kit/README.md to understand the dev process. The story details are in your prompt above. Follow the SDTW process through implementation and verification (Steps 1-3). The worktree and feature branch already exist - do not create them. Check .mcp.json for MCP tools. Do NOT accept the story or merge - commit your work and stop. If the user asks to review your changes, tell them to run: cd \"{{worktree_path}}\" && git difftool {{base_branch}}...HEAD\n\nIMPORTANT: Commit all your work before your process exits. The server will automatically run acceptance gates (cargo clippy + tests) when your process exits and advance the pipeline based on the results."
|
||||||
@@ -69,7 +69,7 @@ system_prompt = "You are a full-stack engineer working autonomously in a git wor
|
|||||||
[[agent]]
|
[[agent]]
|
||||||
name = "coder-3"
|
name = "coder-3"
|
||||||
role = "Full-stack engineer. Implements features across all components."
|
role = "Full-stack engineer. Implements features across all components."
|
||||||
model = "sonnet-4.6"
|
model = "claude-sonnet-4-6"
|
||||||
max_turns = 50
|
max_turns = 50
|
||||||
max_budget_usd = 5.00
|
max_budget_usd = 5.00
|
||||||
prompt = "You are working in a git worktree on story {{story_id}}. Read CLAUDE.md first, then .story_kit/README.md to understand the dev process. The story details are in your prompt above. Follow the SDTW process through implementation and verification (Steps 1-3). The worktree and feature branch already exist - do not create them. Check .mcp.json for MCP tools. Do NOT accept the story or merge - commit your work and stop. If the user asks to review your changes, tell them to run: cd \"{{worktree_path}}\" && git difftool {{base_branch}}...HEAD\n\nIMPORTANT: Commit all your work before your process exits. The server will automatically run acceptance gates (cargo clippy + tests) when your process exits and advance the pipeline based on the results."
|
prompt = "You are working in a git worktree on story {{story_id}}. Read CLAUDE.md first, then .story_kit/README.md to understand the dev process. The story details are in your prompt above. Follow the SDTW process through implementation and verification (Steps 1-3). The worktree and feature branch already exist - do not create them. Check .mcp.json for MCP tools. Do NOT accept the story or merge - commit your work and stop. If the user asks to review your changes, tell them to run: cd \"{{worktree_path}}\" && git difftool {{base_branch}}...HEAD\n\nIMPORTANT: Commit all your work before your process exits. The server will automatically run acceptance gates (cargo clippy + tests) when your process exits and advance the pipeline based on the results."
|
||||||
@@ -87,7 +87,7 @@ system_prompt = "You are a senior full-stack engineer working autonomously in a
|
|||||||
[[agent]]
|
[[agent]]
|
||||||
name = "qa"
|
name = "qa"
|
||||||
role = "Reviews coder work in worktrees: runs quality gates, generates testing plans, and reports findings."
|
role = "Reviews coder work in worktrees: runs quality gates, generates testing plans, and reports findings."
|
||||||
model = "sonnet-4.6"
|
model = "claude-sonnet-4-6"
|
||||||
max_turns = 40
|
max_turns = 40
|
||||||
max_budget_usd = 4.00
|
max_budget_usd = 4.00
|
||||||
prompt = """You are the QA agent for story {{story_id}}. Your job is to review the coder's work in the worktree and produce a structured QA report.
|
prompt = """You are the QA agent for story {{story_id}}. Your job is to review the coder's work in the worktree and produce a structured QA report.
|
||||||
@@ -153,7 +153,7 @@ system_prompt = "You are a QA agent. Your job is read-only: review code quality,
|
|||||||
[[agent]]
|
[[agent]]
|
||||||
name = "mergemaster"
|
name = "mergemaster"
|
||||||
role = "Merges completed coder work into master, runs quality gates, archives stories, and cleans up worktrees."
|
role = "Merges completed coder work into master, runs quality gates, archives stories, and cleans up worktrees."
|
||||||
model = "sonnet-4.6"
|
model = "claude-sonnet-4-6"
|
||||||
max_turns = 30
|
max_turns = 30
|
||||||
max_budget_usd = 3.00
|
max_budget_usd = 3.00
|
||||||
prompt = """You are the mergemaster agent for story {{story_id}}. Your job is to merge the completed coder work into master using the merge_agent_work MCP tool.
|
prompt = """You are the mergemaster agent for story {{story_id}}. Your job is to merge the completed coder work into master using the merge_agent_work MCP tool.
|
||||||
|
|||||||
@@ -714,18 +714,20 @@ impl AgentPool {
|
|||||||
if let Err(e) = move_story_to_archived(&project_root, story_id) {
|
if let Err(e) = move_story_to_archived(&project_root, story_id) {
|
||||||
eprintln!("[pipeline] Failed to archive '{story_id}': {e}");
|
eprintln!("[pipeline] Failed to archive '{story_id}': {e}");
|
||||||
}
|
}
|
||||||
let config =
|
// TODO: Re-enable worktree cleanup once we have persistent agent logs.
|
||||||
crate::config::ProjectConfig::load(&project_root).unwrap_or_default();
|
// Removing worktrees destroys evidence needed to debug empty-commit agents.
|
||||||
if let Err(e) =
|
// let config =
|
||||||
worktree::remove_worktree_by_story_id(&project_root, story_id, &config)
|
// crate::config::ProjectConfig::load(&project_root).unwrap_or_default();
|
||||||
.await
|
// if let Err(e) =
|
||||||
{
|
// worktree::remove_worktree_by_story_id(&project_root, story_id, &config)
|
||||||
eprintln!(
|
// .await
|
||||||
"[pipeline] Failed to remove worktree for '{story_id}': {e}"
|
// {
|
||||||
);
|
// eprintln!(
|
||||||
}
|
// "[pipeline] Failed to remove worktree for '{story_id}': {e}"
|
||||||
|
// );
|
||||||
|
// }
|
||||||
eprintln!(
|
eprintln!(
|
||||||
"[pipeline] Story '{story_id}' archived and worktree cleaned up."
|
"[pipeline] Story '{story_id}' archived. Worktree preserved for inspection."
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
eprintln!(
|
eprintln!(
|
||||||
|
|||||||
Reference in New Issue
Block a user