| name | handoff |
| description | Prepare handoff: update HANDOFF/REPO_MAP, rotate logs, and create a safe handoff git commit. |
When invoked, do this in order.
A) Documentation and state (must do)
- Update
HANDOFF.md:
- Fill/refresh every section.
- Include concrete evidence: file paths and (if a commit is created) the commit hash.
- Update
REPO_MAP.md only if needed:
- new important file/dir/entrypoint created
- important file moved/renamed
- canonical commands/entrypoints changed
- focus area ("hot paths") changed
- Ensure
.gitignore stays strict for runtime artifacts and secrets.
B) Log rotation (must do)
- Determine next log filename:
agent_logs/YYYY-MM-DD_agentNN.md, where NN is 00, 01, 02, ... chosen as the next unused number for today.
- Move
agent_logs/current.md -> that filename.
- Append a one-line entry to
agent_logs/INDEX.md:
- YYYY-MM-DD_agentNN.md — <short summary> (optional: commit <hash>)
- Create a fresh
agent_logs/current.md.
C) Safe handoff commit (must do, unless safety checks fail)
Before committing, always show:
git status
git diff --stat
Never commit runtime artifacts, caches, or secrets (see .gitignore).
Commit message:
agentNN: handoff(<area>): <short description>
- Derive
agentNN from agent_logs/current.md (field id:). If missing, stop and ask the human.
- Choose
<area> from: workflow, docs, core, browse, persist, ci, misc.