@sableui/react 0.0.0-stage → 0.1.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 (247) hide show
  1. package/AGENTS.md +157 -0
  2. package/CHANGELOG.md +55 -0
  3. package/CONTRIBUTING.md +221 -0
  4. package/DESIGN.md +548 -0
  5. package/LICENSE +21 -0
  6. package/README.md +194 -2
  7. package/THIRD_PARTY_NOTICES.md +44 -0
  8. package/bin/sable-lint.mjs +0 -0
  9. package/bin/sable.mjs +1223 -0
  10. package/dist/_contract-CYScOdf5.d.ts +150 -0
  11. package/dist/chunk-3IWZYBGH.js +398 -0
  12. package/dist/chunk-5Z5KLOAU.js +167 -0
  13. package/dist/chunk-7MG4SHYX.js +15 -0
  14. package/dist/chunk-ADLLDWLW.js +15 -0
  15. package/dist/chunk-EP55KSYA.js +14 -0
  16. package/dist/chunk-J23ELQQZ.js +9396 -0
  17. package/dist/chunk-JI7WJP2L.js +286 -0
  18. package/dist/chunk-K7RUHUGC.js +14 -0
  19. package/dist/chunk-KO3NAEBF.js +15 -0
  20. package/dist/chunk-L4IEIQQA.js +14 -0
  21. package/dist/chunk-L6Y46C62.js +270 -0
  22. package/dist/chunk-NEQNXI2G.js +25 -0
  23. package/dist/chunk-PAOZBZME.js +40 -0
  24. package/dist/chunk-RWP4XBSK.js +139 -0
  25. package/dist/chunk-SRQWQUTW.js +63 -0
  26. package/dist/chunk-YXBOYWBN.js +15 -0
  27. package/dist/foundations/index.d.ts +88 -0
  28. package/dist/foundations/index.js +792 -0
  29. package/dist/icon/index.d.ts +60 -0
  30. package/dist/icon/index.js +2 -0
  31. package/dist/icon-sets/brands.d.ts +44 -0
  32. package/dist/icon-sets/brands.js +147 -0
  33. package/dist/icon-sets/reicon.d.ts +8 -0
  34. package/dist/icon-sets/reicon.js +1 -0
  35. package/dist/index.d.ts +7013 -0
  36. package/dist/index.js +15462 -0
  37. package/dist/ios/chrome.css +83 -0
  38. package/dist/ios/frame.css +5 -0
  39. package/dist/ios/index.d.ts +70 -0
  40. package/dist/ios/index.js +313 -0
  41. package/dist/ios/preview.d.ts +64 -0
  42. package/dist/ios/preview.js +133 -0
  43. package/dist/ios/styles.css +77 -0
  44. package/dist/layout/index.d.ts +280 -0
  45. package/dist/layout/index.js +2 -0
  46. package/dist/meta-6dUzgC6M.d.ts +205 -0
  47. package/dist/patterns/index.d.ts +36 -0
  48. package/dist/patterns/index.js +934 -0
  49. package/dist/presets/index.d.ts +37 -0
  50. package/dist/presets/index.js +117 -0
  51. package/dist/registry-CyL28OzJ.d.ts +28 -0
  52. package/dist/styles.css +1893 -0
  53. package/dist/theme-provider-BWcizhAt.d.ts +105 -0
  54. package/dist/themes/atelier/atelier.css +213 -0
  55. package/dist/themes/atelier/index.d.ts +9 -0
  56. package/dist/themes/atelier/index.js +1 -0
  57. package/dist/themes/base/base.css +443 -0
  58. package/dist/themes/base/index.d.ts +9 -0
  59. package/dist/themes/base/index.js +1 -0
  60. package/dist/themes/ember/ember.css +270 -0
  61. package/dist/themes/ember/index.d.ts +9 -0
  62. package/dist/themes/ember/index.js +1 -0
  63. package/dist/themes/index.d.ts +10 -0
  64. package/dist/themes/index.js +8 -0
  65. package/dist/themes/meridian/index.d.ts +9 -0
  66. package/dist/themes/meridian/index.js +1 -0
  67. package/dist/themes/meridian/meridian.css +255 -0
  68. package/dist/themes/poppy/index.d.ts +6 -0
  69. package/dist/themes/poppy/index.js +1 -0
  70. package/dist/themes/poppy/poppy.css +174 -0
  71. package/dist/themes/prism/index.d.ts +6 -0
  72. package/dist/themes/prism/index.js +1 -0
  73. package/dist/themes/prism/prism.css +183 -0
  74. package/dist/themes/verdant/index.d.ts +9 -0
  75. package/dist/themes/verdant/index.js +1 -0
  76. package/dist/themes/verdant/verdant.css +210 -0
  77. package/dist/themes.css +30 -0
  78. package/llms/components/accordion.md +93 -0
  79. package/llms/components/app-header.md +70 -0
  80. package/llms/components/app-shell.md +117 -0
  81. package/llms/components/attachment.md +105 -0
  82. package/llms/components/avatar.md +141 -0
  83. package/llms/components/badge.md +117 -0
  84. package/llms/components/banner.md +119 -0
  85. package/llms/components/bottom-nav.md +80 -0
  86. package/llms/components/breadcrumbs.md +75 -0
  87. package/llms/components/browser.md +67 -0
  88. package/llms/components/bubble.md +119 -0
  89. package/llms/components/button.md +199 -0
  90. package/llms/components/calendar.md +75 -0
  91. package/llms/components/card.md +135 -0
  92. package/llms/components/carousel.md +87 -0
  93. package/llms/components/chat-composer.md +126 -0
  94. package/llms/components/checkbox-card.md +98 -0
  95. package/llms/components/checkbox.md +90 -0
  96. package/llms/components/code-block.md +81 -0
  97. package/llms/components/code.md +62 -0
  98. package/llms/components/collapsible.md +83 -0
  99. package/llms/components/color-field.md +100 -0
  100. package/llms/components/combobox.md +119 -0
  101. package/llms/components/command-menu.md +158 -0
  102. package/llms/components/context-card.md +73 -0
  103. package/llms/components/context-menu.md +79 -0
  104. package/llms/components/data-table.md +99 -0
  105. package/llms/components/date-picker.md +97 -0
  106. package/llms/components/description.md +96 -0
  107. package/llms/components/destructive-action-modal.md +76 -0
  108. package/llms/components/dialog.md +127 -0
  109. package/llms/components/dots-menu.md +64 -0
  110. package/llms/components/empty-state.md +113 -0
  111. package/llms/components/entity.md +67 -0
  112. package/llms/components/feedback.md +63 -0
  113. package/llms/components/fieldset.md +106 -0
  114. package/llms/components/file-dropzone.md +103 -0
  115. package/llms/components/form.md +111 -0
  116. package/llms/components/gliding-highlight.md +84 -0
  117. package/llms/components/inline-status.md +62 -0
  118. package/llms/components/input.md +127 -0
  119. package/llms/components/kbd.md +57 -0
  120. package/llms/components/label.md +73 -0
  121. package/llms/components/marker.md +99 -0
  122. package/llms/components/marquee.md +66 -0
  123. package/llms/components/menu.md +122 -0
  124. package/llms/components/message-scroller.md +110 -0
  125. package/llms/components/message.md +114 -0
  126. package/llms/components/meter.md +124 -0
  127. package/llms/components/middle-truncate.md +62 -0
  128. package/llms/components/note.md +81 -0
  129. package/llms/components/notification-badge.md +67 -0
  130. package/llms/components/number-field.md +70 -0
  131. package/llms/components/otp-field.md +101 -0
  132. package/llms/components/page-header.md +76 -0
  133. package/llms/components/page-loader.md +67 -0
  134. package/llms/components/pagination.md +92 -0
  135. package/llms/components/panel-group.md +120 -0
  136. package/llms/components/panel-section.md +122 -0
  137. package/llms/components/phone.md +70 -0
  138. package/llms/components/pill.md +73 -0
  139. package/llms/components/popover.md +79 -0
  140. package/llms/components/progress.md +98 -0
  141. package/llms/components/radio-card.md +90 -0
  142. package/llms/components/radio.md +86 -0
  143. package/llms/components/relative-time.md +60 -0
  144. package/llms/components/scroller.md +88 -0
  145. package/llms/components/scrub-field.md +97 -0
  146. package/llms/components/search-input.md +84 -0
  147. package/llms/components/select.md +106 -0
  148. package/llms/components/separator.md +70 -0
  149. package/llms/components/settings-menu.md +139 -0
  150. package/llms/components/sheet.md +97 -0
  151. package/llms/components/show-more.md +59 -0
  152. package/llms/components/side-nav.md +106 -0
  153. package/llms/components/sidebar.md +87 -0
  154. package/llms/components/skeleton.md +62 -0
  155. package/llms/components/slider.md +114 -0
  156. package/llms/components/spinner.md +87 -0
  157. package/llms/components/status-bar.md +91 -0
  158. package/llms/components/status-dot.md +70 -0
  159. package/llms/components/stepper.md +125 -0
  160. package/llms/components/streaming-text.md +86 -0
  161. package/llms/components/switch.md +87 -0
  162. package/llms/components/table.md +112 -0
  163. package/llms/components/tabs.md +84 -0
  164. package/llms/components/textarea.md +88 -0
  165. package/llms/components/theme-selector.md +95 -0
  166. package/llms/components/theme-switcher.md +71 -0
  167. package/llms/components/thinking-orb.md +91 -0
  168. package/llms/components/toast.md +130 -0
  169. package/llms/components/toggle.md +95 -0
  170. package/llms/components/toolbar.md +168 -0
  171. package/llms/components/tooltip.md +93 -0
  172. package/llms/components/tree.md +227 -0
  173. package/llms/components/video.md +66 -0
  174. package/llms/components/workspace.md +138 -0
  175. package/llms/foundations/accessibility.md +60 -0
  176. package/llms/foundations/motion.md +96 -0
  177. package/llms/foundations/scrolling.md +41 -0
  178. package/llms/foundations/shape.md +73 -0
  179. package/llms/foundations/spacing.md +82 -0
  180. package/llms/foundations/surfaces.md +69 -0
  181. package/llms/foundations/typography.md +120 -0
  182. package/llms/layout/aspect-box.md +37 -0
  183. package/llms/layout/bleed.md +31 -0
  184. package/llms/layout/center.md +37 -0
  185. package/llms/layout/columns.md +51 -0
  186. package/llms/layout/grid-overlay.md +40 -0
  187. package/llms/layout/grid.md +47 -0
  188. package/llms/layout/page.md +39 -0
  189. package/llms/layout/region.md +49 -0
  190. package/llms/layout/row.md +40 -0
  191. package/llms/layout/safe-area.md +37 -0
  192. package/llms/layout/spacer.md +39 -0
  193. package/llms/layout/split-pane.md +41 -0
  194. package/llms/layout/stack.md +39 -0
  195. package/llms/patterns/auth-page.md +68 -0
  196. package/llms/patterns/brand-landing-page.md +423 -0
  197. package/llms/patterns/chat-panel.md +210 -0
  198. package/llms/patterns/dashboard-page.md +170 -0
  199. package/llms/patterns/feed-page.md +103 -0
  200. package/llms/patterns/landing-page.md +122 -0
  201. package/llms/patterns/list-detail-page.md +100 -0
  202. package/llms/patterns/settings-page.md +121 -0
  203. package/llms/reference/token-intent.md +324 -0
  204. package/llms/reference/utilities.md +129 -0
  205. package/llms/tasks/adding-a-component.md +113 -0
  206. package/llms/tasks/auditing-an-app.md +216 -0
  207. package/llms/tasks/building-a-page.md +109 -0
  208. package/llms/tasks/building-a-tool.md +141 -0
  209. package/llms/tasks/building-an-ios-prototype.md +105 -0
  210. package/llms/tasks/building-with-sable.md +73 -0
  211. package/llms/tasks/choosing-a-component.md +109 -0
  212. package/llms/tasks/converting-an-app.md +139 -0
  213. package/llms/tasks/creating-a-preset.md +43 -0
  214. package/llms/tasks/creating-design-assets.md +96 -0
  215. package/llms/tasks/designing-a-surface.md +115 -0
  216. package/llms/tasks/developing-taste.md +157 -0
  217. package/llms/tasks/getting-started.md +63 -0
  218. package/llms/tasks/learning-from-builds.md +74 -0
  219. package/llms/tasks/reviewing-a-design.md +114 -0
  220. package/llms/tasks/reviewing-a-journey.md +84 -0
  221. package/llms/tasks/reviewing-motion.md +92 -0
  222. package/llms/tasks/using-presets.md +87 -0
  223. package/llms/taste/asset-plan.template.json +53 -0
  224. package/llms/taste/composition-follows-content.md +20 -0
  225. package/llms/taste/hierarchy-is-a-relationship.md +22 -0
  226. package/llms/taste/lessons.json +57 -0
  227. package/llms/taste/motion-needs-a-reason.md +21 -0
  228. package/llms/taste/surface-states-travel-together.md +20 -0
  229. package/llms-full.txt +14906 -0
  230. package/llms.txt +405 -0
  231. package/package.json +185 -3
  232. package/registry.json +18812 -0
  233. package/scripts/agent-setup.mjs +54 -0
  234. package/scripts/design-atlas.mjs +221 -0
  235. package/scripts/design-directions.mjs +123 -0
  236. package/scripts/design-memory.mjs +166 -0
  237. package/scripts/design-preferences.mjs +227 -0
  238. package/scripts/design-presets.mjs +48 -0
  239. package/scripts/grade.mjs +509 -0
  240. package/scripts/lint-rules.mjs +1065 -0
  241. package/scripts/review-evidence.mjs +120 -0
  242. package/scripts/skeleton.mjs +248 -0
  243. package/skills/entry/SKILL.md +34 -0
  244. package/skills/sable/SKILL.md +187 -0
  245. package/skills/sable/agents/openai.yaml +6 -0
  246. package/targets/ios.json +982 -0
  247. package/third-party/reicon-LICENSE.txt +20 -0
@@ -0,0 +1,115 @@
1
+ # Task: designing a surface with Sable
2
+
3
+ Tokens make decisions consistent; they do not decide what deserves attention.
4
+ Start with the user's task and content, then choose a visual direction. Sable's
5
+ default Base identity is a starting point. A consumer can be light-first,
6
+ photographic, editorial, playful, or quiet while retaining semantic tokens,
7
+ accessible behavior, and a coherent interaction policy.
8
+
9
+ ## 1. Write a short surface brief
10
+
11
+ Save the brief in the app, for example `design/<surface>/brief.md`. Record:
12
+
13
+ | Decision | Make it concrete |
14
+ |---|---|
15
+ | User and outcome | Who is here, what they need to understand or do, and the primary action. |
16
+ | Mode | Persuade, operate, read, or experience. This describes the job, not density. |
17
+ | Register | Page or workspace, with a reason based on scrolling and task behavior. |
18
+ | Content truth | Real or clearly labeled fictional data; required copy; available assets; unverified claims excluded. |
19
+ | Direction | Two or three properties expressed as visible choices: e.g. broad image fields, compact captions, low chroma surfaces. |
20
+ | Story | For each section: the user's question, the evidence or task it supplies, and what follows. |
21
+ | Hierarchy and rhythm | Focal element, type contrast, prose measure, alignment anchors, and section spacing relationships. |
22
+ | Color and material | Surface/ink pairs, where accent carries meaning, imagery treatment, supported color modes. |
23
+ | Interaction | Primary flow plus loading, empty, error, success, disabled, keyboard, and touch behavior. |
24
+ | Motion | Purpose, trigger, driver, timing, interruption, and reduced-motion result; include deliberate static decisions. |
25
+ | Adaptation | What stacks, moves, hides with an equivalent route, or becomes scrollable on narrow screens. |
26
+ | Review | Target routes, states, widths, and the uncertainty the proof build must resolve. |
27
+
28
+ For small changes, record only decisions that change. When the user requests
29
+ alternatives or competing directions materially affect the brief, compare bounded
30
+ rendered studies using [developing-taste.md](./developing-taste.md).
31
+ Keep a user-pinned identity fixed. Do not create decorative variation just to
32
+ satisfy a checklist.
33
+
34
+ ## 2. Retrieve applicable lessons and contracts
35
+
36
+ ```bash
37
+ npx sable atlas --search "editorial hierarchy" --contrast --limit 3 --json # the project's atlas, if any
38
+ npx sable prefer --search "hierarchy" --scope project:<project-id> --json
39
+ npx sable learn --search "editorial hierarchy" --json
40
+ npx sable pattern --list
41
+ npx sable pattern LandingPage --skeleton
42
+ npx sable component Button --props
43
+ ```
44
+
45
+ Read each lesson's `appliesWhen`, `avoidWhen`, and provenance. State what transfers
46
+ and what does not. A precedent is evidence for a decision in a context, not an
47
+ instruction to reproduce an entire aesthetic. If no lesson fits, proceed from the
48
+ brief and gather fresh evidence.
49
+
50
+ Use `sable atlas --show <id> --json` to retrieve full annotations and absolute
51
+ capture paths, then view the images. Retrieve only preferences matching the
52
+ project, brand, person, or task context. Scope and the present brief take priority
53
+ over how often a reference or preference was used in the past.
54
+
55
+ ## 3. Choose composition before components
56
+
57
+ Patterns are useful starting points when their information architecture matches.
58
+ An original composition is equally valid. Use layout primitives and semantic HTML
59
+ for bespoke pages; record why a shell does or does not fit. The closest pattern's
60
+ similarity score describes reuse and cannot establish quality.
61
+
62
+ Establish the major regions with real text and assets before decorating details.
63
+
64
+ Record the ownership boundary: Sable behavior components and semantic tokens,
65
+ app-owned composition and assets, and any native controls or custom behavior.
66
+ Using Sable does not require every element to be a library component. Prefer its
67
+ public component APIs and token hooks for repeated control styling. If repeated
68
+ `!important` rules are necessary to change a control's type, spacing or shape,
69
+ identify the missing hook rather than claiming the app is fully system-driven.
70
+ Keep one-off editorial layout decisions local; propose a shared API only when
71
+ multiple real consumers need the same capability.
72
+
73
+ Use uniform rows for equivalent records, readable measure for prose, larger space
74
+ for the primary artifact, and deliberate density changes where the story changes.
75
+ A palette swap on a canonical landing page does not test a new composition.
76
+
77
+ Choose type size, weight, line-height, container width, and copy together. Select
78
+ HTML heading levels by document structure and visual tiers by hierarchy. A large
79
+ heading does not become semantically deeper because it needs smaller type.
80
+
81
+ When images, illustration, video, or fonts carry the message, use
82
+ [creating-design-assets.md](./creating-design-assets.md). Plan concrete subjects,
83
+ treatments, sources, responsive crops, and delivery budgets, then produce and
84
+ inspect the assets in the layout. A mood label or generation prompt alone is not
85
+ a finished asset; keep unresolved placeholders explicit in the review record.
86
+
87
+ ## 4. Make the intended behavior real
88
+
89
+ Use Sable for behavior that it already owns. Custom interactive elements need
90
+ clear feedback, accessible names, focus visibility, and a complete action. A
91
+ successful demo must show a real result, such as changed data or a confirmation
92
+ with context. Do not leave visible primary actions inert.
93
+
94
+ Use motion to explain change or establish a deliberate reading cadence. Keep
95
+ frequent actions quick. Initial content may remain static. Avoid adding a reveal
96
+ to every section by habit. Any bespoke animation must honor reduced motion and
97
+ Sable's policy; core primitives cannot control an unrelated animation driver.
98
+
99
+ For connected routes, use [reviewing-a-journey.md](./reviewing-a-journey.md) to
100
+ plan carried state, shared visual decisions, and recovery. For meaningful motion,
101
+ use [reviewing-motion.md](./reviewing-motion.md) to define and capture temporal
102
+ behavior. These extend the work when relevant; a small static surface does not
103
+ need a manufactured journey or animation.
104
+
105
+ ## 5. Inspect, repair, and record
106
+
107
+ Run the consumer's typecheck, tests relevant to behavior, and `sable-lint`. Then
108
+ follow [reviewing-a-design.md](./reviewing-a-design.md): inspect desktop and mobile,
109
+ exercise the primary flow and keyboard behavior, and test reduced motion. Fix
110
+ observed failures and recapture affected states. End only when the agreed work is
111
+ complete or the remaining limitation is explicitly recorded.
112
+
113
+ Distill a useful discovery through
114
+ [learning-from-builds.md](./learning-from-builds.md). Good builds may teach no new
115
+ rule. Do not claim timelessness or premium quality from a passing lexical score.
@@ -0,0 +1,157 @@
1
+ # Task: develop taste and range with Sable
2
+
3
+ Taste is contextual judgment: deciding what deserves emphasis, which relationships
4
+ make a composition coherent, and whether the result serves its audience. The
5
+ accessibility, semantic-token, and behavior contracts are the floor. A consumer's
6
+ type character, density, imagery, spatial rhythm, shape, and motion can vary.
7
+
8
+ ## Read a small, contrasting reference set
9
+
10
+ ```bash
11
+ npx sable atlas --search "editorial image hierarchy" --contrast --limit 3 --json
12
+ npx sable atlas --show <reference-id> --json
13
+ ```
14
+
15
+ Open the returned `evidence[].absolutePath` images with the agent's image viewer.
16
+ Reading the annotations without viewing the captures does not establish visual
17
+ understanding. The atlas is the project's own (`.sable/atlas/atlas.json`) and works offline;
18
+ the package ships none, and an empty result means working from the user's
19
+ references. Images are reference evidence, never assets to copy into a new
20
+ brand's product.
21
+
22
+ Choose references for the audience and information problem. Retrieve one close
23
+ analogue and at least one useful contrasting approach when the brief is open.
24
+ Search is contextual lexical retrieval with family diversity, not semantic image
25
+ search or an aesthetic ranking. `--mode` and `--family` are hard filters. A result
26
+ can be irrelevant despite matching a word; no result is better than inventing a
27
+ connection. `sable atlas --check` detects changed or missing captures.
28
+
29
+ For each reference, name one relationship that transfers and one boundary. For
30
+ example, an image can carry the primary claim while navigation recedes. That does
31
+ not make tiny navigation or a long loading sequence suitable for a public service.
32
+ Gallery inclusion is discovery provenance. Read the recorded limitations and
33
+ distinguish a captured state from observed temporal behavior.
34
+
35
+ ## Express a direction as choices
36
+
37
+ Keep the factual brief fixed. Describe composition, typography, density, imagery,
38
+ story, and motion as relationships that can be seen or operated. Include spacing
39
+ and color decisions in the rationale and consumer-owned theme. State how the
40
+ direction adapts to smaller viewports and how its primary interaction works.
41
+
42
+ Coherence matters within a design; range matters across the set of designs. A
43
+ strong result can be bright, dense, playful, quiet, expressive, or austere. Avoid
44
+ turning familiar signals such as serif headlines, beige surfaces, dark canvases,
45
+ hairlines, pills, and oversized type into unconditional definitions of quality.
46
+ Avoid prohibiting these choices universally for the same reason.
47
+
48
+ When the direction depends on assets, continue with
49
+ [creating-design-assets.md](./creating-design-assets.md): specify and realize
50
+ the subject, treatment, crop, font source, and delivery constraints. Carry the
51
+ chosen direction across a full task with
52
+ [reviewing-a-journey.md](./reviewing-a-journey.md), and assess temporal quality
53
+ using [reviewing-motion.md](./reviewing-motion.md). Read these when relevant;
54
+ three first-view studies alone do not establish full-product consistency.
55
+
56
+ ## Compare rendered alternatives
57
+
58
+ Start alternatives from different answers to the user's problem, rather than
59
+ assigning an editorial, poster, and dashboard look to every brief. For each
60
+ proposal state what the visitor should notice first, how they reach the first
61
+ useful action, and what information remains visible while deciding. Then choose
62
+ type, color, imagery and density that support that answer. Those familiar styles
63
+ remain valid when the brief warrants them; their presence is not evidence of range.
64
+
65
+ Compare across recent builds as well as within this set. If unrelated briefs keep
66
+ receiving the same headline treatment, section order and card geometry, revisit
67
+ one direction's information structure. Do not introduce novelty that makes the
68
+ task harder merely to increase difference. Record that tradeoff explicitly.
69
+
70
+ When requested alternatives or a consequential design choice needs comparison,
71
+ build bounded studies: the first
72
+ viewport and one representative interaction, including a mobile adaptation.
73
+ Use the same content and function. Change composition or information rhythm as
74
+ well as another meaningful axis. Palette swaps alone do not explore a direction.
75
+ For a small refinement or a user-pinned identity, keep the existing direction and
76
+ compare only the decision in question. A new build can proceed directly from its
77
+ brief and selected preset. The `explore` tool requires three to six evidence-bound
78
+ directions; smaller comparisons can be delivered directly.
79
+
80
+ ```bash
81
+ npx sable explore --template > design/exploration.json
82
+ npx sable explore --check design/exploration.json --json
83
+ npx sable explore --compare design/exploration.json --json
84
+ ```
85
+
86
+ Fill the template after rendering, with project-relative artifact paths and exact
87
+ SHA-256 hashes. Each direction needs desktop, mobile, and interaction evidence.
88
+ The validator checks declared differences and file integrity. It cannot determine
89
+ whether different prose describes visually identical layouts; inspect the images.
90
+ An interaction screenshot proves a state, not easing, duration, or interruption.
91
+ Observe behavior or retain a recording when temporal quality is being assessed.
92
+
93
+ Open the generated comparison HTML. It initially hides direction names and
94
+ rationales so the brief and rendered work lead the judgment. Inspect the captures
95
+ at a useful size. A comparison can end in a tie. Develop the selected direction,
96
+ then perform the full rendered review and repair the observed defects.
97
+
98
+ When work has a time or cost limit, make the bounded studies runnable early and
99
+ reserve time for an actual first-use check. Prioritize the primary flow, loaded
100
+ assets and narrow-screen layout before extra explanatory records. Save a small
101
+ checkpoint after each direction: files produced, states operated, defects found,
102
+ and checks still untested. A timeout with screenshots is still an incomplete run;
103
+ do not silently retry it as though the failed attempt never happened.
104
+
105
+ ## Keep personal judgment separate from craft lessons
106
+
107
+ The comparison page exports a preference JSON; it does not silently write to a
108
+ project or update a model. Record the exported file from the project root:
109
+
110
+ ```bash
111
+ npx sable prefer --record design/preference.json
112
+ npx sable prefer --search "hierarchy" --scope project:example --json
113
+ npx sable prefer --check --json
114
+ ```
115
+
116
+ Record the chosen option or tie, both accepted and rejected alternatives, the
117
+ reason, the brief, scope, and the actual reviewer. Supported scopes are personal,
118
+ project, brand, and task-type. Search requires a scope so a choice for one context
119
+ does not quietly become a rule everywhere. Human attribution is self-reported;
120
+ the offline CLI cannot authenticate the reviewer. Never author an agent's choice
121
+ as a human preference. Agent observations are excluded from retrieval by default;
122
+ use `--reviewer agent` or `--reviewer all` when explicitly reviewing those records.
123
+
124
+ Version the `.sable/preferences/` records with their evidence. Bring a record to
125
+ another project deliberately with its linked artifacts and matching scope; there
126
+ is no hidden cross-project collection. A saved record affects the next build only
127
+ when an agent retrieves, inspects, and applies it. Respect explicit current user
128
+ instructions over earlier preference records. Keep counterexamples and changed
129
+ preferences as new records rather than rewriting a past decision.
130
+
131
+ Use `sable learn` for observed causal lessons, such as a text-control collision
132
+ under zoom. Use `sable prefer` for judgments among viable alternatives. Promote a
133
+ lesson into general guidance only after reviewing its transfer to another domain.
134
+
135
+ ## Test transfer, quality, and range independently
136
+
137
+ Use the local comparison HTML generated by `sable explore --compare` when
138
+ alternatives need review. Attribute choices to the actual reviewer; agent
139
+ observations do not become human preferences. For a reusable design input,
140
+ follow [creating-a-preset.md](./creating-a-preset.md).
141
+
142
+ Freeze unfamiliar briefs and their content. Compare the old workflow against the
143
+ new one under the same model, time/effort budget, assets, and task constraints.
144
+ Keep the test briefs out of reference curation. Preserve source and rendered
145
+ artifacts for each run; do not edit a frozen baseline to improve its score.
146
+
147
+ Review anonymously, with ties allowed, against audience fit, hierarchy, spatial
148
+ rhythm, color/material coherence, interaction clarity, motion, and adaptation.
149
+ Check task completion and accessibility separately. Compare stylistic range
150
+ across the batch; novelty does not excuse poor usability or an incoherent page.
151
+ Independent agent critique is useful evidence, not a substitute for actual human
152
+ preferences. Calibrate any automated ranking against human comparisons before
153
+ claiming that it predicts a person's taste. A few proof builds establish workflow
154
+ feasibility; repeated held-out comparisons are needed to establish a quality lift.
155
+
156
+ This process improves retrieved context, decisions, and memory. It does not
157
+ fine-tune the agent's underlying model or guarantee universal aesthetic quality.
@@ -0,0 +1,63 @@
1
+ # Get started with Sable
2
+
3
+ Sable is on npm as `@sableui/react`. The installed version's `registry.json`
4
+ consume block has the exact recipe. Requirements: React 19, React DOM 19, and
5
+ Tailwind CSS 4 integrated into your build.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ pnpm add @sableui/react
11
+ ```
12
+
13
+ ## Connect CSS and React
14
+
15
+ For `src/styles.css` with `node_modules` at the project root:
16
+
17
+ ```css
18
+ @import "tailwindcss";
19
+ @import "@sableui/react/styles.css";
20
+ @source "../node_modules/@sableui/react/dist/**/*.{js,mjs}";
21
+ ```
22
+
23
+ Adjust the relative `@source` path to your stylesheet's location. Import this
24
+ stylesheet from your app entry. For Vite, preserve your plugins and add
25
+ `resolve: { dedupe: ["react", "react-dom"] }` to its configuration. Load Figtree
26
+ and DM Mono through your font setup, or customize the font tokens.
27
+
28
+ ```tsx
29
+ import { Button } from "@sableui/react"
30
+ import "./styles.css"
31
+
32
+ export default function App() {
33
+ return <Button>Save changes</Button>
34
+ }
35
+ ```
36
+
37
+ No provider or icon dependency is required for this first component. Optional
38
+ theme, icon, and motion providers are explained in the package README.
39
+
40
+ ## Connect your agent and verify
41
+
42
+ ```bash
43
+ pnpm exec sable setup --agent --dry-run
44
+ pnpm exec sable setup --agent
45
+ pnpm exec sable doctor
46
+ ```
47
+
48
+ After installing Sable, run `pnpm exec sable setup --agent` in the target
49
+ project. It installs discoverable entry files in `.agents/skills/sable` for
50
+ Codex/Cursor and `.claude/skills/sable` for Claude Code; `--target` selects a host.
51
+ Each entry resolves `skills/sable/SKILL.md` from the installed package, so package
52
+ upgrades also update the workflow. Other agents can read that file directly.
53
+ Use `$sable build <idea>`, `inspire <references>`, `audit <target>`, or
54
+ `polish <target>` in Codex; use `/sable` with the same modes in Claude Code or
55
+ Cursor. `create` is a build alias. These are agent modes, not shell commands.
56
+
57
+ Upgrade with `pnpm update @sableui/react --latest`, then
58
+ `pnpm exec sable setup --agent --update`. Setup only replaces managed files
59
+ that have not been locally edited; `--dry-run` checks without writing. Keep
60
+ project preferences in project instructions. Package installation alone does not
61
+ change agent settings. See [building-with-sable.md](./building-with-sable.md),
62
+ [creating-a-preset.md](./creating-a-preset.md), and
63
+ [using-presets.md](./using-presets.md).
@@ -0,0 +1,74 @@
1
+ # Task: learning from audits and builds
2
+
3
+ A useful lesson connects a decision to an observed consequence and says where it
4
+ stops applying. "Use bigger type" is not enough. "A display-led section lost its
5
+ hierarchy when the feature title used the compact card tier; matching the tier,
6
+ measure, and surrounding spacing restored emphasis" is a testable lesson.
7
+
8
+ ## Retrieve before inventing
9
+
10
+ ```bash
11
+ npx sable learn --search "motion workspace" --json
12
+ npx sable learn --show motion-needs-a-reason --json
13
+ ```
14
+
15
+ The command reads packaged precedents and the current project's
16
+ `.sable/lessons/*.json`. It works offline at the installed package version and
17
+ does not require a plugin. Entries carry `appliesWhen`, `avoidWhen`, origin,
18
+ confidence, and evidence. A search match is a candidate; inspect the conditions
19
+ before applying it. Curated precedents preserve earlier observed failure mechanisms
20
+ in shipped markdown. They are not fresh tests of the current build.
21
+
22
+ ## Record observed consequences as lessons
23
+
24
+ After [reviewing-a-design.md](./reviewing-a-design.md), distill zero or one new
25
+ lesson unless several independent discoveries warrant records. Search first to
26
+ avoid duplicates. Record the failed hypothesis too when it explains a boundary.
27
+
28
+ ```bash
29
+ npx sable learn --template > design/lesson.json
30
+ ```
31
+
32
+ Fill the template with a specific id, searchable tags, mode/register, principle,
33
+ conditions for applying and avoiding it, observed before/after change, date,
34
+ reviewer, source build, and Sable version. Evidence paths are relative to the
35
+ project root, unlike review artifacts which are relative to their review JSON.
36
+ Link distinct, existing before and after artifacts and describe what was observed.
37
+ Reference the associated design review in the source description.
38
+
39
+ ```bash
40
+ npx sable learn --record design/lesson.json
41
+ npx sable learn --check
42
+ ```
43
+
44
+ Run from the project root. Recording writes a new `.sable/lessons/<id>.json` with
45
+ exclusive creation; it refuses duplicate ids and never edits the installed package.
46
+ Version those files with the project and retain the linked artifacts. Package
47
+ upgrades preserve this local memory. Missing artifacts are reported as errors, not
48
+ silently ignored. The CLI does not send evidence anywhere.
49
+
50
+ All local records remain `provisional`, including a human's record. Artifact
51
+ existence validates traceability, not the reviewer's conclusion. Reuse a lesson in
52
+ a different composition or domain before treating it as broad guidance. If it
53
+ fails, preserve that counterexample in a distinct, related lesson rather than
54
+ rewriting history. Maintainers can curate repeated, scoped findings into bundled
55
+ precedents with a source record and explicit transfer boundaries.
56
+
57
+ ## Keep learning portable
58
+
59
+ Store general decisions in lessons; keep customer data, brand assets, and detailed
60
+ private audit captures in the project evidence. Distributed precedents should be
61
+ neutral and specific. A visual technique should never become a global rule just
62
+ because it worked for one dark technical page. Typography weight, square versus
63
+ round shape, accent restraint, and scroll choreography all depend on the brief.
64
+
65
+ Use the package CLI to retrieve guidance, build, inspect, and record what you learn.
66
+
67
+ ## Record preferences in their own memory
68
+
69
+ `sable prefer` stores comparisons between rendered alternatives, a choice or tie,
70
+ the reason, reviewer, and personal/project/brand/task-type scope. It does not turn
71
+ a subjective choice into a correctness rule. `sable explore` creates the local
72
+ comparison interface and export. See [developing-taste.md](./developing-taste.md)
73
+ for the visual atlas, scoped retrieval, comparison workflow, and transfer tests.
74
+ Only label a record human when it reflects an actual human's stated judgment.
@@ -0,0 +1,114 @@
1
+ # Task: reviewing a rendered design
2
+
3
+ Review has two separate results: code conformance and observed design quality.
4
+ `sable grade` checks source; it cannot see a screen, operate a flow, or judge taste.
5
+ Its pattern similarity is descriptive. Original composition is not a defect.
6
+
7
+ ## Capture a reviewable build
8
+
9
+ Save the surface brief, then capture the rendered route at a desktop width of at
10
+ least 1024px and a mobile width of at most 480px. Record the actual viewport,
11
+ route/state, supported color mode, and motion setting with each artifact. Inspect
12
+ the whole route as well as its first viewport. Ensure fonts and media have loaded.
13
+ Use a recording or an observed interaction report for behavior that a still cannot
14
+ show. Include reduced motion and every color mode the surface promises to support.
15
+
16
+ For connected routes, extend this review with
17
+ [reviewing-a-journey.md](./reviewing-a-journey.md), following the complete task and
18
+ recovery rather than judging isolated screens. For temporal behavior, use
19
+ [reviewing-motion.md](./reviewing-motion.md) to retain and inspect playable
20
+ evidence or a timestamped frame sequence with its limits. For identity-bearing
21
+ media and fonts, verify the actual assets, responsive crops, and fallbacks using
22
+ [creating-design-assets.md](./creating-design-assets.md).
23
+
24
+ ```bash
25
+ npx sable grade src --json
26
+ npx sable grade --template > design/review.json
27
+ ```
28
+
29
+ The first command reports `sourceHash`. Copy it into `build.sourceHash` in the
30
+ review template for the source you captured. Source changes invalidate that record;
31
+ re-capture affected states and update the hash after a repair. Artifact paths are
32
+ relative to the review JSON. The fingerprint covers all non-test files in the
33
+ supplied targets and Sable's runtime implementation, registry, and lint contract.
34
+ Use `sable grade src public --json` when images or fonts live in `public`; remote
35
+ resources are outside its coverage. Keep review JSON and captures outside those
36
+ targets so the review does not fingerprint itself. On shells with non-UTF-8
37
+ redirection defaults, save the template as UTF-8 JSON.
38
+
39
+ Source fingerprints normalize CRLF to LF in known text formats so the same
40
+ checkout remains identifiable on Windows and Linux. Binary assets and artifact
41
+ hashes retain their exact bytes. Before/after iteration records must reference
42
+ distinct capture files; assigning a second artifact ID to one file is insufficient.
43
+
44
+ Each artifact also requires a `sha256` hash of its inspected bytes. Running the
45
+ grader with `--review` reports `review.artifactHashes` for the current files. Copy
46
+ those values into artifact records only after inspecting the corresponding files;
47
+ replacing a capture at the same path then makes the review incomplete. Neither
48
+ the source fingerprint nor an artifact hash proves someone inspected the screen.
49
+
50
+ ## Review these eight dimensions
51
+
52
+ | Dimension id | Look for concrete evidence |
53
+ |---|---|
54
+ | `purpose-story` | The user's task is clear, copy is specific, evidence precedes a request to act, and sections advance the story or workflow. |
55
+ | `hierarchy-type` | A clear focal point, meaningful contrast, intentional wrapping, legible real fonts, and a valid heading outline. |
56
+ | `layout-rhythm` | Shared anchors, coherent spacing relationships, useful density, and appropriate grouping rather than repeated default boxes. |
57
+ | `color-material` | Surface and ink pairs remain legible, accent has a job, imagery fits the direction, and all interactive states work. |
58
+ | `interaction` | The primary flow completes; hover, focus, loading, errors, empty states, and success communicate what happened. |
59
+ | `motion` | Transitions explain a change, timing suits use frequency, interruption behaves, and reduced motion keeps content available. |
60
+ | `responsive` | Content priority survives narrow widths, controls remain operable, text and media fit, and intended scroll regions are discoverable. |
61
+ | `accessibility` | Keyboard order, visible focus, names/roles, contrast, announcements, and touch targets work in the rendered context. |
62
+
63
+ For dense catalogues, inspect actual item names and values at phone width. A
64
+ table that fits the viewport can still crush its identifying column into a few
65
+ characters per line. Choose a readable row/card adaptation or a clearly
66
+ discoverable scroll region, preserving labels and access to the required fields.
67
+ Check long names, not only short placeholders. Inspect edge fades over the first
68
+ and last items too: a scroll hint must not wash out their text or actions.
69
+
70
+ For each dimension use `pass`, `revise`, or `untested`, with a specific observation
71
+ and supporting artifact IDs. Record the required behavioral checks separately:
72
+ `primary-flow`, `keyboard`, `overflow`, and `reduced-motion`. Do not mark a check
73
+ passed just because a component's underlying primitive supports it.
74
+
75
+ Before polishing, operate the first useful action from a fresh opening state at
76
+ both widths. A desktop sidebar often lands after a long introduction on mobile.
77
+ Check whether that order serves this task. When explanation genuinely comes
78
+ first, provide and test a clear route to the action; do not universally force a
79
+ button above the fold. Record what the visitor can understand and do before
80
+ scrolling, and what the next scroll reveals.
81
+
82
+ Inspect section boundaries and layered imagery at normal size and increased text
83
+ size. Negative margins, fixed-height heroes and positioned decoration can clip
84
+ labels or obscure live controls even when there is no horizontal overflow and
85
+ the heading outline is valid. Check that every control's visible area is also
86
+ clickable. Prefer a separate space for decoration when overlap has no purpose;
87
+ keep intentional overlaps only after verifying text, hit targets and narrow
88
+ layouts. An accessibility scan alone cannot settle this visual check.
89
+
90
+ Use opaque `focus-visible:ring-ring` or `ring-sidebar-ring`; reducing the ring to
91
+ `/40` or `/50` alpha can erase its contrast against the surface. The shared
92
+ `faded-focus-ring` rule catches those classes. A token contrast report establishes
93
+ the tested pairs, not the entire rendered product's accessibility.
94
+
95
+ Describe a defect as a visible or behavioral consequence: "The heading wraps to
96
+ six lines at 390px and pushes the action below the intended first decision point."
97
+ Then record the repair and before/after artifact IDs in `iterations`. Avoid vague
98
+ scores such as "feels 9/10 premium." Mark unsupported or uninspected claims untested.
99
+
100
+ ```bash
101
+ npx sable grade src --review design/review.json --json --strict
102
+ ```
103
+
104
+ The evidence validator checks the record's completeness, artifact existence, and
105
+ source identity. `review-recorded` means the stated review is complete; it is not
106
+ an independent visual judgment. `evidence-incomplete` and `revision-needed` must
107
+ not be presented as approved work. Keep remaining issues explicit in `openIssues`.
108
+
109
+ For system changes, prove transfer with distinct original surfaces whose
110
+ information architecture differs: for example, a reading or persuasion page and
111
+ an operating tool. Keep the same content truth across iterations. Compare the
112
+ results against each brief, rather than against how closely they resemble Sable's
113
+ existing reference pages. Then capture a conditional lesson using
114
+ [learning-from-builds.md](./learning-from-builds.md).
@@ -0,0 +1,84 @@
1
+ # Task: review a complete product journey
2
+
3
+ A polished opening can lead into an incoherent or unfinished product. Use this
4
+ workflow when the request spans connected routes or a meaningful sequence of
5
+ states. It extends [reviewing-a-design.md](./reviewing-a-design.md); a one-control
6
+ refinement does not need a product-wide audit.
7
+
8
+ ## Define the path and what must stay consistent
9
+
10
+ Write the user's starting situation, intended result, and the shortest meaningful
11
+ path. Include a recovery or reversal that matters to that task. For example:
12
+ discover a workshop → inspect details → choose date and seats → enter attendee
13
+ details → confirm → revisit, change, or cancel the booking. A demo may keep data
14
+ locally, but must communicate that boundary and demonstrate its actual outcome.
15
+
16
+ Keep a compact journey record beside the brief. Use a table or project-owned JSON;
17
+ this is not a new Sable CLI schema:
18
+
19
+ | Step | Route/state | User question and action | Carries forward | Review evidence |
20
+ |---|---|---|---|---|
21
+ | Choose | Workshop detail | Is this suitable, and which date works? | Workshop, date, seat count | Actual desktop/mobile state and exercised selection |
22
+ | Commit | Attendee form | What is required, and what happens next? | Selection plus valid entries | Error, correction, pending, and success where implemented |
23
+ | Return | Booking detail | What did I arrange, and how can I change it? | Confirmed result and current status | Re-entry, change, cancellation, or recovery |
24
+
25
+ Record shared terms, navigation, type roles, color meanings, action hierarchy,
26
+ form treatment, spacing anchors, and motion policy once. Preserve those across
27
+ the path. Allow purposeful differences: discovery can be expressive while entry
28
+ is compact and confirmation is calm. Consistency does not mean identical layouts.
29
+
30
+ ## Review transitions as well as screens
31
+
32
+ Operate the primary path with real state changes. Check the selected item, count,
33
+ price or other task facts where present; do not silently reset them between pages.
34
+ Inspect forward navigation, browser Back, re-entry, and refresh according to the
35
+ product's promised persistence. Use isolated fixtures for local testing.
36
+
37
+ A successful storage write is only half of persistence. Confirm a record, reload
38
+ with the same browser storage, and verify that the UI restores the exact saved
39
+ choice. Then change it, cancel it, and reload again. Test invalid stored data or
40
+ denied storage when the app claims to handle them. A confirmation screenshot and
41
+ the presence of a localStorage key do not prove restoration. When an edit is
42
+ abandoned, preserve the last confirmed record unless the user explicitly deleted
43
+ it; describe save and removal failures according to what may survive a reload.
44
+
45
+ Exercise the relevant failure and recovery cases: unavailable choices, validation,
46
+ slow or failed saves, empty results, duplicates, and cancellation. Select cases
47
+ from the actual behavior rather than adding a checklist of imaginary features.
48
+ User input should survive a recoverable error when appropriate; retry should not
49
+ silently duplicate an action. A success message must describe what really happened.
50
+
51
+ Follow keyboard focus through each transition and through removal of a focused
52
+ control. Check headings, names, visible focus, and announcements in context.
53
+ Repeat the important path on a narrow viewport using touch-sized controls; a
54
+ stacked layout alone does not prove mobile completion. Review supported color
55
+ modes and reduced motion. Use [reviewing-motion.md](./reviewing-motion.md) for
56
+ behavior whose quality depends on time or interruption.
57
+
58
+ ## Compare the whole path visually
59
+
60
+ Create a contact sheet or local review page in journey order, with full-size
61
+ captures available. Look for drift that is difficult to notice one page at a time:
62
+ changing content width without a task reason, multiple names for one action,
63
+ inconsistent primary-button hierarchy, unstable selected/error colors, changing
64
+ font character, unrelated empty-state art, or large jumps in density.
65
+
66
+ Then revisit each transition live. The contact sheet cannot prove preserved
67
+ state, focus destination, completion, or animation quality. Distinguish deliberate
68
+ changes in emphasis from accidental inconsistency; do not flatten every route
69
+ into the same shell to make the sheet look uniform.
70
+
71
+ ## Repair and keep the evidence honest
72
+
73
+ Fix the smallest shared cause when a defect repeats. Review at least the affected
74
+ routes after changing a shared token or component; a local fix that shifts every
75
+ form is not contained to the screenshot where it was noticed. Preserve the
76
+ selected identity unless the user asks for a new direction.
77
+
78
+ Retain the journey table, route/state captures, relevant interaction reports or
79
+ recordings, source identity, and unresolved items. Existing `sable grade` review
80
+ records can reference these as screenshot, recording, or report artifacts. Their
81
+ hashes establish identity, not that the journey was correctly exercised. Report
82
+ which path completed, which failures were tested, and which boundaries remain
83
+ simulated or untested. A working isolated journey is evidence of that journey;
84
+ broader product reliability and preference claims need broader evaluation.