Repository navigation
Release 0.28.0: Anirudh's #708, and agents get Trail's tools after an npx sign-in - #709
Conversation
🌱 graft blast radius2 areas changed → 4 areas can be affected. 4 dependent symbols, depth 2. flowchart TB
A0(("Claude Hook Integration<br/>1 symbol"))
A1(("MCP Server Configuration<br/>1 symbol"))
A2(("Upkeep Trail Migration<br/>1 symbol"))
A3(("Team File Parsing<br/>1 symbol"))
classDef reached fill:#D9EDF3,stroke:#3AA7C9,stroke-width:1.5px,color:#0E313C;
class A0,A1,A2,A3 reached;
Who knows this code — 1 person across 6 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 4 dependent symbols, grouped by areaClaude Hook Integration — 1 symbol in 1 file
MCP Server Configuration — 1 symbol in 1 file
Upkeep Trail Migration — 1 symbol in 1 file
Team File Parsing — 1 symbol in 1 file
Test signal per changed area — 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.
1 test suite also references this code1 symbol, 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. |
… release 0.27.1 `npx -y @trailhq/trail-code login --code` on a laptop without trail wrote Claude Code, Cursor and Codex entries with `"command": "trail"`. Under npx, trail is on PATH only for that process (npx's temporary node_modules/.bin), so trailOnPath() said yes. Agents start with the person's PATH and got no tools. commandOnPath now skips node_modules/.bin folders, so those laptops get the npx launch. Verified end to end: a fresh sandbox laptop with no trail ran the page's prompt in Claude Code, and a new session got all 6 workspace tools.
0.28.0 rather than 0.27.1: #708 adds behaviour (learnings before an edit, a check before commit/push/PR, several workspaces per laptop), not just the npx fix. Release notes describe both in plain words. Also: logout --workspace of the last workspace now removes Cursor's workspace entry too, as plain logout does.
c898db7 to
36e7301
Compare
…the sign-in broke
As asked: until trail check's matching improves, a conflict before commit/push/PR is a warning. The hook adds additionalContext with no permission decision, so the command runs and Claude reads which learning it goes against. SHIP_CHECK_STOPS turns the once-per-conflict stop back on. Two bugs found testing it in a real Claude Code session: - The check only ran with TRAIL_INVOKED_AS=trail, which Claude Code's hooks never have. It now also runs in a repo wired for trail, as the other hooks decide. - `git -C dir push` and `git -c k=v commit` weren't seen as a commit/push. Verified: a real session committed against a learning; the commit ran and Claude quoted the warning and recommended reverting.
What's in 0.28.0
Anirudh's #708 (already on main): Trail acts at the moments a session needs it.
trail checkruns before commit, push and PR, and stops the command once when the change goes against a learning.This PR:
trailinstalled,npx -y @trailhq/trail-code@latest login --code …(the connect page's prompt) set up Claude Code, Cursor and Codex with atrailcommand that isn't there, so they got no tools. Under npx,trailis on PATH only for that one process (npx's temporarynode_modules/.bin).commandOnPathinsrc/brand.tsskipsnode_modules/.binfolders, so those laptops getnpx -y @trailhq/trail-code mcp --brains.trail logout --workspaceof the last workspace now also removes Cursor's entry, as plaintrail logoutdoes.How it was checked
test/hosts-trail.test.tscovers the npx PATH case. It failed before the fix.trailinstalled: real Claude Code ran the connect page's copied prompt, and the laptop signed in with no browser. The Claude Code, Cursor and Codex entries came out asnpx. A new session got all 6 workspace tools and read the brand, and the page's tile turned Connected.internal/store/login_codes.go. It got the learning on that file before the edit, and its commit went through first time, becausetrail checkfound no conflicts.trail check: no conflicts.🤖 Generated with Claude Code