/cure
Use this skill after
, failed validation, or user-selected review findings need to be fixed and prepared for shipping.
Inputs
Accept any of: a
slug (
reads
), a pasted findings list, a CI failure summary, or a scoped instruction like "fix the high-severity age findings". When
or
hands off a pre-locked selection (canonical format:
references/selection.md#handoff-from-age
), adopt it and go straight to apply. Called bare, apply the recommended composite (
) per
, which also defines the gate conditions.
Age reports may predate the severity-rubric revision and lack per-finding sub-fields or
. Read
§ Older report shape before selecting from such a report — it defines the inference and toleration rules; never reject a report for missing sub-fields.
Optional flags:
- — re-introduce the selection and terminal publication handoff gates.
- — after a clean cure, allow terminal publication when no PR exists.
- — autonomous mode (propagated from ). Skips user selection; requires , and always passes . Auto-selection rules: ; pass-cap and revert behaviour: below.
- — with only, ignored otherwise. Severity floor: , , , or ; definitions and the cheap-lows rule live in § Auto-mode selection.
- — propagate the metacognitive-gate flag to terminal ; see .
Portability reference:
../cheese/references/harness-portability.md
. It covers helper resolution, sub-agent dispatch, GitHub operations, and handoff transitions; prefer the bundled or repo-local helper first, and treat
as optional host-provided fallback.
The handoff blocks below are the portable contract; slash commands are host renderings, not the control model.
Flow
-
Load — read the findings (markdown, not JSON sidecars).
-
Select — adopt any pre-locked handoff from
/
; otherwise apply the recommended composite. See
for the default rule, recognized verbs, and gate conditions. To expand a user-supplied verb to finding ids:
python3 shared/scripts/findings_cli.py parse-selection --report <path> --selection "<verb>"
If the host only ships the bundle,
python3 ${CLAUDE_SKILL_DIR}/scripts/common.pyz findings_cli parse-selection ...
is the fallback.
-
Apply — fix one logical group at a time: re-confirm the anchor through a fresh bounded read, then apply a stale-safe write from a compatible backend family.
-
Validate — run the narrowest tests that prove each fix, then any relevant project-wide gates (lint, typecheck, build). When the handoff carries a recorded
block, classify gate failures against it per
../cook/references/quality-gates.md
: identical failures do not block a clean cure or trigger a halt; only new or changed failures are cure's to fix.
-
Taste-test (behavioural fixes only) — for a
behavioural fix (production logic or public surface), run the fresh-context taste-test before the handoff slug: dispatch the read-only
phase-agent (model pinned to opus) over the cure diff with cook's lenses, or fall back to the inline self-check if unavailable.
Mechanical fixes (formatting, comment, import, no-logic rename) skip this. Pipe a
into a bounded corrective pass; a Locked-decision
stops for a human. (A coder-nested cure defers the authoritative pass to the orchestrator.)
-
Domain-model correction (diff-touched terms only) — after the cook's fixes land, correct diff-touched domain-model terms (never a free rewrite). Read
references/domain-model-correction.md
before this step — it defines the store resolution, the entry format, and the hard rule against reversing a mold-locked canonical term.
-
Re-review hand-off — recommend
/age --scope <touched-path>
so review runs through the proper skill rather than reimplementing it inline.
does not re-grade its own work. If the user picks re-age, the resulting report can feed a fresh
invocation.
-
Ship report — what changed, checks run, deferred items, residual risks. Write the handoff slug at the top of
(see
below) so the chain (and
's fan pathway) can read the outcome without re-parsing the full report.
-
Plate / hand off — on a clean cure, dispatch
per
.
Preferred tools and fallbacks
Call source-code search, read, and write backends directly according to
code-intelligence-routing.md
.
Beyond source-code routing there are cure-specific tools:
| Need | Prefer | Fallback |
|---|
| Understanding findings | report plus touched diff/test context | diff, touched files, tests |
| CI and PR context | | local test output or user-provided logs |
| Diffs | | plain |
| Conflict resolution | mergiraf | manual resolution with targeted tests |
| Code navigation | semantic symbol search, then caller search | LSP or bounded native search; report precision loss |
| Read before edit | fresh bounded read from the write backend family | another snapshot-capable bounded read; re-read if anchors are incompatible |
If a preferred tool is missing, continue with the fallback. If a missing tool prevents safe application, stop and explain the blocker.
Validation
Run the narrowest tests that prove the fix, then any relevant existing wider gates. If a gate is unavailable, record why. Do not declare ready when selected findings remain unresolved.
Applied requires its proving test green (Iron Law — see
references/cure-discipline.md
).
clean cure — ≥1 fix applied, all gates green (identical recorded
failures don't count against green — see
../cook/references/quality-gates.md
), no false-premise halt. To map the post-cure gate booleans to a readiness verdict (agent judges the booleans; the CLI maps them):
python3 shared/scripts/gates_cli.py classify \
--press-status <label> \
[--hard-floor-met] [--has-open-level-1-or-2] [--has-open-level-3] [--has-open-level-4-or-5] [--any-spinning]
If the host only ships the bundle,
python3 ${CLAUDE_SKILL_DIR}/scripts/common.pyz gates_cli classify ...
is the fallback.
Handoff slug
Write the cure report to
with a minimum handoff slug at the top so
's fan pathway and
can chain without re-parsing the full report:
markdown
status: ok | halt: <one-line reason>
next: age | done
artifact: <path-if-any>
baseline: none | <recorded baseline block copied from the upstream handoff — see ../cook/references/quality-gates.md>
<one-line orientation: what cure applied or deferred>
when at least one finding applied cleanly (or no findings met the severity floor in
mode);
when every selected fix failed the revert/keep evaluation or a project-wide gate cannot be made green.
is
whenever re-review should follow — that is the autonomous-chain default and the standard interactive recommendation.
is
only when invoked interactively without
and the user explicitly opts out of re-review. Cure does not track which pass it is on; the two-cure-pass cap is enforced by
's third invocation, not by cure.
Output
Cross-cutting house style and citation form:
../cheese/references/formatting.md
.
The cure report body lives below the handoff slug in the same file at
:
markdown
## Cure Report
### Applied
- <finding>: <fix summary>
### Deferred
- <finding>: <reason>
### Checks
- <command>: <pass|fail|skipped with reason>
### Re-review
- Remaining risk:
- Suggested next step: `/age --scope <touched-path>` to verify the fixes, or `/plate` to commit/publish.
Handoff
Pipeline: culture → mold → cook → press → age → [cure] → plate
After the cure report is rendered, cure decides whether to dispatch
or ask. On a
clean cure (see Validation), the default carries work to an already-open PR without another gate.
re-introduces the handoff gate.
When the run was chained from
(
handoff_context.source_skill: /affinage
), cure
never dispatches
— it applies its fixes, runs the auto-mode
loop where applicable, and returns so
can post its GitHub replies (final writes) before owning terminal
.
Default (no ) — plate the work:
- With an open PR (), dispatch for its final writing gate, commit, topology-aware update, and publication (Rule 11 authorizes the update).
- With no open PR: dispatches — explicit topology choices and obviously cohesive work proceed without asking, while stack-sized or ambiguous work asks before commit or branch-layout mutation. Without , leave the remote untouched and finish with
no open PR — pass --open-pr or run /plate
.
- After publication lands, run § Post-PR learnings write-back below.
- If the cure was not clean, skip ; mention the blocker and stop.
— ask via the shared handoff gate in
../cheese/references/handoff-gate.md
. Default options:
- Re-review the touched code (recommended when fixes escaped the finding hunk) —
/age --scope <touched-path>
.
- Plate it — commit and open or update the PR — .
- Checkpoint & stop () or Stop (dispatch none).
Pre-select Plate it only when all selected findings applied cleanly and gates passed. Never dispatch before selection; run the selected command immediately.
Post-PR learnings write-back
After any path that
publishes to a PR — the default
dispatch, an
new PR, the
Plate it selection, or the auto-mode terminal publication — read
references/post-pr-writeback.md
before writing back. It defines the write-back candidates (upstream
+ new-since-curdle ADRs), the
writer with its file-fallback degrade, the publication-owner exception, and the "nothing to record" case.
--hard mode
propagates
to
, which completes and verifies every durable write, then gives
the final artifact inventory and proceeds only on pass. Re-review, checkpoint, and stop choices skip the gate. Mechanism:
skills/hard-cheese/SKILL.md
; composition:
../hard-cheese/references/composition.md
.
Auto mode
When invoked with
, skip the selection list and the handoff gate, auto-select every finding meeting the severity floor (
§ Auto-mode selection), apply and validate each one — reverting and deferring on breakage — then invoke
/age --scope <touched-paths> --auto
(forwarding
when in scope) so the chain re-reviews;
owns the two-pass cap. On a terminal
, dispatch
once and run the
§ Post-PR learnings write-back above.
Read
before running this mode — it defines the empty-floor case, the
puncture clause, and the cook fan-pathway sub-agent exceptions (single-curd chain and wave-curd worker) that suppress terminal
.
Rules
- Default to the recommended composite (or /'s locked selection); re-introduces the gate. A false-premise or sprawling/structural finding still pauses for a decision regardless of mode.
- Keep fixes scoped to selected (or auto-selected) findings. Baseline-identical gate failures are never cure's to fix (Flow step 4).
- Do not hide failed or skipped checks. In auto mode, reverted findings go under , never silently dropped.
- Publication contract — existing PR authorization, , , and never publishing an unclean cure: see .
- If a selected finding rests on a false premise (the claim is wrong, or the diff already addresses it), stop and surface the premise before applying. Disagreeing with the report is allowed; silently working around it is not.
- Apply the shared voice kernel (lives at
../age/references/voice.md
): lead the cure report with what was applied, flag residual risk as certain | speculating | don't know
, agree when the diff is fine without manufacturing follow-ups.
- Verification before : before writing in the handoff slug, (1) identify the gate command, (2) run it fresh in the same turn, (3) read the full output, (4) only then claim. Hedging words (, , ) are banned in completion claims — state what the gate output showed, not what you expect it to show.
Discipline
Read
references/cure-discipline.md
before applying any fix — it holds the
Iron Law, Red Flags, and the fix-application Rationalization table.
Agent resolution
Resolve fix application through
../cheese/references/agent-resolution.md
.
| Work | Preferred types | Permissions/isolation | Minimum power | Effort | Fallback |
|---|
| Apply selected findings | coder | write, isolated-worktree | default | high | compatible coder, then general |
The canonical cure handoff carries the shared
block.