{"id":"682a26eb-a9c7-4178-8fcc-092beffddf1e","shortId":"KGTkMY","kind":"skill","title":"Incremental Implementation","tagline":"Agent Skills skill by Addyosmani","description":"# Incremental Implementation\n\n## Overview\n\nBuild in thin vertical slices — implement one piece, test it, verify it, then expand. Avoid implementing an entire feature in one pass. Each increment should leave the system in a working, testable state. This is the execution discipline that makes large features manageable.\n\n## When to Use\n\n- Implementing any multi-file change\n- Building a new feature from a task breakdown\n- Refactoring existing code\n- Any time you're tempted to write more than ~100 lines before testing\n\n**When NOT to use:** Single-file, single-function changes where the scope is already minimal.\n\n## The Increment Cycle\n\n```\n┌──────────────────────────────────────┐\n│                                      │\n│   Implement ──→ Test ──→ Verify ──┐  │\n│       ▲                           │  │\n│       └───── Commit ◄─────────────┘  │\n│              │                       │\n│              ▼                       │\n│          Next slice                  │\n│                                      │\n└──────────────────────────────────────┘\n```\n\nFor each slice:\n\n1. **Implement** the smallest complete piece of functionality\n2. **Test** — run the test suite (or write a test if none exists)\n3. **Verify** — confirm the slice works as expected (tests pass, build succeeds, manual check)\n4. **Commit** -- save your progress with a descriptive message (see `git-workflow-and-versioning` for atomic commit guidance)\n5. **Move to the next slice** — carry forward, don't restart\n\n## Slicing Strategies\n\n### Vertical Slices (Preferred)\n\nBuild one complete path through the stack:\n\n```\nSlice 1: Create a task (DB + API + basic UI)\n    → Tests pass, user can create a task via the UI\n\nSlice 2: List tasks (query + API + UI)\n    → Tests pass, user can see their tasks\n\nSlice 3: Edit a task (update + API + UI)\n    → Tests pass, user can modify tasks\n\nSlice 4: Delete a task (delete + API + UI + confirmation)\n    → Tests pass, full CRUD complete\n```\n\nEach slice delivers working end-to-end functionality.\n\n### Contract-First Slicing\n\nWhen backend and frontend need to develop in parallel:\n\n```\nSlice 0: Define the API contract (types, interfaces, OpenAPI spec)\nSlice 1a: Implement backend against the contract + API tests\nSlice 1b: Implement frontend against mock data matching the contract\nSlice 2: Integrate and test end-to-end\n```\n\n### Risk-First Slicing\n\nTackle the riskiest or most uncertain piece first:\n\n```\nSlice 1: Prove the WebSocket connection works (highest risk)\nSlice 2: Build real-time task updates on the proven connection\nSlice 3: Add offline support and reconnection\n```\n\nIf Slice 1 fails, you discover it before investing in Slices 2 and 3.\n\n## Implementation Rules\n\n### Rule 0: Simplicity First\n\nBefore writing any code, ask: \"What is the simplest thing that could work?\"\n\nAfter writing code, review it against these checks:\n- Can this be done in fewer lines?\n- Are these abstractions earning their complexity?\n- Would a staff engineer look at this and say \"why didn't you just...\"?\n- Am I building for hypothetical future requirements, or the current task?\n\n```\nSIMPLICITY CHECK:\n✗ Generic EventBus with middleware pipeline for one notification\n✓ Simple function call\n\n✗ Abstract factory pattern for two similar components\n✓ Two straightforward components with shared utilities\n\n✗ Config-driven form builder for three forms\n✓ Three form components\n```\n\nThree similar lines of code is better than a premature abstraction. Implement the naive, obviously-correct version first. Optimize only after correctness is proven with tests.\n\n### Rule 0.5: Scope Discipline\n\nTouch only what the task requires.\n\nDo NOT:\n- \"Clean up\" code adjacent to your change\n- Refactor imports in files you're not modifying\n- Remove comments you don't fully understand\n- Add features not in the spec because they \"seem useful\"\n- Modernize syntax in files you're only reading\n\nIf you notice something worth improving outside your task scope, note it — don't fix it:\n\n```\nNOTICED BUT NOT TOUCHING:\n- src/utils/format.ts has an unused import (unrelated to this task)\n- The auth middleware could use better error messages (separate task)\n→ Want me to create tasks for these?\n```\n\n### Rule 1: One Thing at a Time\n\nEach increment changes one logical thing. Don't mix concerns:\n\n**Bad:** One commit that adds a new component, refactors an existing one, and updates the build config.\n\n**Good:** Three separate commits — one for each change.\n\n### Rule 2: Keep It Compilable\n\nAfter each increment, the project must build and existing tests must pass. Don't leave the codebase in a broken state between slices.\n\n### Rule 3: Feature Flags for Incomplete Features\n\nIf a feature isn't ready for users but you need to merge increments:\n\n```typescript\n// Feature flag for work-in-progress\nconst ENABLE_TASK_SHARING = process.env.FEATURE_TASK_SHARING === 'true';\n\nif (ENABLE_TASK_SHARING) {\n  // New sharing UI\n}\n```\n\nThis lets you merge small increments to the main branch without exposing incomplete work.\n\n### Rule 4: Safe Defaults\n\nNew code should default to safe, conservative behavior:\n\n```typescript\n// Safe: disabled by default, opt-in\nexport function createTask(data: TaskInput, options?: { notify?: boolean }) {\n  const shouldNotify = options?.notify ?? false;\n  // ...\n}\n```\n\n### Rule 5: Rollback-Friendly\n\nEach increment should be independently revertable:\n\n- Additive changes (new files, new functions) are easy to revert\n- Modifications to existing code should be minimal and focused\n- Database migrations should have corresponding rollback migrations\n- Avoid deleting something in one commit and replacing it in the same commit — separate them\n\n## Working with Agents\n\nWhen directing an agent to implement incrementally:\n\n```\n\"Let's implement Task 3 from the plan.\n\nStart with just the database schema change and the API endpoint.\nDon't touch the UI yet — we'll do that in the next increment.\n\nAfter implementing, run `npm test` and `npm run build` to verify\nnothing is broken.\"\n```\n\nBe explicit about what's in scope and what's NOT in scope for each increment.\n\n## Increment Checklist\n\nAfter each increment, verify:\n\n- [ ] The change does one thing and does it completely\n- [ ] All existing tests still pass (`npm test`)\n- [ ] The build succeeds (`npm run build`)\n- [ ] Type checking passes (`npx tsc --noEmit`)\n- [ ] Linting passes (`npm run lint`)\n- [ ] The new functionality works as expected\n- [ ] The change is committed with a descriptive message\n\n## Common Rationalizations\n\n| Rationalization | Reality |\n|---|---|\n| \"I'll test it all at the end\" | Bugs compound. A bug in Slice 1 makes Slices 2-5 wrong. Test each slice. |\n| \"It's faster to do it all at once\" | It *feels* faster until something breaks and you can't find which of 500 changed lines caused it. |\n| \"These changes are too small to commit separately\" | Small commits are free. Large commits hide bugs and make rollbacks painful. |\n| \"I'll add the feature flag later\" | If the feature isn't complete, it shouldn't be user-visible. Add the flag now. |\n| \"This refactor is small enough to include\" | Refactors mixed with features make both harder to review and debug. Separate them. |\n\n## Red Flags\n\n- More than 100 lines of code written without running tests\n- Multiple unrelated changes in a single increment\n- \"Let me just quickly add this too\" scope expansion\n- Skipping the test/verify step to move faster\n- Build or tests broken between increments\n- Large uncommitted changes accumulating\n- Building abstractions before the third use case demands it\n- Touching files outside the task scope \"while I'm here\"\n- Creating new utility files for one-time operations\n\n## Verification\n\nAfter completing all increments for a task:\n\n- [ ] Each increment was individually tested and committed\n- [ ] The full test suite passes\n- [ ] The build is clean\n- [ ] The feature works end-to-end as specified\n- [ ] No uncommitted changes remain","tags":["incremental","implementation","agent","skills","addyosmani"],"capabilities":["skill","source-addyosmani","category-agent-skills"],"categories":["agent-skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/addyosmani/agent-skills/incremental-implementation","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"install_from":"skills.sh"}},"qualityScore":"0.300","qualityRationale":"deterministic score 0.30 from registry signals: · indexed on skills.sh · published under addyosmani/agent-skills","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill:v1","enrichmentVersion":1,"enrichedAt":"2026-04-22T11:40:30.733Z","embedding":null,"createdAt":"2026-04-18T20:31:43.864Z","updatedAt":"2026-04-22T11:40:30.733Z","lastSeenAt":"2026-04-22T11:40:30.733Z","tsv":"'-5':956 '0':277,371 '0.5':498 '1':116,194,327,356,596,952 '100':83,1056 '1a':287 '1b':296 '2':124,213,306,336,365,638,955 '3':137,227,348,367,666,822 '4':151,241,724 '5':170,757 '500':983 'abstract':404,446,480,1098 'accumul':1096 'add':349,531,616,1010,1028,1075 'addit':767 'addyosmani':7 'adjac':512 'agent':3,810,814 'alreadi':102 'api':199,217,232,246,280,293,835 'ask':378 'atom':167 'auth':579 'avoid':25,793 'backend':268,289 'bad':612 'basic':200 'behavior':734 'better':476,583 'boolean':750 'branch':718 'break':975 'breakdown':70 'broken':661,864,1090 'bug':946,949,1003 'build':11,63,147,186,337,424,627,648,859,904,908,1087,1097,1146 'builder':463 'call':445 'carri':176 'case':1103 'category-agent-skills' 'caus':986 'chang':62,97,515,604,636,768,832,888,927,984,989,1066,1095,1160 'check':150,394,434,910 'checklist':882 'clean':509,1148 'code':73,377,389,474,511,728,780,1059 'codebas':658 'comment':525 'commit':110,152,168,614,632,798,805,929,994,997,1001,1139 'common':934 'compil':641 'complet':120,188,253,895,1020,1127 'complex':407 'compon':452,455,469,619 'compound':947 'concern':611 'config':460,628 'config-driven':459 'confirm':139,248 'connect':331,346 'conserv':733 'const':694,751 'contract':264,281,292,304 'contract-first':263 'correct':486,492 'correspond':790 'could':385,581 'creat':195,206,591,1116 'createtask':745 'crud':252 'current':431 'cycl':106 'data':301,746 'databas':786,830 'db':198 'debug':1049 'default':726,730,739 'defin':278 'delet':242,245,794 'deliv':256 'demand':1104 'descript':158,932 'develop':273 'didn':418 'direct':812 'disabl':737 'disciplin':48,500 'discov':359 'done':398 'driven':461 'earn':405 'easi':774 'edit':228 'enabl':695,703 'end':259,261,311,313,945,1153,1155 'end-to-end':258,310,1152 'endpoint':836 'engin':411 'enough':1036 'entir':28 'error':584 'eventbus':436 'execut':47 'exist':72,136,622,650,779,897 'expand':24 'expans':1079 'expect':144,925 'explicit':866 'export':743 'expos':720 'factori':447 'fail':357 'fals':755 'faster':963,972,1086 'featur':29,52,66,532,667,671,674,687,1012,1017,1042,1150 'feel':971 'fewer':400 'file':61,93,519,544,770,1107,1119 'find':980 'first':265,316,325,373,488 'fix':563 'flag':668,688,1013,1030,1053 'focus':785 'form':462,466,468 'forward':177 'free':999 'friend':760 'frontend':270,298 'full':251,1141 'fulli':529 'function':96,123,262,444,744,772,922 'futur':427 'generic':435 'git':162 'git-workflow-and-vers':161 'good':629 'guidanc':169 'harder':1045 'hide':1002 'highest':333 'hypothet':426 'implement':2,9,16,26,57,107,117,288,297,368,481,816,820,852 'import':517,573 'improv':554 'includ':1038 'incomplet':670,721 'increment':1,8,34,105,603,644,685,714,762,817,850,880,881,885,1070,1092,1129,1134 'independ':765 'individu':1136 'integr':307 'interfac':283 'invest':362 'isn':675,1018 'keep':639 'larg':51,1000,1093 'later':1014 'leav':36,656 'let':710,818,1071 'line':84,401,472,985,1057 'lint':915,919 'list':214 'll':844,939,1009 'logic':606 'look':412 'm':1114 'main':717 'make':50,953,1005,1043 'manag':53 'manual':149 'match':302 'merg':684,712 'messag':159,585,933 'middlewar':438,580 'migrat':787,792 'minim':103,783 'mix':610,1040 'mock':300 'modern':541 'modif':777 'modifi':238,523 'move':171,1085 'multi':60 'multi-fil':59 'multipl':1064 'must':647,652 'naiv':483 'need':271,682 'new':65,618,706,727,769,771,921,1117 'next':111,174,849 'noemit':914 'none':135 'note':559 'noth':862 'notic':551,565 'notif':442 'notifi':749,754 'npm':854,857,901,906,917 'npx':912 'obvious':485 'obviously-correct':484 'offlin':350 'one':17,31,187,441,597,605,613,623,633,797,890,1122 'one-tim':1121 'openapi':284 'oper':1124 'opt':741 'opt-in':740 'optim':489 'option':748,753 'outsid':555,1108 'overview':10 'pain':1007 'parallel':275 'pass':32,146,203,220,235,250,653,900,911,916,1144 'path':189 'pattern':448 'piec':18,121,324 'pipelin':439 'plan':825 'prefer':185 'prematur':479 'process.env.feature':698 'progress':155,693 'project':646 'prove':328 'proven':345,494 'queri':216 'quick':1074 'ration':935,936 're':77,521,546 'read':548 'readi':677 'real':339 'real-tim':338 'realiti':937 'reconnect':353 'red':1052 'refactor':71,516,620,1033,1039 'remain':1161 'remov':524 'replac':800 'requir':428,506 'restart':180 'revert':766,776 'review':390,1047 'risk':315,334 'risk-first':314 'riskiest':320 'rollback':759,791,1006 'rollback-friend':758 'rule':369,370,497,595,637,665,723,756 'run':126,853,858,907,918,1062 'safe':725,732,736 'save':153 'say':416 'schema':831 'scope':100,499,558,871,877,1078,1111 'see':160,223 'seem':539 'separ':586,631,806,995,1050 'share':457,697,700,705,707 'shouldn':1022 'shouldnotifi':752 'similar':451,471 'simpl':443 'simplest':382 'simplic':372,433 'singl':92,95,1069 'single-fil':91 'single-funct':94 'skill':4,5 'skip':1080 'slice':15,112,115,141,175,181,184,193,212,226,240,255,266,276,286,295,305,317,326,335,347,355,364,664,951,954,960 'small':713,992,996,1035 'smallest':119 'someth':552,795,974 'source-addyosmani' 'spec':285,536 'specifi':1157 'src/utils/format.ts':569 'stack':192 'staff':410 'start':826 'state':43,662 'step':1083 'still':899 'straightforward':454 'strategi':182 'succeed':148,905 'suit':129,1143 'support':351 'syntax':542 'system':38 'tackl':318 'task':69,197,208,215,225,230,239,244,341,432,505,557,577,587,592,696,699,704,821,1110,1132 'taskinput':747 'tempt':78 'test':19,86,108,125,128,133,145,202,219,234,249,294,309,496,651,855,898,902,940,958,1063,1089,1137,1142 'test/verify':1082 'testabl':42 'thin':13 'thing':383,598,607,891 'third':1101 'three':465,467,470,630 'time':75,340,601,1123 'touch':501,568,839,1106 'true':701 'tsc':913 'two':450,453 'type':282,909 'typescript':686,735 'ui':201,211,218,233,247,708,841 'uncertain':323 'uncommit':1094,1159 'understand':530 'unrel':574,1065 'unus':572 'updat':231,342,625 'use':56,90,540,582,1102 'user':204,221,236,679,1026 'user-vis':1025 'util':458,1118 'verif':1125 'verifi':21,109,138,861,886 'version':165,487 'vertic':14,183 'via':209 'visibl':1027 'want':588 'websocket':330 'without':719,1061 'work':41,142,257,332,386,691,722,808,923,1151 'work-in-progress':690 'workflow':163 'worth':553 'would':408 'write':80,131,375,388 'written':1060 'wrong':957 'yet':842","prices":[{"id":"a7fba89e-922c-4092-af51-55c8c20cdc9a","listingId":"682a26eb-a9c7-4178-8fcc-092beffddf1e","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"addyosmani","category":"agent-skills","install_from":"skills.sh"},"createdAt":"2026-04-18T20:31:43.864Z"}],"sources":[{"listingId":"682a26eb-a9c7-4178-8fcc-092beffddf1e","source":"github","sourceId":"addyosmani/agent-skills/incremental-implementation","sourceUrl":"https://github.com/addyosmani/agent-skills/tree/main/skills/incremental-implementation","isPrimary":false,"firstSeenAt":"2026-04-18T21:53:01.799Z","lastSeenAt":"2026-04-22T06:52:42.455Z"},{"listingId":"682a26eb-a9c7-4178-8fcc-092beffddf1e","source":"skills_sh","sourceId":"addyosmani/agent-skills/incremental-implementation","sourceUrl":"https://skills.sh/addyosmani/agent-skills/incremental-implementation","isPrimary":true,"firstSeenAt":"2026-04-18T20:31:43.864Z","lastSeenAt":"2026-04-22T11:40:30.733Z"}],"details":{"listingId":"682a26eb-a9c7-4178-8fcc-092beffddf1e","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"addyosmani","slug":"incremental-implementation","source":"skills_sh","category":"agent-skills","skills_sh_url":"https://skills.sh/addyosmani/agent-skills/incremental-implementation"},"updatedAt":"2026-04-22T11:40:30.733Z"}}