Skip to main content

DOSSIER I · The Agentic Organization (Entry 02 of 05)

An AI Governance Framework in Code, Not Slide Decks

Build an AI governance framework in code: a 15-module NIST PR spine, Cedar policy narrowing, sub-250ms pre-flight guards, and a 7-stage board assurance DAG.

10 min read

By Dakota Smith

Share article

XLinkedIn
On this page6 parts

Architectural scope

Two-layer executable governance pairing sub-minute CI catalog checks and Cedar policy narrowing with a $50-capped, 7-stage executive assurance DAG.

Cadence
10 min read
Structure
6 sections · 2 code specimens

A forty-page policy PDF has never stopped an unreviewed shell script, an over-scoped API TokenA chunk of text — roughly three-quarters of a word. The unit the model reads and bills in.The fragments a model breaks text into. Around 100 tokens ≈ 75 English words. Limits and pricing are counted in tokens, not words or characters.Full definition, or an unvetted executive pilot from reaching production. For an anonymized enterprise consultancy, I built our AI governance framework as deterministic repository checks, WebAssembly policy evaluators, and stage-gated assurance pipelines rather than a slide deck.

Once an org-wide AI adoption strategy gains traction, organizational risk splits across two distinct surfaces. Bottom-up, technical and consulting practices ship skills, hooks, subagents, and MCPUSB-C for AI — one standard plug so any agent can connect to any data source or tool.The Model Context Protocol: an open standard (Anthropic, 2024) for connecting AI systems to external tools and data without building a custom integration for each one.Full definition connectors faster than any architecture board can read by hand. Top-down, leadership fields dozens of internal and client AI proposals that vary wildly in commercial merit and regulatory exposure. Without an automated AI governance framework covering both directions, teams ship shadow-IT plugins in Slack while committees fund dead-end pilots.01 · Dual SpineCommit-time CI checks police bottom-up repository extensions in under sixty seconds, while a stage-gated DAG filters top-down portfolio bets.

Here is the two-layer governance architecture we shipped: a 15-module pull-request spine with hierarchical Cedar policy narrowing and client disclosure ledgers, paired with sub-250ms runtime pre-flight guards and a 7-stage board assurance pipeline.

PLATE 03TWO-LAYER GOVERNANCE SPINE
REV 2026.11 // COMMIT + BOARD GATES

Executable Governance Across Pull Requests and Portfolio Intake

Two parallel horizontal governance tracks: Track A shows commit-time catalog CI gates from 4 blast-radius tiers through manifest capability checks, Cedar policy narrowing, and byte-exact SHA provenance; Track B shows the 7-stage executive opportunity assurance pipeline from dual-persona intake filter through scouting, dual-critic cross-family red-team, NIST/ISO scoring, and a $50-capped human approval gate.

TRACK A · PULL-REQUEST ARTIFACT SPINE (SUB-60S CI)

15 NIST RMF Modules Compiled Into Repository Validators

  1. A1

    Blast-Radius Tiering

    Tier 1 docs -> Tier 4 subagents & MCP

  2. A2

    Capability & Cedar Law

    Agency -> Client -> Project narrowing

  3. A3

    Eval & Digest Lock

    0.85 trigger floor + script SHA-256

  4. A4HARD GATE

    OIDC + Drift Gate

    Zero manual edits to registry output

TRACK B · STAGE-GATED BOARD ASSURANCE PIPELINE

NIST AI 600-1 · ISO/IEC 42001 · EU AI Act Art. 50 · $50 Hard Cap

  1. B1

    Dual-Persona Intake

    Short-circuits non-viable ideas early

  2. B2

    Frame & Recon Scout

    Structured thesis + threat scan

  3. B3

    Dual-Critic Red-Team

    Gov + Commercial + cross-family judge

  4. B4HARD GATE

    Human Board Sign-Off

    Sealed 8-section assurance packet

AUDIT LEDGER: Every merged extension and approved initiative emits a hash-chained provenance receipt and client AI-usage disclosure record.

PLATE 03: Governance holds when commit-time CI gates police artifact capabilities automatically and stage-gated adversarial review filters executive portfolio bets before compute or client trust is spent.

Layer 1: Compiling NIST Into a Pull-Request AI Governance Framework

Policy binders fail builders because they state abstract goals ("ensure appropriate human oversight") without defining what passes or blocks git push. To make the NIST AI Risk Management Framework executable, we mapped its four functions — alongside an 11-module internal consulting governance playbook — into 15 focused validation modules bound directly to pull-request CI.

NIST FunctionSpine ModulesDeterministic CI Enforcement
1 · GovernModules 01–04: named practice owner, blast-radius tier, data classification, exception sign-off.Manifests fail lint without an active owner handle, explicit tier (tier-1 to tier-4), and data boundary.
2 · MapModules 05–08: artifact taxonomy, PII/PHI exclusions, capability declarations, model & MCP inventory.Tool schemas enumerate filesystem, network, and external write permissions in typed metadata.
3 · MeasureModules 09–12: static quality gates, secret/injection rules, trigger selectivity floor, SHA-256 digests.CI enforces a 0.85 skill trigger hit-rate floor, scans scripts, and locks bundled file hashes.
4 · ManageModules 13–15: human release gates, credential revocation, kill-switches, hash-chained audit logs.Tier 4 artifacts block merge without security codeowner sign-off and a tested rollback runbook.

Uniform review kills velocity when a Markdown checklist faces the same ceremony as a database-connected AgentA worker you delegate to: brief it, and it takes steps on its own. A chatbot answers; an agent acts.An LLM that runs tools in a loop toward a goal — it acts, checks the result, decides the next step, and repeats until done.Full definition. Separating extensions into four explicit blast-radius tiers kept daily sharing fast:

  • Tier 1 · Reference playbooks and checklists: Pure Markdown guidance with zero code execution. Automated schema, secret, and PII checks clear the pull request in seconds without human gatekeeping.
  • Tier 2 · Skills and slash commands: Structured instructions steering model behavior and context budgets. Checked for system-prompt hygiene, token caps, and 0.85 trigger selectivity — the same V1–V14 compiler gates inside skillsmith.
  • Tier 3 · Hooks and bundled scripts: Deterministic scripts running around tool invocations. Every script declares its interpreter, network posture, and exact SHA-256 digest in the catalog manifest.
  • Tier 4 · Subagents and MCP connectors: Delegated multi-turn loops and external system bridges. Governed by strict agent permission architecture, scoped OIDC credentials, and mandatory security-owner review.

Catalog integrity also depended on supply-chain and audit discipline borrowed straight from our compiled agentic system. Registry manifests compiled deterministically from validated source directories, plugin versions pinned immutable Git commit SHAs, OIDC tokens gated publishing, and a byte-exact drift check failed any manual edit to generated outputs.

Hierarchical Cedar Policy and Client Disclosure Ledgers

Writing "never mutate production records" inside a system PromptThe brief. Closer to writing instructions for a new contractor than to programming.The text you give the model — question, instructions, context. Its quality shapes the quality of the output.Full definition is a wish, not a security boundary. Prompts guide probabilistic generation; manifests and policy engines define what is physically permitted to execute.

Across client engagements, static repo checks needed to compose with account-specific Master Services Agreements. A healthcare client may ban external model retention completely, while a retail client permits non-production branch creation under human review. We modeled those boundaries as monotonic hierarchical policy layers (Agency -> Client -> Engagement -> Project) evaluated in under one millisecond via in-process Cedar WebAssembly (@cedar-policy/cedar-wasm).02 · Monotonic LawDownstream engagement or project policies can narrow permissions further, never re-grant a capability forbidden by the agency or client layer.

policy/cedar-narrowing-gate.ts
// Child scopes (Engagement -> Project) can narrow rules, never override a parent forbid
export interface PolicyEvaluationContext {
  readonly riskTier: 'tier-1' | 'tier-2' | 'tier-3' | 'tier-4';
  readonly externalWrite: boolean;
  readonly promptInjectionRiskPct: number;
  readonly blastRadiusScore: 0 | 1 | 2 | 3 | 4;
  readonly hasNamedHumanApproval: boolean;
}
 
export function enforceHierarchicalBoundary(ctx: PolicyEvaluationContext): string[] {
  const violations: string[] = [];
  if (ctx.externalWrite && (ctx.riskTier !== 'tier-4' || !ctx.hasNamedHumanApproval)) {
    violations.push('externalWrite requires tier-4 classification and named human sign-off');
  }
  if (ctx.promptInjectionRiskPct >= 35 || (ctx.blastRadiusScore >= 3 && !ctx.hasNamedHumanApproval)) {
    violations.push('Cedar forbid: elevated injection score or unapproved high-blast action');
  }
  return violations;
}

Enterprise clients also ask a commercial question that most engineering teams cannot answer: where did AI touch our billable deliverables, and who reviewed it? Pairing hierarchical Cedar rules with an append-only token, duration, and reviewer ledger let the control plane generate Client AI-Usage Disclosure Reports automatically. Every deliverable carried verifiable evidence showing model tier, store: false zero-retention enforcement, exact commit checks, and the named engineer who approved final disposition.

Two-Speed Pre-Flight Guardrails at the Runtime Boundary

Commit-time CI validates static definitions, yet a read-only MCP tool can still ingest adversarial text from a third-party ticket or legacy database field at runtime. Traditional runtime guardrails force an ugly trade: brittle regexes miss semantic attacks, while routing every prompt through a frontier LLMSophisticated autocomplete — the same idea as your phone guessing the next word, trained on far more text and far better at it.A "large language model": software that predicts the most likely next chunk of text from patterns it learned in training. It generates language; it does not look things up.Full definition adds seconds of latency and doubles token spend.

Placing a stateless two-speed shield gateway between agent sessions and downstream tools eliminated that tradeoff:

  1. Stage A · Sub-250ms closed-world pre-flight: Before invoking stateful reasoning or external MCP tools, a single forward-pass classifier evaluates prompt-injection intent, unredacted SSNs/PHI or live API keys, operational blast radius (0..4), and the minimum viable model tier in 150 to 250 milliseconds with zero generative output tokens billed.
  2. Stage B · Sub-millisecond Cedar authorization and secret brokering: Deterministic Cedar policies consume those pre-flight scores immediately. Execution sandboxes hold only short-lived capability tokens; when an authorized call crosses the boundary, the gateway injects Entra ID or Key Vault credentials on the outbound wire, strips sensitive headers on return, and signs an Ed25519 provenance receipt.

Layer 2: A Seven-Stage Board Assurance Pipeline Under $50

Governing bottom-up code artifacts solved half the problem. Executive leadership still needed a repeatable AI governance framework to evaluate internal product bets and client proposals without creating a six-week committee bottleneck or rubber-stamping hype.

We encoded portfolio governance as a seven-stage multi-agent DAG (/opportunity:run "<idea>"). The orchestrator enforces typed schemas between stages, an append-only audit log, a deterministic $50 per-opportunity hard cost ceiling (running a full 60-day portfolio pilot under $250), and a code-enforced human sign-off gate before any recommendation reaches the governance committee.03 · Cross-Family JudgeArbitrating Governance and Commercial red-team critics with a judge from a separate model vendor blocks self-preference bias.

  • Stage 0.5 · Dual-persona intake filter: Evaluates raw proposals through AgenticThe adjective for "acts like an agent" — multi-step and self-directed, not one question and one answer.Describes AI that plans and takes a sequence of actions with some autonomy, adapting as new information comes back.Full definition-product and enterprise-platform lenses, routing each to Client, Internal, Both, or Neither. Proposals classified as Neither halt immediately before burning external research tokens.
  • Stages 1–2 · Structured frame and recon scout: Converts surviving intake notes into a falsifiable concept brief before launching isolated competitive, adjacency, and threat reconnaissance.
  • Stage 3 · Dual-critic adversarial red-team: Pits an adversarial Governance critic against a Commercial critic, scored by a cross-model-family judge so no model family grades its own blind spots. The red-team populates a 12-category NIST AI 600-1 Generative AI risk register directly in the packet.
  • Stages 4–5 · Weighted rubric and sealed decision package: Applies hard compliance screens and portfolio quadrant weights, then compiles an 8-section Board decision packet mapped automatically to NIST AI RMF, ISO/IEC 42001 AIMS controls, EU AI Act Article 50 disclosure triggers, and all 11 internal playbook modules.
assurance/opportunity-pipeline-gate.ts
export interface OpportunityRunState {
  readonly route: 'client' | 'internal' | 'both' | 'neither';
  readonly accruedCostUsd: number;
  readonly proposerFamily: 'anthropic' | 'google' | 'openai';
  readonly judgeFamily: 'anthropic' | 'google' | 'openai';
  readonly nist600RisksMapped: number;
  readonly committeeHumanApprover?: string;
}
 
export function assertBoardReadiness(run: OpportunityRunState): void {
  if (run.route === 'neither') throw new Error('Halted at Stage 0.5: non-viable intake route');
  if (run.accruedCostUsd > 50) throw new Error('Halted: exceeded $50 deterministic run ceiling');
  if (run.proposerFamily === run.judgeFamily) {
    throw new Error('Red-team judge must belong to an independent model family');
  }
  if (run.nist600RisksMapped < 12 || !run.committeeHumanApprover) {
    throw new Error('Board packet requires 12 NIST AI 600-1 mappings and named human sign-off');
  }
}

Encoding executive review as a $50-capped pipeline changed leadership conversations immediately. Sponsors stopped pitching polished slide decks and started bringing red-teamed assurance packets with explicit failure modes, cost bounds, and regulatory traces already attached.

Tradeoffs, Failure Modes, and When Not to Build This

Compiling an AI governance framework into CI checks, Cedar policies, and stage-gated DAGs removes manual bottlenecks, yet it introduces real engineering obligations.

Noisy linters create Slack shadow markets. When early security patterns flagged benign SQL snippets inside documentation skills, practitioners shared raw Markdown files in private channels rather than fighting false positives. Repository gates must finish in under sixty seconds, cite the exact offending field, and offer a documented exception workflow with named sign-off.

Cross-family judging doubles integration surface. Enforcing model-family diversity in Stage 3 red-teaming prevents self-preference bias, and it also means maintaining normalized schemas, fallback quotas, and zero-retention contracts across at least two frontier providers.

Policy schemas require versioned migrations. Tightening a manifest rule or Cedar entity schema across 127 skills requires coordinated codemods and lockfile regeneration. Governance-as-code is production software and needs an explicit maintenance owner.

When NOT to use this approach: Skip a 15-module NIST spine, Cedar WASM narrowing, and a 7-stage board assurance DAG if you are a solo developer or a six-person startup shipping inside a single repository. At small team scale, GitHub CODEOWNERS, secret scanning, read-only MCP tokens, and a one-page architecture brief provide strong guardrails without maintaining a policy platform.

Conclusion

An AI governance framework succeeds when the safest path is also the fastest path to ship. Combining sub-minute pull-request checks, monotonic Cedar policy narrowing, sub-250ms runtime pre-flight guards, client AI-usage disclosure ledgers, and a $50-capped board assurance DAG turned compliance from a quarterly brake into continuous engineering assurance.

Key Takeaways:

  • Govern both directions in code: Pair bottom-up CI artifact gates with a top-down stage-gated assurance pipeline so neither shadow plugins nor unvetted pilots slip through.
  • Tier ceremony by blast radius: Let Tier 1 playbooks merge on sub-minute automated checks while requiring security review and human gates on Tier 4 subagents and external writes.
  • Narrow policy monotonically: Evaluate Agency -> Client -> Engagement -> Project rules in deterministic Cedar WASM and emit Client AI-Usage Disclosure Reports from append-only ledgers.
  • Separate fast triage from deep reasoning: Run 150–250ms zero-output-token pre-flight checks for injection, PII, and blast radius before opening stateful agent turns.
  • Eliminate self-grading in portfolio review: Cap opportunity assurance runs at $50, short-circuit non-viable ideas at intake, and enforce cross-model-family red-team judges mapped to NIST AI 600-1 and ISO/IEC 42001.

With catalog distribution and executable governance in place, continue to Agentic Engineering: From Solo Copilots to Governed Fleets to see how day-to-day software delivery operates across a five-plane engineering foundry.

DOSSIER I · ENTRY 02 OF 05

The Agentic Organization

How an engineering practice moves from idle seat licenses to dual-surface distribution, CI-enforced governance, and accountable agent fleets.

Security & Governance Pillar
  1. 01An AI Adoption Strategy That Works Without a Terminal9 min read
  2. 02An AI Governance Framework in Code, Not Slide DecksReading now
  3. 03Agentic Engineering: From Solo Copilots to Governed Fleets9 min read
  4. 04AI Isn't Just for Coders: How Claude Skills Bridge the Gap7 min read
  5. 05Claude Skills for Power Users: Scripts, Teams, and Architecture9 min read

Further analysis

Selected by shared architectural signals and recent publication history.

  1. 01AI14 min read

    The AI Dev Tools I Built in 2026: 58 Builds, Five Shifts

    Trace 58 AI dev tools I built across 70 workspaces in 2026 — from early agent loops to DXP ontologies, fleet worktrees, FinOps gateways, and signed proof.

  2. 02AI9 min read

    Agentic Engineering: From Solo Copilots to Governed Fleets

    Trace the four-stage shift to agentic engineering — from IDE chat to durable worktree fleets, a five-plane foundry, and exact-candidate delivery authority.

  3. 03AI14 min read

    The Agent Delivery Harness: An Opinionated Multi-Model Layer

    An agent delivery harness turns human intent, experience, and judgment into accountable, evidence-bound decisions across one or more model runtimes.

Discussion

Loading comments...