Skip to content

Every directory of the layer carries its contract, and a worker reads what applies

Context is a tree, not one file: the documents that apply to a path are resolved from the root down, the nearest one adds and never silently replaces, and a worker loads what its task needs and nothing more.

status
feature status: stable
domain
Context

What it does

majordomus context resolve <path> prints the documents that apply to a path, least specific first; context explain says why each is in or out; context validate refuses a tree with a missing contract, a duplicate identity, a broken or cyclic override, or an override of a document marked final; context affected names the documents a change set touches. The repository scope is declared once, out over in, and the executable discovers, indexes and serves nothing outside it.

What it does not do

A provider's own nested-file loading is an optimisation the tool does not replace; the resolution is what applies. The checkout-local half of the layer is never context and never published.

Why it exists

Operational moments from the Why catalogue that name one of this feature's mechanisms. Nothing here was assigned: a moment appears because it names a rule, a command, a capability or a claim this feature also names.

Every moment it answers (20)

How it works

The capability modules of the executable this feature names, each with the capabilities it composes. The interfaces each one reaches are listed under Interfaces below: they are projections of one declaration, not separate registrations.

Directory contracts directories behaviorally verified

The layer's directories as a hierarchy: the contract each one declares, what it owes and which contract said so, and the chain that applies to it once inheritance is resolved.

Repository repository behaviorally verified

The repository this process serves: its layer, its git state, the state of the index built from it, and its scope: what a worker reads of it and what it never reads.

Development context devcontext behaviorally verified

The context a development session should be given, derived from the repository rather than composed by hand: given an issue, a milestone, an intent or a set of paths, the canonical objects that bear on the work, why each one is in the answer, what was left out and why, what collapsed into what, and the whole cost against a budget. The selection is structured — every entry keeps its identifier, its provenance, the selector that reached it and its confidence — because rendering a prompt is a projection of the selection and not the selection itself.

Source pack pack behaviorally verified

The tracked tree as a few token-bounded Markdown shards a language model's file search can index, with an index that orients the reader and a manifest that proves afterwards what left the machine: the git index's blobs only, never the working tree, and never a binary, a gitlink or worktree, a symbolic link, build output or a credential, whatever the index holds.

The objects it is made of

Kinds of the layer. Each is a schema, a source class and a file on disk; the number beside it is what this repository holds today, counted at build time.

  • context39
  • scope1
  • workspace1

Where it sits

domain
Context — Every worker starts from what the repository already knows: the context that applies to its path, the handover the last session left, and the decisions already made.
areas of work
context
named by
Skills

Interfaces

Each capability behind it, on every interface it is projected onto. A link goes to this site's reference for that interface; an HTTP route and an MCP tool are answered by a running majordomus serve, not by this site.

The capabilities behind this feature, by interface
capabilitycommand lineHTTPMCP tool
directories.list —none GET /api/v1/directories majordomus_directories
repository.info —none GET /api/v1/repository majordomus_repository
repository.scope majordomus scope GET /api/v1/scope majordomus_scope
repository.scope_classify —none GET /api/v1/scope/classify majordomus_scope_classify
devcontext.compile majordomus devcontext compile GET /api/v1/devcontext majordomus_devcontext
devcontext.explain majordomus devcontext explain GET /api/v1/devcontext/explain majordomus_devcontext_explain
devcontext.policy majordomus devcontext policy GET /api/v1/devcontext/policy majordomus_devcontext_policy
pack.plan majordomus pack plan GET /api/v1/pack/plan majordomus_pack_plan
pack.verify majordomus pack verify GET /api/v1/pack/verify majordomus_pack_verify
in the Cockpit, of a running server
/cockpit/directories Directories

Evidence

What is guaranteed

Each claim this feature names, with the status its row declares, the verdict the recorded runs support, and the test that settles it.

Executable use cases

The rules that hold it

  • blocking Context integritymajordomus.context-integrity
  • advisory Load minimum sufficient contextmajordomus.minimum-sufficient-context
  • blocking Context localityproject.context-locality
  • blocking What a worker reads is declared once, and nothing outside it is read or servedproject.scope-is-declared
  • advisory Layout integritymajordomus.layout-integrity
  • blocking AI layer integritymajordomus.ai-layout-integrity

The decisions behind it

Using it

The commands that run it

  • majordomus context work · read-only

    What the next worker needs to know now, in authority order and within a budget.

From the executable's command line

The synopsis of each, as the executable's own help prints it.

Where this page comes from

the file
.ai/repo/features/context.md
the same answer
majordomus product show context

Searches the titles and descriptions of every page this site publishes.