Harness Intelligence Wiki
SpecsCLIDesign Phase Redesign

Design Phase Redesign

Architecture: Design Phase Redesign

Context Scope

  • Capability identity: apps/wiki/content/docs/project/specs/cli/design-phase-redesign. The capability replaces the Baseline design-phase skill with a graph that turns brand evidence into committed, quality-checked UI code in the real app.
  • Actors and outcome: the operating agent runs the gates; the user judges brand boards, compositions, and variant rounds; delivery-phase consumes the committed UI. The outcome is UI that iterates inside the real app and reaches delivery as code, not as images or throwaway HTML (Q1, Q6).
  • In scope: the design-phase graph in wearedevpunks/skills; vendored upstream design skills and their provenance; removal of gpt-taste and improve-mobile-frontend; the frontend pack catalog; the delivery-phase rule for Design-Owned UI Code; Baseline sync, changelog, and wiki pages.
  • Non-goals: the Expo component library choice (parked, Q11); changes to Finder's prototype-phase or Matt's prototype (Q2); a new image tool runtime in the CLI (Q13).
  • Spec: sibling SPEC.md in this folder (codes mapped in Spec Traceability).

Canonical Terms

The terms come from the published glossary and Glossary Q29: Variant Round, Variant, Verdict, Promote, Design-Owned UI Code, Brand Kit, Composition, Motion Plan, Quality Gate, shadcn-Primitive Directive.

  • A Variant Round contains 3 to 5 Variants. Promote follows exactly one keep Verdict and produces Design-Owned UI Code. Each Composition has at most one Motion Plan.
  • Axioms: every variant lives in the real app on the real route; delivery-phase never reimplements Design-Owned UI Code; no variant reaches the verdict before it passes the quality gate, and none is promoted before a full break-ui pass; image generation never silently falls back; approval is never inferred from artifact existence.

Sources

SourceRoleExact location anchorImmutable revision or content hash
S1Grill status and closureapps/wiki/content/docs/project/grilling/design-phase-redesign-grill-status.md#phase-statecommit 7824b8edd044; sha256 ab5e801ab1e37547…
S2Grill decision logapps/wiki/content/docs/project/grilling/design-phase-redesign-grill-log.md Q1–Q28, Glossary Q29commit 7824b8edd044; sha256 f99b8eaa6ff2de89…
S3Published glossaryapps/wiki/content/docs/project/domains/design-phase-redesign-glossary.mdxcommit 7824b8edd044; sha256 43a39e90f1d3258b…
S4Current design-phase skillwearedevpunks/skills skills/phases/design-phase/**e3b774bbeef6
S5Emil Kowalski skillsemilkowalski/skills skills/{prototype,break-ui,mobile-native,emil-design-eng,find-animation-opportunities,animate,animate-expo,review-animations}2d228630ba14
S6taste-skillLeonxlnx/taste-skill skills/{brandkit,redesign-skill,taste-skill,imagegen-frontend-web,imagegen-frontend-mobile,image-to-code-skill,output-skill}f624f37a8c65
S7shadcn skillshadcn-ui/ui skills/shadcn/{SKILL,design-system,design-system-page}.mdaf983e842ab3
S8CLI pack catalog and install triggerapps/cli/src/data/catalog/{packs,skills}.ts; apps/cli/src/registry/shape.ts:surfaceAppliesbranch base a871c29e7

Source Disposition

ItemDispositionReplacement or reasonSource
Gate approvalsupersededFolded into verdict + promoteQ5
Gate prototype (delegates to $prototype)supersededvariant-round with the adapted Emil prototypeQ1, Q2
Image fallback to $prototypesupersededCodex ladder, then blockQ13
Expo component baseparkedOwner: user; resume when Expo design work startsQ11
stitch-design-taste skillrejectedDESIGN.md template owned by design-phaseQ9

Whole System

Question: which owners change, and how does design output reach delivery?

Conclusion: design-phase writes into the target app and its handoff. delivery-phase reads the committed UI. All skill text lives in the skills repo; this repo owns the catalog and distribution (Q6, Q26).

Architecture Blocks

SelectorOwnerAuthority and mutation rightsAccepted boundaryConstraint and evidence
ARC-001 design-phase graphskills repo skills/phases/design-phaseSKILL.md bootstrap, flat phases/ with router.md and one file per gate: intake, grill, brand, design-system, compose, motion-plan, variant-round, quality-gate, verdict, promote, backlog, delivery-handoff. Files approval.md and prototype.md are removed. AUTHORING-HANDOFF.md records authoring. Invocation stays explicit-onlyRouter selects exactly one gate from current evidencewrite-graph-based-skills structure; Q4, Q5
ARC-002 Design handoffdesign-phaseOne durable handoff beside SPEC.md in the resolved spec folder. When no spec exists yet, the folder is reserved by create-spec folder-naming, as for ARCHITECTURE.md. Holds gate outcomes, round counter, verdicts, Motion Plan ledger, artifact index. Images become durable through repo-asset-managementRouter reads it on every entry, including cold resumeQ27, Q16. Illustrative: file name DESIGN-HANDOFF.md
ARC-003 Brand and design-system referencesdesign-phase/referencesDESIGN.md template in Google Stitch DESIGN.md format. The brand gate runs brandkit; the design-system gate fills the template, then runs shadcn design-system.md Steps 3–7 in the existing app, or shadcn init without --template when components.json is absent. Expo writes a NativeWind theme configBrand skips when fresh brand artifacts existQ8, Q9, Q10, Q11, Q12
ARC-004 Image generation referencedesign-phase/referencesLadder: own image tool when the agent is Codex → T3 delegate_task to provider codex → codex exec when installed → block with reason. No fallback to code or HTMLUsed by brand and composeQ13
ARC-005 shadcn-Primitive Directivedesign-phase/referencesText appended to every image brief: compose screens from shadcn primitives and the accepted DESIGN.md tokens. Vendored imagegen skills stay close to upstreamcompose briefQ15, Q14
ARC-006 Variant enginevendored Emil prototype (adapted)Builds 3 variants by default, cap 5, each on a named divergence axis, on the real route behind a dev-only ?variant= switch on the working branch. Verdict vocabulary riff, combine, keep, reject. The isolated /prototypes/<slug> rule is replacedCalled only by variant-round and promoteQ1, Q2, Q3
ARC-007 Variant-round and quality-gate skill setdesign-phase gatesvariant-round: shadcn components, design-taste-frontend (always), image-to-code, emil-design-eng, animate or animate-expo, mobile-native (web), redesign-existing-projects only on existing-UI intent. quality-gate: light break-ui, mobile-native checklist, review-animations, copy lens, Motion Plan conformance; pass/fail per variantOnly passing variants reach the verdictQ17–Q23
ARC-008 Copy lens referencedesign-phase/referencesTaste v2 references/copy.md rules plus the imagegen "Copy AI tells" list. full-output-enforcement stays a separate guard against truncated codeUsed by compose and quality-gateQ22
ARC-009 Vendored skills and provenanceskills repo skills/agnostic/frontend/*, skills/frameworks/expo/animate-expoEmil at one shared pin: prototype, break-ui + CATALOG.md, mobile-native, emil-design-eng, find-animation-opportunities, refreshed animate, animate-expo, review-animations. taste-skill: brandkit, refreshed redesign-existing-projects, full-output-enforcement. shadcn: shadcn with rules/, design-system.md, design-system-page.md, scripts/. "Initial Response" greetings removed; each UPSTREAM.md records its edits; the provenance test checks the stated diff. gpt-taste and improve-mobile-frontend removed with tests and referencesUpstream refresh re-applies recorded editsQ24, Q25, Q22
ARC-010 Frontend pack catalogapps/cli/src/data/catalog/{packs,skills}.tsdesign-phase moves from planning to frontend. frontend lists every design skill above, including shadcn. animate-expo stays in expo. Catalog entries exist for each vendored skill and none for removed skillsThe frontend surface pack installs when nextjs or react is detectedQ26; S8
ARC-011 Delivery ruleskills repo delivery-phase, implement-specDesign-Owned UI Code is accepted input. Delivery adds logic, data, and the rest of the requirement; it changes design-owned files only to fix a defect and records each changedelivery-handoff brief names the promote commitQ6
ARC-012 Baseline distributionapps/cli sync, root BASELINE_CHANGELOG.md, apps/wikiSkills commit on skills main → bun run sync:skills with matching receipt SHA → baseline Unreleased notes → wiki Harness pages for design-phase and skill packsRelease classification selects baselineRoot CLAUDE.md shared-skills rule; Q26

Critical Flows and Boundaries

FLOW-001 Design run

Question: in which order do gates run, and where does the user stop the run?

  • FLOW-001-STEP-001: intake records surface (web or Expo), existing-UI intent, routes, components.json, DESIGN.md, theme, brand artifacts, and screenshots, with confidence (Q18, Q11).
  • FLOW-001-STEP-002: a lean requirements-grill closes scope units and constraints. Unchanged from the current skill (S4).
  • FLOW-001-STEP-003: brandkit boards through ARC-004; the user accepts them (Q8, Q28).
  • FLOW-001-STEP-004: DESIGN.md, then theme and component variants (ARC-003); browser check; shown without a stop (Q12).
  • FLOW-001-STEP-005: web and mobile compositions per scope unit with DESIGN.md, ARC-005, and ARC-008; the user accepts them (Q14).
  • FLOW-001-STEP-006: find-animation-opportunities writes Motion Plan entries as proposed; accepted entries become accepted (Q16).
  • FLOW-001-STEP-007: full break-ui, rewrite in place, remove the switch, keep worst-case fixtures dev-only, commit, write the approved artifact contract (Q7).
  • FLOW-001-STEP-008: link the promote commit and artifacts to existing backlog items, or return new scope to requirements-phase. Unchanged rule (S4).
  • FLOW-001-STEP-009: the brief states that UI is committed and delivery adds logic only (ARC-011); stop for explicit $delivery-phase invocation.

Conclusion: the user stops the run three times (brand, compose, verdict). Every other gate validates itself and returns to the router (Q28).

FLOW-002 Variant loop

Question: how does iteration stay inside the design flow?

  • FLOW-002-STEP-001: build the round's variants (ARC-006, ARC-007), increment the round counter in ARC-002, set Motion Plan entries to built (Q3, Q4).
  • FLOW-002-STEP-002: quality gate per variant; conforming Motion Plan entries become verified (Q21, Q23).
  • FLOW-002-STEP-003: the user gives the verdict on passing variants only. keep is the approval (Q5).

Conclusion: keep → promote is the only path to code, so later edits never leave the design flow. A reject returns to the router, which applies the re-entry rule: compose when the layout changes, otherwise variant-round (Q4).

FLOW-003 Image generation ladder

FLOW-003-STEP-001  agent is Codex?            → use own image tool
FLOW-003-STEP-002  inside T3?                 → delegate_task(provider: codex) with the image brief
FLOW-003-STEP-003  `codex exec` installed?    → run it with the image brief
FLOW-003-STEP-004  none                        → gate outcome blocked, reason recorded in ARC-002

Conclusion: every image either comes from Codex or the gate blocks visibly (Q13).

FLOW-004 Later visual change and delivery consumption

  • FLOW-004-STEP-001: a later visual change re-enters design-phase. The router selects compose when the layout changes, otherwise variant-round (Q4).
  • FLOW-004-STEP-002: delivery-phase starts from the promote commit, treats Design-Owned UI Code as accepted input, and records any defect fix to it (ARC-011, Q6).

FLOW-005 Skill source to Baseline

FLOW-005-STEP-001  skills main: vendor (ARC-009), graph (ARC-001), rule (ARC-011), tests → commit, push
FLOW-005-STEP-002  harness-intelligence: bun run sync:skills → receipt SHA = skills main HEAD
FLOW-005-STEP-003  catalog (ARC-010), BASELINE_CHANGELOG Unreleased, wiki pages (ARC-012)

Conclusion: skill text never starts in apps/cli/skills; the sync receipt proves which skills commit the CLI ships (root CLAUDE.md shared-skills rule).

Accepted Detail Coverage

Question + exact entry/evidence anchorExact accepted choiceProvided rationale / alternativesArchitecture selectorSystem constraint served
Q1Real app, real route, working branch, dev-only ?variant=; no standalone HTML, prototype branch, or isolated routeCurrent HTML and branch output rejectedARC-006, FLOW-002Variants are already production-shaped code
Q2Emil prototype adapted; verdicts riff/keep/combine/reject; Matt's prototype unused by design-phaseEmil's variant loop preferredARC-006, ARC-009One variant engine
Q3Default 3, cap 5; mobile and desktop widthsEmil's capARC-006Comparable rounds
Q4Explicit loop; round counter and ledger in handoff; re-entry at compose or variant-roundnot recordedFLOW-002, FLOW-004-STEP-001, ARC-002Iteration survives cold resume
Q5approval gate removed; keep = approval; promote writes contractAvoid a second approval askARC-001, FLOW-002-STEP-003No inferred approval
Q6design-phase commits UI; delivery adds logic, edits design files only for recorded defect fixesUser-directed boundary changeARC-011, FLOW-004-STEP-002No UI reimplementation
Q7Full break-ui → rewrite in place → remove switch → keep fixtures dev-only → commit + contractnot recordedFLOW-001-STEP-007Regression fixtures persist
Q8brandkit first via Codex; skip when fresh; human acceptBrand defines the designARC-003, FLOW-001-STEP-003Identity before screens
Q9design-phase DESIGN.md template, Google Stitch format; no stitch-design-tasteshadcn only reads DESIGN.mdARC-003One DESIGN.md author
Q10shadcn component base; Steps 3–7 in existing app; shadcn init without --template when components.json absentStep 1 makes a new appARC-003, FLOW-001-STEP-004Theme lands in the real app
Q11Expo: NativeWind theme config; component base parked"not an issue right now"ARC-003; Parked WorkExpo support without a library decision
Q12design-system validates and shows without a stopnot recordedFLOW-001-STEP-004Fewer human stops
Q13Codex ladder: own tool → T3 delegate_task → codex exec → blockNo silent fallbackARC-004, FLOW-003Images never disappear silently
Q14Web + mobile imagegen by default; brief has DESIGN.md, directive, copy lens; human acceptnot recordedFLOW-001-STEP-005Both surfaces designed
Q15Directive is a design-phase reference appended to briefsKeep imagegen near upstreamARC-005Images map to shadcn code
Q16find-animation-opportunities after compose; ledger proposed → accepted → built → verified"STATEFULLY"ARC-002, FLOW-001-STEP-006, FLOW-002Motion is tracked to proof
Q17design-taste-frontend always activeUser override of scope lineARC-007Taste on every surface
Q18redesign-existing-projects only on existing-UI intentnot recordedARC-007, FLOW-001-STEP-001Intent-scoped redesign
Q19mobile-native mandatory for responsive web; remove improve-mobile-frontendKeep Emil'sARC-007, ARC-009One mobile authority
Q20variant-round skill compositionnot recordedARC-007Complete craft set
Q21Light break-ui per variant; full before promote; pass = no open breaks, decisions closed, fixture dev-onlyCost balanceARC-007, FLOW-002-STEP-002, FLOW-001-STEP-007Every element passes break-ui
Q22Copy lens = taste copy.md + Copy AI tells; keep full-output-enforcementoutput-skill does not check copyARC-008, ARC-009Copy checked; no truncated code
Q23Quality gate check set; only passing variants reach the verdictnot recordedARC-007, FLOW-002-STEP-002User judges only sound variants
Q24Vendor list at shared Emil pin; greetings removed; UPSTREAM.md edits; provenance test checks diffSkills run autonomously in a phaseARC-009Predictable child-skill runs
Q25Remove gpt-taste, improve-mobile-frontendDuplicatesARC-009No dead skills
Q26design-phase + all design skills incl. shadcn in frontend; animate-expo stays in exponot recordedARC-010Skills install together
Q27Handoff beside SPEC.md; images via repo-asset-managementnot recordedARC-002Durable, discoverable state
Q28Human stops: brand, compose, verdictnot recordedFLOW-001Bounded user effort
Glossary Q29Canonical terms and axioms"prototype" ambiguityCanonical TermsOne vocabulary

Spec Traceability

  • State: complete. Every current OUT and AC code in the sibling SPEC.md maps below.
Spec code / section selectorArchitecture selectorsAccepted grill Q / exact log-entry evidence anchorsCoverage explanation
OUT-001 (SPEC #out-001)ARC-001, FLOW-001Q4, Q5Graph structure and gate set
OUT-002 (SPEC #out-002)ARC-006Q1Real-route variant engine
OUT-003 (SPEC #out-003)FLOW-002, FLOW-004-STEP-001, ARC-002Q3, Q4, Q5Loop, verdicts, re-entry, round counter
OUT-004 (SPEC #out-004)ARC-003, FLOW-001-STEP-003, FLOW-001-STEP-004Q8, Q9, Q10, Q11, Q12Brand then DESIGN.md then theme
OUT-005 (SPEC #out-005)ARC-004, ARC-005, ARC-008, FLOW-003, FLOW-001-STEP-005Q13, Q14, Q15, Q22Codex ladder and composition briefs
OUT-006 (SPEC #out-006)FLOW-001-STEP-006, FLOW-002-STEP-001, FLOW-002-STEP-002Q16Motion Plan ledger states
OUT-007 (SPEC #out-007)ARC-007Q17, Q18, Q19, Q20Variant-round skill set
OUT-008 (SPEC #out-008)ARC-007, ARC-008, FLOW-002-STEP-002Q21, Q22, Q23Quality gate before verdict
OUT-009 (SPEC #out-009)FLOW-001-STEP-007, ARC-011, FLOW-004-STEP-002Q6, Q7Promote commit and delivery boundary
OUT-010 (SPEC #out-010)ARC-002Q27, Q16Durable handoff beside SPEC.md
OUT-011 (SPEC #out-011)ARC-009Q24, Q25, Q22Vendored set, provenance, removals
OUT-012 (SPEC #out-012)ARC-010, ARC-012, FLOW-005Q26Pack catalog and distribution
AC-001 (SPEC #ac-001)ARC-001Q5Gate files present; approval/prototype gates absent
AC-002 (SPEC #ac-002)ARC-001, FLOW-001Q4Graph audit
AC-003 (SPEC #ac-003)ARC-006Q1No HTML, branch, or isolated route
AC-004 (SPEC #ac-004)FLOW-002, ARC-006Q3, Q4Verdict routes; variant count
AC-005 (SPEC #ac-005)FLOW-004-STEP-001, ARC-002Q4Re-entry and cold resume
AC-006 (SPEC #ac-006)FLOW-001-STEP-003, ARC-004Q8, Q28Brand gate
AC-007 (SPEC #ac-007)ARC-003, FLOW-001-STEP-004Q9, Q10, Q11, Q12Design-system gate
AC-008 (SPEC #ac-008)ARC-004, FLOW-003Q13Image ladder
AC-009 (SPEC #ac-009)FLOW-001-STEP-005, ARC-005, ARC-008Q14, Q15Compose briefs
AC-010 (SPEC #ac-010)FLOW-001-STEP-006, FLOW-002-STEP-001, FLOW-002-STEP-002Q16Motion Plan transitions
AC-011 (SPEC #ac-011)ARC-007Q17, Q18, Q19, Q20Skill conditions
AC-012 (SPEC #ac-012)ARC-007, FLOW-002-STEP-002, FLOW-001-STEP-007Q21, Q23Quality gate and full break-ui
AC-013 (SPEC #ac-013)FLOW-001-STEP-007, FLOW-001-STEP-009Q7Promote output
AC-014 (SPEC #ac-014)ARC-011, FLOW-004-STEP-002Q6Delivery rule
AC-015 (SPEC #ac-015)ARC-002Q27Handoff location
AC-016 (SPEC #ac-016)ARC-009Q24, Q25Vendored set and removals
AC-017 (SPEC #ac-017)ARC-009Q24Provenance test
AC-018 (SPEC #ac-018)ARC-010Q26Pack catalog
AC-019 (SPEC #ac-019)ARC-012, FLOW-005Q26Sync, changelog, wiki

Flow Failure Coverage

LensEvidence / unknown / justified not applicableGuarantee at stakeMaterial unresolved gap
Entry points and path convergenceExplicit-only invocation; every entry, resume, and later visual change goes through router (ARC-001, FLOW-004-STEP-001, Q4)One rule set per entryNone
Critical execution pathsFLOW-001 order and three human stops (Q28)Brand before screens before codeNone
State ownership and authorityARC-002 owned by design-phase; Design-Owned UI Code owned by design until promote, then accepted delivery input (ARC-011)No double authorshipNone
Transaction and side-effect boundariesPromote is the one commit boundary (Q7). Unknown: whether variant rounds also commit is not recorded; variants stay dev-only behind ?variant=Switch never shipsNone (non-material)
Concurrency and stale stateOne run per scope unit; the router re-derives from current artifacts and staleness rules (S4). Concurrent runs on one route: not recordedFresh evidenceNone (non-material)
Idempotency and retriesBrand skips when fresh (Q8); gates reuse fresh artifacts; the round counter increments only in FLOW-002-STEP-001Re-run does not duplicate a roundNone
Partial failure and recoveryImage ladder blocks visibly (FLOW-003-STEP-004); a failing variant returns to variant-round; a failed promote leaves the kept variant behind the switchNo silent fallbackNone
Execution lifetime and durabilityHandoff and ledger beside SPEC.md; images via repo-asset-management (Q27)Cold resumeNone
Lifecycle and dependency transitionsRemoval of gpt-taste, improve-mobile-frontend, approval.md, prototype.md with references and tests; upstream refresh re-applies UPSTREAM.md edits (Q24, Q25); frontend installs only on nextjs/react (S8)No dangling referencesNone
Completion and observabilityGate handoffs with outcome; promote commit + artifact contract; Motion Plan verified; sync receipt SHA (FLOW-005-STEP-002)Distinguish built, verified, promotedNone

Parked Work and Non-material Unknowns

Question / sourceDisposition and scope consequenceOwner / resume triggerWhy current guarantees remain closed
Q11 Expo component baseParked; Expo gets a NativeWind theme onlyUser; first Expo design runTheme output is accepted without a component library
Q13 Codex child image toolUser-asserted, unverified runtime behaviorImplementer; first brand runThe ladder blocks visibly when it fails
Variant-round commitsNot recordedImplementer; write-graph-based-skills authoringPromote remains the only required commit

Validation

  • Decision/source/glossary reconciliation: Q1–Q28 and Glossary Q29 match S1–S3 at commit 7824b8edd044; status closure and glossary terms agree.
  • Exact-detail cross-level coverage: every accepted Q has a row in Accepted Detail Coverage.
  • Relative links, selector targets, visual source/order checks: grill links use #q<N> heading anchors; every ARC/FLOW/STEP selector has an explicit <a id>.
  • Spec-code → architecture → grill coverage: complete for OUT-001..OUT-012 and AC-001..AC-019.
  • Mermaid parsing/rendering: all three diagrams rendered to SVG with @mermaid-js/mermaid-cli@11 (mmdc), 2026-10-16.
  • Existing spec agreement: cli/IP-273-design-phase-asset-evidence keeps durable asset and backlog rules that ARC-002 and FLOW-001-STEP-008 reuse; its prototype routing is superseded by FLOW-002.
  • Remaining limits: the non-material unknowns above.

On this page