manual / nothing invented

Every command, run against this repo.

gradient is developed with gradient. Each output below is a real capture from the tool’s own repository — the CLI mining the history of the sessions that build it.

captured 2026-08-13 · v0.8.0 · 366 transcripts across Claude Code and Codex · home paths shortened to ~ · long outputs trimmed, never rewritten

01 / the report

Type six letters. Get the whole picture.

gradient with no arguments is the command you actually run. It reads nothing but your local transcripts, calls no model, and answers four questions in order: what happened, what it cost, what is installed and whether anyone uses it, and what to do next.

gradient

the whole picture, no arguments

Every number here is counted, not estimated. The installed block is the uncomfortable one: both artifacts gradient generated for this repo have been used zero times, and it says so rather than quietly padding a coverage percentage.

Note what the cost lines do not claim. Nudges are reported as attention spent across the tokens you had to drive — automating them saves your attention, not those tokens. An earlier version framed that 3.1M figure as recoverable. It is not, and saying so was the fix.

no model callread-only
gradientreal capture
$ gradient
gradient · analysis engine v0.8.0
project scope · all history
  prompts 71   nudges 11   interrupts 16
  context deaths 5   compacts 5   error pastes 0
  model switches 5   effort switches 0
  in-session failure loops 0   post-edit rituals 0

cost of unautomated habits
  → ≈17,238 tokens · 5 context re-explain(s) · gradient on continuity
  → 11 nudge prompt(s) across ≈3,151,905 tokens of turns you had to drive · gradient on autopilot

installed
  pr-link  0 use(s) · last never  → unused 30d+, consider: gradient remove pr-link
  continue  0 use(s) · last never

pending suggestions — review with gradient optimize
  [high] notify-when-waiting  Desktop ping when Claude Code is waiting on you  measured

other sessions
  gradient board — 2 other sessions in this repo
  • claude · release/0.7.0 · main checkout · live (0m)
  landed on main (24h): PR #28 fix/dogfood-findings
  open PRs: #32 release/0.7.0 → main

features: continuity off  autopilot off  board off  optimize off

  → you typed 11 nudges — try: gradient on autopilot
  → unused 30d+: gradient remove pr-link

02 / the loop

Mine locally. Approve explicitly. Apply reversibly.

Three commands cover the whole life of an automation, from “you keep typing this” to a tracked artifact you can delete with one command. Nothing is written without your approval, and nothing is written that remove cannot undo.

gradient optimize

find what recurs and what has gone stale, then propose

Everything here is computed locally, with no model call and no network connection. Clustering is model-free; so is resolving the paths and scripts your instructions mention against the actual repository, and reading the frontmatter of every installed skill.

Read the rejection lines: this run threw away more than it kept, and said why. A pattern seen only within a single day is project history, not a habit. An approval phrase like lgtm is a nudge, not a workflow. An artifact that would only repeat the prompt it was mined from costs more to invoke than to retype.

Findings are ranked worst-first and grouped by family, each with an id, an evidence line you can check, and the exact change it would make. --json hands the whole set to your assistant, and every run writes a self-contained local page you click through.

The findings are about files. The block under them is what runs between your prompts, and what each switch that is off would do — the person deciding which findings to act on is the person deciding what to automate.

no model callno network--target · --apply · --deny · --auto · --undo · --json
gradient optimizereal capture
$ gradient optimize --target both
gradient · analysis engine v0.8.0
files: 366 transcripts (Claude Code 298 · Codex 68)
prompts: 336 after filtering injected text
tool events: 8511 (674 dropped) → 2 failure loops, 0 rituals
recurrence gate → 6 prompt-derived candidate(s) held back as project history
nudge filter → 1 approval phrase(s) dropped; see gradient on autopilot
restatement filter → 3 suggestion(s) dropped; the generated artifact only repeated the prompt

drift
  [high] 9f2a1c04b8de  AGENTS.md is not reaching Claude Code
      AGENTS.md exists; CLAUDE.md does not import it

skill-health
  [med ] 4dde8ee8555f  The sentry-cli skill carries frontmatter outside the spec
      ~/.claude/skills/sentry-cli/SKILL.md · version, requires

workflow
  [med ] 1b5f8a488796  Save a checkpoint before context compaction
      seen 20× across 18 session(s) · counted from tool events

apply: gradient optimize --apply 9f2a1c04b8de

features
  continuity  on
  autopilot   off  — draft a reply when a session stalls waiting on you
  board       off  — cross-session digest on start and on prompt
  optimize    off  — re-check after a session ends (at most daily), surface it at the next start

checkup page: file:///Users/you/.config/gradient/runs/20260818-224858-f2ecb8/report.html

gradient optimize --apply

write exactly what you named

Every write to a file gradient does not own is snapshotted first and guarded by a content hash: if the file moved since the finding was computed, the change is refused rather than forced. Concurrent sessions take an advisory lock.

--apply does not re-mine. It is a follow-up to a run you are already looking at, so rebuilding findings from hundreds of transcripts would make approving a one-line change the slowest thing gradient does.

Every run that writes gets an id. gradient optimize --undo <runId> puts it back — except for a file that changed again afterwards, which is reported rather than restored. Undo must never be the thing that loses work.

snapshottedreversible with --undo
gradient optimize --applyreal capture
$ gradient optimize --apply 9f2a1c04b8de
applied AGENTS.md is not reaching Claude Code
  ~/projects/acme/CLAUDE.md

undo: gradient optimize --undo 20260813-221000-a1f4c9

gradient remove

undo exactly one artifact

Deletes one generated artifact — the file or hook it created and its manifest entry, nothing else. Adjacent hooks you wrote yourself, and your permissions block, are left untouched. Every experiment on this page was cleaned up with exactly this command, and the settings file was byte-compared afterwards.

surgical undo
gradient removereal capture
$ gradient remove notify-when-waiting
removed notify-when-waiting

03 / background features

One verb for everything that runs unattended.

Four features run between your prompts. Each is off until you turn it on, records its consent in your private config, and uninstalls with the same verb. This used to be four commands with three different grammars.

gradient on|off

continuity · autopilot · board · optimize

continuity writes a progress file before a compaction and reads it back on resume, so a context death costs you a paragraph instead of a re-explanation. autopilot answers the nudges — the continue, lgtm, go on turns that carry no information — up to a budget you set, and never past what a project’s gradient.md allows.

board shows what your other sessions are doing in the same repo. optimize opens each session with the top fresh suggestion. Both write to the same local settings file, and turning either off removes precisely what it added.

off by defaultconsent recordedsame verb removes it
gradient on / gradient offreal capture
$ gradient on continuity
continuity on — checkpoint before compaction, recap on resume
  ~/projects/gradient/.claude/settings.local.json

$ gradient on autopilot
autopilot on — nudge
  ~/projects/gradient/.claude/settings.local.json

$ gradient on board
board on — cross-session digest on start and on prompt
  ~/projects/gradient/.claude/settings.local.json

$ gradient on optimize
optimize on — re-check after a session ends (at most daily), surface it at the next start
  ~/projects/gradient/.claude/settings.local.json

$ gradient off continuity
continuity off
  ~/projects/gradient/.claude/settings.local.json

04 / reviewing & scheduling

Click through it, or let it run.

There is no init. The first optimize asks which assistants to optimize for, remembers the answer, and installs the gradient skill for them — the only question it ever asks.

the checkup page

written by every optimize run

A file:// document with no server, no port, and no external reference of any kind — no stylesheet, script, font, or image. It renders identically offline and cannot report what it is displaying.

Accept or deny each finding and it builds the gradient optimize --apply … line in the footer for you to copy back into the session you are already in.

no server, no portzero external references
gradient optimizereal capture
$ gradient optimize

checkup page: file:///Users/you/.config/gradient/runs/20260813-221000-a1f4c9/report.html

gradient optimize --auto

headless, on your schedule

--auto applies only additive, reversible, gradient-owned changes. It never edits prose a person wrote, never installs a new artifact, and never writes a line carrying a command invocation — at any tier, in any family.

gradient on optimize installs both halves of the loop: a SessionEnd hook that re-checks after a session ends, debounced to at most once a day, and a SessionStart hook that surfaces the highest-severity pending finding at the next one.

gradient installs no daemon and owns no timer. --print-schedule prints the snippet for your platform; installing it — and removing it — stays yours.

deterministic tier onlynever edits prose you wrote
gradient on optimizereal capture
$ gradient on optimize
optimize on — re-check after a session ends (at most daily), surface it at the next start
  ~/projects/acme/.claude/settings.local.json

$ gradient optimize --print-schedule
# cron — add with `crontab -e`:
0 9 * * 1 cd ~/projects/acme && gradient optimize --auto

05 / the gradient.md file

The automation contract this repo actually ships.

Not a template — this is the verbatim gradient.md committed at the root of gradient’s own repository.

gradient.mdrepo root · committed
---
autopilot:
  max-mode: nudge   # ceiling for this repo: off | nudge | full
  budget: 5         # auto-responses per session
---

# gradient.md

The automation contract for this repo. `gradient`'s own Stop-hook auto-responder
reads this file; Claude Code does not. Project-level instructions for the agent
itself belong in `CLAUDE.md`.

The frontmatter above **clamps** autopilot for anyone working here. It can only
lower authority, never raise it: if your global mode is `full`, it drops to
`nudge` in this repo; if your global budget is 10, it drops to 5. Comments are
descriptive — the parser strips them.

## Rules

- Never push, deploy, publish, or open a PR from autopilot. `make publish` is
  especially off-limits: it pushes a tag and creates a public GitHub release,
  neither of which is easy to undo.
- Never commit directly to `main`. Work on a branch.
- Never green-light a destructive git operation — `reset --hard`, `branch -D`,
  force-push, remote branch deletion. Stand down and let me run it.
- If tests are red, the work is not done. Say so rather than moving on.
- When a design decision has more than one defensible answer, stand down and
  ask. Prefer standing down over guessing.

## Workflows

- This is a TDD repo. The next step after a failing test is the minimal code to
  pass it — not a larger design. Write the test first, watch it fail, then
  implement.
- The build and test loop is `cd cli && npm test`, and `npm run build` before
  claiming a CLI change works. A change to `cli/src/` is not verified until the
  suite is green.
- Specs live in `docs/superpowers/specs/`, plans in `docs/superpowers/plans/`.
  A spec is written and approved before its plan; a plan before its code.
- After code changes land, the typical next step is running the full suite and
  then reviewing the diff against `main` — not starting the next feature.

clamp-only frontmatter

The YAML block can only lower autopilot’s authority, never raise it. A global mode of full drops to nudge in this repo; a global budget of 10 drops to 5. It cannot go the other way, and anything the parser can’t read turns autopilot off rather than up.

rules the autopilot obeys

Hard lines for the auto-responder: never publish, never touch main directly, never green-light destructive git. When a decision has two defensible answers, it stands down and asks instead of guessing.

not a second CLAUDE.md

gradient.md is read by gradient’s own hooks — the automation contract. Instructions for the coding agent itself still belong in CLAUDE.md or AGENTS.md. Committing this file changes what automation may do; it can’t switch anything on.