governance: keep repository root clean; remove marker file; implement repo detection via structure heuristic; update tests and system prompts/templates

This commit is contained in:
2025-09-17 10:39:25 -05:00
parent c655476699
commit 8a55d59804
27 changed files with 291 additions and 8 deletions

33
scripts/test.sh Executable file
View File

@@ -0,0 +1,33 @@
#!/usr/bin/env bash
set -euo pipefail
ROOT_DIR="$(cd "$(dirname "$0")/.." && pwd)"
if command -v bats >/dev/null 2>&1; then
exec bats "$ROOT_DIR/tests"
fi
# Minimal internal test runner (fallback when bats is not installed)
echo "[info] bats not found; using internal test runner" >&2
failures=0
total=0
for t in "$ROOT_DIR"/tests/*.sh; do
[ -f "$t" ] || continue
total=$((total+1))
echo "[run] $t"
if bash "$t"; then
echo "[ok] $t"
else
echo "[fail] $t" >&2
failures=$((failures+1))
fi
done
echo "[summary] total=$total failures=$failures"
if [ "$failures" -ne 0 ]; then
exit 1
fi
exit 0