@nurix/etna 0.18.19 → 0.18.21

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 (283) hide show
  1. package/README.md +1 -1
  2. package/data/harness-index.json +1 -1
  3. package/data/harnesses/code/CLAUDE.md +1 -1
  4. package/data/harnesses/code/agents/brainstorm.md +1 -1
  5. package/data/harnesses/code/agents/maintenance.md +2 -2
  6. package/data/harnesses/code/harness.json +2 -2
  7. package/data/harnesses/code/rules/database.md +38 -0
  8. package/data/harnesses/code/rules/express.md +28 -0
  9. package/data/harnesses/code/rules/frontend.md +14 -0
  10. package/data/harnesses/code/rules/general.md +2 -40
  11. package/data/harnesses/code/rules/nomenclature.md +1 -8
  12. package/data/harnesses/code/rules/nustack.md +150 -0
  13. package/data/harnesses/code/skills/brainstorm/README.md +1 -1
  14. package/data/harnesses/code/skills/brainstorm/SKILL.md +1 -1
  15. package/data/harnesses/code/skills/brainstorm/exit-artifacts.md +4 -4
  16. package/data/harnesses/code/skills/brainstorm/templates/source-of-truth.md +3 -3
  17. package/data/harnesses/code/skills/design/SKILL.md +68 -0
  18. package/data/harnesses/code/skills/design/data/catalog/rules.csv +132 -0
  19. package/data/harnesses/code/skills/design/data/combinations/Readme.md +29 -0
  20. package/data/harnesses/code/skills/design/data/combinations/charts.csv +33 -0
  21. package/data/harnesses/code/skills/design/data/combinations/fonts-known.json +437 -0
  22. package/data/harnesses/code/skills/design/data/combinations/icons.csv +157 -0
  23. package/data/harnesses/code/skills/design/data/combinations/landing.csv +38 -0
  24. package/data/harnesses/code/skills/design/data/combinations/lucide-names.json +2001 -0
  25. package/data/harnesses/code/skills/design/data/combinations/manifest.json +283 -0
  26. package/data/harnesses/code/skills/design/data/combinations/palettes.csv +49 -0
  27. package/data/harnesses/code/skills/design/data/combinations/product-router.csv +80 -0
  28. package/data/harnesses/code/skills/design/data/combinations/styles.csv +54 -0
  29. package/data/harnesses/code/skills/design/data/combinations/typography.csv +61 -0
  30. package/data/harnesses/code/skills/design/data/design-md/SCHEMA.md +106 -0
  31. package/data/harnesses/code/skills/design/data/design-md/library/airbnb.md +154 -0
  32. package/data/harnesses/code/skills/design/data/design-md/library/airtable.md +151 -0
  33. package/data/harnesses/code/skills/design/data/design-md/library/anthropic-claude.md +139 -0
  34. package/data/harnesses/code/skills/design/data/design-md/library/apple.md +139 -0
  35. package/data/harnesses/code/skills/design/data/design-md/library/binance.md +140 -0
  36. package/data/harnesses/code/skills/design/data/design-md/library/bmw.md +140 -0
  37. package/data/harnesses/code/skills/design/data/design-md/library/cal.md +140 -0
  38. package/data/harnesses/code/skills/design/data/design-md/library/clay.md +139 -0
  39. package/data/harnesses/code/skills/design/data/design-md/library/clickhouse.md +139 -0
  40. package/data/harnesses/code/skills/design/data/design-md/library/cohere.md +147 -0
  41. package/data/harnesses/code/skills/design/data/design-md/library/coinbase.md +156 -0
  42. package/data/harnesses/code/skills/design/data/design-md/library/composio.md +138 -0
  43. package/data/harnesses/code/skills/design/data/design-md/library/cursor.md +138 -0
  44. package/data/harnesses/code/skills/design/data/design-md/library/elevenlabs.md +137 -0
  45. package/data/harnesses/code/skills/design/data/design-md/library/expo.md +148 -0
  46. package/data/harnesses/code/skills/design/data/design-md/library/figma.md +141 -0
  47. package/data/harnesses/code/skills/design/data/design-md/library/framer.md +156 -0
  48. package/data/harnesses/code/skills/design/data/design-md/library/hashicorp.md +140 -0
  49. package/data/harnesses/code/skills/design/data/design-md/library/ibm.md +153 -0
  50. package/data/harnesses/code/skills/design/data/design-md/library/intercom.md +158 -0
  51. package/data/harnesses/code/skills/design/data/design-md/library/kraken.md +156 -0
  52. package/data/harnesses/code/skills/design/data/design-md/library/linear-app.md +122 -0
  53. package/data/harnesses/code/skills/design/data/design-md/library/lovable.md +140 -0
  54. package/data/harnesses/code/skills/design/data/design-md/library/meta.md +139 -0
  55. package/data/harnesses/code/skills/design/data/design-md/library/minimax.md +139 -0
  56. package/data/harnesses/code/skills/design/data/design-md/library/mintlify.md +139 -0
  57. package/data/harnesses/code/skills/design/data/design-md/library/miro.md +153 -0
  58. package/data/harnesses/code/skills/design/data/design-md/library/mistral-ai.md +140 -0
  59. package/data/harnesses/code/skills/design/data/design-md/library/mongodb.md +155 -0
  60. package/data/harnesses/code/skills/design/data/design-md/library/notion.md +140 -0
  61. package/data/harnesses/code/skills/design/data/design-md/library/nvidia.md +141 -0
  62. package/data/harnesses/code/skills/design/data/design-md/library/ollama.md +145 -0
  63. package/data/harnesses/code/skills/design/data/design-md/library/opencode-ai.md +142 -0
  64. package/data/harnesses/code/skills/design/data/design-md/library/posthog.md +152 -0
  65. package/data/harnesses/code/skills/design/data/design-md/library/raycast.md +137 -0
  66. package/data/harnesses/code/skills/design/data/design-md/library/replicate.md +140 -0
  67. package/data/harnesses/code/skills/design/data/design-md/library/resend.md +170 -0
  68. package/data/harnesses/code/skills/design/data/design-md/library/revolut.md +145 -0
  69. package/data/harnesses/code/skills/design/data/design-md/library/runwayml.md +137 -0
  70. package/data/harnesses/code/skills/design/data/design-md/library/sanity.md +168 -0
  71. package/data/harnesses/code/skills/design/data/design-md/library/sentry.md +163 -0
  72. package/data/harnesses/code/skills/design/data/design-md/library/shopify.md +147 -0
  73. package/data/harnesses/code/skills/design/data/design-md/library/slack.md +158 -0
  74. package/data/harnesses/code/skills/design/data/design-md/library/spacex.md +171 -0
  75. package/data/harnesses/code/skills/design/data/design-md/library/spotify.md +166 -0
  76. package/data/harnesses/code/skills/design/data/design-md/library/stripe.md +160 -0
  77. package/data/harnesses/code/skills/design/data/design-md/library/supabase.md +173 -0
  78. package/data/harnesses/code/skills/design/data/design-md/library/superhuman.md +145 -0
  79. package/data/harnesses/code/skills/design/data/design-md/library/tesla.md +153 -0
  80. package/data/harnesses/code/skills/design/data/design-md/library/theverge.md +167 -0
  81. package/data/harnesses/code/skills/design/data/design-md/library/together-ai.md +140 -0
  82. package/data/harnesses/code/skills/design/data/design-md/library/uber.md +140 -0
  83. package/data/harnesses/code/skills/design/data/design-md/library/vercel.md +140 -0
  84. package/data/harnesses/code/skills/design/data/design-md/library/voltagent.md +130 -0
  85. package/data/harnesses/code/skills/design/data/design-md/library/warp.md +140 -0
  86. package/data/harnesses/code/skills/design/data/design-md/library/webflow.md +140 -0
  87. package/data/harnesses/code/skills/design/data/design-md/library/wired.md +139 -0
  88. package/data/harnesses/code/skills/design/data/design-md/library/wise.md +137 -0
  89. package/data/harnesses/code/skills/design/data/design-md/library/x-ai.md +138 -0
  90. package/data/harnesses/code/skills/design/data/design-md/library/zapier.md +158 -0
  91. package/data/harnesses/code/skills/design/data/design-md/nurix.md +134 -0
  92. package/data/harnesses/code/skills/design/data/design-tokens/SCHEMA.md +580 -0
  93. package/data/harnesses/code/skills/design/data/design-tokens/airbnb/design.resolver.json +20 -0
  94. package/data/harnesses/code/skills/design/data/design-tokens/airbnb/design.tokens.json +964 -0
  95. package/data/harnesses/code/skills/design/data/design-tokens/airtable/design.resolver.json +20 -0
  96. package/data/harnesses/code/skills/design/data/design-tokens/airtable/design.tokens.json +960 -0
  97. package/data/harnesses/code/skills/design/data/design-tokens/anthropic-claude/design.resolver.json +20 -0
  98. package/data/harnesses/code/skills/design/data/design-tokens/anthropic-claude/design.tokens.json +965 -0
  99. package/data/harnesses/code/skills/design/data/design-tokens/apple/design.resolver.json +20 -0
  100. package/data/harnesses/code/skills/design/data/design-tokens/apple/design.tokens.json +954 -0
  101. package/data/harnesses/code/skills/design/data/design-tokens/binance/design.resolver.json +20 -0
  102. package/data/harnesses/code/skills/design/data/design-tokens/binance/design.tokens.json +949 -0
  103. package/data/harnesses/code/skills/design/data/design-tokens/bmw/design.resolver.json +20 -0
  104. package/data/harnesses/code/skills/design/data/design-tokens/bmw/design.tokens.json +962 -0
  105. package/data/harnesses/code/skills/design/data/design-tokens/cal/design.resolver.json +20 -0
  106. package/data/harnesses/code/skills/design/data/design-tokens/cal/design.tokens.json +958 -0
  107. package/data/harnesses/code/skills/design/data/design-tokens/clay/design.resolver.json +20 -0
  108. package/data/harnesses/code/skills/design/data/design-tokens/clay/design.tokens.json +953 -0
  109. package/data/harnesses/code/skills/design/data/design-tokens/clickhouse/design.resolver.json +20 -0
  110. package/data/harnesses/code/skills/design/data/design-tokens/clickhouse/design.tokens.json +960 -0
  111. package/data/harnesses/code/skills/design/data/design-tokens/cohere/design.resolver.json +20 -0
  112. package/data/harnesses/code/skills/design/data/design-tokens/cohere/design.tokens.json +973 -0
  113. package/data/harnesses/code/skills/design/data/design-tokens/coinbase/design.resolver.json +20 -0
  114. package/data/harnesses/code/skills/design/data/design-tokens/coinbase/design.tokens.json +954 -0
  115. package/data/harnesses/code/skills/design/data/design-tokens/composio/design.resolver.json +20 -0
  116. package/data/harnesses/code/skills/design/data/design-tokens/composio/design.tokens.json +963 -0
  117. package/data/harnesses/code/skills/design/data/design-tokens/cursor/design.resolver.json +20 -0
  118. package/data/harnesses/code/skills/design/data/design-tokens/cursor/design.tokens.json +968 -0
  119. package/data/harnesses/code/skills/design/data/design-tokens/elevenlabs/design.resolver.json +20 -0
  120. package/data/harnesses/code/skills/design/data/design-tokens/elevenlabs/design.tokens.json +981 -0
  121. package/data/harnesses/code/skills/design/data/design-tokens/expo/design.resolver.json +20 -0
  122. package/data/harnesses/code/skills/design/data/design-tokens/expo/design.tokens.json +962 -0
  123. package/data/harnesses/code/skills/design/data/design-tokens/figma/design.resolver.json +20 -0
  124. package/data/harnesses/code/skills/design/data/design-tokens/figma/design.tokens.json +964 -0
  125. package/data/harnesses/code/skills/design/data/design-tokens/framer/design.resolver.json +20 -0
  126. package/data/harnesses/code/skills/design/data/design-tokens/framer/design.tokens.json +959 -0
  127. package/data/harnesses/code/skills/design/data/design-tokens/goldens.json +251 -0
  128. package/data/harnesses/code/skills/design/data/design-tokens/hashicorp/design.resolver.json +20 -0
  129. package/data/harnesses/code/skills/design/data/design-tokens/hashicorp/design.tokens.json +965 -0
  130. package/data/harnesses/code/skills/design/data/design-tokens/ibm/design.resolver.json +20 -0
  131. package/data/harnesses/code/skills/design/data/design-tokens/ibm/design.tokens.json +978 -0
  132. package/data/harnesses/code/skills/design/data/design-tokens/intercom/design.resolver.json +20 -0
  133. package/data/harnesses/code/skills/design/data/design-tokens/intercom/design.tokens.json +982 -0
  134. package/data/harnesses/code/skills/design/data/design-tokens/kraken/design.resolver.json +20 -0
  135. package/data/harnesses/code/skills/design/data/design-tokens/kraken/design.tokens.json +958 -0
  136. package/data/harnesses/code/skills/design/data/design-tokens/linear-app/design.resolver.json +23 -0
  137. package/data/harnesses/code/skills/design/data/design-tokens/linear-app/design.tokens.dark.json +589 -0
  138. package/data/harnesses/code/skills/design/data/design-tokens/linear-app/design.tokens.json +964 -0
  139. package/data/harnesses/code/skills/design/data/design-tokens/lovable/design.resolver.json +20 -0
  140. package/data/harnesses/code/skills/design/data/design-tokens/lovable/design.tokens.json +955 -0
  141. package/data/harnesses/code/skills/design/data/design-tokens/meta/design.resolver.json +20 -0
  142. package/data/harnesses/code/skills/design/data/design-tokens/meta/design.tokens.json +977 -0
  143. package/data/harnesses/code/skills/design/data/design-tokens/minimax/design.resolver.json +20 -0
  144. package/data/harnesses/code/skills/design/data/design-tokens/minimax/design.tokens.json +950 -0
  145. package/data/harnesses/code/skills/design/data/design-tokens/mintlify/design.resolver.json +20 -0
  146. package/data/harnesses/code/skills/design/data/design-tokens/mintlify/design.tokens.json +976 -0
  147. package/data/harnesses/code/skills/design/data/design-tokens/miro/design.resolver.json +20 -0
  148. package/data/harnesses/code/skills/design/data/design-tokens/miro/design.tokens.json +979 -0
  149. package/data/harnesses/code/skills/design/data/design-tokens/mistral-ai/design.resolver.json +20 -0
  150. package/data/harnesses/code/skills/design/data/design-tokens/mistral-ai/design.tokens.json +955 -0
  151. package/data/harnesses/code/skills/design/data/design-tokens/mongodb/design.resolver.json +20 -0
  152. package/data/harnesses/code/skills/design/data/design-tokens/mongodb/design.tokens.json +958 -0
  153. package/data/harnesses/code/skills/design/data/design-tokens/notion/design.resolver.json +20 -0
  154. package/data/harnesses/code/skills/design/data/design-tokens/notion/design.tokens.json +953 -0
  155. package/data/harnesses/code/skills/design/data/design-tokens/nurix/design.resolver.json +20 -0
  156. package/data/harnesses/code/skills/design/data/design-tokens/nurix/design.tokens.json +904 -0
  157. package/data/harnesses/code/skills/design/data/design-tokens/nvidia/design.resolver.json +20 -0
  158. package/data/harnesses/code/skills/design/data/design-tokens/nvidia/design.tokens.json +957 -0
  159. package/data/harnesses/code/skills/design/data/design-tokens/ollama/design.resolver.json +20 -0
  160. package/data/harnesses/code/skills/design/data/design-tokens/ollama/design.tokens.json +945 -0
  161. package/data/harnesses/code/skills/design/data/design-tokens/opencode-ai/design.resolver.json +20 -0
  162. package/data/harnesses/code/skills/design/data/design-tokens/opencode-ai/design.tokens.json +960 -0
  163. package/data/harnesses/code/skills/design/data/design-tokens/posthog/design.resolver.json +20 -0
  164. package/data/harnesses/code/skills/design/data/design-tokens/posthog/design.tokens.json +953 -0
  165. package/data/harnesses/code/skills/design/data/design-tokens/raycast/design.resolver.json +20 -0
  166. package/data/harnesses/code/skills/design/data/design-tokens/raycast/design.tokens.json +955 -0
  167. package/data/harnesses/code/skills/design/data/design-tokens/replicate/design.resolver.json +20 -0
  168. package/data/harnesses/code/skills/design/data/design-tokens/replicate/design.tokens.json +958 -0
  169. package/data/harnesses/code/skills/design/data/design-tokens/resend/design.resolver.json +23 -0
  170. package/data/harnesses/code/skills/design/data/design-tokens/resend/design.tokens.dark.json +613 -0
  171. package/data/harnesses/code/skills/design/data/design-tokens/resend/design.tokens.json +968 -0
  172. package/data/harnesses/code/skills/design/data/design-tokens/revolut/design.resolver.json +20 -0
  173. package/data/harnesses/code/skills/design/data/design-tokens/revolut/design.tokens.json +956 -0
  174. package/data/harnesses/code/skills/design/data/design-tokens/runwayml/design.resolver.json +20 -0
  175. package/data/harnesses/code/skills/design/data/design-tokens/runwayml/design.tokens.json +960 -0
  176. package/data/harnesses/code/skills/design/data/design-tokens/sanity/design.resolver.json +20 -0
  177. package/data/harnesses/code/skills/design/data/design-tokens/sanity/design.tokens.json +958 -0
  178. package/data/harnesses/code/skills/design/data/design-tokens/sentry/design.resolver.json +20 -0
  179. package/data/harnesses/code/skills/design/data/design-tokens/sentry/design.tokens.json +980 -0
  180. package/data/harnesses/code/skills/design/data/design-tokens/shopify/design.resolver.json +20 -0
  181. package/data/harnesses/code/skills/design/data/design-tokens/shopify/design.tokens.json +964 -0
  182. package/data/harnesses/code/skills/design/data/design-tokens/slack/design.resolver.json +20 -0
  183. package/data/harnesses/code/skills/design/data/design-tokens/slack/design.tokens.json +957 -0
  184. package/data/harnesses/code/skills/design/data/design-tokens/spacex/design.resolver.json +20 -0
  185. package/data/harnesses/code/skills/design/data/design-tokens/spacex/design.tokens.json +979 -0
  186. package/data/harnesses/code/skills/design/data/design-tokens/spotify/design.resolver.json +20 -0
  187. package/data/harnesses/code/skills/design/data/design-tokens/spotify/design.tokens.json +974 -0
  188. package/data/harnesses/code/skills/design/data/design-tokens/stripe/design.resolver.json +20 -0
  189. package/data/harnesses/code/skills/design/data/design-tokens/stripe/design.tokens.json +973 -0
  190. package/data/harnesses/code/skills/design/data/design-tokens/supabase/design.resolver.json +20 -0
  191. package/data/harnesses/code/skills/design/data/design-tokens/supabase/design.tokens.json +979 -0
  192. package/data/harnesses/code/skills/design/data/design-tokens/superhuman/design.resolver.json +20 -0
  193. package/data/harnesses/code/skills/design/data/design-tokens/superhuman/design.tokens.json +966 -0
  194. package/data/harnesses/code/skills/design/data/design-tokens/tesla/design.resolver.json +20 -0
  195. package/data/harnesses/code/skills/design/data/design-tokens/tesla/design.tokens.json +961 -0
  196. package/data/harnesses/code/skills/design/data/design-tokens/theverge/design.resolver.json +20 -0
  197. package/data/harnesses/code/skills/design/data/design-tokens/theverge/design.tokens.json +977 -0
  198. package/data/harnesses/code/skills/design/data/design-tokens/together-ai/design.resolver.json +20 -0
  199. package/data/harnesses/code/skills/design/data/design-tokens/together-ai/design.tokens.json +991 -0
  200. package/data/harnesses/code/skills/design/data/design-tokens/uber/design.resolver.json +20 -0
  201. package/data/harnesses/code/skills/design/data/design-tokens/uber/design.tokens.json +966 -0
  202. package/data/harnesses/code/skills/design/data/design-tokens/vercel/design.resolver.json +20 -0
  203. package/data/harnesses/code/skills/design/data/design-tokens/vercel/design.tokens.json +988 -0
  204. package/data/harnesses/code/skills/design/data/design-tokens/voltagent/design.resolver.json +23 -0
  205. package/data/harnesses/code/skills/design/data/design-tokens/voltagent/design.tokens.dark.json +602 -0
  206. package/data/harnesses/code/skills/design/data/design-tokens/voltagent/design.tokens.json +974 -0
  207. package/data/harnesses/code/skills/design/data/design-tokens/warp/design.resolver.json +20 -0
  208. package/data/harnesses/code/skills/design/data/design-tokens/warp/design.tokens.json +979 -0
  209. package/data/harnesses/code/skills/design/data/design-tokens/webflow/design.resolver.json +20 -0
  210. package/data/harnesses/code/skills/design/data/design-tokens/webflow/design.tokens.json +960 -0
  211. package/data/harnesses/code/skills/design/data/design-tokens/wired/design.resolver.json +20 -0
  212. package/data/harnesses/code/skills/design/data/design-tokens/wired/design.tokens.json +968 -0
  213. package/data/harnesses/code/skills/design/data/design-tokens/wise/design.resolver.json +20 -0
  214. package/data/harnesses/code/skills/design/data/design-tokens/wise/design.tokens.json +965 -0
  215. package/data/harnesses/code/skills/design/data/design-tokens/x-ai/design.resolver.json +20 -0
  216. package/data/harnesses/code/skills/design/data/design-tokens/x-ai/design.tokens.json +988 -0
  217. package/data/harnesses/code/skills/design/data/design-tokens/zapier/design.resolver.json +20 -0
  218. package/data/harnesses/code/skills/design/data/design-tokens/zapier/design.tokens.json +978 -0
  219. package/data/harnesses/code/skills/design/data/operator-pack/exemplars/command-center.tsx +249 -0
  220. package/data/harnesses/code/skills/design/data/operator-pack/exemplars/create-edit.tsx +249 -0
  221. package/data/harnesses/code/skills/design/data/operator-pack/exemplars/dashboard.tsx +248 -0
  222. package/data/harnesses/code/skills/design/data/operator-pack/exemplars/entity-detail.tsx +245 -0
  223. package/data/harnesses/code/skills/design/data/operator-pack/exemplars/list-detail.tsx +223 -0
  224. package/data/harnesses/code/skills/design/data/operator-pack/exemplars/log-stream.tsx +249 -0
  225. package/data/harnesses/code/skills/design/data/operator-pack/fixtures.md +88 -0
  226. package/data/harnesses/code/skills/design/data/operator-pack/surface-catalog.md +132 -0
  227. package/data/harnesses/code/skills/design/data/operator-pack/trust-rubric.md +76 -0
  228. package/data/harnesses/code/skills/design/references/create.md +131 -0
  229. package/data/harnesses/code/skills/design/references/diagnosis.md +108 -0
  230. package/data/harnesses/code/skills/design/references/hard-rules.md +155 -0
  231. package/data/harnesses/code/skills/design/references/improve.md +87 -0
  232. package/data/harnesses/code/skills/design/references/interaction.md +77 -0
  233. package/data/harnesses/code/skills/design/references/introspect.md +100 -0
  234. package/data/harnesses/code/skills/design/references/lifecycle.md +73 -0
  235. package/data/harnesses/code/skills/design/references/personality.md +428 -0
  236. package/data/harnesses/code/skills/design/references/structure.md +138 -0
  237. package/data/harnesses/code/skills/design/scripts/convert-design-md.mjs +1032 -0
  238. package/data/harnesses/code/skills/design/scripts/derive-personality.mjs +1006 -0
  239. package/data/harnesses/code/skills/design/scripts/generate-fixtures.mjs +551 -0
  240. package/data/harnesses/code/skills/design/scripts/lib/checks.mjs +903 -0
  241. package/data/harnesses/code/skills/design/scripts/lib/golden.mjs +26 -0
  242. package/data/harnesses/code/skills/design/scripts/phase-gate.mjs +454 -0
  243. package/data/harnesses/code/skills/design/scripts/preship-sweep.mjs +267 -0
  244. package/data/harnesses/code/skills/design/scripts/render-rung.mjs +690 -0
  245. package/data/harnesses/code/skills/design/scripts/scaffold.mjs +552 -0
  246. package/data/harnesses/code/skills/design/scripts/self-integrity.mjs +600 -0
  247. package/data/harnesses/code/skills/design/scripts/snapshot-goldens.mjs +68 -0
  248. package/data/harnesses/code/skills/design/scripts/validate-combinations.mjs +314 -0
  249. package/data/harnesses/code/skills/documentation/SKILL.md +61 -17
  250. package/data/harnesses/code/skills/documentation/references/examples.md +41 -0
  251. package/data/harnesses/code/skills/documentation/references/style-guide.md +14 -9
  252. package/data/harnesses/code/skills/documentation/references/templates.md +305 -51
  253. package/data/harnesses/etna/CLAUDE.md +1 -1
  254. package/data/harnesses/etna/agents/brainstorm.md +1 -1
  255. package/data/harnesses/etna/agents/maintenance.md +2 -2
  256. package/data/harnesses/etna/harness.json +2 -2
  257. package/data/harnesses/etna/rules/general.md +2 -40
  258. package/data/harnesses/etna/rules/nomenclature.md +1 -8
  259. package/data/harnesses/etna/skills/brainstorm/README.md +1 -1
  260. package/data/harnesses/etna/skills/brainstorm/SKILL.md +1 -1
  261. package/data/harnesses/etna/skills/brainstorm/exit-artifacts.md +4 -4
  262. package/data/harnesses/etna/skills/brainstorm/templates/source-of-truth.md +3 -3
  263. package/data/harnesses/etna/skills/documentation/SKILL.md +61 -17
  264. package/data/harnesses/etna/skills/documentation/references/examples.md +41 -0
  265. package/data/harnesses/etna/skills/documentation/references/style-guide.md +14 -9
  266. package/data/harnesses/etna/skills/documentation/references/templates.md +305 -51
  267. package/data/harnesses/mobile/CLAUDE.md +1 -1
  268. package/data/harnesses/mobile/agents/brainstorm.md +1 -1
  269. package/data/harnesses/mobile/agents/maintenance.md +2 -2
  270. package/data/harnesses/mobile/harness.json +2 -2
  271. package/data/harnesses/mobile/rules/database.md +38 -0
  272. package/data/harnesses/mobile/rules/general.md +2 -40
  273. package/data/harnesses/mobile/rules/nomenclature.md +1 -8
  274. package/data/harnesses/mobile/rules/nustack.md +150 -0
  275. package/data/harnesses/mobile/skills/brainstorm/README.md +1 -1
  276. package/data/harnesses/mobile/skills/brainstorm/SKILL.md +1 -1
  277. package/data/harnesses/mobile/skills/brainstorm/exit-artifacts.md +4 -4
  278. package/data/harnesses/mobile/skills/brainstorm/templates/source-of-truth.md +3 -3
  279. package/data/harnesses/mobile/skills/documentation/SKILL.md +61 -17
  280. package/data/harnesses/mobile/skills/documentation/references/examples.md +41 -0
  281. package/data/harnesses/mobile/skills/documentation/references/style-guide.md +14 -9
  282. package/data/harnesses/mobile/skills/documentation/references/templates.md +305 -51
  283. package/package.json +1 -1
package/README.md CHANGED
@@ -29,7 +29,7 @@ your-project/
29
29
  └── .claude/
30
30
  ├── skills/ ← documentation, boundary, brainstorm, workflow-mapper
31
31
  ├── agents/ ← lld-mode, brainstorm, maintenance, change-review, performance-review
32
- ├── rules/ ← general.md, nomenclature.md, typescript.md, testing.md
32
+ ├── rules/ ← general.md, frontend.md, express.md, nomenclature.md, database.md, typescript.md, testing.md
33
33
  ├── hooks/ ← generate-ownership-index (SessionStart)
34
34
  ├── settings.json ← the hook is deep-merged in here (your existing keys preserved)
35
35
  └── harness.json ← {version, digest} — the installed-harness sentinel
@@ -1,5 +1,5 @@
1
1
  {
2
- "fingerprint": "36cfdb5ed4f4",
2
+ "fingerprint": "e6c7761bdd49",
3
3
  "harnesses": {
4
4
  "code": {
5
5
  "plugin": "code",
@@ -45,7 +45,7 @@ Three peer modes plus a Completion step — enter wherever the user's thinking a
45
45
  **On Brainstorm Close** (a separate procedure — when a brainstorm session ends, not when a plan completes):
46
46
 
47
47
  - The session record lives at `docs/brainstorm/{topic}/` (committed, one subfolder per topic) and stays in place as provenance.
48
- - Harvest conclusions by scope: doctrine, glossary, non-goals, information-architecture changes → `docs/architecture/`; decisions → `docs/architecture/adr/`; backlog items → `docs/history/backlog.md`.
48
+ - Harvest conclusions by scope: doctrine, glossary, non-goals, information-architecture changes → `docs/architecture/`; decisions → `docs/architecture/decisions/` (one AD per subject — revising a recorded subject updates its AD in place); backlog items → `docs/history/backlog.md`.
49
49
  - Open questions block close.
50
50
 
51
51
  ---
@@ -14,7 +14,7 @@ You are a **thin orchestrator.** Every mechanic — the constant loop, the four
14
14
  ## When to offer a session
15
15
 
16
16
  - An explicit ask to think through a design at a strategic level (not "fix this bug" / "add this button"). This is the user invoking the work; hand it to `/brainstorm start`.
17
- - A user utterance **challenges a loaded pillar headline.** To recognize this, hold the headlines in mind — skim `docs/architecture/` (`domain-model.md`, `glossary.md`, `non-goals.md`, `open-questions.md`) and its `adr/` decision titles. The steering layer lives there; there are no `docs/modules/` or `docs/pillars/` folders. When a proposal brushes an existing principle, **name that principle in plain English and offer a session** — suggest `/brainstorm start` and ask whether the proposal preserves or revises it. Detection is yours; entry is the user's. **Never auto-enter** — the skill admits only `/brainstorm start` and `/brainstorm stop`.
17
+ - A user utterance **challenges a loaded pillar headline.** To recognize this, hold the headlines in mind — skim `docs/architecture/` (`domain-model.md`, `glossary.md`, `non-goals.md`, `open-questions.md`) and its `decisions/` AD titles. The steering layer lives there; there are no `docs/modules/` or `docs/pillars/` folders. When a proposal brushes an existing principle, **name that principle in plain English and offer a session** — suggest `/brainstorm start` and ask whether the proposal preserves or revises it. Detection is yours; entry is the user's. **Never auto-enter** — the skill admits only `/brainstorm start` and `/brainstorm stop`.
18
18
 
19
19
  If none of those steering files exist yet (a freshly-baselined repo), a session still runs from the skill's templates, and the basis gate seeds it from a reference doc or a one-shot brain dump.
20
20
 
@@ -127,11 +127,11 @@ docs/
127
127
  ├── structure.md # Authority map + frontmatter `harness-version` (you own this field)
128
128
  ├── architecture/ # Cross-module design + steering layer
129
129
  │ │ # domain-model, glossary, non-goals, references, open-questions
130
- │ └── adr/ # Architecture Decision Records (numbered, immutable)
130
+ │ └── decisions/ # Architecture Decisions (ADs — one per subject, updated in place; journey in each AD's Decision Changelog)
131
131
  ├── features/ # Feature specs — the only first-class doc unit (flat; ownership in each doc's `owns:` frontmatter)
132
132
  │ └── {group}/ # browse-only subfolder for grouping; NEVER a module; may carry a Readme.md
133
133
  ├── operations/ # Setup, development, deployment, CI/CD
134
- ├── brainstorm/ # Optional — kept design records, one {topic}/ subfolder per session (state.md + pillars/)
134
+ ├── brainstorm/ # Optional — kept design records, one {topic}/ subfolder per session (state.md + flat pillar files + basis/, evidence/)
135
135
  │ └── {topic}/ # created by the `brainstorm` skill; NOT scaffolded empty
136
136
  ├── history/
137
137
  │ ├── CHANGELOG.md # Master changelog index
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "harness": "code",
3
3
  "name": "code",
4
- "version": "3.1.3",
4
+ "version": "3.1.6",
5
5
  "files": [
6
6
  ".prettierrc.json",
7
7
  ".prettierignore",
8
8
  ".vscode/settings.json"
9
9
  ],
10
- "digest": "d078197b0b06"
10
+ "digest": "14662025ad2d"
11
11
  }
@@ -0,0 +1,38 @@
1
+ # Database
2
+
3
+ Fixed conventions for relational schemas — table/column/index **names**, the **key vocabulary** (`id` / `slug` / `label`), column types, and Drizzle mirrors — so the same concept carries the same name in **every** Nurix project. This is a cross-project consistency rule: **one concept, one name, everywhere** — never `slug` in one repo and `handle` / `key` / `code` in another. General code naming (variables, files, casing) is [`nomenclature.md`](nomenclature.md); this rule owns the database.
4
+
5
+ Written for SQLite / Cloudflare D1 + Drizzle (the concrete types below). The **names and key vocabulary are engine-agnostic** — a Postgres project keeps the same column names and semantics with native types (`uuid`, `timestamptz`, `boolean`).
6
+
7
+ ## Keys & the shared vocabulary
8
+
9
+ Three column roles are fixed across every table and every project:
10
+
11
+ - **`id`** — the primary key, **always a UUID** (`TEXT PRIMARY KEY` on D1, `uuid` on Postgres). Never a synthetic or natural key (`type_page_button`, `human:default` are ❌). Runtime rows mint a UUIDv7; seed rows derive a deterministic UUIDv5 of the natural key so re-seeds stay stable. Never mix synthetic and UUID ids in one table.
12
+ - **`slug`** — the **stable key other rows reference**: `UNIQUE`, lowercase `snake_case`. **Foreign keys point at `slug`, not `id`.** One concept = one slug name across every table and repo. ❌ Never rename this role `handle`, `key`, `code`, or `name` in a different project — it is always `slug`.
13
+ - **`label`** — the **human display name**. Always `label` — ❌ never `name`, `title`, or `display_name`.
14
+
15
+ Reference columns name what they point at: `<entity>_id` for a UUID-PK reference (`user_id`, `app_id`), `<entity>_slug` for a slug reference (`source_slug`).
16
+
17
+ - **Enforced** (the referenced row must exist) → a real `FOREIGN KEY (<x>_slug) REFERENCES <table>(slug)`.
18
+ - **Drift-tolerant** (a controlled-vocabulary value that may fall off-list) → a plain value column, **no** FK, paired with an `is_*` boolean recording whether the value is in the canonical set.
19
+
20
+ ## Naming
21
+
22
+ - **Tables** — `snake_case`, plural noun for what they hold (`users`, `apps`, `devices`).
23
+ - **Junction (M:N) tables** — `<entityA>_<entityB>_map`, **always**, even when the join carries its own columns; singular stems, owning/anchor entity first (`app_user_map`, `app_device_map`). ❌ Never a "nice" noun (`members`, `installs`, `memberships`, `enrolments`) — the name must read as a join, and a reviewer should know both sides from it.
24
+ - **Columns** — `snake_case`; booleans `is_*` / `has_*`; timestamps `created_at` / `updated_at`; foreign keys `<entity>_id`.
25
+ - **Indexes** — `<table>_<col(s)>_idx`; unique `<table>_<col(s)>_unique`; a junction's composite unique reads `<table>_<colA>_<colB>_unique` (`app_user_map_app_user_unique`).
26
+ - **Drizzle mirror** — the exported object is the camelCase table name (`app_user_map` → `appUserMap`); column props are the camelCase of the column (`created_at` → `createdAt`). The `sqliteTable("…")` string and every index name must match the DDL (`init.sql`) exactly — the schema-parity boundary.
27
+
28
+ ## Column types (SQLite / D1)
29
+
30
+ - **Timestamps** — `created_at` + `updated_at`, both `TEXT NOT NULL DEFAULT (datetime('now'))`, on **every** table — except append-only logs, which carry only `created_at`.
31
+ - **Booleans** — `INTEGER`, named `is_*` / `has_*` (Drizzle `integer(…, { mode: "boolean" })`).
32
+ - **JSON** — `TEXT` (Drizzle `text(…, { mode: "json" })`).
33
+
34
+ ## Vocabulary / lookup tables
35
+
36
+ A controlled-vocabulary table (statuses, kinds, categories) follows a fixed shape: `id` (UUID) · `slug` (UNIQUE) · `label` · optional `description` · `status` · timestamps.
37
+
38
+ - **Seeds are generated, never hand-written** — the source of truth is a CSV or a shared package; a generator emits the `*.seed.sql` with UUIDv5 ids and an idempotent `ON CONFLICT(slug)` upsert that preserves live counts / admin-tuned columns. Hand-editing seed SQL is ❌ — regenerate it.
@@ -0,0 +1,28 @@
1
+ # Express & API Format
2
+
3
+ Express 5.x server setup and the JSON response envelope every Nurix HTTP service returns — backend only. Package versions live in [`general.md`](general.md); web-frontend conventions in [`frontend.md`](frontend.md).
4
+
5
+ ## Express 5.x
6
+
7
+ ```javascript
8
+ app.use(cors({ origin: process.env.FRONTEND_URL }));
9
+ app.use(compression());
10
+ app.use(express.json({ limit: '10mb' }));
11
+ app.use(rateLimit({ windowMs: 15 * 60 * 1000, max: 100 }));
12
+ ```
13
+
14
+ - Middleware order: body parsers → custom middleware → routes → error handlers (centralized, last). Auth via middleware. Use Express Router for modular routes.
15
+
16
+ ## API Response Format
17
+
18
+ ```json
19
+ {
20
+ "status": 1,
21
+ "message": "Message sent successfully",
22
+ "data": { "delivered": [{ "user@example.com": 2 }] }
23
+ }
24
+ ```
25
+
26
+ Error: `{ "status": 0, "message": "Error description", "data": null }`
27
+
28
+ HTTP codes: `200`, `201` (created), `400`, `401` (not authenticated), `403` (not authorized), `404`, `500`
@@ -0,0 +1,14 @@
1
+ # Frontend
2
+
3
+ Tailwind v4 + shadcn-based UI conventions for **web** apps — styling, the `@nurix/components` library, personality tokens, and design-skill routing. Package versions live in [`general.md`](general.md); the Express server and API envelope in [`express.md`](express.md); React Native styling is out of scope — that's [`react-native.md`](react-native.md).
4
+
5
+ - **Build every UI through the `design` skill** — route the brief through it instead of hand-rolling layouts; it owns the archetype, personality tokens, and `@nurix/components` wiring.
6
+ - **Light mode is the default** — design for the light theme as the default; dark mode is opt-in, never the default.
7
+ - **@nurix/\* are restricted-scope npm packages** — installed from the npm registry, auto-authed by a read token in `~/.npmrc`. Just attempt the install; the token authenticates you automatically. Don't pre-empt or second-guess it. If the install actually fails, flag it to the user — never reach for alternatives, a substitute package, or `npm login`.
8
+ - **@nurix/components** — the UI component library (restricted-scope npm package, pre-built); import by subpath, e.g. `@nurix/components/button`.
9
+ - No components.json / shadcn CLI scaffold (.tsx, not .jsx) — consume the prebuilt library; never `npx shadcn add`.
10
+ - Vite: `@tailwindcss/vite` + `@vitejs/plugin-react-swc`. Pin react / react-dom / react/jsx-runtime / react/jsx-dev-runtime to the app's single copy via `resolve.alias` (@nurix/\* ship nested react — keep one hook dispatcher).
11
+ - Tailwind v4, CSS-only (no tailwind.config.js, no PostCSS): styling runs through the `@tailwindcss/vite` plugin.
12
+ - CSS entry `globals.css`, imports in order — `@import "./personality.css"` (token source) → `@import "tailwindcss"` → the library's `styles.css` — then `@theme inline {…}` mapping vars to tokens.
13
+ - Tokens: CSS vars in `:root, :root[data-theme="light"]` + the archetype selector `[data-style="…"]` (personality.css), consumed as semantic Tailwind tokens (bg-card, text-foreground). Honor the archetype's radius/theme decisions (e.g. re-assert `--radius-*` to 0 for a flat archetype; add `@custom-variant dark` only if the project opts into dark mode, and keep light as the default). The library bundles class-variance-authority, clsx, tailwind-merge.
14
+ - Plus general styling rules (spacing in 2/4/6/8, object-cover, truncate, motion, color tokens — never hardcoded hex in components).
@@ -1,5 +1,7 @@
1
1
  # General Standards
2
2
 
3
+ Runtime versions and the canonical package list — the workspace baseline every Nurix code harness loads. Web-frontend/styling conventions are [`frontend.md`](frontend.md); the Express server and the API response envelope are [`express.md`](express.md).
4
+
3
5
  ## Runtime Versions
4
6
 
5
7
  - **Node.js:** 22 LTS (latest)
@@ -45,43 +47,3 @@ No alternatives. Just use these.
45
47
  | fast-deep-equal | ^3.1.3 | Deep equality checks | lodash.isEqual |
46
48
  | @ngneat/falso | latest | Fake data generation | @faker-js/faker, chance |
47
49
  | pino | ^10.1.0 | Logging | winston |
48
-
49
- ## Frontend
50
-
51
- Tailwind v4 + shadcn-based UI; conventions below.
52
-
53
- - **Build every UI through the `design` skill** — route the brief through it instead of hand-rolling layouts; it owns the archetype, personality tokens, and `@nurix/components` wiring.
54
- - **Light mode is the default** — design for the light theme as the default; dark mode is opt-in, never the default.
55
- - **@nurix/\* are restricted-scope npm packages** — installed from the npm registry, auto-authed by a read token in `~/.npmrc`. Just attempt the install; the token authenticates you automatically. Don't pre-empt or second-guess it. If the install actually fails, flag it to the user — never reach for alternatives, a substitute package, or `npm login`.
56
- - **@nurix/components** — the UI component library (restricted-scope npm package, pre-built); import by subpath, e.g. `@nurix/components/button`.
57
- - No components.json / shadcn CLI scaffold (.tsx, not .jsx) — consume the prebuilt library; never `npx shadcn add`.
58
- - Vite: `@tailwindcss/vite` + `@vitejs/plugin-react-swc`. Pin react / react-dom / react/jsx-runtime / react/jsx-dev-runtime to the app's single copy via `resolve.alias` (@nurix/\* ship nested react — keep one hook dispatcher).
59
- - Tailwind v4, CSS-only (no tailwind.config.js, no PostCSS): styling runs through the `@tailwindcss/vite` plugin.
60
- - CSS entry `globals.css`, imports in order — `@import "./personality.css"` (token source) → `@import "tailwindcss"` → the library's `styles.css` — then `@theme inline {…}` mapping vars to tokens.
61
- - Tokens: CSS vars in `:root, :root[data-theme="light"]` + the archetype selector `[data-style="…"]` (personality.css), consumed as semantic Tailwind tokens (bg-card, text-foreground). Honor the archetype's radius/theme decisions (e.g. re-assert `--radius-*` to 0 for a flat archetype; add `@custom-variant dark` only if the project opts into dark mode, and keep light as the default). The library bundles class-variance-authority, clsx, tailwind-merge.
62
- - Plus general styling rules (spacing in 2/4/6/8, object-cover, truncate, motion, color tokens — never hardcoded hex in components).
63
-
64
- ## Express 5.x
65
-
66
- ```javascript
67
- app.use(cors({ origin: process.env.FRONTEND_URL }));
68
- app.use(compression());
69
- app.use(express.json({ limit: '10mb' }));
70
- app.use(rateLimit({ windowMs: 15 * 60 * 1000, max: 100 }));
71
- ```
72
-
73
- - Middleware order: body parsers → custom middleware → routes → error handlers (centralized, last). Auth via middleware. Use Express Router for modular routes.
74
-
75
- ## API Response Format
76
-
77
- ```json
78
- {
79
- "status": 1,
80
- "message": "Message sent successfully",
81
- "data": { "delivered": [{ "user@example.com": 2 }] }
82
- }
83
- ```
84
-
85
- Error: `{ "status": 0, "message": "Error description", "data": null }`
86
-
87
- HTTP codes: `200`, `201` (created), `400`, `401` (not authenticated), `403` (not authorized), `404`, `500`
@@ -31,11 +31,4 @@
31
31
 
32
32
  ## Database
33
33
 
34
- Naming for D1 tables, columns, indexes, and their Drizzle mirrors. (For column **types** — PK shape, timestamp columns — see the Cloudflare D1 Schema rule, not here; this section governs names only.)
35
-
36
- - **Tables** : snake_case. Entity / hub tables use the plural noun for the thing they hold. Examples: `users`, `apps`, `devices`, `services`.
37
- - **Junction (M:N) tables** : name a many-to-many join `<entityA>_<entityB>_map` — **always**, even when the join carries its own columns (a `role`, a secret, a status). The `_map` suffix is the signal that a row is a relationship, not an entity; extra attributes on the join do **not** earn it a standalone noun. Use the **singular** stem of each side, owning/anchor entity first (mirror the existing tables — `app_*`). Examples: `app_user_map` (apps ⨯ users), `app_device_map` (apps ⨯ devices), `app_service_map` (apps ⨯ services).
38
- - ❌ Don't invent a "nice" noun for a junction — no `members`, `installs`, `memberships`, `enrolments`. A reviewer should read the table name and know both sides and that it's a join.
39
- - **Columns** : snake_case. Foreign keys are `<entity>_id` (`user_id`, `app_id`, `device_id`, `service_id`). Booleans follow the boolean rule (`is_*`/`has_*`); timestamps are `created_at` / `updated_at`.
40
- - **Indexes** : `<table>_<col(s)>_idx`; unique indexes `<table>_<col(s)>_unique`. The composite unique on a junction reads `<table>_<colA>_<colB>_unique` — e.g. `app_user_map_app_user_unique`, `app_device_map_device_app_unique`.
41
- - **Drizzle mirror** : the exported table object is the camelCase of the snake_case table name (`app_user_map` → `appUserMap`); column TS properties are the camelCase of the column (`created_at` → `createdAt`, `service_key` → `serviceKey`). The snake_case string passed to `sqliteTable("…")` and every index name must match `seed/init.sql` exactly (the G1 schema-parity boundary).
34
+ Table, column, index, and key naming for relational schemas — the `id` / `slug` / `label` vocabulary, junction `_map` tables, and Drizzle mirrors — lives in [`database.md`](database.md), the cross-project database conventions rule. Kept there, not here, so there is one canonical home and the same concept carries the same name in every project.
@@ -0,0 +1,150 @@
1
+ # Nustack — `@nurix/*` Packages: naming, monorepo layout, and publishing
2
+
3
+ How a `@nurix/*` multi-package repo is **named**, **structured**, and **shipped**. For consuming an already-published `@nurix/*` package (auth, install, imports), see the Consuming section of [`typescript.md`](typescript.md).
4
+
5
+ ---
6
+
7
+ ## 1. Package naming
8
+
9
+ Every workspace package is scoped to **`@nurix/`**. The segment after the scope encodes **intent** — the dot vs. hyphen is semantic, not cosmetic:
10
+
11
+ | Form | Meaning | Examples |
12
+ | ----------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
13
+ | `@nurix/workflows-sdk` (hyphen, single segment) | The **published, externally-destined** surface. A clean `@nurix/*` name is a published _contract_ — changing an export or peer dep is a breaking change for consumers outside this repo. | `@nurix/workflows-sdk` |
14
+ | `@nurix/workflows.<name>` (dot separator) | **Internal** to the workflows product — `private: true`, refactor freely, no external consumers. | `@nurix/workflows.agent-core`, `.worker`, `.gateway`, `.secrets`, `.connector`, `.playground`, `.playground-tests` |
15
+ | `@nurix/<name>` (plain, no `workflows` prefix) | Cross-repo **shared libs** owned _elsewhere_ and merely consumed here — never renamed. | `@nurix/contracts`, `@nurix/components` |
16
+
17
+ - The `<name>` segment is always **kebab-case** (`agent-core`, `playground-tests`).
18
+ - The dot is **not** a path separator, so subpath exports still resolve: `@nurix/workflows.agent-core/nodes`.
19
+ - The dot tracks "internal product package," not the `private` flag exactly — `@nurix/workflows.secrets` is `private: false` because it's extraction-bound (slated to move to a sibling repo/namespace), yet still wears the dotted internal name. Today `-sdk` is the only clean published form.
20
+
21
+ **Naming a new package:** internal to this repo? → `@nurix/workflows.<thing>`, `private: true`, kebab-case `<thing>` (the default). Externally consumed contract? → clean `@nurix/<thing>` (rare). Shared lib from another repo? → keep its existing `@nurix/<name>`.
22
+
23
+ ---
24
+
25
+ ## 2. Monorepo & package boundaries
26
+
27
+ One `tsconfig.base.json` at the repo root is the **single owner of TS policy** — the strict set (see [`typescript.md`](typescript.md)), `target`, and any option uniform across packages (here, `module`/`moduleResolution`). Each package's `tsconfig.json` is thin: it `extends` the base, then adds only its own *coordinates* (`rootDir`/`outDir`/`include`) and genuine *environment* overrides (`lib`/`types`/`jsx`, plus `module`/`moduleResolution` when a package's module system genuinely differs — a Worker, browser, or NodeNext package). That is environment, not policy. Never re-declare or weaken a *policy* option locally (no per-package `strict: false`, no widening `noUncheckedIndexedAccess`). A framework that owns its own base (e.g. an Astro app on `astro/tsconfigs/strict`) is the one allowed exception.
28
+
29
+ - **Internal packages are source-first.** A `private: true` workspace package exposes its API through the `exports` field pointing at TypeScript source (`"types"`/`"default"` → `./src/index.ts`) — consumed across the workspace with **no build step**. Prefer the `exports` field; don't add a bare `main`/`module` to new packages. Add one typed subpath per public surface (`"./nodes": { "types": "./src/nodes/index.ts", "default": "./src/nodes/index.ts" }`); consumers import the subpath, **never** a deep relative path into another package's `src/`.
30
+ - **Published packages build to `dist` — never ship raw `src`.** The moment a package crosses a publish boundary (`private: false`), it compiles with `tsc` (`declaration: true`, `declarationMap: true` from the base), ships `files: ["dist"]`, and points `exports`/`types` at `./dist/*` (use `publishConfig.exports` to swap source→dist on publish if the dev entry stays on source). `prepublishOnly` runs the build.
31
+ - **Declare host singletons as `peerDependencies`** on published libraries (`react`, `react-dom`, the framework client) so consumers keep one copy; never bundle them. Apps depend on them directly.
32
+ - **Single-source shared dep versions with pnpm `catalog:`** — `typescript`, `zod`, `vitest`, `react`, type packages. One version per dependency across the workspace so every package's types resolve identically; no per-manifest version drift.
33
+ - **Reach for TS project references only when it hurts** — adopt `references` once the typecheck/build graph is slow enough to feel. Until then, `pnpm -r typecheck` over independent `extends` configs is the correct default.
34
+
35
+ ---
36
+
37
+ ## 3. Publishing & the release pipeline
38
+
39
+ `@nurix/*` packages publish to **npmjs.org with `restricted` access** — only npm users with read rights to the `nurix` org can install them. Reference implementations: `~/dev/components` (`@nurix/components`, library) and `~/dev/etna/packages/cli` (`@nurix/etna`, CLI).
40
+
41
+ ### 3.1 Prerequisites (one-time, org-wide)
42
+
43
+ 1. **npm org `nurix`** exists and you're a member with publish rights — <https://www.npmjs.com/settings/nurix/packages>.
44
+ 2. **An npm automation token** with `Read and write` for the `nurix` scope — npm → Generate New Token → Automation.
45
+ 3. **The token added as a GitHub Actions secret** named `NPM_PUBLISH_TOKEN` on every publishing repo. `NPM_PUBLISH_TOKEN` is the convention; pick another name only with a strong reason.
46
+
47
+ ### 3.2 `package.json` — required fields
48
+
49
+ ```jsonc
50
+ {
51
+ "name": "@nurix/<package-name>", // The scope makes it discoverable to org members.
52
+ "version": "0.1.0", // Start at 0.1.0; the workflow bumps from here.
53
+ "private": false, // MUST be false (or omitted). `npm publish` refuses if true.
54
+ "publishConfig": { "access": "restricted" }, // Scoped + private: only org members can install.
55
+ "files": ["dist"] // Whitelist of what ships. Anything outside is excluded.
56
+ }
57
+ ```
58
+
59
+ - **`publishConfig.access`** — `"restricted"` (recommended): visible only to `nurix`-org readers. `"public"`: world-readable (free, but only if you mean it). Omitting it on a scoped package defaults to `restricted`; be explicit anyway.
60
+ - **`files`** — without it, npm publishes everything not in `.gitignore`, **including source**. Library → `["dist"]`; CLI (etna) → `["bin/", "data/", "README.md"]`. Don't list `package.json`/`README.md` — npm always includes them.
61
+ - **Build hooks** — `prepack` for build steps that must produce files in `files` (also runs on install-as-git-dep); `prepublishOnly` for publish-only steps. Either alone is fine; `@nurix/components` runs both.
62
+ - **Other useful fields** — `type: "module"`, `engines.node`, `bin` (CLIs), `main`/`module`/`types`/`exports` (libraries), `sideEffects: ["**/*.css"]`, `repository` (with `directory` for monorepos), `license: "UNLICENSED"`.
63
+
64
+ ### 3.3 The publish workflow (generic template)
65
+
66
+ The dual-trigger pattern: a push to the default branch auto-ships a patch; a manual dispatch picks minor/major.
67
+
68
+ ```yaml
69
+ name: Publish to npm
70
+ on:
71
+ push:
72
+ branches: [dev] # your default branch
73
+ paths: # ONLY paths that change what ships — else every README edit publishes
74
+ - 'src/**'
75
+ - 'scripts/**'
76
+ - 'package.json'
77
+ - 'package-lock.json'
78
+ - '.github/workflows/publish.yml'
79
+ workflow_dispatch:
80
+ inputs:
81
+ bump: { description: 'Version bump', type: choice, options: [patch, minor, major], default: patch }
82
+ permissions: { contents: write } # push the version-bump commit + tag
83
+ concurrency: { group: publish, cancel-in-progress: false } # monorepo: group: publish-<pkg>
84
+ jobs:
85
+ publish:
86
+ runs-on: ubuntu-latest
87
+ steps:
88
+ - uses: actions/checkout@v5
89
+ with: { fetch-depth: 0, token: '${{ secrets.GITHUB_TOKEN }}' }
90
+ - uses: actions/setup-node@v5
91
+ with: { node-version: 22, registry-url: 'https://registry.npmjs.org' } # writes .npmrc using $NODE_AUTH_TOKEN
92
+ - run: npm ci # skip ONLY if the build is pure-Node with no deps (e.g. @nurix/etna)
93
+ - run: |
94
+ git config user.name "github-actions[bot]"
95
+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
96
+ - run: npm version ${{ inputs.bump || 'patch' }} -m "chore: release v%s [skip ci]"
97
+ - run: npm publish # prepublishOnly / prepack runs the build
98
+ env: { NODE_AUTH_TOKEN: '${{ secrets.NPM_PUBLISH_TOKEN }}' }
99
+ - run: git push --follow-tags # pushes the bump commit AND the v<version> tag npm created
100
+ ```
101
+
102
+ **Why dual-trigger is safe** — three safeguards prevent an infinite publish loop: (1) `paths:` scopes the push trigger to artifact-affecting files; (2) `[skip ci]` in the bump commit makes GitHub skip the workflow that bump would otherwise re-trigger; (3) `concurrency: cancel-in-progress: false` queues near-simultaneous merges instead of racing for a version number.
103
+
104
+ **`registry-url` is load-bearing** — without `registry-url: https://registry.npmjs.org` on `setup-node`, it never writes the `.npmrc` line that uses `$NODE_AUTH_TOKEN`, and the publish falls back to anonymous auth and fails.
105
+
106
+ ### 3.4 The three ways to ship
107
+
108
+ - **A. Auto on merge (common).** Land on the default branch; if a `paths:`-filtered file changed, the workflow fires and ships a patch.
109
+ - **B. Manual dispatch (minor/major).** **Actions → Publish to npm → Run workflow**, pick `bump = minor|major`.
110
+ - **C. Local (CI down / one-off):** `npm version <patch|minor|major>` → `npm publish` → `git push --follow-tags`.
111
+
112
+ Local auth uses two tokens, two homes: a **read** token in `~/.npmrc` (`//registry.npmjs.org/:_authToken=…`) for `npm install`, and `NPM_PUBLISH_TOKEN` as an env var (sourced from `~/.zsh_secrets` or equivalent, **not** in `.npmrc` or the repo) for `npm publish`.
113
+
114
+ > **Agent guard — if `NPM_PUBLISH_TOKEN` isn't in the environment, do not work around it.** No `npm login` to swap the user's auth, no rewriting `~/.npmrc`, no substituting the read token (it lacks publish rights → `403`), no `--registry` overrides, no temp-file token. Instead **stop and report**: "This repo can't publish locally — `NPM_PUBLISH_TOKEN` isn't set. Source `~/.zsh_secrets` (or wherever you keep it) and re-run, or trigger the CI workflow." Some users publish exclusively from CI — that's the default path for a reason.
115
+
116
+ Verify after any flow: `https://www.npmjs.com/package/@nurix/<name>` and a clean-dir `npx @nurix/<name>@latest`.
117
+
118
+ ### 3.5 Monorepo deviations
119
+
120
+ When the package lives in `packages/<pkg>/` of a multi-package repo:
121
+
122
+ - **`working-directory: packages/<pkg>`** on the bump and publish steps so they operate on the right `package.json`.
123
+ - **Scoped concurrency** — `group: publish-<pkg>` lets sibling packages publish in parallel.
124
+ - **Tag prefix — only with multiple tagging packages.** `npm version --tag-version-prefix="<pkg>-v"` (→ `<pkg>-v0.2.0`) is worth it only when more than one package cuts release tags, so they don't collide. A single publishable package (etna's case, even though it's laid out as a monorepo) uses plain `v0.2.0`.
125
+
126
+ A repo with one publishable package only needs `working-directory`; skip the prefix, and concurrency scoping is optional.
127
+
128
+ ### 3.6 Common pitfalls
129
+
130
+ - **402 Payment Required** — `access: "public"` on an org without a plan for free public scoped packages. Use `"restricted"` (or upgrade the plan).
131
+ - **403 Forbidden** — `NPM_PUBLISH_TOKEN` missing/wrong, or its user lacks `nurix` write access, or it's a read-only (not Automation) token.
132
+ - **"Cannot publish over previously published version x.y.z"** — a bump ran but publish failed and was re-run without rebasing. `git reset` the bump and let CI re-bump, or `npm version patch && git push --follow-tags && npm publish`.
133
+ - **Publish succeeds but `npx @nurix/foo` is "command not found"** — no `bin` field, or `bin` points outside `files`, or the script is missing its `#!/usr/bin/env node` shebang.
134
+ - **"Git working directory not clean" on `npm version`** — the checkout has untracked/modified files; build only into `.gitignore`d paths (the components repo builds into `dist/`).
135
+ - **Published tarball contains source** — missing `files` in `package.json`. Add `["dist"]` and republish.
136
+ - **Auto-publish fires too often** — no `paths:` filter or one that's too broad. Tighten it to artifact-affecting files, or drop the push trigger for `workflow_dispatch`-only.
137
+ - **Workflow loops forever** — the bump commit lacks `[skip ci]`. Invoke `npm version` with `-m "chore: release v%s [skip ci]"`.
138
+ - **A normal commit silently skips its own push** — the inverse trap. GitHub scans the head commit's **whole message** (subject _and_ body) for skip directives (`[skip ci]`, `[ci skip]`, `[no ci]`, `[skip actions]`, `***NO_CI***`). If any hand-written commit merely _mentions_ the literal token in prose, the entire push is skipped and the publish never fires (symptom: branch moved, paths matched, Actions on — yet zero runs for the SHA). Never write the literal token in a commit message or PR body unless you mean it; to ship a push that carried it by accident, re-trigger via **Run workflow** / `gh workflow run … --ref dev`.
139
+
140
+ ---
141
+
142
+ ## 4. Quick checklist for a new `@nurix/*` package
143
+
144
+ - [ ] `package.json`: `name: "@nurix/X"`, `version: "0.1.0"`, `private: false`, `publishConfig.access: "restricted"`, `files: [...]`
145
+ - [ ] Build step wired into `prepack` (or `prepublishOnly`)
146
+ - [ ] Name follows §1; if it's a workspace member, boundaries follow §2
147
+ - [ ] `.github/workflows/publish.yml` from §3.3
148
+ - [ ] `NPM_PUBLISH_TOKEN` secret added to the repo
149
+ - [ ] First publish from local (`npm publish`) to verify the pipeline, then a no-op commit to verify CI
150
+ - [ ] README notes the `@nurix` scope so consumers know they need org access
@@ -132,7 +132,7 @@ The session writes a **kept** design record at `docs/brainstorm/{topic}/` (one s
132
132
 
133
133
  - **Source of truth** — one consolidated, README-style canonical doc for the thing designed (`templates/source-of-truth.md`); lands in the repo's feature/architecture doc home, else a topic `Readme.md`.
134
134
  - **Plans** — one or more executable plan docs → `docs/history/plans/` (Status: Draft).
135
- - **Harvest into the living docs** — conclusions dispersed by scope into ADRs, the domain model, and the backlog.
135
+ - **Harvest into the living docs** — conclusions dispersed by scope into ADs (architecture decisions), the domain model, and the backlog.
136
136
 
137
137
  The `docs/brainstorm/{topic}/` record is **kept** whichever you pick — never deleted; it is the provenance every artifact traces back to. See `exit-artifacts.md`.
138
138
 
@@ -136,7 +136,7 @@ Zero means _"audited against the five sources and clean"_ — never _"nothing ca
136
136
 
137
137
  1. Run a final sync (wait for any in-flight sync first). It audits all five sources — self-containment included, so the record is verified standalone-readable exactly when it is about to become the only survivor of the session.
138
138
  2. **Coherent** → say so and proceed. **Questions open** → list them plainly (English first, codes in parentheses) and offer per question: resolve now (mini-converge) / park explicitly (backlog or non-goals, with reason) / leave open and stop anyway — the folder keeps full state and resumes exactly where it left off. Flag parked **self-containment** gaps distinctly: parking one means the record ships not fully standalone.
139
- 3. **Publish exit artifacts** — see `exit-artifacts.md`. Offer the choice (`AskUserQuestion`, multi-select): a **source of truth** (one consolidated README-style doc — the standing reference for the thing designed), **plans** (executable work → `docs/history/plans/`), and/or **harvest into the living docs** (conclusions dispersed by scope into ADRs, the domain model, the backlog). The `docs/brainstorm/{topic}/` record is **kept** (committed) whichever you pick — it is the provenance every artifact traces back to and the seed the next session resumes from.
139
+ 3. **Publish exit artifacts** — see `exit-artifacts.md`. Offer the choice (`AskUserQuestion`, multi-select): a **source of truth** (one consolidated README-style doc — the standing reference for the thing designed), **plans** (executable work → `docs/history/plans/`), and/or **harvest into the living docs** (conclusions dispersed by scope into ADs — architecture decisions — the domain model, the backlog). The `docs/brainstorm/{topic}/` record is **kept** (committed) whichever you pick — it is the provenance every artifact traces back to and the seed the next session resumes from.
140
140
  4. Write `STATE: closed` + one-line reason. Print: _"Run `/brainstorm start` to resume."_
141
141
 
142
142
  ## Conduct — holds for the whole session
@@ -21,7 +21,7 @@ does; pick it too if you want both the one-doc reference and the integrated head
21
21
 
22
22
  One consolidated, README-style document — the canonical reference for the thing designed. Distil every
23
23
  pillar into it: `thesis.md` → what it is; `domain-model.md` → how it works + parts; `decisions.md` →
24
- present-tense rationale (no `D-N` codes, no options-considered — those stay in the record and ADRs);
24
+ present-tense rationale (no `D-N` codes, no options-considered — those stay in the record and ADs);
25
25
  `non-goals.md` + accepted tradeoffs → constraints; still-open questions → a one-line pointer back to the
26
26
  record. Template: `templates/source-of-truth.md`.
27
27
 
@@ -44,10 +44,10 @@ not folders — a finding scoped to one module still lands in `docs/architecture
44
44
 
45
45
  | Session source | Destination |
46
46
  | --- | --- |
47
- | Decisions (any scope) | one ADR per cohesive theme → `docs/architecture/adr/NNN-{slug}.md` (`documentation` skill ADR template; `status:` frontmatter is the lifecycle source of truth; rejected alternatives → the ADR's Options Considered table) |
47
+ | Decisions (any scope) | one AD per decision subject → `docs/architecture/decisions/AD-NNN-{slug}.md` (`documentation` skill AD template; `status:` frontmatter is the lifecycle source of truth; rejected alternatives → the AD's Options Considered table). A decision that revises an already-recorded subject does **not** mint a new AD — update that AD's body in place and append the revision to its Decision Changelog |
48
48
  | `domain-model.md` | `docs/architecture/domain-model.md`; note any IA / cross-cutting contract change there — the `boundary` skill reads it from source at the next plan check |
49
- | Doctrine / glossary / rejected | `docs/architecture/{domain-model,glossary}.md`, or the relevant ADR |
50
- | `tech.md` deviations | `docs/architecture/references.md` or the relevant ADR |
49
+ | Doctrine / glossary / rejected | `docs/architecture/{domain-model,glossary}.md`, or the relevant AD |
50
+ | `tech.md` deviations | `docs/architecture/references.md` or the relevant AD |
51
51
  | `non-goals.md` / `references.md` | `docs/architecture/{non-goals,references}.md` |
52
52
  | `backlog.md` | `docs/history/backlog.md` (P0–P3) |
53
53
  | Still-open questions | `docs/architecture/open-questions.md`, each with a _Resolution lands in_ pointer |
@@ -4,7 +4,7 @@
4
4
  > README — present tense, reader-first, the thing described as it _is_. It is **not a plan** (no steps,
5
5
  > status, or sequencing — those go to `docs/history/plans/`) and **not the brainstorm record** (no
6
6
  > `Q-N`/`D-N` codes, no "Why / How to apply" ledger, no rejected alternatives — those stay in
7
- > `docs/brainstorm/{topic}/` and any ADRs). One document; if a section outgrows it, link out, don't sprawl.
7
+ > `docs/brainstorm/{topic}/` and any ADs). One document; if a section outgrows it, link out, don't sprawl.
8
8
  >
9
9
  > **Placement.** In a repo with a feature-doc system this lands as `docs/features/{slug}.md` and carries
10
10
  > that system's frontmatter (`owns:` / `module:` / `keywords:` / `status:`). Cross-cutting → `docs/architecture/{slug}.md`.
@@ -31,7 +31,7 @@ reader-first description. Prose and tables; a diagram only if it earns its token
31
31
 
32
32
  [The load-bearing decisions, folded into present-tense rationale — "the index is single-writer because
33
33
  concurrent writes corrupted it," not "we decided X over Y." No decision codes, no options-considered
34
- table. The full rationale and the roads not taken live in the brainstorm record and ADRs — cite them,
34
+ table. The full rationale and the roads not taken live in the brainstorm record and ADs — cite them,
35
35
  don't reproduce them.]
36
36
 
37
37
  ## Constraints & non-goals
@@ -41,7 +41,7 @@ and what is explicitly out of scope.]
41
41
 
42
42
  ## Open questions
43
43
 
44
- [One line pointing at `docs/brainstorm/{topic}/pillars/questions.md` if any remain open. Omit if none.]
44
+ [One line pointing at `docs/brainstorm/{topic}/questions.md` if any remain open. Omit if none.]
45
45
 
46
46
  ---
47
47
 
@@ -0,0 +1,68 @@
1
+ ---
2
+ name: design
3
+ description: Design, build, review, polish, redesign, or introspect internal operator UIs — CRMs, ticket queues, admin panels, analytics dashboards, log viewers, command centers, and any internal/back-office tool an operator, agent, or analyst works in all day. Resolves the project's brand from its design-tokens artifact (design.tokens.json), derives structure from the domain objects, emits a working React + Tailwind UI against @nurix/components or shadcn/ui, and holds it to operator-grade quality across a full sixteen-dimension taxonomy. Triggers on "build a dashboard", "design an admin panel", "review this CRM UI", "polish this queue", "redesign this internal tool", "why does this table feel off", "make it feel like Linear", or any create/improve/introspect request for an internal operator interface. Coverage is the operator pack: marketing sites, landing pages, storefronts, homepages, and mobile-native apps are out of scope — no carried pack covers them, so refuse cleanly and redirect. The machinery is not the limit; the packs are.
4
+ ---
5
+
6
+ # design
7
+
8
+ The design skill. Its shipped coverage is the **operator pack**: internal tools — CRMs, ticket queues, admin panels, dashboards, log viewers, command centers. It resolves the brand, derives the structure from the domain objects, emits a React + Tailwind UI, and enforces operator-grade quality across the sixteen-dimension taxonomy. This file is a router — it names where to go and what not to do; the knowledge lives in the references and data below, loaded on demand.
9
+
10
+ ## The front gate
11
+
12
+ **Recognition, by precedence — stop at the first that resolves.**
13
+
14
+ 1. **Project-declared identity wins.** A resolved token artifact whose payload carries `product-traits` decides coverage outright.
15
+ 2. **The signal checklist recognizes** when no project artifact speaks: the audience is employees / agents / analysts; the metric is task throughput, not conversion; the surfaces are queues / tables / forms / monitors. The design.md library (`data/design-md/library/`) assists the lookup by resemblance — it never overrides the checklist.
16
+ 3. **Refuse with a redirect** when no carried pack covers the brief — marketing sites, landing pages, storefronts, mobile-native. State plainly which pack is missing and point elsewhere; never a degraded attempt. The machinery is artifact-agnostic; the boundary is pack coverage, and it moves only by adding a pack.
17
+
18
+ **Then the intent digest — infer and confirm.** Build a structured digest — entities, archetype guesses, density tier, substrate — with **every inference marked as inferred**. Present it once for confirmation before any derivation begins. Ask questions only for strategic unknowns whose answers change the design. Nothing auto-runs on silent inference; nothing stalls on a blanket interview.
19
+
20
+ ## Boot order
21
+
22
+ Before **any** design output, read [`references/hard-rules.md`](references/hard-rules.md) — the boot-loaded floor of 131 rules <!-- count:rules=131 --> (bans, deterministic thresholds, mandatory procedures, each keyed to an anchor id). Then route by workflow. JIT loads never happen at boot — they fire at the gate that needs them.
23
+
24
+ | Route | Load, when |
25
+ | --- | --- |
26
+ | **create** (nothing exists yet) | [`references/create.md`](references/create.md) at intake; then per phase: [`structure.md`](references/structure.md) at structure, [`personality.md`](references/personality.md) at tokens, [`lifecycle.md`](references/lifecycle.md) + [`interaction.md`](references/interaction.md) at surfaces |
27
+ | **improve** (a UI already exists) | [`references/improve.md`](references/improve.md) + [`references/diagnosis.md`](references/diagnosis.md) |
28
+ | **introspect** (why is it wrong) | [`references/introspect.md`](references/introspect.md) + [`references/diagnosis.md`](references/diagnosis.md) |
29
+ | JIT — archetype exemplar | `data/operator-pack/exemplars/<slug>.tsx` at that archetype's emission gate during surfaces — never at boot |
30
+ | JIT — fixture pair | `data/catalog/fixtures/<id>.{flag,pass}` only when a rule is contested and the contrastive pair teaches it (authoring repo only — pairs are stripped from shipped bundles; when the folder is absent, the finding's exact-fix line carries the teaching) |
31
+ | JIT — combination tables, look | `data/combinations/product-router.csv` at every intake; `typography.csv` / `palettes.csv` / `styles.csv` at intake only when the look resolves to authoring a fresh artifact, typography and palettes again at tokens before any hint resolves — contract: [`data/combinations/Readme.md`](data/combinations/Readme.md) |
32
+ | JIT — combination tables, surface picks | `data/combinations/charts.csv` at the emission gate of any chart-composing surface; `icons.csv` once at the first surface-composition gate — same contract |
33
+
34
+ A consulted combination table is a **floor** — going off-table is allowed only against a stated reason recorded into what the run produces (the token `$description`, an adjacent code comment, the finding body — sites per the contract); an unrecorded off-table pick is a violation, the same class as skipping a gate.
35
+
36
+ ## The three workflows
37
+
38
+ **Create** makes taste where nothing exists. It runs **six gated phases** — intake, structure, scaffold, tokens, fixtures, surfaces — and closes on the verification ladder. Each boundary is `phase-gate.mjs <phase>`; the next phase does not open until the gate is green. The object pass is never skipped — a small brief earns a proportionally small pass, never a guessed archetype; every surface takes an archetype from the closed six <!-- count:archetypes=6 --> (`list-detail`, `dashboard`, `entity-detail`, `create-edit`, `log-stream`, `command-center`). Fixtures are seeded and generated **before** surfaces, because realistic data is taste-bearing design material. See [`create.md`](references/create.md).
39
+
40
+ **Improve** is one engine over a UI that already exists, run at a point on scope × depth × authority; the verbs — review, polish, redesign, typeset — are parameter bindings, never sibling files. Emission is **jailed to the lever manifest** by default: an edit may emit only values inside the project artifact's vocabulary, enforced by the end-of-run verify sweep (`preship-sweep.mjs --files <touched...> --manifest design.tokens.json`). On a foreign UI, **extract a token artifact first** (payload `provenance: extracted`) — record what IS, never what should be. Wrong fundamentals are tier-two (`lever-change`) findings: finish the within-levers work, report them, and offer a consent-gated lever run — never change levers unbidden. At the fix step, a finding that names a chart or icon loads `data/combinations/charts.csv` / `icons.csv` before the edit. See [`improve.md`](references/improve.md) + [`diagnosis.md`](references/diagnosis.md).
41
+
42
+ **Introspect** explains **why** a UI isn't working; it reads code and never edits it. **Ask the reader question first**, every run, verbatim — designer / developer / PM — never inferred, never a stored default. Diagnose causes-first (Structure → Behavior → Perception), narrate each finding from the felt symptom down to its cause, render it in the reader's register, and **always file a dated report**. When the audited UI renders charts, diagnosis loads `data/combinations/charts.csv`. See [`introspect.md`](references/introspect.md) + [`diagnosis.md`](references/diagnosis.md).
43
+
44
+ ## Scripts
45
+
46
+ Under `scripts/`; spawn them from this skill directory. All ESM, Node ≥ 22, zero dependencies. **You drive them — nothing hooks them to the session or to your edits; you decide when to run each, at the moments below.** Machine rules fire at the structural boundaries — the phase gates, improve's end-of-run verify, and the pre-ship sweep; the gates are the wall, not your discipline. Exit 1 anywhere means violations: resolve every one — fix now, or classify the inapplicability into the decay ledger; never ignore.
47
+
48
+ - `phase-gate.mjs <phase> [--project <dir>]` — validates a phase's exit preconditions **and runs the machine catalog + lever-manifest drift check over the project's UI files**; exit non-zero printing the exact fix. Phases: `intake`, `structure`, `scaffold`, `tokens`, `fixtures`, `surfaces`.
49
+ - `preship-sweep.mjs [--project <dir>] [--files <file...>] [--manifest design.tokens.json]` — whole-app catalog sweep + viewport sweep + copy audit + scope cross-check; prints the manual `proc-*` checklist. With `--files`, a scoped verify run over just those files — improve's end-of-run gate.
50
+ - `render-rung.mjs [--project <dir>] [--url <dev-server>]` — render-only rules at 375/768/1024/1440 plus the render instruments (evidence, never gates); a one-line notice and exit 0 when no headless browser is importable.
51
+ - `derive-personality.mjs <artifact-dir> [--check|--emit <outdir>] [--theme light|dark]` — `--check` is the coverage gate over the design-tokens artifact; `--emit` writes `personality.css` + `globals.css`. The gate fails unless all 26 primitives <!-- count:primitives=26 -->, both dials, and every one of the 34 color values (17 semantic <!-- count:semantic-tokens=17 --> + 17 substrate <!-- count:substrate-tokens=17 -->) <!-- count:color-tokens=34 --> is assigned or hinted; emit refuses while any token carries a hint.
52
+ - `scaffold.mjs <structure.md> --out <dir>` — routes, nav, state-shells, and fixture wiring from the entity/surface map.
53
+ - `generate-fixtures.mjs <structure.md> --seed <n> --out <dir>` — seeded, domain-shaped fixture modules.
54
+ - `self-integrity.mjs` — run from `skills/design/`: anchor parity (prose ↔ catalog), stated counts, fixture-pair presence and contrastive validity. CI-owned.
55
+
56
+ ## Project artifacts
57
+
58
+ The skill writes these into the consumer project; the emitted code and these files are the only design record — no sidecar caches.
59
+
60
+ - `design.tokens.json` + `design.resolver.json` (+ `design.tokens.dark.json` when the look has dark values) at project root — the canonical look artifact + lever manifest ([schema](data/design-tokens/SCHEMA.md)). Create writes it; improve reads and, on a foreign UI, extracts it. Payload provenance is one of `project | extracted | library | default` (extracted sits at project precedence).
61
+ - `docs/design/structure.md` — the entity/surface map, in a fenced `yaml structure` block; `scaffold.mjs` consumes it.
62
+ - `docs/design/findings/YYYY-MM-DD-<slug>.md` — dated introspect and review reports.
63
+ - `docs/memory/design-decay.md` — the decay ledger: rules skipped or fought, the fix-or-classify classifications, guidance that produced wrong output. Append-only, maintainer-read, human-closed. The skill never self-modifies — it observes decay; the maintainer closes it.
64
+
65
+ ## Substrate and scope
66
+
67
+ - Substrate is **`@nurix/components` (default) or `shadcn/ui` only** — the Tailwind + shadcn-flavor floor. Import `@nurix/components` by subpath (`@nurix/components/button`); emit `.tsx`, never `.jsx`.
68
+ - The `components` API reference is a **separate skill** — a pure reference, never invoked from here. `design` ships as one skill with zero cross-skill invocation; all its knowledge is lazily-loaded data under `references/` and `data/`.