Trail for coding agents

Stop repeating yourself
to your coding agent.

Trail reads your commits and PR history, then proposes rules for CLAUDE.md. The ones that must never break become a hook instead of a note.

Paste it into Claude Code. Nothing is written until you approve it.

  • One prompt, no dashboard
  • Every rule cited
  • Nothing lands without approval
CLAUDE.mdAGENTS.mdSKILL.md
+1

## Commands

+Use pnpm. npm install rewrites the lockfile.

hook3 corrections in your sessions

Read by Claude Code

You say it every session. Trail says it once.

Today

  • MondayUse pnpm, not npm.
  • TuesdayUse pnpm, not npm.
  • WednesdayUse pnpm, not npm.
  • ThursdayUse pnpm, not npm.

Trail writes it down

CLAUDE.md

## Commands

+Use pnpm. npm install rewrites the lockfile.

from 3 corrections

  • Tuesday
  • Wednesday
  • Thursday

And when it must not break

$ npm install

Blocked before it ran

.claude/settings.json, your rule on line 3

A note it can ignore becomes a hook it cannot.

Four things it gets wrong, every repo, every week.

What comes back

Rules pulled from your commits and PR history.

Every change names where it came from. You decide.

CLAUDE.md / CommandsHook
+ Use pnpm. This repo has no package-lock.json and npm install will rewrite the lockfile.

Blocks npm install before it runs, and prints the rule instead.

3 corrections this week

A note has already failed here three times, so this one blocks the command instead.

In the app:

Upkeep

A long file is not a well-kept one.

Rules rot in three ways. Trail watches all three.

How a rule reaches the agent

Into the file, or straight into the session.

Trail writes files you can read in a diff.

What people ask first.

Does Trail write to my repository?

No. Trail proposes, you approve. The text reaches your working tree when you run graft claude-md pull, and you commit it yourself.

What does Trail read to propose a rule?

The corrections you make in agent sessions, your commit history, and PR review threads. Every proposed rule carries its source, so you can check it before approving.

What is the difference between a note and a hook?

A note is a line in CLAUDE.md or AGENTS.md the agent reads as context. A hook is a command in .claude/settings.json that blocks an action before it happens. Trail proposes a hook once a note has been written and broken.

Does this work with agents other than Claude Code?

Yes. Trail writes AGENTS.md as well as CLAUDE.md, and serves the same rules over MCP, REST and GraphQL. It is the memory layer, not the runtime, so it does not replace the agent you already use.

Is my personal file separate from the team's?

Yes. Your own corrections stay in your file. A rule reaches the shared file only when someone approves it for the team, and then every agent reads the same version.

Copy one prompt.
Read what it would change.

Nothing is written until you approve it.

Paste it into Claude Code. Nothing is written until you approve it.