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.
| Step | What | Gate |
|---|---|---|
| Collect | State the job, who, evidence | All inputs present |
| Define | Situation, Intention, Obstacle | Each element concrete |
| Map | Flow diagrams (outcome, value stream) | Diagrams answer one question each |
| Score | Priority scoring with evidence | All dimensions scored |
| Stories | Validated Value stories | When/Need/Outcome/Counterfeit |
| Assemble | Data file + presentation | Dual 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.
- Read value stories — understand what customer value each story claims
- Select template — compare to best matching plan template from prior work
- Create tasks — describe WHAT to build, never HOW. Engineering decides implementation
- 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.
| Layer | Owns | Rule |
|---|---|---|
| Domain | Types, contracts, events | Source of truth. Never imports outward |
| Infrastructure | Repositories, adapters | Implements domain ports. Only layer touching the database |
| Application | Use cases, orchestrators | Composes through ports. Business logic here |
| Presentation | Components, actions, routes | Consumes 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
| Stream | Input | Output |
|---|---|---|
| Build | PRD value stories | New capabilities |
| Fix | Issues with reproduction steps | Bug 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
| Metric | Target | Signal |
|---|---|---|
| Commits per fix | 3 or fewer | More = wrong layer |
| E2E-only fix rate | 10% or less | Higher = testing trophy inverted |
| Walk-the-pipe compliance | 100% | Skip = layer violation risk |
Commission
The product team verifies the build against the original value stories.
- Dogfood — use the feature as a real user
- Walk the stories — each story passes or fails with evidence
- Promote — L0 (specced) → L1 (built) → L2 (tested) → L3 (CI green) → L4 (production verified)
- 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
- Flow Engineering — Stage 1: stories become outcome maps, maps become domain contracts
- Type-First Development — Stage 2: domain contracts pull implementation through four layers
- Outer-Loop Validation — Stage 3: instruments read production reality
Context
- Priorities — Active PRDs and build queue
- Hexagonal Architecture — The layer model that architecture review validates against
- Commissioning Protocol — L0-L4 maturity levels
- Testing Platform — Trophy strategy and layer selection
- Protocols — Build and fix streams are operational protocols
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?