context-engineering: tagged artifacts
Back to the context-engineering guide
theory · notes · agentic-systems · reference · sources · work
theory
- A capable agent needs methodology selection, not just relevant knowledge - A capable agent may know many individually relevant but mutually incompatible approaches, so task control requires selecting a governing methodology rather than merely supplying relevant knowledge
- A compact cue can activate a methodology already in model weights - A compact cue can activate a much larger methodology already represented in model weights, trading very low context cost for model-dependent reconstruction rather than exact retained specification
- A compact, refreshable whole-picture narrative can replace infeasible fragment reconciliation - Holistic rewrite shifts reconciliation from each consumer to the author, but only when the whole-picture narrative can fit within effective context and be refreshed before the narrative goes stale
- A context-operation interface bounds the projections its policy can realize - Explains why improving context selection within a fixed operation interface cannot establish that the interface admits every useful active-context projection.
- A knowledge base should support fluid resolution-switching - Defines resolution-switching as movement among KB views with different scope and detail, then inventories the mechanisms and limits of that qualitative criterion
- A linked note's durable payload is what its consumption path cannot reliably supply - Retain the recognition anchor and rationale the intended consumption path cannot reliably supply — an enforced path can carry the anchor itself; reconstructable framework recap factors into the linked artifact, tested by downstream effects
- A retrieval miss is a local reflective-path failure - A missed relevant artifact leaves its represented aspect inert for the affected task and discovery route, while other loading paths and reflective aspects can remain causally connected
- A specific intent may out-yield local rationales, but contingent facts stay separate - Conjectures that an unrecoverable governing intent yields more local rationale per token than rationale snippets, while contingent design facts need their own record
- Acceptance authority does not require a separate repair session - Separates exact checking, acceptance authority, and repair-session placement; explains when worker-local feedback avoids a handoff and when a fresh context is justified.
- Access burden and transformation burden are distinct query dimensions - Separates the system-relative cost of finding required inputs from producing an answer, so query systems can diagnose which work remains as retrieval and reasoning interact
- Active work state is not retrospective memory or chat history - Active work state needs current pointers, evidence gates, and closure; treating it as retrospective memory or chat history preserves the wrong state
- Adaptation taxonomies by optimization locus omit artifact governance - Adaptation taxonomies keyed to optimization locus and signal source (A1/A2/T1/T2, S_{k+1} ← U(S_k, τ_k, F_k)) omit substrate, form, lineage and authority; the gap is decisive chiefly for weakly verified readable artifacts
- Addressability grain, not compression ratio, sets a matched selective-read floor - For recoverable content and a known one-unit question, a summary lowers the matched raw read-volume floor only when its path loads less answer-bearing material than the source path; whole-artifact compression alone does not decide that relation
- Agent memory is a crosscutting concern, not a separable niche - Memory decomposes into storage (solved), retrieval/activation (context engineering), and learning (learning theory) — treating it as a standalone category hides that the hard problems are at the intersections
- Agent memory needs discoverable, loadable, composable, trusted knowledge under bounded context - Distinguishes four use-time requirements for remembered knowledge—discoverability, loadability, composability, and calibrated trust—from system-level activation.
- Agent-runtime analysis should separate scheduling, context assembly, and external state - For runtimes composed of bounded model calls, separating control progression, per-call context, and external state or action services localizes failures even when one implementation owns all three
- Agents navigate by deciding what to read next - Models agent navigation as repeated follow/skip judgment under bounded context: cue diagnosticity must repay its own context cost, so longer pointer context is not automatically better
- AGENTS.md should be organized as a control plane - Theory for deciding what belongs in AGENTS.md using loading frequency and failure cost, with layers, exclusion rules, and migration paths
- Always-loaded context mechanisms in agent harnesses - Survey of always-loaded context mechanisms across agent harnesses — system prompt files, capability descriptions, memory, and configuration injection — cataloguing what each carries, how write policies differ, and where the gaps are
- An insufficient summary precedes the source rather than replacing it - When a summary cannot license a reliability-compliant stop, the authoritative fallback remains in the path; only fallback work the summary removes can offset its own cost
- Areas exist because useful operations require reading notes together - Explains why orientation and comparative reading need bounded, sufficiently related note sets, while fixed sizes, membership rules, tags, and index layouts remain implementation choices
- Borrowing can operate through retained artifacts or weight activation - Established external methodologies can become operative either by being explicitly retained in the system or by activating a model's pretrained representation; the two routes trade context economy against inspectability and revisability
- Capability placement should follow autonomy readiness - Three tiers — skills (autonomous-ready), instructions (reusable-but-steered), methodology notes (exploratory) — keep AGENTS.md free of capability inventories with a clear promotion path
- Checking retained results trades cost against reliance risk - Retaining a derived result saves recurring work; how often to check it trades check cost against the risk of relying on stale or wrong content, worked through the completeness mark and the connect report
- Claim-routed reading may beat reading-first for synthesis notes - Conjecture: writing a provisional claim first and reading only passages likely to overturn it may build a better-warranted synthesis note at lower context cost than reading everything first — motivated by Karnofsky, untested here.
- Context contamination operates below an agent's compliance reasoning - A controlled test found fine-grained stance drift despite explicit detection and refusal; exclusion guarantees non-exposure, while instruction-level mitigation remains an empirical question
- Context efficiency is the central design concern in agent systems - Context is the single scarce resource in agent systems, and it is scarce for two distinct reasons — per-window degradation (feasibility) and aggregate token economics (cost) — of which feasibility is the binding one
- Context engineering - Definition — context engineering is the discipline of designing systems around bounded-context constraints; its operational core is routing, loading, scoping, and maintenance for each bounded call
- Context isolation for focus conflicts with global prioritization - Isolating an agent's context to solve a problem removes the competing work that global prioritization requires; explains priority flattening and the trade-off in splitting execution from triage
- Conversation vs prompt refinement in agent-to-agent coordination - Conversation preserves the execution trace; prompt refinement compresses it into a clean handoff. The right choice depends on architecture and how much intermediate work should survive
- Decomposition heuristics for bounded-context scheduling - Working heuristics for symbolic scheduling over bounded LLM calls — separate selection from joint reasoning, choose representations not just subsets, save reusable intermediates in scheduler state
- Design for the first-time human, except on access cost - Uses competent-newcomer ergonomics as a property-by-property default, then isolates access paths that charge a consumer for a selected slice or a whole artifact
- Design rationale must preserve decision premises its interpreter cannot regenerate - Retention test for source-checkout design rationale: keep current decision premises not faithfully recoverable from implementation, git, and general knowledge; treat recoverable, role-free explanation as a cache
- Designing a Memory System for LLM-Based Agents - Derives agent-memory design pressures and links to a requirements inventory for agents designing or evaluating memory systems
- Elicitation requires maintained question-generation systems - Four elicitation strategies ordered by user expertise required, composable into review architectures with maintenance loops that prevent ossification
- Flat memory predicts specific cross-contamination failures that are empirically testable - Flat memory predicts three cross-contamination failures — search pollution, identity scatter, insight trapping — testable via an observation protocol against real agent systems
- Frontloading can specialize instructions around known inputs - Frontloading can specialize instructions for known inputs; the partial-evaluation comparison requires preservation of meaning, which shared text alone does not establish
- Frontloading spares execution context - Pre-computing known instruction inputs and inserting their results spares execution-context budget inside a later LLM call
- History has one chance to become checkable - An artifact's production history is convertible to later-checkable form only at production time, via records/attestation or re-derivability; after that a bounded reviewer sees only carried state
- How do we fight bloat in agent-produced systems? - Standing query on controlling code, prose, and structural bloat in mixed natural-language and code systems produced by agents, where software anti-bloat advice falls short.
- In-context learning presupposes context engineering - In-context learning only works when the right knowledge reaches the context window — the selection machinery that ensures this is itself learned and refined over deployment
- Information value is observer-relative - Information value is observer-relative: prior knowledge, tools, compute, and goals determine extractable structure, grounding use-shaped reshaping and discovery.
- Instruction specificity should match loading frequency - The loading hierarchy (CLAUDE.md → skill descriptions → skill bodies → task docs) should match instruction specificity to loading frequency — always-loaded context competes for attention every session
- KB goals in always-loaded context guide inclusion decisions - Without explicit goals in the always-loaded control-plane file, agents cannot reject well-written but off-scope material — a universal quality guide provides writing criteria but not domain scope
- Knowledge storage does not imply contextual activation - Separates knowledge that exists, knowledge loaded into context (read-back), and knowledge that actually changes behavior (activation); explains why retrieval and long context do not guarantee activation
- Knowledge-access architecture must be evaluated end to end, not by retrieval alone - Explains why retrieval measures and storage-substrate labels cannot proxy for task-relative quality across discovery, loading, transformation, activation, and upkeep
- Legal drafting solves the same problem as context engineering - Legal drafting parallels context engineering because both write ambiguous natural-language specifications for judgment-based interpreters, but law develops constraining more than codification
- Link-following and search impose different metadata requirements - Compares contextual local steps with long-range search and explains why these recurring navigation modes impose different metadata requirements on an agent knowledge base
- Links encode conditional possibilities, not obligations - Links encode conditional possibilities, not obligations — every label must name a specific reader-need (the condition under which following pays off); content required for all reachable readers should be inlined, not linked
- LLM context is composed without scoping - Flat context concatenation lacks local scope and produces name collision, contamination, and spooky action at a distance; selected invocation inputs limit direct access without establishing scope within the supplied context
- LLM contexts interpret instructions and content through the same token medium - LLMs interpret instructions and content through one token medium, enabling natural-language artifacts to alter behavior without translation while requiring architecture to enforce role, scope, and authority boundaries
- LLM recompute cost shifts the store-vs-recompute balance - For model-facing derived values, costly model-side recomputation shifts cache economics toward checked materialization, but persistence pays only when its total expected cost beats the alternatives and the copy substitutes for work
- LLM-mediated schedulers are a degraded variant of the clean model - When the agent scheduler lives inside an LLM conversation it becomes bounded and degrades; three recovery strategies — compaction, externalisation, factoring into code — restore the clean separation to increasing degrees
- Load-bearing vocabulary collisions should be prevented or visibly scoped at write time - Unqualified technical senses have no reliable namespace in natural-language content; schema slots, rare compounds, and linked clause frames scope them at write time; audits and remediation recover when prevention fails
- Local materialization should outperform distant natural-language declarations - Predicts that, for distant or non-obvious uses of a natural-language declaration, generated local materialization will outperform declaration-only presentation without creating a second maintenance authority
- Memory design adds operational axes to artifact analysis - Memory design needs operational policy axes (capture, derivation, activation, authority assignment, lifecycle, evaluation) on top of substrate, form, lineage, and behavioral authority
- Memory-backed personalization can look like model improvement - Distinguishes user-specific gains supplied by retained intent from gains in the model that interprets the assembled context.
- Minimum viable vocabulary is the naming set that most reduces extraction cost for a bounded observer - Defines minimum viable vocabulary as the names that most reduce a bounded observer's extraction cost, connecting conceptual thresholds to an information-theoretic optimization
- Model signals could guide harness-level context unloading and recall - Very speculative: attention statistics and explicit output messages could help a harness decide what context to unload; model-generated future-use conditions could guide restoration.
- Model upgrades obsolete notes by function rather than uniformly - Separates note functions stronger models can absorb—activation cues, weight-resident knowledge, and multi-step scaffolding—from durable functions such as commitments, local history, and preserved search work.
- Model-resolved indirection adds interpretation work to LLM execution - A reference adds model-side interpretation only when the model must resolve it; upstream literalization is worthwhile when binding, token, authority, and regeneration costs favor it
- Natural-language project state may specialize weight-resident search heuristics - The natural-language part of project state may specialize general search heuristics already represented in an LLM's weights by supplying current intent, theory, branch history, and constraints
- Naur's compiler case tests one historically bounded documentation-and-consumption system - Naur's compiler transfer failure rules out more documentation of the same kind, but tested one historically bounded package and consumption process rather than every possible rationale, indexing, retrieval, and activation system
- Naur's human-only conclusion needs more than the absence of explicit criteria - Naur's human-only conclusion needs a further premise connecting unformulated judgment to computational inability; this reading preserves his functional tests without claiming that learned criteria are inexpressible
- Open-domain memory retention needs a declared output spec - Explains why an input stream alone can't answer 'what to store' in open-domain memory design; a declared output spec supplies the missing inclusion criterion.
- Opposed recompute factors do not decide documentation segmentation - When audiences trade per-reconstruction savings against recurrence, neither factor alone determines cache value; among feasible alternatives, segmentation separately depends on whether specialization repays every cost introduced by the split
- Periodic KB hygiene should be externally triggered, not embedded in routing - Routing instructions serve the current task; periodic hygiene is triggered externally (user, heartbeat, CI), so embedding it in always-loaded routing blurs two responsibilities and adds session noise
- Pointer design tradeoffs in progressive disclosure - Compares fixed, query-time, and crafted retrieval pointers across specificity, cost, availability, accuracy, and authoring dependence
- Promotion selects for unreliable activation, and the regress ends only at an external trigger - Recasts promotion from 'the consumer lacks this' to 'the consumer will not apply this unprompted', and requires delivery to have a root firing event independent of that prior activation
- Raw accumulation does not create usable memory - Accumulation preserves material, but usable agent memory requires ingress work that adds handles, scope, relationships, provenance, trust signals, and lifecycle pressure.
- Retaining episode evidence keeps a distilled rule open to re-examination - Keeping relevant episode evidence and its relation to a distilled rule preserves a route for re-examining that rule; reconstruction, comparative value, and correct generalization still require testing
- Rule-based context selection needs a pre-existing signal - A rule-based selector can target one case only when a rule-ready signal already distinguishes it; otherwise the system must wait, load broadly, or infer relevance from task and candidate content
- Scenario decomposition drives architecture - Deriving architectural requirements by decomposing concrete user stories into step-by-step context needs — not from abstract read/write operations but from what the agent actually has to load at each stage
- Semantic sub-goals that exceed one context window become scheduling problems - Some semantic subgoals exceed one context window, so they must be partitioned into smaller semantic judgments with symbolic collection, filtering, and staged summarization between them
- Semantic work can be relocated but not eliminated - A meaning-dependent judgment is never removed, only placed — moved upstream where its inputs exist (amortized) or off a bottlenecked context (offloaded); 'free at use-time' always means paid earlier
- Session history should not be the default next context - Storing execution history and loading it into the next agent call are separate decisions; chat and framework-owned tool loops conflate them by making session history the default next context
- Seven documentation cases left routing and synthesis - A seven-artifact Commonplace sweep found that direct source access removed exact-fact prose while discovery maps and cross-component boundaries survived; it does not establish a universal documentation ratio
- Short composable notes maximize combinatorial discovery - Short notes let readers combine claims for new questions. A longer synthesis earns its place when readers need the reasoning as a whole.
- Skill discovery re-fires in every sub-agent context, not just the top-level invocation - Skill discovery is per-context and autonomous — every installed skill is re-matched in each sub-agent context, even ones a parent narrowed, so a delegating skill's own discoverability is a leak vector
- Skills are instructions plus routing and execution policy - Skills add structured discovery, user-facing invocation, and declarative execution policy (tool permissions, model override, context isolation) beyond the shared procedure
- Soft degradation can bind before the hard cap even when required evidence fits - For quality-sensitive agent work whose required evidence fits within the provider window, volume, complexity, and interference can silently constrain usable context before the hard cap
- Soft-bound traditions as sources for context engineering strategies - Survey of twelve soft-bound traditions as candidate sources for context engineering strategies, with a three-tier assessment of what transfers, what's plausible, and what's blocked
- Specification-level separation recovers scoping before it recovers error correction - OpenProse-like DSLs expose control flow and discretion boundaries while leaving scheduling and validation on the LLM substrate, creating an intermediate regime between flat prompting and symbolic scheduling
- Subtasks that need different tools force loop exposure in agent frameworks - When decomposition creates child tasks with different tool surfaces, the parent must construct fresh calls for each child, so a framework-owned loop is no longer the right control surface
- System-definition artifacts are crystallized reasoning under context scarcity - Separates heuristic rules that substitute for unavailable read-time reasoning from authority-bearing constraints and symbolic codification, which remain useful even with abundant context
- The chat-history model trades context efficiency for implementation simplicity - Chat history persists because appending messages preserves information and avoids interface design, but that convenience trades away selective loading under bounded context
- The four-field record exposes an efficiency, security, and sovereignty risk triad - The four artifact-analysis fields exist to surface three architectural review concerns over retained behavior — efficiency, security, and sovereignty — with sovereignty (owner control to inspect, regenerate, delete, roll back) as the new axis
- The practical scheduler is the host language, not a reified select - The simplest practical orchestration library demotes the tool loop to a returning, per-call-parameterized function and lets ordinary host-language code play select and K — reifying K only when the run must outlive its process or outgrow its memory
- Topology, isolation, and verification form a causal chain for reliable agent scaling - Topology, isolation, and verification may form a strict dependency chain rather than independent design choices — tested against the simpler account that good decomposition implies the other two
- Trace-extracted memory earns authority per operation, not at capture - Trace memories begin as records; verification, abstraction, and consultation earn authority under progressively harder oracles, while unverified stores accumulate guesses presented as knowledge
- Under sub-agent decomposition, feasibility is the heaviest fork's net load - Shows why decomposition changes feasibility from total operation cost to the largest residual load left on any fork after work is shifted to siblings or the parent
- Whether to supply a reference up front depends on the task - A release checklist and a spelling correction illustrate when supplying a referenced rule saves a consequential lookup and when a link is enough.
- Writing styles are strategies for managing underspecification - Maps descriptive, prescriptive, prohibitive, explanatory, and conditional context-file styles to distinct ways of narrowing agent interpretation, each trading constraint against generality
notes
- Checklist for Agentic Memory Systems - Operational checklist of 11 agent-memory requirements—capture, import, traces, extraction, access modes, activation, promotion, alignment, lifecycle, authority, and effect evaluation—for auditing or designing a memory system
agentic-systems
- Academic Research Skills - Academic Research Skills as a prompt-defined Claude Code research pipeline with narrow executable checks, host-dependent orchestration, protocol-only resume, and conflicting terminal gate rules
- AI Agents in Depth - Whole-book comparison of AI Agents in Depth with Commonplace, separating broad architectural convergence from differences in memory admission, epistemic warrant, governance, and orchestration
- beads_rust - beads_rust as a local active-work and coordination substrate: transactional CLI claims and workflow gates, explicit external execution and Git boundaries, and weaker parity across MCP, inherited-context, and shipped instruction paths
reference
- Artifact function as a routing field - Proposal: whether an artifact_function declaration should expose a document's intended whole-artifact job for writing and review routing without asserting atomicity
- Checked inline blocks for shared instruction text - Proposal: reuse natural-language authoring mechanics in specialized writer prompts through literal inlining backed by deterministic source-to-copy checks
- Deterministic write-context assembly - Proposal: whether code should assemble a target's fixed authoring context while keeping named input roles closed rather than opening a generic provider mechanism
- Self-orientation for small KBs - Proposal: in KBs small enough to scan whole, the writer performs pre-write orientation itself with the orientation question stated explicitly, instead of delegating to a reporter
- Tag maintenance and derived browsing - Proposal: test temporary topic groupings and reviewed tag-maintenance suggestions before changing Commonplace’s canonical tag structure.
sources
- Ingest: How Is LLM Reasoning Distracted by Irrelevant Context? (GSM-DC benchmark) - GSM-DC benchmark: irrelevant context degrades LLM math reasoning as a depth-dependent power law in distractor count, hurting both path selection and arithmetic; hard-distractor training and PRM search help
work
- Adaptive dependencies force width, reopening, or sequential rounds - Superseded sketch: the width-independent adaptive-round claim is false; retain the interaction-cut argument and replace adaptivity with a breadth/lookahead tradeoff
- Brainstorming how to enrich web search - Design exploration for enriching web search by reusing /connect's dual discovery and articulation testing on results, building a temporary research graph before bridging to KB
- Exact retrieval over semantically opaque items requires linear inspection - Worst-case lower bound for opaque retrieval — without a pre-built pointer layer, exact discovery of all relevant items requires linear semantic inspection
- Few calls require width and long chains require verification - Working frontier note whose interface bound remains useful but whose reliability caveat needs a correlation correction and verifier-spacing replacement
- In one episode, recognition appeared only in the corpus-loaded run - One 2026-09-01 episode: a repository-free synthesis re-derived retained notes and reproposed rejected framings while the corpus-loaded session recognized them; an uncontrolled bundle, recorded as a starting point for better contrasts
- No bounded summary preserves all distinctions for a rich query family - Counting lower bound on bounded summaries: exact answering over a query family requires at least one summary code per query-induced answer profile