Implement PMEM-WP-0016 ops-warden cross-runtime memory contracts.

Add ops-warden coordination profile, session event schemas, activation helpers,
adapter pack, evaluation scenarios, and contract documentation for shared memory
across worker, agent session, and operator CLI surfaces.
This commit is contained in:
2026-07-02 23:40:45 +02:00
parent 1c3fa03533
commit dc699be976
9 changed files with 891 additions and 8 deletions

View File

@@ -0,0 +1,46 @@
{
"schema_version": "markitect.memory.profile.v1",
"id": "ops-warden-coordination",
"title": "Ops-Warden Coordination Memory",
"intent": "Retain routing, coordination, escalation, and pilot-feedback episodes across worker, agent session, and operator CLI runtimes.",
"memory_kinds": ["reasoning", "conversation", "knowledge", "package"],
"stores": {
"reasoning": "local-graph-store",
"conversation": "local-event-log",
"knowledge": "local-graph-store",
"package": "markitect-context-package"
},
"limits": {
"reasoning": {"max_nodes": 200},
"conversation": {"max_nodes": 100},
"package": {"max_items": 8}
},
"retention": {
"conversation": {"stale_after_days": 14, "delete_after_days": 90}
},
"refresh": {
"trigger": "routing-catalog-or-playbook-change"
},
"compaction": {
"strategy": "summarize-coordination-thread-after-review"
},
"activation": {
"max_items": 8,
"max_tokens": 2000
},
"policy": {
"required_labels": ["coordination-local"],
"durable_writes": "review-gated",
"secrets_allowed": false
},
"observability": {
"emit_events": true
},
"failure": {
"missing_runtime_store": "degrade-to-dry-run"
},
"metadata": {
"rigid_import_only": ["charter", "action_allowlist"],
"runtime_modes": ["warden.worker", "warden.operator", "warden.agent.*"]
}
}

View File

@@ -0,0 +1,31 @@
{
"schema_version": "phase_memory.evaluation.scenarios.v1",
"scenarios": [
{
"id": "ops-warden-routing-repeat",
"events": [
{"session_kind": "warden.agent.grok", "command": "route find", "need_fingerprint": "abc123", "route_id": "openbao-api-key", "outcome": "resolved"},
{"session_kind": "warden.agent.grok", "command": "route find", "need_fingerprint": "abc123", "route_id": "openbao-api-key", "outcome": "resolved"},
{"session_kind": "warden.worker", "command": "worker run", "need_fingerprint": "abc123", "route_id": "openbao-api-key", "outcome": "resolved"}
],
"expect": {"stabilized": true, "continuity": true}
},
{
"id": "ops-warden-cross-runtime-continuity",
"events": [
{"session_kind": "warden.agent.claude", "command": "route find", "outcome": "resolved"},
{"session_kind": "warden.worker", "command": "worker run", "outcome": "escalated"}
],
"expect": {"continuity": true}
},
{
"id": "ops-warden-llm-avoidance",
"events": [
{"session_kind": "warden.operator", "command": "route find", "need_fingerprint": "def456", "route_id": "ops-bridge-tunnel", "outcome": "resolved"},
{"session_kind": "warden.operator", "command": "route find", "need_fingerprint": "def456", "route_id": "ops-bridge-tunnel", "outcome": "resolved"},
{"session_kind": "warden.worker", "command": "memory.activate", "outcome": "resolved", "metadata": {"llm_calls_avoided": true}}
],
"expect": {"llm_calls_avoided": true}
}
]
}

View File

@@ -24,6 +24,7 @@
"FakeKontextualRuntimeRegistry",
"FakeMarkitectPackageCompiler",
"FakeTelemetryAuditSink",
"KNOWN_AGENT_IDS",
"LIVE_PILOT_REPORT_SCHEMA",
"LifecycleAction",
"LifecycleActionKind",
@@ -52,6 +53,13 @@
"MemoryPath",
"MemoryPathState",
"MemoryPhase",
"OPS_WARDEN_ACTIVATION_SCHEMA",
"OPS_WARDEN_ADAPTER_PACK_NAME",
"OPS_WARDEN_MEMORY_STATUS_SCHEMA",
"OPS_WARDEN_PROFILE_ID",
"OPS_WARDEN_RUNTIME_SCHEMA",
"OPS_WARDEN_SESSION_EVENT_SCHEMA",
"OpsWardenMemoryStore",
"OptionalMarkitectValidator",
"PHASE_MEMORY_CREDENTIAL_NEEDS",
"POLICY_OPERATION_POINTS",
@@ -77,10 +85,12 @@
"WARDEN_ROUTE_FIND_QUERY",
"WordCountTokenEstimator",
"abandon_path",
"activate_ops_warden_memory",
"activation_quality_report",
"adapter_pack_manifest",
"branch_path",
"build_service_binding",
"build_session_event",
"compact_path",
"create_path",
"create_wsgi_app",
@@ -88,6 +98,7 @@
"credentialed_drill_config_from_env",
"credentialed_operator_report",
"credentialed_telemetry_retention_drill",
"default_memory_store_path",
"evaluation_threshold_report",
"evaluation_trend_artifact",
"evaluation_trend_history",
@@ -102,9 +113,14 @@
"make_review_record",
"managed_deployment_manifest",
"managed_deployment_pilot_report",
"memory_enabled",
"merge_path",
"missing_credentialed_adapter_env",
"operator_troubleshooting_matrix",
"ops_warden_adapter_pack",
"ops_warden_coordination_profile",
"ops_warden_evaluation_metrics",
"ops_warden_evaluation_report",
"package_request_from_selection",
"package_response_envelope",
"path_event",
@@ -119,17 +135,23 @@
"plan_retention",
"plan_retention_from_rules",
"profile_from_markitect",
"record_session_event",
"resolve_credentialed_environ",
"resolve_runtime_adapters",
"resolve_session_kind",
"retrieve_graph_neighborhood",
"runtime_from_config",
"select_event_path",
"service_app_metadata",
"service_binding_from_config",
"service_contracts",
"session_kind_for_agent",
"stabilized_route_match",
"validate_adapter_pack_manifest",
"validate_managed_deployment_manifest",
"validate_memory_write",
"validate_operator_troubleshooting_matrix",
"validate_ops_warden_profile",
"warden_access_advisory",
"warden_cli_available",
"warden_credential_routing_advisory",