Repository navigation
Commit trail's shared setup in Trail-Code - #725
Conversation
🌱 graft blast radiusNothing outside this diff depends on it. 0 areas changed; no indexed dependents at depth 2.
Open the interactive graph → — click an area to see its dependent symbols at file:line. |
|
The committed shared hook file, Before merging:
|
Each of the three Oct 15 learnings listed the same ten paths, six of which don't exist. List only the files each one is about. Also drop the name of a private repo and an internal endpoint, since this repo is public. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Merged after one fix commit (e1426d4):
Checked every committed file for tokens, keys, internal URLs and personal data: nothing else found. |
Issue: a teammate who opens Trail-Code in Claude Code without trail is never shown the team's learnings, and 14 more learnings sat uncommitted on one laptop.
Why:
.gitignorekept.claude/settings.jsonout of git and.trail/hook.cjswas never committed, so nothing runs at session start for someone without trail.Fix: commit trail's shared setup (the hook, its one SessionStart entry,
.trail's README and ignore file) plus the 6 learnings safe for a public repo, and drop the graft helperstrail initalready deletes.Moves:
learnings_committedwithfirst_look = 'false', last 7 days (Metabase db 11,posthog_event_full_view): 4,284 events from 551 installs on 29 Oct (22–29 Oct). Each Trail-Code clone with trail fires one more after pulling this (7 more learnings: 28 on main on 3 Nov, 35 with this PR).What's in it
.claude/settings.json(new, tracked): one SessionStart entry for.trail/hook.cjs. Byte-identical tomergeTrailShared({})on main, so a teammate'strail initwrites no diff..trail/hook.cjs,.trail/README.md,.trail/.gitignore: generated from origin/main (hooksShim(),REPO_TRAIL_README). Regenerated on 2 Nov after Install trail without sudo #734 added the no-sudo line to the shim, so the hook matches whattrail initwrites on main today. A later PR that changes one of these generators must commit the regenerated file with it..gitignore: stops ignoring.claude/settings.json;settings.local.jsonstays personal. The old reason ("regenerated per machine") was true of the pre-0.23 layout, where settings.json held the status line and every hook. Since 0.23 it holds only the shared entry..claude/helpers/graft-hooks.cjs,graft-statusline.cjs,.claude/skills/graft/SKILL.md: the pre-0.23 layout.trail initdeletes them (clearOldLayout), so everyone who ran it had three deletions leaking intogit status. Nothing in src, tests or CI reads these copies.Left out, on purpose
trail note --personal.AGENTS.md,GEMINI.md,.github/copilot-instructions.md: the same 7 KBgraft:brainhouse-rules block from the old brain feature. No current command writes them, links point at the old NanoNets/Graft name, and Claude Code doesn't read them. Learnings carry this now.data/.web-token,data/share-link.txt: not part of trail's setup; not read.Checked
claude -pruns in fresh clones, no trail on PATH, emptyTRAIL_HOME,--setting-sources project: on main no SessionStart hook runs and Claude says no learnings are in its context; on this branch the hook hands it the 12 newest learnings and Claude lists their paths.trail check(2 Nov, after merging main): no conflicts, 7 worth a look. The Oct 15 one ("everytrail initalso edits the tracked.claude/settings.json… and those edits leak into unrelated PRs") was about the old layout: the committed file is exactly what init writes now. The rest are about how to run sandboxes or one-off Claude runs, or are this PR's own new learning.npm testwith a scratch HOME (2 Nov, after merging main): CI passes on Ubuntu and Windows. Locally, the full run on a heavily loaded laptop had hook timeouts. Re-running the failing files alone left 3 failures (graft-to-trail, hosts-trail, upkeep-hooks), and those same 3 fail on clean origin/main on this machine.Watch out after merge
git overwrites an ignored file when a pull brings a tracked one to the same path (tried in a scratch repo). On trail ≥ 0.23 a personal
.claude/settings.jsonalready holds exactly this entry, so nothing changes. Anyone who kept their own hooks there should move them tosettings.local.jsonfirst.Follow-ups
trail note --personalin the main checkout, and replace the stale "decoupled from assign" one.init_completedtelemetry-timing finding without the adoption numbers, so teammates get the technical part.Heads-up: once this merges, a
git pullreplaces any personal (ignored).claude/settings.jsonwith the shared one. Personal settings belong in.claude/settings.local.json.🤖 Generated with Claude Code