Architecture · Design-lab flow factory

Contracts, skills, and the factory

How markdown contracts and composable skills feed the design-lab Flows registry — and how that registry materializes JTBD routes from personas and lifecycle stages.

Design-lab flow factory system architecture Three zones: Contracts on the left feed Skills in the center; skills drive the design-lab factory on the right, which emits flows, screens, and ledger entries. Shared-gate is the focal skill hub. CONTRACTS SKILLS FACTORY RUNTIME GAP / DEVIATION Personas & workflows ANALYST · MAINTAINER · CASE DESIGN_SPEC catalog · lifecycle · layout GOVERNANCE + CLAUDE tokens · hard gate · stop JTBD source business-specs → FLOWS[] /shared-gate rules of engagement check-catalog 4 provenance compose-surface 3-pane · profile bind-tokens L1←L2 map trace-flow hand-off OK? /build-surface one screen /build-flow journey E2E design-lab Flows factory FlowsIndex ← FLOWS[] registry FLOWS[] 4 JTBDs /flow/* routes ProductShell Screens queue · case · … ds-ledger codify queue

Contracts

Who / what / how

  • PERSONAS-AND-WORKFLOWS — role ownership + stage map
  • DESIGN_SPEC — component catalog + three-pane IA
  • GOVERNANCE + libs/design/CLAUDE.md — token gate + stop
  • JTBD sibling specs → explicit FLOWS[] in-repo

Skills

Recursive gate chain

  • /shared-gate is inherited by ds-task, build-surface, build-flow
  • build-flow recursively applies check → compose → bind → trace per screen
  • Only token violations halt; missing components flow-and-flag

Runtime

Factory outputs

  • Registry drives FlowsIndex cards (built vs not yet)
  • Built JTBDs get chrome-free /flow/* routes
  • Gaps write back to ds-ledger + placements FACTORY-IDs