Turbocharge Claude Code, Cursor, Codex, Gemini & every coding agent: faster, cheaper, with contextual understanding specific to your codebase.
TypeScript ai-agentsanthropicclaude-codeclicode-graphcodexcontext-engineeringcursordeveloper-toolsgeminiknowledge-graphllmmcpmcp-serveropen-sourceopenaitree-sitter
test(init): pin the claude kind and refresh the trail skill fixture after merging main
Shrish Dwivedi13c83061535e
diff --git a/test/fixtures/skills/trail/SKILL.md b/test/fixtures/skills/trail/SKILL.mdindex 21ff9c15..39edc3ac 100644--- a/test/fixtures/skills/trail/SKILL.md+++ b/test/fixtures/skills/trail/SKILL.md@@ -3,13 +3,15 @@ name: traildescription: Use for ANY task in this repo. What past sessions worked out, decided andruled out is in .trail/learnings/, so read the learnings on your task beforeexploring. Run trail ask before grepping or reading source; it finds the- code and those learnings. Save a learning with trail note only when the- user asks you to, never on your own, and commit it with the change. Run- trail check before you commit, push or open a PR. If the trail command isn't installed, read- .trail/learnings/ directly and credit one in a line when it shapes your- reply; after that first credit, offer once to set trail up, and only if- they say yes, run npm install -g @trailhq/trail-code and then- trail init --no-agents.+ code and those learnings. When the session finds what the code can't tell+ the next person, like a bug's cause after failed attempts, an approach+ dropped, a choice and why, or the user correcting how something is done+ here, save a learning with trail note and commit it with the change. Run+ trail check before you commit, push or open a PR. If the trail command+ isn't installed, read .trail/learnings/ directly and credit one in a line+ when it shapes your reply; after that first credit, offer once to set trail+ up, and only if they say yes, run npm install -g @trailhq/trail-code and+ then trail init --no-agents.---# trail@@ -18,13 +20,44 @@ description: Use for ANY task in this repo. What past sessions worked out, decid- **Before exploring code**, run `trail ask "<task>" --source`. Learningsfrom past sessions, yours and your teammates', on what was decided, triedand ruled out print above the code. Read them first.-- **When the user asks you to save something** for next time ("save this as- a learning", "keep this for the next session"), save it with `trail note`- and commit it with the change. How is under Learnings below. Never save- one on your own, and don't offer to.+- **When the session finds what the code can't tell the next person**, save a+ learning with `trail note`, and commit it with the change. What counts is+ under Saving a learning below.- **When the work is ready for review**, run `trail check` before you commitit, push the branch or open a PR. It checks the changes against this repo'slearnings and yours. How is under Before work goes for review below.+- **When the user corrects how something is done here**, save that as a+ learning too, so nobody has to say it again.++## Saving a learning+Save one when the session found what the code can't tell the next person:+- a bug's real cause, after attempts that didn't work;+- an approach you dropped, and why;+- a choice between options, and why this one;+- the user correcting how something is done here.++Save it before you commit or open the PR, so it ships with the change:+`trail note --title "<the fact, not the task>"` with the text on stdin. Name+the files or functions it's about, and give each decision its reason.++Don't save setting up trail or other tools, what the diff already shows,+status ("PR is open", "not merged yet"), or facts about one machine (those go+with `--personal`). When it updates an earlier learning, pass+`--replaces <file>`. `trail note` turns away a learning that names no code,+gives no reason, reads as status or repeats one, and says what to fix.++Good, `--title "CodeQL init and analyze must share a version"`:++ ## Decided+ - Pin `github/codeql-action/init` and `/analyze` to the same version in+ `.github/workflows/codeql.yml`. Mismatched, analyze fails with "Loaded a+ configuration file for version X, but running version Y".+ ## Tried and ruled out+ - Letting Dependabot bump them one at a time: it bumped only analyze and+ broke main for two weeks.++Bad, `--title "Finishing the rollout PR"`: "## Decided - PR #3372 is fixed and+pushed." Status, no file, no reason, and wrong by next week.## If trail isn't installedThe learnings are plain markdown in `.trail/learnings/`, one file per session,@@ -205,12 +238,10 @@ one saved you work, close your reply with one short line crediting it, e.g.`📝 Started from Maya's learning`. Add what it saved (`· saved ~90k tokensand ~12 min`) only when trail prints that with it; claim nothing it doesn't.-Save a learning only when the user asks you to ("save this as a learning",-"keep this for the next session"), never on your own, and don't offer to:-`trail note --title "<what it was about>"` with the text on stdin, under-`## Decided`, `## Tried and ruled out` and `## Watch out`. A summary, never a-transcript, and nothing secret. A correction or a preference the user states-is no different: save it when they ask.+To save one (when is under Saving a learning above): `trail note --title+"<the fact, not the task>"` with the text on stdin, under `## Decided`,+`## Tried and ruled out` and `## Watch out`. A summary, never a transcript,+and nothing secret.A learning is added to this repo or kept just for the user:- Added to this repo, the default: anything about the code, the repo, its@@ -222,16 +253,17 @@ A learning is added to this repo or kept just for the user:their own machine and setup. It stays on their machine, out of the repo.`trail note` prints the line to close your reply with. For a learning added-to this repo it prints two: one for when the learning is committed by the end of your-turn, one for when it isn't. Check with `git status --porcelain+to this repo it prints two: one for when the learning is committed by the end+of your turn, and one for when it isn't, which asks the user whether to commit+it with the change. On a yes, commit it. Check with `git status --porcelain.trail/learnings` before you close, and use the one that's true.Never edit a learning once it's written, yours or a teammate's: it's therecord of what that session knew. When a change goes against one on purpose,-say why in the commit message. If the user asks you to save what changed,-save it as a new learning that replaces the old one (`trail note --replaces-<id>`). A replacement saved on this branch leaves the conflict in place-until it's merged, so still say why in the PR.+say why in the commit message and save a new learning that says what changed+and why, with `--replaces <file>` when it takes over from an earlier one. A+replacement saved on this branch leaves the conflict in place until it's+merged, so still say why in the PR.## Before work goes for reviewWhen the work is ready for review, run `trail check` before you commit it,diff --git a/test/skills-contracts-1b.test.ts b/test/skills-contracts-1b.test.tsindex 926c3d7b..a1b50761 100644--- a/test/skills-contracts-1b.test.ts+++ b/test/skills-contracts-1b.test.ts@@ -142,10 +142,11 @@ test("skills/types.ts: offers, ledger, state and the two receipts", () => {test("init/types.ts: init's shared types, types only", () => {const text = read("init/types.ts");- assert.deepEqual(literals(declarations(text, "InitKind")[0]!), ["skill", "guardrail", "preference", "review"]);+ // D184: 'claude' is #662's team row from what Claude Code keeps about the repo.+ assert.deepEqual(literals(declarations(text, "InitKind")[0]!), ["skill", "guardrail", "preference", "review", "claude"]);assert.deepEqual(fields(declarations(text, "TypedRef")[0]!), ["t", "o", "s"]);assert.deepEqual(fields(declarations(text, "InitCandidate")[0]!),- ["id", "kind", "key", "plainName", "nameWords", "count", "scope", "applies", "typed", "ticked", "skill", "guardrail", "pref", "review", "evidence", "rank"]);+ ["id", "kind", "key", "plainName", "nameWords", "count", "scope", "applies", "typed", "ticked", "skill", "guardrail", "pref", "review", "memory", "evidence", "rank"]);assert.deepEqual(fields(declarations(text, "InitItem")[0]!), ["n", "title", "description"]);assert.match(text, /export interface InitItem extends InitCandidate\b/);assert.deepEqual(fields(declarations(text, "LookBack")[0]!),