Skip to content

MCP, HTTP, OpenAPI, Swagger UI, the capabilities commands and the generated reference are derived from the registry, and a change to one definition reaches every one of them

No interface of the Rust executable declares anything of its own. The MCP tools and resources, the HTTP routes and the OpenAPI operations, the Swagger UI page, majordomus capabilities list and describe, and docs/generated/capabilities.md are built from the registry when asked. Change a capability's description or input type in its descriptor, or add a declarative object to the layer, and every interface shows the change on the next start; nothing else is edited.

declared statusdeclared status: guaranteed Declared deterministic and blocking, implemented, and naming the behavioural test that is to prove it. Whether a recorded run supports it is the evidence verdict, shown beside it.

recorded evidencerecorded evidence: not run Declared guaranteed, and not supported by a recorded run: the test is named, and no passing run of the current inputs is recorded. how evidence is recorded

No projection declares a name, a description, a schema or a route of its own; tests/projections.rs proves every declared projection present and none orphan, and that a changed input type and description reach the MCP schema, the OpenAPI operation and the reference. MCP and HTTP answer the same handler identically.

What it means

No interface of the Rust executable declares anything of its own. The MCP tools and resources, the HTTP routes and the OpenAPI operations, the Swagger UI page, majordomus capabilities list and describe, and docs/generated/capabilities.md are built from the registry when asked. Change a capability's description or input type in its descriptor, or add a declarative object to the layer, and every interface shows the change on the next start; nothing else is edited.

How it works

mcp/surface.rs maps registry entries with an MCP exposure to tools and resources and calls the registry by canonical id; http/router.rs maps entries with an HTTP exposure to routes and binds the input from the query or the body; http/openapi.rs renders the same entries as an OpenAPI 3.1 document whose operationId is the canonical id; http/swagger.rs serves a page that loads /openapi.json; the capabilities commands dispatch through the registry's CLI exposure; generate.rs writes the reference from the same entries.

How to see it

apps/majordomus-cli/target/debug/majordomus capabilities describe objects.get --format json   # exposure: mcp tool, http route
printf '{"jsonrpc":"2.0","id":1,"method":"tools/list"}\n' | apps/majordomus-cli/target/debug/majordomus mcp 2>/dev/null   # the same id under _meta
apps/majordomus-cli/target/debug/majordomus serve --port 0   # GET /openapi.json: operationId objects.get, x-majordomus-mcp majordomus_get

What it does not cover

The command line's other commands (schema, validate, mcp, serve, generate) are views of the registry or servers of it, not capabilities; the clap tree is hand-written and only the introspection commands dispatch through the registry. Swagger UI's assets are the pinned distribution on unpkg; the page embeds no specification but does need the network for the viewer itself.

Why it exists

The invariant the operator asked for, and the rule project.interfaces-are-projections: a capability defined once, every interface derived. apps/majordomus-cli/tests/projections.rs proves every declared projection present, none orphan, and a changed input type and description reaching the MCP schema, the OpenAPI operation and the reference; tests/http_serve.rs proves MCP and HTTP answer the same handler with the same JSON; test/cases/76_capabilities_projections.sh reads one capability back through every interface from a repository init wrote.

Detail rendered from docs/claims/interfaces-are-projections.md.

From the statement to the proof

  1. 1 · the public statement

    MCP, HTTP, OpenAPI, Swagger UI, the capabilities commands and the generated reference are derived from the registry, and a change to one definition reaches every one of them

    Made on Declare once.

  2. 2 · the canonical claim

    interfaces-are-projectionsdeclared status: guaranteed in docs/CLAIMS.yaml

    Defined in read it on this site · docs/CAPABILITIES.md

  3. 3 · the implementation

    apps/majordomus-cli/src/http/openapi.rs

  4. 4 · the test and the scenarios

    Test: test/cases/76_capabilities_projections.sh

    Executed in See what the repository holds, and run one of its capabilities, without reading a file, Extend what the executable serves by adding a file, never by rebuilding it, Say what your work is for, once, and have every surface say it.

  5. 5 · the recorded runs

    recorded evidence: not run how evidence is recorded

Verify it yourself

The test runs in a disposable temporary repository and asserts the behaviour, not a string in the source.

from a clone of the repository
bash test/run.sh 76_capabilities_projections

Where this claim is used

Related claims same implementation

The moments this answers

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