I1105 — The repository is discovered once, into one model
Build the one typed model of a repository — identity, structure, capabilities, the layer's registries, workflows, environments, providers, services and version-control state — discovered once and read by every consumer.
BLOCKED wave 1 · p0 · deep-work profile · parallel safe
Blocked. This issue cannot start until I1101 is done. The status is derived from that, not declared.
Objective
Build the one typed model of a repository — identity, structure, capabilities, the layer's registries, workflows, environments, providers, services and version-control state — discovered once and read by every consumer.
Why
The CLI, the environment entry, the documentation and the server each discover the repository their own way today, which is four answers to one question and four places to fix when it is wrong. One model is the spine the rest of this milestone hangs from.
Current state
An index of the layer exists and a capability registry exists. Repository facts beyond them — the environment, the providers, the workspace, the services — are read where they are needed, each time.
Desired state
One discovery produces one typed value; consumers hold it rather than the filesystem.
Scope
- apps/majordomus-cli/src/repository.rs
- apps/majordomus-cli/src/discovery
Out of scope
- A second index beside the one that exists; this composes it
- Discovery that reaches the network or builds anything
Dependencies
What waits on this
Acceptance criteria
- One typed value carries what a consumer needs to know about a repository, composed from the registries that already own their parts
- Discovery happens once per process, and a second consumer pays nothing for it
- Nothing in the model requires a configuration file to state what inspection can establish
- No consumer reads the filesystem for a fact the model already carries, proved by a check rather than by review
Validation
- cargo test --workspace --all-features
- majordomus perf
Evidence required
- one_model
- discovered_once
Evidence
None recorded. Every token above needs a command or an artifact behind it before this issue can be completed; narrative is refused.
Risk
A model that knows everything is discovered slowly, and the environment entry pays that cost on every directory change. Its cost is measured in the same issue that makes it mandatory, not later.
Timeline
- started
- —
- verified
- —
- completed
- —
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/I1105.yaml. Read it back with majordomus plan show I1105.