Khalid ShamsPrincipal Solutions Architect

The SHAMS Method · for principal-level architecture

Where AI belongs in your enterprise, and how to keep it safe.

Architects inspect miniature infrastructure models, untangling cobalt routes across a shared planning table.See the dependencies. Find the next move. Explore the illustrated library →

A reference I built from fifteen years of enterprise architecture and the last stretch shipping agentic systems. It answers the three questions every leadership team is asking in the same meeting: what do we actually have, where would AI pay off first, and what has to be true before we let it act. Pick your industry, explore the map, run the gate check, keep the page.

I have never watched an AI project fail at the model. They fail at the gate nobody opened.

Khalid Shams

Five moves, in order. Everything on this site hangs off them: every layer of the estate, every idea on the AI map, every playbook, every gate. Open a move to see what it governs, the questions I ask, and where I learned it the hard way.

Agentic AI, the SHAMS way

From a capable agent to a governed, measurable system.

The five moves above govern the whole estate. Here they are applied to the thing every team is building right now: an agent. Six components, each tagged with the stage that governs it first, then the arithmetic that decides how many agents you actually need. Pick a component, or pick a stage and watch what it governs light up.

Follow one request through all of these in the SHAMS AI Atlas: the same components working together on a damaged-order case, with the SHAMS lenses as overlays and what changes when a permission is denied.

A delivery field guide

Building AI systems: stack, structure and scale.

I start with the work, then choose the components and the people responsible for them. A useful model is one part of the system. Clear evidence, controlled actions and explicit handoffs turn it into something I can operate.

These are five connected components, not a mandatory build sequence. The seven-layer architecture explains where they sit. Retrieval and stored memory have different jobs; an agent is only needed when the next step must be chosen dynamically.

  1. 01

    Model

    Generates from learned patterns and the context supplied.

    Verify important outputs; it does not know your live business by default.

    Inspect model →
  2. 02

    Retrieval

    Selects relevant evidence for the current request.

    RAG is not persistent memory. Check source quality, freshness and access.

    Inspect retrieval →
  3. 03

    Tools and MCP

    Tools perform operations; MCP standardises their connection.

    The application still validates requests and enforces permissions.

    Inspect tools and mcp →
  4. 04

    Skills and workflows

    Skills package reusable instructions and resources.

    Workflows define the sequence. Neither guarantees a correct outcome.

    Inspect skills and workflows →
  5. 05

    Agent

    Uses a model and tools to choose steps toward a bounded goal.

    Add evaluations, approval gates, budgets, traces and a way to stop.

    Inspect agent →
View and download the one-page field guide

A scalable, text-selectable poster for design reviews. Download light SVG · Download dark SVG

Building AI systems: five components, possible team connections, and three delivery decisions. The same guidance is available as text on this page. Building AI systems: five components, possible team connections, and three delivery decisions. The same guidance is available as text on this page.

Technical references: MCP architecture · Retrieval-augmented generation · Agent skills

01 Understand the components

The agentic loop, plan, act, observe, adjust, with each component placed at the station where it does its work: the model and skills at plan, MCP at act, retrieval at observe, memory at adjust AgentThe goalwithin limits CHECK Plan Act Observe Adjust LLM Skills MCP RAG Memory
Each component is drawn at the station where it does most of its work; the dashed leads show where else it reaches. The check sits between a proposal and its execution.

The stage on each component is its primary design focus, not its only one. Every component passes all five moves; this is where I start.

02 Understand the coordination cost

More agents, more possible connections. Every specialist you add also adds routing, context and evaluation overhead. Move the slider.

5

Full mesh

10potential links

5 peers. Every pair can talk to every other pair.

Coordinator + workers

4potential links

1 coordinator + 4 specialists. Tasks and results pass through the hub.

Full-mesh formula

n(n − 1) / 2

grows with the square. A coordinator grows in a line: n − 1.

Potential links by number of agents

A hub simplifies routing; it can also become a bottleneck, and its context fills first. Potential link counts describe topology, not message volume, cost, accuracy or team performance.

People and delivery

Human teams: the same arithmetic, different work.

I use this count to ask where a handoff needs an owner or a clearer interface. It assumes every pair of people can connect. Real teams organise around roles, shared artefacts and boundaries; they do not use every possible connection equally.

6 people · 15 possible pairwise connections

n(n − 1) / 2 grows quadratically, not exponentially. This is a topology count, not a prediction of messages, meetings, delivery time or productivity.

Fewer links do not prove a better team. A coordinator can reduce direct connections while creating a bottleneck. For people, inspect decision rights and handoffs. For software agents, also inspect permissions, context isolation, retries and evaluations.

  1. Name the owner

    Who owns the decision, the evidence and the result?

  2. Define the handoff

    What crosses the boundary, and how is it checked?

  3. Measure the result

    Does the added capability justify its coordination cost?

Clear ownership and interfaces reduce coordination overhead. I measure the outcome before adding another person, agent or layer.

03 Apply SHAMS to the agent team

Same 5 agents. Different architecture. Before the next one is added:

  1. S

    Scope the work

  2. H

    Harden each role

  3. A

    Anchor shared evidence

  4. M

    Measure gains against overhead

  5. S

    Sustain ownership and recovery

Every added agent needs a measured purpose.

Khalid Shams

Keep it

The one-page version of this section, for a slide, a design review, or the wall. Download the one-pager · A coordinator and specialist, step by step · How hub and spoke works · The agentic AI playbook

The map

Architects inspect miniature infrastructure models, untangling cobalt routes across a shared planning table.
Group systems by domain, name the owners and keep an unverified link marked as unknown.

Your estate in one view: six layers you already have, seven places AI can go.

Two domains: the infrastructure the estate needs, and the AI uses it can support. Owners still need to be named in a review. Solid lines are declared dependencies, not observed traffic. Choose an industry to re-weight payoff and risk. Select a node, then inspect one dependency and its potential impact. Drag a node to rearrange the drawing.

Infrastructure layerAI zone, sized by payoff for this industryRed ring: higher risk here

The autonomy ladder

An architect inspects five ascending platforms while an owner reviews the controls beside a closed gate. A lower platform is selected.⏸ Control boundary · Higher is not automatically better
Choose the rung the goal needs. More autonomy needs more safeguards; higher is not automatically better.

Five rungs. Each one needs more of the estate underneath it.

Most organisations should climb this one rung at a time, per use case, with the safeguards for the next rung in place before stepping onto it. The rung tells you which gates matter most.

  1. 0

    Manual

    People do the work; AI is absent or used ad hoc on personal accounts. Risk: shadow AI with company data in it.

    Needs: an acceptable-use policy and a sanctioned tool, nothing more.
  2. 1

    Assisted

    AI drafts, summarises, searches. A person reads everything before it goes anywhere. Low blast radius, immediate value.

    Needs: identity (gate 03) and grounding (gate 04). The place to start.
  3. 2

    Augmented

    AI proposes a decision with evidence; a person approves inside a designed queue. Extraction, triage, classification live here.

    Needs: boundaries and a real review queue (gate 02), a harness (gate 06).
  4. 3

    Automated

    AI acts without per-item review inside narrow, reversible bounds. Someone watches the aggregate, not each case.

    Needs: typed, idempotent, reversible actions (gate 05), cost ceilings (gate 07), an off switch and traces (gate 08).
  5. 4

    Autonomous

    Multi-step agents plan and act across systems with a human only at consequence points. Rare in regulated industries today, and it should be.

    Needs: every gate closed and signed, re-opened whenever a tool, source, or model changes.

The eight gates

An outline software operator offers a proposal to a human reviewer beside an evidence tray and a closed gate.Outline operator: software metaphor · ⏸ Proposal awaiting review
A proposal waits at the boundary. Approval permits an attempt; it does not prove successful execution.

Eight gates between a demo and a system.

Each gate is a question the system has to answer in writing before it is allowed to act: who owns the decision, what each agent may see and do, where every fact comes from, whether every action is typed and reversible, how quality and cost are measured, and how it can be stopped. Pass them in order. The first open gate is the one to fix.

  1. 01Decision
  2. 02Boundaries
  3. 03Permissions
  4. 04Grounding
  5. 05Actions
  6. 06Evaluation
  7. 07Economics
  8. 08Operations

In order

Gates 1 to 4 are answered before a line of orchestration code exists. They take about a week and they decide most of the architecture.

In writing

Every gate produces one page. Question, answer, evidence, owner, date. If it won't fit on a page, the thinking isn't done.

With a signature

A gate isn't passed because the architect says so. The person accountable for that gate signs it, and a gate can be reopened when something changes.

Gate 01 · Decision

What decision does this system make, and who owns it when it's wrong?

Why it matters

Vague scope is how an agent does the wrong thing confidently. "It helps users with X" is not a decision. A system that decides which invoice to pay is a different build from one that drafts the email asking about it, and nobody can design the controls until that line is drawn. The owner question is the one that stalls projects: if the answer is a committee, the project isn't ready.

What I produce

  • A one-page scope statement: the decisions in scope, the decisions explicitly out, and the cost of a wrong answer in dollars or harm.
  • One named accountable owner for the outcome, not for the build.
  • The three questions, answered in writing: who is accountable, what is it allowed to see, what does a run cost at ten times the volume.

Not through this gate if

  • The scope is a list of use cases rather than decisions.
  • Nobody can say what a wrong answer costs.
  • Accountability is "the AI team."

From the work

In the clinical platform I architected, the system never decides a diagnosis. It decides which document goes to which human queue, and how urgently. Writing that sentence down shaped everything that followed.

Gate 02 · Boundaries

What does each agent own, where does control pass, and where does a human sit?

Why it matters

Handoffs are where failures hide. One "do everything" agent can't be tested, priced, or explained. A pipeline of narrow specialists with a planner on top can be swapped piece by piece. And a human in the loop is only a control if the loop was designed: if the review screen is bad, the human stops reviewing and starts approving.

What I produce

  • An agent map: one box per agent with its inputs, outputs, and the condition under which it hands off.
  • Human decision points placed by consequence, not by convenience, each with a designed review surface.
  • The queue: priority by consequence, a service level per item type, one owner per item, reason codes on every rejection.

Not through this gate if

  • There is one agent and a very long prompt.
  • "Human in the loop" is an Approve button nobody designed.
  • Handoffs happen inside the model's reasoning rather than in the architecture.

From the work

On the system I delivered on Anthropic's Claude platform, the planner decomposes the task and specialists retrieve, analyse, and act, each with a bounded scope and an explicit handoff. The planner is where the care goes.

Gate 03 · Permissions

What is the agent allowed to see and do, per user, enforced by the platform?

Why it matters

The most common enterprise AI failure I've seen isn't a hallucination. It's a service principal with broad access wired in during the pilot, and an assistant that cheerfully returns data the user was never cleared for. Policy in the prompt is a suggestion. Policy in the platform is a control.

What I produce

  • An identity model where the agent acts as the user and inherits the user's permissions, never exceeding them.
  • Per-tool permission scopes; the service identity does only what no user could.
  • Entra ID, RBAC, and just-in-time elevation for anything privileged, with an access log that answers "who saw what, on whose behalf."

Not through this gate if

  • The service principal has Contributor on the subscription.
  • "Don't reveal confidential data" appears in the system prompt as the control.
  • Nobody can list what the agent can reach.

From the work

Governance isn't the brake. On the security and data strategy work I contributed to, controls landed before workloads, so the AI features inherited governance instead of fighting it.

Gate 04 · Grounding

Where does every fact come from, and is that source governed?

Why it matters

If the data underneath isn't governed, the agent is fluent and wrong. Retrieval systems rarely fail loudly; they drift. Stale indexes, permissions that changed after indexing, chunks that lost their context, citations to documents that no longer exist. And the moment an agent keeps its own copy of a fact, you have a second source of truth that nobody governs.

What I produce

  • A source inventory with a named owner for every source, usually a governed gold layer rather than a folder someone made for the pilot.
  • Provenance on every answer: retrieval attaches where it came from and whether it's current.
  • The retrieval-versus-memory rule, written down: facts about the world are retrieved, never remembered. Index refresh tied to source change events. Permission checks at query time, not index time.

Not through this gate if

  • The index was built once from a demo folder.
  • Answers have no citation, or citations that 404.
  • The team says the agent "remembers" things.

From the work

Moving an estate onto Microsoft Fabric with real medallion layering changed the question from "where is the data" to "who owns this layer." That ownership is what made grounding an agent on it safe.

Gate 05 · Actions

Is every write typed, validated, idempotent, and reversible?

Why it matters

An agent will retry. That isn't a bug, it's how they work. If a tool sends an email, creates a ticket, or moves money, and the first call succeeded, you now have two. A tool call is an API call and deserves the same discipline as any other integration, and in most prototypes it gets none.

What I produce

  • A contract per tool: typed input validated before execution, typed output, a description written for the model, a version, a permission scope, and a defined failure path.
  • Idempotency on every write: a request id the receiving system dedupes on, or a write that sets state rather than adds to it.
  • Reversibility where possible: drafts before sends, holds before transfers, proposals before merges. A blast-radius table listing what each tool can break.

Not through this gate if

  • Tools take an untyped dictionary and return whatever comes back.
  • Nobody can answer "what happens if this is called twice."
  • Model output goes straight into a downstream step without a schema check.

From the work

In the clinical system, name matching proposes and never merges. A human confirms that two records are one person, and that decision is logged with who made it. The source document stays immutable, forever.

Gate 06 · Evaluation

Can you show me the harness, and what number moves when quality moves?

Why it matters

Every change to an agentic system, whether a prompt, a tool, a model version, or a retrieval tweak, has an unknown blast radius. Without a regression suite you aren't iterating. You're gambling and calling it iteration. If the answer to "show me the harness" is a pause, you're looking at a prototype wearing production clothes.

What I produce

  • A fixed case set that includes the ugly inputs, not just the happy path.
  • A written catalogue of known failure modes, grown from every rejection in the review queue.
  • Groundedness and citation checks, so "confident" and "correct" don't get confused. One quality number and one cost number on the same dashboard, and a rule that no prompt or model change ships if either moves the wrong way.

Not through this gate if

  • Quality is "it looked good in the demo."
  • An evaluation exists but isn't run before changes.
  • There is no number that moves when quality moves.

From the work

The Claude platform build shipped with an evaluation harness and a written failure-mode catalogue as deliverables, not afterthoughts. That's what let production hardening happen in weeks instead of quarters.

Gate 07 · Economics

What does a run cost at ten times the volume?

Why it matters

A license costs the same whether people use it or not. An agent costs more the better it works, sometimes faster than linearly, because successful agents get asked harder questions and take more steps to answer them. Cost per run is an architecture decision, not a finance surprise.

What I produce

  • A token budget per run, enforced, with a graceful stop rather than a runaway loop.
  • Model routing: small, fast models for classification, extraction, and formatting; the frontier model only for steps that need judgment.
  • Caching where inputs are stable. Hard ceilings on tool calls, retries, and recursion depth. A cost line next to the quality line.

Not through this gate if

  • One model does everything.
  • Nobody can quote the most expensive run last week.
  • Finance will find out from the invoice.

From the work

On the platform I run alone on AWS, the cost alarm is set lower than I think I need. It has paid for itself three times. The same rule scales to an enterprise estate.

Gate 08 · Operations

Can you stop it, explain it, and change it safely?

Why it matters

Agents fail in ways that are fast, repetitive, and confident. By the time a human notices, the agent has done the wrong thing forty times. Logs tell you what it did; only a trace tells you why. And a model version change is a production deploy, whether or not the team treats it as one.

What I produce

  • An off switch someone can flip in under a minute, a read-only mode, and circuit breakers per tool.
  • A trace per run: the plan, each retrieval and what it ignored, each tool call, each rejected alternative, and the cost of every step.
  • Prompts as versioned configuration gated by the harness. Model versions behind feature flags, rolled to a slice first. Append-only audit. Pilot exit criteria with a date, written before the architecture.

Not through this gate if

  • Rollback is the only way to stop it.
  • There are logs but no traces.
  • The prompt was last edited in a console on a Friday afternoon.

From the work

Every pilot I scope now has its exit criteria in the first document: the numbers that trigger a production build, the numbers that trigger shutting it down, and a date. Both outcomes are wins. The only losing outcome is drifting into permanence.

The gate check

Twenty-four questions. Answer honestly, read the verdict.

This is the same check I run in the first week of an engagement. Nothing you tick leaves this page. Tick what's true today, not what's planned.

0/ 24

Nothing ticked yet.

Work through the gates in order. The first open gate is the one to fix first.

The record

Architects compare three alternative system models and a blank recommendation record at a cobalt-accented table.
Compare the alternatives, record the assumption and put an accountable owner beside the recommendation.

One page per gate. This is the page.

Every gate ends in the same short record. It's deliberately plain so that it gets written, and so an auditor, a new engineer, or a future version of the team can read it in a minute.

GATE          03 · Permissions
QUESTION      What is the agent allowed to see and do, per user, enforced by the platform?
ANSWER        The agent runs as the signed-in user via on-behalf-of flow. It reaches the
              gold layer of the claims lakehouse and the ticketing API, nothing else.
              The service identity can only write traces and read configuration.
EVIDENCE      Identity diagram v3 · RBAC assignments export · access log sample from a
              test user with restricted scope returning a correct denial
OPEN ITEMS    PIM activation for the two privileged tools (owner: platform team, due 14 Nov)
OWNER         Head of Security Engineering
SIGNED        12 Nov 2026
REVISIT       When a tool is added, when a data source is added, or at 90 days

Why gates and not a checklist

Order is the whole method.

A checklist lets you do the exciting part first and tick the boundaries later. By then the exceptions are already in production and every control is a negotiation with something people depend on. Gates force the sequence: decide, bound, permit, ground, and only then build. It looks slower on the plan. It is the only version that stays fast. The writing is where each gate gets argued about in public, twice a week.