/build-like-amazon:incremental-implementationfrom build-like-amazon
Decomposes features into thin vertical slices that are independently deployable, testable, and rollback-safe. Uses feature flags and safe defaults to avoid big-bang deployments.
Ships in build-like-amazon. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
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.
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 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.
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.
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% canary
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 unchanged
Rules:
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 |
Before merging each slice:
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.
Paradigm choice is a tool, not an identity. Match it to the shape of the problem:
Reservation that moves through states, an Order that owns invariants, a Connection that holds resources. Prefer encapsulation, polymorphism for variant behavior, and dependency inversion at boundaries.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 is for the OO parts of the codebase. Apply each principle when it solves a real problem; don't apply them ceremonially.
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.
These are not stylistic preferences — they are how the next engineer (or your future self at 3 AM) reads the code.
process tells you nothing; chargeCustomerWithRetry tells you what, who, and how. Variables named data, info, temp, result are red flags — they mean the author hadn't decided what the thing was.requests.HTTPError leak into your business logic.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.test-driven-development.)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.
| 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.
| 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. |
main by more than 500 linesprocess, handle, do, or variables named data, info, temp survive into the merged coderequests.HTTPError, psycopg2.OperationalError) leak into business logicAfter implementing a feature incrementally, verify:
main, it's not ready. No exceptions.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub robisson/build-like-amazon-agent-skills --plugin build-like-amazon28 skills in this plugin
/api-contract-firstDesigning APIs contract-first with backward compatibility guarantees, clear versioning strategy, error semantics, idempotency, and pagination. The API is a promise—never break existing clients./brownfield-discoveryReverse-engineer an existing project to produce a Design Doc, API contracts, and a Threat Model anchored in the real code, IaC, and observability. Run once per project. Output anchors all subsequent /spec and /build invocations./code-review-bar-raisingApplying Amazon's raise-the-bar principle to every code review. What reviewers look for — clarity, correctness, design, reuse, operational readiness. "Ship It" means the change raises or maintains the quality bar./correction-of-errorsBlameless post-incident analysis focused on timeline, 5 Whys, mechanisms over people, and concrete action items with owners./dependency-managementManaging external dependencies safely with circuit breakers, timeouts, retries with exponential backoff, bulkhead pattern, graceful degradation, and dependency isolation./design-documentWriting a technical design document that translates a Working Backwards output into a concrete, reviewable engineering plan with architecture, trade-offs, cost estimation, and operational concerns.Other plugins' skills for the same job