/shipwright:learning-capturefrom shipwright
Captures durable user preferences and generalizable corrections by editing CLAUDE.md directly. Activates on /learn or when user states reusable rules like 'always X' or 'never Y'.
Ships in shipwright. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
When the user teaches you something durable, put it in its permanent home now —
edit CLAUDE.md or the relevant skill in the same turn. Git is the audit trail. There
is no staging file and no separate promotion step.
This skill replaces the old capture → stage → promote flow. That flow added three interruptions and trusted the model less than it deserves. The model is trusted to make the edit; the user reviews it the same way they review any other change — in the diff.
Before editing anything, run the generalization gate. Capture a learning only if both are true:
It generalizes. It will apply to future, different work — not just the change you both just made. A correction scoped to "this function", "this file", "this PR", or "in this case" is not a learning. It is just doing the task.
It is not already captured by the code. If the change you just committed already
embodies the rule — the code does it the right way now, a test enforces it, a type
makes the wrong version impossible, a lint rule will catch it — then the code is the
memory. A CLAUDE.md line that restates what the diff already shows is noise and
will rot. Skip it.
If you are unsure whether something generalizes, it probably does not. See
references/generalization-gate.md for the full criteria, signal patterns, and worked
examples. When in doubt, do not capture. A missed learning costs nothing; a noisy
CLAUDE.md costs every future session.
CLAUDE.md, a skill, the linter, or the types.When a learning passes the gate, pick its home, edit the file, and tell the user in one
line. Do not ask permission for the edit itself — the user opted in by correcting you, or
by running /learn. They can undo it with git like any other change.
Dropping the staging tier did not drop the judgement the old promote step made. That judgement still matters — it just happens inline now. It is two questions.
Question 1 — what scope? Pick the narrowest scope that still covers everywhere the learning is true. Too narrow and a future session misses it; too broad and you pollute unrelated work.
| Scope | Home | True for... |
|---|---|---|
| Package | ./packages/<x>/CLAUDE.md (nearest) | one part of one repo |
| Project · team | ./CLAUDE.md (committed) | this repo, everyone on it |
| Project · personal | ./CLAUDE.local.md (gitignored) | this repo, just you |
| User | ~/.claude/CLAUDE.md | every repo you work in, just you |
| Person / agent | the harness's own memory system (~/.claude/projects/.../memory/*.md, type: user) when present, else workspace/LEARNINGS.md as fallback | durable facts about a specific person or agent that the user interacts with (role, review authority, tone preference) |
| Plugin / org | a skill or file in a plugin — in the plugin's own repo | reusable across people and repos |
| Agent workspace | workspace/LEARNINGS.md | persistent-agent workspaces where a LEARNINGS file is the session memory store |
Note on User vs. Person / agent: The User row captures the acting user's own preferences — keyboard shortcuts, style choices, workflow habits. The Person / agent row captures durable facts about a specific individual or agent — their role, review authority, tone preference — not the person currently at the keyboard. This distinction allows you to remember facts about teammates, collaborators, or agents you interact with, separate from your own working preferences.
The team-vs-personal split at the project level is the one to get right: if a teammate
would benefit, it is CLAUDE.md; if it is your taste alone, it is CLAUDE.local.md.
Ask the user if it is genuinely unclear.
The Plugin / org row is the tricky one: a plugin's home is its own repo, usually a sibling of the project you are in, not a file under it. See The home is often another repo below before routing one of these.
Question 2 — instruction or skill? A one-line rule is an instruction — it goes in a
CLAUDE.md at the scope above. A multi-step procedure or reusable workflow is a skill.
A skill is itself scoped: ./.claude/skills/ (project), ~/.claude/skills/ (user), or a
plugin (org). Same ladder, different form.
Keep CLAUDE.md edits to one concise line per concept — it is part of every prompt.
For a skill, add the guidance to the right section and keep the SKILL.md focused.
After editing, say what you did and where, so it shows in the transcript:
Noted in CLAUDE.md: use `uv`, not `pip`, for Python package management.
That is the whole interaction. No preview, no "stage this?", no follow-up command.
A learning is frequently not about the project you are working in. It is about a piece
of your harness — a plugin, a skill pack, your marketplace, your ~/.claude setup —
and that harness lives in its own repo, a sibling of the project you are in.
Two things are true at once:
CLAUDE.md. Writing
it here buries it where nobody who maintains the tool will see it.So the interactive track does not cross repos. It does the minimal, in-flow thing:
records a precise # Harness TODO in CLAUDE.local.md. The cross-repo edit and the PR
are batched onto the dream job, which runs when you are not in flow.
Append to a # Harness TODO section in the current project's CLAUDE.local.md. Do the
useful detection now — you just record it instead of acting on it:
~/.claude/plugins/known_marketplaces.json (a directory source is a local clone; a
github source is a cache that cannot be edited).# Harness TODO
- **shipwright** (`~/src/shipwright`, local) — `skills/learning-capture/SKILL.md`:
the gate should call out type-system enforcement explicitly. Small edit.
- **shipwright** (`~/src/shipwright`, local) — the staging model is wrong;
needs a redesign. Large: file as an issue, not an edit.
Then confirm in one line and keep working:
Logged a Harness TODO for the shipwright plugin. The dream job will pick it up.
/learn-dream reads # Harness TODO and routes each entry like any other dream
candidate: in-scope repos become auto or review tasks in the task store (built by
scripts/learn-dream-tasks.ts, each with a repo and branch), so the change lands through
a normal PR. Entries for repos outside the agent's scope are reported as unroutable, and
truly-local entries are edited in the agent workspace. Flushed entries are removed from the
queue — not one interruption per correction.
If you do not run a nightly dream job, run /learn-dream on demand to flush the queue.
This is where the old "promote" judgement still lives — code you do not own needs a PR, and a tool you own but is not in front of you needs carrying to its repo — but the carrying is now batched and off your critical path.
Before adding a line, grep the target file. If a similar line exists, edit it in place rather than appending a near-duplicate. If the new learning contradicts an old one, the new one wins — replace it, do not stack both.
This skill assumes a human is present and just corrected you. Managed agents and
background agents run headless — there is no correction to react to in real time. Their
learnings are captured in batch by the dream job (/learn-dream), which reads
session transcripts on a schedule. See commands/learn-dream.md.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub app-vitals/shipwright --plugin shipwright27 skills in this plugin
/agent-readinessScore one repo against the agent-readiness catalogue (docs/readiness.md) with the deterministic scorer, post one ReadinessSnapshot and record one run. Requires --repo org/repo. No model judgment, no task creation, no repo files./canary-executionCross-cutting contract for the test-readiness pipeline. Defines how canary-eligible test code runs in two modes — `local` (boot dependencies inline, hit localhost) and `canary` (skip the boot, hit a deployed `TEST_TARGET_URL`) — via a dedicated entry point separate from the local smoke runner. Specifies eligibility rules (read-only or self-cleaning, smoke/E2E only, critical/high tier only, zero DB-dependent tests) and the deploy-gate budget (<60s wall time). Referenced by the inventory, system-design, migration, and roadmap skills.
/duplication-fixRead a repo's ready_to_propose duplication patterns from the task store (PatrolFinding) and queue them as routed task-store tasks (auto, review or plan), one task per pattern, each carrying a strangler-fig (build -> coexist -> eliminate) execution plan. Requires --repo org/repo and duplication-scan to have run first./duplication-scanDiscover emerging duplicate/similar code patterns in one repo via judgment-driven comparison, track them across runs in the task store's PatrolFinding ledger, and list only stabilized open patterns in docs/patrols/duplication.md. Requires --repo org/repo. Report only — no code changes./entropy-fixRead the entropy-scan handoff for one repo and route PR-worthy violations as task-store tasks (auto / review / plan), one task per rule. Requires --repo org/repo and /entropy-scan to have run first./entropy-scanScan one repo for principle deviations and write docs/patrols/entropy.md. Requires --repo org/repo. Report only — no code changes.Other plugins' skills for the same job