R6 suppressor signals: effect raise|suppress in routing schema

Adds an optional 'effect' to routing signals. effect: suppress encodes
'this construct is NOT a violation of the domain' (the not-a-violation
articles); the orchestrator subtracts a suppressor's weighted hits from the
domain score (floored at 0) and does not route to it. Threaded through
Build-RoutingIndex (registry now keyed by token+domain+effect so raise/suppress
on the same token don't collide), routing-index.schema.json, and R24
(effect must be raise|suppress). Back-compatible: absent effect => raise.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
dayland 2026-07-17 12:47:11 +01:00
parent c442097d94
commit 498055577e
3 changed files with 34 additions and 15 deletions

View file

@ -236,7 +236,9 @@ def validate_knowledge(path: Path, parsed: Parsed, report: Report) -> None:
for opt in ("pattern", "domain"):
if opt in entry and (not isinstance(entry[opt], str) or not entry[opt].strip()):
report.error(path, "R24", f"signals '{opt}' must be a non-empty string", 1)
unknown = set(entry.keys()) - {"token", "pattern", "domain"}
if "effect" in entry and entry["effect"] not in ("raise", "suppress"):
report.error(path, "R24", "signals 'effect' must be 'raise' or 'suppress'", 1)
unknown = set(entry.keys()) - {"token", "pattern", "domain", "effect"}
if unknown:
report.error(path, "R24", f"signals entry has unknown keys: {sorted(unknown)}", 1)
else: