Repository navigation
feat(notes): session notes in ~/.trail, shown by trail ask - #556
anirudhkumar-nanonets wants to merge 5 commits into
Conversation
🌱 graft blast radius5 areas changed → 7 areas can be affected. 28 dependent symbols, depth 2. flowchart TB
A0(("Host Initialization<br/>8 symbols"))
A1(("Brain Communication<br/>7 symbols"))
A2(("Tool Invocation<br/>4 symbols"))
A3(("Session Metrics<br/>4 symbols"))
A4(("Workspace Federation<br/>2 symbols"))
AX(("2 smaller areas<br/>3 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 12 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 28 dependent symbols, grouped by areaHost Initialization — 8 symbols in 6 files
Brain Communication — 7 symbols in 5 files
Tool Invocation — 4 symbols in 1 file
Session Metrics — 4 symbols in 4 files
Workspace Federation — 2 symbols in 2 files
Telemetry Tracking — 2 symbols in 2 files
Wiring Rewrite — 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.
36 test suites also reference this code42 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 #558, which now carries this change along with the rest of trail. |
Moves:
note_saved(the supply) and thenotesproperty onquery(the demand), both in PostHog DB 11. Both are 0 on 2026-10-07 because they're new. This is the first part of the Trail brief, and it feedsconnectthrough thetrail loginprompt in the cloud PR.A session's agent can now save what it worked out, and the next session on the same code gets it before exploring. The note includes what it cost to figure out. Notes stay on the person's machine and never go into the repo, so nothing shows up in
git statusor in anyone's PR.trail note --title "…"saves a note with the body on stdin, under## Decided,## Tried and ruled outand## Watch out.~/.trail/repos/<key>/notes/. The key is the remote (github.com/owner/name), or the path when there's no remote.askprints the matching notes above the code, in both the CLI and MCPfind_code.trail statusgets a notes row.trail askbefore exploring andtrail notewhen a task took real digging. The body opens with those moments instead of ending with them.trail initwires trail-named hooks, skill and MCP server, and replaces graft-named ones. It also makes the notes folder, and writes nothing about notes into the repo. Whether a repo is trail-wired is read from its committed wiring, so teammates on either command write the same files.note_savedwithhas_costandtouches_bucket, andnotesonquery. Titles, text and paths are never sent.Tests:
npm test, 1,413 pass.test/trail-home.test.tscovers the repo-key edge cases against real git repos and worktrees.