T-OUKL-system-graph-project-facets-onto-aspects
State: closed/done · Impact: low · Complexity: small
Stop System Graph’s project-facets.get.ts from shelling out to moon query projects a second time for facts T-1VJD’s aspect layer already has the
plumbing to read once per request.
products/system-graph/server/routes/walk/project-facets.get.ts (lines 32,
58-63) calls spawnRunnerAsync('moon').run(['query','projects']) directly,
independent of detect-runners’s own moon provider, to answer “what’s this
project’s moon layer/stack/language” — a third, separate project-role
taxonomy alongside detect-runners’s tasks and manifest-graph’s aspects.
Proposed
Section titled “Proposed”The route reads AspectFacts.moon.role off @sksizer/detect-runners/aspects’s
collectAspects(), called once per request the same way buildSystemGraph
already is. The route file itself is unchanged otherwise — it still
aggregates/serves the same response shape, only its data source for the moon
role fields changes.
Approach
Section titled “Approach”- Replace
project-facets.get.ts’s ownspawnRunnerAsync('moon').run(['query','projects'])call with acollectAspects(root, opts)call, reading.moon.roleper project. - Confirm the route’s response shape is unchanged — this is a data-source swap, not an API change.
- Remove the now-dead
spawnRunnerAsync('moon')import if nothing else in the route uses it.
| Area | Note |
|---|---|
products/system-graph/server/routes/walk/project-facets.get.ts | moon query projects shell-out replaced by AspectFacts.moon.role |
Acceptance criteria
Section titled “Acceptance criteria”- AC-1: The route’s HTTP response is byte-for-byte identical, for the existing test fixtures, before and after this change.
- AC-2:
project-facets.get.tsno longer callsspawnRunnerAsync('moon')(grep-verified). - AC-3: The relevant
system-graphroute tests pass.
Out of scope
Section titled “Out of scope”project-facets.get.ts’s own joining/aggregation logic besides the shell-out — unaffected, only its moon-role data source changes.manifest-graph/sdlc consumer migration —T-3GMU/T-LCKH.
Dependencies
Section titled “Dependencies”T-1VJD only — can run in parallel with T-LCKH/T-3GMU.
Discovery context
Section titled “Discovery context”Detection-consolidation research: ../decisions/D-LSLH-collapse-verbs-workflows-chain-hooks/detection-consolidation.md §4 “What gets deleted”, §6 “PR 5”.
Depends on
Section titled “Depends on”T-1VJD