Devlog for the 4-round reviewer-fanout audit with decisions and
gotchas; AGENTS.md gains GitNexus code-intelligence boilerplate
plus Project Learnings and Session Logs sections; GLOSSARY.md
defines warn/force tiers and the compaction cycle.
Manual compaction (ctx.compact) aborts the active run and never
resumes the interrupted turn (Pi 1.5.2 agent-session.js:2321-2327),
so triggering it from turn_end destroyed in-progress agent work.
The force tier now fires at agent_settled, where ctx.isIdle() is
guaranteed and compaction aborts nothing; Pi's built-in mid-run
threshold check stays the actor and preserves runs.
Also: the settled handler awaits compaction completion so prompts
deferred from settled handlers cannot race an in-flight compaction;
per-field config validation falls back to defaults (null token
values previously zeroed thresholds via Math.min, strings silently
NaN-disabled them); the cached token count is cleared on
session_compact so stale pre-compaction counts cannot re-trigger.
Adds harness.ts: 15-test mock harness (node --test, type
stripping, zero deps) covering both regressions, locks, cooldown,
validation, and cycle resets. README corrected accordingly.
Warn tier injects a one-shot context notice to the agent; force tier
triggers ctx.compact() at a clean turn boundary before Pi's built-in
threshold compaction. Never registers session_before_compact, so
pi-lcm stays in charge of DAG summaries; mirrors pi-dcp's null-token
caching and session_compact cycle reset.