Building-block guide · Agent engineering

Prompt assembly and context engineering

How to build every model request from versioned, budgeted layers in a fixed order, so that quality holds as context grows, caches hit, and every change ships through the same release gates as code.

Draft for review · researched 30 Nov 2026

Contents
  1. At a glance
  2. Scope and where it sits
  3. When to use what
  4. Decision criteria
  5. Reference patterns
  6. Recommended defaults
  7. Anti-patterns
  8. Sizing and cost notes
  9. Security and compliance hooks
  10. Test and eval checklist
  11. Related plan sections and inventory
  12. Unverified or needs review
  13. Sources

At a glance

  • Assemble in one canonical order, stable to volatile: tool definitions, static system prompt and policy, skill index, stable project instructions, retrieved documents, memory snippets, append-only conversation history, current user turn. Per-request values (dates, user IDs, request IDs) go last. Provider caches need an exact prefix match, so this order is a cost decision as much as a quality one [4][5].
  • Treat context as a budget with diminishing returns. Every one of 18 models in Chroma's study got less reliable as input grew, and focused prompts of about 300 tokens beat full prompts of about 113k tokens on LongMemEval [2]. Give each layer a token budget and enforce it in the assembler, not by hoping.
  • Load late, not early. Prefer just-in-time retrieval through tools and progressive disclosure through skills (about 100 tokens of metadata per skill at start-up, body on demand) over preloading everything [1][7].
  • Compact on a ladder: clear stale tool results first, then summarise, then isolate work in sub-agents that return 1,000 to 2,000-token summaries [1][11][9]. Archive the full transcript before any compaction.
  • Use constrained structured outputs for anything a program consumes, and still handle refusals and token cut-offs, which neither major provider guarantees against [12][13].
  • Prompts are code. Git is the source of truth; registries serve immutable versions behind a movable label; every trace carries the prompt version [14][15].
  • Every prompt change runs a regression eval in CI, and every model change runs a progression test that also tries deleting instructions [16][17].
  • Prose is context, not enforcement. Anything that must always happen belongs in a hook, permission or policy engine, not an instruction file [8][17].

Scope and where it sits

This guide covers how each model request is put together, and how prompts are versioned, released and regression-tested.

In the 10-layer reference architecture (plan section 4) it is layer 6, context engineering, with direct dependencies on layer 5 (model layer and its prompt caches), layer 7 (memory and knowledge, which supplies retrieved and remembered content) and layer 10 (evals and traces that guard each prompt version). In the plan's Anatomy of an AI Agent crosswalk it implements system 3, Working memory ("prompt assembly as versioned code, context budgets, compaction rules and caching") and touches system 7, Voice and language through output schemas.

Covered elsewhere:

When to use what

Option Use when Avoid when Cost and latency notes
Template with typed variables (Jinja2, Handlebars, Dotprompt) Same structure across tenants, locales or products Variables are injected near the top of the prompt Each distinct rendered prefix is a separate cache entry, so put variables low
Layered instruction files (managed, org, project, directory) Coding and knowledge-work harnesses with many repositories Files contradict each other or grow unchecked Files are concatenated, not overridden, and on conflict the model "may follow either one" [8]
Skills with progressive disclosure Many capabilities, each needed occasionally A capability is needed on every turn (put it in the system prompt) About 100 tokens per skill at start-up; body under 5,000 tokens recommended [7]
Preloaded retrieval (RAG into prompt) Most turns need grounding from a large corpus Need is occasional, or corpus changes faster than the index Adds tokens every turn; sits below the cache breakpoint so does not break the prefix
Just-in-time retrieval through tools Structured or fast-changing sources; exploratory tasks Latency budget cannot absorb extra tool round trips Fewer tokens per turn, more turns; references (paths, queries, IDs) stay cheap [1]
Whole small corpus in the prompt with caching Stable corpus that fits comfortably (plan uses about 200,000 tokens as the bound) Corpus changes often, or long-context evals show recall loss High first write, then cache reads at a fraction of base input [4]
Tool-result clearing (context editing) Long tool-heavy loops where old results are spent Old results are still needed verbatim Cheapest compaction; each clear invalidates the cached prefix after that point [11]
Summarising compaction (server-side or own) Conversations approach the window or quality drops with length Exact wording must be kept (legal text, figures) Extra model call; summary block can itself be cached [9]
Sub-agent context isolation Independent sub-tasks with heavy exploration Sub-tasks share tight state Multi-agent research used about 15 times chat tokens in one vendor's system; see Orchestration, multi-agent and A2A
Constrained structured outputs Output is parsed by code or another agent Free prose for humans; schemas beyond provider limits First use of a schema adds grammar-compile latency; compiled grammars cached 24 hours on one provider [12]

Notes. Options combine; a typical agent uses a template, a skill index, just-in-time retrieval, tool-result clearing and structured outputs together. Preloading is the choice that most often goes wrong: it looks safe in a demo and degrades quietly as corpora grow [2][3].

Decision criteria

  1. Does the content change per request? Yes: it goes at the end of the prompt (or in a tool result). No: it goes in the stable prefix above a cache breakpoint.
  2. Is it needed on every turn? Yes: system prompt or project instructions. Sometimes: a skill or a tool that fetches it. Rarely: leave it out and let the agent search.
  3. Is it trusted? Instructions you wrote can sit in system or developer layers. Retrieved documents, tool results, memory and user-uploaded content are data, wrapped and labelled, never placed in an instruction layer [18].
  4. Will a program consume the output? Yes: constrained structured output or strict tool schemas. No: prose with a light format contract.
  5. How long will the session run? Under one window: no compaction, but still budget. Long-horizon: plan the compaction ladder up front and decide what must survive (decisions, IDs, open tasks, audit facts).
  6. Must the rule always hold? Yes: implement it in a hook or policy engine and keep at most a short explanatory line in the prompt. No: an instruction is fine.
  7. How many tenants or variants? Many: one template with variables placed low, not one prompt per tenant; each extra rendered prefix multiplies cache writes.

Reference patterns

Pattern 1: Prompt assembly contract with a cache-prefix lint

Problem. Strings are concatenated ad hoc, a timestamp lands in the system prompt, cache hits collapse, and nobody can say what the model saw.

How it works. A single assembler function builds every request from named layers in a fixed order, each with a source, a trust level, a token budget and a cache boundary. CI lints the contract: no per-request variable above the last cache breakpoint, layer budgets sum below the model's usable window minus output reserve, tool list sorted deterministically (MCP 2026-07-28 now asks servers to return tools/list in deterministic order for this reason [21]). At run time the assembler emits a context manifest (layer name, version, token count, content hash) into the trace.

# prompt-contract.yaml (generic example)
model_window_tokens: 200000
output_reserve_tokens: 8000
layers:
  - {name: tools,            source: tool_registry,  trust: system, budget: 12000, order: sorted}
  - {name: system_policy,    source: prompts/system@prod, trust: system, budget: 3000, cache_breakpoint: true}
  - {name: skill_index,      source: skills/*,       trust: system, budget: 2500}
  - {name: project_rules,    source: instructions/,  trust: developer, budget: 4000, cache_breakpoint: true}
  - {name: retrieved_docs,   source: retriever,      trust: data, budget: 30000, wrap: "<document source=...>"}
  - {name: memory_snippets,  source: memory_store,   trust: data, budget: 2000, wrap: "<memory provenance=...>"}
  - {name: history,          source: session,        trust: mixed, budget: 120000, append_only: true}
  - {name: user_turn,        source: request,        trust: user, budget: 8000}
  - {name: request_meta,     source: request,        trust: system, budget: 200}   # date, IDs: always last

When to use. Every production agent.

Pitfalls. Provider prefix order is fixed (one provider caches tools, then system, then messages; a change at one level invalidates it and everything after [4]), so the contract must match the provider. Images and tool_choice also invalidate parts of the cache, and that provider allows four breakpoints [4].

Pattern 2: Progressive disclosure through skills and tool search

Problem. Loading every instruction and tool definition on every call wastes tokens and buries guidance in the middle of the window, where models attend least [3][17].

How it works. Each capability is packaged as a skill: a directory with SKILL.md frontmatter (name up to 64 characters, description up to 1,024 characters saying what it does and when to use it) and a body loaded only when the agent activates it, with scripts and references loaded only when needed [7]. Large tool catalogues use deferred loading or tool search (covered in Tool design and MCP servers). The always-loaded layer becomes an index, not an encyclopaedia.

When to use. Many distinct procedures, or a shared harness used by many teams.

Pitfalls. The skills spec has no version field (version by convention under metadata) [7], so the CoE requires metadata.version and an owner and validates every skill in CI (skills-ref validate) [7]. Skills can bundle scripts and network calls, so they are a supply-chain risk (see Security below).

Pattern 3: Budgeted context with just-in-time retrieval and labelled data

Problem. Retrieval stuffs the window with marginal chunks, and distractors lower accuracy more as input grows [2].

How it works. The agent keeps lightweight references (file paths, stored queries, record IDs) and loads content through tools when needed; only what nearly every run needs is preloaded [1]. Each retrieved item is wrapped with source metadata in consistent tags, long material sits above the question, and for long-document tasks the agent is asked to quote relevant passages first, which one vendor reports improves answers by up to 30% on complex multi-document inputs above about 20k tokens [6]. Retrieved and tool-returned content is labelled as data with no authority, matching the instruction hierarchy approach [18][19].

When to use. Any agent with a corpus, tool results or memory.

Pitfalls. Just-in-time retrieval trades tokens for turns, so measure latency too. Labels reduce but do not remove prompt injection; risky actions are still enforced in hooks and policy (see Guardrails).

Pattern 4: Compaction ladder with audit-preserving hooks

Problem. Long-running agents hit the window, or degrade well before it. Naive summarisation loses decisions, IDs and evidence, and breaks caches.

How it works. Apply the lightest step that works, in order:

  1. Tool-result clearing. Replace spent tool results with placeholders; one provider defaults to triggering at 100,000 input tokens and keeping the last 3 tool uses, with a clear_at_least floor so each clear is worth the cache write it causes [11].
  2. Summarising compaction. Server-side, on demand or your own summariser; one provider offers all three, with the on-demand and threshold modes in beta [10]. On one provider the threshold mode triggers by default at 150,000 input tokens, with a minimum of 50,000, accepts custom instructions that replace the default summary prompt, and can pause after compaction so the client can reinsert recent turns [9]. Put a cache breakpoint at the end of the system prompt so only the new summary is written to cache [9].
  3. Structured notes outside the window. The agent writes progress to a notes file or memory tool and reads it back after compaction [1].
  4. Sub-agent isolation. Heavy exploration runs in a clean context that returns a condensed summary, often 1,000 to 2,000 tokens [1].

A PreCompact hook (or equivalent middleware) archives the full transcript first, and compaction instructions list what must survive: decisions, open tasks, identifiers, approvals and denials.

When to use. Any session that can exceed roughly half the usable window, and any regulated workflow where the record matters.

Pitfalls. Summaries are lossy and can launder injected instructions into a trusted-looking block; treat summaries as data. Some framework summarisation is off unless configured (one middleware has no default trigger and keeps the last 20 messages when it runs) [20]. Compaction changes the prefix, so expect a cache write after each event [5][11].

Pattern 5: Schema-first outputs

Problem. Downstream code parses free text, fails on edge cases, and retries waste tokens.

How it works. Define the output as a JSON Schema (or a typed model in the SDK) and use the provider's constrained decoding: one provider separates JSON outputs (final response format) from strict tool use (tool names and inputs) and allows both together [12]; another distinguishes Structured Outputs, which adhere to the schema, from JSON mode, which only guarantees valid JSON [13]. Validate business rules the schema cannot express in code.

When to use. Any output a program or another agent consumes.

Pitfalls. Guarantees exclude refusals and max_tokens cut-offs on both providers, so check stop reasons [12][13]. Schema limits are real (for example 20 strict tools per request and 24 optional parameters across schemas on one provider) and numeric constraints such as minimum are not enforced by that API [12]. Changing the output format can invalidate the prompt cache [12].

Pattern 6: Prompts-as-code release pipeline

Problem. Prompts edited in a console, no record of what ran, no clean rollback.

How it works. Prompts, templates, skills and instruction files live in Git. A registry serves immutable versions behind a movable label or alias: in one, the production label is served by default and rollback means moving the label [14]; in another, versions are immutable, aliases are movable and Jinja2 rendering is sandboxed by default [15]. CI runs the prompt eval suite on any pull request touching prompt files, gating on a pass rate (one tool's example uses 95%) and emitting JUnit or JSON results [16]. Release follows plan 4B: version independently, pass the gate, guarded canary rollout, promote by moving the label, roll back by moving it back.

When to use. Always, from the first production release.

Pitfalls. Registries are deployment caches, never the only copy: at least one vendor-hosted prompt store closed on 30 November 2026 (plan 4B). Client-side caching of prompts means a label move is not instant (one registry caches alias lookups for 60 seconds by default [15]). Create canary labels before routing traffic to them; a missing label errors on one registry [14].

Setting Default Range or options Why
Assembly order Tools, system and policy, skill index, project rules, retrieved docs, memory, history, user turn, request metadata Fixed per agent; documented in the contract Exact-prefix caching and long-context quality both favour stable-first, question-last [4][5][6]
Per-request values position Last layer only None above the final cache breakpoint Any change above a breakpoint invalidates that level and all later levels [4]
Tool list ordering Sorted, deterministic Alphabetical or registry order MCP 2026-07-28 asks servers for deterministic order to improve prompt cache hits [21]
Output reserve 5% to 10% of window (practitioner default) Model-specific max output Prevents truncation of answers and summaries
Retrieved documents budget 10% to 20% of window (practitioner default) Lower for chat, higher for analysis Distractors reduce accuracy as input grows [2]
Instruction file size Under 200 lines per file Hard caps vary by harness Vendor guidance for adherence [8]; bloat reduces adherence [17]
Skills Body under 5,000 tokens; required metadata.version and owner Move detail to referenced files Spec recommendation; spec has no version field [7]; CoE rule from plan 4B
Tool-result clearing trigger 100,000 input tokens, keep last 3 tool uses Lower for small-window models Provider default on one platform [11]
Summarising compaction trigger 150,000 input tokens Minimum 50,000 on one platform Provider default [9]; tune by eval
Compaction instructions Custom, listing decisions, IDs, open tasks, approvals to keep Default provider prompt Custom instructions replace the default entirely on one platform [9]
Sub-agent return size 1,000 to 2,000 tokens Up to a few thousand for complex findings Vendor engineering guidance [1]
Output format for machine consumers Constrained JSON schema, additionalProperties: false Strict tool use; JSON mode only as fallback Schema adherence vs valid JSON only [12][13]
Prompt source of truth Git None Registries can close; plan 4B
Prompt promotion Move production label or alias after eval gate Feature flag, canary label Rollback is a label move [14][15]
Prompt eval gate 95% pass rate on the prompt suite, zero critical failures (practitioner default) Set per risk tier Example threshold in one CI guide [16]

Anti-patterns

  • Timestamp, user name or request ID in the system prompt. Every call misses the cache. Fix: move per-request values to the final layer or a tool result, and lint for it.
  • One giant instruction file that everyone appends to. Adherence falls and conflicts appear. Fix: size budget per file, path-scoped rules, quarterly pruning, and convert must-happen rules to hooks [8][17].
  • Retrieved text or tool output in the system layer. Grants data the authority of instructions. Fix: wrap and label it as data [18].
  • Preloading the whole knowledge base "to be safe". Accuracy and cost both worsen with length [2]. Fix: just-in-time retrieval and a documents budget.
  • Rewriting history to tidy it up. Breaks the cache every turn [5]. Fix: append-only history; compact on a trigger.
  • Summarising without archiving. Evidence is lost. Fix: PreCompact archive to the trace store, then summarise.
  • Editing prompts in a vendor console with no Git record. No audit trail, no rollback when the console closes. Fix: Git first, registry as deployment cache.
  • Asking the model to obey a policy it must never break. Prose is context, not enforcement [8]. Fix: hook, permission or policy engine.

Sizing and cost notes

Cache arithmetic (illustrative). On one provider, a 5-minute cache write costs 1.25 times base input, a 1-hour write 2 times, and a read 0.1 times (lower on some newer models) [4]. Take an agent with a 12,000-token stable prefix (tools, system, skill index, project rules) serving 200 requests an hour that all hit within the TTL:

  • Without caching: 200 x 12,000 = 2,400,000 input tokens billed at base rate.
  • With caching: 1 write at 12,000 x 1.25 = 15,000 token-equivalents, plus 199 reads at 12,000 x 0.1 = 238,800, total about 254,000 token-equivalents.
  • Saving on the prefix: about 89%. A timestamp in the system prompt turns every request into a write and makes the cached case slightly more expensive than no caching (1.25x). These figures are illustrative; prices and multipliers vary by model and provider [4][5].

Minimums and retention. Caching applies only above a minimum prefix (512 to 4,096 tokens by model on one provider [4], 1,024 on newer models on another [5]); shorter prompts are silently not cached [4]. Retention is 5 minutes refreshed on use, or 1 hour, on one provider [4] and 30 minutes or 12 hours on newer models on another [5].

Compaction (illustrative). A 300-turn tool-heavy session that would grow to 400,000 tokens can be held near 100,000 to 150,000 with clearing and threshold compaction [9][11]. Each compaction or clear costs one cache write of the changed suffix, so set clear_at_least high enough that the token saving outweighs the write [11]. FinOps dashboards must sum compaction iterations, which one provider bills separately [9].

Structured outputs. Expect one-off compile latency per new schema and slightly higher input tokens [12].

Security and compliance hooks

Threats.

  • LLM01 Prompt Injection / ASI01 Agent Goal Hijack: instructions hidden in retrieved documents, tool results, memory or uploads. Controls: data labelling and wrapping, instruction hierarchy in layer placement [18][19], injection screening at the gateway, action-level enforcement in hooks (plan 4B, section 10).
  • LLM07 System Prompt Leakage: system prompts and skill bodies may be extracted. Control: keep secrets, credentials and internal URLs out of prompts entirely; treat prompts as potentially public.
  • LLM02 Sensitive Information Disclosure: personal data flowing into prompts, traces and caches. Controls: redaction before assembly, minimal memory snippets, PII tokenising in tool results.
  • ASI06 Memory and Context Poisoning: compaction summaries and memory snippets can carry injected instructions forward. Controls: treat summaries and memory as data, provenance tags (see Agent memory).
  • ASI04 Agentic Supply Chain: third-party skills, instruction packs and MCP tool descriptions. Controls: pinned sources, review of bundled scripts and network calls, signed packages (plan 4B, section 10 control 18).
  • LLM10 Unbounded Consumption: runaway context growth. Control: per-layer and per-run budgets.

Data protection. Prompt caches are isolated per organisation and, on some platforms, per workspace [4]; schema definitions are cached for up to 24 hours on one provider and must not contain regulated data such as PHI in property names or enums [12]. Confirm cache and schema retention against client zero-data-retention terms.

Audit evidence to keep. Prompt, skill and instruction versions per trace; the context manifest (layer, version, tokens, hash); cache usage fields; compaction events with the archived pre-compaction transcript; eval results tagged with commit SHA; label move history from the registry.

Governing plan sections. 4B (prompt assembly and release process), 9 (context standards), 10 (prompt injection, supply chain), 10A and 10B (identity and authorisation that keep enforcement out of prompts), 11 (record-keeping and transparency duties), 13 (registry entries for prompts and skills), 14 (approval prompts shown to humans must come from structured data, not model prose), and the ROE (to be defined, plan section 12).

Test and eval checklist

ID Stage Check Pass criteria
PA-01 Design Assembly contract documents every layer, source, trust level, budget and order Contract reviewed and committed
PA-02 Build Cache-prefix lint: no per-request variable above the last breakpoint Lint passes in CI
PA-03 Build Tool definitions rendered in deterministic order Two renders of the same config are byte-identical
PA-04 Build Layer budgets sum below window minus output reserve Static check passes for each target model
PA-05 Build Every skill validates and has metadata.version and owner Validator passes; no missing fields
PA-06 Build Untrusted content (retrieved, tool, memory, uploads) is wrapped and labelled as data Unit test on assembler output
PA-07 Test Prompt regression suite on every prompt, skill or instruction PR At or above gate (practitioner default 95%), zero critical failures
PA-08 Test Progression test on model change, including instruction-deletion trials No regression; deletable instructions removed
PA-09 Test Long-context degradation test at 25%, 50% and 75% of window Accuracy within agreed tolerance of short-context baseline
PA-10 Test Needle-position test (start, middle, end) for critical facts No position below agreed recall threshold
PA-11 Test Compaction preserves decisions, IDs, open tasks and approvals 100% of listed facts present after compaction on fixture sessions
PA-12 Test Pre-compaction transcript archived Archive exists and hash matches for every compaction event
PA-13 Test Structured output conformance including refusal and max-token paths 100% parse on valid outputs; refusal and truncation handled without crash
PA-14 Test Cache hit rate on replayed production-like traffic Cache read share of input meets target set in design
PA-15 Test Indirect prompt injection via documents, tool results and memory Attack success at or below risk-tier threshold; no high-tier action executed
PA-16 Test System prompt extraction attempts No secrets present; extraction does not expose credentials or internal endpoints
PA-17 Release Promotion by label or alias move only; previous version immutable Registry history shows label move; no in-place edit
PA-18 Release Canary or guarded rollout watches errors, tokens, latency, feedback Automatic rollback fires in a drill
PA-19 Run Every trace stamped with prompt, skill, tool-description hash and model versions 100% of sampled traces carry all version fields
PA-20 Run Context manifest and token-per-layer metrics monitored Alerts on budget breach and cache hit-rate drop
PA-21 Run Quarterly instruction and skill pruning review Review record; size budgets met

Governing policies and procedures

From the CoE policy set (draft; control IDs on the policy crosswalk):

Unverified or needs review

  • The "up to 30%" quality gain from placing documents first and the question last is a vendor's own test with no stated baseline [6].
  • Per-layer budget percentages (output reserve, documents share) and the 95% eval gate are practitioner defaults, not sourced standards. The CoE should confirm them by risk tier.
  • The OpenAI Model Spec chain of command is cited from OpenAI's explanatory post [19]; the full Model Spec text, including how tool outputs are ranked, was not opened in this pass.
  • Provider defaults for compaction and context editing (150,000 and 100,000 tokens) are from one vendor's beta features [9][11] and may change; other providers and frameworks differ.
  • The plan's 200,000-token bound for "whole corpus in the prompt" comes from earlier research notes (plan section 9) and was not re-verified here.
  • OpenAI structured-output schema limits (properties, nesting depth) were not shown on the opened page [13].
  • Review: whether the CoE mandates one templating format (Jinja2, Handlebars, Dotprompt) or allows several.

Sources

  1. Effective context engineering for AI agents, Anthropic (29 Sep 2025), https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents, accessed 30 Nov 2026.
  2. Context Rot: How Increasing Input Tokens Impacts LLM Performance, Chroma (14 Jul 2025), https://www.trychroma.com/research/context-rot, accessed 30 Nov 2026.
  3. Lost in the Middle: How Language Models Use Long Contexts, Liu et al., TACL, https://arxiv.org/abs/2307.03172v3, accessed 30 Nov 2026.
  4. Prompt caching, Claude Platform documentation, Anthropic, https://platform.claude.com/docs/en/build-with-claude/prompt-caching, accessed 30 Nov 2026.
  5. Prompt caching guide, OpenAI API documentation, https://developers.openai.com/api/docs/guides/prompt-caching, accessed 30 Nov 2026.
  6. Long context prompting tips, Claude Platform documentation, Anthropic, https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/long-context-tips, accessed 30 Nov 2026.
  7. Agent Skills specification, agentskills.io, https://agentskills.io/specification, accessed 30 Nov 2026.
  8. Manage Claude's memory (instruction files), Claude Code documentation, Anthropic, https://code.claude.com/docs/en/memory, accessed 30 Nov 2026.
  9. Compaction at a token threshold, Claude Platform documentation, Anthropic, https://platform.claude.com/docs/en/build-with-claude/compaction-threshold, accessed 30 Nov 2026.
  10. Compaction overview, Claude Platform documentation, Anthropic, https://platform.claude.com/docs/en/build-with-claude/compaction, accessed 30 Nov 2026.
  11. Context editing, Claude Platform documentation, Anthropic, https://platform.claude.com/docs/en/build-with-claude/context-editing, accessed 30 Nov 2026.
  12. Structured outputs, Claude Platform documentation, Anthropic, https://platform.claude.com/docs/en/build-with-claude/structured-outputs, accessed 30 Nov 2026.
  13. Structured Outputs guide, OpenAI API documentation, https://developers.openai.com/api/docs/guides/structured-outputs, accessed 30 Nov 2026.
  14. Prompt version control, Langfuse documentation, https://langfuse.com/docs/prompt-management/features/prompt-version-control, accessed 30 Nov 2026.
  15. Prompt Registry, MLflow documentation, https://mlflow.org/docs/latest/genai/prompt-registry/, accessed 30 Nov 2026.
  16. CI/CD integration, Promptfoo documentation, https://www.promptfoo.dev/docs/integrations/ci-cd/, accessed 30 Nov 2026.
  17. Agent instruction bloat (Technology Radar Vol. 35, Caution), Thoughtworks (4 Nov 2026), https://www.thoughtworks.com/radar/techniques/agent-instruction-bloat, accessed 30 Nov 2026.
  18. The Instruction Hierarchy: Training LLMs to Prioritize Privileged Instructions, Wallace et al., arXiv (19 Apr 2024), https://arxiv.org/abs/2404.13208, accessed 30 Nov 2026.
  19. Our approach to the Model Spec, OpenAI (25 Mar 2026), https://openai.com/index/our-approach-to-the-model-spec, accessed 30 Nov 2026.
  20. Built-in middleware, LangChain documentation, https://docs.langchain.com/oss/python/langchain/middleware/built-in, accessed 30 Nov 2026.
  21. Key changes in specification 2026-07-28, Model Context Protocol, https://modelcontextprotocol.io/specification/2026-07-28/changelog, accessed 30 Nov 2026.
↑