{"id":"682a26eb-a9c7-4178-8fcc-092beffddf1e","shortId":"KGTkMY","kind":"skill","title":"incremental-implementation","tagline":"Delivers changes incrementally. Use when implementing any feature or change that touches more than one file. Use when you're about to write a large amount of code at once, or when a task feels too big to land in one step.","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**Note:** Run each verification command after a change that could affect it. After a successful run, don't repeat the same command unless the code has changed since — re-running on unchanged code adds no information.\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| \"Let me run the build command again just to be sure\" | After a successful run, repeating the same command adds nothing unless the code has changed since. Run it again after subsequent edits, not as reassurance. |\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- Running the same build/test command twice in a row without any intervening code change\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","agent-skills","antigravity","antigravity-ide","claude-code","cursor"],"capabilities":["skill","source-addyosmani","skill-incremental-implementation","topic-agent-skills","topic-antigravity","topic-antigravity-ide","topic-claude-code","topic-cursor","topic-skills"],"categories":["agent-skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/addyosmani/agent-skills/incremental-implementation","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add addyosmani/agent-skills","source_repo":"https://github.com/addyosmani/agent-skills","install_from":"skills.sh"}},"qualityScore":"0.700","qualityRationale":"deterministic score 0.70 from registry signals: · indexed on github topic:agent-skills · 43270 github stars · SKILL.md body (8,415 chars)","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-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-18T18:50:21.831Z","embedding":null,"createdAt":"2026-04-18T20:31:43.864Z","updatedAt":"2026-05-18T18:50:21.831Z","lastSeenAt":"2026-05-18T18:50:21.831Z","tsv":"'-5':1031 '0':315,409 '0.5':536 '1':154,232,365,394,634,1027 '100':121,1167 '1a':325 '1b':334 '2':162,251,344,374,403,676,1030 '3':175,265,386,405,704,860 '4':189,279,762 '5':208,795 '500':1058 'abstract':442,484,518,1209 'accumul':1207 'add':387,569,654,1006,1085,1103,1146,1186 'addit':805 'adjac':550 'affect':982 'agent':848,852 'alreadi':140 'amount':29 'api':237,255,270,284,318,331,873 'ask':416 'atom':205 'auth':617 'avoid':63,831 'backend':306,327 'bad':650 'basic':238 'behavior':772 'better':514,621 'big':40 'boolean':788 'branch':756 'break':1050 'breakdown':108 'broken':699,902,1201 'bug':1021,1024,1078 'build':49,101,185,224,375,462,665,686,897,942,946,1131,1198,1208,1271 'build/test':1239 'builder':501 'call':483 'carri':214 'case':1214 'caus':1061 'chang':5,13,100,135,553,642,674,806,870,926,965,979,998,1059,1064,1152,1177,1206,1249,1285 'check':188,432,472,948 'checklist':920 'clean':547,1273 'code':31,111,415,427,512,549,766,818,996,1005,1150,1170,1248 'codebas':696 'command':976,993,1132,1145,1240 'comment':563 'commit':148,190,206,652,670,836,843,967,1069,1072,1076,1264 'common':1009 'compil':679 'complet':158,226,291,933,1095,1252 'complex':445 'compon':490,493,507,657 'compound':1022 'concern':649 'config':498,666 'config-driven':497 'confirm':177,286 'connect':369,384 'conserv':771 'const':732,789 'contract':302,319,330,342 'contract-first':301 'correct':524,530 'correspond':828 'could':423,619,981 'creat':233,244,629,1227 'createtask':783 'crud':290 'current':469 'cycl':144 'data':339,784 'databas':824,868 'db':236 'debug':1124 'default':764,768,777 'defin':316 'delet':280,283,832 'deliv':4,294 'demand':1215 'descript':196,970 'develop':311 'didn':456 'direct':850 'disabl':775 'disciplin':86,538 'discov':397 'done':436 'driven':499 'earn':443 'easi':812 'edit':266,1159 'enabl':733,741 'end':297,299,349,351,1020,1278,1280 'end-to-end':296,348,1277 'endpoint':874 'engin':449 'enough':1111 'entir':66 'error':622 'eventbus':474 'execut':85 'exist':110,174,660,688,817,935 'expand':62 'expans':1190 'expect':182,963 'explicit':904 'export':781 'expos':758 'factori':485 'fail':395 'fals':793 'faster':1038,1047,1197 'featur':11,67,90,104,570,705,709,712,725,1087,1092,1117,1275 'feel':38,1046 'fewer':438 'file':19,99,131,557,582,808,1218,1230 'find':1055 'first':303,354,363,411,526 'fix':601 'flag':706,726,1088,1105,1164 'focus':823 'form':500,504,506 'forward':215 'free':1074 'friend':798 'frontend':308,336 'full':289,1266 'fulli':567 'function':134,161,300,482,782,810,960 'futur':465 'generic':473 'git':200 'git-workflow-and-vers':199 'good':667 'guidanc':207 'harder':1120 'hide':1077 'highest':371 'hypothet':464 'implement':3,9,47,54,64,95,145,155,326,335,406,519,854,858,890 'import':555,611 'improv':592 'includ':1113 'incomplet':708,759 'increment':2,6,46,72,143,641,682,723,752,800,855,888,918,919,923,1181,1203,1254,1259 'incremental-implement':1 'independ':803 'individu':1261 'inform':1008 'integr':345 'interfac':321 'interven':1247 'invest':400 'isn':713,1093 'keep':677 'land':42 'larg':28,89,1075,1204 'later':1089 'leav':74,694 'let':748,856,1127,1182 'line':122,439,510,1060,1168 'lint':953,957 'list':252 'll':882,1014,1084 'logic':644 'look':450 'm':1225 'main':755 'make':88,1028,1080,1118 'manag':91 'manual':187 'match':340 'merg':722,750 'messag':197,623,971 'middlewar':476,618 'migrat':825,830 'minim':141,821 'mix':648,1115 'mock':338 'modern':579 'modif':815 'modifi':276,561 'move':209,1196 'multi':98 'multi-fil':97 'multipl':1175 'must':685,690 'naiv':521 'need':309,720 'new':103,656,744,765,807,809,959,1228 'next':149,212,887 'noemit':952 'none':173 'note':597,972 'noth':900,1147 'notic':589,603 'notif':480 'notifi':787,792 'npm':892,895,939,944,955 'npx':950 'obvious':523 'obviously-correct':522 'offlin':388 'one':18,44,55,69,225,479,635,643,651,661,671,835,928,1233 'one-tim':1232 'openapi':322 'oper':1235 'opt':779 'opt-in':778 'optim':527 'option':786,791 'outsid':593,1219 'overview':48 'pain':1082 'parallel':313 'pass':70,184,241,258,273,288,691,938,949,954,1269 'path':227 'pattern':486 'piec':56,159,362 'pipelin':477 'plan':863 'prefer':223 'prematur':517 'process.env.feature':736 'progress':193,731 'project':684 'prove':366 'proven':383,532 'queri':254 'quick':1185 'ration':1010,1011 're':23,115,559,584,1001 're-run':1000 'read':586 'readi':715 'real':377 'real-tim':376 'realiti':1012 'reassur':1162 'reconnect':391 'red':1163 'refactor':109,554,658,1108,1114 'remain':1286 'remov':562 'repeat':990,1142 'replac':838 'requir':466,544 'restart':218 'revert':804,814 'review':428,1122 'risk':353,372 'risk-first':352 'riskiest':358 'rollback':797,829,1081 'rollback-friend':796 'row':1244 'rule':407,408,535,633,675,703,761,794 'run':164,891,896,945,956,973,987,1002,1129,1141,1154,1173,1236 'safe':763,770,774 'save':191 'say':454 'schema':869 'scope':138,537,596,909,915,1189,1222 'see':198,261 'seem':577 'separ':624,669,844,1070,1125 'share':495,735,738,743,745 'shouldn':1097 'shouldnotifi':790 'similar':489,509 'simpl':481 'simplest':420 'simplic':410,471 'sinc':999,1153 'singl':130,133,1180 'single-fil':129 'single-funct':132 'skill' 'skill-incremental-implementation' 'skip':1191 'slice':53,150,153,179,213,219,222,231,250,264,278,293,304,314,324,333,343,355,364,373,385,393,402,702,1026,1029,1035 'small':751,1067,1071,1110 'smallest':157 'someth':590,833,1049 'source-addyosmani' 'spec':323,574 'specifi':1282 'src/utils/format.ts':607 'stack':230 'staff':448 'start':864 'state':81,700 'step':45,1194 'still':937 'straightforward':492 'strategi':220 'subsequ':1158 'succeed':186,943 'success':986,1140 'suit':167,1268 'support':389 'sure':1137 'syntax':580 'system':76 'tackl':356 'task':37,107,235,246,253,263,268,277,282,379,470,543,595,615,625,630,734,737,742,859,1221,1257 'taskinput':785 'tempt':116 'test':57,124,146,163,166,171,183,240,257,272,287,332,347,534,689,893,936,940,1015,1033,1174,1200,1262,1267 'test/verify':1193 'testabl':80 'thin':51 'thing':421,636,645,929 'third':1212 'three':503,505,508,668 'time':113,378,639,1234 'topic-agent-skills' 'topic-antigravity' 'topic-antigravity-ide' 'topic-claude-code' 'topic-cursor' 'topic-skills' 'touch':15,539,606,877,1217 'true':739 'tsc':951 'twice':1241 'two':488,491 'type':320,947 'typescript':724,773 'ui':239,249,256,271,285,746,879 'uncertain':361 'unchang':1004 'uncommit':1205,1284 'understand':568 'unless':994,1148 'unrel':612,1176 'unus':610 'updat':269,380,663 'use':7,20,94,128,578,620,1213 'user':242,259,274,717,1101 'user-vis':1100 'util':496,1229 'verif':975,1250 'verifi':59,147,176,899,924 'version':203,525 'vertic':52,221 'via':247 'visibl':1102 'want':626 'websocket':368 'without':757,1172,1245 'work':79,180,295,370,424,729,760,846,961,1276 'work-in-progress':728 'workflow':201 'worth':591 'would':446 'write':26,118,169,413,426 'written':1171 'wrong':1032 'yet':880","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-05-18T18:50:21.831Z"},{"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-05-07T22:40:26.246Z"}],"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","github":{"repo":"addyosmani/agent-skills","stars":43270,"topics":["agent-skills","antigravity","antigravity-ide","claude-code","cursor","skills"],"license":"mit","html_url":"https://github.com/addyosmani/agent-skills","pushed_at":"2026-05-16T22:00:25Z","description":"Production-grade engineering skills for AI coding agents.","skill_md_sha":"123e4d24ab48f22b62b589a9a120065ab92ab9ad","skill_md_path":"skills/incremental-implementation/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/addyosmani/agent-skills/tree/main/skills/incremental-implementation"},"layout":"multi","source":"github","category":"agent-skills","frontmatter":{"name":"incremental-implementation","description":"Delivers changes incrementally. Use when implementing any feature or change that touches more than one file. Use when you're about to write a large amount of code at once, or when a task feels too big to land in one step."},"skills_sh_url":"https://skills.sh/addyosmani/agent-skills/incremental-implementation"},"updatedAt":"2026-05-18T18:50:21.831Z"}}