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:
1 parent
699f3227c9
commit
8726ed37a7
47 files changed
+2199
-191
No files matched your search
@@ -10,8 +10,9 @@ Usage:
|
||||
queue.py block hook (PreToolUse on Bash)
|
||||
|
||||
Environment:
|
||||
AGENTS_COUNCIL_ROOT: shared state directory; /tmp/agents-council unless set,
|
||||
because every agent on the host must agree on it. The queue is
|
||||
AGENTS_COUNCIL_ROOT, XDG_STATE_HOME, HOME: the shared state directory the
|
||||
kvb-org-organize councilroot.py resolves, on which every agent on the
|
||||
host agrees. The queue is
|
||||
<root>/queue.json, every read-modify-write holds <root>/queue.lock.
|
||||
Each hold keeps an exclusive flock on <root>/holds/<tag>.lock, shared
|
||||
with its command, from before its entry exists until it leaves; an
|
||||
@@ -138,6 +139,7 @@ SIBLINGS = {
|
||||
"rasci": SKILLS / "kvb-org-rasci" / "scripts" / "rasci.py",
|
||||
"history": Path(__file__).resolve().parent / "history.py",
|
||||
"nofollow": SKILLS / "kvb-org-organize" / "scripts" / "nofollow.py",
|
||||
"councilroot": SKILLS / "kvb-org-organize" / "scripts" / "councilroot.py",
|
||||
}
|
||||
TOOLS = {"gates": SKILLS / "kvb-check-gate" / "scripts" / "gates.py"}
|
||||
HOST_SKILLS = Path.home() / ".agents" / "skills"
|
||||
@@ -156,7 +158,6 @@ GATE = re.compile(r"\bgate\.py\s+(run|hold)\b")
|
||||
THROUGH_QUEUE = re.compile(r"\bqueue\.py\s+hold\b")
|
||||
BASH_RULE = re.compile(r"Bash(?:\((.*)\))?", re.DOTALL)
|
||||
RULE_PART = re.compile(r"( \*|\*)")
|
||||
MANAGED = Path("/etc/claude-code")
|
||||
BUDGET_KEYS = ("budget_percent.ram", "budget_percent.cpu")
|
||||
HOTFIX = "hotfix/"
|
||||
PYTEST = frozenset({"pytest", "py.test"})
|
||||
@@ -1043,15 +1044,7 @@ def cmd_cancel(args: argparse.Namespace) -> int:
|
||||
|
||||
|
||||
def settings_files(project: Path) -> list[Path]:
|
||||
user = Path.home() / ".claude"
|
||||
return [
|
||||
MANAGED / "managed-settings.json",
|
||||
*sorted((MANAGED / "managed-settings.d").glob("*.json")),
|
||||
user / "settings.json",
|
||||
user / "settings.local.json",
|
||||
project / ".claude" / "settings.json",
|
||||
project / ".claude" / "settings.local.json",
|
||||
]
|
||||
return sibling("councilroot").settings_files(project)
|
||||
|
||||
|
||||
def bash_rule(rule: str) -> re.Pattern | None:
|
||||
|
||||
Reference in new issue
Block a user