Architecture proposal • Ratification pending • Not released

ContextForge links context and explains what belongs.

Agents need policy, facts, memory, behavior and a mission together without losing the boundaries between them. ContextForge is the proposed library that assembles those explicit inputs into a deterministic context bundle.

Each inclusion and omission would have an explanation: where the item came from, which dependency required it, and whether a size budget affected it.

Proposed flow
Resolved Lex policy + typed context inputs
                    |
                    v
             ContextForge
                    |
                    v
      Context bundle + explanations

          authorizesExecution: false

One proposed responsibility

Preserve the input boundaries

Lex resolves policy. Domain owners supply facts, behavior, memory, identity, mission and capability requirements. ContextForge would link those values without redefining their meaning.

Keep required context together

Required dependencies come before relevance scoring or size reduction. Missing mandatory inputs remain visible and block readiness; optional material can be minimized.

Make selection explainable

The bundle would record stable explanations for inclusion, exclusion, provenance and minimization. Identical explicit inputs should produce identical output.

Current status

ContextForge currently has a local architecture proposal, no executable implementation, no public source repository and no npm release. Lex #837 must ratify ownership and the exact released input contracts before implementation begins. A later LexRunner consumer is downstream work.

The proposed core performs no provider calls, storage access, credential handling or effects. It returns context, diagnostics and explanations; its output cannot authorize execution. Generated instructions and prompts belong to future adapters outside the core.

Authorization stays separate

ContextForge does not replace authentication, tenant isolation, protected approvals or effect authorization. LexThority is retained as historical authority research with no active product commitment. Those enforcement responsibilities remain necessary regardless of the name or shape of a future authority component.