Server-served operating context: CPersona can now carry the operating doctrine itself (project_id registry, agent_id conventions, recall discipline) instead of every client re-deriving it from local prose.
Added
- Operator-owned TOML sidecar (
cpersona/operating_context.py) at~/.cpersona/operating-context.toml, with aCPERSONA_OPERATING_CONTEXT_PATHoverride and aCPERSONA_OPERATING_CONTEXT=offkill switch. Lazy mtime-based reload. An absent or invalid file degrades to fully dormant — a config typo can never take memory down. - Soft layer:
instructions.summaryrides the MCPinitializeresponse through a newToolRegistry(instructions=...)kwarg, so a connecting client receives the doctrine as part of the handshake. - Hard layer: a boundary gate on the six
project_id-accepting tools — registry validation (off/warn/reject) plus an opt-in@autosentinel resolved from[defaults], echoed back asresolved_project_id. Reads warn even underreject(damage asymmetry: a bad read is recoverable, a misfiled write is not). Explicit values are never rewritten, omitted /""semantics are untouched, and library callers bypass the gate by design. get_operating_context— a new read-only tool (28 → 29). The write path stays the filesystem: there is deliberately no MCP write tool for operator config.- check_health: additive
operating_context_parse(warn) andoperating_context_size(info, 3,000-char budget) registry entries.
Contract
No DB schema change. No breaking change: the tool surface is additive (one new tool, additive response fields), consistent with the 2.5.x line declaration in SUPPORT.md. The feature is entirely dormant until an operator creates the sidecar.
Verification
430 passed / 5 skipped, ruff clean, issue registry 110 verified / 0 stale / 0 errors. Full CI green on master before tagging.
Design: docs/OPERATING_CONTEXT_DESIGN.md.