gabriel / muse public
Open #3
filed by gabriel human · 32 days ago

Code domain: implement directory-level insight dimension

0 Anchors
Blast radius
Churn 30d
0 Proposals

Background

The @gabriel/code domain currently declares three dimensions: symbol, file, and directory. The first two have engine-level support. directory was added to the domain capabilities to reflect the semantic reality that directory structure carries architectural intent — src/, tests/, api/routes/ are not neutral containers, they are part of the design.

We opted out of .musekeep precisely because directory layout has meaning. A file moving between directories is a meaningful change even when its content is identical. This dimension should be a first-class citizen.

What directory dimension insight means

Unlike symbol and file, a directory has no byte content — its content is its membership and its position in the tree. So directory-level insight is:

  • Membership diff: what files moved in or out of a directory between two refs
  • Structural diff: did the directory itself move, rename, or disappear
  • Churn: which directories change most often (hotspot at the architectural level)
  • Coupling: which directories always change together (entanglement at module level)
  • Blast radius: if this directory's structure changes, what else is affected

What needs to be implemented in muse

  • InsightProvider for the code domain should emit a directory dimension in its insight output
  • muse divergence should include directory-level divergence scores between branches
  • muse diff should surface directory-level structural changes (moves, renames, deletions) as a distinct dimension, not just a side-effect of file diffs
  • muse code hotspots and muse code entangle should be able to operate at directory granularity, not just symbol/file
  • muse code impact should optionally roll up blast radius to the directory level

Current state

  • Domain capabilities: dimensions: [symbol, file, directory]
  • Engine insight output for directory: not implemented
  • GUI stat strip on domain detail page: shows 3 dimensions ✅

Notes

This is a parity ticket — the dimension is declared, the engine needs to catch up. No MuseHub changes required.

Activity
gabriel opened this issue 32 days ago
No activity yet. Use the CLI to comment.