chore: bootstrap repo with chunks 1 and 2
Establishes the global AI development config repo from scratch: - Chunk 1: repo skeleton, install.sh, statusline, deploy manifest - Chunk 2: core instructions (coding/git/testing), CLAUDE.md rewrite (always-on + content index two-tier model), docs restructure, 6 ADRs, ROADMAP.md, .gitkeep placeholders - Bootstrap skills in .claude/skills/ (to be catalogued and migrated to .agents/skills/ in Chunk 3) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
71
tests/test-install.sh
Executable file
71
tests/test-install.sh
Executable file
@@ -0,0 +1,71 @@
|
||||
#!/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/"}"
|
||||
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 "--- directories ---"
|
||||
if [[ -d "$TEMP_HOME/.agents/skills" ]]; then
|
||||
pass "~/.agents/skills/ created"
|
||||
else
|
||||
fail "~/.agents/skills/ not found"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "--- idempotency ---"
|
||||
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
|
||||
|
||||
echo ""
|
||||
echo "Results: $PASS passed, $FAIL failed"
|
||||
[[ $FAIL -eq 0 ]]
|
||||
Reference in New Issue
Block a user