fix(kvb-org-organize): move the council root out of /tmp with a lossless migration

councilroot.py resolves one durable council root for every script and migrates the old /tmp root under the held locks: a preflight conflict moves nothing, each legacy file is renamed to a staging name before it is copied so a late writer is merged by the catch-up, id-less journals merge by line multiset, a differing whole file is kept beside its namesake, and a crash marker makes install copy the skills and report. One settings-file list, managed drop-ins included, serves councilroot.py and queue.py. Tests run once on unify/skills-20261114 after the merge (operator order 2026-11-14).

🎯 Fix: 88 %
💥 Break: 7 %
💸 Tokens: 100 %
⏱️ Velocity: 100 %
🛡️ Security: 100 %
🏆 Score: 82
🚦 Gate: ⛔ fix 88 % < 90, break 7 % > 5

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Kevin Veen-BirkenbachandClaude Opus 5.5 committed 2026-11-14 21:18:41 +00:00
1 parent 699f3227c9
commit 8726ed37a7
47 files changed
+2199 -191

No files matched your search

+10 -11
View File
@@ -2,12 +2,12 @@
"""Keep the RASCI register of the organisation's tasks in a local JSON file.
Environment:
AGENTS_COUNCIL_ROOT: council directory shared by every agent on the host;
the register is <root>/rasci.json, and `show` also lists every work/
and cluster/ claim of the council there. The operator's agent order
(`agents order`) lies beside it in <root>/agent-order.json, apart from
every task row: it breaks ties of equal task priority only.
/tmp/agents-council unless set.
AGENTS_COUNCIL_ROOT, XDG_STATE_HOME, HOME: the council directory the
kvb-org-organize councilroot.py resolves, shared by every agent on the
host; the register is <root>/rasci.json, and `show` also lists every
work/ and cluster/ claim of the council there. The operator's agent
order (`agents order`) lies beside it in <root>/agent-order.json, apart
from every task row: it breaks ties of equal task priority only.
Exit codes:
0 done, 2 usage error.
@@ -20,7 +20,6 @@ import contextlib
import datetime
import importlib.util
import json
import os
import re
import statistics
import sys
@@ -28,10 +27,6 @@ from collections.abc import Iterator
from pathlib import Path
from types import ModuleType
ROOT = Path(os.environ.get("AGENTS_COUNCIL_ROOT", "/tmp/agents-council"))
DB = ROOT / "rasci.json"
LOCK = ROOT / "rasci.lock"
AGENT_ORDER = ROOT / "agent-order.json"
FILE_MODE = 0o600
ORGANIZE = Path(__file__).resolve().parents[2] / "kvb-org-organize" / "scripts"
COUNCIL = ORGANIZE / "council.py"
@@ -88,6 +83,10 @@ def script(name: str, path: Path) -> ModuleType:
nofollow = script("kvb_rasci_nofollow", ORGANIZE / "nofollow.py")
ROOT = script("kvb_rasci_councilroot", ORGANIZE / "councilroot.py").root()
DB = ROOT / "rasci.json"
LOCK = ROOT / "rasci.lock"
AGENT_ORDER = ROOT / "agent-order.json"
def load() -> dict[str, dict]: