Repository navigation
Let one developer use trail just for themselves - #750
anirudhkumar-nanonets wants to merge 2 commits into
Conversation
🌱 graft blast radius5 areas changed → 9 areas can be affected. 36 dependent symbols, depth 2. flowchart TB
A0(("Prompt Execution Engine<br/>13 symbols"))
A1(("Keep Guardrail<br/>7 symbols"))
A2(("Memory And Review Notes<br/>6 symbols"))
A3(("Session Learning<br/>3 symbols"))
A4(("Cloud Activity Pairing<br/>2 symbols"))
AX(("4 smaller areas<br/>5 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 — 4 people across 14 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 36 dependent symbols, grouped by areaPrompt Execution Engine — 13 symbols in 12 files
Keep Guardrail — 7 symbols in 3 files
Memory And Review Notes — 6 symbols in 2 files
Session Learning — 3 symbols in 1 file
Cloud Activity Pairing — 2 symbols in 2 files
Telemetry Tracking — 2 symbols in 2 files
CLI Skills — 1 symbol in 1 file
Wiring Rewrite — 1 symbol in 1 file
MCP Tools — 1 symbol in 1 file
Test signal per changed area — 3 ✓ · 1 ✗ · 1 –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.
75 test suites also reference this code86 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 its dependent symbols at file:line. |
The issue: A developer who wanted trail only for themselves couldn't tell whether to commit what
trail initadded, and committing it would change the repo for everyone, so they uninstalled it.Why:
trail initalways set trail up for the whole team. It left.trail/and.claude/settings.jsonfor git to pick up, ended with "commit … once", and later sessions kept asking to commit learnings and to share them.The fix:
trail initnow asks who trail is for. Just me, which enter picks, keeps trail's files out of git for that clone only and saves every learning in~/.trail, sogit statusstays clean and nothing asks to commit or share.trail init --teamshares it later.Moves: week-one retention after
trail init, the people whose firsttrail initwas 8 to 14 days ago who opened a Claude session in a trail repo (repo_seen) in the last 7 days. PostHog events in Metabase db 11 (posthog_event_full_view). Today, 2 Nov 2026: 382 of 862 (44%). This PR addsscope(just_me/team/unasked) toinit_completedso the number can be split by answer; that split is none today, since no release sends it yet.What changes
trail initasks one question after the agent picker, on a terminal, in a git repo whose.trail/isn't committed yet: just me (enter) or my team.--just-meand--teamanswer it without asking. An agent's run,--yes,--pairand--connectdon't ask and stay as they were (team). A repo already on just me stays so until--team.~/.trail(src/notes/just-me.ts), so every clone and worktree reads the same answer. With it:.trail/goes in the clone's own.git/info/exclude, along with any new file init writes for another agent. A file git already tracks can't be hidden, so init names it..claude/settings.jsongets nothing, and an entry an earlier init put there comes back out (a file git tracks is left alone). The hooks in~/.clauderun trail.writeNotesaves a learning for the repo in~/.trailinstead of.trail/learnings/, sotrail noteand init's look-back both keep it on the machine.cloudLines), no "commit .trail/ once" line at session start (uncommittedDirectivetells Claude there is nothing to commit instead), and init's closing line says there's nothing to commit and how to share later.trail init --teamtakes the mark off, lets git see.trail/again and writes the shared session-start entry, and init ends with the usual commit line. Learnings saved while on just me stay personal.Why hide the files instead of moving them out
Trail finds its map, its hook and its status line in the repo's
.trail/, andmapDirForandrepoWiredForTrailkey off that folder, so moving them out of the repo would touch every reader..git/info/excludeis per clone and never committed, so it gets the same result for git with no change to those paths. Learnings are the one thing that should outlive a fresh clone, so only they move to~/.trail.Checked
test/trail-just-me.test.ts(5 tests): learnings land in~/.trailwhile the mark is on and in.trail/after; no share link and the just-me session-start line; the Claude Code wiring leaves.claude/settings.jsonalone and takes an earlier entry back out;.trail/hidden and shown again;trail init --just-meleavesgit statusempty, then--teambrings back.claude/and.trail/and the commit line.trail initwith enter at both questions, thengit statusreads "nothing to commit, working tree clean";trail notewithout--personalsaves to~/.trailand the tree stays clean;trail init --teamthen shows.claude/and.trail/to commit.trail checkflags 2 conflicts, both on the newtrailHomeimport insrc/cli.ts, against learnings about testing hooks on a sandbox HOME. They match on shared words (home, claude, trail), and this change doesn't run Claude or touch how HOME is set.Merge order
This PR stays out of the lines #732, #733, #738, #739 and #731 change (test merges onto this branch are clean). Two touch the same telemetry lines:
init_completed(statusline). Whichever merges second keeps both keys in theEVENTSset, oneVALUESentry with both, theTELEMETRY.mdrow naming both, and both properties in thetrack("init_completed", …)call.TELEMETRY.mdrow right underinit_completed. Keep both rows.🤖 Generated with Claude Code