I1001 — One typed graph composes the registries that already own their facts
Extend the executable's graph derivation into a typed, deterministic model that composes the existing authoritative registries — capabilities, commands, routes, MCP exposure, skills, rules, decisions, documents, use cases, benchmarks — without any of them ceasing to be authoritative.
DONE wave 0 · p0 · deep-work profile · parallel safe
Objective
Extend the executable's graph derivation into a typed, deterministic model that composes the existing authoritative registries — capabilities, commands, routes, MCP exposure, skills, rules, decisions, documents, use cases, benchmarks — without any of them ceasing to be authoritative.
Why
A single source of truth for this repository does not mean one manifest holding everything; it means each subsystem stays authoritative for what it owns and one derivation composes them. Any other arrangement is either a second inventory or a rewrite of nine working registries.
Current state
graph.rs derives rule dependencies, decisions and the shape of the layer for the Cockpit and the site. The capability registry knows capabilities. Nothing joins the two, and no node type spans both.
Desired state
One typed model holds nodes of every kind the repository already indexes, built by reading the registries through the paths every other caller uses, and producing the same output for the same inputs.
Scope
- apps/majordomus-cli/src/graph.rs
Out of scope
- A new store of anything an existing registry already owns
- Reading the index outside the executor, the cache and the counters that every other read passes through
- Node kinds invented here rather than taken from the kinds the layer already registers
Dependencies
None. This issue is a root of the graph.
What waits on this
- I1002DONE Relations are typed, inferred from stable identities, and never dangle
- I1003DONE Skills, rules, decisions, documents, use cases and benchmarks enter the graph as themselves
- I1004DONE Availability and visibility are metadata, not conditions in a template
- I1025DONE The federated model and its two projections are an architecture decision
Acceptance criteria
- Node kinds come from the kinds the layer already registers, and adding a kind does not require a new variant hand-written in the graph
- Every source is read through the registry that owns it, never by a second traversal of the filesystem
- Generation over identical repository contents produces structurally identical output, with no iteration-order dependence, no random identity and no timestamp inside the canonical data
- The model separates a capability's definition from its runtime state, so that the static projection needs no runtime fields
- Unit tests cover discovery, normalisation, deduplication and ordering
Validation
- cargo test --workspace --all-features
Evidence required
- federated_graph
- deterministic_output
Evidence
| covers | type | command | result | at commit |
|---|---|---|---|---|
| federated_graph | test | majordomus serve --port 0 && curl -s \"http://127.0.0.1:$PORT/api/v1/graph?id=composed\" | the composed graph over this repository: 825 nodes, 846 edges, 22 node kinds, truncated false — the capability registry and every indexed object in one model | 837f146 |
| deterministic_output | test | cargo test --all-features (apps/majordomus-cli) | every suite ok, 0 failed; the composition tests prove the graph does not depend on the order it read objects in, that nodes and edges come out sorted, that one kind node is shared, and that a kind nobody wrote in the derivation still becomes a kind of the graph | 837f146 |
Risk
Composing everything invites a model that knows too much and is slower than the hot path allows. It is built on the reads that already happen, and its cost is measured like every other command's.
Timeline
- started
- 2026-09-06T15:33:09Z
- verified
- —
- completed
- 2026-09-06T15:48:16Z
Those three fields, the evidence above and the state of the dependencies are all the status is made of. There is no status field to disagree with them.
Canonical record: .ai/repo/project/issues/I1001.yaml. Read it back with majordomus plan show I1001.