feat(programs): Operational Knowledge — the transition is the unit + Transition Coverage KPI

Customers don't buy "EMV domain"; they buy "we have ISO 9001, help us with the CRA". The sellable
unit of knowledge is the TRANSITION (from -> to), not the law and not the capability. This reframes
the backlog from "model EMV next" to "the top demanded transitions". No new runtime framework (ADR-010).

- knowledge/programs/transitions.yaml: the Operational Knowledge backlog — the ~20-30 actually demanded
  transitions (of ~N*(N-1) possible) with priority. ISO27001->CRA, ISO9001->CRA, ISO9001->MaschinenVO
  (all 5-star), IEC62443->CRA, TISAX->CRA, ISO27001/IEC62443->NIS2, ISO14001->Umweltrecht.
- Transition Coverage KPI (reference suite, computed-not-stored): per transition a status DERIVED from
  the transition-pattern corpus (reviewed/validated/proven -> Gold, draft -> 🟡, none -> ). Honest
  current state: ISO27001->CRA  reviewed, ISO9001->CRA 🟡 draft, rest . Highest-priority gap =
  ISO9001->MaschinenVO (the next Track-B work) — a far stronger product indicator than "EMV 30% modelled".
- Three knowledge layers documented: Regulatory -> Operational (transitions/playbooks/deltas, the
  biggest differentiator) -> Verification (Vision V2). A domain is a TRANSITION PROGRAM with two tracks:
  Track A breadth (model sources, @Legal-KG/@Execution) + Track B product (transitions/playbooks/RTS
  per source, @Reasoning).
- ADR-010: the transition is the unit of knowledge; Transition Coverage KPI; three layers; two tracks.

10 program/transition-contract tests, check-loc 0. Knowledge data + ADR + reference harness =
non-runtime -> no deploy (ADR-001). No new module, no runtime change.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Benjamin Admin
2026-06-27 23:48:45 +02:00
parent a2403eaed9
commit 18f5d0cb05
7 changed files with 232 additions and 5 deletions
@@ -155,8 +155,9 @@ def domain_programs_section(base_dir) -> None:
idx = build_knowledge_index(_load("transition_patterns"), _load("implementation_playbooks"),
_load("reference_transition_scenarios"))
pdir = os.path.join(base_dir, "..", "knowledge", "programs")
progs = sorted((yaml.safe_load(open(os.path.join(pdir, f), encoding="utf-8"))
for f in sorted(os.listdir(pdir)) if f.endswith(".yaml")), key=lambda p: p.get("backlog_rank", 99))
_all = [yaml.safe_load(open(os.path.join(pdir, f), encoding="utf-8"))
for f in sorted(os.listdir(pdir)) if f.endswith(".yaml")]
progs = sorted((p for p in _all if "backlog_rank" in p), key=lambda p: p["backlog_rank"]) # domain programs only
_ALIAS = {"cyber resilience act": "cra", "maschinenverordnung": "maschinenvo", "iatf": "iatf16949"}
@@ -200,3 +201,65 @@ def domain_programs_section(base_dir) -> None:
("Reifegrad-KPI (computed-not-stored)", "PASS", "aus echtem Korpus abgeleitet (TP/PB/RTS je Domäne)"),
("Regelwerk-ID-Normalisierung", "TODO", "Alias CRA/MaschinenVO im KPI — kanonische IDs ausstehend"),
])
def transition_coverage_section(base_dir) -> None:
"""Transition Coverage — the TRANSITION is the unit of knowledge; status DERIVED from the corpus."""
import os
import yaml
kdir = os.path.join(base_dir, "..", "knowledge")
with open(os.path.join(kdir, "programs", "transitions.yaml"), encoding="utf-8") as h:
backlog = yaml.safe_load(h)
tpdir = os.path.join(kdir, "transition_patterns")
pats = []
for f in sorted(os.listdir(tpdir)):
if not f.endswith(".yaml"):
continue
d = yaml.safe_load(open(os.path.join(tpdir, f), encoding="utf-8"))
goal = d.get("transition_goal", {})
frm = goal.get("from", {}).get("standard", "")
to = goal.get("to")
tos = [it.get("regulation") or it.get("framework") or it.get("target")
for it in (to if isinstance(to, list) else [to]) if isinstance(it, dict)]
pats.append((frm, [t for t in tos if t], str(d.get("status", "draft"))))
_ALIAS = {"isoiec27001": "iso27001", "isoiec62443": "iec62443",
"cyberresilienceact": "cra", "maschinenverordnung": "maschinenvo"}
def _c(s):
k = "".join(ch for ch in str(s).lower() if ch.isalnum())
return _ALIAS.get(k, k)
_RANK = {"draft": 1, "reviewed": 2, "validated": 3, "proven": 4}
_ICON = {0: "⚪ nicht begonnen", 1: "🟡 Draft", 2: "✅ reviewed", 3: "✅ validated", 4: "✅ Gold"}
def _status(frm, to):
best = 0
for pf, ptos, st in pats:
if _c(pf) == _c(frm) and _c(to) in {_c(x) for x in ptos}:
best = max(best, _RANK.get(st, 1))
return best
w("## Transition Coverage — die Transition ist die Wissenseinheit (Operational Knowledge)")
w("")
w('_Der Kunde kauft nicht „EMV-Domain", sondern „wir haben ISO 9001 — helfen Sie uns beim CRA". Die Wissenseinheit ist die TRANSITION (nicht das Gesetz). Status je Transition aus dem echten Pattern-Korpus abgeleitet (computed-not-stored). Drei Ebenen: Regulatory → **Operational (hier, größter Differenzierer)** → Verification (Vision V2)._')
w("")
w("| Prio | Transition | Status |")
w("|---|---|---|")
rows = sorted(backlog["transitions"], key=lambda t: -t["priority"])
done = 0
for t in rows:
s = _status(t["from"], t["to"])
done += 1 if s else 0
w("| %s | `%s%s` | %s |" % ("" * t["priority"], t["from"], t["to"], _ICON[s]))
w("")
gaps = [t for t in rows if _status(t["from"], t["to"]) == 0]
if gaps:
w('**Größte Lücke (Track B als Nächstes):** `%s%s` (%s) — höchstnachgefragte Transition OHNE Pattern. Stärkerer Produktindikator als „EMV 30%% modelliert".' % (gaps[0]["from"], gaps[0]["to"], "" * gaps[0]["priority"]))
w("")
coverage_table([
("Transition Coverage (Operational Knowledge)", "PASS", "%d von %d Top-Transitionen mit Pattern" % (done, len(rows))),
("Wissenseinheit = Transition (nicht Gesetz)", "PASS", "verkauft wird der Übergang, z. B. ISO9001→CRA"),
("3 Ebenen Regulatory→Operational→Verification", "PASS", "Operational = größter Differenzierer (ADR-010)"),
])