tools(agent-loop): two-agent loop scripts, hooks, prompts, nightly lessons

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jesse_Chen
2026-10-13 11:52:24 +08:00
co-authored by Claude Opus 5.5
parent e8119ed124
commit b2bf15b8bb
24 changed files with 1208 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
#!/bin/sh
# Agent loop guard (Grok side, Windows; runs under Git for Windows' sh).
# Installed per process through GIT_CONFIG_KEY_0=core.hooksPath.
# Grok may only create or update branches named codex/*; never delete.
zero=0000000000000000000000000000000000000000
status=0
while read -r local_ref local_sha remote_ref remote_sha; do
case "$remote_ref" in
refs/heads/codex/*) ;;
*)
echo "agent-loop pre-push: Grok may only push refs/heads/codex/*, refused $remote_ref" >&2
status=1 ;;
esac
if [ "$local_sha" = "$zero" ]; then
echo "agent-loop pre-push: deleting $remote_ref is not allowed" >&2
status=1
fi
done
exit $status