From 6b33e101468318df8670383e58cf8d0c31919a0b Mon Sep 17 00:00:00 2001 From: Michael Dieringer <65093775+MichaelDieringer@users.noreply.github.com> Date: Thu, 2 Jul 2026 07:09:44 +0200 Subject: [PATCH] RegelSanity: Retten faar jurisdiktion og en foged Michaels observation: udviklere tilfoejer agenter lokalt i enkelt-repos (Edison opstod saadan) - og repoer maa ikke opfoere sig forskelligt. Francis (Bacon) observerer og Immanuel (Kant) universaliserer, men ingen haandhaevede ensartethed paa tvaers af portefoeljen. Tre byggesten: - Ny regel repo-local-agents-must-be-universalized-or-removed: lokale agenter/kvalitetsregler har to fremtider - universaliseres via Francis/Immanuel/Michael eller fjernes. Aldrig tavs beholdelse. Domaeneviden hoerer i projectmemory/docs; kvalitetsstandarder i BCQuality eller ingen steder. - Mode B v11: reconciliation kigger nu BEGGE veje - ekstra filer i .github/.agents (ikke i template-tabellen) flages med a/b-valg: universaliser eller fjern. Det var fogeden, der manglede: Edison laa uopdaget lokalt, fordi Mode B kun tjekkede manglende filer. - court.agent.md v2: to sagstyper. Effektivitets-sager kraever Edison- scorecards som hidtil; RegelSanity-sager (lokal divergens) kraever kun filen, gabet den udfylder, og spoergsmaalet universel-eller-ud. Disposition: UNIVERSALIZE eller REMOVE. Co-Authored-By: Claude Fable 5 --- custom/agents/court.agent.md | 25 ++++++- ...agents-must-be-universalized-or-removed.md | 71 +++++++++++++++++++ custom/setup/curabis-standard.agent.md | 29 +++++++- 3 files changed, 122 insertions(+), 3 deletions(-) create mode 100644 custom/knowledge/architecture/repo-local-agents-must-be-universalized-or-removed.md diff --git a/custom/agents/court.agent.md b/custom/agents/court.agent.md index f1b71f3..babe0e5 100644 --- a/custom/agents/court.agent.md +++ b/custom/agents/court.agent.md @@ -1,7 +1,7 @@ --- kind: action-skill id: curabis-bcquality-court -version: 1 +version: 2 title: The Court — CURABIS BCQuality Landsret description: > The three-judge appellate court for BCQuality governance. Convenes Lincoln, @@ -65,7 +65,11 @@ Each judge reads all prior opinions before writing their own. ## Convening the Court -The Court is convened by presenting a **case brief** containing: +The Court hears two kinds of cases, with different brief requirements. + +### Effectiveness cases (rulebook health) + +Convened by presenting a **case brief** containing: 1. **The question before the Court** — what strategic decision needs a ruling? (e.g., "Should rules ARCH-003 and ARCH-007 be consolidated?", @@ -74,6 +78,23 @@ The Court is convened by presenting a **case brief** containing: 3. **The relevant rules** — full text from BCQuality 4. **Incident history** — any documented cases where the rules failed or succeeded +### RegelSanity cases (local divergence) + +CURABIS repos must behave identically (BCQuality rule +`repo-local-agents-must-be-universalized-or-removed`). When Mode B or a session +finds a repo-local agent or quality rule that exists in no other repo, the +Court hears the divergence case. **No Edison scorecards are required** — the +brief is: + +1. **The local file** — full text, and which repo carries it +2. **The gap it fills** — why did a developer feel the need to create it? +3. **The question** — universalize into BCQuality, or remove from the repo? + +The disposition for a RegelSanity case is always one of **UNIVERSALIZE** +(route to Francis → Immanuel → Michael) or **REMOVE**. A local agent that is +good enough to keep is by definition good enough to universalize — Edison +himself entered the rulebook exactly this way. + The Court will not deliberate without a case brief. Vague questions produce vague rulings. diff --git a/custom/knowledge/architecture/repo-local-agents-must-be-universalized-or-removed.md b/custom/knowledge/architecture/repo-local-agents-must-be-universalized-or-removed.md new file mode 100644 index 0000000..0d77c76 --- /dev/null +++ b/custom/knowledge/architecture/repo-local-agents-must-be-universalized-or-removed.md @@ -0,0 +1,71 @@ +--- +bc-version: [all] +domain: architecture +keywords: [agents, repo-local, divergence, regelsanity, court, governance, universalization] +technologies: [al] +countries: [w1] +application-area: [all] +--- + +# Repo-local agents and rules must be universalized or removed + +## Description + +CURABIS repos must behave identically. A developer who adds an agent or a +quality rule directly to one repo's `.github/.agents/` (instead of proposing +it for BCQuality) creates silent divergence: that repo reviews, routes, or +behaves differently from every other repo, and the improvement — if it is one +— never reaches the rest of the portfolio. + +This happened in practice: `edison.agent.md` was created locally in one repo. +It was invisible to all other repos for weeks, while `court.agent.md` +(deployed everywhere) declared a hard dependency on Edison's scorecards — a +dependency no other repo could satisfy. The agent was good; the placement +made it a liability. + +Repo-specific agents and quality rules do not produce better quality. They +produce N repos with N behaviours. Domain-specific knowledge (business rules, +scope, customer context) belongs in `projectmemory/` and `docs/specs/` — +process and quality standards belong in BCQuality, or nowhere. + +## Rule + +Any agent file or quality/process rule found in a repo that is not part of +the BCQuality-deployed set has exactly two futures, and silence is not one +of them: + +1. **Universalize** — route it through the governance pipeline: Francis files + the observation, Immanuel universalizes, Michael merges to BCQuality, the + next stable promote deploys it to every repo. If the addition raises a + portfolio-level question (overlap with existing agents, structural change), + the Court hears it as a RegelSanity case — no Edison scorecards required + for divergence cases; the file itself and the question "universal or out?" + suffice. +2. **Remove** — if it does not generalize, it does not belong in the repo. + +Detection is Mode B's job: reconciliation must flag files present in +`.github/.agents/` that are NOT in the setup template list — extras, not just +missing files. + +## What NOT to do + +- Do not keep a locally added agent because it is useful — usefulness is the + argument FOR universalizing it, not for keeping it private +- Do not delete a local agent without the routing step; it may be the best + idea in the portfolio (Edison was) +- Do not put quality or process rules in a project's CLAUDE.md or + projectmemory/ to avoid the governance pipeline +- Do not treat this as bureaucracy — one promote deploys to every repo; + universalizing is cheaper than maintaining a private fork of the standard + +## Signal to watch for + +During Mode B or at session start: a file in `.github/.agents/` whose name +does not appear in the setup template table in `curabis-standard.agent.md`. + +## Message to developer + +When a repo-local agent or rule is found, tell the developer: this repo +carries a local agent/rule that no other CURABIS repo has; per RegelSanity it +must either be proposed for BCQuality (offer to route it to Francis and +Immanuel now) or removed — and ask which of the two they want. diff --git a/custom/setup/curabis-standard.agent.md b/custom/setup/curabis-standard.agent.md index 9a9dbf6..07c1eb7 100644 --- a/custom/setup/curabis-standard.agent.md +++ b/custom/setup/curabis-standard.agent.md @@ -1,7 +1,7 @@ --- kind: action-skill id: curabis-standard-setup -version: 10 +version: 11 title: CURABIS Standard — Project Setup description: > Configures a new or existing repository to the CURABIS Standard development @@ -600,6 +600,33 @@ When creating HEARTBEAT.md from template in Mode B: - `docs/` content — project documentation, never overwritten by tooling - `~/.bc-mcp.config.json` — contains developer secrets +### After update — lokal-agent-check (RegelSanity) + +Reconciliation runs in BOTH directions. Missing template files are handled +above — this check finds the opposite: **extra** files in `.github/.agents/` +that are not in this document's template table (see BCQuality rule +`repo-local-agents-must-be-universalized-or-removed`). + +1. List `.github/.agents/*.agent.md` and compare against the template table +2. For each file NOT in the table, output: + +``` +⚠️ RegelSanity: dette repo har en lokal agent, som ingen andre CURABIS-repos har: + + - .agent.md + +Repoer må ikke opføre sig forskelligt. Agenten skal enten: + a) universaliseres — jeg ruter den til Francis/Immanuel som BCQuality-forslag + (Retten hører sagen, hvis den rejser et portefølje-spørgsmål) + b) fjernes fra repoet + +Hvad vælger du? (a/b) +``` + +3. Never delete without the developer's answer; never silently keep. + If (a): draft the Francis observation immediately — the local file is the + evidence. If (b): remove the file and note it in the update report. + ### After update — agent-synligheds-check After updating agent files, compare `.github/.agents/*.agent.md` against CLAUDE.md: