Design-First Development

Design-First Development

The Lesson

Writing a design document and a Physical Design Requirements (PDR) document before coding catches architectural mistakes when they're cheapest to fix. The design doc explores the problem space; the PDR specifies the physical implementation. Skipping either leads to rework: skipping design means building the wrong thing; skipping PDR means building the right thing in the wrong way.

Context

The certification project used a five-stage development process for non-trivial features:

  1. Design — explore the problem space (design doc)
  2. PDR — define the physical implementation (what to build, what to reuse)
  3. Plan — break PDR into ordered phases
  4. Execute — implement each phase
  5. Commit — one commit per phase when green

This was applied to: Anthropic provider addition, Atlas design system rollout, XML-to-JSON migration, and code review remediation.

What Happened

  1. The Anthropic provider addition was the first feature to follow the full five-stage process. A design doc explored the exam format, question bank requirements, and topic coverage before any code was written.
  2. The design doc identified that 50 questions across 12 topic areas was the right scope — a decision that would have been much more expensive to change after authoring began.
  3. A PDR specified the exact files to create, the XML schema to follow, and the provider-detection prefix (cca-*). The plan then broke this into 5 phases (research → scaffold → author → assemble → integration test).
  4. The Atlas design system rollout followed the same process: a design doc defined the token inventory and component library, a PDR specified the migration order and bridge-variable strategy, and a plan broke the rollout into 6 phases.
  5. The XML-to-JSON migration skipped the full design doc (scope was narrow enough) but still wrote a PDR-level plan. This worked because the decision space was small — there was only one reasonable approach.
  6. A "second opinion" pattern emerged: after writing a design doc, an AI architect agent reviewed it for blind spots. This caught a missing dark-mode consideration in the Atlas design that would have required rework.

Key Insights

Applicability

Design-first pays off for features that involve architectural decisions, new data formats, or multi-phase rollouts. It is overkill for bug fixes, single-file changes, config tweaks, and anything where the implementation is obvious. A good heuristic: if the work will touch more than 3 files or take more than 2 hours, write a design doc first.

Related Lessons