From 0f6041df35a61739a2cb2f6e61fc523333ed73ab 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:15 +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 | 84 +++++++++++++++++++++++++++++++++++++++-- .codex/hooks.json | 88 +++++++++++++++++++++++++++++++++++++++++++ .entire/.gitignore | 5 +++ .entire/settings.json | 14 +++++++ AGENTS.md | 3 ++ 5 files changed, 191 insertions(+), 3 deletions(-) create mode 100644 .codex/hooks.json create mode 100644 .entire/.gitignore create mode 100644 .entire/settings.json diff --git a/.claude/settings.json b/.claude/settings.json index cc4d1b3..c6b1394 100644 --- a/.claude/settings.json +++ b/.claude/settings.json @@ -1,4 +1,82 @@ { + "_note": "После init — smoke-test: Read .env должен блокнуться.", + "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": "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": "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(**/.env)", @@ -7,8 +85,8 @@ "Read(**/*credential*)", "Read(**/id_rsa*)", "Edit(**/.env)", - "Write(**/.env)" + "Write(**/.env)", + "Read(./.entire/metadata/**)" ] - }, - "_note": "После init — smoke-test: Read .env должен блокнуться." + } } diff --git a/.codex/hooks.json b/.codex/hooks.json new file mode 100644 index 0000000..79c5f77 --- /dev/null +++ b/.codex/hooks.json @@ -0,0 +1,88 @@ +{ + "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 + } + ] + } + ], + "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": "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..27729e0 --- /dev/null +++ b/.entire/settings.json @@ -0,0 +1,14 @@ +{ + "enabled": true, + "strategy_options": { + "checkpoint_remote": { + "provider": "github", + "repo": "zarubinvibe/athena-checkpoints" + } + }, + "checkpoints": { + "primary": { + "type": "git-refs" + } + } +} diff --git a/AGENTS.md b/AGENTS.md index b423fab..2341fb6 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -34,3 +34,6 @@ The smoke suite must finish with `SMOKE OK`. Do not describe work as complete wh - `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/athena-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.