Skip to main content

Coding With Flow

How do you ship features where the value proposition is validated before the first line of code?

The bigger the project, the more you need to sell the process of delivery over the promised solution.

The Loop

DEFINE VALUE → MAKE PLANS → VALIDATE ARCHITECTURE → BUILD → COMMISSION → IMPROVE TEMPLATE
│ │ │
└──────────────────── legacy rule: every job improves the next ◄─────────┘

Two teams, one contract. The product team defines WHAT and WHY. The engineering team decides HOW and WHERE. The PRD is the contract between them.

Define Value

The product team builds PRDs using a structured spine — a routing table where each task has dependencies, quality gates, and outputs.

StepWhatGate
CollectState the job, who, evidenceAll inputs present
DefineSituation, Intention, ObstacleEach element concrete
MapFlow diagrams (outcome, value stream)Diagrams answer one question each
ScorePriority scoring with evidenceAll dimensions scored
StoriesValidated Value storiesWhen/Need/Outcome/Counterfeit
AssembleData file + presentationDual perspective (customer + builder)

Stories are not feature descriptions. They are predictions about customer value that engineering can verify.

Make Plans

Engineering reads the PRD and creates a plan. The plan is not a copy of the PRD.

  1. Read value stories — understand what customer value each story claims
  2. Select template — compare to best matching plan template from prior work
  3. Create tasks — describe WHAT to build, never HOW. Engineering decides implementation
  4. Two minds review — challenge, question, and approve before executing

Templates compound. A template that enforced test-first for the last 5 features will enforce it for the next one.

Validate Architecture

Before code, the architecture review validates the plan against the layer model.

LayerOwnsRule
DomainTypes, contracts, eventsSource of truth. Never imports outward
InfrastructureRepositories, adaptersImplements domain ports. Only layer touching the database
ApplicationUse cases, orchestratorsComposes through ports. Business logic here
PresentationComponents, actions, routesConsumes application. Transforms contracts to views

The review checks: Do domain types come from PRD stories? Do boundaries have explicit transformations? Does the plan respect dependency direction?

Build

Type-first development. The compiler is the methodology.

Two Streams

StreamInputOutput
BuildPRD value storiesNew capabilities
FixIssues with reproduction stepsBug fixes, capability promotions

Build: Types from stories → tests RED → implementation → tests GREEN → ship.

Fix: Walk the pipe first — trace the boundary before touching code. Identify the layer. Write a regression test at that layer. Fix. Ship.

Anti-pattern: Jumping to browser-level debugging. Walking the pipe costs minutes. Skipping it costs hours.

Process Health

MetricTargetSignal
Commits per fix3 or fewerMore = wrong layer
E2E-only fix rate10% or lessHigher = testing trophy inverted
Walk-the-pipe compliance100%Skip = layer violation risk

Commission

The product team verifies the build against the original value stories.

  1. Dogfood — use the feature as a real user
  2. Walk the stories — each story passes or fails with evidence
  3. Promote — L0 (specced) → L1 (built) → L2 (tested) → L3 (CI green) → L4 (production verified)
  4. Legacy rule — improve the template for the next team

The legacy rule closes the loop. Every completed job improves the starting point for the next one.

Dig Deeper

Context

Questions

What breaks when the team that defines value also decides implementation?

  • How do you know a plan template has compounded enough to trust?
  • When should architecture review block work versus flag and proceed?
  • If value stories are predictions, what happens when the prediction is wrong but the code is correct?