diff options
| author | Craig Jennings <c@cjennings.net> | 2026-06-10 18:21:15 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-06-10 18:21:15 -0500 |
| commit | b0140951ebe0f0c2d33a868a2d1cda2eafd29044 (patch) | |
| tree | a259806847559e32153bbbb6f60bddfb4bb2c8fe /scripts/systemd | |
| parent | 242b95ea44d4ba12a611a0b2acb3edc109ce74f5 (diff) | |
| download | rulesets-b0140951ebe0f0c2d33a868a2d1cda2eafd29044.tar.gz rulesets-b0140951ebe0f0c2d33a868a2d1cda2eafd29044.zip | |
feat(kb): monthly hygiene report for agent KB nodes
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.
Diffstat (limited to 'scripts/systemd')
| -rw-r--r-- | scripts/systemd/roam-hygiene.service | 9 | ||||
| -rw-r--r-- | scripts/systemd/roam-hygiene.timer | 10 |
2 files changed, 19 insertions, 0 deletions
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 diff --git a/scripts/systemd/roam-hygiene.timer b/scripts/systemd/roam-hygiene.timer new file mode 100644 index 0000000..bef56d1 --- /dev/null +++ b/scripts/systemd/roam-hygiene.timer @@ -0,0 +1,10 @@ +[Unit] +Description=Run the agent-KB hygiene report monthly + +[Timer] +OnCalendar=monthly +Persistent=true +RandomizedDelaySec=1h + +[Install] +WantedBy=timers.target |
