governance: add .gitignore housekeeping and regular audits; implement audit script and CI step; update templates, proposal, and docs
Some checks failed
ci / test (push) Has been cancelled

This commit is contained in:
2025-09-17 11:17:12 -05:00
parent bae62d94dc
commit 1eaa2f7997
14 changed files with 177 additions and 4 deletions

43
scripts/audit.sh Normal file
View File

@@ -0,0 +1,43 @@
#!/usr/bin/env bash
set -euo pipefail
root_dir="$(cd "$(dirname "$0")/.." && pwd)"
failures=0
check() {
local msg="$1"; shift
if "$@"; then
echo "[ok] $msg"
else
echo "[fail] $msg" >&2
failures=$((failures+1))
fi
}
cd "$root_dir"
# Structure checks
for d in collab docs prompts templates scripts meta .gitea; do
check "dir exists: $d" test -d "$d"
done
# .gitignore housekeeping
if [ -f .gitignore ]; then
if grep -q '^runs/' .gitignore; then
echo "[ok] .gitignore includes runs/"
else
echo "[fail] .gitignore missing runs/" >&2; failures=$((failures+1))
fi
else
echo "[warn] no .gitignore at repo root"
fi
# CI presence
check "Gitea workflow exists" test -f .gitea/workflows/ci.yml
# Docker compose for local parity
check "docker/compose.yml exists" test -f docker/compose.yml
echo "[summary] failures=$failures"
exit "$failures"