docs: explain reusable partials

Add the public 'Where are my components?' answer: hemx maps framework component jobs to hemplate partials, generated helpers, app-owned state, IntoEffect composition, and explicit leaf islands. The pre-commit guard now only blocks commits that change REQUIREMENTS.md without an AGENTS.md review, so unrelated follow-up commits are not trapped by old history.

req: canonical_authoring/002

req: canonical_authoring/003
This commit is contained in:
slhx agent
2026-06-12 14:40:25 +02:00
parent 8f96169b03
commit d0dc9729fd
4 changed files with 51 additions and 11 deletions
+5 -11
View File
@@ -1,15 +1,9 @@
#!/usr/bin/env bash
set -euo pipefail
changed=$(git diff --cached --name-only)
# fail if REQs changed but AGENTS.md is older
if echo "$changed" | grep -q '^REQUIREMENTS.md$' && echo "$changed" | grep -q '^AGENTS.md$'; then
# Both changed — OK
:
else
req_time=$(git log -1 --format=%ct -- REQUIREMENTS.md 2>/dev/null || echo 0)
ag_time=$(git log -1 --format=%ct -- AGENTS.md 2>/dev/null || echo 0)
if [ "$req_time" -gt "$ag_time" ]; then
echo "error: REQUIREMENTS.md newer than AGENTS.md — run: redgate agents > AGENTS.md"
exit 1
fi
# fail only when this commit changes REQs without reviewing AGENTS.md;
# do not block unrelated commits just because an earlier commit changed REQs.
if echo "$changed" | grep -q '^REQUIREMENTS.md$' && ! echo "$changed" | grep -q '^AGENTS.md$'; then
echo "error: REQUIREMENTS.md changed without AGENTS.md — review AGENTS.md or run: redgate agents > AGENTS.md"
exit 1
fi