Apply UX Skills to GenAI

Agent Experience (AX)

AX: System Instructions as Operating Charters

When we start building an agentic workflow, our initial focus naturally gravitates toward wiring up tools and getting the first task working. As the system grows in complexity, elevating the system_instruction payload from a basic setup prompt into a structured Operating Charter becomes our highest-leverage architectural move.

Mandate vs. Method: Separating Governance from Execution

Top-level guidance does not micromanage individual database queries or API payloads. High-level architecture establishes operating charters, delegations of authority, and risk boundaries, while operational playbooks handle step-by-step execution. In AX Fundamentals: Intro to Agent Experience (AX) Design, we introduced the 3-Tier AX Triad. At the top of that stack, separating global Mandate (the Operating Charter) from transient Method (Modular Runtime Protocols like SKILL.md) prevents context bloat and authority drift:

Architectural LayerOrganizational CounterpartMandate vs. Method ScopeRuntime Lifecycle
Operating Charter (system_instruction)Operating Charter & Delegation of AuthorityMandate: Defines who the system is, what authority limits apply, and when to halt or escalate.Persistent across every turn in the session.
Runtime Protocols (SKILL.md / SOPs)Standard Operating Procedures (SOPs)Method: Defines how to execute a specific, repeatable workflow step by step.Dynamically mounted on demand when routed.
Integration Surfaces (tools / MCP)Infrastructure & Permission GatesExecution: Exposes typed APIs, database hooks, and side-effect runtimes.Invoked via validated JSON payloads.

Maintaining a clean boundary between Mandate and Method reinforces three architectural realities:

  • Access Requires Behavioral & Code Boundaries: Granting an agent access to production MCP tools requires two layers of defense. The Operating Charter defines behavioral authority (when the model should attempt a call or escalate), while deterministic permission gates in the harness enforce hard security against prompt injection and unauthorized mutations.

  • Procedures Require Boundaries: A SKILL.md file without an Operating Charter defines step-by-step execution mechanics, but lacks spend caps, compliance limits, and exception-handling rules when inputs fall outside expected parameters.

  • Charters Require Procedures: Packing every transient step-by-step workflow directly into the Operating Charter bloats the persistent token budget and dilutes attention across unrelated tasks.

Why Multi-Turn Runtimes Drift: Autocomplete Mechanics

To design an effective charter, it helps to examine what the inference engine executes under the hood. Language models lack native compliance awareness or persistent intent - they run probabilistic pattern completion across an expanding context window.

At its foundation, an LLM autocompletes a transcript one token at a time. The orchestration engine runs an internal loop: evaluating probability distributions across candidate tokens, sampling one, and appending it until reaching an API stop sequence (for example, <|im_end|>).

  • Multi-Turn Transcript Drift: As user inputs, tool responses, and intermediate payloads accumulate in the transcript, early conversational instructions lose relative attention weight. Without a high-density Operating Charter anchored at the root of the context window, noisy intermediate tool outputs pull the probability distribution off course.

  • Automated Reasoning Loops: Early prompting patterns forced models to output visible step-by-step scratchpads in the main transcript. Modern reasoning models automate this loop natively inside hidden <thinking> blocks, conducting internal self-grounding against the Operating Charter before emitting a tool call or final response.

Structuring the Operating Charter: 4 Core Pillars

A production Operating Charter stabilizes multi-turn inference through four structural pillars:

1. Expert Roleplay & Domain Lexicon

Models route token predictions by matching prompt vocabulary to specialized clusters in their training weights. Addressing the model as a specific domain professional and loading the prompt with technical lexicon shifts the attention distribution away from generic conversational filler and into rigorous expert patterns.

  • Generic Role (Low Signal): "You are a helpful AI assistant that manages warehouse products."
  • Expert Persona (High Signal): "You are a Senior Logistics Operations Lead specializing in multi-warehouse inventory reconciliation, vendor dispute arbitration, and bill-of-materials (BOM) variance audits."

2. The Primary Mandate (Anchor Goal)

Multi-turn agent loops regularly encounter ambiguous inputs, partial API errors, and noisy execution trees. An Operating Charter establishes a singular Anchor Goal - an immutable primary objective that realigns the agent's trajectory whenever intermediate steps become ambiguous.

3. Prescriptive Guardrails & Fallback Invariants

Directing an LLM away from undesirable behavior using negative prohibitions (such as "Do not guess order numbers") triggers the Purple Elephant Problem: mentioning forbidden concepts introduces those exact tokens into the active attention field, increasing the probability that the model drifts into that territory.

Furthermore, when a task-specific SKILL.md encounters an unhandled edge case, the Operating Charter acts as the default exception handler. Instead of leaving the model to improvise a recovery path, prescriptive guardrails dictate the exact fallback state:

Constraint TypeFragile AX (Negative / Prohibitive)Governed AX (Prescriptive / Directional)
Tone & Output"Don't speak casually or use conversational filler.""Maintain a concise, executive business tone across all responses."
Pre-Flight State"Never update the database without checking the ID first.""Require a verified product_id retrieved via search_products before staging any state mutation."
Exception Fallback"Don't make assumptions when stock records conflict.""Default to immediate human escalation whenever stock records conflict or variance exceeds $5,000 USD."

4. Structural Delimiters: XML vs. Markdown

Explicit delimiters keep persona identity, mandates, and delegation limits cleanly separated from user input and tool payloads. Benchmark your target models to select the syntax that maximizes instruction adherence:

  • XML Formatting: Often preferred by models like Anthropic's Claude to strictly partition system instructions, authority boundaries, and examples.
  • Markdown Formatting: Highly effective for Google Gemini, OpenAI models, and open-weight models accustomed to hierarchical headings and lists.

Option A: XML Operating Charter

<operating_charter>
  <entity_mandate>
    You are a Senior Logistics Operations Lead specializing in multi-warehouse inventory reconciliation, vendor dispute arbitration, and bill-of-materials (BOM) audits.
  </entity_mandate>

  <primary_objective>
    Audit, reconcile, and resolve regional warehouse inventory discrepancies while ensuring complete traceability across all external inventory mutations.
  </primary_objective>

  <delegation_of_authority>
    <boundary>Require a verified product_id retrieved via search_products before staging any database change.</boundary>
    <boundary>Present all inventory variance evaluations in structured Markdown tables with discrepancy justifications.</boundary>
    <boundary>Escalate immediately to human inventory controllers whenever variance discrepancies exceed $5,000 USD or involve regulated hazardous materials.</boundary>
  </delegation_of_authority>
</operating_charter>

Option B: Markdown Operating Charter

# Operating Charter: Senior Logistics Operations Lead

## Entity Mandate
You are a Senior Logistics Operations Lead specializing in multi-warehouse inventory reconciliation, vendor dispute arbitration, and bill-of-materials (BOM) audits.

## Primary Objective
Audit, reconcile, and resolve regional warehouse inventory discrepancies while ensuring complete traceability across all external inventory mutations.

## Delegation of Authority & Operational Boundaries
* **Verification Prerequisite:** Require a verified `product_id` retrieved via `search_products` before staging any database change.
* **Audit Standard:** Present all inventory variance evaluations in structured Markdown tables with discrepancy justifications.
* **Escalation Thresholds:** Escalate immediately to human inventory controllers whenever variance discrepancies exceed $5,000 USD or involve regulated hazardous materials.

Operating Charter Checklist

When elevating a system prompt into a production Operating Charter, verify these five elements:

  1. Expert Persona & Lexicon: Assign a specific professional role reinforced with domain jargon to activate specialized training weights.
  2. Mandate vs. Method Separation: Keep global governance in the charter and move step-by-step task workflows into modular SKILL.md files.
  3. Anchor Mandate: Establish a singular, non-negotiable objective that grounds token predictions across long multi-turn threads.
  4. Prescriptive Directives: Frame operational rules using positive, condition-first directives ("require", "default to", "prefer") rather than negative prohibitions.
  5. Structural Delimiters: Use XML or Markdown hierarchy to isolate governance mandates from runtime context and tool payloads.

Next in the AX Series

With global governance anchored in the Operating Charter, the next layer of the 3-Tier AX Triad focuses on how we provide step-by-step procedural context without bloating the system prompt: