@arbor-education/design-system.components 0.9.0 β†’ 0.11.0

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 (168) hide show
  1. package/.claude/agent-memory/blanche-designspert/MEMORY.md +64 -0
  2. package/.claude/agent-memory/blanche-designspert/token-review-patterns.md +29 -0
  3. package/.claude/agent-memory/dorothy-fact-checker/MEMORY.md +129 -0
  4. package/.claude/agent-memory/rose-storybookspert/MEMORY.md +29 -0
  5. package/.claude/agent-memory/rose-storybookspert/patterns.md +132 -0
  6. package/.claude/agent-memory/sophia-componentspert/MEMORY.md +14 -0
  7. package/.claude/agent-memory/sophia-componentspert/components.md +367 -0
  8. package/.claude/agents/blanche-designspert.md +150 -0
  9. package/.claude/agents/dorothy-fact-checker.md +145 -0
  10. package/.claude/agents/rose-storybookspert.md +148 -0
  11. package/.claude/agents/sophia-componentspert.md +133 -0
  12. package/.claude/component-library.md +1107 -0
  13. package/.claude/design-assessment-daily-attendance-2026-04-10.md +566 -0
  14. package/.claude/figma-assessment-7154-58899.md +404 -0
  15. package/.claude/figma-assessment-UKQfcxnT4rlHHNuiumt4o1-11086-97537.md +392 -0
  16. package/.claude/figma-assessment-UKQfcxnT4rlHHNuiumt4o1-551-41974.md +474 -0
  17. package/.claude/figma-assessment-UKQfcxnT4rlHHNuiumt4o1-551-43094.md +462 -0
  18. package/.claude/figma-assessment-fcFK4CGzkz2fVyY3koX8ZE-7154-59061.md +440 -0
  19. package/.claude/migration-report-custom-report-writer-2026-02-19.md +591 -0
  20. package/.claude/skills/analyze-design/README.md +295 -0
  21. package/.claude/skills/analyze-design/SKILL.md +741 -0
  22. package/.claude/skills/create-page/README.md +246 -0
  23. package/.claude/skills/create-page/SKILL.md +634 -0
  24. package/.claude/skills/create-page/design-analysis-template.md +333 -0
  25. package/.claude/skills/create-page/page-template.scss +118 -0
  26. package/.claude/skills/create-page/page-template.tsx +230 -0
  27. package/.claude/skills/map-legacy/README.md +87 -0
  28. package/.claude/skills/map-legacy/SKILL.md +465 -0
  29. package/.claude/skills/migrate-page/README.md +125 -0
  30. package/.claude/skills/migrate-page/SKILL.md +374 -0
  31. package/.github/CODEOWNERS +1 -0
  32. package/.github/pull_request_template.md +39 -0
  33. package/.github/workflows/release.yml +1 -1
  34. package/CHANGELOG.md +16 -0
  35. package/CLAUDE.md +31 -0
  36. package/CONTRIBUTING.md +191 -0
  37. package/README.md +110 -20
  38. package/dist/components/button/Button.d.ts.map +1 -1
  39. package/dist/components/button/Button.js +2 -2
  40. package/dist/components/button/Button.js.map +1 -1
  41. package/dist/components/combobox/Combobox.d.ts.map +1 -1
  42. package/dist/components/combobox/Combobox.js +2 -1
  43. package/dist/components/combobox/Combobox.js.map +1 -1
  44. package/dist/components/combobox/Combobox.test.js +98 -61
  45. package/dist/components/combobox/Combobox.test.js.map +1 -1
  46. package/dist/components/combobox/useComboboxPopoverBehavior.d.ts +3 -1
  47. package/dist/components/combobox/useComboboxPopoverBehavior.d.ts.map +1 -1
  48. package/dist/components/combobox/useComboboxPopoverBehavior.js +7 -6
  49. package/dist/components/combobox/useComboboxPopoverBehavior.js.map +1 -1
  50. package/dist/components/combobox/useComboboxState.d.ts.map +1 -1
  51. package/dist/components/combobox/useComboboxState.js +4 -1
  52. package/dist/components/combobox/useComboboxState.js.map +1 -1
  53. package/dist/components/datePicker/DatePicker.d.ts +4 -1
  54. package/dist/components/datePicker/DatePicker.d.ts.map +1 -1
  55. package/dist/components/datePicker/DatePicker.js +77 -37
  56. package/dist/components/datePicker/DatePicker.js.map +1 -1
  57. package/dist/components/datePicker/DatePicker.stories.d.ts +28 -3
  58. package/dist/components/datePicker/DatePicker.stories.d.ts.map +1 -1
  59. package/dist/components/datePicker/DatePicker.stories.js +62 -9
  60. package/dist/components/datePicker/DatePicker.stories.js.map +1 -1
  61. package/dist/components/datePicker/DatePicker.test.js +133 -66
  62. package/dist/components/datePicker/DatePicker.test.js.map +1 -1
  63. package/dist/components/datePicker/DatePickerCalendarHeader.d.ts +8 -0
  64. package/dist/components/datePicker/DatePickerCalendarHeader.d.ts.map +1 -0
  65. package/dist/components/datePicker/DatePickerCalendarHeader.js +36 -0
  66. package/dist/components/datePicker/DatePickerCalendarHeader.js.map +1 -0
  67. package/dist/components/datePicker/dateInputUtils.d.ts +25 -0
  68. package/dist/components/datePicker/dateInputUtils.d.ts.map +1 -0
  69. package/dist/components/datePicker/dateInputUtils.js +60 -0
  70. package/dist/components/datePicker/dateInputUtils.js.map +1 -0
  71. package/dist/components/datePicker/datePickerTestUtils.test-helpers.d.ts +2 -0
  72. package/dist/components/datePicker/datePickerTestUtils.test-helpers.d.ts.map +1 -0
  73. package/dist/components/datePicker/datePickerTestUtils.test-helpers.js +4 -0
  74. package/dist/components/datePicker/datePickerTestUtils.test-helpers.js.map +1 -0
  75. package/dist/components/dateTimePicker/DateTimePicker.d.ts +22 -0
  76. package/dist/components/dateTimePicker/DateTimePicker.d.ts.map +1 -0
  77. package/dist/components/dateTimePicker/DateTimePicker.js +132 -0
  78. package/dist/components/dateTimePicker/DateTimePicker.js.map +1 -0
  79. package/dist/components/dateTimePicker/DateTimePicker.stories.d.ts +77 -0
  80. package/dist/components/dateTimePicker/DateTimePicker.stories.d.ts.map +1 -0
  81. package/dist/components/dateTimePicker/DateTimePicker.stories.js +163 -0
  82. package/dist/components/dateTimePicker/DateTimePicker.stories.js.map +1 -0
  83. package/dist/components/dateTimePicker/DateTimePicker.test.d.ts +2 -0
  84. package/dist/components/dateTimePicker/DateTimePicker.test.d.ts.map +1 -0
  85. package/dist/components/dateTimePicker/DateTimePicker.test.js +235 -0
  86. package/dist/components/dateTimePicker/DateTimePicker.test.js.map +1 -0
  87. package/dist/components/formField/FormField.test.d.ts.map +1 -1
  88. package/dist/components/formField/FormField.test.js +5 -5
  89. package/dist/components/formField/FormField.test.js.map +1 -1
  90. package/dist/components/formField/inputs/selectDropdown/SelectDropdown.d.ts +1 -0
  91. package/dist/components/formField/inputs/selectDropdown/SelectDropdown.d.ts.map +1 -1
  92. package/dist/components/formField/inputs/selectDropdown/SelectDropdown.js +7 -3
  93. package/dist/components/formField/inputs/selectDropdown/SelectDropdown.js.map +1 -1
  94. package/dist/components/formField/inputs/selectDropdown/SelectDropdown.test.js +12 -0
  95. package/dist/components/formField/inputs/selectDropdown/SelectDropdown.test.js.map +1 -1
  96. package/dist/components/formField/inputs/text/TextInput.d.ts +4 -1
  97. package/dist/components/formField/inputs/text/TextInput.d.ts.map +1 -1
  98. package/dist/components/formField/inputs/text/TextInput.js +5 -4
  99. package/dist/components/formField/inputs/text/TextInput.js.map +1 -1
  100. package/dist/components/formField/inputs/text/TextInput.stories.d.ts +4 -1
  101. package/dist/components/formField/inputs/text/TextInput.stories.d.ts.map +1 -1
  102. package/dist/components/table/DSDefaultColDef.js +2 -2
  103. package/dist/components/table/DSDefaultColDef.js.map +1 -1
  104. package/dist/components/table/Table.d.ts.map +1 -1
  105. package/dist/components/table/Table.js +4 -0
  106. package/dist/components/table/Table.js.map +1 -1
  107. package/dist/components/table/Table.stories.d.ts +2 -0
  108. package/dist/components/table/Table.stories.d.ts.map +1 -1
  109. package/dist/components/table/Table.stories.js +132 -3
  110. package/dist/components/table/Table.stories.js.map +1 -1
  111. package/dist/components/table/Table.test.js +106 -5
  112. package/dist/components/table/Table.test.js.map +1 -1
  113. package/dist/components/table/cellRenderers/BooleanCellRenderer.d.ts +3 -0
  114. package/dist/components/table/cellRenderers/BooleanCellRenderer.d.ts.map +1 -0
  115. package/dist/components/table/cellRenderers/BooleanCellRenderer.js +15 -0
  116. package/dist/components/table/cellRenderers/BooleanCellRenderer.js.map +1 -0
  117. package/dist/components/table/cellRenderers/BooleanCellRenderer.test.d.ts +2 -0
  118. package/dist/components/table/cellRenderers/BooleanCellRenderer.test.d.ts.map +1 -0
  119. package/dist/components/table/cellRenderers/BooleanCellRenderer.test.js +31 -0
  120. package/dist/components/table/cellRenderers/BooleanCellRenderer.test.js.map +1 -0
  121. package/dist/components/table/cellRenderers/CheckboxCellRenderer.d.ts +3 -0
  122. package/dist/components/table/cellRenderers/CheckboxCellRenderer.d.ts.map +1 -0
  123. package/dist/components/table/cellRenderers/CheckboxCellRenderer.js +12 -0
  124. package/dist/components/table/cellRenderers/CheckboxCellRenderer.js.map +1 -0
  125. package/dist/components/table/cellRenderers/CheckboxCellRenderer.test.d.ts +2 -0
  126. package/dist/components/table/cellRenderers/CheckboxCellRenderer.test.d.ts.map +1 -0
  127. package/dist/components/table/cellRenderers/CheckboxCellRenderer.test.js +65 -0
  128. package/dist/components/table/cellRenderers/CheckboxCellRenderer.test.js.map +1 -0
  129. package/dist/index.css +259 -4
  130. package/dist/index.css.map +1 -1
  131. package/dist/index.d.ts +4 -0
  132. package/dist/index.d.ts.map +1 -1
  133. package/dist/index.js +3 -0
  134. package/dist/index.js.map +1 -1
  135. package/package.json +1 -1
  136. package/src/components/button/Button.tsx +2 -1
  137. package/src/components/combobox/Combobox.test.tsx +104 -61
  138. package/src/components/combobox/Combobox.tsx +3 -1
  139. package/src/components/combobox/useComboboxPopoverBehavior.ts +10 -5
  140. package/src/components/combobox/useComboboxState.ts +4 -1
  141. package/src/components/datePicker/DatePicker.stories.tsx +67 -9
  142. package/src/components/datePicker/DatePicker.test.tsx +157 -72
  143. package/src/components/datePicker/DatePicker.tsx +163 -69
  144. package/src/components/datePicker/DatePickerCalendarHeader.tsx +82 -0
  145. package/src/components/datePicker/date-field-hint.scss +152 -0
  146. package/src/components/datePicker/dateInputUtils.ts +117 -0
  147. package/src/components/datePicker/datePicker.scss +53 -29
  148. package/src/components/datePicker/datePickerTestUtils.test-helpers.ts +6 -0
  149. package/src/components/dateTimePicker/DateTimePicker.stories.tsx +202 -0
  150. package/src/components/dateTimePicker/DateTimePicker.test.tsx +295 -0
  151. package/src/components/dateTimePicker/DateTimePicker.tsx +293 -0
  152. package/src/components/dateTimePicker/dateTimePicker.scss +17 -0
  153. package/src/components/formField/FormField.test.tsx +5 -5
  154. package/src/components/formField/inputs/selectDropdown/SelectDropdown.test.tsx +28 -0
  155. package/src/components/formField/inputs/selectDropdown/SelectDropdown.tsx +8 -2
  156. package/src/components/formField/inputs/text/TextInput.tsx +6 -3
  157. package/src/components/table/DSDefaultColDef.ts +2 -2
  158. package/src/components/table/Table.stories.tsx +147 -3
  159. package/src/components/table/Table.test.tsx +131 -5
  160. package/src/components/table/Table.tsx +4 -0
  161. package/src/components/table/cellRenderers/BooleanCellRenderer.test.tsx +37 -0
  162. package/src/components/table/cellRenderers/BooleanCellRenderer.tsx +34 -0
  163. package/src/components/table/cellRenderers/CheckboxCellRenderer.test.tsx +74 -0
  164. package/src/components/table/cellRenderers/CheckboxCellRenderer.tsx +28 -0
  165. package/src/components/table/cellRenderers/booleanCellRenderer.scss +7 -0
  166. package/src/components/table/table.scss +1 -1
  167. package/src/index.scss +2 -0
  168. package/src/index.ts +4 -0
@@ -0,0 +1,634 @@
1
+ ---
2
+ name: create-page
3
+ description: Generate React pages from Figma designs by composing existing design system components. Converts Figma layouts into production-ready pages using Arbor components.
4
+ ---
5
+
6
+ # Create Page from Figma Design
7
+
8
+ AROOOOO HUNNI!! 🐺 Time to turn that BOMBASS Figma page design into a MOST EXCELLENT React page using our existing components!! xxx
9
+
10
+ ## Goal
11
+
12
+ Generate a **PAGE** (not a new component!) that **COMPOSES EXISTING** Arbor design system components to match a Figma layout.
13
+
14
+ **CRITICAL**:
15
+ - ❌ DO NOT create new reusable components
16
+ - βœ… DO USE existing components from `src/components/`
17
+ - βœ… DO compose them into a page layout
18
+ - βœ… DO match the Figma design's layout and styling
19
+
20
+ ## The Golden Girls Team - MANDATORY COLLABORATORS
21
+
22
+ This skill works with our BOMBASS team of expert agents. Calling them is **NOT OPTIONAL** - it is a **REQUIRED** part of this skill. You MUST use the `Task` tool to call each girl at the designated step. Skipping any of them is a MOST HEINOUS failure of the process!
23
+
24
+ - πŸ” **Dorothy Fact-Checker** + πŸ‘œ **Sophia Componentspert** - MANDATORY at Step 1 via `/analyze-design` skill. Assess feasibility and verify component capabilities BEFORE building.
25
+ - πŸ‘œ **Sophia Componentspert** (`sophia-componentspert`) - OPTIONAL at Step 3A and 4A. Only call if you need clarification beyond the assessment.
26
+ - πŸ’„ **Blanche Designspert** (`blanche-designspert`) - MANDATORY at Step 6A. Design token and styling expert.
27
+ - 🌹 **Rose Storybookspert** (`rose-storybookspert`) - MANDATORY at Step 8A. Storybook documentation expert.
28
+ - πŸ” **Dorothy Fact-Checker** (`dorothy-fact-checker`) - MANDATORY at Step 10A. Final quality assurance.
29
+
30
+ **RULE**: You MUST use the `Task` tool to call each agent at their designated step. Do NOT just mention them in passing - ACTUALLY CALL THEM. If you skip calling any agent, you have failed this skill. AROOOOO!! 🐺πŸ’ͺ
31
+
32
+ ## Input
33
+
34
+ Figma URL provided: `$ARGUMENTS`
35
+
36
+ ## Process
37
+
38
+ ### ⚑ MANDATORY STEP 1 - RUN ANALYZE-DESIGN SKILL FIRST ⚑
39
+
40
+ **BEFORE doing ANYTHING else, you MUST run the `/analyze-design` skill on this Figma URL!**
41
+
42
+ ```
43
+ Use Skill tool: skill="analyze-design", args="[Figma URL]"
44
+ ```
45
+
46
+ **WHY THIS IS CRITICAL:**
47
+ - Sophia and Dorothy will assess what components exist and what's feasible
48
+ - You'll get a detailed report documenting which components to use for each UI element
49
+ - You'll know what components need modifications or are missing BEFORE you start building
50
+ - This prevents wasted effort building with wrong components or hallucinated props
51
+
52
+ **WAIT for the analyze-design skill to complete.** It will generate a markdown report at `.claude/figma-assessment-{fileKey}-{nodeId}.md`.
53
+
54
+ **After analyze-design completes:**
55
+ 1. Read the assessment report it generated
56
+ 2. Note which components are ready to use
57
+ 3. Note which components need modifications
58
+ 4. Note which UI elements need new components
59
+ 5. Use this assessment as your GUIDE throughout the page building process
60
+
61
+ **Then proceed to Step 2 below.**
62
+
63
+ ---
64
+
65
+ ### 2. Review the Feasibility Assessment
66
+
67
+ **Read the assessment report** that analyze-design generated at `.claude/figma-assessment-{fileKey}-{nodeId}.md`.
68
+
69
+ This report tells you:
70
+ - βœ… Which components are ready to use as-is
71
+ - πŸ”§ Which components need modifications
72
+ - πŸ†• Which UI elements need new components
73
+
74
+ **Use this as your component selection guide!** Don't guess at components - follow Sophia and Dorothy's verified recommendations from the assessment.
75
+
76
+ ### 3. Explore Component Details (If Needed)
77
+
78
+ If you need more detail beyond what's in the assessment:
79
+
80
+ 1. **Read the public API**: Use `Read` tool on `src/index.ts` to see all exported components
81
+ 2. **Examine component details**: Use `Read` tool to check component props and usage from:
82
+ - Component TypeScript files to see available props
83
+ - Story files (`.stories.tsx`) to see usage examples
84
+ - Test files (`.test.tsx`) to understand component behavior
85
+
86
+ **BUT**: The assessment already did most of this work! Only do additional research if you need specific prop details not covered in the report.
87
+
88
+ ### ⚑ STEP 3A - CALL SOPHIA ONLY IF NEEDED ⚑
89
+
90
+ **The analyze-design skill already called Sophia!** Her component recommendations are in the assessment report.
91
+
92
+ **ONLY call Sophia again if:**
93
+ - You need clarification on a specific component prop not covered in the assessment
94
+ - You encounter an edge case during implementation that wasn't in the original design
95
+ - You need guidance on a component interaction not documented
96
+
97
+ If you do need to call her:
98
+
99
+ Call Sophia with:
100
+ - The Figma screenshot/design context you gathered
101
+ - A list of all UI elements you identified in the design
102
+ - Ask her: which existing Arbor components should be used for each element, and what are their key props/APIs
103
+
104
+ ```
105
+ Task tool: subagent_type="sophia-componentspert"
106
+ prompt: "I'm building a page from a Figma design. Here's what I see in the design: [describe elements]. Which existing Arbor components should I use for each? Please detail their props and any usage gotchas."
107
+ ```
108
+
109
+ **WAIT for Sophia's response before continuing.** Her guidance shapes ALL subsequent decisions.
110
+
111
+ After Sophia responds, **SHARE HER WISDOM WITH THE USER** like this:
112
+
113
+ > πŸ‘œ **Sophia says:** _[relay Sophia's key component recommendations in her voice - she's warm, knowledgeable, a bit extra. e.g. "Listen pussycat, for that search bar you'll definitely want `FormField` with `inputType="text"` - don't even think about a raw input! And for those badges? `Pill` is your girl! Here's what I'd use for each element..."]_
114
+
115
+ Then list the component decisions you're going with, so the user can see what Sophia recommended.
116
+
117
+ **Example workflow**:
118
+ ```typescript
119
+ // 1. Read src/index.ts to see what's available:
120
+ export { Button } from './components/button/Button';
121
+ export { FormField } from './components/formField/FormField';
122
+ export { TextInput } from './components/formField/inputs/TextInput';
123
+ export { Table } from './components/table/Table';
124
+ // ... etc
125
+
126
+ // 2. Then read specific component files for props:
127
+ // Read src/components/button/Button.tsx to see ButtonProps
128
+ // Read src/components/formField/FormField.tsx to see FormFieldProps
129
+ ```
130
+
131
+ **Available Arbor components** (from `src/index.ts`):
132
+ - `Heading` - ALL headings (use instead of `<h1>`, `<h2>`, etc.)
133
+ - `Section` - Page sections (use instead of raw `<section>`)
134
+ - `Button` - Buttons and CTAs
135
+ - `FormField` - Self-contained form fields (label + input together)
136
+ - `TextInput`, `NumberInput`, `TextArea` - Form inputs (used via FormField)
137
+ - `SelectDropdown`, `ColourPickerDropdown` - Dropdown inputs
138
+ - `RadioButtonInput` - Radio buttons
139
+ - `Fieldset` - Fieldset grouping with legend
140
+ - `Card` - Card containers
141
+ - `Table` - Data tables (AG Grid wrapper)
142
+ - `Modal`, `ModalManager` - Modal dialogs
143
+ - `Slideover`, `SlideoverManager` - Slide-out panels
144
+ - `Pill`, `Tag` - Tags and badges
145
+ - `Icon` - Icons
146
+ - `Tooltip`, `TooltipWrapper` - Tooltips
147
+ - `Tabs` - Tab navigation
148
+ - `Dropdown` - Dropdown menus
149
+ - `Separator` - Dividers
150
+
151
+ ### 4. Map Figma Design to Existing Components
152
+
153
+ **Use the assessment report as your guide!** The report already mapped Figma elements to components.
154
+
155
+ For each Figma element:
156
+ 1. Check the assessment - what component did Sophia recommend?
157
+ 2. Note the props mentioned in the assessment
158
+ 3. Plan how to style/position it
159
+ 4. Determine what content it should have
160
+
161
+ **This step should be FAST** because analyze-design already did the heavy lifting!
162
+
163
+ ### 🚨 HANDLING MISSING COMPONENTS - PLACEHOLDER SVG PATTERN 🚨
164
+
165
+ When the analyze-design assessment identifies a UI element that has **NO matching Arbor component** (marked πŸ†• in the report), **DO NOT**:
166
+ - ❌ Skip the element entirely (leaves gaps in the layout)
167
+ - ❌ Build a new reusable component from scratch (out of scope for this skill!)
168
+ - ❌ Use a raw `<div>` with no visual indicator (confusing and invisible to reviewers)
169
+
170
+ **DO** use an inline **Placeholder SVG** to represent the missing component visually:
171
+
172
+ ```tsx
173
+ {/*
174
+ ⚠️ MISSING COMPONENT PLACEHOLDER
175
+ Component: [ComponentName e.g. "ProgressTracker"]
176
+ Reason: No matching Arbor component exists for this Figma element.
177
+ Figma element: [Figma layer name e.g. "Progress Bar / States"]
178
+ TODO: Replace this placeholder once the component is built in the design system.
179
+ */}
180
+ <svg
181
+ role="img"
182
+ aria-label="[ComponentName] placeholder - component not yet available in design system"
183
+ width="100%"
184
+ height="80"
185
+ xmlns="http://www.w3.org/2000/svg"
186
+ >
187
+ <rect width="100%" height="100%" fill="#f5f5f5" rx="4" />
188
+ <rect
189
+ x="2"
190
+ y="2"
191
+ width="calc(100% - 4px)"
192
+ height="76"
193
+ fill="none"
194
+ stroke="#cccccc"
195
+ strokeWidth="2"
196
+ strokeDasharray="8 4"
197
+ rx="3"
198
+ />
199
+ <text
200
+ x="50%"
201
+ y="42%"
202
+ textAnchor="middle"
203
+ dominantBaseline="middle"
204
+ fill="#888888"
205
+ fontSize="13"
206
+ fontWeight="600"
207
+ fontFamily="sans-serif"
208
+ >
209
+ [ComponentName]
210
+ </text>
211
+ <text
212
+ x="50%"
213
+ y="65%"
214
+ textAnchor="middle"
215
+ dominantBaseline="middle"
216
+ fill="#aaaaaa"
217
+ fontSize="11"
218
+ fontFamily="sans-serif"
219
+ >
220
+ Component not yet available in design system
221
+ </text>
222
+ </svg>
223
+ ```
224
+
225
+ **Placeholder SVG rules**:
226
+ - `role="img"` + descriptive `aria-label` β†’ accessible and findable in tests
227
+ - `height` should approximate the Figma element's visual height (use the screenshot as reference)
228
+ - `width="100%"` so it fills its container like the real component would
229
+ - `strokeDasharray` dashed border makes it instantly recognisable as a placeholder in Storybook/browser
230
+ - The `TODO` comment is CRITICAL - it tells devs exactly what needs building
231
+
232
+ **In the Output Summary** (Step 10), clearly list every placeholder you used:
233
+ ```
234
+ ⚠️ PLACEHOLDERS USED (components not yet in design system):
235
+ - ProgressTracker: used in the course completion section
236
+ - RichTextEditor: used in the notes section
237
+ These need real implementations before the page is production-ready.
238
+ ```
239
+
240
+ ### ⚑ STEP 4A - CALL SOPHIA AGAIN ONLY IF NEEDED ⚑
241
+
242
+ **You should rarely need this** since the assessment already covered component selection.
243
+
244
+ If you encounter ANY component you are unsure about during mapping that WASN'T covered in the assessment, **USE THE `Task` tool** to launch `sophia-componentspert`. Do NOT guess at component APIs.
245
+
246
+ ```
247
+ Task tool: subagent_type="sophia-componentspert"
248
+ prompt: "I need to use [ComponentName] for [use case]. What are the correct props? Are there any usage patterns or gotchas I should know about?"
249
+ ```
250
+
251
+ Then relay Sophia's answer to the user:
252
+
253
+ > πŸ‘œ **Sophia clarifies:** _[Sophia's prop guidance in her warm, knowledgeable voice]_
254
+
255
+ **Mapping Strategy**:
256
+ - Figma Button β†’ `<Button variant="primary|secondary|..." />`
257
+ - Figma Heading/Title β†’ `<Heading level={1|2|3|4}>` (NOT raw `<h1>`, `<h2>`)
258
+ - Figma Section/Container β†’ `<Section title="..." headingLevel={2}>` (NOT raw `<section>`)
259
+ - Figma Text Input β†’ `<FormField inputType="text" inputProps={{...}} />` (self-contained!)
260
+ - Figma Number Input β†’ `<FormField inputType="number" inputProps={{...}} />`
261
+ - Figma Select/Dropdown β†’ `<FormField inputType="selectDropdown" inputProps={{...}} />`
262
+ - Figma Card β†’ `<Card>...</Card>`
263
+ - Figma Table β†’ `<Table data={...} columns={...} />`
264
+ - Figma Tag/Badge β†’ `<Pill>` or `<Tag>`
265
+ - Figma Icon β†’ `<Icon name="..." size={24} />`
266
+ - Figma Modal β†’ `<Modal>...</Modal>`
267
+ - Figma Divider β†’ `<Separator />`
268
+ - Plain paragraph text β†’ `<p>` (but use `<Heading>` for titles!)
269
+ - **πŸ†• Missing component (no Arbor equivalent)** β†’ Inline placeholder SVG (see "Handling Missing Components" section above!)
270
+
271
+ **IMPORTANT**: If Code Connect mappings exist, USE THEM! Don't reinvent the wheel, hunni! 🐺
272
+
273
+ ### 5. Generate Page File
274
+
275
+ Create a page component that's composed with EXISTING components.
276
+
277
+ **Reference**: See `page-template.tsx` in this skill directory for a complete example structure.
278
+
279
+ **Key Structure Elements**:
280
+ - Import existing design system components using path aliases
281
+ - Define page props interface (className, callbacks, initial data)
282
+ - State management for interactive elements (forms, loading, errors)
283
+ - Event handlers for user interactions
284
+ - Semantic HTML structure (header, main, footer)
285
+ - Compose existing components according to Figma layout
286
+
287
+ **Page File Requirements**:
288
+ - Import ALL components from existing design system using path aliases
289
+ - Use semantic HTML structure (`header`, `main`, `section`, `footer`)
290
+ - Add state management for interactive elements (forms, toggles, etc.)
291
+ - Use proper TypeScript types
292
+ - Add JSDoc comments explaining the page purpose
293
+ - Keep layout logic in the page, styling in SCSS
294
+
295
+ ### 6. Generate Page Styles (SCSS)
296
+
297
+ Create styles that match the Figma layout using design tokens.
298
+
299
+ **Reference**: See `page-template.scss` in this skill directory for a complete example structure.
300
+
301
+ **Key Styling Elements**:
302
+ - Page container with max-width and centering
303
+ - Section styles using BEM naming (`.page-name__section`)
304
+ - Flexbox/Grid layouts matching Figma design
305
+ - Design tokens for all colors, spacing, typography
306
+ - Responsive breakpoints (@media queries)
307
+
308
+ **SCSS Requirements**:
309
+ - Import `../../tokens.scss` for design tokens
310
+ - Use design tokens for ALL styling (colors, spacing, typography)
311
+ - Use BEM-like naming: `.page-name__section--modifier`
312
+ - Match Figma layout with flexbox/grid
313
+ - Add responsive breakpoints if needed
314
+ - NO hardcoded colors/spacing - use tokens!
315
+
316
+ ### ⚑ MANDATORY STEP 6A - CALL BLANCHE DESIGNSPERT NOW ⚑
317
+
318
+ **YOU MUST USE THE `Task` tool RIGHT NOW** to launch the `blanche-designspert` agent. This is NOT optional. Do NOT move to step 7 without doing this.
319
+
320
+ Blanche will ensure you're using the right tokens (component tokens > semantic tokens > base tokens) and following proper CSS class naming patterns. She will catch any hardcoded values, wrong token tiers, or naming convention violations.
321
+
322
+ ```
323
+ Task tool: subagent_type="blanche-designspert"
324
+ prompt: "I've just created a SCSS file for a new page. Please review the styling for correct design token usage and CSS naming conventions. Here is the SCSS: [paste your generated SCSS]"
325
+ ```
326
+
327
+ After Blanche responds, **SHARE HER VERDICT WITH THE USER** before making any corrections:
328
+
329
+ > πŸ’„ **Blanche says:** _[relay Blanche's styling feedback in her voice - she's glamorous, exacting, and absolutely will not tolerate a hardcoded hex value. e.g. "Sugah, that `#ff0000` has GOT to go - use `--color-semantic-error-500` like the sophisticated design system we are! And darling, those spacing values? $space-4 and $space-8 are RIGHT THERE waiting for you..."]_
330
+
331
+ List any corrections you're making based on her feedback, then apply them.
332
+
333
+ **Apply ALL of Blanche's feedback before continuing.** Do NOT skip her corrections.
334
+
335
+ ### 7. Generate Test File
336
+
337
+ Create tests for the page:
338
+
339
+ ```typescript
340
+ import { render, screen } from '@testing-library/react';
341
+ import '@testing-library/jest-dom/vitest';
342
+ import { PageName } from './PageName';
343
+
344
+ describe('PageName', () => {
345
+ it('renders the page title', () => {
346
+ render(<PageName />);
347
+ expect(screen.getByText('Page Title')).toBeInTheDocument();
348
+ });
349
+
350
+ it('renders action buttons', () => {
351
+ render(<PageName />);
352
+ expect(screen.getByRole('button', { name: /action button/i })).toBeInTheDocument();
353
+ });
354
+
355
+ it('renders form fields', () => {
356
+ render(<PageName />);
357
+ expect(screen.getByLabelText(/name/i)).toBeInTheDocument();
358
+ });
359
+
360
+ // Add tests for interactions
361
+ it('handles form submission', () => {
362
+ // Test form logic
363
+ });
364
+ });
365
+ ```
366
+
367
+ **Test Requirements**:
368
+ - Use React Testing Library
369
+ - Import `@testing-library/jest-dom/vitest`
370
+ - Use accessible queries (`getByRole`, `getByLabelText`)
371
+ - Test page renders correctly
372
+ - Test interactive elements work
373
+ - Avoid testIds
374
+
375
+ ### 8. Generate Storybook Story
376
+
377
+ ### ⚑ MANDATORY STEP 8A - CALL ROSE STORYBOOKSPERT NOW ⚑
378
+
379
+ **YOU MUST USE THE `Task` tool RIGHT NOW** to launch the `rose-storybookspert` agent. Do NOT write the story file yourself. Rose is the expert here - let her do it!
380
+
381
+ ```
382
+ Task tool: subagent_type="rose-storybookspert"
383
+ prompt: "I've created a new page component called [PageName]. Please create a comprehensive Storybook story file for it. Here is the component: [paste your generated TSX]. The file should go at [path/to/PageName.stories.tsx]."
384
+ ```
385
+
386
+ After Rose responds, **SHARE A PREVIEW OF HER STORY WITH THE USER**:
387
+
388
+ > 🌹 **Rose says:** _[relay Rose's story rationale and highlights in her warm storytelling voice - she loves explaining WHY she chose each story variant, and she gets genuinely excited about good documentation. e.g. "Oh, this page has such a beautiful story to tell! I've written a Default story so you can see it in its natural state, a WithLoadingState story because every page deserves to be seen mid-journey, and a WithError story because even mistakes deserve to be documented with care..."]_
389
+
390
+ Then show the user the story file Rose has crafted before writing it to disk.
391
+
392
+ **Use Rose's output as the story file.** Do NOT just use the basic template below - that's just a reference.
393
+
394
+ Basic story structure (Rose will enhance this significantly):
395
+
396
+ ```typescript
397
+ import type { Meta, StoryObj } from '@storybook/react';
398
+ import { PageName } from './PageName';
399
+
400
+ const meta: Meta<typeof PageName> = {
401
+ title: 'Pages/PageName',
402
+ component: PageName,
403
+ parameters: {
404
+ layout: 'fullscreen', // Pages typically use fullscreen
405
+ },
406
+ };
407
+
408
+ export default meta;
409
+ type Story = StoryObj<typeof meta>;
410
+
411
+ export const Default: Story = {
412
+ args: {},
413
+ };
414
+
415
+ export const WithData: Story = {
416
+ args: {
417
+ // Mock data if needed
418
+ },
419
+ };
420
+ ```
421
+
422
+ ### 9. File Organization
423
+
424
+ **Where to put page files**:
425
+
426
+ Option A - In consumer app (NOT the component library):
427
+ ```
428
+ app/src/pages/pageName/
429
+ β”œβ”€β”€ PageName.tsx
430
+ β”œβ”€β”€ PageName.test.tsx
431
+ β”œβ”€β”€ PageName.stories.tsx
432
+ └── pageName.scss
433
+ ```
434
+
435
+ Option B - In component library examples/demo:
436
+ ```
437
+ src/examples/pages/pageName/
438
+ β”œβ”€β”€ PageName.tsx
439
+ β”œβ”€β”€ PageName.test.tsx
440
+ β”œβ”€β”€ PageName.stories.tsx
441
+ └── pageName.scss
442
+ ```
443
+
444
+ **IMPORTANT**: Pages are typically NOT added to the component library's public API (`src/index.ts`). They're application-level code that USES the library!
445
+
446
+ ### 10. Quality Checks
447
+
448
+ Run these commands:
449
+
450
+ ```bash
451
+ # Type check
452
+ yarn check-types
453
+
454
+ # Lint SCSS
455
+ yarn style-lint
456
+
457
+ # Run tests
458
+ yarn test
459
+
460
+ # View in Storybook (if story created)
461
+ yarn storybook
462
+ ```
463
+
464
+ **CRITICAL**: All checks must pass! 100% test pass rate hunni!! 🐺
465
+
466
+ ### ⚑ MANDATORY STEP 10A - CALL DOROTHY FACT-CHECKER NOW ⚑
467
+
468
+ **YOU MUST USE THE `Task` tool RIGHT NOW** to launch the `dorothy-fact-checker` agent. This is the FINAL quality gate. Do NOT tell the user the work is done without Dorothy's sign-off.
469
+
470
+ ```
471
+ Task tool: subagent_type="dorothy-fact-checker"
472
+ prompt: "I've just finished creating a page from a Figma design. Please verify all the following: (1) all files actually exist on disk [list file paths], (2) tests pass with 100% pass rate, (3) tests are meaningful not placeholders, (4) components are used with correct props, (5) no 'any' types used, (6) styling follows token conventions."
473
+ ```
474
+
475
+ Dorothy will check:
476
+ - Confirm all files were actually created (page, styles, tests, stories)
477
+ - Verify tests pass with 100% pass rate
478
+ - Check that tests are meaningful and not just placeholders
479
+ - Ensure components are used properly with correct props
480
+ - Validate that styling follows conventions
481
+ - Confirm no 'any' types are used
482
+ - Give you the HONEST truth about the quality of the work!
483
+
484
+ After Dorothy responds, **SHARE HER VERDICT WITH THE USER IN FULL**. Dorothy's honesty is a feature, not a bug - don't sanitise it:
485
+
486
+ > πŸ” **Dorothy says:** _[relay Dorothy's fact-check verdict in her no-nonsense, straight-talking voice - she has seen things. She doesn't sugarcoat. e.g. "Alright, I've checked the work. The page file EXISTS, which is a good start. The tests? Three of them are fine, but 'handles form submission' is just an empty shell and I won't pretend otherwise. The SCSS has one hardcoded value that Blanche apparently missed. Fix those two things and we're golden."]_
487
+
488
+ List every issue Dorothy raised, confirm which ones you're fixing, then fix them before presenting the final summary.
489
+
490
+ **Fix ALL issues Dorothy identifies before giving the final summary to the user.**
491
+
492
+ ## Design Token Mapping
493
+
494
+ We don't use sass vars, we use css vars.
495
+ Map Figma variables to `src/tokens.scss`:
496
+
497
+ **Colors**:
498
+ We have base tokens for colours e.g.:
499
+ - Brand colors β†’ `--color-brand-500`
500
+ - Semantic colors β†’ `--color-semantic-{semantic}-500`
501
+ But we also have component specific tokens that should take priority:
502
+ - Component specific colors β†’ `--{component}-{state}-color-{usage}`
503
+ - e.g. text colour for form field text in an error state β†’ `--form-field-text-error-color-text`
504
+ - Border colors β†’ `--{component}-focus-color-border`
505
+
506
+ **Spacing**:
507
+ - Gaps/margins/padding β†’ `$space-{scale}` (e.g., `$space-4`, `$space-8`)
508
+
509
+ **Typography**:
510
+ - Headings β†’ `$text-heading-{level}-{property}`
511
+ - Body text β†’ `$text-body-{property}`
512
+ - Font weights β†’ `$text-{style}-weight`
513
+
514
+ **Layout**:
515
+ - Border radius β†’ `$border-radius-{size}`
516
+ - Shadows β†’ Check if shadow tokens exist
517
+
518
+ ## Component Usage Tips
519
+
520
+ **CRITICAL**: Use Arbor components, NOT raw HTML elements!
521
+
522
+ ### Headings - Use `Heading` component
523
+ ```typescript
524
+ // DON'T use raw <h1>, <h2>, etc.
525
+ <Heading level={1}>Page Title</Heading>
526
+ <Heading level={2}>Section Title</Heading>
527
+ <Heading level={3}>Subsection</Heading>
528
+ ```
529
+
530
+ ### Sections - Use `Section` component
531
+ ```typescript
532
+ // DON'T use raw <section>
533
+ <Section
534
+ title="Section Title"
535
+ headingLevel={2}
536
+ buttonText="Action" // Optional button in header
537
+ buttonOnClick={handleClick}
538
+ collapsible={false} // Optional collapsible
539
+ >
540
+ {/* Section content */}
541
+ </Section>
542
+ ```
543
+
544
+ ### Forms - Use `FormField` (self-contained)
545
+ ```typescript
546
+ // FormField includes BOTH label AND input!
547
+ <FormField
548
+ label="Email"
549
+ id="email"
550
+ inputType="text" // 'text' | 'textarea' | 'number' | 'colourPicker' | 'selectDropdown'
551
+ errorText={error} // Error message
552
+ fieldDescription="Help text" // Optional description
553
+ inputProps={{
554
+ value: email,
555
+ onChange: (e) => setEmail(e.target.value),
556
+ placeholder: 'Enter email',
557
+ }}
558
+ />
559
+ ```
560
+
561
+ ### Buttons
562
+ ```typescript
563
+ <Button
564
+ variant="primary" // 'primary' | 'secondary' | 'tertiary' | 'primary-destructive' | 'secondary-destructive' | 'text-link' | 'dropdown'
565
+ onClick={handleClick}
566
+ disabled={isLoading}
567
+ >
568
+ Click Me
569
+ </Button>
570
+ ```
571
+
572
+ ### Tables
573
+ ```typescript
574
+ <Table
575
+ data={rows}
576
+ columns={columnDefs}
577
+ // Check Table component for all props
578
+ />
579
+ ```
580
+
581
+ **ALWAYS check component prop types before using!** Use `Read` tool on `src/index.ts` to see available components, then read component files for props!
582
+
583
+ ## Output Summary
584
+
585
+ After generation, provide:
586
+
587
+ 1. βœ… **Page file created**: Path to PageName.tsx
588
+ 2. βœ… **Components used**: List of all design system components imported
589
+ 3. βœ… **Layout structure**: Brief description of page sections
590
+ 4. βœ… **Design tokens**: Colors/spacing tokens used
591
+ 5. βœ… **Tests created**: Path to test file
592
+ 6. βœ… **Quality checks**: Results of type check, lint, tests
593
+ 7. βœ… **Next steps**:
594
+ - How to integrate into app
595
+ - Where to add routing
596
+ - Any manual tweaks needed
597
+ 8. βœ… **Visual comparison**: Note any differences from Figma design
598
+ 9. ⚠️ **Placeholder SVGs used** (if any): List every missing component that was replaced with a placeholder SVG, e.g.:
599
+ ```
600
+ ⚠️ PLACEHOLDERS USED (components not yet in design system):
601
+ - ProgressTracker: used in the course header section (~80px tall)
602
+ - RichTextEditor: used in the notes/description section (~200px tall)
603
+ These SVG placeholders mark where real components need to be built.
604
+ Replace each <svg role="img" aria-label="[ComponentName] placeholder..."> when the component is ready.
605
+ ```
606
+
607
+ ## Important Notes
608
+
609
+ - **DON'T create new components** - use existing ones! 🐺
610
+ - **DO explore components first** - read their props and examples
611
+ - **DO use Code Connect mappings** if available
612
+ - **DO use design tokens** for all styling
613
+ - **DO match Figma layout** with proper spacing/alignment
614
+ - **DON'T add pages to src/index.ts** - they're app-level, not library exports
615
+ - **DO keep it simple** - compose, don't reinvent
616
+ - This codebase serves millions of users - be careful!
617
+ - Use yarn (NOT npm)
618
+ - 100% test pass rate or we AROOOOO in protest!! 🐺πŸ’ͺ
619
+
620
+ ## Example Flow
621
+
622
+ 1. User provides Figma URL
623
+ 2. Fetch design β†’ See it has a form with submit button and data table
624
+ 3. Explore components β†’ Find FormField, TextInput, Button, Table
625
+ 4. Map design:
626
+ - Form section β†’ FormField + TextInput components
627
+ - Submit button β†’ Button component (primary variant)
628
+ - Data table β†’ Table component
629
+ 5. Generate page that imports and uses these components
630
+ 6. Style layout to match Figma using design tokens
631
+ 7. Add tests, run quality checks
632
+ 8. Output: "Here's your page that uses FormField, TextInput, Button, and Table!"
633
+
634
+ AROOOOO LET'S COMPOSE SOME BOMBASS PAGES HUNNI!! xxx πŸ’ͺ🏍️✨