Repository navigation
Done
Description
What needs tracking?
xtask check currently requires docs/architecture/rust-agent/generated/modules.json (58,183 lines, 1.6 MiB) and modules.mmd (5,301 lines, 100 KiB) to stay byte-identical in Git.
Observed cost vs. value
- High merge-conflict churn: In the last 100 commits on
main,modules.jsonwas touched 42 times andmodules.mmd19 times. Adding even a single internal module or test module (e.g.936c95d80) mutates the 1.6 MiB snapshot, causing repeated merge conflicts across parallel PRs, unnecessary rebases, and extra CI reruns. - Zero readers: Neither
modules.jsonnormodules.mmdis referenced by any design or architecture document, and a 5,301-line Mermaid diagram cannot be rendered readably. - Zero added enforcement:
xtask/src/modules.rs(Graph::check_boundaries) computes the AST/Cargo dependency graph fresh in memory on everyxtask checkrun and asserts all boundary rules directly — it does not read the committedmodules.*files.
Proposed change
- Stop committing fine-grained internal graphs and unused intermediate JSON snapshots (
modules.json,modules.mmd, and unreferenced.jsonsnapshots underdocs/architecture/rust-agent/generated/), and remove staleness diffs for them fromxtask check. - Keep 100% of live boundary enforcement (
cargo metadata+synASTcheck_boundaries()inxtask check). Keep on-demand graph emission (e.g.xtask graph --out <dir>) for local inspection or debugging without committing the output. - Retain committed high-value artifacts that downstream code or documentation actually consume:
npm/branch-services.d.ts(public TypeScript plugin contract)docs/architecture/rust-agent/generated/catalog.md(153 lines, referenced by 15+ design docs; changes only when public services/capabilities change)docs/architecture/rust-agent/generated/crates.mmd(171 lines, 0 touches in last 100 commits, readable crate overview)
Related: #1933 (separating static checks from workspace-coupled xtask), #1938 / #1940 (ADR 025 D2).
References or acceptance criteria
- Remove
modules.json,modules.mmd(and unused intermediate.jsonsnapshots) fromdocs/architecture/rust-agent/generated/and stop diffing them inxtask check. - Verify
xtask checkstill executes all crate and module boundary rules (check_boundaries()) directly from source on every run. - Keep
npm/branch-services.d.ts,catalog.md, andcrates.mmdcommitted and freshness-checked, while allowing on-demand local generation of detailed module graphs into a scratch/output path. - Update
AGENTS.md,docs/architecture/README.md, andscripts/ci-changes.mjs(if affected) to match.
Metadata
Metadata
Assignees
Labels
No labels
Activity
zerob13 commentedon Nov 20, 2026
Removing
modules.jsonandmodules.mmdaddresses the recurring graph conflicts. #1946 keeps the live crate and module boundary rules and adds an on-demand command for those graphs.The acceptance criteria also cover unused intermediate JSON snapshots. #1946 still generates
crates.jsonandinstances.json, andxtask checkstill requirescrates.jsonto be current. I would scope this issue to the two module snapshots and track the other snapshots separately if needed. If the broader acceptance criteria still apply, please keep this issue open when #1946 merges.xtask: stop committing modules.json and modules.mmd
xtask: stop committing modules.json and modules.mmd (#1946)