Skip to content

Extend what the executable serves by adding a file, never by rebuilding it

Add a rule, a prompt or a knowledge node to .ai/ and have it appear as an MCP resource, an HTTP route and a reference entry, with the same binary.

described Extensionadvancedmaintainerwrites state

Situation

A team wants its own kind of object served to its AI clients. With most tools that means a fork and a build; the knowledge would then live in the binary, and the binary would own it.

What you run

  • init: writes the layer; kinds and their JSON Schemas are read at run time from the share directory, and a repository may add its own
  • update: regenerates the projections (AGENTS.md, CLAUDE.md) from the policy, so the bootstrap every worker reads names the new object
  • doctor: validates every declarative object against the schema of its kind and reports a duplicate identity or an unknown key as a diagnostic, never as a crash

Scenario

setup: installed-wired
given:
  - 'the layer installed; the distribution declares the kinds it reads'
steps:
  - id: what-is-declared
    run: ['knowledge', 'sources']
    note: 'every source class the repository declares, with what it discovered'
    expect:
      exit: 0
      stdout_contains: ['^policy +shared +policy', '^knowledge sources: [0-9]+ file']
  - id: nothing-to-add
    run: ['init', '--extend']
    note: 'a new kind is a declaration under .ai/repo/knowledge, not a change to the tool'
    expect:
      exit: 0
      stdout_contains: ['nothing to add']
  - id: still-healthy
    run: ['doctor']
    note: 'the layer is real after the extension'
    expect:
      exit: 0
      stdout_contains: ['doctor: 0 failure']
then:
  - 'a kind added with its schema under .ai/repo/knowledge is served by the executable without a code change'

Outcome

The executable discovers the file through the version-control index, validates it against the schema of its kind, and serves it as a resource; MCP, HTTP, OpenAPI, Swagger UI and the generated reference all show it because they are projections of one registry. A broken file is excluded and named; nothing was compiled and nothing was rebuilt.

No scenario yet

This use case is described, not proved: it names its commands and rules, and nothing executes it. It cannot be more than described until a scenario is added.

Why the tool knows this

The chain from this page to the code: the use case names commands, rules and claims; each rule is dispatched from the registry and each claim names the test that proves it; the scenario above executed the commands. Nothing in this chain is prose about intent.

Over MCP the same layer is reached through majordomus_capabilities, majordomus_capability (the MCP surface).

The rules that make it hold

Guarantees exercised

Related use cases

Computed from what they share: claims, rules, commands, category, applications. Nobody maintains this list.

The moments this answers