incremental-implementation
Skill16 starsChanged 37 days agoMITView on GitHub
Implementing features in thin vertical slices that each deliver value independently. Feature flags, safe defaults, rollback-friendly changes. Never a big-bang deployment.
77 other projects use a version of this.
Adopted by
Most recently taken up by
- thistleknot/skillstheir own version, first seen Nov 8, 2026
- ishandutta2007/Awesome-Agent-Skillstheir own version, first seen Nov 8, 2026
- MMACABRE/SKILLStheir own version, first seen Nov 8, 2026
- anotherben/claude-harnesstheir own version, first seen Nov 8, 2026
- celestialdust/achilles-skillstheir own version, first seen Nov 1, 2026
- steven123397/nexuskit-skillstheir own version, first seen Nov 1, 2026
Used with
Projects with it also use constraint-driven-development, deprecation-and-migration and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
MrCipherSmithSkillconstraint-driven-development
Use when a project needs a persistent, measurable quality bar — starting a project without documented standards, 'set up constraints', or when coverage/perf/a11y thresholds get re-debated per-PR. Produces CONSTRAINTS.md with enforceable numbers, ratchets, and a guard against silent weakening. NOT for throwaway prototypes or a one-off CI setup.
Also in 14 projects that use this
HK-hubSkilldeprecation-and-migration
Manages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when deciding whether to maintain or sunset existing code.
Also in 36 projects that use this
HK-hubSkillobservability-and-instrumentation
Instruments code so production behavior is visible and diagnosable. Use when adding logging, metrics, tracing, or alerting. Use when shipping any feature that runs in production and you need evidence it works. Use when production issues are reported but you can't tell what happened from the available data.
Also in 29 projects that use this
seikaikyoSkilldoubt-driven-development
對非平凡決策啟動新鮮 context 對抗審查(找碴不背書),在修正還便宜的時候抓出錯誤方向。適用:高風險改動(production、資安敏感邏輯、不可逆操作)、不熟的程式碼、要宣稱「這樣是安全的 / 可行的」之前。機械性操作與一行修改不適用。
Also in 33 projects that use this
seikaikyoSkillinterview-me
需求不明時的意圖萃取訪談:一次一題、每題附上自己的猜測、聽出「真正想要 vs 覺得應該要」,直到能預測使用者反應(約 95% 信心)才動工。適用:需求缺少對象 / 動機 / 成功標準 / 約束,或使用者點名「訪談我」「先確認一下」「我們確定嗎」。明確自足的指示、純資訊查詢、機械性操作不適用。
Also in 30 projects that use this
thunderkdsSkillreview-diff
Generate a Markdown review file with C4 architecture diagrams and code walkthrough for the current git changes
Also in 3 projects that use this
- +2 more from HK-hub
Other versions77 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 77
- addyosmani/agent-skills★ 114ksame name
- ollaya-dev/ollaya★ 1.4ksame name
- shashankswe2020-ux/whoop-mcp★ 174same name
- vinvcn/addyosmani-agent-skills-zh★ 46same name
- jmxt3/gitscape.ai★ 33same name
- sampleXbro/agentsmesh★ 27same name
- jaskirat1616/grok-skills★ 22same name
- ishandutta2007/Awesome-Agent-Skills★ 21same name
- huytd/skills★ 19same name
- moberghr/mtk-agent-toolkit★ 9same name
67 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository30 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .cursor/rules/amazon-skills.mdCursor rule
- api-contract-firstSkill
- brownfield-discoverySkill
- code-review-bar-raisingSkill
- correction-of-errorsSkill
- dependency-managementSkill
- design-documentSkill
- design-reviewSkill
- feature-flag-lifecycleSkill
- implementation-memorySkill
- infrastructure-as-codeSkill
- mechanism-creationSkill
- metrics-reviewSkill
- operational-codeSkill
- operational-excellenceSkill
- operational-readiness-reviewSkill
- pipeline-safetySkill
- progressive-deploymentSkill
- spec-driven-implementationSkill
- test-driven-developmentSkill
- threat-modelingSkill
- using-amazon-skillsSkill
- wb-defineSkill
- wb-inventSkill
- wb-listenSkill
- wb-refineSkill
- wb-test-and-iterateSkill
- working-backwardsSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
18 rules. 0 are common, 17 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 72 edited versions we read keep these.
17
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 24
When you notice a PR has grown beyond a single logical change
- Distinctive: line 76
Every behavioral change ships behind a flag:
- Distinctive: line 87
Default is always the existing behavior (safe default)
- Distinctive: line 94
Every slice must answer: "How do I undo this in under 5 minutes?"
- Distinctive: line 106
Before merging each slice:
- Distinctive: line 131
Don't argue paradigms. Pick the one that makes *this* code clearer to read and easier to test, and move on.
- Distinctive: line 150
Functions do one thing at one level of abstraction: If a function mixes business logic with I/O parsing and string formatting, it is three …
- Distinctive: line 151
Keep functions small and shallow: If you need to scroll, it's too big.
- Distinctive: line 152
Cyclomatic complexity is a smell, not a metric: If a function has many branches, it is doing many things.
- Distinctive: line 162
God objects, god functions, god modules: When everything depends on one place, every change is risky.
- Very specific: line 165
Over-mocking in tests: If your test mocks five collaborators to test one function, the function's design is the problem, not the test.
- Distinctive: line 166
Configurable behavior with no caller: Don't add a parameter "in case someone needs it later".
- Distinctive: line 174
If the answer is no, the code is not done.
- Distinctive: line 203
No feature flags exist for a multi-week implementation
- Distinctive: line 218
After implementing a feature incrementally, verify:
- Distinctive: line 231
Every commit deploys: If merging your commit would break main, it's not ready.
- Distinctive: line 235
Rollback in minutes, not hours: If you can't explain how to undo your change in one sentence, the change is too big.
- Distinctive: line 237
The PR is the unit of work: Not the feature, not the sprint, not the ticket.
“Common” is measured: kept by at least 6 in 10 of the 72 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Incremental Implementation
Overview
Incremental implementation means decomposing any feature into the thinnest possible vertical slices—each of which is independently deployable, testable, and rollback-safe. Every slice passes through the full stack (API → logic → storage → observability) rather than building horizontal layers that only work when all layers are combined.
At Amazon, this is not optional. A team that attempts a big-bang release—weeks of uncommitted code merged at once—will face pipeline rejection, delayed launches, and operational incidents. The one-slice-at-a-time principle ensures that at any point in time, main is deployable and the system is in a known-good state.
When to Use
- Starting implementation of any feature approved through design review
- Breaking down a design document into implementation tasks
- Planning sprint work or developer assignments
- Any time a change would touch more than ~200 lines of production code
- When you notice a PR has grown beyond a single logical change
The ~200 lines above is the trigger for applying this skill — the point at which ad-hoc implementation stops being safe — not a limit on a slice or on a PR. This skill carries three different size numbers with three different roles; they are deliberately not unified.
Amazon Context
Amazon deploys million times per year across its services. This velocity is only possible because each deployment is small, reversible, and independent. The culture of "one commit per slice" emerged from painful lessons: large merges cause cascading failures, extended debugging sessions, and blocked pipelines.
Amazon's deployment system enforces bake times between stages. If your deployment contains 15 unrelated changes and one fails, all 15 roll back. This economic reality makes small, focused deployments the only rational strategy.
Feature flags let teams deploy code to production without exposing it to customers. This decouples deployment from release, allowing code to bake safely while business stakeholders decide when to activate.
The Process
1. Slice Identification
Given a design document, decompose the feature into slices using these criteria:
| Criteria | Good Slice | Bad Slice |
| Vertical completeness | Touches API → logic → storage → test | Only adds a database table |
| Independent value | Works even if later slices are never built | Requires slice 3 and 5 to function |
| Size | 50-200 lines of production code | 1000+ lines |
| Reviewability | One reviewer can understand in 30 min | Requires 2-hour review meeting |
| Rollback safety | Can be reverted without data migration | Creates irreversible schema changes |
The 50-200 lines in the Size row is the healthy target range for one slice — a diagnostic band you aim at, not a gate anything rejects; 1000+ is what a bad slice looks like.
2. Ordering Slices
- Infrastructure slice — Create the feature flag, add the config entry, wire the empty handler. Deploy. Verify no regression.
- Data slice — Add storage (table, column, index) behind the flag. Deploy with writes disabled. Verify schema migration.
- Core logic slice — Implement the minimal happy path. Deploy behind flag. Verify with integration test.
- Edge case slices — One per error condition or alternative path. Each independently deployed.
- Observability slice — Metrics, alarms, dashboard for the new feature. Deploy. Verify emissions.
- Activation slice — Enable the feature flag for canary traffic. Monitor. Gradually increase.
3. Commit Discipline
Each slice gets exactly one commit (or one squash-merged PR):
feat(orders): add feature flag for async-order-processing
feat(orders): add OrderEvent DynamoDB table with TTL
feat(orders): implement order placement behind flag
feat(orders): handle duplicate order submissions
feat(orders): add latency and error metrics for order flow
feat(orders): enable async-order-processing for 1% canary4. Feature Flag Integration
Every behavioral change ships behind a flag:
# Safe default: feature OFF
if feature_flags.is_enabled("async-order-processing", default=False):
return await process_order_async(order)
else:
return process_order_sync(order) # existing path unchangedRules:
- Default is always the existing behavior (safe default)
- Flag evaluation is always at the entry point, not buried in logic
- Both paths have tests
- Flag cleanup is scheduled (ticket created at flag introduction)
5. Rollback-Friendly Changes
Every slice must answer: "How do I undo this in under 5 minutes?"
| Change Type | Rollback Strategy |
| New code behind flag | Turn off flag (seconds) |
| Database additive (new table/column) | Leave in place, stop writing |
| Database destructive (drop/rename) | NEVER in same slice as logic change |
| Config change | Revert config (deploy not needed) |
| API contract change | Version the API, keep old version alive |
6. Verification at Each Slice
Before merging each slice:
- All existing tests pass (zero regression)
- New tests cover the slice's behavior
- Feature flag default is safe (off = old behavior)
- Slice is independently deployable
- Rollback plan documented in PR description
- Metrics/logs added to verify the slice works in production
- Code Quality Bar (next section) is met
Code Quality Bar
Incremental delivery is necessary but not sufficient. The code inside each slice must be readable, testable, and maintainable by an engineer who is not the author. Quality is not the polish phase — it is how the code is written from the first line.
This section is the bar the agent applies while writing code. The Code Review Bar Raiser will hold the same bar after the fact; meeting it during writing avoids the rework loop.
Pick the paradigm by context
Paradigm choice is a tool, not an identity. Match it to the shape of the problem:
- Functional / data-oriented — when the work is transformation: parsing, validating, mapping, aggregating, formatting, rendering. Prefer pure functions, immutable data, composition. The same input always produces the same output, side effects are explicit and pushed to the edges. Most pipelines, request/response handlers without I/O, and pure business logic fit here.
- Object-oriented with SOLID — when the domain has entities with identity and lifecycle: a
Reservationthat moves through states, anOrderthat owns invariants, aConnectionthat holds resources. Prefer encapsulation, polymorphism for variant behavior, and dependency inversion at boundaries. - Procedural — for short, linear scripts and operational glue. Don't over-architect a 30-line task runner.
The same codebase routinely mixes paradigms. A handler at the edge does I/O (procedural shell), calls pure functions for transformation (functional core), and persists to a domain entity (OO at the storage boundary). This is the functional core, imperative shell pattern, and it is the default when no other shape is forced by the problem.
Don't argue paradigms. Pick the one that makes this code clearer to read and easier to test, and move on.
SOLID, applied where it pays
SOLID is for the OO parts of the codebase. Apply each principle when it solves a real problem; don't apply them ceremonially.
- Single Responsibility — a class or module changes for one reason. If you can describe what it does only with "and", split it.
- Open / Closed — the code is open for extension, closed for modification. Reach for this when you have a real axis of variation (multiple payment providers, multiple auth methods), not when you imagine one might appear.
- Liskov Substitution — subclasses honor the contract of their parent. If a subclass throws on a method the parent guarantees, the hierarchy is wrong.
- Interface Segregation — clients depend only on the methods they use. Big "do-everything" interfaces couple unrelated callers.
- Dependency Inversion — depend on abstractions at system boundaries (storage, network, time, randomness). Do not invert dependencies inside your own pure logic where the indirection adds noise without value.
The trap with SOLID is over-application. Three classes is not a hierarchy. One implementation behind an interface is premature abstraction. Add the interface when the second concrete implementation is real, not hypothetical.
Clean code basics that make the difference
These are not stylistic preferences — they are how the next engineer (or your future self at 3 AM) reads the code.
- Naming carries the design. A function named
processtells you nothing;chargeCustomerWithRetrytells you what, who, and how. Variables nameddata,info,temp,resultare red flags — they mean the author hadn't decided what the thing was. - Functions do one thing at one level of abstraction. If a function mixes business logic with I/O parsing and string formatting, it is three functions glued together. Split until each function reads like a single sentence.
- Keep functions small and shallow. If you need to scroll, it's too big. If you need to track three nested conditionals, it's too deep. Extract early-return guards, extract intermediate variables with meaningful names, and the depth disappears.
- Cyclomatic complexity is a smell, not a metric. If a function has many branches, it is doing many things. The fix is rarely "tolerate the complexity" — it is decomposition (extract method, replace conditional with polymorphism, table-driven dispatch).
- No comments that describe what; only why. If the code needs a comment to explain what it does, rename the function or extract a variable until it doesn't. Reserve comments for non-obvious why — a workaround for a specific bug, a deliberate trade-off, a hidden invariant.
- Dead code is debt. Unused parameters, commented-out blocks, branches that can never run — delete them. Git remembers; the file should not.
- Errors are values at boundaries, exceptions inside. Translate provider exceptions to domain types at the seam. Don't let
requests.HTTPErrorleak into your business logic.
Avoid the cheap shortcuts
These are common shortcuts that look pragmatic in the moment and become someone else's incident later:
any/unknown/ dynamic typing as escape hatches. They hide problems instead of solving them. Type the boundary.- God objects, god functions, god modules. When everything depends on one place, every change is risky. Decompose.
- Mutable globals. State that anyone can change is state that someone will change at the worst time. Pass dependencies explicitly.
- Premature DRY in production code. Three lines that look similar but evolve independently are not duplication — they are independent decisions. DRY is for repeated concepts, not repeated characters.
- Over-mocking in tests. If your test mocks five collaborators to test one function, the function's design is the problem, not the test. (See
test-driven-development.) - Configurable behavior with no caller. Don't add a parameter "in case someone needs it later". You'll add it when the real caller arrives.
What "good enough" looks like, slice by slice
Each slice's code, before merge, should pass this read-aloud test:
"A teammate who didn't write this code can read the diff in 10 minutes, explain in their own words what changed, why it changed, and how to undo it — without asking the author."
If the answer is no, the code is not done. Rename until functions describe themselves. Extract until each piece does one thing. Delete the dead branch. Reduce the nesting. Then merge.
Mechanisms Over Good Intentions
| Mechanism | What It Enforces | How |
| PR size limits | Max 400 lines per PR | CI check rejects oversized PRs |
| Feature flag registry | All new features gated | Deployment pipeline checks flag existence |
| Pipeline bake times | Each deployment observed before proceeding | Deploy canary stages |
| Commit message linting | One logical change per commit | Conventional commits enforced in CI |
| Deployment frequency dashboard | Teams track deployment cadence | Weekly metrics review surfaces stalled code |
Max 400 lines per PR is the hard ceiling — the highest number in this skill, meant to be enforced by a CI check that rejects the PR. This repository's CI (.github/workflows/check.yml) does not measure PR size, so this particular ceiling is still a convention rather than a mechanism.
Common Rationalizations
| Rationalization | Why It's Wrong | What To Do Instead |
| "It's all one feature, it has to go together" | Features are always decomposable. If you can't find slices, you don't understand the feature yet. | Spend 30 more minutes on decomposition. Draw a dependency graph. The slices will appear. |
| "It's faster to build it all and test once" | It feels faster but isn't. Integration bugs compound. A 2-week big-bang becomes a 4-week debug session. | Track actual cycle time. Small slices shipped daily outperform weekly big merges every time. |
| "The feature flag adds complexity" | Flags add trivial complexity. Debugging a 2000-line merge at 2 AM adds real complexity. | The flag cost is 3 lines of code. The debugging cost is 3 hours of incident response. Choose. |
| "I need the database change and the logic together to test" | You can test writes to a new table without activating the feature. Separate deploy from release. | Deploy the table. Write integration tests that directly exercise it. Then deploy the logic that calls it. |
| "We'll just be careful with the big merge" | Hope is not a strategy. Every big-bang incident report starts with this sentence. | Mechanisms over good intentions. If the process allows big merges, someone will ship a broken one. |
Red Flags
- A PR has been open for more than 3 days without merging
- A branch has diverged from
mainby more than 500 lines - A developer says "I'll merge it all once it's done"
- No feature flags exist for a multi-week implementation
- The sprint plan has a single task called "Implement feature X"
- Deployment frequency drops below once per developer per day
- PR descriptions say "Part 1 of 5" but Part 1 doesn't work alone
- Schema migrations are bundled with logic changes in one deployment
- A function in the diff is so deeply nested or branchy that the author themselves struggles to explain it line by line
- Functions named
process,handle,do, or variables nameddata,info,tempsurvive into the merged code - A class accumulated responsibilities described with "and" — "manages connections and parses messages and retries failures"
- An abstraction exists with exactly one implementation and no concrete second one in sight
- A comment is needed to explain what the next line of code does
- A test mocks the world to verify a single function — the function's design is the real problem
- Provider-specific exception types (
requests.HTTPError,psycopg2.OperationalError) leak into business logic
Verification
After implementing a feature incrementally, verify:
- Every slice was deployed independently to production
- No slice caused a rollback or alarm in production
- Feature flags were used for all behavioral changes
- Each PR was reviewed and merged within 1 business day
- The feature can be disabled instantly via flag (test this)
- Total implementation time was shorter than estimated big-bang time
- New developers can understand individual commits in isolation
- No "fix" commits were needed after merge (each slice was complete)
Tenets
- Every commit deploys. If merging your commit would break
main, it's not ready. No exceptions. - Thin beats complete. A working slice that handles 1 case is better than a comprehensive slice that handles 10 cases but isn't finished.
- Flags are free, incidents are expensive. The cost of a feature flag is negligible. The cost of rolling back an unflagged change at 3 AM is enormous.
- Safe defaults always. A flag's default value must produce the pre-existing behavior. New features are off until explicitly activated.
- Rollback in minutes, not hours. If you can't explain how to undo your change in one sentence, the change is too big.
- Deploy daily or explain why not. Deployment frequency is a health metric. If you're not deploying, something is blocked—find it and fix it.
- The PR is the unit of work. Not the feature, not the sprint, not the ticket. One PR = one slice = one deploy = one logical change.
- Quality is written, not added later. Naming, decomposition, paradigm choice, error boundaries, simplicity — these are decisions made while writing the slice, not in a "cleanup pass" that never happens. The first draft is the design document for the next reader.
- Pick the paradigm by the problem, not by allegiance. Functional core, imperative shell. SOLID where entities have lifecycle. Procedural for short scripts. Mix freely; defend each choice with the reading experience of the next engineer.
- A teammate must read the diff in ten minutes and explain it back. That is the definition of done for code quality, more reliable than any metric. Rename, extract, delete until they can.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

