$npx -y skills add dan-the-dev/xp-developer-skills --skill new-incrementDeliver one releasable increment from increments/<feature>.md — strict TDD by default (one test-lists/<feature>.md, unit tests). ATDD only when a real outer seam exists (API/UI/contract). One increment per invocation; RED before GREEN; minimal markdown. Not for whole-feature plan
| 1 | # New increment (one slice) |
| 2 | |
| 3 | ## Mission |
| 4 | |
| 5 | Implement **exactly one** open line from `increments/<feature-stem>.md`. |
| 6 | |
| 7 | **Default:** **`skills/tdd/SKILL.md`** only — unit (or narrow integration) tests, behaviors tracked in **one** `test-lists/<feature-stem>.md` (section per increment). |
| 8 | |
| 9 | **When a real outer seam exists:** compose **`skills/atdd/SKILL.md`** at that boundary, then TDD inside. **Never** duplicate the same assertions in acceptance and unit layers. |
| 10 | |
| 11 | Mark the parent backlog line **`[x]`** and **stop** — unless the user explicitly asks to continue to the next increment. |
| 12 | |
| 13 | --- |
| 14 | |
| 15 | ## Workflow |
| 16 | |
| 17 | Shared delivery rules: [`docs/delivery-process.md`](../../docs/delivery-process.md) and [`docs/project-verification.md`](../../docs/project-verification.md). |
| 18 | |
| 19 | 1. Lock scope to **one** `[ ]` backlog line; branch e.g. `feat/<feature>-<increment-slug>`. |
| 20 | 2. **Test strategy** — [`test-strategy-selection.md`](../../docs/test-strategy-selection.md): discover configured jobs; complete adopt/skip table **before first RED** ([checklists/test-strategy.md](checklists/test-strategy.md)). |
| 21 | 3. **Discover project verification** for the language/module you will touch (§2; [`project-verification.md`](../../docs/project-verification.md)) — README, CI, scripts, Makefile, Sonar, **mutation** config; do not assume one command. |
| 22 | 4. **Choose layer** — [references/scoped-atdd-tdd.md](references/scoped-atdd-tdd.md) (TDD-only vs ATDD+TDD). |
| 23 | 5. **Artifacts** — [references/artifact-policy.md](references/artifact-policy.md): one feature test list; no per-increment markdown sprawl. |
| 24 | 6. **RED → GREEN → REFACTOR** per behavior; **one failing check at a time**; **re-run affected tests after every edit**; run **adopted** practices (mutation, integration, contract, etc.) at slice boundary. |
| 25 | 7. If construction/import/API changed, **search and update all call sites** in scope (§3). |
| 26 | 8. Update parent `increments/…` to `[x]` with link to test list section (and acceptance section if used). |
| 27 | 9. **Cleanup** redundant slice-only markdown if created by mistake. |
| 28 | 10. **Run all applicable project verify steps** (tests, lint, format, typecheck, SonarQube, **mutation job if adopted**); none may be skipped because another already passed (§2). |
| 29 | 11. **Return payload** (§10) including **test strategy table**; do not start the next increment. |
| 30 | |
| 31 | Prep if needed: **`skills/legacy-testing`** (invalid harness), **`skills/refactoring`**, **`skills/spike`** — then resume. |
| 32 | |
| 33 | --- |
| 34 | |
| 35 | ## Definition of done |
| 36 | |
| 37 | - One backlog line only; **test strategy table** completed before first RED ([`test-strategy-selection.md`](../../docs/test-strategy-selection.md)) |
| 38 | - **All project verify steps** for this scope passed (§2; [`project-verification.md`](../../docs/project-verification.md)) — including adopted practices (mutation, contract, integration, etc.) |
| 39 | - RED observed before each production change (see scoped reference) |
| 40 | - Test list lines `[x]` only with passing checks referenced |
| 41 | - No duplicate acceptance + unit tests for the same behavior |
| 42 | - Change-surface complete if APIs/seams changed (§3) |
| 43 | - Parent increment line `[x]` |
| 44 | - No behavior from **future** increments |
| 45 | - Return payload delivered (§10) |
| 46 | |
| 47 | Checklist: [checklists/increment-done.md](checklists/increment-done.md), [checklists/test-strategy.md](checklists/test-strategy.md). |
| 48 | |
| 49 | --- |
| 50 | |
| 51 | ## Anti-patterns |
| 52 | |
| 53 | - Implementing multiple backlog lines in one session without explicit user opt-in |
| 54 | - `acceptance-examples/` + unit tests with identical assertions (documentation theater) |
| 55 | - Per-increment `test-lists/<slice>.md` files (use one feature file) |
| 56 | - Marking `[x]` on markdown before tests exist or fail |
| 57 | - Writing full test files and full production in one step |
| 58 | - Batch message: “implementing increments 2–7” |
| 59 | |
| 60 | See [references/anti-patterns.md](references/anti-patterns.md). |
| 61 | |
| 62 | --- |
| 63 | |
| 64 | ## Additional resources |
| 65 | |
| 66 | - [`docs/delivery-process.md`](../../docs/delivery-process.md) |
| 67 | - [`docs/test-strategy-selection.md`](../../docs/test-strategy-selection.md) |
| 68 | - [references/scoped-atdd-tdd.md](references/scoped-atdd-tdd.md) |
| 69 | - [references/artifact-policy.md](references/artifact-policy.md) |
| 70 | - [references/anti-patterns.md](references/anti-patterns.md) |