name: context-self-heal description: Agent-local context guard and deterministic compaction workflow (GOD-13). Use when context usage is high, when wiring auto-compaction/restart timers, or when deploying standardized context-monitor hooks across agents.
Context Self-Heal (GOD-13)
Purpose
Provide a reusable, non-agent-specific package for context monitoring and deterministic compaction artifacts.
Files
files/god-13-context-monitor.shfiles/god-13-lenoon-monitor.servicefiles/god-13-lenoon-monitor.timer
Standard Behavior
- Warning zone: >=80% context
- Hard threshold: >=90% context
- Before restart, write deterministic artifact:
memory/context-compaction-latest.md- Sections required:
- Active tasks
- Decisions made
- Open blockers
- Next 3 actions on resume
- Handoff context
Deployment Pattern
- Copy script + units from
files/to target workspace. - Parameterize
AGENT_NAMEand workspace path. - Enable systemd timer (
--user). - Verify artifact write + restart path on threshold breach.
Notes
- Prefer Hindsight plugin as canonical memory; artifact is deterministic restart checkpoint.
- Avoid custom per-agent variants unless operationally required.