Skip to content
MSO CloudDocumentation

mso-19 — Roadmap Agentic Decision Support: memory · provenance · evaluation · safe action

On this page

Xem trạng thái sản phẩm cho quyền tự chủ và mức bằng chứng, MSO-17 cho lịch sử từng mức. Thiết kế hạ tầng và tiêu chí nghiệm thu trên server đối chiếu roadmap này với mã nguồn tháng 11/2026.

Status: Target architecture and sequenced delivery plan — not a claim that an autonomous agent is shipped.
Owner: MSO/Decision Platform, with Security + Data Platform review.
Last verified against code: 2026-07-17.
Source of truth: this Markdown under docs/MSO-UCIP-Roadmap/; the matching HTML is generated. apps/web/docs/MSO-UCIP-Roadmap/ is a legacy asset residue, not a second roadmap.

0. Executive decision#

UCIP should become an agentic decision-support system, not an unconstrained autonomous agent.

The existing deterministic MSO engine remains the governed decision kernel: canonical numeric signals, Rule DSL, abstention, owner approval, one decision persister, first-party outcome measurement, and audit/outbox boundaries. Agents may collect evidence, form hypotheses, explain, plan, and propose typed actions around that kernel. They do not invent lift, bypass rules, write provider state directly, or create a second source of metric/decision math.

Baseline at the July 2026 review:

Capability Evidence level on 2026-07-17
Rule selection + receipt, signal registry, owner-confirmed outcomes SHIPPED
Adjacent-period pre_post readout SHIPPED descriptive measurement, not randomized causal evidence
Thompson/OPE implementation PROTOTYPE; aggregate rewards and fallback propensities do not support trustworthy OPE
Drift/champion/ledger surface FOUNDATION; linkage/completeness, not immutable replay or side-by-side policy operation
Agent memory SCAFFOLD; latest-50 lexical retrieval with no brand/validity/supersession lifecycle
Unified agent/decision/action trace NOT SHIPPED
Reliable external-action state machine PARTIAL; recovery/idempotency hardening remains
Agent evaluation and adversarial regression suite NOT SHIPPED

This classification supersedes any older "L1–L5 shipped" wording. See mso-17 for the evidence ledger.

1. Two independent ladders#

Do not use one label to express both decision sophistication and agent autonomy.

1.1 Decision evidence maturity (L0–L5)

  • L0: hard-coded numeric choice.
  • L1: versioned declarative rules and machine-generated receipts.
  • L2: named/versioned signals with stored values.
  • L3: valid incremental-effect evidence from randomized or defensible quasi-experimental design.
  • L4: policy learning with exact logging propensities, action-level rewards, offline evaluation, and safe promotion.
  • L5: immutable replay, monitored champion/challenger operation, drift/rollback, and governed continual learning.

1.2 Agent autonomy (A0–A4)

Level Agent may do Required gate
A0 · explain Read governed facts and explain an existing decision receipt Grounding + privacy evaluation
A1 · propose Assemble evidence, generate hypotheses, propose a typed decision/action draft Deterministic validation; no side effect
A2 · prepare Build a bounded plan and create an approval request Owner/admin approval; stale-context check
A3 · execute approved Dispatch only an approved, version-pinned action through the durable action worker Idempotency, attempts/receipt, timeout/DLQ, rollback preconditions
A4 · bounded auto-execute Execute low-risk actions inside explicit policy limits Production evidence, risk budget, canary, kill switch, continuous eval

Target for the next programme is A1, then A2. A3/A4 stay closed until the action state machine and production evidence gates are green.

2. Target architecture — extend existing owners#

observations / 1P facts / 3rd estimates
                  │
                  ▼
       canonical Signal Registry
                  │
     ┌────────────┴────────────┐
     ▼                         ▼
governed decision kernel   agent evidence workspace
Rule DSL · abstain · math   retrieve · hypothesize · plan
     │                         │
     └──────────┬──────────────┘
                ▼
 append-only decision episode + provenance
 evidence → memory → tool → proposal → approval → action → outcome
                │
       owner/policy approval gate
                │
                ▼
 durable typed action command → attempt/receipt/DLQ/rollback
                │
                ▼
 first-party outcome + evaluation → governed memory consolidation

Keep these owners:

Concern Existing owner to extend Forbidden parallel path
Decision math and Rule DSL packages/metrics Agent/LLM re-deriving scores or lift
Decision/outcome schema and RLS packages/schema/src/tables/mso.ts Agent-local/private decision database
Agent behavior and retrieval packages/agent A second orchestration framework before need is proven
AI provider resolution packages/ai via resolveOrgAi Provider-specific direct client
Action execution packages/actions + existing worker/outbox Web/agent calling providers directly
Telemetry existing chat tool calls + service events/logging Full prompt/result dumps by default
Causal batch evolve/quarantine apps/ml under ADR 0009 New unowned Python sidecar beside apps/ml

3. Decision episode and provenance contract#

The current mutable decisions row remains the efficient current-state projection. Reproducibility requires a separate append-only episode/event/receipt plane; a JSON snapshot alone is not an event log.

Each episode must link:

  • tenant scope: org_id, brand_id, actor/service identity;
  • one trace_id, run_id, ordered step_id, parent step;
  • observation/evidence entity IDs, source tier, source snapshot/version and content hash;
  • signal, rule, playbook, policy, model, prompt, tool and schema versions;
  • exact eligible actions, chosen action, logging probability, guardrail/abstain reason;
  • input/output hashes and deterministic receipt for canonical math;
  • approval identity/time and the context version approved;
  • action command, every attempt, provider receipt/idempotency key and terminal result;
  • outcome window, late-data cutoff, reward/verdict, owner confirmation;
  • generated_from, derived_from, revised_from, supersedes relations.

Map the vocabulary to W3C PROV-O: evidence/snapshots are Entity, evaluation/action/retrieval steps are Activity, people/services/models are Agent, and derivation/revision/attribution stay explicit. UCIP need not store RDF; the mapping prevents an ad-hoc provenance dialect.

Replay means: load the frozen input receipt → rerun the canonical owner → compare output hash and reason codes. "All links exist" is a completeness audit, not replay.

Approval gate: these are new org/brand-scoped tables and RLS policies. Per repository policy, implementation stops for operator approval before schema/RLS editing.

4. Memory architecture and lifecycle#

Memory is governed data, not a growing transcript. Use explicit classes inspired by CoALA, while keeping storage simple until evaluation proves a vector index is needed.

Memory class UCIP purpose Write policy Retrieval policy
Working Current task evidence/plan Ephemeral; run-scoped; never promoted automatically Current run only
Episodic A decision episode: context→action→outcome Append after a terminal/meaningful event; provenance required Similar brand/problem/time, with temporal filtering
Semantic Stable facts/definitions learned across episodes Consolidation job proposes; conflict/dedup check; owner/policy approval for sensitive facts Valid-at query, confidence + source shown
Procedural Versioned playbooks, tool policies, operating instructions Existing rule/version review path only Exact version; never fuzzy overwrite
Decision Approved choices, receipts, outcomes, lessons Existing MSO owner-confirmed path + append-only event By decision/episode and outcome status

Every durable memory record requires: org and brand scope where relevant; subject/purpose; source and hash; confidence; valid_from/valid_to; expiry/retention; supersession/conflict links; sensitivity/PII class; created-by/version; and deletion/legal-hold behavior.

Current agent_semantic_memory.embeddingStub and latest-50 lexical rank are a scaffold. First add lifecycle, provenance, temporal correctness, conflict handling, deduplication and evaluation. Add embeddings/vector infrastructure only if a measured retrieval benchmark beats the lexical baseline without cross-tenant/privacy regression. Long-term tests should cover extraction, multi-session reasoning, temporal updates, abstention and stale/conflicting knowledge, following the problem categories in LongMemEval.

Memory writes from untrusted content are quarantined proposals, not trusted facts. Tool/web output cannot grant authority or modify procedural memory.

5. Learning and causal evidence contract#

The system may learn only from records that support the claimed estimator.

5.1 Evidence hierarchy

  1. Descriptive: adjacent pre/post, correlations, trend diagnostics. Useful for hypotheses; label confounding.
  2. Quasi-experimental: interrupted time series/BSTS, matched controls, difference-in-differences, geo designs with falsification/placebo/sensitivity checks.
  3. Randomized: user/geo/cluster holdout or switchback with eligibility, assignment, contamination and sample-ratio-mismatch checks.
  4. Policy learning: exact context/action/reward/logging probability plus delayed-outcome and missingness policy.

The current pre_post path stays in level 1. holdout/geo enum values are declarations, not evidence that those designs ran.

5.2 OPE and promotion

Doubly robust OPE requires historical context, action, reward, and a valid logging policy/propensity (see Dudík, Langford & Li). Fixed fallback propensities and aggregate brand outcome counts cannot authorize a policy promotion.

Before L4 promotion:

  • log the eligible set and exact selected-action probability at decision time;
  • define one action-level incremental reward and late-data cutoff;
  • check overlap/support, effective sample size and weight tails;
  • compare IPS/SNIPS/DR with confidence intervals and sensitivity;
  • run the candidate in shadow, then a bounded traffic split;
  • record promotion/rollback as a versioned decision episode.

6. Safe action execution#

An agent emits a typed proposal, never a provider call. The approved path is:

proposal → policy/role check → approval with context hash
→ durable action_command → compare-and-set claim
→ append-only attempt → provider idempotency key/receipt
→ success | retry | DLQ/manual recovery → outcome/rollback event

Required before A3:

  • unique scoped idempotency contract;
  • append-only attempts and provider receipts;
  • state transition compare-and-set and stale-approval rejection;
  • timeout, retry/backoff, terminal DLQ and manual recovery;
  • role/risk threshold enforced inside the domain owner, not only the router/UI;
  • crash-after-provider-call recovery and connector idempotency propagation;
  • rollback preconditions that never overwrite history;
  • concurrency tests for duplicate, stale and out-of-order delivery.

7. Evaluation, observability and privacy#

Follow the NIST AI RMF functions — Govern, Map, Measure, Manage — with explicit human roles, TEVV, feedback/appeal and continual monitoring (NIST AI RMF Playbook).

7.1 Versioned evaluation suites

Each task fixture records dataset/version, model/prompt/tool/policy versions, complete trace, expected outcome, allowed side effects and deterministic/rubric graders. Run multiple trials for stochastic behavior.

Minimum suites:

  • numeric grounding and receipt fidelity;
  • correct tool choice/arguments and no placeholder tool execution;
  • memory retrieval usefulness, temporal update, conflict and abstention;
  • prompt injection/memory poisoning/untrusted tool output;
  • tenant/brand isolation and sensitive-data redaction;
  • approval bypass, privilege cascade, stale context and destructive action;
  • tool timeout, partial failure, crash recovery, retry and duplicate delivery;
  • model/prompt regression, latency/cost budgets and calibrated human review.

Offline results gate releases; online shadow/canary telemetry detects drift. A good final answer is insufficient if the trace used wrong evidence or an unsafe step.

7.2 Trace vocabulary

Use a version-pinned subset of OpenTelemetry semantic conventions for agent invocation, plan, tool, retrieval/memory, evaluation and error spans. The GenAI conventions evolve; pin the adopted version and keep an internal compatibility map.

Default telemetry records IDs, versions, timings, token/cost counts, status and hashes — not full prompts, retrieved customer data or tool results. Content capture is opt-in, redacted, purpose/retention-bound and tenant/brand scoped.

8. Sequenced roadmap#

NOW — truthful foundation (documentation/code without protected schema changes)

  • Make mso-17 the evidence ledger and remove causal/OPE/replay overclaims.
  • Align lifecycle names with schema: proposed → approved → activated → measured; confirmed_* belongs to outcome/lesson metadata, not decision status.
  • Label legacy HTML concept/demo artifacts as historical where they contain superseded status.
  • Quarantine apps/ml as experimental and resolve ADR 0009 around that existing owner.
  • Remove credentials from roadmap docs; credentials live only in scripts/CREDENTIALS.md.

Done when: docs have explicit SHIPPED/PROTOTYPE/PLANNED labels, generated HTML matches Markdown, link/status audits pass, and no current doc calls pre/post causal or completeness replay.

NEXT — approval-required platform foundation

  1. Append-only decision episode/provenance schema and deterministic replay receipt.
  2. Memory lifecycle fields, brand scope, dedup/conflict/supersession and deletion policy.
  3. Reliable action attempt/receipt state machine.
  4. Unified trace correlation from chat/agent → decision → outbox → worker → provider → outcome.
  5. Versioned agent evaluation harness and frozen adversarial fixtures.

Done when: replay reruns and hash-compares canonical math; cross-brand and poisoned-memory tests fail closed; action crash/duplicate/stale-approval tests recover; content-free traces correlate end-to-end.

LATER — evidence-gated intelligence

  1. Real randomized holdout/geo/switchback designs with power, balance, SRM, contamination and late-data checks.
  2. Accepted ADR 0009 plus locked/tested causal batch in the existing Python owner; shadow only at first.
  3. Exact propensity/action reward logging; then trustworthy OPE and shadow policy candidates.
  4. Side-by-side champion/challenger deployment with versioned promotion/rollback.
  5. A3, then narrowly bounded A4 only after production SLO/security/eval evidence.

9. Explicit non-goals#

  • No new agent framework because "agentic" is fashionable.
  • No autonomous pricing/campaign/provider mutation before A3 gates.
  • No LLM-generated numbers, lift, propensity or causal claims.
  • No vector database before retrieval evaluation proves need.
  • No synthetic oracle presented as causal ground truth.
  • No full prompt/tool-result logging by default.
  • No memory consolidation/reflection that can silently turn untrusted text into policy.

10. Delivery evidence template#

Every agentic capability change records:

Owner / reviewer:
Status: SHIPPED | PROTOTYPE | PLANNED | BLOCKED
Threat model / approval:
Canonical owner changed:
Dataset + fixture version:
Model / prompt / tool / policy versions:
Commands and exact pass/fail counts:
Replay / recovery / isolation evidence:
Online shadow/canary evidence:
Rollback / kill switch:
Known limitations and forbidden claims:

Related: mso-13 — decision spec · mso-17 — evidence status · mso-18 — DSS alignment · ADR 0004 · ADR 0009 · CLAUDE.md §§60–66.