I1005 — The graph is a generated artifact with a schema and no unsafe field
Serialise the graph as a deterministic generated artifact with a schema, carrying safe metadata only, produced by the generation the repository already runs.
DONE wave 2 · p0 · implementation profile · parallel safe
Objective
Serialise the graph as a deterministic generated artifact with a schema, carrying safe metadata only, produced by the generation the repository already runs.
Why
Both projections and every test need one file to read. Making it generated keeps it honest; giving it a schema makes it consumable; keeping it free of anything private makes it publishable.
Current state
No aggregate artifact exists. The site reads several derived datasets, each from its own script.
Desired state
One generated artifact carries the graph, with a schema, deterministic ordering, provenance and no field that must not be published.
Scope
- apps/majordomus-cli/src/generate.rs
Out of scope
- A hand-edited copy of the artifact
- Any token, key, header, environment dump or machine-absolute path in the output
- A timestamp inside the canonical data
Dependencies
- I1002DONE Relations are typed, inferred from stable identities, and never dangle
- I1004DONE Availability and visibility are metadata, not conditions in a template
What waits on this
- I1006READY The runtime reads the graph through the registry, like every other read
- I1007READY The site renders the same graph, generated once
- I1009READY Every menu in this repository comes from one derivation
- I1010READY The overview is what exists, counted rather than claimed
- I1012READY One detail view, assembled from what a node actually has
- I1023READY Nothing private reaches a published page
Acceptance criteria
- The artifact is produced by the existing generation target set, not by a separate script
- It has a schema, and the schema is generated from the types rather than written by hand
- Ordering is deterministic and repeated generation is byte-identical over identical inputs
- It contains no credential, no private environment value and no machine-absolute path, proved by a test
- Provenance is recorded in the artifact's own metadata where its format cannot carry a comment
Validation
- majordomus generate --check
- cargo test --workspace --all-features
Evidence required
- artifact_generated
- schema_present
- safe_metadata
Evidence
| covers | type | command | result | at commit |
|---|---|---|---|---|
| artifact_generated | test | majordomus generate && majordomus generate --check | docs/generated/graph.json and docs/generated/graph.schema.json are written by the existing target set and the check reports in sync; the artifact is 1,104,403 bytes pretty-printed (821,696 compact) over 901 nodes, 2,100 edges and 25 node kinds, and regeneration is byte-identical, asserted by tests/generate_check.rs | 674b899 |
| schema_present | test | cargo test --lib generate::tests::the_schema_of_the_graph_comes_from_the_types_that_define_it | the schema is generated from the Rust types through CanonicalSchema::of::<Graph>(), names the struct fields id, nodes, edges, node_kinds, edge_kinds and metadata, carries its provenance as a field because JSON has no comment, and is 7,407 bytes | 674b899 |
| safe_metadata | test | cargo test --lib generate::tests::a_published_artifact_is_refused_when_it_carries_a_machine_path_or_a_credential | generation refuses rather than writes when the rendered document carries a machine-absolute path, a PEM block, an authorization header or a token shape; each marker is proved to be caught, and a graph of repository-relative sources passes | 674b899 |
Risk
One artifact for everything grows until it is downloaded on every page load. Its size is measured and budgeted with the other assets.
Timeline
- started
- 2026-09-06T17:35:38Z
- verified
- —
- completed
- 2026-09-06T18:07:50Z
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/I1005.yaml. Read it back with majordomus plan show I1005.