AGENCYSCRIPT
CoursesEnterpriseBlog
đź‘‘FoundersSign inJoin Waitlist
AGENCYSCRIPT

Governed Certification Framework

The operating system for AI-enabled agency building. Certify judgment under constraint. Standards over scale. Governance over shortcuts.

Stay informed

Governance updates, certification insights, and industry standards.

Products

  • Platform
  • Certification
  • Launch Program
  • Vault
  • The Book

Certification

  • Foundation (AS-F)
  • Operator (AS-O)
  • Architect (AS-A)
  • Principal (AS-P)

Resources

  • Blog
  • Verify Credential
  • Enterprise
  • Partners
  • Pricing

Company

  • About
  • Contact
  • Careers
  • Press
© 2026 Agency Script, Inc.·
Privacy PolicyTerms of ServiceCertification AgreementSecurity

Standards over scale. Judgment over volume. Governance over shortcuts.

On This Page

The Plays, Mapped to TriggersPlay: Tighten retrievalPlay: Reorder for attentionPlay: Compress the historyPlay: Resolve conflictsPlay: Format for parsingOwners: Who Runs Each PlayThe retrieval ownerThe prompt and assembly ownerThe evaluation ownerSequencing Under PressureThe diagnostic orderStanding Plays Versus Incident PlaysStanding playsIncident playsMaking the Playbook DurableDocument every play as you run itTie plays to metrics, not opinionsRehearse the handoffAvoiding the Common Playbook FailuresThe play that became a reflexThe orphaned playThe metric-free playFrequently Asked QuestionsHow is a playbook different from a checklist?What if two plays seem to apply at once?Do small teams need this much structure?How often should standing plays run?Who decides when to declare an incident?Key Takeaways
Home/Blog/Run Context Engineering Like an Operating System
General

Run Context Engineering Like an Operating System

A

Agency Script Editorial

Editorial Team

·October 5, 2023·8 min read
context engineeringcontext engineering playbookcontext engineering guideprompt engineering

Most teams treat context engineering as a series of one-off fixes. A bad answer surfaces, someone tweaks retrieval or rewrites an instruction, and the issue disappears until it returns in a slightly different form. The work never compounds because it was never organized.

An operating playbook changes that. Instead of reacting to symptoms, you maintain a named set of plays, each with a clear trigger, a clear owner, and a known place in the sequence. When quality drops, you do not improvise. You diagnose which play applies and run it. Over time the system stops surprising you, and new team members can learn the moves rather than inherit a folklore of undocumented tricks.

This is that playbook. It is organized the way an operations manual should be: by the situation you are in, not by the technology you happen to be using.

The Plays, Mapped to Triggers

A play is a defined response to a defined condition. The value comes from matching the right play to the right signal, so the catalog below pairs each play with the trigger that should activate it.

Play: Tighten retrieval

Trigger: The needed information exists in your sources but is not appearing in the context.

The fix lives in the retrieval layer, not the prompt. Adjust chunk boundaries so related ideas stay together, revisit your embedding model, or add metadata filters so the search narrows to the right document set before ranking. Measure the retrieval hit rate before and after.

Play: Reorder for attention

Trigger: The right information is in the context but the model ignores it.

Move the critical material to the start or end of the input, where models attend most reliably. Lead with the instruction, place the most relevant retrieved passage immediately after, and push lower-priority material toward the middle.

Play: Compress the history

Trigger: Conversations or documents are pushing the token budget and crowding out fresh material.

Summarize older turns into a compact running state, keep the most recent turns verbatim, and drop redundant boilerplate. The goal is to preserve meaning while reclaiming budget.

Play: Resolve conflicts

Trigger: The model produces inconsistent answers because the context contains contradictory facts.

Deduplicate sources, stamp records with recency, and instruct the model explicitly to prefer the most recent or most authoritative version. Conflict is a sourcing defect, so fix it before it reaches the prompt.

Play: Format for parsing

Trigger: The model misreads structured data or loses track of which fields belong together.

Convert dense prose into labeled fields, tables, or delimited blocks. Consistent structure helps the model find and bind the right values. Our Context Engineering: Best Practices That Actually Work covers formatting conventions worth standardizing.

Owners: Who Runs Each Play

A play without an owner is a wish. Assigning clear responsibility prevents the common failure where everyone assumes someone else is watching the retrieval pipeline.

The retrieval owner

Owns indexing, chunking, embedding choices, and the retrieval hit rate. This person runs the tighten-retrieval and resolve-conflicts plays and reports on whether the right passages reach the context.

The prompt and assembly owner

Owns instruction structure, ordering, and formatting. This person runs the reorder, compress, and format plays. They sit closest to how the final payload is constructed.

The evaluation owner

Owns the test set and the dashboards. They do not run plays directly but signal which play is needed by surfacing where quality dropped. Without this role, the team flies blind. The A Framework for Context Engineering article describes how these responsibilities fit a larger structure.

Sequencing Under Pressure

When output quality degrades, the temptation is to run several plays at once. Resist it. Changing retrieval, ordering, and formatting simultaneously means you cannot tell which change helped. Sequence deliberately.

The diagnostic order

  1. Confirm the information reached the context. If it did not, this is a retrieval problem. Stop and run the tighten-retrieval play. Nothing downstream matters until the right material is present.
  2. Confirm the model could find it. If the information is present but buried, run the reorder play. Check attention before touching anything else.
  3. Confirm the context is consistent. If conflicting facts are present, run the resolve-conflicts play.
  4. Confirm the budget is healthy. If the context is bloated, run the compress play to make room.
  5. Confirm the format is legible. Only after the above, refine formatting.

Running plays in this order isolates cause from effect. Each step has a measurable check, so you advance only when the prior layer is sound.

Standing Plays Versus Incident Plays

Some plays run continuously; others fire only when an incident occurs. Separating them keeps your routine clean.

Standing plays

These run on a schedule regardless of whether anything is broken:

  • Re-running the evaluation set after any change to retrieval or prompts.
  • Auditing token budgets weekly to catch creeping bloat.
  • Reviewing the freshest sources for indexing gaps.

Incident plays

These fire in response to a specific failure, such as a spike in wrong answers or a complaint about a particular query type. They follow the diagnostic sequence above and close with an evaluation run to confirm the fix held.

Making the Playbook Durable

A playbook decays if it lives in one person's head. Three habits keep it alive.

Document every play as you run it

Record the trigger, the change made, and the measured result. Over weeks this log becomes a diagnostic reference that shortcuts future incidents.

Tie plays to metrics, not opinions

Each play should be justified by a number that moved. If you cannot point to a retrieval hit rate or evaluation score that changed, you ran a guess, not a play.

Rehearse the handoff

A new hire should be able to read the playbook, look at a failing query, and name the correct play. If they cannot, the documentation is too thin. The Building a Repeatable Workflow for Context Engineering piece pairs well with this for onboarding.

Avoiding the Common Playbook Failures

A playbook can rot in predictable ways. Knowing the failure modes in advance lets you guard against them before they cost you.

The play that became a reflex

When a single play, usually tighten-retrieval, gets run for every problem regardless of the actual signal, the playbook has degraded into a habit. The cure is discipline about confirming the trigger before acting. If you cannot point to the specific signal that called for a play, you are guessing rather than diagnosing.

The orphaned play

Over time, plays accumulate that no longer match how the system works. A formatting play written for a data source you have since retired clutters the catalog and confuses new readers. Prune the catalog periodically so every play maps to a real, current condition. The 7 Common Mistakes with Context Engineering article catalogs related traps.

The metric-free play

A play justified by a feeling rather than a moved number is not a play. When you find one in your log, either attach the metric that justifies it or remove it. This keeps the playbook honest and prevents folklore from creeping back in.

Frequently Asked Questions

How is a playbook different from a checklist?

A checklist confirms you did a fixed set of steps. A playbook routes you to the right response based on the situation you are in. Checklists are for known, repeated tasks; playbooks are for diagnosing and responding to variable conditions.

What if two plays seem to apply at once?

Follow the diagnostic sequence and run the earlier play first. Retrieval problems mask everything downstream, so resolving them often makes the second issue disappear or clarifies that it was a symptom rather than a root cause.

Do small teams need this much structure?

Even a two-person team benefits from naming its plays and owners. The structure prevents the same problem from being re-solved from scratch each time. You can keep the documentation lightweight without abandoning the discipline.

How often should standing plays run?

Run the evaluation set after every meaningful change and at least weekly even without changes, since upstream data can drift. Budget audits fit a weekly cadence for most teams. Adjust based on how fast your sources change.

Who decides when to declare an incident?

The evaluation owner, using the dashboards. A meaningful drop in evaluation score or a cluster of related complaints triggers an incident play. Defining the threshold in advance keeps the decision objective rather than reactive.

Key Takeaways

  • A playbook organizes context work into named plays with triggers, owners, and a sequence.
  • Match each play to the signal that activates it instead of improvising fixes.
  • Assign clear owners for retrieval, assembly, and evaluation so nothing falls between roles.
  • Sequence plays diagnostically: confirm presence, then attention, then consistency, then budget, then format.
  • Separate standing plays that run on schedule from incident plays that respond to failures.
  • Document every play and tie it to a moved metric so the knowledge compounds.

Search Articles

Categories

OperationsSalesDeliveryGovernance

Popular Tags

prompt engineeringai fundamentalsai toolsthe difference between AIMLagency operationsagency growthenterprise sales

Share Article

A

Agency Script Editorial

Editorial Team

The Agency Script editorial team delivers operational insights on AI delivery, certification, and governance for modern agency operators.

Related Articles

General

Prompt Quality Decides Whether AI Earns Its Keep

Prompt quality is the single biggest variable in whether AI delivers real work or expensive noise. The model matters, the platform matters — but the prompt you write determines whether you get a first

A
Agency Script Editorial
June 1, 2026·10 min read
General

Counting the Real Cost of Every Token You Send

Tokens and context windows sit at the intersection of AI capability and operational cost—yet most business cases treat them as technical footnotes. That's a mistake that costs real money. Every time y

A
Agency Script Editorial
June 1, 2026·10 min read
General

Rolling Out AI Hallucinations Across a Team

Most teams discover AI hallucinations the hard way — a confident-sounding wrong answer makes it into a client deliverable, a legal brief, or a published report. The damage isn't just to the output; it

A
Agency Script Editorial
June 1, 2026·11 min read

Ready to certify your AI capability?

Join the professionals building governed, repeatable AI delivery systems.

Explore Certification