KUN // FIELD MAP
← the map
MEMORY YOU TRAIN · PAGE 08 OF 11backpass · AGENTS.md · /kun · OPINIONS.md · vision

backpass and the distilled self

Instruction files as weights you train from evidence, and the same move applied to a person and to a project.
TL;DR — Kun argues that a project's AGENTS.md behaves like a small set of trained weights. Every agent session is a forward pass, and the transcript it leaves behind is the loss signal. backpass runs the backward pass: it reads those transcripts and proposes a handful of edits, each backed by verbatim quotes from at least two sessions and kept under a token budget. Nothing is written until you accept the edits. Point the same idea at a person and you get OPINIONS.md and the /kun skill. Point it at a repo's history and you get the vision skill.

Most people maintain their agent instruction files the way they maintain a junk drawer. Something goes wrong, a rule goes in, and nothing ever comes out. Kun's view is that the data needed to do better is already on disk. Every coding agent writes a transcript of what it was asked, what it did, which rule it followed and where it tripped. This page covers the tool he built to learn from that data, then the two places he applied the same idea outside a repo's instruction file.

Four ways a memory file goes wrong

An AGENTS.md (or CLAUDE.md) is a markdown file the agent harness loads into the system prompt at the start of every session in a repo. Kun names four states such a file drifts into after a few months. It can be empty, so the agent rediscovers the same facts every session. It can be bloated, with every one-off incident turned into a permanent rule; each line costs tokens on every future session and dilutes the rules that matter. It can be stale, describing a build system that no longer exists. Or it can be drifted, with the Claude and Codex copies saying different things.

His diagnosis is that all four come from the same habit. The file gets edited one anecdote at a time, and appending is much easier than consolidating or pruning.

The training-loop mapping

The essay's central move is to borrow the vocabulary of neural-net training literally. The instruction file is the weights: it shapes how the agent behaves before it reads a line of code. A session is a forward pass, which uses the weights without changing them. The gap between what the agent did and what you wanted is the loss: it used the wrong package manager, ignored a rule that was right there, or followed a rule that was wrong. Reading transcripts and nudging the file is the backward pass. The token budget is the model size, and the number of edits allowed per run is the learning rate.

AGENTS.md + skills weights · 5k-token budget agent session forward pass · file untouched transcript on disk the loss signal backpass analyze loss + gradients, 2+ sessions proposed edits gradient step · few edits backpass apply human gate: accept/reject one run = one bounded gradient step rejected edits are remembered
The loop as the essay and README describe it. Sessions only read the file; backpass proposes; only backpass apply, with your verdicts, writes.
The short version: handwrite your user level AGENTS.md that holds your preferences, and treat your project level ones like a neural net. Give it a size budget and train it on the sessions that actually ran.Kun Chen, Your AGENTS.md is a Neural Net

Note the split. The user-level file holds his own preferences, so he writes it by hand and no tool should optimise it. The project-level file is the one to train. (The backpass README now also offers --scope user for user-level memory, so the tool supports the case even though the essay argues against it for his own preferences.)

What backpass actually does

backpass is that backward pass turned into a pipeline. A run goes through these stages:

The budget defaults to about 5,000 tokens for the always-loaded surface, which is the memory file plus every skill's one-line description. Skills act as the release valve. A narrow procedure with a clear trigger moves into a skill body, which costs nothing until the skill fires. A narrow rule with no detectable trigger becomes a deletion candidate.

npm install -g backpass
cd your-repo
backpass init     # writes .backpassrc.json, keeps .backpass/ out of git
backpass          # analyse and propose; never writes
backpass apply    # review each edit, then write

backpass apply opens a review page through lavish-axi: one card per edit, with the diff, the evidence quotes and a budget gauge. A rejected edit stays rejected until a later run has strictly more sessions behind it. backpass has no API keys of its own. Every model call goes through acpx, a headless client for the Agent Client Protocol (ACP, a standard way to drive coding agents programmatically), into a harness you have already logged into. The rhythm Kun describes is one run a week per active repo.

Distilling a person: OPINIONS.md

In May, before backpass, Kun wrote about an OPINIONS.md: a compact, living file of what he actually believes. It was refreshed daily by a scheduled agent job that read his X posts and Substack essays and merged durable opinions into the existing structure. The interesting part of that essay is the filtering. His technical posts are full of commands and walkthroughs, and he did not want the file to turn into a cookbook. So the prompt tells the agent to treat technical detail as evidence of an underlying value, not as content to copy.

Without that filter, the file becomes a knowledge base. With the filter, it becomes more like my taste.Kun Chen, Everyone Should Have an OPINIONS.md

He added two more ideas. The file is allowed to reorganise its sections instead of growing by appending. And there is a watchdog pass that flags opinion drift (a new post contradicting an old line) and factual risk, without silently rewriting either. The rule is the same as in backpass: evidence first, small consolidating steps, and a human decides.

The /kun skill

In September he packaged the whole thing as kunchenguid/kun, an Agent Skill you install with npx skills add kunchenguid/kun -g and call as /kun <question>. The skill file is deliberately thin. When called, the agent runs a small pull script (plain Node, no model) that syncs the repo's living documents into a local cache. Those documents are ENTRY.md, OPINIONS.md, TOOLS.md, VOICE.md, and a content/ archive of his public posts. The agent reads the four documents and opens individual posts only when it needs his actual words. If the pull fails, the skill is told to stop rather than guess. Per the README, a daily automation regenerates OPINIONS and VOICE from his public X, Substack and YouTube output, and TOOLS from his public repos. That makes these files bot-written distillations, not hand-edited text.

His reason for doing it is practical. His agents keep blocking on his judgment, either escalating decisions or making choices he then has to correct. A distillation lets them carry some of that judgment forward. He is also clear about what it leaves out:

A distillation is by definition a subset. The parts of me that can be distilled into markdown files aren’t the most valuable parts anyway.Kun Chen, I distilled myself, and you should too

The same essay also distils other people from public statements, as a demonstration of the method.

vision: the same move for a project

The vision skill turns the idea on a repository. A project's values are already written into its history, in the PRs it merged and the features it declined. vision mines that history (merged PRs through gh or gh-axi, falling back to commit history) and drafts a VISION.md as a testable acceptance policy: identity, principles, non-goals, and examples of what aligns and what gets resisted. It then deals out 8–12 hard hypotheticals, such as a tempting off-mission feature or two principles in conflict, on a lavish-axi review board. Your verdicts are folded back into the draft. Every principle must cite real PRs or commits. Generic engineering virtues are banned, and if the history is unreadable the skill refuses to invent values. firstmate's VISION.md is the worked example.

Limits

In use: In Larry's setup, backpass and the /kun skill are installed, and Kun's tools are upgraded weekly.
Next: Voice, video and toys · Back to the map.