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:
Timmy
2026-04-03 16:12:52 +01:00
parent a7035b6ba7
commit 2d8ccb3eb6
572 changed files with 1340 additions and 1220 deletions
Executable
+79
View File
@@ -0,0 +1,79 @@
#!/usr/bin/env bash
set -euo pipefail
# Huskies migration script
#
# Migrates an existing storkit project to huskies by renaming the .storkit/
# directory to .huskies/ and updating the .mcp.json server registration.
#
# Usage:
# script/migrate [PROJECT_PATH]
#
# If PROJECT_PATH is omitted, the current directory is used.
PROJECT_PATH="${1:-$(pwd)}"
if [ ! -d "$PROJECT_PATH" ]; then
echo "Error: '$PROJECT_PATH' is not a directory."
exit 1
fi
STORKIT_DIR="$PROJECT_PATH/.storkit"
HUSKIES_DIR="$PROJECT_PATH/.huskies"
MCP_JSON="$PROJECT_PATH/.mcp.json"
echo "==> Migrating project at: $PROJECT_PATH"
# ── Rename .storkit/ → .huskies/ ──────────────────────────────────
if [ -d "$STORKIT_DIR" ]; then
if [ -d "$HUSKIES_DIR" ]; then
echo " .huskies/ already exists — skipping directory rename."
else
mv "$STORKIT_DIR" "$HUSKIES_DIR"
echo " Renamed .storkit/ → .huskies/"
fi
else
if [ -d "$HUSKIES_DIR" ]; then
echo " .huskies/ already present (already migrated)."
else
echo " No .storkit/ or .huskies/ directory found — nothing to migrate."
exit 0
fi
fi
# ── Update .mcp.json ──────────────────────────────────────────────
if [ -f "$MCP_JSON" ]; then
if grep -q '"storkit"' "$MCP_JSON"; then
# Replace the MCP server key "storkit" with "huskies"
python3 -c "
import json, sys
with open(sys.argv[1]) as f:
cfg = json.load(f)
servers = cfg.get('mcpServers', {})
if 'storkit' in servers and 'huskies' not in servers:
servers['huskies'] = servers.pop('storkit')
cfg['mcpServers'] = servers
with open(sys.argv[1], 'w') as f:
json.dump(cfg, f, indent=2)
f.write('\n')
" "$MCP_JSON"
echo " Updated .mcp.json: renamed mcpServers key 'storkit' → 'huskies'"
else
echo " .mcp.json already uses 'huskies' key — skipping."
fi
else
echo " No .mcp.json found — skipping."
fi
# ── Update root-level .gitignore ──────────────────────────────────
GITIGNORE="$PROJECT_PATH/.gitignore"
if [ -f "$GITIGNORE" ]; then
if grep -q "\.storkit_port" "$GITIGNORE"; then
sed -i 's/\.storkit_port/\.huskies_port/g' "$GITIGNORE"
echo " Updated .gitignore: .storkit_port → .huskies_port"
fi
fi
echo ""
echo "==> Migration complete."
echo " Restart huskies to pick up the new directory layout."
+8 -8
View File
@@ -3,8 +3,8 @@ set -euo pipefail
# ── Configuration ──────────────────────────────────────────────
GITEA_URL="https://code.crashlabs.io"
REPO="dave/storkit"
BINARY_NAME="storkit"
REPO="dave/huskies"
BINARY_NAME="huskies"
# ── Load .env if present ───────────────────────────────────────
SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)"
@@ -112,9 +112,9 @@ else
fi
# Extract completed stories/bugs/refactors from merge commits.
# Matches both the current "storkit:" prefix and the legacy "story-kit:" prefix.
# Matches the current "huskies:" prefix and legacy "storkit:" / "story-kit:" prefixes for backwards-compatible history parsing.
# Deduplicate (a story may have been merged more than once after reverts).
MERGE_RE="^(storkit|story-kit): merge "
MERGE_RE="^(huskies|storkit|story-kit): merge "
if [ -n "$LOG_RANGE" ]; then
MERGED_RAW=$(git log "$LOG_RANGE" --pretty=format:"%s" --no-merges \
| grep -E "$MERGE_RE" | sed -E "s/$MERGE_RE//" | sort -u || true)
@@ -143,14 +143,14 @@ done <<< "$MERGED_RAW"
# Collect non-automation manual commits (direct fixes, version bumps, etc).
if [ -n "$LOG_RANGE" ]; then
MANUAL=$(git log "$LOG_RANGE" --pretty=format:"%s" --no-merges \
| grep -Ev "^(storkit|story-kit): " \
| grep -Ev "^Revert \"(storkit|story-kit): " \
| grep -Ev "^(huskies|storkit|story-kit): " \
| grep -Ev "^Revert \"(huskies|storkit|story-kit): " \
| grep -v "^Bump version" \
| sed 's/^/- /' || true)
else
MANUAL=$(git log --pretty=format:"%s" --no-merges \
| grep -Ev "^(storkit|story-kit): " \
| grep -Ev "^Revert \"(storkit|story-kit): " \
| grep -Ev "^(huskies|storkit|story-kit): " \
| grep -Ev "^Revert \"(huskies|storkit|story-kit): " \
| grep -v "^Bump version" \
| sed 's/^/- /' || true)
fi
+10
View File
@@ -4,6 +4,16 @@ set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
echo "=== Building frontend ==="
if [ -d "$PROJECT_ROOT/frontend" ]; then
cd "$PROJECT_ROOT/frontend"
npm install
npm run build
cd "$PROJECT_ROOT"
else
echo "Skipping frontend build (no frontend directory)"
fi
echo "=== Running cargo clippy ==="
cargo clippy --manifest-path "$PROJECT_ROOT/Cargo.toml" --all-targets --all-features