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:
+5
-11
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user