When invoked (or when the user says checkpoint), do this in order.
1) Preflight (must do; show output)
git status
git diff --stat
2) Sanity guardrails (must do)
- Never run:
git push, git commit --amend, git rebase, git reset --hard, git clean -fdx, or modify git remotes.
- Never stage/commit secrets/credentials:
.env*, *.pem, *.key, id_rsa*, id_ed25519*, tokens.
- Never stage/commit competition data or run artifacts:
competitions/**/{public,private,raw,downloads}/**
runs/**
- sqlite/db files
3) Stage (default: include safe tracked files)
Stage only source/docs/config files and small markdown:
- root
*.md, *.yml
docs/**
local_context_enrichments/**
.codex/**
If anything looks suspicious (bulk files, data-like payloads), stop and report before staging.
Before committing, show:
4) Commit (auto message)
- Create a structured message that includes the agent id:
agentNN: checkpoint(<area>): <short summary>
- Derive
agentNN from agent_logs/current.md (field id:). If missing, stop and ask the human.
- Choose
<area> from: workflow, docs, orchestrator, competitions, prompts, ci, misc.
- Run
git commit -m "<message>".
5) Postflight (must do; show output)
git status
- Report the commit hash.
1---2name: checkpoint-53description: Create a safe checkpoint git commit on the current branch (avoid competition data, runs, artifacts, secrets).4---5
6When invoked (or when the user says `checkpoint`), do this in order.
7
8## 1) Preflight (must do; show output)
9- `git status`
10- `git diff --stat`
11
12## 2) Sanity guardrails (must do)
13- Never run: `git push`, `git commit --amend`, `git rebase`, `git reset --hard`, `git clean -fdx`, or modify git remotes.
14- Never stage/commit secrets/credentials: `.env*`, `*.pem`, `*.key`, `id_rsa*`, `id_ed25519*`, tokens.
15- Never stage/commit competition data or run artifacts:
16 - `competitions/**/{public,private,raw,downloads}/**`
17 - `runs/**`
18 - sqlite/db files
19
20## 3) Stage (default: include safe tracked files)
21Stage only source/docs/config files and small markdown:
22- root `*.md`, `*.yml`
23- `docs/**`
24- `local_context_enrichments/**`
25- `.codex/**`
26
27If anything looks suspicious (bulk files, data-like payloads), stop and report before staging.
28
29Before committing, show:
30- `git diff --cached --stat`
31
32## 4) Commit (auto message)
33- Create a structured message that includes the agent id:
34 - `agentNN: checkpoint(<area>): <short summary>`
35 - Derive `agentNN` from `agent_logs/current.md` (field `id:`). If missing, stop and ask the human.
36 - Choose `<area>` from: `workflow`, `docs`, `orchestrator`, `competitions`, `prompts`, `ci`, `misc`.
37- Run `git commit -m "<message>"`.
38
39## 5) Postflight (must do; show output)
40- `git status`
41- Report the commit hash.