AIOS Proresearch
AIOS Intelligence System · Research Overview

Part II · Context, Memory, Files, and Composition

Context Engineering as Content Composition

Context is an authored briefing for one judgment, not a pile of related text. It explains what the work serves, what is true or disputed, what evidence matters, how to approach it, what may change, and where deeper sources can be found.

Context compositionOperation-aware contextEvidence budgetContext warrant

1. Context is part of the intelligence

For one model invocation, the supplied context is the world the model can reason within. Choosing that world is therefore not transport plumbing. It is an intelligence act.

AIOS defines a reasoning ground as:

A bounded, purpose-shaped account that makes one judgment possible while preserving the uncertainty, disagreement, authority, and source access needed to keep that judgment honest.

It is the active expression of the semantic situation for one cognitive movement.

Context composition is therefore the attention-formation function of the reasoning turn. It does not merely deliver information to intelligence after the important work has happened. It establishes what is in focus, why it matters, which relationships are visible, what standing they have, what remains intentionally absent, and which consequence the next judgment may responsibly produce.

This function can cross semantic and mechanical layers. Deterministic mechanisms can resolve canonical identities, collect declared regions, check revisions, enforce quantity limits, and record a warrant. People or bounded model judgments may be needed to interpret purpose, relevance, conflict, semantic altitude, or loss. The system provides the structures through which attention is formed; the intelligence moving through those structures is not reducible to the assembly mechanism itself.

That expression may draw from three context horizons at once: the immediate frame, the active semantic situation, and the durable domain ground. Their relationships remain available to the system; only the movement-relevant projection becomes model-visible context.

The relevant optimization is not maximum recall. It is a coherent composition of:

This is the Fractal Seed expressed at the scale of one model call. The context establishes why the movement matters, develops how its ground bears on the question, and names what judgment or artifact should return. The model receives real semantic work, but only within that bounded movement. Any accepted result must then land in local artifacts, records, or relationships so that it changes the ground from which the next context is composed.

2. The authored-argument model

Every included region should have a reason to be present.

It should do at least one of the following:

If it does none of these, it is probably noise in the current context.

3. The natural order of reasoning ground

The authored order of reasoning ground

Model-facing context becomes an accountable argument through bearing, current state, commission, focal ground, guidance, authority, and warrant.

flowchart TB B["1. Bearing\nWhat this movement serves"] S["2. Current situation\nAccepted · live · contested · changed"] C["3. Commission\nExact judgment and semantic product"] F["4. Focal ground\nEvidence · artifact · decisions · alternatives"] G["5. Guidance\nMethod · distinctions · quality · failure boundaries"] A["6. Authority and return\nWhat may change · what to return · when to stop"] W["7. Context warrant\nWhy included · what omitted · where to descend"] B --> S --> C --> F --> G --> A --> W
Context composition · canonical06-context-engineering-as-content-composition--m01.mmd
Text equivalent

1. Bearing — What this movement serves → 2. Current situation — Accepted · live · contested · changed; 2. Current situation — Accepted · live · contested · changed → 3. Commission — Exact judgment and semantic product; 3. Commission — Exact judgment and semantic product → 4. Focal ground — Evidence · artifact · decisions · alternatives; 4. Focal ground — Evidence · artifact · decisions · alternatives → 5. Guidance — Method · distinctions · quality · failure boundaries; 5. Guidance — Method · distinctions · quality · failure boundaries → 6. Authority and return — What may change · what to return · when to stop; 6. Authority and return — What may change · what to return · when to stop → 7. Context warrant — Why included · what omitted · where to descend.

The order carries meaning: purpose arrives before evidence, and the exact judgment arrives before methods or constraints that could otherwise dominate it. Authority bounds the return, while the final warrant explains why the composition is fit and where omitted ground can re-enter.

This order makes the context legible as an argument:

  1. why attention is being assembled;
  2. what the situation presently is;
  3. what judgment is required;
  4. what material bears on it;
  5. how the work may be improved;
  6. what consequence is allowed;
  7. why this composition is accountable.

The order can change when the work requires it, but the composer should be able to explain why.

4. Three selection tests and an evidence budget

Necessity

What would the intelligence otherwise need to reconstruct or guess?

Examples: governing purpose, exact definition, current artifact state, a binding decision, an unfamiliar domain distinction.

Distortion

What would become misleading if omitted or compressed further?

Examples: material dissent, uncertainty, counterevidence, a limitation on an accepted claim, the difference between proposal and decision.

Interference

What unrelated frame, obsolete instruction, duplicated explanation, premature solution, or overly broad history would this material import?

These tests produce a better selection criterion than simple semantic similarity.

They operate inside an evidence budget, not merely a token budget. The composer first identifies the operation being performed:

The operation determines which kinds of evidence, how many independent sources, what resolution, and what ordering are sufficient. A local wording change may need one exact passage and whole-document bearing. A contested decision may need several sources, dissent, temporal state, and an explicit route back to primary evidence.

The budget accounts for attention, latency, privacy, cost, and consequence as well as context length. Its quality is judged through relevance density, standing, freshness, placement, sufficiency, and exact source descent. Neither the smallest nor the largest possible context is inherently best.

5. Fixed composition, fresh content

The architecture can preserve a stable composition while replacing its content each turn.

=== GUIDANCE ===
[FOCUS] — why this judgment is happening
[ROLE] — the relevant operational standpoint

=== CONTEXT ===
[PURPOSE] — current governing purpose
[SITUATION] — accepted, contested, changed, unknown
[ARTIFACT_MAP] — current structure at the needed resolution
[EXACT_GROUND] — selected source or artifact passages
[PRACTICE] — relevant workflow, method, or quality conditions

=== INPUT ===
[COMMISSION] — exact requested transformation
[MESSAGE_OR_TARGET] — present object
[RETURN] — expected product, authority, and stopping condition

For every block, the composition contract can name:

The labels above are illustrative. Model-facing language should use human meaning rather than unnecessary implementation vocabulary.

6. Context is prepared by altitude

Different judgments require different resolutions.

The default is the coarsest sufficient semantic altitude: the highest-level representation capable of supporting the intended judgment and consequence without hiding a material distinction. Context descends when a named need makes that representation inadequate. The need may be an exact quotation, contested compression, unresolved evidence, structural ambiguity, local language repair, or an authorized mutation. The goal is not to remain abstract; it is to prevent detail from entering without a purpose it can serve.

Three dimensions should not be collapsed. A horizon describes temporal and attentional reach: immediate, working, or durable. An altitude describes the semantic scale of the object: passage, document, structure, project, or domain. An operation describes the transformation being attempted: comparison, revision, verification, planning, or another cognitive movement. Context composition selects across all three dimensions. For example, a passage edit operates at low altitude but may still require one durable decision; a strategy review operates at high altitude but may need one exact immediate source.

AltitudeTypical purposePreferred groundGround usually withheld
Immediate turnDevelop the live thoughtCurrent file, purpose, recent movement, relevant map, current inputWhole unrelated project corpus
Passage editMake an exact bounded changeExact target, neighboring seams, protected meaning, whole-document bearingFull session history
DocumentCompose or evaluate coherent artifactPurpose, structure, selected sources, exact draft, criteriaUnrelated files and archive
StructureChange movements and relationsDocument Map, companion metadata, dependencies, pending commissionsMost line-level prose until needed
Workflow stagePerform one expert stageStage purpose, role, inputs, prior outputs, quality barFull workflow library and other projects
ProjectAlign outcomes, documents, plans, returnsProject purpose, plan, document maps, decisions, relationshipsComplete prose of every document
Evidence reviewTest claims and supportClaims, exact sources, provenance, counterevidence, definitionsDecorative prose and unrelated plans
Practice reviewTest a recurring methodOccurrences, outcomes, counterexamples, scope, exact evidence descentComplete transcripts of all episodes

Metadata-first reading protects width. Exact prose re-enters when wording, evidence, or mutation depends on it.

7. Layered detail and exact descent

Context is compressed by use rather than once for all purposes.

Exact descent and semantic ascent

Context descends from a corpus to exact prose, while corrections found below travel upward to alter movement, document, and project bearing.

flowchart TB W["Workspace or corpus synthesis"] --> P["Project situation and relationships"] P --> D["Document Home and accepted map"] D --> M["Movement contribution and anchor"] M --> X["Exact prose, source, or evidence"] X -. "support or correction" .-> M M -. "changed contribution" .-> D D -. "changed project bearing" .-> P
Source descent06-context-engineering-as-content-composition--m02.mmd
Text equivalent

Workspace or corpus synthesis → Project situation and relationships; Project situation and relationships → Document Home and accepted map; Document Home and accepted map → Movement contribution and anchor; Movement contribution and anchor → Exact prose, source, or evidence.

The solid arrows narrow resolution only when exact detail is needed. The dotted arrows carry support or correction upward: descent is not complete until the recovered material is interpreted again at the scale where its consequence belongs.

The system descends to exact source when:

No projection outranks the material it describes.

Descent is complete only when the recovered detail is reinterpreted at the receiving altitude. An exact sentence may change a movement map; a corrected movement map may change a document argument; a source contradiction may reopen a project decision. Copying low-level material into the capsule without restoring its higher-level bearing is retrieval, not completed composition.

8. Context standing must be readable

Natural language should make authority explicit:

Structural labels can reinforce these differences but should not replace the sentences explaining what they mean in the case.

9. Contradiction belongs in optimized context

An optimizer that selects only support for the leading conclusion is not optimizing for intelligence. It is optimizing for narrative consistency.

Contradictory or minority ground should enter when it could change:

Under context pressure, a minority account can be compressed into:

“Other views exist” is not enough.

10. The context warrant

A consequential context composition should be inspectable through a short warrant stating:

The warrant is not hidden chain of thought. It is an accountable description of the finished selection.

This makes context composition measurable: researchers can compare the warrant, supplied context, omitted ground, and resulting judgment.

11. Reasoning guidance is composed, not merely retrieved

Guidance can come from:

Stable guidance should be used when its occasion, object, boundaries, and result fit. It can be adapted with local evidence and terms. Multiple guidance items should be combined only when one judgment remains primary.

The receiving model should see the coherent guidance, not the catalog, rejected candidates, scoring trace, or assembly machinery.

When guidance decomposes work into stages, every staged judgment must have a named consumer and dependency. A review that no later judgment reads, a summary that no decision uses, or a framing step that does not change the commission is orchestration overhead rather than context intelligence.

12. Dynamic controls shape composition

The established thinking architecture uses compact controls such as:

Later ontology work adds multi-valued context signals and an optional navigation focus.

These controls can change:

The model selects semantic orientation from supplied options. Deterministic mechanisms resolve identities and compose the resulting natural-language ground.

13. Context-composition pipeline

From intention to a warranted context capsule

Purpose and object become model-visible ground through evidence budgeting, source checks, selection tests, named descent, authority, and a warrant.

flowchart LR I["Current intention and object"] --> O["Determine judgment and coarsest sufficient altitude"] O --> B["Name operation and evidence budget"] B --> S["Resolve canonical sources and standing"] S --> R["Retrieve candidate ground through fitting access paths"] R --> T["Apply necessity · distortion · interference"] T --> N{"Named need for deeper ground?"} N -->|"yes"| D["Descend to exact source or artifact"] D --> U["Reinterpret at the receiving altitude"] U --> G["Select or compose guidance"] N -->|"no"| G G --> L["Layer exact and compressed detail"] L --> K["Bind authority, product, stop condition"] K --> W["Record context warrant"] W --> C["Assemble model-visible capsule"] C --> J["Bounded judgment"]
Context composition06-context-engineering-as-content-composition--m03.mmd
Text equivalent

Current intention and object → Determine judgment and coarsest sufficient altitude; Determine judgment and coarsest sufficient altitude → Name operation and evidence budget; Name operation and evidence budget → Resolve canonical sources and standing; Resolve canonical sources and standing → Retrieve candidate ground through fitting access paths; Retrieve candidate ground through fitting access paths → Apply necessity · distortion · interference; Apply necessity · distortion · interference → Named need for deeper ground?; Descend to exact source or artifact → Reinterpret at the receiving altitude; Reinterpret at the receiving altitude → Select or compose guidance; Select or compose guidance → Layer exact and compressed detail; Layer exact and compressed detail → Bind authority, product, stop condition; Bind authority, product, stop condition → Record context warrant; Record context warrant → Assemble model-visible capsule; Assemble model-visible capsule → Bounded judgment.

The central diamond controls depth: exact sources enter only for a named need, and anything recovered must be reinterpreted at the receiving altitude before composition continues. The warrant is recorded before the capsule reaches judgment, making selection and omission inspectable.

Some steps may be combined, performed by deterministic rules, or carried by a semantic seat. The architecture does not require one universal context-selector agent.

14. Context specimen: evidence-sensitive planning

BEARING
The project must decide whether to begin a one-site pilot now or wait for a
second site. The purpose is to learn without making claims the pilot cannot support.

CURRENT SITUATION
The first site is ready. The second agreement is delayed three to five months.
The budget cannot support both an immediate pilot and a later full pilot.
The first site represents a narrower population than the intended deployment.

COMMISSION
Compare: begin now, wait, or redesign the first phase as a narrow operational study.
State criteria, irreversible costs, learning value, and reversal conditions.

FOCAL GROUND
Enrollment capacity can expose operational failure but not modest outcome effects.
The team may dissolve after a nine-month delay. A minority view warns that even
a narrow pilot may create pressure to overinterpret favorable results.

GUIDANCE
Separate learning claims from effectiveness claims. Make reversibility and value
of information explicit. Treat institutional pressure as a governance risk.

AUTHORITY AND RETURN
Recommend and plan; do not authorize spending or public claims. Return comparison,
route, dissent, first checkpoint, budget consequence, claims boundary, and reopen conditions.

CONTEXT WARRANT
Detailed protocol wording is omitted because safety review is already accepted.
The minority governance risk is included because it changes required controls.

This is context as composition: the model is not merely given documents that happen to mention pilots.

15. Anti-patterns

Retrieval dump

Many semantically similar passages are included without an argument about their standing or relevance.

Chronological transcript

Process order substitutes for present semantic state.

One universal system prompt

Generic rules attempt to carry purpose, domain expertise, workflow, style, and current object at once.

Hidden summarizer authority

A compressed account silently becomes the canonical account.

Context by token vacancy

The system includes more material because budget remains rather than because the judgment requires it.

Premature solution injection

Prior answers enter an exploratory context and constrain discovery before the object has been clarified.

Catalog injection

The model receives all workflows, tools, or guidance and must spend attention selecting among irrelevant options.

16. Evaluation program

Context composition can be evaluated at several levels.

Structural

Semantic

Outcome

Comparative

Compare composed context against:

17. Research connection: available context is not usable context

AIOS arrives at context composition from the product architecture: a bounded cognitive movement needs purpose-shaped ground before model judgment can be useful. Current research sharpens why this matters. NoLiMa finds sharp long-context degradation when relevant facts must be connected without lexical overlap. Context Length Alone Hurts LLM Performance Despite Perfect Retrieval shows that even correctly retrieved evidence can become harder to use as irrelevant material grows. HoloBench further distinguishes raw length from relevant-information volume and the operation being performed.

These studies support operation-aware composition and an explicit evidence budget. They do not establish one universally optimal context size, retrieval method, hierarchy, or AIOS composition. The complete product claim remains a system-level question.

Read deeper in the normalized context-composition brief and full research memo. Chapter 07 explains how this composition remains fresh over long-horizon work.