Repository navigation
init: learnings worth reading, from past sessions and the PRs - #701
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… shared bar Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Setup now starts the past-session read alongside the PR read, prints a line as each one lands with an example headline, shows session rows on the same screen as the PR rows, and drops a session learning the PR read already found. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The agent is now asked for a title a teammate understands with no file names, and to put files, commands and values in the body under "In the code:", in the session-start guidance, the trail skill and the in-session nudges. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The session read no longer starts (or says it's reading) when the repo has no past sessions here; the wait line says pull requests, like the rest; a long title ends at its last clause break instead of mid-word. Found on a real run on honojs/hono. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…cord Found on a real run on trailhq/trail-cloud with real past sessions: - session discovery (1.8 s over 1.6 GB of transcripts) ran before init printed anything; it now runs in the look-back's worker, and the look-back and session read share one line - the same learning came from the PRs and from a session in other words; learnings whose bodies name the same code are now one - "nothing to keep from your past sessions" printed beside 8 found - a read that finds no sessions leaves no mark, so a later init reads - each read's local mark keeps what it cost and how long it took Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…what differs From the final review: - the PR read keeps only what the owner, members and collaborators said; a closed PR from an outsider is read without its description and a PR a bot opened is skipped, so a stranger's PR can't become a team learning - secrets are scrubbed before text is clipped, and Stripe keys, env-style secrets and private keys with no end marker are caught - two learnings count as one only when they share 3 headline words and both or neither say not, or are the same kind naming the same code - a session bigger than the digest keeps its newest lines, and quotes are checked only against the lines Claude was sent - a session read Claude couldn't finish says why, and the page says skipped instead of 0 learnings - opening a learning row on the screen shows what its file will say Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🌱 graft blast radius5 areas changed → 4 areas can be affected. 17 dependent symbols, depth 2. flowchart TB
A0(("Keep Review Workflow<br/>7 symbols"))
A1(("Claude Initialization<br/>6 symbols"))
A2(("Host Registry<br/>2 symbols"))
A3(("Memory Notes<br/>2 symbols"))
classDef reached fill:#D9EDF3,stroke:#3AA7C9,stroke-width:1.5px,color:#0E313C;
class A0,A1,A2,A3 reached;
Who knows this code — 3 people across 9 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 17 dependent symbols, grouped by areaKeep Review Workflow — 7 symbols in 4 files
Claude Initialization — 6 symbols in 3 files
Host Registry — 2 symbols in 2 files
Memory Notes — 2 symbols in 1 file
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.
26 test suites also reference this code31 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. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
trail check flags hooks.ts:525 and cli.ts:77/2215/2266 against the "trail skill not loaded on Sonnet", "_trail-pair reads reviews" and "listNotes filter" learnings. Those are word matches: these lines add the team sign-in line, an import, and trail login --code. None reads reviews after init, filters listNotes or changes how the skill loads.
…706) * Sign a laptop in from an agent: trail login --code, --workspace, and the team file - `trail login --code <TRL-…>` trades the one-time code Trail's web app makes for the signed-in person for this laptop's token: no browser step. - `trail login` run by an agent prints the sign-in link for its reply and leaves a background wait, instead of blocking; `--workspace` picks the workspace on the sign-in page. Always listed in --help. - Once signed in, Claude Code and Cursor get a user-level workspace-only `trail` server and Codex its user-level `trail` server, so every agent on the laptop has the workspace's tools. - A signed-in laptop writes `.trail/workspace.json` when it syncs a repo. A teammate who pulls it and isn't signed in gets one line (MCP instructions and Claude Code's session start) to run `trail login --workspace`. The file's address is trusted only when it's the Trail this laptop signs in to anyway. - "Not connected" messages say `trail login`, not the retired connect code. trail check flags four conflicts; all are keyword matches on "trail": the Sonnet skill-loading learning, reading reviews in `_trail-pair`, and filtering in `listNotes`. None of that code changes here. * chore(release): 0.27.0 * docs(changelog): 0.27.0 notes for #701 and #703 in plain words trail check flags hooks.ts:525 and cli.ts:77/2215/2266 against the "trail skill not loaded on Sonnet", "_trail-pair reads reviews" and "listNotes filter" learnings. Those are word matches: these lines add the team sign-in line, an import, and trail login --code. None reads reviews after init, filters listNotes or changes how the skill loads. * test: the team sign-in line names npx where trail isn't installed (CI) * learning: tests that name the trail command pass with or without it installed --------- Co-authored-by: Shrish Dwivedi <shrish@nanonets.com>
trail initnow finds learnings a teammate would actually want to read, and finds them in one go.What changes
src/learn/bar.ts). Each learning must be a decision a teammate would nod at. The title is a plain headline with no file names. Files, commands and values go in the body under "In the code:". A learning is kept only if its quotes really appear in what was read.Real runs
Published 0.26.0 against this branch, at a real terminal, on a fresh clone:
Cost of a first init on trail-cloud, cold cache: $0.16 for the PR read and $0.21 for the session read, about $0.36, on the person's own plan. Each read runs once per repo, and
--look-backreads only the sessions since.Sample titles from the new run:
The extra time is the two Claude reads, which run together. Graph building and wiring happen while they run.
Safety
s) shows what its file will say before it's kept.trail check
It flags
src/cli.ts:1447against "Reading reviews in the detached_trail-pairchild after init returns". That isn't what happens here. Both reads finish inside init:finishLookBackawaits them before the page hears the run is done, and the paired test checks the page's count. The check matched on shared words.Design:
docs/superpowers/specs/2026-10-27-valuable-learnings-design.md. Install size is a separate PR.🤖 Generated with Claude Code