BLUX Doctrine + Clarity Agent Architecture
- Runtime:
ca/runtime/agent.pyorchestrates routing, governance (Doctrine), guard labeling, Lite planning, and LLM generation with safety overrides. - Safety:
ca/safety/risk.pyandca/safety/protocols.pydetect crisis/violence cues and override with safe responses before any model output. - Governance: Doctrine engine (
doctrine/engine.py) loads rule bundles fromdoctrine/rules/and produces allow/warn/block decisions with trace IDs. - Clarity Layer:
ca/clarity/compass.pyclassifies user state;ca/clarity/structure.pyenforces structured replies;ca/clarity/mirror.pyoffers reflective prompts. - Recovery:
ca/recovery/support.pyandca/recovery/prep.pyprovide non-clinical coping plans and counselor-ready summaries. - LLM Backends:
ca/llm/local.pyandca/llm/api.pyimplement pluggable model stubs viaca/llm/base.py. - Integrations: Stubs for Lite/Guard/Doctrine live under
ca/integrations/for future deep coupling without breaking current APIs.