rename .story_kit directory to .storkit and update all references

Renames the config directory and updates 514 references across 42 Rust
source files, plus CLAUDE.md, .gitignore, Makefile, script/release,
and .mcp.json files. All 1205 tests pass.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Dave
2026-03-20 11:34:53 +00:00
parent 375277f86e
commit 9581e5d51a
406 changed files with 531 additions and 530 deletions

View File

@@ -72,7 +72,7 @@ impl AgentPool {
on feature branch. Writing merge_failure and blocking."
);
let story_path = project_root
.join(".story_kit/work")
.join(".storkit/work")
.join(stage_dir)
.join(format!("{story_id}.md"));
let _ = crate::io::story_metadata::write_merge_failure(
@@ -209,7 +209,7 @@ impl AgentPool {
/// (called immediately after) picks up the right next-stage agents.
///
/// Algorithm:
/// 1. List all worktree directories under `{project_root}/.story_kit/worktrees/`.
/// 1. List all worktree directories under `{project_root}/.storkit/worktrees/`.
/// 2. For each worktree, check whether its feature branch has commits ahead of the
/// base branch (`master` / `main`).
/// 3. If committed work is found AND the story is in `2_current/` or `3_qa/`:
@@ -344,7 +344,7 @@ impl AgentPool {
.unwrap_or_default()
.default_qa_mode();
let story_path = project_root
.join(".story_kit/work/2_current")
.join(".storkit/work/2_current")
.join(format!("{story_id}.md"));
crate::io::story_metadata::resolve_qa_mode(&story_path, default_qa)
}
@@ -395,7 +395,7 @@ impl AgentPool {
});
} else {
let story_path = project_root
.join(".story_kit/work/3_qa")
.join(".storkit/work/3_qa")
.join(format!("{story_id}.md"));
if let Err(e) = crate::io::story_metadata::write_review_hold(&story_path) {
eprintln!(
@@ -451,7 +451,7 @@ impl AgentPool {
true
} else {
let story_path = project_root
.join(".story_kit/work/3_qa")
.join(".storkit/work/3_qa")
.join(format!("{story_id}.md"));
let default_qa = crate::config::ProjectConfig::load(project_root)
.unwrap_or_default()
@@ -465,7 +465,7 @@ impl AgentPool {
if needs_human_review {
let story_path = project_root
.join(".story_kit/work/3_qa")
.join(".storkit/work/3_qa")
.join(format!("{story_id}.md"));
if let Err(e) = crate::io::story_metadata::write_review_hold(&story_path) {
eprintln!(
@@ -567,7 +567,7 @@ fn read_story_front_matter_agent(
) -> Option<String> {
use crate::io::story_metadata::parse_front_matter;
let path = project_root
.join(".story_kit")
.join(".storkit")
.join("work")
.join(stage_dir)
.join(format!("{story_id}.md"));
@@ -579,7 +579,7 @@ fn read_story_front_matter_agent(
fn has_review_hold(project_root: &Path, stage_dir: &str, story_id: &str) -> bool {
use crate::io::story_metadata::parse_front_matter;
let path = project_root
.join(".story_kit")
.join(".storkit")
.join("work")
.join(stage_dir)
.join(format!("{story_id}.md"));
@@ -597,7 +597,7 @@ fn has_review_hold(project_root: &Path, stage_dir: &str, story_id: &str) -> bool
fn is_story_blocked(project_root: &Path, stage_dir: &str, story_id: &str) -> bool {
use crate::io::story_metadata::parse_front_matter;
let path = project_root
.join(".story_kit")
.join(".storkit")
.join("work")
.join(stage_dir)
.join(format!("{story_id}.md"));
@@ -615,7 +615,7 @@ fn is_story_blocked(project_root: &Path, stage_dir: &str, story_id: &str) -> boo
fn has_merge_failure(project_root: &Path, stage_dir: &str, story_id: &str) -> bool {
use crate::io::story_metadata::parse_front_matter;
let path = project_root
.join(".story_kit")
.join(".storkit")
.join("work")
.join(stage_dir)
.join(format!("{story_id}.md"));
@@ -638,7 +638,7 @@ pub(super) fn is_agent_free(agents: &HashMap<String, StoryAgent>, agent_name: &s
}
fn scan_stage_items(project_root: &Path, stage_dir: &str) -> Vec<String> {
let dir = project_root.join(".story_kit").join("work").join(stage_dir);
let dir = project_root.join(".storkit").join("work").join(stage_dir);
if !dir.is_dir() {
return Vec::new();
}
@@ -875,7 +875,7 @@ mod tests {
fn scan_stage_items_returns_sorted_story_ids() {
use std::fs;
let tmp = tempfile::tempdir().unwrap();
let stage_dir = tmp.path().join(".story_kit").join("work").join("2_current");
let stage_dir = tmp.path().join(".storkit").join("work").join("2_current");
fs::create_dir_all(&stage_dir).unwrap();
fs::write(stage_dir.join("42_story_foo.md"), "---\nname: foo\n---").unwrap();
fs::write(stage_dir.join("10_story_bar.md"), "---\nname: bar\n---").unwrap();
@@ -1199,7 +1199,7 @@ stage = "coder"
#[tokio::test]
async fn auto_assign_picks_up_story_queued_in_current() {
let tmp = tempfile::tempdir().unwrap();
let sk = tmp.path().join(".story_kit");
let sk = tmp.path().join(".storkit");
let current = sk.join("work/2_current");
std::fs::create_dir_all(&current).unwrap();
std::fs::write(
@@ -1238,7 +1238,7 @@ stage = "coder"
let root = tmp.path();
// Create project.toml with a QA agent.
let sk = root.join(".story_kit");
let sk = root.join(".storkit");
std::fs::create_dir_all(&sk).unwrap();
std::fs::write(
sk.join("project.toml"),
@@ -1247,7 +1247,7 @@ stage = "coder"
.unwrap();
// Put a spike in 3_qa/ with review_hold: true.
let qa_dir = root.join(".story_kit/work/3_qa");
let qa_dir = root.join(".storkit/work/3_qa");
std::fs::create_dir_all(&qa_dir).unwrap();
std::fs::write(
qa_dir.join("20_spike_test.md"),
@@ -1276,7 +1276,7 @@ stage = "coder"
#[tokio::test]
async fn auto_assign_ignores_coder_preference_when_story_is_in_qa_stage() {
let tmp = tempfile::tempdir().unwrap();
let sk = tmp.path().join(".story_kit");
let sk = tmp.path().join(".storkit");
let qa_dir = sk.join("work/3_qa");
std::fs::create_dir_all(&qa_dir).unwrap();
std::fs::write(
@@ -1323,7 +1323,7 @@ stage = "coder"
#[tokio::test]
async fn auto_assign_respects_coder_preference_when_story_is_in_current_stage() {
let tmp = tempfile::tempdir().unwrap();
let sk = tmp.path().join(".story_kit");
let sk = tmp.path().join(".storkit");
let current_dir = sk.join("work/2_current");
std::fs::create_dir_all(&current_dir).unwrap();
std::fs::write(
@@ -1370,7 +1370,7 @@ stage = "coder"
#[tokio::test]
async fn auto_assign_stage_mismatch_with_no_fallback_starts_no_agent() {
let tmp = tempfile::tempdir().unwrap();
let sk = tmp.path().join(".story_kit");
let sk = tmp.path().join(".storkit");
let qa_dir = sk.join("work/3_qa");
std::fs::create_dir_all(&qa_dir).unwrap();
// Only a coder agent is configured — no QA agent exists.
@@ -1409,7 +1409,7 @@ stage = "coder"
let tmp = tempfile::tempdir().unwrap();
let root = tmp.path().to_path_buf();
let sk_dir = root.join(".story_kit");
let sk_dir = root.join(".storkit");
// Two stories waiting in 2_current, one coder agent.
fs::create_dir_all(sk_dir.join("work/2_current")).unwrap();
fs::write(
@@ -1463,7 +1463,7 @@ stage = "coder"
#[test]
fn has_review_hold_returns_true_when_set() {
let tmp = tempfile::tempdir().unwrap();
let qa_dir = tmp.path().join(".story_kit/work/3_qa");
let qa_dir = tmp.path().join(".storkit/work/3_qa");
std::fs::create_dir_all(&qa_dir).unwrap();
let spike_path = qa_dir.join("10_spike_research.md");
std::fs::write(
@@ -1477,7 +1477,7 @@ stage = "coder"
#[test]
fn has_review_hold_returns_false_when_not_set() {
let tmp = tempfile::tempdir().unwrap();
let qa_dir = tmp.path().join(".story_kit/work/3_qa");
let qa_dir = tmp.path().join(".storkit/work/3_qa");
std::fs::create_dir_all(&qa_dir).unwrap();
let spike_path = qa_dir.join("10_spike_research.md");
std::fs::write(&spike_path, "---\nname: Research spike\n---\n# Spike\n").unwrap();
@@ -1702,13 +1702,13 @@ stage = "coder"
let root = tmp.path();
// Set up story in 2_current/.
let current = root.join(".story_kit/work/2_current");
let current = root.join(".storkit/work/2_current");
fs::create_dir_all(&current).unwrap();
fs::write(current.join("60_story_test.md"), "test").unwrap();
// Create a worktree directory that is a fresh git repo with no commits
// ahead of its own base branch (simulates a worktree where no work was done).
let wt_dir = root.join(".story_kit/worktrees/60_story_test");
let wt_dir = root.join(".storkit/worktrees/60_story_test");
fs::create_dir_all(&wt_dir).unwrap();
init_git_repo(&wt_dir);
@@ -1733,7 +1733,7 @@ stage = "coder"
init_git_repo(root);
// Set up story in 2_current/ and commit it so the project root is clean.
let current = root.join(".story_kit/work/2_current");
let current = root.join(".storkit/work/2_current");
fs::create_dir_all(&current).unwrap();
fs::write(current.join("61_story_test.md"), "test").unwrap();
Command::new("git")
@@ -1756,7 +1756,7 @@ stage = "coder"
.unwrap();
// Create a real git worktree for the story.
let wt_dir = root.join(".story_kit/worktrees/61_story_test");
let wt_dir = root.join(".storkit/worktrees/61_story_test");
fs::create_dir_all(wt_dir.parent().unwrap()).unwrap();
Command::new("git")
.args([
@@ -1804,7 +1804,7 @@ stage = "coder"
// and the story stays in 2_current/. The important assertion is that
// reconcile ran without panicking and the story is in a consistent state.
let in_current = current.join("61_story_test.md").exists();
let in_qa = root.join(".story_kit/work/3_qa/61_story_test.md").exists();
let in_qa = root.join(".storkit/work/3_qa/61_story_test.md").exists();
assert!(
in_current || in_qa,
"story should be in 2_current/ or 3_qa/ after reconciliation"