DashOne · Engineering playbook

Building software when agents write the code

People keep asking how we took product and engineering practice into the agent era. This is the plain answer: simple, practical ideas, rewritten for coding agents and for more than one team at a time.

What this is not

Vibe-coded slop.

2025, now with LLMs.

What it is

Good practice, translated for agents.

Part I

A problem well stated is half the solution

Agents removed the cost of producing code. They removed none of the cost of deciding what should exist. This part is about the half that did not get cheaper.

  • Problem, not solution
  • Spec before code
  • Challenged by a second model
  • Start over, don't patch
“A problem well stated is a problem half solved.”
— commonly attributed to Charles F. Kettering

We could not trace the original, so treat the attribution as unverified.

01 — The shift

What actually got cheaper

Writing code is nearly free. Changing production is still where failure comes from. Optimizing for volume is therefore the one move that does not pay.

~70%

of outages come from changes to a live system, per Google’s SRE book (under “Change Management”). Shipping more is shipping more risk.

Liability

Not an asset — the premise of the Deprecation chapter of Software Engineering at Google. Every line adds maintenance, attack surface and compliance cost.

4 > 10

Our rule of thumb, not a measurement: four agent loops you can decide for beat ten that stall waiting on you. Measure it in your own numbers.

So the bottleneck moved. Not typing speed, not review throughput — how many good decisions a human makes per day. Every practice here spends that budget deliberately.

The line that governs the rest

A rule nobody enforces is only a request. A rule without a check is a wish. Every rule in this playbook names the thing that stops a violation — a CI job, a branch protection, a hook. Where the only enforcement is prose, we say so and call it a weakness, not a policy.

Three grades, and one escape hatch

WordMeans
MUSTRequired. No merge without it.
SHOULDStrong default. Deviating needs a written note.
MUST (new)Required for new systems. Existing ones declare their choice and are not "fixed" toward it.

When a rule does not fit, nobody bends it quietly: stop and ask, or add a row to that project’s Deviations table — rule, what we do instead, why, owner, reviewer. An undocumented deviation is a bug; a documented one is a decision.

02 — The first two gates

Frame, then Plan

Six stages, a human gate between each pair, Learn feeding the next Frame. The first two decide whether everything downstream is worth building.

Frame Plan Track Build Ship Learn gategategategategate
01 Frame
Human decides
  • The problem, and who has it
  • The one metric that moves
  • What is out of scope, written down
Agents do
  • Transcribe calls, draft the brief and acceptance criteria
  • Research prior work, pull known context
Trap

Starting from the solution. "Build a dashboard" is a solution. "Managers cannot see which deals stall" is a problem. Agents build the wrong thing faster than you can notice.

02 Plan
Human decides
  • Acceptance criteria per step
  • Architecture, as decision records
  • Which steps truly need a person
Agents do
  • Draft the plan with a check per step
  • Attack it adversarially with a different model
  • Resolve "blocked" steps before declaring them blocked
Trap

Skipping the challenge. It feels like delay. It is the cheapest review in the loop — skipping it moves the cost to Build, multiplied by every agent on the wrong plan.

Specs first — a MUST

No feature starts without a written spec and a linked issue carrying acceptance criteria; the PR links both. This is the highest-leverage habit here. A well-specified first instruction costs less than discovering the requirement over six rounds of clarification — in tokens and in human hours. The spec-writer skill produces exactly this document; see Skills.

03 — Decisions

Start over. Patching is the exception.

When a system does not match where you need to be, the old instinct was to refactor it. When agents write the code, that instinct is usually wrong.

Our rule of thumb

Start from scratch. Do not refactor legacy, and do not patch what already exists.

The default flipped. The exceptions are narrow, and they are listed below.

Why it flipped

What it costsIt used to beNow
Writing the codeMost of the project↓ Close to free
Understanding legacyLarge, and paid again on every patch→ Unchanged. Nobody wrote it down, and an agent inherits the same gaps
Verifying behaviorLarge→ Unchanged, unless you have real cases to check against
Data and contractsLarge→ Unchanged. This is the real cost of starting over

So the rewrite got cheaper and the patch did not. A patch stacks on assumptions nobody recorded, and an agent will extend them with total confidence. A rewrite drags those assumptions into the open as a spec — which is the thing you were missing anyway.

What makes starting over safe

1 Extract the behavior, not the code

Pull acceptance criteria and a golden set from real traffic and real tickets. The old system is your oracle: it tells you what “right” looked like in production.

2 Keep what is not code

Data, public contracts (APIs, events) and the customers’ actual workflows. Move data on purpose, with expand, migrate, contract.

3 Run both, cut over in slices

Shadow-run old and new on the same real cases and diff them. Cut over per tenant or capability behind a flag. The old one stays until parity holds and the rollback window has passed.

4 Re-frame, do not just copy

Decide per behavior: keep, drop or redesign. Parity with every quirk is the trap — a rewrite is your chance to ask the Frame question again.

Carry over
  • The data, migrated deliberately
  • Public contracts others depend on
  • Behavior, captured as tests and examples
  • The customers’ real workflows
  • Every production bug, as a test case
Leave behind
  • The code itself
  • An architecture shaped by constraints that no longer exist
  • Workarounds for problems that are gone
  • Accidental behavior nobody relies on
  • Anything the spec does not ask for

The shape of a rewrite

  1. Capture. Replay real requests and tickets into a golden set; write the spec in the domain’s own words.
  2. Challenge. A second model attacks the spec; the person who owns the domain approves it.
  3. Build the new system from the spec, on the standard stack, in the open.
  4. Shadow-run both on live traffic. Every difference is a bug in the new one, a bug in the old one, or an accident. Decide which.
  5. Cut over by slice, behind a flag, with the rollback named.
  6. Retire the old system — and keep its tests.

Re-homing a demo onto the platform is the same rule: you keep the thin frontend and nothing else.

When patching is still right

A real hotfix

Production is broken now and it cannot wait. Patch it, meet all three conditions, then plan the rebuild.

You cannot describe it yet

No tests, no spec, no traffic you can replay. A blind rewrite is a gamble. The first job is characterizing the behavior — patch minimally until you can.

It is being retired anyway

Do not invest in what is on its way out. Keep it alive, cheaply.

It must be bit-identical

Regulated or audited behavior. Rewrite only with a parity proof you can show an auditor.

The counterargument is real

The classic case against rewrites is Joel Spolsky’s essay on Netscape (2000): you throw away years of bug fixes learned in production, and hand competitors a head start. He is right about what is at stake. The answer is step 1 — those bug fixes live in the old system’s behavior, so capture them as tests before you start. What changed is not the risk of losing them. It is how cheap the replacement is once you have kept them.

Close

The short version

  1. Problem before solution. Spec before code. The plan gets challenged by a different model than wrote it.
  2. If it is not in the tracker, it does not exist.
  3. The gate runs on every change and never gets silenced. Warnings get fixed.
  4. Sync before you read, branch, or write. One agent per worktree. Never force-push a shared branch.
  5. Every table ships its access policy. Secrets live in one place. Migrations run themselves.
  6. Tokens, never hex. Pick the design system by surface. AA contrast, 44px targets.
  7. Code in production is a liability. Ship small and reversible. The pipeline deploys, not people.
  8. Confirm what actually ran before you fix it. A repro that passes while production fails is a wrong repro.
  9. An error a rule could have prevented becomes a rule — with a check, or it is a wish.
  10. When a rule does not fit: stop and ask, or write the deviation. Never bend it silently.
  11. Start from scratch; patch only to hotfix. Capture the old behavior as tests first.
  12. Plan read-only, challenge the plan, execute in a sandbox, accept as the user in a real browser. Keep the context fresh.
  13. Domain experts own the problem and the acceptance; engineers own the walls. A prototype is a spec: rebuild it, do not patch it.
  14. Evals gate every prompt, model or tool change. Tool output stays untrusted input.
  15. Track change failure beside speed. If lead time falls and failures rise, you are outrunning your gate.

Appendix · reviewed October 2026

Current defaults

The principles above should survive a year. This section will not: it names tools, versions and models, which is exactly the volatile content a durable document keeps apart. Treat it as a snapshot and check it against today’s date.

Stack, and the reason for each “avoid”

LayerDefaultAvoid for new workWhy
FrontendNext.js 15 (App Router); Vite + React for light UIsCRA, SvelteKit, NuxtCRA is deprecated; the others add a second stack to maintain
UITailwind 3 + shadcn/ui, CSS custom propertiesBootstrap, MUI, bespoke CSSA second styling system ends tokens as the single source
AuthClerkHand-rolled sessions, NextAuthSession security is a liability you do not need to own
BackendPython 3.12 + FastAPI + Pydantic v2 (platform); Node/TS or Supabase Edge Functions (products)Flask, Django, PHP, RailsTyped models are shared with the agent framework; the rest share nothing with the stack
Agentspydantic-ai + the Anthropic SDKUnpinned or deprecated model idsBehavior changes silently, and deprecated ids stop working
OrchestrationPrefect; a jobs table + dispatch for lighter productsCron inside the web processDies with the process and double-fires at two instances
DataSupabase Postgres + pgvector; Redis/Upstash with consumer groupsA different database per service; in-memory only in productionBreaks shared access-policy patterns; state is lost on restart
SecretsDoppler, single source of truthCommitted env filesA secret in git history is there forever
DeployFly.io (services), Vercel (apps), Netlify (static)Hand-built servers, manual SSH deploysNobody can rebuild them from scratch
ObservabilityLangSmith + OpenTelemetryPrint-only loggingNo trace to join on
Testspytest / Vitest, Playwright end to endUntested merges to mainThe gate has nothing to check
Toolinguv and ruff (Python); npm, ESLint, Prettier (TS)No linter; yarn classicStyle arguments become review comments; yarn 1 is legacy

Models, by tier

TierTodayEffort
ImplementationClaude Sonnet 5.5Medium–high
ReasoningClaude Opus 5.5High
Long autonomyClaude Fable 5.1Low–medium
Batch and searchClaude Haiku 5.5, or any small modelLow