kunchenguid/backpass

You don't write AGENTS.md. You train it with gradient descent.

What it solves

backpass is a tool designed to automate the improvement of AI agent memory files (like AGENTS.md or CLAUDE.md) and project skills. It solves the problem of "stale" agent instructions that are only updated by humans manually after remembering a failure. By treating agent sessions as "loss signals," it identifies where instructions were ignored, caused harm, or where gaps in instructions exist based on real-world usage transcripts.

How it works

The tool follows a "gradient descent" metaphor for memory optimization:

  1. Collection: It reads local transcripts from various agent harnesses (e.g., Claude Code, Codex, Cursor CLI) directly from disk without using APIs or uploading data.
  2. Distillation: Raw transcripts are reduced by 96-99% to remove tool-call noise, keeping only essential user/assistant turns and redacted secrets.
  3. Loss Calculation: A cheap model analyzes a recency-weighted sample of distilled traces to identify which instructions helped, which were violated, and what mistakes occurred that no current instruction covers.
  4. Aggregation: Evidence is grouped by instruction. Every proposed edit (add, rewrite, remove) requires evidence from at least two distinct sessions to prevent noise from causing rewrites.
  5. Human Gate: The tool never writes to files automatically. Users must run backpass apply to review each proposed edit and its supporting verbatim quotes before accepting or rejecting them.

Who it’s for

Developers using AI coding agents that rely on project-specific memory files or skill sets to maintain context and consistency across sessions.

Highlights

  • Local-first: Transcripts are read directly from disk; no external API keys are required for the tool itself (it uses the user's existing acpx authentication).
  • Evidence-gated: Every proposed change is backed by verbatim quotes from real sessions.
  • Human-in-the-loop: All changes are gated by a manual review process.
  • Multi-harness support: Compatible with seven different agent transcript stores, including Claude Code and Cursor CLI.

Related

  • Project
  • Project
  • Project
  • Project
  • Project