Loading...
Loading...
Compare original and translation side by side
/fix <scope> [options] [description]/fix <scope> [options] [description]/fix/fixquestion: "What would you like to fix?"
header: "Fix type"
options:
- label: "Help me choose (Recommended)"
description: "I'll ask questions to pick the right fix workflow"
- label: "Bug - something is broken"
description: "Chain: investigate → diagnose → implement → test → commit"
- label: "Hook - Claude Code hook issue"
description: "Chain: debug-hooks → hook-developer → implement → test"
- label: "Dependencies - import/package errors"
description: "Chain: preflight → research → plan → implement → qlty-check"
- label: "PR Comments - address reviewer feedback"
description: "Chain: github-search → research → plan → implement → commit"question: "I want to understand what kind of fix you need. Did you mean..."
header: "Clarify"
options:
- label: "Help me choose"
description: "Not sure - guide me through questions"
- label: "Bug - something is broken"
description: "Code isn't working as expected"
- label: "Hook - Claude Code hook issue"
description: "Hooks not firing or producing wrong output"
- label: "Neither - let me explain differently"
description: "I'll describe my issue"question: "你想要修复什么问题?"
header: "修复类型"
options:
- label: "帮我选择(推荐)"
description: "我会通过提问帮你挑选合适的修复工作流"
- label: "Bug - 功能异常"
description: "流程:排查 → 诊断 → 实现 → 测试 → 提交"
- label: "Hook - Claude Code钩子问题"
description: "流程:调试钩子 → 钩子开发 → 实现 → 测试"
- label: "Dependencies - 导入/包错误"
description: "流程:预检 → 调研 → 规划 → 实现 → 质量检查"
- label: "PR Comments - 处理评审反馈"
description: "流程:GitHub搜索 → 调研 → 规划 → 实现 → 提交"question: "我想了解你需要的修复类型。你是指..."
header: "确认需求"
options:
- label: "帮我选择"
description: "不确定 - 引导我完成提问"
- label: "Bug - 功能异常"
description: "代码未按预期运行"
- label: "Hook - Claude Code钩子问题"
description: "钩子未触发或输出错误结果"
- label: "都不是 - 我换种方式说明"
description: "我将描述具体问题"question: "What kind of issue are you dealing with?"
header: "Issue type"
options:
- label: "Something is broken/not working"
description: "Bug in the code"
- label: "Claude Code hook not firing"
description: "Hook-specific debugging"
- label: "Import/dependency errors"
description: "Package or module issues"
- label: "Need to address PR feedback"
description: "Reviewer comments to fix"question: "你遇到的是什么类型的问题?"
header: "问题类型"
options:
- label: "功能异常/无法正常运行"
description: "代码中的Bug"
- label: "Claude Code钩子未触发"
description: "钩子专属调试"
- label: "导入/依赖错误"
description: "包或模块问题"
- label: "需要处理PR反馈"
description: "修复评审提出的问题"question: "Can you describe the issue?"
header: "Details"
options: [] # Free text - user describes the problemquestion: "能否描述具体问题?"
header: "详情"
options: [] # 自由文本 - 用户描述问题question: "How should I investigate?"
header: "Investigation"
options:
- label: "Diagnose and fix"
description: "Find the problem and implement a fix"
- label: "Diagnose only (dry run)"
description: "Just tell me what's wrong, don't change code"
- label: "Quick fix"
description: "I know the issue, just fix it fast"question: "我应如何进行排查?"
header: "排查方式"
options:
- label: "诊断并修复"
description: "找出问题并实现修复"
- label: "仅诊断(试运行)"
description: "仅告知问题所在,不修改代码"
- label: "快速修复"
description: "我已知道问题,直接快速修复"question: "After fixing, should I..."
header: "After fix"
multiSelect: true
options:
- label: "Write a regression test"
description: "Prevent this bug from recurring"
- label: "Commit the fix"
description: "Create a git commit"
- label: "Just fix, nothing else"
description: "I'll handle tests and git"question: "修复完成后,是否需要..."
header: "修复后操作"
multiSelect: true
options:
- label: "编写回归测试"
description: "防止该Bug再次出现"
- label: "提交修复"
description: "创建Git提交"
- label: "仅修复,不做其他"
description: "我将自行处理测试与Git操作"Based on your answers, I'll run:
**Scope:** bug
**Issue:** "Login button not responding on Safari"
**Chain:** sleuth (investigate) → spark (fix) → arbiter (test) → commit
**Options:** (none)
Proceed? [Yes / Adjust settings]根据你的回答,我将执行:
**范围:** bug
**问题:** "Safari浏览器中登录按钮无响应"
**流程:** sleuth(排查)→ spark(修复)→ arbiter(测试)→ 提交
**选项:** (无)
是否继续?[是 / 调整设置]| Scope | Chain | Description |
|---|---|---|
| debug -> implement_task -> test-driven-development -> commit | General bug fix workflow |
| debug-hooks -> hook-developer -> implement_task -> test hook | Hook-specific debugging |
| dependency-preflight -> oracle -> plan-agent -> implement_plan -> qlty-check | Dependency issues |
| github-search -> research-codebase -> plan-agent -> implement_plan -> commit | Address PR feedback |
| 范围 | 流程链 | 描述 |
|---|---|---|
| debug -> implement_task -> test-driven-development -> commit | 通用Bug修复工作流 |
| debug-hooks -> hook-developer -> implement_task -> test hook | 钩子专属调试工作流 |
| dependency-preflight -> oracle -> plan-agent -> implement_plan -> qlty-check | 依赖问题处理工作流 |
| github-search -> research-codebase -> plan-agent -> implement_plan -> commit | PR反馈处理工作流 |
| Option | Effect |
|---|---|
| Skip regression test creation |
| Diagnose only, don't implement fix |
| Don't auto-commit the fix |
| 选项 | 作用 |
|---|---|
| 跳过回归测试创建 |
| 仅诊断,不实现修复 |
| 不自动提交修复 |
undefinedundefinedundefinedundefinedTask(
subagent_type="sleuth",
prompt="""
Investigate this issue in parallel:
1. **Logs**: Check recent logs for errors
- Application logs
- System logs if relevant
- Build/test output
2. **Database State** (if applicable):
- Check for stuck/invalid records
- Verify schema matches expectations
3. **Git State**:
- Recent commits that might relate
- Uncommitted changes
- Current branch context
4. **Runtime State**:
- Running processes
- Port conflicts
- Environment variables
Issue description: {user_description}
Return structured findings with evidence.
"""
)Task(
subagent_type="sleuth",
prompt="""
并行排查以下问题:
1. **日志**:检查近期错误日志
- 应用日志
- 相关系统日志
- 构建/测试输出
2. **数据库状态**(如适用):
- 检查停滞/无效记录
- 验证架构是否符合预期
3. **Git状态**:
- 可能相关的近期提交
- 未提交的更改
- 当前分支上下文
4. **运行时状态**:
- 运行中的进程
- 端口冲突
- 环境变量
问题描述:{user_description}
返回包含证据的结构化排查结果。
"""
)undefinedundefinedpath/to/file.ts:123undefinedpath/to/file.ts:123undefinedAskUserQuestion(
question="Proceed with the proposed fix?",
options=["yes", "no", "modify"]
)--dry-runAskUserQuestion(
question="是否继续执行推荐的修复方案?",
options=["是", "否", "调整"]
)--dry-run/premortem quickpremortem:
mode: quick
context: "Bug fix for {diagnosis.root_cause}"
check_for:
- Will this fix break other functionality?
- Is rollback possible if fix causes issues?
- Are there related edge cases not covered?
- Does the fix match codebase patterns?
- Any external dependencies affected?AskUserQuestion(
question="Pre-mortem found {n} risks in the proposed fix. Proceed?",
options=[
"Accept risks and implement",
"Modify fix approach",
"Research mitigations first"
]
)/premortem quickpremortem:
mode: quick
context: "针对{diagnosis.root_cause}的Bug修复"
check_for:
- 该修复是否会破坏其他功能?
- 若修复引发问题,是否可回滚?
- 是否存在未覆盖的相关边缘场景?
- 修复是否符合代码库的设计模式?
- 是否会影响外部依赖?AskUserQuestion(
question="事前分析发现{ n }个高风险问题。是否继续?",
options=[
"接受风险并实现修复",
"调整修复方案",
"先调研缓解策略"
]
)Task(
subagent_type="kraken",
prompt="""
Implement fix with TDD approach.
Root cause: {diagnosis.root_cause}
Files: {diagnosis.files_to_modify}
Approach: {diagnosis.approach}
Follow implement_task workflow:
1. Write failing test that reproduces the bug
2. Implement minimal fix to pass test
3. Refactor if needed
4. Run full test suite
"""
)Task(
subagent_type="kraken",
prompt="""
采用TDD方式实现修复。
根因:{diagnosis.root_cause}
文件:{diagnosis.files_to_modify}
思路:{diagnosis.approach}
遵循implement_task工作流:
1. 编写可复现Bug的失败测试
2. 实现最小化修复以通过测试
3. 按需重构
4. 运行完整测试套件
"""
)Task(
subagent_type="kraken",
prompt="""
Fix hook issue.
Root cause: {diagnosis.root_cause}
Follow hook-developer patterns:
1. Check hook registration in settings.json
2. Verify shell wrapper exists and is executable
3. Test hook manually with mock input
4. Rebuild if TypeScript source was modified
5. Verify hook fires correctly
"""
)Task(
subagent_type="kraken",
prompt="""
修复钩子问题。
根因:{diagnosis.root_cause}
遵循hook-developer模式:
1. 检查settings.json中的钩子注册
2. 验证shell包装器是否存在且可执行
3. 使用模拟输入手动测试钩子
4. 若修改了TypeScript源码则重新构建
5. 验证钩子是否正常触发
"""
)Task(
subagent_type="kraken",
prompt="""
Fix dependency issue.
Root cause: {diagnosis.root_cause}
Follow plan-agent workflow:
1. Research correct dependency versions
2. Create implementation plan
3. Update lockfiles
4. Run dependency-preflight
5. Run qlty-check
"""
)Task(
subagent_type="kraken",
prompt="""
修复依赖问题。
根因:{diagnosis.root_cause}
遵循plan-agent工作流:
1. 调研正确的依赖版本
2. 创建实现计划
3. 更新锁文件
4. 运行dependency-preflight
5. 运行qlty-check
"""
)Task(
subagent_type="kraken",
prompt="""
Address PR feedback.
Comments: {diagnosis.pr_comments}
Follow plan-agent workflow:
1. Research codebase for context
2. Create implementation plan for each comment
3. Implement changes
4. Commit with reference to comment
"""
)Task(
subagent_type="kraken",
prompt="""
处理PR反馈。
评论:{diagnosis.pr_comments}
遵循plan-agent工作流:
1. 调研代码库上下文
2. 为每条评论创建实现计划
3. 实现更改
4. 提交时关联评论
"""
)Task(
subagent_type="kraken",
prompt="""
Create regression test for the fix.
Bug: {original_issue}
Fix: {implementation_summary}
Follow test-driven-development:
1. Write test that would have caught this bug
2. Verify test fails against pre-fix code (mentally)
3. Verify test passes against fixed code
4. Test should be minimal and focused
"""
)Task(
subagent_type="kraken",
prompt="""
为修复创建回归测试。
Bug:{original_issue}
修复:{implementation_summary}
遵循测试驱动开发流程:
1. 编写可捕获该Bug的测试
2. 确认测试在修复前代码上会失败(逻辑验证)
3. 确认测试在修复后代码上会通过
4. 测试应简洁且聚焦
"""
)AskUserQuestion(
question="Fix implemented. Please verify and confirm.",
options=["looks good", "needs adjustment", "revert"]
)AskUserQuestion(
question="修复已实现,请验证并确认。",
options=["没问题", "需要调整", "回滚"]
)Task(
subagent_type="general-purpose",
prompt="""
Follow commit skill:
1. Review changes with git diff
2. Create descriptive commit message
3. Reference issue/ticket if applicable
4. Present plan and await confirmation
5. Execute commit
"""
)Task(
subagent_type="general-purpose",
prompt="""
遵循提交技能流程:
1. 使用git diff查看更改
2. 创建描述性提交信息
3. 关联相关问题/工单(如适用)
4. 展示计划并等待确认
5. 执行提交
"""
)sleuth (investigation)
|
v
[HUMAN CHECKPOINT: diagnosis]
|
v
[PREMORTEM: quick risk check]
|
v
kraken (implement_task + TDD)
|
v
kraken (regression test)
|
v
[HUMAN CHECKPOINT: verification]
|
v
commitsleuth(排查)
|
v
[人工确认:诊断]
|
v
[事前分析:快速风险检查]
|
v
kraken(implement_task + TDD)
|
v
kraken(回归测试)
|
v
[人工确认:验证]
|
v
提交debug-hooks (structured investigation)
|
v
[HUMAN CHECKPOINT: diagnosis]
|
v
[PREMORTEM: quick risk check]
|
v
kraken (implement_task + hook-developer patterns)
|
v
test hook manually
|
v
[HUMAN CHECKPOINT: verification]
|
v
commitdebug-hooks(结构化排查)
|
v
[人工确认:诊断]
|
v
[事前分析:快速风险检查]
|
v
kraken(implement_task + hook-developer模式)
|
v
手动测试钩子
|
v
[人工确认:验证]
|
v
提交dependency-preflight (check current state)
|
v
oracle (find correct versions/alternatives)
|
v
plan-agent (create fix plan)
|
v
[HUMAN CHECKPOINT: diagnosis + plan review]
|
v
[PREMORTEM: quick risk check]
|
v
kraken (implement_plan)
|
v
qlty-check
|
v
[HUMAN CHECKPOINT: verification]
|
v
commitdependency-preflight(检查当前状态)
|
v
oracle(查找正确版本/替代方案)
|
v
plan-agent(创建修复计划)
|
v
[人工确认:诊断 + 计划评审]
|
v
[事前分析:快速风险检查]
|
v
kraken(implement_plan)
|
v
qlty-check
|
v
[人工确认:验证]
|
v
提交github-search (fetch PR context)
|
v
research-codebase (understand context)
|
v
plan-agent (plan for each comment)
|
v
[HUMAN CHECKPOINT: plan review]
|
v
[PREMORTEM: quick risk check]
|
v
kraken (implement_plan)
|
v
[HUMAN CHECKPOINT: verification]
|
v
commit (reference PR comments)github-search(获取PR上下文)
|
v
research-codebase(理解上下文)
|
v
plan-agent(为每条评论制定计划)
|
v
[人工确认:计划评审]
|
v
[事前分析:快速风险检查]
|
v
kraken(implement_plan)
|
v
[人工确认:验证]
|
v
提交(关联PR评论)--dry-run---
session: fix-{scope}-{short-description}
ts: {ISO timestamp}
commit: {git commit hash}
branch: {git branch}
status: {complete|partial|blocked|diagnosis-only}
---
scope: {bug|hook|deps|pr-comments}
options: {flags used}
issue:
description: {original user description}
evidence: {key findings from investigation}
diagnosis:
root_cause: {identified cause}
hypothesis: {why we think this}
files: [{affected files}]
fix:
approach: {what was done}
files_modified: [{files changed}]
test_added: {test file if created}
verification:
test_command: {command to verify}
human_confirmed: {true|false}
next:
- {any follow-up needed}thoughts/shared/handoffs/fix/{scope}/{timestamp}_{description}.yaml--dry-run---
session: fix-{scope}-{short-description}
ts: {ISO时间戳}
commit: {Git提交哈希}
branch: {Git分支}
status: {完成|部分完成|阻塞|仅诊断}
---
scope: {bug|hook|deps|pr-comments}
options: {使用的参数}
issue:
description: {原始用户描述}
evidence: {排查的关键发现}
diagnosis:
root_cause: {确定的根因}
hypothesis: {推理依据}
files: [{受影响文件}]
fix:
approach: {修复方式}
files_modified: [{修改的文件}]
test_added: {创建的测试文件(如有)}
verification:
test_command: {验证命令}
human_confirmed: {true|false}
next:
- {后续需处理事项}thoughts/shared/handoffs/fix/{scope}/{timestamp}_{description}.yaml/fix bug/fix bugundefinedundefined/fix bug --dry-run/fix bug --dry-runundefinedundefined/fix hook --no-commit/fix hook --no-commitundefinedundefined/fix bug --no-test/fix bug --no-testundefinedundefined/fix pr-comments/fix pr-commentsundefinedundefined| Error | Action |
|---|---|
| Investigation finds nothing | Ask user for more context |
| User rejects diagnosis | Refine hypothesis with user input |
| Fix breaks other tests | Rollback, refine approach |
| User rejects verification | Offer to revert or adjust |
| Commit fails | Present error, offer retry |
| 错误场景 | 处理方式 |
|---|---|
| 排查未发现任何问题 | 向用户请求更多上下文 |
| 用户拒绝诊断结果 | 根据用户输入优化假设 |
| 修复破坏了其他测试 | 回滚、优化方案 |
| 用户拒绝验证结果 | 提供回滚或调整选项 |
| 提交失败 | 展示错误、提供重试选项 |
debugdebug-hookssleuthkrakenimplement_tasktest-driven-developmentplan-agentdependency-preflightoracleresearch-codebasegithub-searchqlty-checkpremortemcommitcreate_handoffdebugdebug-hookssleuthkrakenimplement_tasktest-driven-developmentplan-agentdependency-preflightoracleresearch-codebasegithub-searchqlty-checkpremortemcommitcreate_handoff| Checkpoint | Purpose | Skip Condition |
|---|---|---|
| After diagnosis | Confirm root cause | Never skip |
| After premortem | Accept or mitigate risks | No HIGH tigers |
| After fix | Verify resolution | Never skip |
| Before commit | Review changes | |
| 确认环节 | 目的 | 跳过条件 |
|---|---|---|
| 诊断后 | 确认根因 | 不可跳过 |
| 事前分析后 | 接受或缓解风险 | 无高风险问题 |
| 修复后 | 验证修复效果 | 不可跳过 |
| 提交前 | 查看更改 | |