The AI Production Framework.
The operating system I use when a team is betting real money on AI. Cloud-agnostic doctrine, with a production-tested reference implementation. The architectural adult in the room, written down.
Traditional software is deterministic. Agentic AI is probabilistic. Production systems have to account for that shift architecturally, not aspirationally.
Most teams shipping AI today treat the model as the system. They wire an LLM call into a request handler, sprinkle a guardrail on the input, and ship. Then the agent gets prompt-injected, the cost graph hockey-sticks, the audit team asks for a replay log that doesn't exist, and the whole thing quietly gets sunset.
This framework is the opposite posture. The model is one untrusted component inside a deterministic envelope. Routing is infrastructure. Memory is typed and scaffolded. Prompts are versioned artifacts. Permissions are architectural. Evaluation gates deployment. Every decision is replayable. Cost is a circuit breaker.
It's the document I wish I'd been handed the first time I got pulled into a Series B that had spent eighteen months building an AI feature nobody could explain to the board.
Three layers. Ten pillars.
Each pillar lives inside one structural layer. Each layer answers a different question.
Design Doctrine
The non-negotiable architectural rules that govern probabilistic systems running inside deterministic infrastructure.
Risk Control
The threat model and the defenses. Security, privacy, reliability, governance, transparency, and fairness, enforced architecturally.
Survivability & Sustainability
Societal impact, economic architecture, and operational sovereignty. The reasons a system gets sunset are rarely technical.
Ten positions I've staked, with the reasoning compressed to one paragraph each.
The full framework expands each into principles, enforceable rules, tactical artifacts, AWS implementation patterns, anti-patterns, and industry alignment. What you see here is the load-bearing opinion.
Production AI Design Doctrine
Probabilistic reasoning must live inside deterministic infrastructure. Every LLM call gets wrapped in a state machine, structured output, retry, and fallback. If you can't draw the deterministic envelope around the model call, you don't have a production system. You have a demo.
Security: Zero Trust for Agentic AI
Prompt injection is an architectural problem, not a model problem. No amount of system-prompt hardening will stop a motivated attacker. The defense is the Three-Point AI Firewall: inspection at user input, agent output, and external content, plus infrastructure-enforced least privilege that denies the action even if the model is manipulated into requesting it.
Privacy
Security controls access. Privacy controls data boundaries. The Four-Point PII Inspection Pipeline extends the firewall with detection at user input, retrieval, output, and system prompt construction. If you can't execute a GDPR Article 17 erasure as a technical operation, your privacy program is documentation, not architecture.
Reliability
Probabilistic systems fail silently. Evaluation replaces assertion. Six testing disciplines (golden set, red team, regression, drift, fairness, load) gate deployment. If you can't replay a decision end-to-end six months later, you can't debug it, defend it, or learn from it.
Governance
If a system's decisions cannot be explained to regulators, auditors, or boards, it is not production-ready. Governance is infrastructure-enforced: prompts as versioned artifacts, approval workflows with anti-rubber-stamping controls, configuration drift detection. Documentation alone is theater.
Transparency & Human Control
HITL, HOTL, HOOTL: these aren't synonyms. They're a taxonomy. The wrong one for the risk tier creates either bottleneck or blind spot. Graduated autonomy advances by statistical power analysis and fault injection validation, not by vibes. Most teams give the agent too much authority too fast.
Fairness & Bias Control
Fairness is a quantitative discipline, not an audit. Statistical significance with Holm-Bonferroni correction. 80% power at Cohen's h ≥ 0.2. Minimum 30 observations per subgroup. The four-fifths rule plus UK Section 19 proportionality. Anything less is a press release.
Societal Impact
AI systems are societal infrastructure. Environmental cost, workforce displacement, and emergent feedback loops show up in the system's economics whether you measured them or not. Deployments that ignore this get regulated, boycotted, or sunset.
Economic Architecture
If the system doesn't scale economically, it gets killed regardless of technical quality. Per-call cost ceilings, model cascade routing, prompt caching for up to 90% reduction, batch inference for non-real-time workloads, cost-triggered circuit breakers. Unit economics are an architectural concern, not a finance concern.
Operational Sovereignty
If your internal team cannot operate and evolve the system independently, you built dependency instead of capability. Vendor lock-in, opaque pipelines, and consultant-only runbooks are failure modes, even when the consultant is me.
Artifact #1 of 14, published in full.
The LLM Elimination Checklist. The gate every proposed LLM call must pass before it enters the system. If a candidate call fails any of these, it should be a rule, a lookup, a state machine, or nothing.
Force-justify every LLM call in the system. LLMs are expensive, slow, and non-deterministic. They earn their place by doing something a rule, a lookup, or a state machine genuinely cannot. This checklist is the gate.
- 1Submit the 6-field justification as a PR description on the call inventory file (
llm-calls.yamlin the reference implementation). - 2Architecture reviewer confirms no deterministic alternative was missed. A "no" here is final.
- 3Cost owner confirms the call fits inside the per-workflow token budget at projected volume.
- 4Replacement path is implemented or scheduled before the call goes to production, never after.
A team adds an LLM call to "summarize" a five-field structured record into a sentence for a dashboard. The fields are always the same. The sentence is always the same shape. They're spending $400/month and adding 800ms of p95 latency to produce a template string. The checklist rejects this on field 2 the first time anyone fills it out.
Thirteen more artifacts. Ten full pillar deep-dives. The AWS reference implementation.
These ship with the engagement, wired into your repo, your CI/CD, your IAM, your CloudWatch. Not as a PDF someone forwards once and forgets.