Add the metadata layer from /init-project: canonical GPL-3.0-or-later LICENSE, CITATION.cff, seeded CHANGELOG, .editorconfig, and ADRs 0001-0003 recording the stack, license, and forge/CI decisions. README gains a forge badge and a License section.
Root AGENTS.md gains the DOX framework with child docs for docs/, docs/devlog/, and docs/adr/ so the doc tree has binding contracts.
Replace the /smart-compact notify() text with a ctx.ui.custom overlay
panel (the /dcp context look): usage bar, threshold rows with crossed
indicators, cycle flags, esc/enter/q/ctrl+c dismissal (keybindings-aware
with a raw kitty/legacy fallback set), and notify() fallback for
print/RPC mode.
Hardened by a fresh-context reviewer fanout (ponytail/security/general):
kitty explicit-modifier close forms added, render() now honors the
requested width exactly with a degenerate-narrow fallback, label width
simplified. Harness gains a ctx.ui.custom mock; 22 tests green.
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.