Flow-Walk UI Prototyping Refactor
A flow-driven, minimum-UI build mechanic for the product-design tree: build each screen in element-batches ordered by user discovery, stop when the flow is satisfied, branch per UX variation, and park-or-prune. This page captures the compliant re-cut — the version verified against the real convention, schema, and tests — and shows what is new, extended, additive, and deliberately dropped.
1 · Locked decisions
- Shape: compliant re-cut — stay within the fixed 6-skill route tuple, node-type table, and three-role model. No route insertion, no role reclassification.
- Batch mechanic: extend
design-tree-loop-convention.md §2to cover ordered/dependent per-unit intermediates. No standalone convention, no new generator/registry plumbing. - Proof ordering: a new
key-momentsskill on the trunk, running beforestate-modelandux-variations— it needs only the flow map, ranks flows by proof priority (value × risk × frequency), orders the branches, and gates variation breadth. - Data-first, just-in-time:
state-modelattaches per promoted flow only — modeled when key-moments promotes a flow to build, never for pruned flows. UX variations re-skin the data layer; later flows extend the core model rather than re-derive it. - Progressive fidelity: split the builder into
build-ui-screens(visual wireframe in element-batches) →logic-wiring(clickable, state-backed; keeps prototype's CLI/API/infra modes). - Selection & widen:
/uat --variant-evaluationpicks the canonical screen per flow, then two-stage/consolidate-prototypesstitches canonical screens → cohesive flows → full prototype. Off-ramp = additiveparked/cherry_pick_candidate.
2 · The design tree (the hourglass)
route node (unchanged)
new skill
renamed / extended
data substrate (state-model)
consolidation (widen)
pruned / off-ramp
user-flow-map enumerates every flow; key-moments (new, on the trunk) ranks them by proof priority and gates variation breadth; then, just-in-time per promoted flow, the state-model gate attaches the data substrate before ux-variations fans out branches that re-skin it. The selected variation descends the builder chain — ui-interview → build-ui-screens (visual wireframe) → logic-wiring (clickable, state-backed; keeps CLI/API/infra) → an approved canonical screen. uat picks the canonical screen per flow; parked variations stay available to cherry-pick. Consolidation then widens in two stages: stitch canonical screens into cohesive flows, then assemble flows into a full prototype for AFPS graduation. State-model and data are built just-in-time per promoted flow — pruned flows are never modeled.3 · Screen build loop — progressive-fidelity ladder
build-ui-screens runs the visual batch loop: each batch adds only the elements needed to make the next flow-step reachable, a light visual checkpoint reviews it against the action/state matrix, and the loop halts at minimum UI. Bottom band — once visual is satisfied, logic-wiring upgrades the wireframe to a clickable, state-backed contained experiment wired to the flow's state-model, then a flow-reachability acceptance check feeds exactly one binding alignment gate per variation. The red off-ramp parks a stalled build (parked + cherry_pick_candidate) without pruning, so it stays available to cherry-pick.4 · Change set
| Element | Kind | Detail |
|---|---|---|
key-moments skill | new | Trunk skill, runs before state-model/ux-variations (needs only the flow map). Ranks proof order (value × risk × frequency); writes existing journey_sequence / evaluation_priority / branch_order_override / priority_rationale. Orders branches and gates variation breadth. Both mirrors at v0.0. |
state-model | extend | Data-first, just-in-time: attaches per promoted flow only (after key-moments promotes it), never for pruned flows. Later flows extend the core model rather than re-derive it. |
prototype → logic-wiring | rename | Renamed and scoped to logic: upgrades the wireframe to a clickable, state-backed contained experiment, validates flow reachability. Keeps prototype's non-UI runnable modes (CLI / API / infra = "runnable logic"). Updates the route-tuple const + tests + handoff strings; schema_version v0.3 → v0.4. |
create-ui-experiment → build-ui-screens | rename | Renamed and scoped to the visual wireframe builder: runs the element-batch loop with a visual checkpoint per batch and a minimum-UI stop rule. Feeds logic-wiring. |
design-tree-loop §2 | extend | Add ordered/dependent per-unit intermediates (batches). Defines batch = one flow-step, minimum-UI stop rule, moment-level end-to-end acceptance. Regenerate via existing upgrade-design-tree-loop.mjs. |
ui-interview | extend | Additionally authors the batch plan in its packet. Role unchanged — not an orchestrator. |
consolidate-prototypes (two-stage) | extend | Add stage 1 (stitch approved canonical screens → cohesive user-flows) before the existing stage 2 (assemble flows → full prototype → AFPS graduation). |
flow-tree.schema → v0.4 | additive | Optional fields only: build_ledger[] on ui_experiment; parked enum value + cherry_pick_candidate boolean. Plus route-tuple rename prototype → logic-wiring. Sample stays valid. |
| Comparison / selection | reuse | /uat --variant-evaluation picks canonical per flow → two-stage /consolidate-prototypes; parked branches feed cherry-pick. |
5 · Dropped from the literal vision
These were verified to collide with load-bearing invariants (fixed route tuple, node-type table, three-role model, filesystem-existence cursor) and were cut to stay drop-in compliant.
| dropped | ui-interview as orchestrator directing build-ui-screens | Violates the three-role model. Replaced by: ui-interview authors the plan, executor builds. |
| dropped | screen-orchestrator skill + screen node | No screen node exists; route insertion breaks the const tuple + tests. Deferred; add screens[]/screen_id as optional schema only if later proven necessary. |
| dropped | Variation-level comparison gate | Whole-unit review already covers a branch's variations; built comparison lives in UAT. |
| dropped | Four-level resume cursor | Violates "cursor = filesystem existence." Variation + batch map onto the two existing cursor levels. |
6 · Plumbing & verification
Schema & tests
- Bump
schema_versionv0.3 → v0.4; update theconstassertion intests/layer1/product-design-flow-tree.test.ts. - Any extended enum is asserted as an exact array — update it.
- Keep every new field optional so
flow-tree-sample.yamlstays valid. - Expect SKILL.md prose assertions to shift with routing/wording edits.
Skills, mirrors & build
- Behavioral edits →
skill-archive.sh+ version bump + CHANGELOG, in both claude + codex mirrors (parity-audited). key-moments: author both mirrors, PACK.md line,required_conventions, add to convention Sets, run generators,git addbundles.- Convention edit → rerun
upgrade-design-tree-loop.mjs; commit regeneratedDESIGN-TREE-LOOP.md. - Stage-before-build, then regenerate manifest + both showcase data files; run
build:check+validate:data.
Status: APPROVED & EXECUTED (2026-06-26) — the flow-walk re-cut shipped against flow-tree schema v0.4. Naming convention (locked):
prototype → logic-wiring, create-ui-experiment → build-ui-screens, new key-moments, keep consolidate-prototypes. Deprecated prototype and create-ui-experiment aliases still route to the primaries. This supersedes the older state-model-first proposal (docs/proposals/state-model-first-pipeline-refactor.md), cherry-picking only its state-model fast-pass fold and per-screen model_ref.
Deferred (separate pass): standardizing on "experiment" as the single word for a contained build would mean a schema-wide rename —
prototype_build_plan/prototype_build_item/prototype_build_status/prototype_path → experiment_* and node status promoted-to-prototype → promoted-to-experiment — with its own schema_version bump and test/handoff updates. Out of scope for this refactor to avoid a half-rename that splits "experiment" (skill name) from "prototype" (schema vocab).