T-3GMU-manifest-graph-onto-aspects
State: closed/done · Impact: low · Complexity: medium
Eliminate manifest-graph’s independent manifest re-parsing by having its
walk.ts consume T-1VJD’s collectAspects instead, while leaving
scanAspects/buildSystemGraph’s public signatures, output shape, and the
Rust-parity fixture contract completely unchanged.
packages/ts/manifest-graph/src/walk.ts independently parses
package.json/Cargo.toml into its own ManifestInfo, duplicating exactly
the manifest reads detect-runners’s providers already do. Its Rust peer
(solutions/ontological/crates/manifest-graph, out of scope per the user) is
held to output parity by a shared fixture suite — that parity contract is
about scanAspects’s output, not how walk.ts gets its inputs.
Proposed
Section titled “Proposed”walk.ts calls collectAspects (from @sksizer/detect-runners/aspects) and
maps AspectFacts → its own ManifestInfo, instead of reading
package.json/Cargo.toml itself. scanAspects(manifest: ManifestInfo): Aspect[] and buildSystemGraph(root, opts) keep their exact signatures and
output shape — the Rust-parity fixture suite is the safety net proving zero
output drift.
Approach
Section titled “Approach”- Add an
AspectFacts→ManifestInfomapping function inwalk.ts. - Replace
walk.ts’s ownpackage.json/Cargo.tomlfile reads with acollectAspectscall plus that mapping. - Re-run the Rust-parity fixture suite to confirm
scanAspects’s output is byte-for-byte identical to before this change (the Rust side is never touched; only its parity partner’s inputs changed). packages/ts/manifest-graphgains aworkspace:*dependency on@sksizer/detect-runnersif it doesn’t already have one.
| Area | Note |
|---|---|
packages/ts/manifest-graph/src/walk.ts | Manifest reads replaced by collectAspects + a mapping function |
packages/ts/manifest-graph/package.json | workspace:* dependency on @sksizer/detect-runners, if not already present |
Acceptance criteria
Section titled “Acceptance criteria”- AC-1:
scanAspects(manifest)’s output is identical, for every existing fixture, before and after this change. - AC-2: The Rust/TypeScript parity fixture suite passes with zero output drift.
- AC-3:
bun test packages/ts/manifest-graphpasses. - AC-4:
packages/ts/manifest-graph/src/walk.tsno longer readspackage.json/Cargo.tomldirectly (grep-verified).
Out of scope
Section titled “Out of scope”manifest-graph’s own package identity, path, or public API — unchanged.- The Rust crate (
solutions/ontological/crates/manifest-graph) — out of scope per the user; only its TypeScript peer’s inputs change. - sdlc consumer migration —
T-LCKH.
Dependencies
Section titled “Dependencies”T-1VJD only (not T-6K39/T-LCKH) — can run in parallel with
T-LCKH.
Discovery context
Section titled “Discovery context”Detection-consolidation research: ../decisions/D-LSLH-collapse-verbs-workflows-chain-hooks/detection-consolidation.md §2 “Layer 2b API”, §6 “PR 4”.
Depends on
Section titled “Depends on”T-1VJD