Agent Governance Memory

Feed accepted/rejected edits, validation failures, proof loops, deploy certificates, white-label decisions, and recipe handoffs into routing, evaluations, and moat scoring


Agent Governance Memory

Agent Governance Memory is the deterministic memory layer that turns CODE and REFORM outcomes into product intelligence. It does not store raw source code, secrets, prompts, or personal data. It stores decision metadata, risk signals, proof references, and score rollups that downstream systems can use safely.

What It Captures

  • Accepted and rejected edits from the privacy-safe outcome ledger.
  • Validation failures, blocked proposals, fix-forward outcomes, policy overrides, and deploy outcomes.
  • CODE proof-loop state for Git branch, commit, PR, preview, validation, deploy certification, rollback, and report history.
  • Deploy certificates, warnings, blockers, smoke-test posture, and rollback posture.
  • White-label reform decisions, blocked attribution/license guardrails, and review-required rename plans.
  • Reform recipe handoffs, selected recipes, missing inputs, risk flags, and recipe fit scores.

What It Feeds

  • Model routing: high-risk governance memory increases quality and accepted-outcome weighting while reducing cost/latency preference for risky tasks.
  • Continuous Evaluation CI: governance memory appears in the CI report and can become release-blocking when deploy blocks, validation failures, or severe blocked rates are active.
  • Leadership Moat: governance memory is a proof asset in autonomous governance and outcome learning, making the moat depend on shipped outcomes instead of static product claims.

Privacy Contract

The report intentionally keeps only:

  • decision IDs
  • source system names
  • decision status and risk level
  • model-router task hints
  • score/count rollups
  • hash-safe session/proposal references
  • proof metadata such as Git proof count and deploy certificate status

It excludes raw files, raw code, raw prompts, secrets, local paths, customer data, and personal identity fields.

Implementation Contract

  • The deterministic engine lives in lib/governance/agent-memory.ts.
  • Public exports live in lib/governance/index.ts.
  • Model routing consumes governanceMemory through routeAgentModel and routeAgentPipelineModels.
  • Continuous Evaluation CI accepts governanceMemory and renders a Governance Memory section in Markdown output.
  • Leadership Moat accepts governanceMemory and adds the agent-governance-memory proof asset.
  • Focused tests live in __tests__/lib/governance/agent-memory.test.ts, __tests__/lib/agents/model-router.test.ts, __tests__/lib/evaluation/continuous-ci.test.ts, and __tests__/lib/moat/leadership-moat.test.ts.

Operating Rule

If an agent outcome fails, gets rejected, blocks validation, fails deploy certification, or needs white-label/recipe review, that outcome should improve the next routing/evaluation/moat decision. ReformCode should get safer and more decisive with every governed work loop.