@thebassclef/lite 1.1.0 → 1.2.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) hide show
  1. package/dist/cli.cjs +258 -63
  2. package/dist/cli.js +258 -63
  3. package/dist/index.cjs +1 -1
  4. package/dist/index.d.ts +1 -1
  5. package/dist/index.js +1 -1
  6. package/dist/lite/.claude/bassclef-configs.jsonc +56 -0
  7. package/dist/lite/.claude/bassclef-orientation.md +120 -0
  8. package/dist/lite/.claude/hooks/adr-discipline-check.sh +132 -0
  9. package/dist/lite/.claude/hooks/atomic-pr-check.sh +169 -0
  10. package/dist/lite/.claude/hooks/auto-save-idle.sh +51 -0
  11. package/dist/lite/.claude/hooks/bassclef-sync.sh +51 -13
  12. package/dist/lite/.claude/hooks/bet-doc-gate.sh +283 -0
  13. package/dist/lite/.claude/hooks/bug-diagnosis.sh +64 -0
  14. package/dist/lite/.claude/hooks/destructive-command-guard.sh +136 -0
  15. package/dist/lite/.claude/hooks/file-rename-discipline-check.sh +147 -0
  16. package/dist/lite/.claude/hooks/hook-classifier-canary.sh +158 -0
  17. package/dist/lite/.claude/hooks/kiss-default-check.sh +129 -0
  18. package/dist/lite/.claude/hooks/multi-tenancy-check.sh +83 -0
  19. package/dist/lite/.claude/hooks/oo-ad-entry-point-check.sh +216 -0
  20. package/dist/lite/.claude/hooks/operator-private-path-check.sh +203 -0
  21. package/dist/lite/.claude/hooks/pattern-annotation-validate.sh +142 -0
  22. package/dist/lite/.claude/hooks/plain-english-steering.sh +15 -1
  23. package/dist/lite/.claude/hooks/post-write-trace.sh +66 -0
  24. package/dist/lite/.claude/hooks/pr-body-scrub-check.sh +446 -0
  25. package/dist/lite/.claude/hooks/pre-commit-identifier-leak-scrub.sh +137 -0
  26. package/dist/lite/.claude/hooks/pre-gh-pr-body-scrub.sh +192 -0
  27. package/dist/lite/.claude/hooks/pre-gh-pr-title-scrub.sh +172 -0
  28. package/dist/lite/.claude/hooks/role-entry-gate.sh +115 -0
  29. package/dist/lite/.claude/hooks/save-state.sh +268 -0
  30. package/dist/lite/.claude/hooks/session-reflection.d/08-settings-drift.sh +8 -1
  31. package/dist/lite/.claude/hooks/session-reflection.d/10-abrupt-stop-recovery.sh +52 -0
  32. package/dist/lite/.claude/hooks/session-reflection.d/55-orientation-gate.sh +40 -4
  33. package/dist/lite/.claude/hooks/session-reflection.d/80-hook-heartbeat-check.sh +12 -5
  34. package/dist/lite/.claude/hooks/session-reflection.d/81-hook-manifest-staleness.sh +18 -2
  35. package/dist/lite/.claude/hooks/session-reflection.d/91-npm-version-drift.sh +54 -0
  36. package/dist/lite/.claude/hooks/session-reflection.d/tests/10-abrupt-stop-recovery.test.sh +95 -0
  37. package/dist/lite/.claude/hooks/session-reflection.sh +62 -15
  38. package/dist/lite/.claude/hooks/tool-failure-diagnosis.sh +50 -0
  39. package/dist/lite/.claude/luminaries/andrej-karpathy.md +165 -0
  40. package/dist/lite/.claude/luminaries/dave-gray.md +155 -0
  41. package/dist/lite/.claude/luminaries/gary-klein.md +166 -0
  42. package/dist/lite/.claude/luminaries/kaoru-ishikawa.md +162 -0
  43. package/dist/lite/.claude/luminaries/lean-product-canvas.md +33 -0
  44. package/dist/lite/.claude/luminaries/luke-wroblewski.md +224 -0
  45. package/dist/lite/.claude/luminaries/ryan-singer.md +113 -0
  46. package/dist/lite/.claude/luminaries/steve-krug.md +168 -0
  47. package/dist/lite/.claude/luminaries/tony-ulwick.md +134 -0
  48. package/dist/lite/.claude/rules/arc-level-orientation-before-leaf.md +60 -0
  49. package/dist/lite/.claude/rules/architect-review-discipline.md +71 -0
  50. package/dist/lite/.claude/rules/auto-fix-criteria.md +126 -0
  51. package/dist/lite/.claude/rules/bassclef-hook-drift-blocker.md +144 -0
  52. package/dist/lite/.claude/rules/bassclef-models-discovery.md +107 -0
  53. package/dist/lite/.claude/rules/bassclef-workflow-parity.md +104 -0
  54. package/dist/lite/.claude/rules/cost-governance.md +154 -0
  55. package/dist/lite/.claude/rules/file-rename-discipline.md +95 -0
  56. package/dist/lite/.claude/rules/mechanism-fidelity.md +88 -0
  57. package/dist/lite/.claude/rules/prototype-production-coupling.md +125 -0
  58. package/dist/lite/.claude/rules/quick-fix-criteria.md +90 -0
  59. package/dist/lite/.claude/rules/session-artifacts.md +30 -0
  60. package/dist/lite/.claude/rules/sibling-smoke-after-substrate-change.md +107 -0
  61. package/dist/lite/.claude/rules/substrate-as-system.md +67 -0
  62. package/dist/lite/.claude/rules/usability.md +22 -0
  63. package/dist/lite/.claude/settings.json +20 -0
  64. package/dist/lite/.claude/skills/agent-research-spawn/SKILL.md +100 -0
  65. package/dist/lite/.claude/skills/architect-review/SKILL.md +201 -0
  66. package/dist/lite/.claude/skills/auto-fix/SKILL.md +297 -0
  67. package/dist/lite/.claude/skills/autonomous/SKILL.md +300 -0
  68. package/dist/lite/.claude/skills/bind-subdomain/SKILL.md +232 -0
  69. package/dist/lite/.claude/skills/canvas/SKILL.md +41 -0
  70. package/dist/lite/.claude/skills/deploy-prod/SKILL.md +106 -0
  71. package/dist/lite/.claude/skills/docs-sync/SKILL.md +188 -0
  72. package/dist/lite/.claude/skills/eisenhower/SKILL.md +273 -0
  73. package/dist/lite/.claude/skills/empathy-map/SKILL.md +168 -0
  74. package/dist/lite/.claude/skills/frontend-design/SKILL.md +53 -0
  75. package/dist/lite/.claude/skills/interview-me/SKILL.md +171 -0
  76. package/dist/lite/.claude/skills/journal-export/SKILL.md +293 -0
  77. package/dist/lite/.claude/skills/jtbd-tasks/SKILL.md +203 -0
  78. package/dist/lite/.claude/skills/objectory-decompose/SKILL.md +256 -0
  79. package/dist/lite/.claude/skills/pick-luminaries/SKILL.md +100 -0
  80. package/dist/lite/.claude/skills/pre-mortem/SKILL.md +180 -0
  81. package/dist/lite/.claude/skills/prototype-gallery/SKILL.md +264 -0
  82. package/dist/lite/.claude/skills/provision-deploy-host/SKILL.md +257 -0
  83. package/dist/lite/.claude/skills/quick-fix/SKILL.md +273 -0
  84. package/dist/lite/.claude/skills/release/SKILL.md +311 -0
  85. package/dist/lite/.claude/skills/release-notes/SKILL.md +202 -0
  86. package/dist/lite/.claude/skills/rfc/SKILL.md +222 -0
  87. package/dist/lite/.claude/skills/riff-prototypes/SKILL.md +637 -0
  88. package/dist/lite/.claude/skills/secrets-bootstrap/SKILL.md +209 -0
  89. package/dist/lite/.claude/skills/skill/SKILL.md +304 -0
  90. package/dist/lite/.claude/skills/smoke-test/SKILL.md +100 -0
  91. package/dist/lite/.claude/skills/state/SKILL.md +204 -0
  92. package/dist/lite/.claude/skills/substrate-check/SKILL.md +218 -0
  93. package/dist/lite/.claude/skills/synthetic-user/SKILL.md +381 -0
  94. package/dist/lite/.claude/skills/task-scenarios/SKILL.md +105 -0
  95. package/dist/lite/.claude/skills/tier-dependency-audit/SKILL.md +139 -0
  96. package/dist/lite/.claude/skills/ux-migration/SKILL.md +424 -0
  97. package/dist/lite/.claude/skills/value-prop-canvas/SKILL.md +297 -0
  98. package/dist/lite/README.md +5 -1
  99. package/dist/lite/gitignore +6 -0
  100. package/dist/lite/lib/bassclef-dir-resolver.sh +85 -0
  101. package/dist/lite/lib/clone-failure-classifier.sh +59 -0
  102. package/dist/lite/lib/fixture-builder.sh +190 -0
  103. package/dist/lite/lib/fresh-install-check.sh +49 -0
  104. package/dist/lite/lib/hook-heartbeat.sh +0 -1
  105. package/dist/lite/lib/mechanism-fidelity.sh +569 -0
  106. package/dist/lite/lib/npm-version-check.sh +112 -0
  107. package/dist/lite/lib/preview-state.sh +229 -0
  108. package/dist/lite/lib/session-rescue.sh +0 -1
  109. package/dist/lite/scripts/generate-lite-manifest.sh +145 -4
  110. package/dist/lite/scripts/lite-manifest-drift-check.sh +5 -1
  111. package/dist/lite/standards/architect-review-discipline.md +222 -0
  112. package/dist/lite/standards/bassclef-platform.md +249 -0
  113. package/dist/lite/standards/bassclef-test-repos.md +97 -0
  114. package/dist/lite/standards/bassclef-wiring-manifest.json +25 -1
  115. package/dist/lite/standards/cold-adopter-harness.md +205 -0
  116. package/dist/lite/standards/data-management.md +135 -0
  117. package/dist/lite/standards/frontend-stack/nextjs-prisma.md +124 -0
  118. package/dist/lite/standards/lite-manifest-schema-changes.md +27 -0
  119. package/dist/lite/standards/lite-manifest.json +1456 -14
  120. package/dist/lite/standards/mechanism-fidelity.md +205 -0
  121. package/dist/lite/standards/operator-private-discipline.md +200 -0
  122. package/dist/lite/standards/operator-to-public-flow.md +195 -0
  123. package/dist/lite/standards/prototype-gallery.md +251 -0
  124. package/dist/lite/standards/pseudonym-key-schema.md +109 -0
  125. package/dist/lite/standards/sibling-validation-checklist.md +181 -0
  126. package/dist/lite/standards/slack-notifications.md +161 -0
  127. package/dist/lite/standards/synthetic-user-testing.md +173 -0
  128. package/dist/lite/standards/vendor-bindings.md +165 -0
  129. package/dist/lite/standards/vendor-plugins/frontend-design.md +66 -0
  130. package/dist/lite/standards/vpc-fit-validation.md +167 -0
  131. package/dist/lite/templates/gallery-yml.md +113 -0
  132. package/dist/lite/templates/product-canvas.md +169 -0
  133. package/dist/lite/templates/value-prop-canvas.md +180 -0
  134. package/package.json +12 -5
  135. /package/dist/lite/{whereami.md → docs/whereami.md} +0 -0
@@ -0,0 +1,424 @@
1
+ ---
2
+ tier: lite
3
+ name: ux-migration
4
+ description: "Compare existing UX to a target treatment, then plan the migration \u2014 branching strategy, feature flags, cutover checklist. Run after /riff-prototypes picks a direction."
5
+ problem: "New UX treatments land alongside old ones. Migration strategy gets improvised per screen."
6
+ value: "Compares existing UX to a target treatment. Plans the migration \u2014 branches and feature flags."
7
+ inputs: [Current UX ref, Target treatment ref]
8
+ outputs: [Migration plan with phases, Feature flag strategy, Branching sequence]
9
+ user_invocable: true
10
+ disable_model_invocation: false
11
+ ---
12
+
13
+ # UX Migration
14
+
15
+ Plan the migration from an existing UI treatment to a new one. Produces a
16
+ gap analysis, file-level migration plan, branching strategy, and cutover
17
+ checklist — all designed for dual-running so the existing app is never
18
+ disrupted.
19
+
20
+ ## When to run
21
+
22
+ After `/riff-prototypes` selects a winning variant and before Construction
23
+ begins on the redesign. This skill bridges "we picked a direction" to
24
+ "here's exactly how to get there."
25
+
26
+ ## When this skill fires (and when it doesn't)
27
+
28
+ This skill is a **MUST gate for redesigns** — when a prototype exists AND
29
+ there's an existing UI to migrate FROM. Skipping this is how overnight
30
+ builds produce correct structure with the wrong visual language.
31
+
32
+ **Skip for greenfield.** If there's no existing UI (new app, new pages
33
+ with no predecessor), the prototype IS the spec. The Builder builds
34
+ directly from prototype + design tokens. No migration needed because
35
+ there's nothing to migrate from.
36
+
37
+ | Scenario | Prototype? | Existing UI? | /ux-migration? |
38
+ |---|---|---|---|
39
+ | Redesign existing pages | Yes | Yes | **MUST** — component-level diff |
40
+ | Greenfield build | Yes | No | **Skip** — prototype is the spec |
41
+ | Incremental feature | No | Yes | **Skip** — no visual direction change |
42
+ | Greenfield, no prototype | No | No | **Skip** — use tokens + luminaries |
43
+
44
+ ## Prerequisites
45
+
46
+ - A selected prototype variant (from `/riff-prototypes` or operator decision)
47
+ - Access to the existing codebase (running app or file system)
48
+ - Design tokens / creative brief from Creative Director. When tokens are
49
+ not yet authored, BLOCK and surface a `/promote` candidate for the
50
+ missing token surface; do not proceed with ad-hoc visual choices.
51
+ - Playwright MCP: screenshot BOTH the current state AND the prototype for
52
+ side-by-side comparison in the gap analysis. When Playwright MCP is not
53
+ available, BLOCK with `INSTEAD: enable Playwright MCP before continuing` —
54
+ do not proceed without visual baseline.
55
+
56
+ ## Procedure
57
+
58
+ ### Step 0: Read the sources end-to-end (MANDATORY gate)
59
+
60
+ Before producing any inventory, gap analysis, or target state, read
61
+ every existing surface file end-to-end. Not skim — read. Record:
62
+
63
+ ```
64
+ ## Sources read (ux-migration)
65
+
66
+ - src/app/[route]/page.tsx (L1-L[end]) — what's there
67
+ - src/components/[Component].tsx (L1-L[end]) — what's there
68
+ - design/design-tokens.css (L1-L[end])
69
+ - docs/prototypes/[selected]/index.html (L1-L[end]) — target reference
70
+
71
+ ## Sources deliberately NOT reading (with reason)
72
+ - [path] — [reason: e.g. out of scope for this migration]
73
+ ```
74
+
75
+ This gate prevents "pattern-matched on generic [X]" failures. The
76
+ migration plan is a derivative of specific files; the specific files
77
+ must be in context before the derivative is produced.
78
+
79
+ See `.claude/rules/artifact-ingestion.md` — this is the skill-level
80
+ instantiation of that rule for UX migrations.
81
+
82
+ ### Step 1: Inventory the Current State
83
+
84
+ Map every UI surface that will change:
85
+
86
+ ```markdown
87
+ ## Current State Inventory
88
+
89
+ | Surface | Route/Path | Key Components | Data Dependencies | Screenshot |
90
+ |---------|-----------|----------------|-------------------|------------|
91
+ | Deal list | /deals | DealTable, StatusBadge, Filters | deals API, filters | [link] |
92
+ | Deal detail | /deals/[id] | DealHeader, Timeline, Scores | deal API, scores | [link] |
93
+ ```
94
+
95
+ For each surface:
96
+ 1. List the route/path
97
+ 2. List key components (grep for exports in the file tree)
98
+ 3. List data dependencies (API calls, queries, state)
99
+ 4. Screenshot current state via Playwright MCP. When Playwright MCP is not enabled, BLOCK and surface `INSTEAD: enable Playwright MCP before continuing`.
100
+
101
+ ### Step 1b: Capabilities Inventory (what must survive)
102
+
103
+ Before designing the new treatment, inventory what the old pages DO —
104
+ not just how they look. This is the step that prevents "spec described
105
+ what to build, not what must survive."
106
+
107
+ For each surface in the current state inventory, list every functional
108
+ capability:
109
+
110
+ ```markdown
111
+ ## Capabilities Inventory
112
+
113
+ | Surface | Capability | Implementation | Must survive? | Notes |
114
+ |---------|-----------|----------------|---------------|-------|
115
+ | Pipeline | Text search filters results | SearchInput + query param | YES | Core workflow |
116
+ | Pipeline | Sort by column header | Sortable table headers | YES | Power user essential |
117
+ | Pipeline | Track filter (1031/Operating) | Filter dropdown | YES | Domain-specific |
118
+ | Pipeline | Pagination | Page buttons | YES | >100 deals |
119
+ | Pipeline | Deal row links to detail | Row click handler | YES | Navigation |
120
+ | Shortlist | Search contacts | SearchInput | YES | |
121
+ | Shortlist | Sortable columns | Table headers | YES | |
122
+ | Deal detail | Score breakdown visible | ScoreBadge components | YES | Key decision data |
123
+ | Deal detail | Financial data formatted | FinancialGrid | YES | |
124
+ ```
125
+
126
+ **How to build this list**:
127
+ 1. Open each existing page
128
+ 2. Interact with every control: click headers, type in search, use
129
+ filters, click links, expand sections
130
+ 3. Record what happens — each interaction that produces a result is a capability
131
+ 4. Mark whether it must survive the migration (almost always YES unless
132
+ the capability is being intentionally removed with documented rationale)
133
+
134
+ **This table becomes the Tier 2 test plan** for `/synthetic-user` testing
135
+ after the migration. Every capability marked "must survive" gets a
136
+ feature parity test.
137
+
138
+ **If a capability is intentionally removed**, document WHY in the Notes
139
+ column. Undocumented removals are bugs, not decisions.
140
+
141
+ ### Step 2: Inventory the Target State
142
+
143
+ Map the same surfaces in the target treatment:
144
+
145
+ ```markdown
146
+ ## Target State (from selected variant)
147
+
148
+ | Surface | Changes | New Components | New Data Needs | Design Reference |
149
+ |---------|---------|----------------|----------------|-----------------|
150
+ | Deal list | Card layout, new filters | DealCard, QuickActions | + scoring API | prototype-variant-2 |
151
+ | Deal detail | Redesigned header, tabs | TabNav, ScoreRadar | + enrichment API | prototype-variant-2 |
152
+ ```
153
+
154
+ ### Step 3: Gap Analysis
155
+
156
+ For each surface, produce a detailed gap:
157
+
158
+ ```markdown
159
+ ## Gap Analysis
160
+
161
+ ### [Surface Name]
162
+
163
+ **Layout changes**: [grid → cards, sidebar → tabs, etc.]
164
+ **Component-level visual diff** (REQUIRED — this is where builds fail):
165
+ For EACH component on this surface, state what changes visually:
166
+
167
+ | Component | Current | Target | Action |
168
+ |-----------|---------|--------|--------|
169
+ | ScoreBadge | Green circle, "73 OVERALL" | Plain number, no badge | REWRITE |
170
+ | ScoreBreakdown | Colored pills (Price 86...) | Horizontal bars + numeric | REWRITE |
171
+ | Financials | Spread label-above-value | Dense grid, 2-3 lines | MODIFY |
172
+ | NavSidebar | Nav links only | Nav + "THIS DEAL" anchors + "RELATED" links | MODIFY |
173
+
174
+ Every visual element must appear in this table. If a component is
175
+ unchanged, mark it KEEP. If the prototype shows something the current
176
+ build doesn't have, mark it CREATE. This table becomes the Builder's
177
+ checklist — if it's not in the table, it won't get built.
178
+
179
+ **Component changes (structural)**:
180
+ - KEEP: [components unchanged]
181
+ - MODIFY: [components that need visual/structural updates per table above]
182
+ - CREATE: [new components needed]
183
+ - REMOVE: [components no longer used]
184
+ **Data changes**:
185
+ - New API calls: [list]
186
+ - Modified queries: [list]
187
+ - New state: [list]
188
+ **Token changes**:
189
+ - Colors: [specific token changes]
190
+ - Typography: [specific token changes]
191
+ - Spacing: [specific token changes]
192
+ **Responsive breakpoints** (REQUIRED):
193
+ For each surface, specify behavior at each breakpoint:
194
+
195
+ | Breakpoint | Layout change |
196
+ |---|---|
197
+ | ≥1024px (desktop) | Full sidebar + content area |
198
+ | 768-1023px (tablet) | [sidebar collapses? content reflows?] |
199
+ | <768px (mobile) | [sidebar becomes hamburger/sheet? tables become cards? grids stack?] |
200
+
201
+ If the prototype doesn't specify mobile behavior, the migration spec
202
+ MUST define it before construction. "Same as desktop but smaller" is
203
+ not a responsive strategy — a 220px sidebar on a 375px phone is broken.
204
+
205
+ **Risk**: [LOW/MEDIUM/HIGH — based on blast radius and shared component impact]
206
+ ```
207
+
208
+ ### Step 3b: Design Token Extraction
209
+
210
+ Extract concrete values from the prototype HTML into a token reference.
211
+ The prototype uses inline Tailwind classes — those values must be explicit
212
+ so the Builder applies consistent values, not guesses from reading HTML.
213
+
214
+ ```markdown
215
+ ## Design Tokens (extracted from prototype)
216
+
217
+ ### Typography
218
+ - Base font size: 13px
219
+ - Numbers: monospace (font-mono)
220
+ - Section headers: uppercase, 10px, tracking-wide, text-muted
221
+ - Page title: text-xl, font-semibold
222
+
223
+ ### Layout
224
+ - Sidebar: fixed 220px, border-r
225
+ - Content: ml-[220px], max-w-5xl
226
+ - Page padding: px-6 py-4
227
+
228
+ ### Chrome
229
+ - Borders: border (1px solid), no rounded corners on data elements
230
+ - Badges: none — plain text with color only
231
+ - Separators: thin horizontal rules (border-t)
232
+ - Shadows: none on content, subtle on sidebar only
233
+
234
+ ### Colors
235
+ - Score high (7+): text-emerald-600
236
+ - Score mid (5-6): text-amber-600
237
+ - Score low (<5): text-red-600
238
+ - Muted labels: text-muted-foreground
239
+ - Links: text-primary, no underline until hover
240
+ ```
241
+
242
+ ### Step 3c: Prototype → React Component Mapping
243
+
244
+ Map each visual element in the prototype HTML to the React component
245
+ it should become. The prototype is static HTML + Tailwind. The build
246
+ is React + shadcn. This table prevents the Builder from guessing.
247
+
248
+ ```markdown
249
+ ## Component Mapping
250
+
251
+ | Prototype element | React component | shadcn base | Action |
252
+ |---|---|---|---|
253
+ | `<table class="w-full">` | PipelineTable | shadcn Table | CREATE using shadcn |
254
+ | `<nav class="w-[220px]">` | SidebarNav | shadcn Sidebar | CREATE using shadcn |
255
+ | `<div class="score">78</div>` | ScoreDisplay | — (too simple) | CREATE custom |
256
+ | Score bar `<div class="h-2 bg-emerald">` | ScoreBar | — | CREATE custom |
257
+ | `<div class="grid grid-cols-3">` financials | FinancialGrid | — | MODIFY existing CompactFinancials |
258
+ | Sidebar "THIS DEAL" anchors | DealSidebarNav | — | CREATE custom |
259
+ | Sidebar "RELATED" links | RelatedLinks | — | CREATE custom |
260
+ ```
261
+
262
+ ### Step 4: Migration Plan
263
+
264
+ Order the work into atomic work packages, respecting dependencies.
265
+ The first work package MUST be foundation (utilities, tokens, shadcn init)
266
+ before any page work starts:
267
+
268
+ ```markdown
269
+ ## Migration Plan
270
+
271
+ ### Phase 1: Foundation (no user-visible changes)
272
+ - Branch: feature/ISSUE-NNN-stack-1-design-tokens
273
+ - Update/add design tokens for new treatment
274
+ - Feature flag: `NEW_TREATMENT_ENABLED` (default: false)
275
+ - Risk: LOW — tokens are additive, no existing code changes
276
+
277
+ ### Phase 2: New Components (behind feature flag)
278
+ - Branch: feature/ISSUE-NNN-stack-2-new-components
279
+ - Create new components: [list]
280
+ - All gated behind feature flag
281
+ - Risk: LOW — new files only, nothing existing changes
282
+
283
+ ### Phase 3: Dual Routes (parallel running)
284
+ - Branch: feature/ISSUE-NNN-stack-3-dual-routes
285
+ - Add parallel routes: /deals-v2, /deals/[id]-v2 (or flag-gated within existing routes)
286
+ - Wire new components to data
287
+ - Risk: MEDIUM — new routes, but existing routes untouched
288
+
289
+ ### Phase 4: Cutover Preparation
290
+ - Branch: feature/ISSUE-NNN-stack-4-cutover
291
+ - Flag flips: new treatment becomes default
292
+ - Old treatment accessible via flag override
293
+ - Risk: MEDIUM — user-facing change, but reversible
294
+
295
+ ### Phase 5: Cleanup (after bake period)
296
+ - Branch: feature/ISSUE-NNN-stack-5-cleanup
297
+ - Remove old components, old routes, feature flag
298
+ - Risk: LOW — removing dead code after verification
299
+ ```
300
+
301
+ ### Step 5: Branching Strategy
302
+
303
+ Produce a branch stack manifest per `standards/branch-stacking.md`:
304
+
305
+ ```markdown
306
+ ## Branch Stack Manifest
307
+
308
+ stack_id: ux-migration-[surface]
309
+ created: [date]
310
+ issue: #[NNN]
311
+ parallel_safe: [list which branches can run in parallel]
312
+
313
+ | # | Branch | Depends On | Touches | Parallel-Safe |
314
+ |---|--------|-----------|---------|---------------|
315
+ | 1 | stack-1-design-tokens | — | tokens/ | Yes |
316
+ | 2 | stack-2-new-components | 1 | components/ | Yes (with 1 merged) |
317
+ | 3 | stack-3-dual-routes | 2 | app/, components/ | No |
318
+ | 4 | stack-4-cutover | 3 | app/, config/ | No |
319
+ | 5 | stack-5-cleanup | 4 + bake period | all changed files | No |
320
+ ```
321
+
322
+ ### Step 6: Dual-Running Architecture
323
+
324
+ Reference ADR-012 (dual-running pattern) and specify:
325
+
326
+ ```markdown
327
+ ## Dual-Running Plan
328
+
329
+ **Flag name**: `NEW_[SURFACE]_TREATMENT`
330
+ **Flag mechanism**: [env var / database / config file]
331
+ **Rollout plan**:
332
+ 1. Operator only (internal testing)
333
+ 2. Specific roles (e.g., ADMIN, OPERATOR)
334
+ 3. All users (full rollout)
335
+ 4. Remove flag (cleanup phase)
336
+
337
+ **Verification at each stage**:
338
+ - Run /visual-review on new treatment
339
+ - Run /smoke-test on both treatments
340
+ - Check analytics: error rates, engagement, performance
341
+
342
+ **Rollback procedure**:
343
+ - Flip flag back to false
344
+ - No code deployment needed
345
+ - Old treatment resumes immediately
346
+
347
+ **Bake period**: [recommended duration before cleanup — typically 1-2 weeks]
348
+ ```
349
+
350
+ ### Step 7: Output the Migration Spec
351
+
352
+ Write the complete migration spec to `docs/specs/ux-migration-[surface].md`:
353
+
354
+ ```markdown
355
+ # UX Migration Spec: [Surface]
356
+
357
+ ## Summary
358
+ [1-2 sentences: what's changing and why]
359
+
360
+ ## Current → Target
361
+ [Side-by-side summary]
362
+
363
+ ## Gap Analysis
364
+ [From Step 3]
365
+
366
+ ## Migration Plan
367
+ [From Step 4]
368
+
369
+ ## Branch Stack
370
+ [From Step 5]
371
+
372
+ ## Dual-Running
373
+ [From Step 6]
374
+
375
+ ## Acceptance Criteria
376
+ - [ ] New treatment matches selected prototype variant
377
+ - [ ] /visual-review passes on new treatment
378
+ - [ ] Feature parity: all capabilities from Step 1b inventory verified (100%)
379
+ - [ ] /synthetic-user Tier 2 passes on new treatment
380
+ - [ ] Old treatment unchanged when flag is off
381
+ - [ ] Rollback works within [X] seconds
382
+ - [ ] /smoke-test passes on both treatments
383
+ - [ ] Performance: new treatment ≤ 10% slower than old
384
+ ```
385
+
386
+ ### Step 8: Visual Pass Complete Gate
387
+
388
+ After ALL work packages are implemented, run a final verification:
389
+
390
+ ```markdown
391
+ ## Visual Pass Complete — Prototype vs. Build
392
+
393
+ | Page | Prototype screenshot | Build screenshot | Match? | Gaps |
394
+ |------|---------------------|-----------------|--------|------|
395
+ | Overview | [link] | [link] | ✅/❌ | [what's different] |
396
+ | Pipeline | [link] | [link] | ✅/❌ | |
397
+ | Deal detail | [link] | [link] | ✅/❌ | |
398
+ | ... | | | | |
399
+
400
+ ### Verdict: PASS / FAIL
401
+ - PASS: all pages match prototype direction (exact pixels not required,
402
+ fundamental choices must match — tables vs. cards, sidebar vs. top nav,
403
+ dense vs. spacious, chrome vs. minimal)
404
+ - FAIL: list remaining gaps → file as issues or fix in current session
405
+ ```
406
+
407
+ To run this gate:
408
+ 1. Serve the prototype: `npx serve docs/prototypes/variant-N/ -l 3001`
409
+ 2. Serve the build: `npm run dev` (port 3000)
410
+ 3. Screenshot both via Playwright MCP
411
+ 4. Compare side-by-side per page
412
+ 5. Produce the pass/fail matrix above
413
+
414
+ This is the final checkpoint before the branch is ready for review.
415
+
416
+ ## What this skill does NOT do
417
+
418
+ - Design the new treatment (that's `/riff-prototypes` + Creative Director)
419
+ - Implement the migration (that's the Builder against this spec)
420
+ - Decide which variant wins (that's the operator)
421
+
422
+ ## Output discipline
423
+
424
+ Dispatch `/kiss words --rewrite` on your skill output before you return it. See `standards/skill-output-discipline.md` for the contract.