Server drives pipeline as state machine

On agent completion, the server automatically runs script/test and
advances stories through the pipeline: coder → qa → mergemaster →
archive. Failed gates restart the agent with failure context. Agents
no longer need to call pipeline-advancing MCP tools.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Dave
2026-02-23 13:13:41 +00:00
parent 682c8f9b36
commit 00b212d7e3
3 changed files with 440 additions and 12 deletions

View File

@@ -983,7 +983,7 @@ async fn tool_start_agent(args: &Value, ctx: &AppContext) -> Result<String, Stri
let project_root = ctx.agents.get_project_root(&ctx.state)?;
let info = ctx
.agents
.start_agent(&project_root, story_id, agent_name)
.start_agent(&project_root, story_id, agent_name, None)
.await?;
serde_json::to_string_pretty(&json!({
@@ -1389,7 +1389,7 @@ async fn tool_move_story_to_merge(args: &Value, ctx: &AppContext) -> Result<Stri
// Start the mergemaster agent on the story worktree
let info = ctx
.agents
.start_agent(&project_root, story_id, Some(agent_name))
.start_agent(&project_root, story_id, Some(agent_name), None)
.await?;
serde_json::to_string_pretty(&json!({
@@ -1425,7 +1425,7 @@ async fn tool_request_qa(args: &Value, ctx: &AppContext) -> Result<String, Strin
// Start the QA agent on the story worktree
let info = ctx
.agents
.start_agent(&project_root, story_id, Some(agent_name))
.start_agent(&project_root, story_id, Some(agent_name), None)
.await?;
serde_json::to_string_pretty(&json!({