Trail for coding agents

A self-evolving
CLAUDE.md

Trail keeps the files your coding agent reads current. Every correction you make becomes a rule. The ones that must never break become a hook that blocks the action.

Read only. Trail proposes the changes and you approve them. Nothing is written to your repo.

  • Public repo, no install
  • Every rule cited
  • Claude Code, Codex, Cursor
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 the agent can ignore becomes a hook it cannot.

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

What comes back

A change you can read in ten seconds.

Trail proposes, you decide. Every change names the file, the line and the source it came from.

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 for all three.

One repo, many agents

Your corrections are yours. The team's decisions are the team's.

A rule reaches the shared file only when someone approves it for the team. Then every agent reads the same version.

How a rule reaches the agent

Into the file, or straight into the session.

Trail is the memory layer, not the runtime. It writes files you can read in a diff.

What people ask first.

Does Trail write to my repository?

No. Trail proposes changes and you approve them. The approved 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 your agent sessions, your commit history, and PR review threads. Every proposed rule carries the source it came from, 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 that 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 when a note has already 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 a Model Context Protocol server, plain REST and GraphQL. Trail is the memory layer, not the runtime, so it does not replace the coding agent you already use.

Can I try it on a repository that isn't mine?

Yes, if it is public. Point the field at any public repo and Trail reads it without writing anything back.

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.

Point it at a repo.
Read what it would change.

Nothing is written until you approve it.

Read only. Trail proposes the changes and you approve them. Nothing is written to your repo.