Remove test_plan gate from the codebase

The test_plan field was a gate from the old interactive web UI workflow
where a human would approve a test plan before the LLM could write code.
With autonomous coder agents, this gate is dead weight — coders sometimes
obey the README's "wait for approval" instruction and produce no code.

Removes: TestPlanStatus enum, ensure_test_plan_approved checks in fs/shell,
set_test_plan MCP tool + handler, test_plan from story/bug front matter
creation, test_plan validation in validate_story_dirs, and all related tests.
Updates README to remove Step 2 (Test Planning) and renumber steps.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Dave
2026-02-23 19:12:05 +00:00
parent cc2511b792
commit 31037f5bf5
7 changed files with 23 additions and 363 deletions

View File

@@ -249,21 +249,11 @@ impl AgentPool {
}
}
// Read story content from the project root (the worktree may not have
// .story_kit/work/) and inject it into the agent prompt so the coder
// knows what to implement.
let story_content = read_story_content(project_root, story_id);
// Spawn the agent process
let wt_path_str = wt_info.path.to_string_lossy().to_string();
let (command, args, mut prompt) =
config.render_agent_args(&wt_path_str, story_id, Some(&resolved_name), Some(&wt_info.base_branch))?;
// Prepend story content so the agent sees the requirements first.
if let Some(content) = story_content {
prompt = format!("## Story Requirements\n\n{content}\n\n---\n\n{prompt}");
}
// Append resume context if this is a restart with failure information.
if let Some(ctx) = resume_context {
prompt.push_str(ctx);
@@ -1369,20 +1359,6 @@ fn item_type_from_id(item_id: &str) -> &'static str {
}
/// Return the source directory path for a work item (always work/1_upcoming/).
/// Read story/bug content from any pipeline stage directory.
/// Returns the file contents if found, or None if the file doesn't exist anywhere.
fn read_story_content(project_root: &Path, story_id: &str) -> Option<String> {
let sk = project_root.join(".story_kit").join("work");
let filename = format!("{story_id}.md");
for stage in &["2_current", "1_upcoming", "3_qa", "4_merge"] {
let path = sk.join(stage).join(&filename);
if let Ok(content) = std::fs::read_to_string(&path) {
return Some(content);
}
}
None
}
fn item_source_dir(project_root: &Path, _item_id: &str) -> PathBuf {
project_root.join(".story_kit").join("work").join("1_upcoming")
}
@@ -2799,7 +2775,7 @@ mod tests {
let merge_dir = repo.join(".story_kit/work/4_merge");
fs::create_dir_all(&merge_dir).unwrap();
let story_file = merge_dir.join("23_test.md");
fs::write(&story_file, "---\nname: Test\ntest_plan: approved\n---\n").unwrap();
fs::write(&story_file, "---\nname: Test\n---\n").unwrap();
Command::new("git")
.args(["add", "."])
.current_dir(repo)