Subgraphs And Bundles
Subgraphs let a parent mdkg graph reason about child graphs without pretending to own them.
Bundles are generated projections of child graph state. They are useful for orchestration, reporting, and planning across repositories. Replace CHILD_ALIAS with the configured subgraph alias from mdkg subgraph list --json.
mdkg subgraph list --jsonmdkg subgraph audit --jsonmdkg subgraph sync CHILD_ALIAS --jsonmdkg bundle verify --jsonOwnership model
Section titled “Ownership model”- The child repository owns its
.mdkggraph. - The root repository owns its subgraph bundle copy.
- Root-qualified qids avoid id collisions, for example
runtime:goal-27. - Root orchestration should not mutate dirty child repositories.
The safe sequence is:
- Gather read-only baselines in each repo.
- Apply or commit approved child mdkg-only changes in the child repo.
- Confirm the child repo is clean.
- Sync the root-owned bundle from that accepted child commit.
- Validate the root graph.
Dirty child repos
Section titled “Dirty child repos”If a child repo is dirty, pause and decide whether those changes are approved. Avoid using dirty-source overrides as a default. A stale bundle is easier to reason about than a root graph that captured unreviewed child state.
What to check
Section titled “What to check”git status --short --branchmdkg subgraph audit --jsonmdkg subgraph verify --jsonmdkg validate --summary --json --limit 20Use subgraph warnings as routing context. A read-only subgraph node can block local work, but it is not locally actionable unless you switch into the owning repo.