docs(ai): ai.md becomes a router; invariants move to AGENTS.md; budgets gated
ai.md 228 → 64 lines. It now carries only: what the product is, the build commands, the architecture table, a "where the truth lives" table, and a pointer to HANDOFF. No narrative, no status, no duplicated invariants. AGENTS.md (195 lines) is now the single always-read file: - the 20 invariants that break output, wipe user data, or ship a legal/trust breach — one line each, pointing at the doc that explains it (they replace 110 lines of invariant stubs that duplicated docs/ai/*.md verbatim) - Response style + No-Fluff Mode moved in from ai.md (rules belong in the rules file) - onboarding is now: HANDOFF → ai.md router → the ONE docs/ai file → dir index; TASKS.md is read when the question is "what's next", not to write code - memory rides with the change but is no longer a unit of its own; HANDOFF is ≤40 lines and overwritten, never appended Anti-rebloat gate: scripts/verify.sh gains step 1/4, a doc-budget check (AGENTS ≤210, ai ≤100; HANDOFF/TASKS caps land with the queue trim). A commit that pads a capped file instead of moving detail fails the gate. schema.md and docs/index.md corrected for the new roles and reading order. Docs-only unit: scope-check run, no build.
This commit is contained in:
+22
-4
@@ -8,7 +8,8 @@
|
||||
# against fresh compiler output.
|
||||
#
|
||||
# Requires WINDOWS dotnet (never Linux dotnet — it re-downloads the windowsdesktop packs
|
||||
# over the slow 9p bridge; see ai.md -> Run). Reads the Windows path from the WSL mount.
|
||||
# over the slow 9p bridge; see docs/ai/environment.md -> Run). Reads the Windows path from the
|
||||
# WSL mount.
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
@@ -18,7 +19,24 @@ DOTNET="/mnt/c/Program Files/dotnet/dotnet.exe"
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
ROOTWIN="$(wslpath -w "$ROOT")"
|
||||
|
||||
echo "══ 1/3 CLEAN BUILD (expect 0 warnings) ══"
|
||||
echo "══ 1/4 DOC BUDGETS ══"
|
||||
# The map stays cheap to read. A commit that PADS a capped file instead of replacing or
|
||||
# moving detail fails here (see AGENTS.md -> Reading budget).
|
||||
check_budget() {
|
||||
local rel="$1" cap="$2" lines
|
||||
[ -f "$ROOT/$rel" ] || { echo "✗ $rel is missing"; exit 1; }
|
||||
lines=$(wc -l < "$ROOT/$rel")
|
||||
if [ "$lines" -gt "$cap" ]; then
|
||||
echo "✗ $rel is $lines lines (cap $cap)."
|
||||
echo " Move the detail to docs/ai/<subsystem>.md, MyMistakes.md or git log — do not pad."
|
||||
exit 1
|
||||
fi
|
||||
printf " ✓ %-12s %3s/%s lines\n" "$rel" "$lines" "$cap"
|
||||
}
|
||||
check_budget "AGENTS.md" 210
|
||||
check_budget "ai.md" 100
|
||||
|
||||
echo "══ 2/4 CLEAN BUILD (expect 0 warnings) ══"
|
||||
"$DOTNET" clean "$ROOTWIN\\ytLive.csproj" > /dev/null
|
||||
OUT="$("$DOTNET" build "$ROOTWIN\\ytLive.csproj" 2>&1)"
|
||||
if echo "$OUT" | grep -qI ": warning"; then
|
||||
@@ -29,7 +47,7 @@ fi
|
||||
echo "$OUT" | grep -E "Build succeeded" || { echo "$OUT" | tail -5; exit 1; }
|
||||
echo "✓ Build clean, 0 warnings."
|
||||
|
||||
echo "══ 2/3 TEST SUITE ══"
|
||||
echo "══ 3/4 TEST SUITE ══"
|
||||
TESTDLL="$ROOTWIN\\ytLive.Tests\\bin\\Debug\\net8.0-windows10.0.19041.0\\ytLive.Tests.dll"
|
||||
"$DOTNET" build "$ROOTWIN\\ytLive.Tests\\ytLive.Tests.csproj" > /dev/null
|
||||
set +e
|
||||
@@ -52,7 +70,7 @@ if [ "$TEST_EXIT" -ne 0 ]; then
|
||||
echo "⚠ Test exit=$TEST_EXIT but only the 2 known pre-existing failures present (OK)."
|
||||
fi
|
||||
|
||||
echo "══ 3/3 SCOPE CHECK ══"
|
||||
echo "══ 4/4 SCOPE CHECK ══"
|
||||
"$ROOT/scripts/scope-check.sh" "$@"
|
||||
|
||||
echo ""
|
||||
|
||||
Reference in New Issue
Block a user