Runs a telemetry-driven self-improvement loop: `discover` finds improvement hypotheses in a service's traces and metrics, `validate` re-measures each in an independent window, a human `approve`s, `ship` sends it through `/atelier`, and `verify` judges it against the baseline stored on a LoreKit bus once the change is deployed. A confirmed hypothesis closes; a neutral or regressed one escalates through `ticket` or retries once. Five scores rank the queue, and a separate rule decides AUTO vs HU...
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Improve?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/mthines-improve)
---
name: improve
description: >
Runs a telemetry-driven self-improvement loop: `discover` finds improvement hypotheses in a service's traces and metrics,
`validate` re-measures each in an independent window, a human `approve`s, `ship` sends it through `/atelier`, and
`verify` judges it against the baseline stored on a LoreKit bus once the change is deployed. A confirmed hypothesis
closes; a neutral or regressed one escalates through `ticket` or retries once. Five scores rank the queue, and a
separate rule decides AUTO vs HUMAN. Opt-in for atelier through `.agents/aw/improve.yml`. `setup` writes that file.
Triggers on "find improvements from telemetry", "what should we optimise", "did that change actually help", "/improve".
disable-model-invocation: false
argument-hint: '[discover|validate|approve|reject|ship|verify|status|setup] [<id>] [--repo <owner/name>] [--sha <merge-sha>] [--unattended]'
license: MIT
metadata:
author: mthines
version: '0.1.0'
workflow_type: orchestrator
tags: [telemetry, hypotheses, baseline, self-improvement, lorekit, atelier, verification]
---
# improve
`/aw-verify` proves a feature works before the merge, and `/deployment-verify` proves it did no harm after.
Neither asks whether the change was worth making, and neither remembers.
This skill does both: it finds what is worth improving, records the baseline before anything ships, and checks the result after the deploy.
Scripts decide; the agent measures and writes.
Why it is shaped this way: [`references/design.md`](./references/design.md).
## Invocation
```text
/improve setup # write .agents/aw/improve.yml (interactive only)
/improve discover # mine telemetry, write `proposed` hypotheses with a baseline and scores
/improve validate <id> # re-measure in an independent window; → validated or rejected
/improve approve <id> # the human gate (interactive only); /improve reject <id> [reason]
/improve ship <id> # dispatch /atelier for an approved hypothesis
/improve verify [--sha <merge-sha>] # judge every deployed hypothesis whose after-window is complete
/improve status # read-only table of the bus
```
| Argument | Meaning |
| --- | --- |
| `<id>` | A hypothesis slug, `<service>-<route>-<stat>-<n>` |
| `--repo` | The bus scope's `<owner/name>`; default is the current checkout's. Use a scratch slug to dry-run without touching a real repo's bus |
| `--sha` | The merge commit a deploy just finished; `verify` still judges every due hypothesis, not only that one |
| `--unattended` | No questions; `approve` and `setup` are refused, everything else runs |
## Step 0 — Resolve and refuse early
1. Read `.agents/aw/improve.yml` ([`rules/discover.md`](./rules/discover.md#config)). Missing → `STOPPED — run /improve setup first`; an atelier call with no file is a silent no-op, never an error.
2. Run the three self-tests and the calibration gates; a failure stops the run, because a verdict rule is broken:
```bash
node ${CLAUDE_SKILL_DIR}/scripts/judge.mjs --self-test
node ${CLAUDE_SKILL_DIR}/scripts/score.mjs --self-test
node ${CLAUDE_SKILL_DIR}/scripts/bus.mjs --self-test
node ${CLAUDE_SKILL_DIR}/scripts/simulate.mjs
```
3. Resolve `<owner/name>` from `--repo`, else `gh repo view --json nameWithOwner`. Probe the bus with `bus.mjs --list --repo <slug>`; a `Degraded:` line stops every mode except `status` and `setup`, because nothing is recorded without it.
4. Telemetry comes from the `.agents/aw/telemetry.yml` backend, read the way `telemetry-verify` reads it (the Dash0 MCP server chosen by capability, never by name).
## Modes
| Mode | Does | Owner rule |
| --- | --- | --- |
| `discover` | Queries the configured services over `window_hours`, writes up to `max_open` minus the open count `proposed` records | [`rules/discover.md`](./rules/discover.md) |
| `validate` | Second independent window, code-path lookup, `/confidence analysis`, `/critical analysis`; → `validated` or `rejected` | [`rules/discover.md`](./rules/discover.md#validate) |
| `approve`, `reject` | The human gate; records the review time; `score.mjs` prints the recommendation beside it | [`rules/scoring.md`](./rules/scoring.md) |
| `ship` | `Skill("atelier", "<request> --improve <id>")`; the record moves `approved` → `shipping` and stores the PR | [`rules/hook.md`](./rules/hook.md#ship) |
| `verify` | Judges each deployed hypothesis against its baseline and applies the transition | [`rules/judge.md`](./rules/judge.md), [`rules/hook.md`](./rules/hook.md#verify) |
Every state change goes through `bus.mjs --apply`, which refuses an illegal transition ([`rules/bus.md`](./rules/bus.md)):
```text
✗ write the record's "state" field by hand with memory_write
✓ node ${CLAUDE_SKILL_DIR}/scripts/bus.mjs --apply --repo acme/web --id api-orders-p95-1 --to validated --reason "second window: p95 612 ms, n 940"
```
## Rules
- **Scripts decide.** The verdict comes from `judge.mjs`, AUTO vs HUMAN from `score.mjs`, legality of a state change from `bus.mjs`; never from your judgment.
- **A human approves every hypothesis until `improve.yml` sets `autonomy`.** An unset `autonomy` is always HUMAN, and `critical` and `data` risk classes are never AUTO ([`rules/scoring.md`](./rules/scoring.md)).
- **The baseline is taken before the change ships, from the same query the after-window reuses.** A baseline measured differently from the after-window is refused ([`rules/judge.md`](./rules/judge.md#same-query)).
- **improve never rolls back and never flips a flag.** A `regressed` verdict is recorded and escalated; `/deployment-verify` owns the rollback.
- **The bus is evidence, never a gate on a stage.** An unreachable store is one `Degraded:` line; atelier proceeds.
- **One retry.** A `neutral` or `regressed` hypothesis may be revised once (`attempt: 2`); the second failure escalates ([`rules/bus.md`](./rules/bus.md#retry-and-escalate)).
## Output
```text
IMPROVE <mode>
- Repo: <owner/name>
- Bus: <n open> open, <n> confirmed, <n> escalated
- Judged: [<id> <VERDICT> <effect_pct> % vs a <band_pct> % band | none due]
- Degraded: [what was skipped and why, or "none"]
- Needs you: [the next human step (approve <id>, a ticket link), or "nothing"]
```