cure
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese/cure
/cure
Use this skill after , failed validation, or user-selected review findings need to be fixed and prepared for shipping.
/age当/age报告、验证失败或用户指定的评审问题需要修复并准备发布时,使用此技能。
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: ), adopt it and go straight to apply. Called bare, apply the recommended composite () per , which also defines the gate conditions.
/age/cure <slug>.cheese/age/<slug>.md/age/affinagereferences/selection.md#handoff-from-ageall-medium, cheapreferences/selection.mdAge 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.
confidencereferences/selection.mdOptional flags:
- — re-introduce the selection and terminal publication handoff gates.
--safe - — after a clean cure, allow terminal
--open-prpublication when no PR exists./plate - — autonomous mode (propagated from
--auto). Skips user selection; requires/cook --auto, and--stake <floor>always passes/cook --auto. Auto-selection rules:medium+; pass-cap and revert behaviour:references/selection.mdbelow.## Auto mode - — with
--stake <floor>only, ignored otherwise. Severity floor:--auto,blocker,high, ormedium+; definitions and theallcheap-lows rule live inmedium+§ Auto-mode selection.references/selection.md - — propagate the metacognitive-gate flag to terminal
--hard; see/plate.## --hard mode
Portability reference: . 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.
../cheese/references/harness-portability.md${CLAUDE_SKILL_DIR}接受以下任意输入:/age报告的slug( 会读取 )、粘贴的问题列表、CI失败总结,或类似“修复/age报告中的高严重性问题”这类限定性指令。当/age或/affinage传递预先锁定的选择内容(标准格式:)时,直接采用该内容并开始修复。若未指定输入,则按照中的推荐组合()执行,该文件同时定义了验证门禁条件。
/cure <slug>.cheese/age/<slug>.mdreferences/selection.md#handoff-from-agereferences/selection.mdall-medium, cheap部分/age报告可能早于严重性规则修订,缺少每个问题的子字段或字段。从这类报告中选择问题前,请先阅读中的「旧版报告格式」章节,其中定义了推断和容错规则;请勿因缺少子字段而拒绝报告。
confidencereferences/selection.md可选参数:
- — 重新启用选择环节和最终发布的交接门禁。
--safe - — 修复完成后,若不存在PR,则允许调用/plate进行最终发布。
--open-pr - — 自主模式(从
--auto继承)。跳过用户选择环节;需配合/cook --auto使用,且--stake <floor>始终传递/cook --auto参数。自动选择规则参见medium+;传递上限和回退行为参见下文「## 自主模式」。references/selection.md - — 仅在
--stake <floor>模式下生效,其他模式下忽略。严重性下限可选:--auto、blocker、high或medium+;定义及all的低成本规则参见medium+中的「自主模式选择」章节。references/selection.md - — 将元认知门禁参数传递给最终的/plate;参见「## --hard模式」。
--hard
可移植性参考:。该文档涵盖了助手解析、子Agent调度、GitHub操作及交接流程;优先使用捆绑或仓库本地的助手,将视为可选的宿主提供的备用路径。
以下交接模块是可移植的契约;斜杠命令是宿主层面的呈现形式,而非控制模型。
../cheese/references/harness-portability.md${CLAUDE_SKILL_DIR}Flow
流程
-
Load — read the findings (markdown, not JSON sidecars).
-
Select — adopt any pre-locked handoff from/
/age; otherwise apply the recommended composite. See/affinagefor the default rule, recognized verbs, and gate conditions. To expand a user-supplied verb to finding ids:references/selection.mdpython3 shared/scripts/findings_cli.py parse-selection --report <path> --selection "<verb>"If the host only ships the bundle,is the fallback.python3 ${CLAUDE_SKILL_DIR}/scripts/common.pyz findings_cli parse-selection ... -
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 recordedblock, classify gate failures against it per
baseline:: identical failures do not block a clean cure or trigger a halt; only new or changed failures are cure's to fix.../cook/references/quality-gates.md -
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-onlyphase-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
reviewerinto a bounded corrective pass; a Locked-decisionrevisestops for a human. (A coder-nested cure defers the authoritative pass to the orchestrator.)halt -
Domain-model correction (diff-touched terms only) — after the cook's fixes land, correct diff-touched domain-model terms (never a free rewrite). Readbefore this step — it defines the store resolution, the entry format, and the hard rule against reversing a mold-locked canonical term.
references/domain-model-correction.md -
Re-review hand-off — recommendso review runs through the proper skill rather than reimplementing it inline.
/age --scope <touched-path>does not re-grade its own work. If the user picks re-age, the resulting report can feed a fresh/cureinvocation./cure -
Ship report — what changed, checks run, deferred items, residual risks. Write the handoff slug at the top of(see
.cheese/cure/<slug>.mdbelow) so the chain (and## Handoff slug's fan pathway) can read the outcome without re-parsing the full report./cook -
Plate / hand off — on a clean cure, dispatchper
/plate.## Handoff
-
加载 — 读取问题内容(markdown格式,而非JSON副文件)。
-
选择 — 采用/age或/affinage传递的任何预先锁定的选择内容;否则应用推荐组合。默认规则、可识别动词及门禁条件参见。如需将用户提供的动词扩展为问题ID:
references/selection.mdpython3 shared/scripts/findings_cli.py parse-selection --report <path> --selection "<verb>"若宿主仅提供捆绑包,则使用备用命令:python3 ${CLAUDE_SKILL_DIR}/scripts/common.pyz findings_cli parse-selection ... -
修复 — 每次修复一个逻辑组:通过新的有限读取重新确认锚点,然后从兼容的后端库执行防过期写入。
-
验证 — 运行能证明每个修复有效的最窄范围测试,再运行任何相关的项目级门禁(代码检查、类型校验、构建)。当交接内容包含已记录的模块时,需对照
baseline:对门禁失败进行分类:与基线完全一致的失败不会阻碍修复完成或触发终止;仅新出现或变更的失败需要/cure修复。../cook/references/quality-gates.md -
尝试验证(仅针对行为修复) — 对于行为修复(生产逻辑或公共接口),在生成交接slug前运行上下文尝试验证:通过cook的视角,将修复差异交由只读的阶段Agent(模型固定为opus)进行评审;若该Agent不可用,则退化为内联自检查。机械修复(格式调整、注释修改、导入优化、无逻辑重命名)可跳过此步骤。若发现问题,则执行
reviewer进行有限的修正;若收到锁定决策revise,则停止操作等待人工介入。(嵌套在编码流程中的修复会将权威验证环节委托给编排器。)halt -
领域模型修正(仅针对差异涉及的术语) — 在cook的修复完成后,修正差异涉及的领域模型术语(禁止无约束重写)。执行此步骤前,请阅读,其中定义了存储解析、条目格式,以及禁止修改已锁定的标准术语的严格规则。
references/domain-model-correction.md -
交接评审 — 推荐调用,使评审通过合适的技能进行,而非内联重新实现。/cure不会重新评估自身的修复工作。若用户选择重新评审,生成的报告可用于新的/cure调用。
/age --scope <touched-path> -
发布报告 — 记录变更内容、运行的检查、延迟处理的项及剩余风险。在顶部写入交接slug(参见下文「## 交接slug」),以便流程链(及/cook的分支路径)无需重新解析完整报告即可读取结果。
.cheese/cure/<slug>.md -
交付/plate — 修复完成后,按照「## 交接」部分的规则调用/plate。
Preferred tools and fallbacks
首选工具及备选方案
Call source-code search, read, and write backends directly according to .
code-intelligence-routing.mdBeyond source-code routing there are cure-specific tools:
| Need | Prefer | Fallback |
|---|---|---|
| Understanding findings | | 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.
根据直接调用源代码搜索、读取及写入后端。
code-intelligence-routing.md除源代码路由外,还有/cure专用工具:
| 需求 | 首选工具 | 备选方案 |
|---|---|---|
| 理解问题 | /age报告 + 涉及的差异/测试上下文 | 差异文件、涉及的文件、测试用例 |
| CI及PR上下文 | | 本地测试输出或用户提供的日志 |
| 差异展示 | | 原生 |
| 冲突解决 | mergiraf | 配合针对性测试手动解决 |
| 代码导航 | 语义符号搜索,其次是调用方搜索 | LSP或有限原生搜索;记录精度损失 |
| 编辑前读取 | 从写入后端库获取最新的有限读取结果 | 其他支持快照的有限读取;若锚点不兼容则重新读取 |
若首选工具缺失,则使用备选方案。若缺失的工具会阻碍安全修复,则停止操作并说明阻塞原因。
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.mdclean cure — ≥1 fix applied, all gates green (identical recorded failures don't count against green — see ), no false-premise halt. To map the post-cure gate booleans to a readiness verdict (agent judges the booleans; the CLI maps them):
baseline:../cook/references/quality-gates.mdpython3 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, is the fallback.
python3 ${CLAUDE_SKILL_DIR}/scripts/common.pyz gates_cli classify ...运行能证明修复有效的最窄范围测试,再运行任何相关的现有全局门禁。若门禁不可用,记录原因。当仍有未解决的指定问题时,不得宣布修复完成。
修复必须通过对应的验证测试(铁律 — 参见)。
references/cure-discipline.md修复完成 — 至少应用了1项修复,所有门禁均通过(与已记录的完全一致的失败不计入失败 — 参见),无错误前提导致的终止。如需将修复后的门禁状态映射为就绪 verdict(Agent判断状态;CLI负责映射):
baseline:../cook/references/quality-gates.mdpython3 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]若宿主仅提供捆绑包,则使用备用命令:
python3 ${CLAUDE_SKILL_DIR}/scripts/common.pyz gates_cli classify ...Handoff slug
交接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:
.cheese/cure/<slug>.md/cook/cheese --continuemarkdown
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>status: ok--autostatus: halt: <reason>next:agenext:done--auto/age --auto将修复报告写入,并在顶部添加最小化交接slug,以便/cook的分支路径和无需重新解析完整报告即可继续流程:
.cheese/cure/<slug>.md/cheese --continuemarkdown
status: ok | halt: <单行原因>
next: age | done
artifact: <路径(如有)>
baseline: none | <从上游交接内容复制的已记录基线模块 — 参见../cook/references/quality-gates.md>
<单行说明:已应用或延迟处理的修复内容>当至少一项问题被成功修复(或在模式下无问题符合严重性下限)时,;当所有选定的修复均未通过回退/保留评估,或项目级门禁无法通过时,。默认设为,即需要进行重新评审 — 这是自主流程链的默认设置,也是交互式操作的标准推荐。仅当以交互式方式调用且未使用,且用户明确选择不进行重新评审时,才设为。/cure不跟踪当前是第几轮修复;两轮修复上限由的第三次调用 enforce,而非/cure。
--autostatus: okstatus: halt: <reason>next:age--autonext:done/age --autoOutput
输出
Cross-cutting house style and citation form: .
../cheese/references/formatting.mdThe cure report body lives below the handoff slug in the same file at :
.cheese/cure/<slug>.mdmarkdown
undefined通用格式及引用规范:。
../cheese/references/formatting.md修复报告主体位于交接slug下方,同一文件中:
.cheese/cure/<slug>.mdmarkdown
undefinedCure Report
修复报告
Applied
已应用修复
- <finding>: <fix summary>
- <问题>: <修复摘要>
Deferred
延迟处理项
- <finding>: <reason>
- <问题>: <原因>
Checks
检查结果
- <command>: <pass|fail|skipped with reason>
- <命令>: <通过|失败|跳过(原因)>
Re-review
重新评审建议
- Remaining risk:
- Suggested next step: to verify the fixes, or
/age --scope <touched-path>to commit/publish./plate
undefined- 剩余风险:
- 建议下一步操作:调用验证修复,或调用
/age --scope <touched-path>提交/发布。/plate
undefinedHandoff
交接
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.
/plate--safeWhen the run was chained from (), 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 .
/affinagehandoff_context.source_skill: /affinage/plate/age --scope/affinage/plateDefault (no ) — plate the work:
--safe- With an open PR (), dispatch
gh pr viewfor its final writing gate, commit, topology-aware update, and publication (Rule 11 authorizes the update)./plate [--hard] - With no open PR: dispatches
--open-pr— explicit topology choices and obviously cohesive work proceed without asking, while stack-sized or ambiguous work asks before commit or branch-layout mutation. Without/plate [--hard], leave the remote untouched and finish with--open-pr.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.
/plate
--safe../cheese/references/handoff-gate.md- 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 — .
/plate [--hard] - Checkpoint & stop () or Stop (dispatch none).
/wheypoint
Pre-select Plate it only when all selected findings applied cleanly and gates passed. Never dispatch before selection; run the selected command immediately.
流程管线:culture → mold → cook → press → age → [cure] → plate
修复报告生成后,/cure决定是否调用/plate或询问用户。在修复完成(参见验证部分)的情况下,默认会将工作传递至已打开的PR,无需额外门禁。参数会重新启用交接门禁。
--safe当从/affinage链式调用时(),/cure绝不调用/plate — 仅应用修复,在适用时运行自主模式的循环,然后返回,以便/affinage在执行最终的/plate发布前完成GitHub回复(最终写入)。
handoff_context.source_skill: /affinage/age --scope默认(无)— 交付/plate:
--safe- 若存在打开的PR(通过确认),调用
gh pr view执行最终写入门禁、提交、拓扑感知更新及发布(规则11授权更新)。/plate [--hard] - 若不存在打开的PR:参数会触发
--open-pr调用 — 明确的拓扑选择及明显连贯的工作无需询问即可进行,而涉及栈大小或模糊的工作在提交或分支布局变更前会询问用户。若未使用/plate [--hard],则不修改远程仓库,最终提示--open-pr。no open PR — pass --open-pr or run /plate - 发布完成后,执行下文**§ PR发布后经验回写**。
- 若未完成修复,则跳过/plate;提及阻塞原因并停止操作。
--safe../cheese/references/handoff-gate.md- 重新评审涉及的代码 (当修复超出问题范围时推荐) — 。
/age --scope <touched-path> - 交付 — 提交并打开或更新PR — 。
/plate [--hard] - 检查点并停止()或 停止(不调用任何命令)。
/wheypoint
仅当所有选定问题均被成功修复且门禁通过时,才预先选择交付选项。选择完成后立即执行选定的命令,不得提前调用。
Post-PR learnings write-back
PR发布后经验回写
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 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.
/plate--open-pr--safereferences/post-pr-writeback.mddurable_flags/wiki-ingest在任何发布至PR的路径之后 — 默认的/plate调用、新建PR、模式下选择交付,或自主模式的最终发布 — 执行回写前请阅读。该文档定义了回写候选内容(上游 + 自curdle以来新增的ADR)、带文件降级备选的写入器、发布所有者例外情况,以及“无内容可记录”的场景。
--open-pr--safereferences/post-pr-writeback.mddurable_flags/wiki-ingest--hard mode
--hard模式
/cure --hard--hard/plate/hard-cheeseskills/hard-cheese/SKILL.md../hard-cheese/references/composition.md/cure --hard--hard/hard-cheeseskills/hard-cheese/SKILL.md../hard-cheese/references/composition.mdAuto 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 (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.
--auto --stake <floor>references/selection.md/age --scope <touched-paths> --auto--open-pr/age --autonext: done/plateRead 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 .
references/auto-mode.md--auto --hard/plate当使用调用时,跳过选择列表和交接门禁,自动选择所有符合严重性下限的问题(参见中的「自主模式选择」章节),逐一应用并验证 — 若出现问题则回退并延迟处理 — 然后调用(在范围内时传递参数)进行重新评审;负责控制两轮修复上限。当最终时,调用/plate一次并执行上文**§ PR发布后经验回写**。
--auto --stake <floor>references/selection.md/age --scope <touched-paths> --auto--open-pr/age --autonext: done运行此模式前请阅读,其中定义了无下限场景、突破条款,以及抑制最终/plate调用的cook分支路径子Agent例外情况(单一curd链和wave-curd worker)。
references/auto-mode.md--auto --hardRules
规则
- Default to the recommended composite (or /
/age's locked selection);/affinagere-introduces the gate. A false-premise or sprawling/structural finding still pauses for a decision regardless of mode.--safe - 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.
### Deferred - Publication contract — existing PR authorization, ,
--open-pr, and never publishing an unclean cure: see--safe.## Handoff - 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.
/age - Apply the shared voice kernel (lives at ): lead the cure report with what was applied, flag residual risk as
../age/references/voice.md, agree when the diff is fine without manufacturing follow-ups.certain | speculating | don't know - Verification before : before writing
status: okin 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 (status: ok,should,probably) are banned in completion claims — state what the gate output showed, not what you expect it to show.I think
- 默认使用推荐组合(或/age/affinage的锁定选择内容);参数会重新启用门禁。无论何种模式,若存在错误前提或范围过大/结构性问题,仍需暂停等待决策。
--safe - 修复范围仅限选定(或自动选定)的问题。与基线一致的门禁失败无需/cure修复(流程步骤4)。
- 不得隐藏失败或跳过的检查。在自主模式下,回退的问题需归入,不得静默丢弃。
### 延迟处理项 - 发布契约 — 现有PR授权、、
--open-pr,且绝不发布未完成的修复:参见「## 交接」部分。--safe - 若选定的问题基于错误前提(/age报告有误,或差异已解决该问题),则停止操作并在修复前指出该前提。允许对报告提出异议;禁止静默规避。
- 应用共享语音内核(位于):修复报告开头先说明已应用的修复,将剩余风险标记为
../age/references/voice.md,若差异无问题则直接确认,无需制造后续任务。certain | speculating | don't know - 前的验证:在交接slug中写入
status: ok前,需(1)确定门禁命令,(2)在同一轮操作中重新运行该命令,(3)读取完整输出,(4)再进行声明。完成声明中禁止使用模糊词汇(status: ok、should、probably) — 需说明门禁输出的实际结果,而非预期结果。I think
Discipline
规范
Read before applying any fix — it holds the
Iron Law, Red Flags, and the fix-application Rationalization table.
references/cure-discipline.md应用任何修复前,请阅读,其中包含铁律、警示信号及修复应用合理性表格。
references/cure-discipline.mdAgent resolution
Agent解析
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.
agent_resolution通过解析修复应用任务。
../cheese/references/agent-resolution.md| 工作内容 | 首选Agent类型 | 权限/隔离 | 最低权限 | 工作量 | 备选方案 |
|---|---|---|---|---|---|
| 应用选定问题的修复 | coder | 写入权限、隔离工作树 | 默认 | 高 | 兼容的coder,其次是通用Agent |
标准的/cure交接内容包含共享的模块。
agent_resolution