Five-Stage Design-to-Execution Workflow

A repeatable workflow — Design, PDR, Plan, Execute, Commit — with table-driven task tracking and one-commit-per-phase discipline, applied across 18 project phases.

Tags

Five-Stage Design-to-Execution Workflow

The Lesson

Breaking implementation into five explicit stages — explore the problem (Design), specify the build (PDR), order the work (Plan), execute with status tracking (Execute), and commit per phase — prevents the most common failure mode in multi-phase projects: starting to code before understanding what to build, then losing track of what's done and what's left.

Context

A lessons library project went through three major implementation cycles: V1 (static site, 10 phases), V2 (RAG chatbot + multi-cloud, 8 phases), and V2 hardening (production readiness, 9 phases planned). Each cycle involved different technology (Astro/TypeScript, FastAPI/Python, CloudFormation/Bicep) but followed the same five-stage workflow. The total across all cycles was 27 phases containing over 130 individual task rows, all tracked in markdown plan files with timestamps.

What Happened

  1. Stage 1 (Design): Explored the problem space — read code, logs, errors, external references. Produced a design document — a structured markdown file with numbered sections covering purpose, scope, core design principles, primary user stories, and functional requirements grouped by area. No code changes. This stage caught misunderstandings before they became wrong implementations.
  2. Stage 2 (PDR): Translated the design into physical specifications — what exists to reuse, new dependencies, package layout, data model, component specifications with file paths. The PDR is a build spec that could be handed to a different implementor.
  3. Stage 3 (Plan): Converted the PDR into ordered phases with task tables. Each phase has a goal, dependencies, and exit condition. Each row has 5 columns: PhaseNo, Status, Started (PST), Completed (PST), Description. Numbering is {phase}.{row} (e.g., 3.4). Phases end with explicit "stage and commit" rows.
  4. Stage 4 (Execute): Worked through rows sequentially. Each row flips from Open → Started (with timestamp), work is done and verified, then flips to Completed (with timestamp). The plan file is saved after every status change. When all rows in a phase complete, a Phase Summary block is written and a single commit captures the entire phase.
  5. Stage 5 (Commit): One commit per phase, only when tests pass and lint is clean. Commit message reflects the phase scope (e.g., "feat: Phase 3 — gap detection with corpus-gap records and gaps UI"). Never commit partial phases. Never batch multiple phases into one commit.
  6. V2 executed 8 phases in sequence, each producing one commit (3c1749a through f62a6c8). Every phase commit was self-contained — checking out any phase commit produces a working application with all tests passing.
  7. The hardening plan followed the identical format. The plan file was the source of truth for resuming after interruptions — a new session could read the plan, find the first non-Completed row, and pick up exactly where work stopped.

Key Insights

Applicability

This workflow works when:

It does not apply when:

Related Lessons

Related Lessons