feat: implement ADR-0012 — AGENTS.md refactor (issue 0015)

Create AGENTS.md at repo root and core/AGENTS.md as provider-agnostic
sources of always-on rules. Slim both CLAUDE.md files to thin adapters.
Deploy core/AGENTS.md → ~/.agents/AGENTS.md via deploy-manifest.sh.
Update three test suites to check correct locations post-refactor.
All automated tests pass (57 instructions, 106 install, 25 governance).
HITL behavioral test plan in test-instructions-and-docs.sh scenarios 9–12.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-17 15:41:05 +00:00
parent 9457efff36
commit a1f1f9ded8
12 changed files with 267 additions and 114 deletions

View File

@@ -52,6 +52,14 @@ while IFS= read -r -d '' deployed; do
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 "~/.agents/AGENTS.md — missing or differs from source"
fi
echo ""
echo "--- skills deployed to ~/.agents/skills/ ---"
while IFS= read -r -d '' src_skill; do
@@ -168,6 +176,13 @@ else
fail "idempotent: ~/.claude/skills symlink broken after second install"
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 ]]