fix

GitHub

用于诊断Kandev缺陷,通过复现证据、分析根因并核对需求与设计文档,生成可审查的修复计划和工作订单。强调在实施前完成规划,支持TDD实现与PR审查,确保修复符合规范且可追溯。

.agents/skills/fix/SKILL.md kdlbs/kandev

触发场景

用户报告系统Bug或错误行为 需要修复已知缺陷并遵循严格开发流程

安装

npx skills add kdlbs/kandev --skill fix -g -y
更多选项

非标准路径

npx skills add https://github.com/kdlbs/kandev/tree/main/.agents/skills/fix -g -y

不安装直接使用

npx skills use kdlbs/kandev@fix

指定 Agent (Claude Code)

npx skills add kdlbs/kandev --skill fix -a claude-code -g -y

安装 repo 全部 skill

npx skills add kdlbs/kandev --all -g -y

预览 repo 内 skill

npx skills add kdlbs/kandev --list

SKILL.md

Frontmatter
{
    "name": "fix",
    "description": "Diagnose a Kandev bug, reconcile its requirements and system design, create a reviewable fix plan and work orders, then hand off for explicit TDD implementation."
}

Fix

Use the same durable workflow as feature work. Diagnose the defect first. Then reconcile specifications and create the fix plan and work orders before you change production code.

Core flow

Evidence -> Root cause -> Requirement conformance -> System-design check -> Fix plan + work orders -> Handoff -> Explicit implementation request -> TDD -> PR review

Do not patch production code before the planning checkpoint unless the user explicitly opts out.

Phase 0: Evidence and root cause

When a bug comes from an issue tracker, read the canonical issue and each image attachment. Reproduce the behavior with existing tests, a read-only trace, or a minimal temporary reproduction.

State:

  • The incorrect behavior and its conditions.
  • The root cause.
  • The smallest reliable reproduction.
  • The intended regression-test level and path.

If the cause remains uncertain, stop and ask the user.

Phase 1: Reconcile specifications

Read docs/specs/README.md, the owning system index, and the relevant requirement and system-design documents. Use the legacy catalog only when the system has not migrated.

Search adjacent systems before you create or move an artifact. A UI symptom does not make the repair UI-owned. Update the system that owns the failed contract, and include observable UI recovery there when applicable.

Classify the bug:

  1. Implementation violates an active acceptance criterion. Reference the existing AC-* ID. Do not create or rewrite a requirement.
  2. The intended behavior is missing from requirements. Add the smallest requirement and acceptance criteria that define it.
  3. The intended product behavior changes. Amend or supersede the affected requirement. Record the compatibility effect.
  4. The technical design is wrong or incomplete. Update the system design. Keep observable behavior in requirements.

Do not create a standalone repair specification. The requirement is the durable behavioral source. The plan and work orders record this repair.

Do not create parallel feature and UI requirements for one repair. A separate UI requirement is valid only when the repair changes an independent reusable UI contract.

Use /record when the correction establishes a durable boundary, ownership rule, public contract, persistence rule, or security invariant with meaningful alternatives.

Phase 2: Create the fix package

Create docs/plans/<fix-slug>/plan.md and sibling work orders through /plan.

The package must:

  • Reference the affected REQ-* and AC-* IDs.
  • Reference the applicable system design.
  • State the confirmed root cause.
  • Name the regression test that fails before the correction.
  • Name exact files, dependencies, acceptance conditions, and commands.
  • Use dependency waves only when they clarify implementation order.

Keep work orders sequential by default. A wave does not authorize delegation.

Phase 3: Design-package handoff

Before you change production or permanent test code, report:

  • Root cause and reproduction evidence.
  • Requirement IDs and system-design paths.
  • Plan and work-order paths.
  • Dependency order and exact commands.
  • Risks and exclusions.

Then end the turn. Do not ask the user to approve the package or switch models. Wait for a later explicit implementation request.

Phase 4: Implement with TDD

After the explicit request:

  1. Change the work order to in_progress.
  2. Write and run the regression test.
  3. Make sure that the test fails for the expected reason.
  4. Implement the minimum correction.
  5. Run the work order's exact commands.
  6. Change the work order to done and synchronize plan.md.

For persisted defaults or coupled settings, inspect every write and reset path. Cover explicit empty and null values when they affect the contract.

If the user authorizes subagents, obey /planner-orchestration. Use native delegation, compact work-order context, no recursive delegation, and no full-history fork.

Phase 5: PR review

After all work-order checks pass, commit, push, and open the PR. Do not add an automatic local simplify, QA, broad review, security review, or verification pass.

Use /pr-fixup only for a CI error or an actionable reviewer finding. Run the affected work-order check after a correction.

Stop conditions

Stop when the root cause is uncertain, specifications and code disagree, the repair needs a new material design, or the same targeted check fails three times.

Final report

Report the root cause, requirement IDs, system-design path, plan and work-order paths, changed files, commands, results, authorized subagents, and PR status.

版本历史

  • 0e4ae86 当前 2026-08-27 18:28

    强化规范所有权与管理:明确系统级规范治理,收紧规范迁移规则,从独立修复规范转向以需求为持久行为源,提升设计一致性与责任归属清晰度。

  • 1578843 2026-08-16 08:47

    从简单的复现修复升级为包含规范修订、详细计划文件生成及设计包移交的系统化工作流;明确禁止在规划检查点前修改生产代码,强调根因分析与回归测试前置。

  • b4239d8 2026-07-24 17:32

同 Skill 集合

.agents/skills/acp-debug/SKILL.md
.agents/skills/add-integration/SKILL.md
.agents/skills/clean-branches/SKILL.md
.agents/skills/code-review/SKILL.md
.agents/skills/commit/SKILL.md
.agents/skills/context-engineering/SKILL.md
.agents/skills/create-kandev-plugin/SKILL.md
.agents/skills/debug/SKILL.md
.agents/skills/docs-maintainer/SKILL.md
.agents/skills/e2e/SKILL.md
.agents/skills/harness-improvement/SKILL.md
.agents/skills/interview-me/SKILL.md
.agents/skills/plan/SKILL.md
.agents/skills/planner-orchestration/SKILL.md
.agents/skills/playwright-cli/SKILL.md
.agents/skills/pr-fixup/SKILL.md
.agents/skills/pr/SKILL.md
.agents/skills/product-demo-seeding/SKILL.md
.agents/skills/product-video-capture/SKILL.md
.agents/skills/push/SKILL.md
.agents/skills/qa/SKILL.md
.agents/skills/record/SKILL.md
.agents/skills/release/SKILL.md
.agents/skills/runtime-feature-flags/SKILL.md
.agents/skills/simplify/SKILL.md
.agents/skills/spec-driven-development/SKILL.md
.agents/skills/spec/SKILL.md
.agents/skills/tdd/SKILL.md
.agents/skills/using-agent-skills/SKILL.md
.agents/skills/verify/SKILL.md
.agents/skills/mobile-parity/SKILL.md

元信息

文件数
0
版本
0e4ae86
Hash
c2303a6b
收录时间
2026-07-24 17:32

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-27 23:52
浙ICP备14020137号-1 $访客地图$