Repository navigation
init: show each learning the moment Claude writes it - #703
Conversation
The reads stream Claude Code's answer and check each learning as soon as it is whole, so the terminal and Trail's page show the first one about 6 s in instead of when both reads finish. Same prompt, model and checks: the list init offers at the end is unchanged. A Trail that says it takes live learnings (live_found) gets them while init reads, and the final list replaces them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🌱 graft blast radius5 areas changed → 2 areas can be affected. 2 dependent symbols, depth 2. flowchart TB
A0(("Name Call Initialization<br/>1 symbol"))
A1(("Cloud Connection Nudge<br/>1 symbol"))
classDef reached fill:#D9EDF3,stroke:#3AA7C9,stroke-width:1.5px,color:#0E313C;
class A0,A1 reached;
Who knows this code — 2 people across 7 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 2 dependent symbols, grouped by areaName Call Initialization — 1 symbol in 1 file
Cloud Connection Nudge — 1 symbol in 1 file
Test signal per changed area — 1 ✓ · 2 ⚠ · 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.
11 test suites also reference this code15 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. |
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 shows each learning the moment Claude writes it, in the terminal and on Trail's page, instead of all of them at the end.Why
Init spends about 85% of its time waiting on Claude to write the learnings: about 20 s per read. I replayed a real read to see what helps:
So the answer streams. Same prompt, same model, same checks: every learning is verified against its quotes before it is shown, and the list init offers at the end is unchanged.
What changes
callClaudetakesonFinding. With it, Claude Code runs with--output-format stream-json --include-partial-messages, and each finding is handed over as soon as its JSON object closes (completedFindings). Failures read the same as before.LiveFeed, which drops the same learning found by the other read.· found "<headline>" in pull requestsper learning. No "still reading" line after a read already showed one.features: ["live_found"]gets each learning while init reads. The first part of the final list carriesreplaceFound: true, so a learning dropped later (a duplicate, or not about this code) never reaches the review. An older Trail gets only the final list, as before. Server side: trailhq/trail-cloud#72.Real runs
trailhq/trail-cloud, at a real terminal, cold:
Paired against a local trail-cloud built from the server PR: the live page listed 4 learnings at ~12 s and 10 at ~18 s, then the final view. The database held no live entries after the final list.
trail check
It flags
src/cli.ts:1678andsrc/cloud/pair.ts:113against two learnings, on shared words only:_trail-pairchild after init returns": not what happens. The reads still finish inside init. Live learnings go to the page while init runs, and the final list replaces them beforedone, which is what keepall.go waits on.listNotes": this change doesn't touchlistNotes.🤖 Generated with Claude Code