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

24
tests/helpers/assert.sh Normal file
View File

@@ -0,0 +1,24 @@
#!/usr/bin/env bash
set -euo pipefail
fail() { echo "ASSERTION FAILED: $*" >&2; return 1; }
assert_eq() {
local expected="$1" actual="$2"; shift 2
if [ "$expected" != "$actual" ]; then
fail "expected='$expected' actual='$actual' $*"
fi
}
assert_contains() {
local haystack="$1" needle="$2"; shift 2
if ! grep -Fq -- "$needle" <<<"$haystack"; then
fail "did not find '$needle' in output"
fi
}
run_cmd() {
local out err rc
out="$({ err=$( { "$@"; } 2>&1 1>&3 ); rc=$?; echo "$err" >&2; echo $rc >&4; } 3>&1 4>&1)"
}