From b6797515b428effe832a336eb11f7d1126cf72d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=97=D0=B0=D1=80=D1=83=D0=B1=D0=B8=D0=BD=20=D0=A4=D0=B8?= =?UTF-8?q?=D0=BB=D0=B8=D0=BF=D0=BF?= <289370046+zarubinvibe@users.noreply.github.com> Date: Sat, 29 Aug 2026 19:09:17 +0300 Subject: [PATCH] chore: track agent sessions in a private Entire checkpoint repository A public repository must never hold its own agent sessions, and the work still has to be reproducible. Entire is enabled here with a separate private checkpoint repository, hooks for Claude Code and Codex, and the git-refs checkpoint backend. The release gate now enforces this before any public push: tracked .entire/settings.json, tracking enabled, automatic session pushing on, and a checkpoint repository that exists, is separate from this repository, and is private. Unknown visibility fails closed. --- .claude/settings.json | 78 +++++++++++++++++++++++++++++++++++++++++-- .codex/hooks.json | 78 +++++++++++++++++++++++++++++++++++++++++++ .entire/.gitignore | 5 +++ .entire/settings.json | 14 ++++++++ AGENTS.md | 3 ++ 5 files changed, 175 insertions(+), 3 deletions(-) create mode 100644 .entire/.gitignore create mode 100644 .entire/settings.json diff --git a/.claude/settings.json b/.claude/settings.json index f360417..67bfe7a 100644 --- a/.claude/settings.json +++ b/.claude/settings.json @@ -1,5 +1,26 @@ { + "disableBundledSkills": true, "hooks": { + "PostToolUse": [ + { + "matcher": "Agent", + "hooks": [ + { + "type": "command", + "command": "sh -c 'if ! command -v entire >/dev/null 2>&1; then exit 0; fi; exec entire hooks claude-code post-task'" + } + ] + }, + { + "matcher": "TaskCreate|TaskUpdate", + "hooks": [ + { + "type": "command", + "command": "sh -c 'if ! command -v entire >/dev/null 2>&1; then exit 0; fi; exec entire hooks claude-code post-todo'" + } + ] + } + ], "PreToolUse": [ { "matcher": "Read|Write|Edit|NotebookEdit|Bash", @@ -9,17 +30,69 @@ "command": "python3 \"$CLAUDE_PROJECT_DIR/scripts/claude_guard.py\"" } ] + }, + { + "matcher": "Agent", + "hooks": [ + { + "type": "command", + "command": "sh -c 'if ! command -v entire >/dev/null 2>&1; then exit 0; fi; exec entire hooks claude-code pre-task'" + } + ] + } + ], + "SessionEnd": [ + { + "matcher": "", + "hooks": [ + { + "type": "command", + "command": "sh -c 'if ! command -v entire >/dev/null 2>&1; then exit 0; fi; exec entire hooks claude-code session-end'" + } + ] + } + ], + "SessionStart": [ + { + "matcher": "", + "hooks": [ + { + "type": "command", + "command": "sh -c 'if ! command -v entire >/dev/null 2>&1; then printf \"%s\\n\" \"{\\\"systemMessage\\\":\\\"\\\\n\\\\nEntire CLI is enabled but not installed or not on PATH.\\\\nInstallation guide: https://docs.entire.io/cli/installation#installation-methods\\\"}\"; exit 0; fi; exec entire hooks claude-code session-start'" + } + ] } ], "Stop": [ { + "matcher": "", "hooks": [ { "type": "command", "command": "mkdir -p \"$CLAUDE_PROJECT_DIR/cases/_logs\" && echo \"Session ended: $(date '+%d.%m.%Y %H:%M')\" >> \"$CLAUDE_PROJECT_DIR/cases/_logs/_session_history.txt\"" + }, + { + "type": "command", + "command": "sh -c 'if ! command -v entire >/dev/null 2>&1; then exit 0; fi; exec entire hooks claude-code stop'" } ] } + ], + "UserPromptSubmit": [ + { + "matcher": "", + "hooks": [ + { + "type": "command", + "command": "sh -c 'if ! command -v entire >/dev/null 2>&1; then exit 0; fi; exec entire hooks claude-code user-prompt-submit'" + } + ] + } + ] + }, + "permissions": { + "deny": [ + "Read(./.entire/metadata/**)" ] }, "skillOverrides": { @@ -913,6 +986,5 @@ "skill-development": "off", "watch": "off", "writing-rules": "off" - }, - "disableBundledSkills": true -} \ No newline at end of file + } +} diff --git a/.codex/hooks.json b/.codex/hooks.json index be1478e..d7f4c6c 100644 --- a/.codex/hooks.json +++ b/.codex/hooks.json @@ -1,5 +1,17 @@ { "hooks": { + "PostToolUse": [ + { + "matcher": null, + "hooks": [ + { + "type": "command", + "command": "sh -c 'if ! command -v entire >/dev/null 2>&1; then exit 0; fi; exec entire hooks codex post-tool-use'", + "timeout": 30 + } + ] + } + ], "PreToolUse": [ { "matcher": "Read|Write|Edit|NotebookEdit|Bash", @@ -11,12 +23,78 @@ ] } ], + "SessionEnd": [ + { + "matcher": null, + "hooks": [ + { + "type": "command", + "command": "sh -c 'if ! command -v entire >/dev/null 2>&1; then exit 0; fi; exec entire hooks codex session-end'", + "timeout": 3 + } + ] + } + ], + "SessionStart": [ + { + "matcher": null, + "hooks": [ + { + "type": "command", + "command": "sh -c 'if ! command -v entire >/dev/null 2>&1; then printf \"%s\\n\" \"{\\\"systemMessage\\\":\\\"Entire CLI is enabled but not installed or not on PATH. Installation guide: https://docs.entire.io/cli/installation#installation-methods\\\"}\"; exit 0; fi; exec entire hooks codex session-start'", + "timeout": 30 + } + ] + } + ], "Stop": [ { + "matcher": null, "hooks": [ { "type": "command", "command": "mkdir -p \"$CLAUDE_PROJECT_DIR/cases/_logs\" && echo \"Session ended: $(date '+%d.%m.%Y %H:%M')\" >> \"$CLAUDE_PROJECT_DIR/cases/_logs/_session_history.txt\"" + }, + { + "type": "command", + "command": "sh -c 'if ! command -v entire >/dev/null 2>&1; then exit 0; fi; exec entire hooks codex stop'", + "timeout": 30 + } + ] + } + ], + "SubagentStart": [ + { + "matcher": null, + "hooks": [ + { + "type": "command", + "command": "sh -c 'if ! command -v entire >/dev/null 2>&1; then exit 0; fi; exec entire hooks codex subagent-start'", + "timeout": 30 + } + ] + } + ], + "SubagentStop": [ + { + "matcher": null, + "hooks": [ + { + "type": "command", + "command": "sh -c 'if ! command -v entire >/dev/null 2>&1; then exit 0; fi; exec entire hooks codex subagent-stop'", + "timeout": 30 + } + ] + } + ], + "UserPromptSubmit": [ + { + "matcher": null, + "hooks": [ + { + "type": "command", + "command": "sh -c 'if ! command -v entire >/dev/null 2>&1; then exit 0; fi; exec entire hooks codex user-prompt-submit'", + "timeout": 30 } ] } diff --git a/.entire/.gitignore b/.entire/.gitignore new file mode 100644 index 0000000..e66987d --- /dev/null +++ b/.entire/.gitignore @@ -0,0 +1,5 @@ +tmp/ +settings.local.json +metadata/ +logs/ +redactors/local/ diff --git a/.entire/settings.json b/.entire/settings.json new file mode 100644 index 0000000..c6203c5 --- /dev/null +++ b/.entire/settings.json @@ -0,0 +1,14 @@ +{ + "enabled": true, + "strategy_options": { + "checkpoint_remote": { + "provider": "github", + "repo": "zarubinvibe/themis-checkpoints" + } + }, + "checkpoints": { + "primary": { + "type": "git-refs" + } + } +} diff --git a/AGENTS.md b/AGENTS.md index 9e77d4b..bd5b821 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -109,3 +109,6 @@ Reasoning — Claude-модели. Извлечение — локально, б - `AGENTS.md` holds the rules; `CLAUDE.md`, `GEMINI.md`, `.github/copilot-instructions.md`, and `.cursor/rules/*.mdc` only point here. - Run `public-repo-gate check --repo . --release-intent public` before any push, and fix every blocker. +- Agent work here is tracked by Entire, and its checkpoints go to the separate private repository + `zarubinvibe/themis-checkpoints`. Session capture stays on: a public repository never stores its own + checkpoints, and the release gate blocks a push when tracking is disabled or the checkpoint repository is public.