一键导入
hf-hotfix
适用于线上/紧急缺陷需要修复、用户要求 hotfix 分析、缺陷需要复现路径和最小修复边界的场景。不适用于写/修代码(→ hf-test-driven-dev)、需求变更/范围调整(→ hf-increment)、阶段不清(→ hf-workflow-router)。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
适用于线上/紧急缺陷需要修复、用户要求 hotfix 分析、缺陷需要复现路径和最小修复边界的场景。不适用于写/修代码(→ hf-test-driven-dev)、需求变更/范围调整(→ hf-increment)、阶段不清(→ hf-workflow-router)。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when starting an existing-code bug audit on a repository or large directory tree. First detects project language + architecture (e.g. C/C++ embedded SOA, Python web service, frontend SPA), proposes a tailored review checklist (scenario-specific bug categories) for user confirmation, then slices the codebase into modules within a per-module token budget. Produces plan.json with profile + review_checklist + modules that downstream audit-reviewer consumes module-by-module. Not for PR diff review (use hf-code-review) or for actually finding bugs (use audit-reviewer).
Use as the FINAL stage of the code-audit pipeline. Reads confirmed.json (output of audit-verifier) and renders a self-contained single-file HTML report (always) and optionally an Excel workbook. The HTML contains summary stats by severity/category/module, filterable finding cards with code snippets and audit trails (reviewer + verifier). Not for emitting findings (use audit-reviewer) or verifying findings (use audit-verifier).
Use when scanning an existing-code module for bugs and emitting finding drafts. Reads source files within one module from the plan.json produced by audit-planner, walks files line-by-line, emits findings/<module>.json with file path, line numbers, category, severity, confidence, code snippet evidence, and reasoning. The set of allowed finding categories is sourced from plan.json's review_checklist (scenario preset such as c-cpp-embedded-soa / python-web-service / frontend-spa / generic) rather than a fixed taxonomy — keep findings scoped to the user-confirmed checklist. This is the PRIMARY (first-stage) reviewer in the two-agent confirmation pipeline; downstream audit-verifier independently confirms each finding. Not for PR diff review (use hf-code-review) or for verifying findings (use audit-verifier).
Use as the SECOND-STAGE independent confirmer in the two-agent code-audit pipeline. Reads finding drafts produced by audit-reviewer and independently re-examines each one against the actual source code, writes verifications/<module>.json with status (confirmed/rejected/upgrade/downgrade/needs_more_evidence), reason, and evidence_check. Operates with FRESH context — does not see reviewer's internal reasoning beyond what is recorded in the finding's description+evidence fields, to enable independent judgement. Not for emitting new findings (use audit-reviewer) or rendering the report (use audit-reporter).
Use when hf-test-driven-dev finishes GREEN on a frontend-touching active task whose spec declares a UI surface, and fresh browser runtime evidence (screenshot / console log / network trace) is required for downstream gates. Not for issuing verdicts (gates do that), not for replacing hf-test-review's test-quality review, not for backend-only tasks.
适用于 test review 通过后评审代码质量、用户要求 code review 的场景。不适用于评审测试(→ hf-test-review)、写/修代码(→ hf-test-driven-dev)、阶段不清(→ hf-workflow-router)。
| name | hf-hotfix |
| description | 适用于线上/紧急缺陷需要修复、用户要求 hotfix 分析、缺陷需要复现路径和最小修复边界的场景。不适用于写/修代码(→ hf-test-driven-dev)、需求变更/范围调整(→ hf-increment)、阶段不清(→ hf-workflow-router)。 |
在不放弃验证纪律的前提下处理紧急缺陷。本 skill 不写生产代码——负责分析、根因收敛、状态同步,然后 handoff 给 hf-test-driven-dev。
本 skill 融合以下已验证方法:
适用:
不适用:
hf-test-driven-devhf-incrementhf-workflow-routerhf-test-driven-devhf-test-driven-devinteractive 模式下必须先确认边界再 handoff读缺陷报告、用户描述、相关代码/日志、项目级约定、feature progress.md(默认 features/<active>/progress.md)、当前已批准规格 / 设计 / 任务工件(默认 features/<active>/spec.md / design.md / tasks.md),以及受影响的 review / gate / verification 记录(如有)。
如果用户声称“这是 bug”,但改动内容看起来像新增字段、放宽约束、改变导出格式或扩展行为,先补一层契约核对:
hf-increment在进入复现与 handoff 设计前,先确认:
progress.md 的 Current Stage、Current Active Task、worktree 字段与当前案例证据不冲突若不满足,停止 hotfix 主流程,并写出唯一下一步:
hf-incrementhf-workflow-router确认复现方法。记录步骤、环境、预期 vs 实际。若无法复现 → 标为阻塞并说明原因。
定位根因。确定最小安全修复范围:改什么文件、影响什么行为、不改什么。显式写出修复边界,不扩大也不缩小。
出现以下任一信号时,不要直接 handoff 实现:
probable 而不是 demonstrated处理规则:
interactive:先展示“建议修什么 / 明确不修什么 / 为什么这仍是最小边界”,等真人确认auto:只有边界仍清晰且证据足够时才继续;否则回 hf-workflow-routerhf-test-driven-devhf-incrementhf-workflow-router记录保存到 项目声明的 verification 路径;若无项目覆写,默认使用 features/<active>/verification/hotfix-<topic>.md。同步 feature progress.md(默认 features/<active>/progress.md)。若使用 worktree 记录 Worktree Path/Branch。
写记录时优先使用 references/hotfix-repro-and-sync-record-template.md;时间极紧时可先用其中的简化版模板,但不能省略复现方式、修复边界和唯一下一步。
至少同步:
Current StageCurrent Active Task(保留原值或在明确失效时写明)Pending Reviews And GatesWorkspace Isolation / Worktree Path / Worktree Branch(若存在)Next Action Or Recommended Skill默认输出 / 记录结构:
## 热修复摘要
- 问题:
- 当前判断:`confirmed-hotfix` | `more-like-increment` | `blocked`
- 影响范围:
- 紧急级别:
## 证据基线
- 合同 / 回归证明:
- `Current Stage`:
- `Current Active Task`:
- `Pending Reviews And Gates`:
- `Worktree Path`:
- `Worktree Branch`:
## 复现信息
- 期望行为:
- 实际行为:
- 复现方式:
- 失败证据:
## 修复范围
- 最小改动内容:
- 未纳入本次修复的内容:
- 根因信心:`demonstrated` | `probable`
## 同步项
- 规格 / 设计 / 任务:
- 发布说明 / 状态记录:
## 状态同步
- `Current Stage`:
- `Current Active Task`:
- `Pending Reviews And Gates`:
- Next Action Or Recommended Skill:
Hotfix 分析结束时必须明确:
hf-test-driven-dev、hf-increment 还是 hf-workflow-router| 文件 | 用途 |
|---|---|
references/hotfix-repro-and-sync-record-template.md | 热修复复现、边界、同步项和下一步的标准模板 |
| 借口 | 反驳 / Hard rule |
|---|---|
| "线上着急,先打补丁,复现路径回头补。" | Hard Gates: hotfix 必须有最小复现路径;无复现 → 回 hf-workflow-router 走 increment 流程。 |
| "顺手把附近不相关的 bug 一起修。" | Hard Gates: hotfix 必须最小修复边界;越界改动 → 拆出 hf-increment。 |
| "test 留到 mainline merge 时再补。" | Hard Gates: hotfix 仍走 RED → GREEN,缺 RED 即视为未完成。 |
hf-test-driven-devprogress.md 已按 canonical schema 同步,且唯一下一步清晰