Repository navigation
trail: keep the code map in .trail/cache/ - #621
Conversation
🌱 graft blast radius5 areas changed → 13 areas can be affected. 64 dependent symbols, depth 2. flowchart TB
A0(("Graph Management<br/>22 symbols"))
A1(("Host Configuration<br/>11 symbols"))
A2(("Upkeep Operations<br/>8 symbols"))
A3(("Build Progress Tracking<br/>6 symbols"))
A4(("Tool Invocation<br/>4 symbols"))
AX(("8 smaller areas<br/>13 symbols"))
classDef reached fill:#D9EDF3,stroke:#3AA7C9,stroke-width:1.5px,color:#0E313C;
class A0,A1,A2,A3,A4 reached;
classDef tail fill:#EEF2F3,stroke:#9AA4A9,stroke-width:1px,color:#3A4247;
class AX tail;
Who knows this code — 1 person across 18 areas
Ownership is git history over each area's own files, weighted towards recent work (120-day half-life). Merge commits and bots are dropped, and you are dropped from your own PR. A name with no All 64 dependent symbols, grouped by areaGraph Management — 22 symbols in 8 files
Host Configuration — 11 symbols in 7 files
Upkeep Operations — 8 symbols in 4 files
Build Progress Tracking — 6 symbols in 5 files
Tool Invocation — 4 symbols in 2 files
Review Process — 4 symbols in 4 files
Context Validation — 3 symbols in 2 files
build-viewer.mjs — 1 symbol in 1 file
Branch Caching — 1 symbol in 1 file
…4 further symbols not listed. Test signal per changed area — 2 ✓ · 1 ⚠ · 2 ✗Reached = a node under a test path has a resolved edge into the changed symbol. It undercounts anything called indirectly — through a CLI, a spawned process or a dynamic import — so read a low ratio as “look here”, never as a coverage gate.
49 test suites also reference this code54 symbols, kept out of the diagram and the table so they cannot crowd out the areas a reviewer has to look at.
Open the interactive graph → — click an area to see the code that changed, and the line that reaches it. |
|
Folded into #619, which now carries this commit. |
Moves: none of the project's metrics directly. It finishes the clean
git statusfrom #619. Aftertrail init, the repo's.gitignoreand a root.ignoreno longer change, so the only things to commit are.trail/and.claude/settings.json.learnings_committedis the closest metric (PostHog query indaily/project.md). I didn't check its value, because this session has no Metabase access.Stacked on #619. This PR's base is
feat/trail-init-layout. Merge #619 first, then I'll rebase this onto main.What changes
Where the map lives (
src/context/map-dir.ts).trail/cache/. A repo counts as on trail when it has.trail/learnings/or trail's hooks.graft/.contextDirForandresolveContextDirboth go through this one rule, so the CLI, the hooks, the status line and upkeep agree.--dirandGRAFT_DIRstill win.Kept out of git by
.trail/.gitignorecache/to.trail/.gitignore..gitignoreor a root.ignore. graft's map is ignored exactly as before.An existing map moves instead of being rebuilt
graft/that holds a map is renamed to.trail/cache/the first time anything asks where the map is.graft/that git tracks is left alone: it dates from when the map was committed, and moving it would delete committed files./graft/lines in.gitignoreand old.ignoreblocks are left as they are. They're harmless, and removing them would touch files this change promises to leave alone.Finding it
.trail/is hidden, so a ripgrep from the repo root skips the cards. Given.trail/cacheas the path, it searches them. I checked both.repo map (.trail/cache/INDEX.md))..trail/cache/where they saidgraft/.trail ask,grepandcallersread the map wherever it is.Smaller
.trail/cache/counts as the map's own, not the code's..trail/cache/too.graft/: the subdirectory notice,trail build's help, and "no code map found". Neither doesask's "if the code map is empty".Tests
trail-map-dir:graft/map moves with its cache, and git doesn't see itgraft/stays where it is.trail/.gitignore.trail/learnings/counts as on trail before its hook exists.trail/cache/, and the subdirectory notice test expects the new wording.trail initwith a real build,git statusshowed only.claude/settings.json,.trail/.gitignore,.trail/README.mdand.trail/hook.cjs. There was nograft/and no.ignore, andtrail grep NormalizeBoxanswered from.trail/cache/.graft init, with its map ingraft/, thentrail init: the map moved to.trail/cache/without a rebuild.🤖 Generated with Claude Code