Repository navigation
feat: trail, with learnings in .trail/, a local check, and workspaces - #558
anirudhkumar-nanonets wants to merge 35 commits into
Conversation
🌱 graft blast radius5 areas changed → 13 areas can be affected. 83 dependent symbols, depth 2. flowchart TB
A0(("Brain Sync<br/>25 symbols"))
A1(("Graph Building<br/>17 symbols"))
A2(("Blast Analysis<br/>8 symbols"))
A3(("Build And Review<br/>8 symbols"))
A4(("Telemetry<br/>6 symbols"))
AX(("8 smaller areas<br/>19 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 — 6 people 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 83 dependent symbols, grouped by areaBrain Sync — 25 symbols in 12 files
Graph Building — 17 symbols in 10 files
Blast Analysis — 8 symbols in 7 files
Build And Review — 8 symbols in 7 files
Telemetry — 6 symbols in 4 files
…22 further symbols not listed. Test signal per changed area — 4 ✓ · 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.
84 test suites also reference this code90 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. |
… folds and publishes them
…orrects or sets a rule
… team and trail check
e73af10 to
4f80568
Compare
90c25be to
229856b
Compare
…RL moves only the pages
…ces via trail-cloud
Swaps the graft hero for the Trail-code banner from the README rewrite, so the renamed repo shows the new name before PR #558 merges. The rest of the README is unchanged. Co-authored-by: Shrish Dwivedi <shrish@nanonets.com>
|
Merged into main as part of #585, which was stacked on this branch. |
Moves:
connect. In the last 7 days to 2026-10-07, 4 people opened a brain signup from graft and 3 settled it (PostHog DB 11), and 37 external coding brains were built (Agents DB 69). Both use the SQL indaily/project.md. Today's values weren't pulled because the Metabase connector didn't connect in this session.This PR also adds measurement:
learning_reused, which tells whether learnings save work.repo_seen, which counts repos with.trail/committed.note_savednow carriesscope(repoorpersonal).All three are 0 today because they're new.
Everything trail needs, in one PR. The team app is trailhq/trail-cloud#1; it replaces NanoNets/assign#3159.
trail is the command
@trailhq/trailshipstrail, laid out byscripts/pack-trail.mjsintobuild/trail.@nanonets/graftshipsgraft. It's the same code, and graft's output doesn't change.trail build --check, becausetrail checkis the team check.trail mcpservestrail_*tools and still answersgraft_*.cli_nameis on every event.Learnings, committed with the code
trail note --title "…"saves a learning in the repo's.trail/learnings/, under## Decided,## Tried and ruled outand## Watch out. It records the minutes and tokens the session took, from the Claude Code transcript. You commit it with the change.--personalkeeps one in~/.trailinstead, for something about your own setup.trail initcreates.trail/and says to commit it..trail/itself never counts as one of those files.askputs matching learnings above the code. It marks a teammate's as theirs, and prints[trail] learnings saved ≈ N tokens: what the learning took to work out, less the cost of reading it. Claude closes its reply with one line of 7–8 words, like📝 Started from Anirudh's learning · saved ~27k tokens, or📝 Saved a learning for your team's next sessionwhen it saved one.● overlap · Kumar's branch kumar/retry also changes client.go (pushed today 15:32)..trail/learnings/even before they install anything, and tells them once.trail check, on this machine
trail checkholds the branch's diff against the repo's learnings (branches included), your own and the repo's skills. It's the deterministic half of the server check, ported to TypeScript, with its tests. Exit 1 on a conflict. It needs no sign-in.While porting, I found that the Go rule read "Keep defaultRetryMax = 4: ten retries can…" as a decision for 10. The port takes the number from before the reason. The Go version in assign#3159 still has this bug.
Workspaces, through trail-cloud
trail login. Once there's a learning,ask,noteandcheckhand Claude a link to end its reply with, at most once a session, worded differently each time.~/.trail/repos/known.json), so the picker lists them. It then waits for the person to:~/.trail/cloud.json(owner-only, one per machine) and uploads every learning in the picked repos'.trail/. The next command says so once.~/.trail/outbox.jsonland sent with the next sync, so reuse from before someone connected still counts on the team page.trail workspace adddoes it.trail workspaceshows the repos, team page and invite link, andtrail logoutdisconnects.trail teamshows the workspace's week; when you're not connected, it shows what this clone can see.pushandpull(the brain's rules) still run, unlisted.Tested
npm test: 1,463 tests, 0 failing, 1 skipped.git pull, Kumar's Claude answered from Anirudh's learning. 11 s, $0.10, with the reuse recorded.trail checkgave ✗ client.go:51 · changes defaultRetryMax from 4 to 10, quoting Anirudh. Claude explained the override in the commit.Not published:
@trailhq/trailneeds the trailhq npm org, and trail-cloud needs a deploy.