huskies: rename project from storkit to huskies
Rename all references from storkit to huskies across the codebase: - .storkit/ directory → .huskies/ - Binary name, Cargo package name, Docker image references - Server code, frontend code, config files, scripts - Fix script/test to build frontend before cargo clippy/test so merge worktrees have frontend/dist available for RustEmbed Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
+18
-18
@@ -7,7 +7,7 @@ use std::process::Command;
|
||||
/// at the given port.
|
||||
pub fn write_mcp_json(dir: &Path, port: u16) -> Result<(), String> {
|
||||
let content = format!(
|
||||
"{{\n \"mcpServers\": {{\n \"storkit\": {{\n \"type\": \"http\",\n \"url\": \"http://localhost:{port}/mcp\"\n }}\n }}\n}}\n"
|
||||
"{{\n \"mcpServers\": {{\n \"huskies\": {{\n \"type\": \"http\",\n \"url\": \"http://localhost:{port}/mcp\"\n }}\n }}\n}}\n"
|
||||
);
|
||||
std::fs::write(dir.join(".mcp.json"), content).map_err(|e| format!("Write .mcp.json: {e}"))
|
||||
}
|
||||
@@ -25,10 +25,10 @@ pub struct WorktreeListEntry {
|
||||
pub path: PathBuf,
|
||||
}
|
||||
|
||||
/// Worktree path inside the project: `{project_root}/.storkit/worktrees/{story_id}`.
|
||||
/// Worktree path inside the project: `{project_root}/.huskies/worktrees/{story_id}`.
|
||||
pub fn worktree_path(project_root: &Path, story_id: &str) -> PathBuf {
|
||||
project_root
|
||||
.join(".storkit")
|
||||
.join(".huskies")
|
||||
.join("worktrees")
|
||||
.join(story_id)
|
||||
}
|
||||
@@ -56,7 +56,7 @@ fn detect_base_branch(project_root: &Path) -> String {
|
||||
|
||||
/// Create a git worktree for the given story.
|
||||
///
|
||||
/// - Creates the worktree at `{project_root}/.storkit/worktrees/{story_id}`
|
||||
/// - Creates the worktree at `{project_root}/.huskies/worktrees/{story_id}`
|
||||
/// on branch `feature/story-{story_id}`.
|
||||
/// - Writes `.mcp.json` in the worktree pointing to the MCP server at `port`.
|
||||
/// - Runs setup commands from the config for each component.
|
||||
@@ -142,14 +142,14 @@ fn create_worktree_sync(project_root: &Path, wt_path: &Path, branch: &str) -> Re
|
||||
}
|
||||
|
||||
// Enable sparse checkout to exclude pipeline files from the worktree.
|
||||
// This prevents .storkit/work/ changes from ending up in feature branches,
|
||||
// This prevents .huskies/work/ changes from ending up in feature branches,
|
||||
// which cause rename/delete merge conflicts when merging back to master.
|
||||
configure_sparse_checkout(wt_path)?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Placeholder for worktree isolation of `.storkit/work/`.
|
||||
/// Placeholder for worktree isolation of `.huskies/work/`.
|
||||
///
|
||||
/// Previous approaches (sparse checkout, skip-worktree) all leaked state
|
||||
/// from worktrees back to the main checkout's config/index. For now this
|
||||
@@ -214,11 +214,11 @@ pub async fn remove_worktree_by_story_id(
|
||||
remove_worktree(project_root, &info, config).await
|
||||
}
|
||||
|
||||
/// List all worktrees under `{project_root}/.storkit/worktrees/`.
|
||||
/// List all worktrees under `{project_root}/.huskies/worktrees/`.
|
||||
/// Find the worktree path for a given story ID, if it exists.
|
||||
pub fn find_worktree_path(project_root: &Path, story_id: &str) -> Option<PathBuf> {
|
||||
let wt_path = project_root
|
||||
.join(".storkit")
|
||||
.join(".huskies")
|
||||
.join("worktrees")
|
||||
.join(story_id);
|
||||
if wt_path.is_dir() {
|
||||
@@ -229,7 +229,7 @@ pub fn find_worktree_path(project_root: &Path, story_id: &str) -> Option<PathBuf
|
||||
}
|
||||
|
||||
pub fn list_worktrees(project_root: &Path) -> Result<Vec<WorktreeListEntry>, String> {
|
||||
let worktrees_dir = project_root.join(".storkit").join("worktrees");
|
||||
let worktrees_dir = project_root.join(".huskies").join("worktrees");
|
||||
if !worktrees_dir.exists() {
|
||||
return Ok(Vec::new());
|
||||
}
|
||||
@@ -376,7 +376,7 @@ mod tests {
|
||||
let path = worktree_path(project_root, "42_my_story");
|
||||
assert_eq!(
|
||||
path,
|
||||
Path::new("/home/user/my-project/.storkit/worktrees/42_my_story")
|
||||
Path::new("/home/user/my-project/.huskies/worktrees/42_my_story")
|
||||
);
|
||||
}
|
||||
|
||||
@@ -390,7 +390,7 @@ mod tests {
|
||||
#[test]
|
||||
fn list_worktrees_returns_subdirs() {
|
||||
let tmp = TempDir::new().unwrap();
|
||||
let worktrees_dir = tmp.path().join(".storkit").join("worktrees");
|
||||
let worktrees_dir = tmp.path().join(".huskies").join("worktrees");
|
||||
fs::create_dir_all(worktrees_dir.join("42_story_a")).unwrap();
|
||||
fs::create_dir_all(worktrees_dir.join("43_story_b")).unwrap();
|
||||
// A file (not dir) — should be ignored
|
||||
@@ -439,8 +439,8 @@ mod tests {
|
||||
fs::create_dir_all(&project_root).unwrap();
|
||||
init_git_repo(&project_root);
|
||||
|
||||
// Create a tracked file under .storkit/work/ on the initial branch
|
||||
let work_dir = project_root.join(".storkit").join("work");
|
||||
// Create a tracked file under .huskies/work/ on the initial branch
|
||||
let work_dir = project_root.join(".huskies").join("work");
|
||||
fs::create_dir_all(&work_dir).unwrap();
|
||||
fs::write(work_dir.join("test_story.md"), "# Test").unwrap();
|
||||
Command::new("git")
|
||||
@@ -458,14 +458,14 @@ mod tests {
|
||||
let branch = "feature/test-sparse";
|
||||
create_worktree_sync(&project_root, &wt_path, branch).unwrap();
|
||||
|
||||
// Worktree should have all files including .storkit/work/
|
||||
assert!(wt_path.join(".storkit").join("work").exists());
|
||||
// Worktree should have all files including .huskies/work/
|
||||
assert!(wt_path.join(".huskies").join("work").exists());
|
||||
assert!(wt_path.join(".git").exists());
|
||||
|
||||
// Main checkout must NOT be affected by worktree creation.
|
||||
assert!(
|
||||
work_dir.exists(),
|
||||
".storkit/work/ must still exist in the main checkout"
|
||||
".huskies/work/ must still exist in the main checkout"
|
||||
);
|
||||
}
|
||||
|
||||
@@ -679,7 +679,7 @@ mod tests {
|
||||
|
||||
// Create a directory that looks like a worktree but isn't registered with git
|
||||
let wt_path = project_root
|
||||
.join(".storkit")
|
||||
.join(".huskies")
|
||||
.join("worktrees")
|
||||
.join("orphan");
|
||||
fs::create_dir_all(&wt_path).unwrap();
|
||||
@@ -700,7 +700,7 @@ mod tests {
|
||||
init_git_repo(&project_root);
|
||||
|
||||
let wt_path = project_root
|
||||
.join(".storkit")
|
||||
.join(".huskies")
|
||||
.join("worktrees")
|
||||
.join("test_rm");
|
||||
create_worktree_sync(&project_root, &wt_path, "feature/test-rm").unwrap();
|
||||
|
||||
Reference in New Issue
Block a user