mcpField
I
incremental-implementation

incremental-implementation

github.com/alexbruno其他09 次安装今天更新
代码仓库

关于 incremental-implementation

一次性编写大量未经验证的代码并不可取;应以小型、经过验证的垂直切片构建功能和重构。在执行 `workflow/PLAN.md` 或 `workflow/TASKS.md`、修改多个文件,或预计实现超过约 100 行的更改时使用此技能。

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/alexbruno/dev-skills --skill incremental-implementation

安装后在 Claude Code 中输入/incremental-implementation确认已加载。

README 原文English

来自项目 README

README 暂无中文译文,以下为英文原文;中文介绍见上方。

Incremental Implementation

Deliver changes in thin, verifiable increments—one working slice at a time. Never write an entire multi-file feature in a single unverified pass.

Core Rule

One slice, one verification cycle. Do not start the next slice while the current slice has failing tests, type errors, or a broken build.

When to Apply

  • Executing steps from workflow/PLAN.md or tasks from workflow/TASKS.md.
  • Any change touching two or more files or exceeding ~100 lines of code.
  • Refactoring existing modules where behavior must remain intact at every step.

The Increment Loop

For each step in workflow/PLAN.md (or task in workflow/TASKS.md):

  1. Scope the Slice: Pick the smallest cohesive unit that delivers testable progress toward workflow/SPEC.md.
  2. Implement Minimally: Write only the code required for this slice—avoid speculative scaffolding for future slices.
  3. Test & Verify Immediately: Run targeted unit/integration tests, typecheck, and linter to confirm the slice works and introduces no regressions.
  4. Checkpoint: Update status in workflow/PLAN.md or workflow/TASKS.md (e.g., mark done), and create a clean commit/checkpoint when appropriate so rollback is effortless.
  5. Repeat: Advance to the next slice only after the current one is green.

Slicing Strategies

Choose the slicing strategy that best fits the work:

  • Vertical Slices (Default): Implement one thin end-to-end capability across layers (e.g., schema -> service -> endpoint -> test) rather than building all backend files first and all frontend/test files last.
  • Risk-First Slicing: Tackle the highest-uncertainty assumption, integration, or performance bottleneck in the earliest slice so surprises surface immediately.
  • Contract-First Slicing: Define types, interfaces, and test assertions first, verify they compile/fail as expected, then implement the concrete behavior.

Guardrails

  • No stacked brokenness: Fix failing checks in the current slice before moving on.
  • Keep diffs reviewable: If a slice grows too large, split it into smaller sub-slices before continuing.
  • Stay aligned with SPEC.md: Do not add unrequested features while implementing a slice.

评论

支持 Markdown