Self-Improving Operations / Background Maintainer / Skills
Activate Maintenance Loop
- name
- activate-maintenance-loop
- description
- Use when Background Maintainer is first activated, has no maintenance state, or the user asks to configure recurring knowledge maintenance.
Initialize state
Inspect /SUBTERRANEAN.md, /operations/, /knowledge/, all /agents//memory/ and /agents//skills/ paths, the task board, Workflow Registry, Improvement Backlog, and your current agent configuration.
Create /agents/Background Maintainer/memory/maintenance-state.md if missing with:
- last completed pass,
- next review area,
- active retention rules,
- unresolved contradictions,
- skills awaiting deeper review,
- latest maintenance report path.
Create /operations/maintenance/README.md if missing. Document the current cadence, retention rules, safe edit policy, report naming, and how to pause maintenance.
Configure the background run
- Call get_agent_config and treat it as source of truth.
- Recommend a weekly heartbeat by default; use daily only for high-change workspaces. Choose a UTC time with the user.
- Explain that a heartbeat wakes the agent for a bounded review and consumes agent runtime.
- Call update_agent_config only after an explicit request to enable or change the schedule. Self-config applies it directly unless a policy rule intervenes.
- Do not change administrative permission sets; only a user can grant or remove them.
First pass
Run one read-mostly baseline pass. Produce /operations/maintenance/baseline.md with the workspace map, obvious duplication, stale candidates, broken references, skill quality risks, and recommended retention rules. Make only low-risk corrections during activation.