Heartbeat Rules
Use heartbeat to keep `~/self-improving/` organized without creating churn or losing data.
Source of Truth
Keep the workspace `HEARTBEAT.md` snippet minimal. Treat this file as the stable contract for self-improving heartbeat behavior. Store mutable run state only in `~/self-improving/heartbeat-state.md`.
Start of Every Heartbeat
1. Ensure `~/self-improving/heartbeat-state.md` exists. 2. Write `last_heartbeat_started_at` immediately in ISO 8601. 3. Read the previous `last_reviewed_change_at`. 4. Scan `~/self-improving/` for files changed after that moment, excluding `heartbeat-state.md` itself.
If Nothing Changed
If Something Changed
Only do conservative organization:
Safety Rules
State Fields
Keep `~/self-improving/heartbeat-state.md` simple:
Behavior Standard
Heartbeat exists to keep the memory system tidy and trustworthy. If no rule is clearly violated, do nothing.