From b0140951ebe0f0c2d33a868a2d1cda2eafd29044 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Wed, 10 Jun 2026 18:21:15 -0500 Subject: feat(kb): monthly hygiene report for agent KB nodes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Phase 4 of the agent KB spec. kb-hygiene.sh inventories :agent: nodes, flags orphans (no id: link anywhere in the KB points at them), duplicate titles, and stray conflict files, then writes an org report into the rulesets inbox for the normal inbox flow to propose dispositions. Read-only by design — it never deletes. A monthly systemd user timer (Persistent=true) runs it; bats covers the counts, orphan detection, duplicates, conflict tally, and the missing-KB error path. --- scripts/systemd/roam-hygiene.service | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 scripts/systemd/roam-hygiene.service (limited to 'scripts/systemd/roam-hygiene.service') diff --git a/scripts/systemd/roam-hygiene.service b/scripts/systemd/roam-hygiene.service new file mode 100644 index 0000000..4966290 --- /dev/null +++ b/scripts/systemd/roam-hygiene.service @@ -0,0 +1,9 @@ +# Monthly agent-KB hygiene report (spec Phase 4). Install: +# cp scripts/systemd/roam-hygiene.* ~/.config/systemd/user/ +# systemctl --user daemon-reload && systemctl --user enable --now roam-hygiene.timer +[Unit] +Description=Monthly hygiene report for the agent knowledge base + +[Service] +Type=oneshot +ExecStart=%h/code/rulesets/scripts/kb-hygiene.sh %h/org/roam %h/code/rulesets/inbox -- cgit v1.2.3