chore(core): stage 1 contracts — dialog, API schemas + fixtures, integrations, monitoring, modules
CI / ruff · pytest (pull_request) Successful in 22s
CI / ruff · pytest (pull_request) Successful in 22s
Freeze interfaces between lanes A (bot), B (backend), C (dashboard) so three developers work in parallel without touching each other's files: dialog Event/Reply + engine registry with echo stub, integration protocols with in-memory defaults, MonitoringService with noop stub, /api/v1 schemas with fixture-backed routes, frozen main.py wiring, config/modules.yaml + due_scales(), DAR-5, tzdata, Andrey trajectory, lanes in WORKFLOW, ADR-010. Refs #34 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+2
-6
@@ -320,9 +320,7 @@ def _has_affirmed_match(n: _Normalised, rule: _Rule, neg: _NegationCfg) -> bool:
|
||||
# ---------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
def check(
|
||||
text: ScrubbedText, llm_signal: RiskLevel | None = None, *, lexicon: Lexicon | None = None
|
||||
) -> SafetyResult:
|
||||
def check(text: ScrubbedText, llm_signal: RiskLevel | None = None, *, lexicon: Lexicon | None = None) -> SafetyResult:
|
||||
"""Classify crisis risk of one message. Deterministic; the LLM signal can only raise the level."""
|
||||
lex = lexicon or _default_lexicon()
|
||||
n = _normalise(text)
|
||||
@@ -405,9 +403,7 @@ def _render(body: str, resources: list[CrisisResource], doctor_notified: str, gr
|
||||
return "\n".join(lines)
|
||||
|
||||
|
||||
def crisis_reply(
|
||||
categories: list[str], audience: Audience = "patient", *, path: Path = CRISIS_PATH
|
||||
) -> CrisisScript:
|
||||
def crisis_reply(categories: list[str], audience: Audience = "patient", *, path: Path = CRISIS_PATH) -> CrisisScript:
|
||||
"""Fixed crisis script for an ACUTE result. Never generated by the LLM."""
|
||||
cfg = _crisis_cfg(path)
|
||||
variant = f"{audience}.default"
|
||||
|
||||
Reference in New Issue
Block a user