$npx -y skills add DevelopersGlobal/ai-agent-skills --skill incremental-codingBuild in verifiable increments. Never implement more than can be tested right now. Ship partial working systems over complete broken ones.
| 1 | ## Overview |
| 2 | |
| 3 | The biggest risk in software development is building a lot of code that doesn't work. Incremental coding limits this risk: build a little, verify it works, build more. At every step, the system is in a known-good state. |
| 4 | |
| 5 | ## When to Use |
| 6 | |
| 7 | - Any implementation that will take more than 2 hours |
| 8 | - When building in a complex domain you're uncertain about |
| 9 | - When multiple components need to integrate |
| 10 | |
| 11 | ## Process |
| 12 | |
| 13 | ### Step 1: Define the First Increment |
| 14 | |
| 15 | 1. What is the smallest possible thing you can build that provides value and can be verified? |
| 16 | 2. It doesn't have to be feature-complete — just correct and verifiable. |
| 17 | 3. Example: "Add the endpoint skeleton with hardcoded response" before adding business logic. |
| 18 | |
| 19 | **Verify:** The first increment can be verified in under 5 minutes. |
| 20 | |
| 21 | ### Step 2: Build → Verify → Commit |
| 22 | |
| 23 | 4. Build only the first increment. |
| 24 | 5. Run tests. Verify manually if needed. Confirm it works. |
| 25 | 6. Commit this working state. |
| 26 | 7. Repeat for the next increment. |
| 27 | |
| 28 | **Verify:** There is a working commit after each increment. |
| 29 | |
| 30 | ### Step 3: Integration Continuously |
| 31 | |
| 32 | 8. Integrate with the real system as early as possible — not at the end. |
| 33 | 9. Test against real dependencies (DB, API, etc.) as early as possible. |
| 34 | 10. Fake integrations (mocks) should be replaced with real ones by the end. |
| 35 | |
| 36 | **Verify:** By completion, all mocks replaced with real integration. |
| 37 | |
| 38 | ## Common Rationalizations (and Rebuttals) |
| 39 | |
| 40 | | Excuse | Rebuttal | |
| 41 | |--------|----------| |
| 42 | | "I need to build it all to know if it works" | No. Build the first piece and test it. Uncertainty is always reducible. | |
| 43 | | "Integration is at the end" | Integration pain is proportional to time since last integration. Integrate continuously. | |
| 44 | |
| 45 | ## Verification |
| 46 | |
| 47 | - [ ] Implementation built in verifiable increments |
| 48 | - [ ] Working commit exists after each increment |
| 49 | - [ ] No long stretches of "broken" state in git history |
| 50 | - [ ] All mocks replaced with real integrations by completion |
| 51 | |
| 52 | ## References |
| 53 | |
| 54 | - [test-driven-development skill](../test-driven-development/SKILL.md) |
| 55 | - [task-decomposition skill](../task-decomposition/SKILL.md) |