## Why The repo moved from a chunk-based delivery model with `.agents/skills/` as the canonical skill source to a plugin model. Several files retained references to the old model that were either dead code or misleading framing. ## Impact - `tests/test-install.sh`: dead `.agents/skills/` test blocks removed; suite now tests only what `install.sh` actually deploys - `scripts/deploy-manifest.sh`: `DEPLOY_SKILLS_SRC` variable and stale `sync.sh (Chunk 6)` comment removed - `tests/test-git-hooks-install.sh`: fixture stub no longer declares the removed `DEPLOY_SKILLS_SRC` variable - `docs/VISION.md`: chunk delivery framing replaced with plugin model language throughout; manual test plan date updated - `tests/test-instructions-and-docs.sh`: stale test plan date flagged as pre-refactor so readers know a re-run is needed Refs: #15 Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
80 lines
2.4 KiB
Bash
Executable File
80 lines
2.4 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
PASS=0
|
|
FAIL=0
|
|
|
|
pass() { echo " PASS: $1"; PASS=$((PASS + 1)); }
|
|
fail() { echo " FAIL: $1"; FAIL=$((FAIL + 1)); }
|
|
|
|
TEMP_HOME="$(mktemp -d)"
|
|
trap 'rm -rf "$TEMP_HOME"' EXIT
|
|
|
|
echo "Running install.sh..."
|
|
HOME="$TEMP_HOME" bash "$REPO_ROOT/scripts/install.sh" > /dev/null
|
|
|
|
echo ""
|
|
echo "--- providers/claude-code/ → ~/.claude/ ---"
|
|
while IFS= read -r -d '' src; do
|
|
rel="${src#"$REPO_ROOT/providers/claude-code/"}"
|
|
[[ "$rel" == "provider-manifest.sh" ]] && continue
|
|
dest="$TEMP_HOME/.claude/$rel"
|
|
if diff -q "$src" "$dest" > /dev/null 2>&1; then
|
|
pass "$rel deployed and matches source"
|
|
else
|
|
fail "$rel — missing or differs from source"
|
|
fi
|
|
done < <(find "$REPO_ROOT/providers/claude-code" -type f -print0)
|
|
|
|
echo ""
|
|
echo "--- core/ → ~/.claude/core/ ---"
|
|
while IFS= read -r -d '' src; do
|
|
rel="${src#"$REPO_ROOT/core/"}"
|
|
dest="$TEMP_HOME/.claude/core/$rel"
|
|
if diff -q "$src" "$dest" > /dev/null 2>&1; then
|
|
pass "$rel deployed and matches source"
|
|
else
|
|
fail "$rel — missing or differs from source"
|
|
fi
|
|
done < <(find "$REPO_ROOT/core" -type f -print0)
|
|
|
|
echo ""
|
|
echo "--- no orphaned files in core/ ---"
|
|
while IFS= read -r -d '' deployed; do
|
|
rel="${deployed#"$TEMP_HOME/.claude/core/"}"
|
|
src="$REPO_ROOT/core/$rel"
|
|
if [[ -f "$src" ]]; then
|
|
pass "core/$rel has a source file"
|
|
else
|
|
fail "core/$rel is orphaned — deleted from source but still deployed"
|
|
fi
|
|
done < <(find "$TEMP_HOME/.claude/core" -type f -print0)
|
|
|
|
echo ""
|
|
echo "--- core/AGENTS.md → ~/.agents/AGENTS.md (0015) ---"
|
|
if diff -q "$REPO_ROOT/core/AGENTS.md" "$TEMP_HOME/.agents/AGENTS.md" > /dev/null 2>&1; then
|
|
pass "core/AGENTS.md deployed and matches source"
|
|
else
|
|
fail "\$HOME/.agents/AGENTS.md — missing or differs from source"
|
|
fi
|
|
|
|
echo ""
|
|
echo "--- idempotency: second run state is correct ---"
|
|
if HOME="$TEMP_HOME" bash "$REPO_ROOT/scripts/install.sh" > /dev/null 2>&1; then
|
|
pass "second run exits zero"
|
|
else
|
|
fail "second run failed"
|
|
fi
|
|
|
|
# AGENTS.md still correct after second run
|
|
if diff -q "$REPO_ROOT/core/AGENTS.md" "$TEMP_HOME/.agents/AGENTS.md" > /dev/null 2>&1; then
|
|
pass "idempotent: ~/.agents/AGENTS.md correct after second install"
|
|
else
|
|
fail "idempotent: ~/.agents/AGENTS.md corrupted after second install"
|
|
fi
|
|
|
|
echo ""
|
|
echo "Results: $PASS passed, $FAIL failed"
|
|
[[ $FAIL -eq 0 ]]
|