@bastani/atomic 0.9.11-alpha.6 → 0.9.11-alpha.8

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 (452) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/README.md +3 -5
  3. package/dist/builtin/intercom/package.json +1 -1
  4. package/dist/builtin/mcp/package.json +1 -1
  5. package/dist/builtin/mcp/sampling-handler.ts +1 -5
  6. package/dist/builtin/subagents/package.json +1 -1
  7. package/dist/builtin/web-access/package.json +1 -1
  8. package/dist/builtin/workflows/CHANGELOG.md +1 -0
  9. package/dist/builtin/workflows/README.md +1 -1
  10. package/dist/builtin/workflows/package.json +1 -1
  11. package/dist/builtin/workflows/skills/impeccable/SKILL.md +33 -129
  12. package/dist/builtin/workflows/skills/impeccable/agents/impeccable_asset_producer.toml +11 -3
  13. package/dist/builtin/workflows/skills/impeccable/agents/impeccable_documenter.toml +26 -0
  14. package/dist/builtin/workflows/skills/impeccable/agents/impeccable_finish_reviewer.toml +35 -0
  15. package/dist/builtin/workflows/skills/impeccable/reference/android.md +1 -1
  16. package/dist/builtin/workflows/skills/impeccable/reference/animate.md +72 -189
  17. package/dist/builtin/workflows/skills/impeccable/reference/audit.md +10 -9
  18. package/dist/builtin/workflows/skills/impeccable/reference/audit.native.md +2 -2
  19. package/dist/builtin/workflows/skills/impeccable/reference/bolder.md +19 -108
  20. package/dist/builtin/workflows/skills/impeccable/reference/clarify.md +59 -253
  21. package/dist/builtin/workflows/skills/impeccable/reference/colorize.md +51 -222
  22. package/dist/builtin/workflows/skills/impeccable/reference/craft-floor.md +45 -0
  23. package/dist/builtin/workflows/skills/impeccable/reference/craft.md +3 -121
  24. package/dist/builtin/workflows/skills/impeccable/reference/critique.md +28 -20
  25. package/dist/builtin/workflows/skills/impeccable/reference/degraded/asset-producer.md +97 -0
  26. package/dist/builtin/workflows/skills/impeccable/reference/degraded/documenter.md +23 -0
  27. package/dist/builtin/workflows/skills/impeccable/reference/degraded/finish-reviewer.md +32 -0
  28. package/dist/builtin/workflows/skills/impeccable/reference/degraded/manual-edit-applier.md +92 -0
  29. package/dist/builtin/workflows/skills/impeccable/reference/delight.md +47 -279
  30. package/dist/builtin/workflows/skills/impeccable/reference/distill.md +2 -2
  31. package/dist/builtin/workflows/skills/impeccable/reference/doctor.md +53 -0
  32. package/dist/builtin/workflows/skills/impeccable/reference/document.md +60 -73
  33. package/dist/builtin/workflows/skills/impeccable/reference/harden.md +1 -12
  34. package/dist/builtin/workflows/skills/impeccable/reference/hooks.md +17 -4
  35. package/dist/builtin/workflows/skills/impeccable/reference/init.md +64 -163
  36. package/dist/builtin/workflows/skills/impeccable/reference/ios.md +1 -1
  37. package/dist/builtin/workflows/skills/impeccable/reference/layout.md +52 -153
  38. package/dist/builtin/workflows/skills/impeccable/reference/live.md +44 -32
  39. package/dist/builtin/workflows/skills/impeccable/reference/new-work.md +105 -0
  40. package/dist/builtin/workflows/skills/impeccable/reference/{product.md → operate.md} +6 -5
  41. package/dist/builtin/workflows/skills/impeccable/reference/optimize.md +4 -4
  42. package/dist/builtin/workflows/skills/impeccable/reference/overdrive.md +1 -4
  43. package/dist/builtin/workflows/skills/impeccable/reference/polish.md +68 -212
  44. package/dist/builtin/workflows/skills/impeccable/reference/quieter.md +3 -3
  45. package/dist/builtin/workflows/skills/impeccable/reference/routing.md +18 -0
  46. package/dist/builtin/workflows/skills/impeccable/reference/shape.md +38 -144
  47. package/dist/builtin/workflows/skills/impeccable/reference/typeset.md +48 -269
  48. package/dist/builtin/workflows/skills/impeccable/reference/visualize.md +38 -0
  49. package/dist/builtin/workflows/skills/impeccable/scripts/command-metadata.json +1 -1
  50. package/dist/builtin/workflows/skills/impeccable/scripts/concept-seed.mjs +584 -0
  51. package/dist/builtin/workflows/skills/impeccable/scripts/context-signals.mjs +117 -9
  52. package/dist/builtin/workflows/skills/impeccable/scripts/context.mjs +486 -59
  53. package/dist/builtin/workflows/skills/impeccable/scripts/critique-storage.mjs +16 -45
  54. package/dist/builtin/workflows/skills/impeccable/scripts/detector/browser/injected/index.mjs +96 -10
  55. package/dist/builtin/workflows/skills/impeccable/scripts/detector/cli/main.mjs +143 -26
  56. package/dist/builtin/workflows/skills/impeccable/scripts/detector/design-system.mjs +181 -12
  57. package/dist/builtin/workflows/skills/impeccable/scripts/detector/detect-antipatterns-browser.js +3187 -182
  58. package/dist/builtin/workflows/skills/impeccable/scripts/detector/engines/browser/detect-url.mjs +102 -7
  59. package/dist/builtin/workflows/skills/impeccable/scripts/detector/engines/regex/detect-text.mjs +282 -70
  60. package/dist/builtin/workflows/skills/impeccable/scripts/detector/engines/static-html/css-cascade.mjs +183 -15
  61. package/dist/builtin/workflows/skills/impeccable/scripts/detector/engines/static-html/detect-html.mjs +22 -7
  62. package/dist/builtin/workflows/skills/impeccable/scripts/detector/findings.mjs +7 -1
  63. package/dist/builtin/workflows/skills/impeccable/scripts/detector/node/file-system.mjs +16 -2
  64. package/dist/builtin/workflows/skills/impeccable/scripts/detector/registry/antipatterns.mjs +155 -42
  65. package/dist/builtin/workflows/skills/impeccable/scripts/detector/rules/checks.mjs +2988 -155
  66. package/dist/builtin/workflows/skills/impeccable/scripts/detector/shared/constants.mjs +11 -0
  67. package/dist/builtin/workflows/skills/impeccable/scripts/doctor.mjs +336 -0
  68. package/dist/builtin/workflows/skills/impeccable/scripts/generate-image.mjs +232 -0
  69. package/dist/builtin/workflows/skills/impeccable/scripts/hook-admin.mjs +90 -10
  70. package/dist/builtin/workflows/skills/impeccable/scripts/hook-lib.mjs +410 -78
  71. package/dist/builtin/workflows/skills/impeccable/scripts/hook.mjs +25 -8
  72. package/dist/builtin/workflows/skills/impeccable/scripts/lib/artifact-schema.mjs +93 -0
  73. package/dist/builtin/workflows/skills/impeccable/scripts/lib/composition-catalog.mjs +165 -0
  74. package/dist/builtin/workflows/skills/impeccable/scripts/lib/concept-catalog.mjs +329 -0
  75. package/dist/builtin/workflows/skills/impeccable/scripts/lib/impeccable-config.mjs +20 -5
  76. package/dist/builtin/workflows/skills/impeccable/scripts/lib/impeccable-paths.mjs +16 -8
  77. package/dist/builtin/workflows/skills/impeccable/scripts/lib/provider.mjs +1 -0
  78. package/dist/builtin/workflows/skills/impeccable/scripts/lib/staleness-deep.mjs +455 -0
  79. package/dist/builtin/workflows/skills/impeccable/scripts/lib/staleness-notice.mjs +169 -0
  80. package/dist/builtin/workflows/skills/impeccable/scripts/lib/staleness.mjs +457 -0
  81. package/dist/builtin/workflows/skills/impeccable/scripts/lib/surface-briefs.mjs +151 -0
  82. package/dist/builtin/workflows/skills/impeccable/scripts/lib/target-slug.mjs +33 -0
  83. package/dist/builtin/workflows/skills/impeccable/scripts/lib/template-extensions.mjs +146 -0
  84. package/dist/builtin/workflows/skills/impeccable/scripts/live/completion.mjs +10 -1
  85. package/dist/builtin/workflows/skills/impeccable/scripts/live/event-validation.mjs +15 -0
  86. package/dist/builtin/workflows/skills/impeccable/scripts/live/generation-preflight.mjs +149 -0
  87. package/dist/builtin/workflows/skills/impeccable/scripts/live/poll-lanes.mjs +14 -0
  88. package/dist/builtin/workflows/skills/impeccable/scripts/live/session-store.mjs +109 -32
  89. package/dist/builtin/workflows/skills/impeccable/scripts/live/source-lock.mjs +105 -0
  90. package/dist/builtin/workflows/skills/impeccable/scripts/live/source-search.mjs +105 -0
  91. package/dist/builtin/workflows/skills/impeccable/scripts/live/sveltekit-adapter.mjs +8 -6
  92. package/dist/builtin/workflows/skills/impeccable/scripts/live/tanstack-adapter.mjs +280 -0
  93. package/dist/builtin/workflows/skills/impeccable/scripts/live-accept.mjs +208 -68
  94. package/dist/builtin/workflows/skills/impeccable/scripts/live-browser.js +563 -112
  95. package/dist/builtin/workflows/skills/impeccable/scripts/live-commit-manual-edits.mjs +3 -0
  96. package/dist/builtin/workflows/skills/impeccable/scripts/live-inject.mjs +198 -13
  97. package/dist/builtin/workflows/skills/impeccable/scripts/live-insert.mjs +24 -6
  98. package/dist/builtin/workflows/skills/impeccable/scripts/live-manual-edit-evidence.mjs +6 -1
  99. package/dist/builtin/workflows/skills/impeccable/scripts/live-poll.mjs +44 -14
  100. package/dist/builtin/workflows/skills/impeccable/scripts/live-server.mjs +398 -33
  101. package/dist/builtin/workflows/skills/impeccable/scripts/live-status.mjs +9 -5
  102. package/dist/builtin/workflows/skills/impeccable/scripts/live-wrap.mjs +81 -67
  103. package/dist/builtin/workflows/skills/impeccable/scripts/live.mjs +7 -2
  104. package/dist/builtin/workflows/skills/impeccable/scripts/palette.mjs +76 -81
  105. package/dist/builtin/workflows/skills/impeccable/scripts/pin.mjs +2 -2
  106. package/dist/builtin/workflows/skills/impeccable/scripts/serve-question.mjs +890 -0
  107. package/dist/builtin/workflows/skills/impeccable/scripts/surface-brief.mjs +74 -0
  108. package/dist/builtin/workflows/src/extension/extension-runtime-state.ts +1 -24
  109. package/dist/builtin/workflows/src/extension/index.bundle.mjs +232 -50
  110. package/dist/builtin/workflows/src/extension/workflow-model-catalog.ts +26 -0
  111. package/dist/builtin/workflows/src/extension/workflow-prompts.ts +3 -2
  112. package/dist/builtin/workflows/src/runs/foreground/executor-stage-control.ts +23 -9
  113. package/dist/builtin/workflows/src/runs/foreground/executor-stage-replay.ts +1 -0
  114. package/dist/builtin/workflows/src/runs/foreground/postmortem-stage-chat.ts +20 -5
  115. package/dist/builtin/workflows/src/runs/foreground/stage-control-registry.ts +10 -0
  116. package/dist/builtin/workflows/src/runs/foreground/stage-delivery-activity.ts +86 -0
  117. package/dist/builtin/workflows/src/runs/foreground/stage-runner-context.ts +6 -2
  118. package/dist/builtin/workflows/src/runs/foreground/stage-runner-controller.ts +24 -18
  119. package/dist/builtin/workflows/src/runs/foreground/stage-runner-send-user-message.ts +8 -0
  120. package/dist/builtin/workflows/src/runs/foreground/stage-runner-session-options.ts +3 -3
  121. package/dist/builtin/workflows/src/runs/foreground/stage-runner-session.ts +2 -2
  122. package/dist/builtin/workflows/src/runs/foreground/stage-runner-types.ts +16 -0
  123. package/dist/builtin/workflows/src/tui/stage-chat-view-delivery-activity.ts +121 -0
  124. package/dist/builtin/workflows/src/tui/stage-chat-view-live-events.ts +42 -0
  125. package/dist/builtin/workflows/src/tui/stage-chat-view-state.ts +16 -0
  126. package/dist/builtin/workflows/src/tui/stage-chat-view-types.ts +4 -0
  127. package/dist/cli/list-models.d.ts +2 -2
  128. package/dist/cli/list-models.d.ts.map +1 -1
  129. package/dist/cli/list-models.js +5 -5
  130. package/dist/cli/list-models.js.map +1 -1
  131. package/dist/core/agent-session-accessors.js +1 -1
  132. package/dist/core/agent-session-accessors.js.map +1 -1
  133. package/dist/core/agent-session-auto-compaction.d.ts.map +1 -1
  134. package/dist/core/agent-session-auto-compaction.js +2 -5
  135. package/dist/core/agent-session-auto-compaction.js.map +1 -1
  136. package/dist/core/agent-session-compaction.js +1 -1
  137. package/dist/core/agent-session-compaction.js.map +1 -1
  138. package/dist/core/agent-session-extension-bindings.js +5 -5
  139. package/dist/core/agent-session-extension-bindings.js.map +1 -1
  140. package/dist/core/agent-session-methods.d.ts +4 -4
  141. package/dist/core/agent-session-methods.d.ts.map +1 -1
  142. package/dist/core/agent-session-methods.js.map +1 -1
  143. package/dist/core/agent-session-models.d.ts +1 -1
  144. package/dist/core/agent-session-models.d.ts.map +1 -1
  145. package/dist/core/agent-session-models.js +18 -14
  146. package/dist/core/agent-session-models.js.map +1 -1
  147. package/dist/core/agent-session-post-tool-compaction.d.ts.map +1 -1
  148. package/dist/core/agent-session-post-tool-compaction.js +2 -4
  149. package/dist/core/agent-session-post-tool-compaction.js.map +1 -1
  150. package/dist/core/agent-session-prompt.d.ts.map +1 -1
  151. package/dist/core/agent-session-prompt.js +3 -7
  152. package/dist/core/agent-session-prompt.js.map +1 -1
  153. package/dist/core/agent-session-retry.js +1 -1
  154. package/dist/core/agent-session-retry.js.map +1 -1
  155. package/dist/core/agent-session-runtime-auth.d.ts +3 -3
  156. package/dist/core/agent-session-runtime-auth.d.ts.map +1 -1
  157. package/dist/core/agent-session-runtime-auth.js +4 -14
  158. package/dist/core/agent-session-runtime-auth.js.map +1 -1
  159. package/dist/core/agent-session-runtime.d.ts +1 -1
  160. package/dist/core/agent-session-runtime.d.ts.map +1 -1
  161. package/dist/core/agent-session-runtime.js +3 -3
  162. package/dist/core/agent-session-runtime.js.map +1 -1
  163. package/dist/core/agent-session-services.d.ts +3 -8
  164. package/dist/core/agent-session-services.d.ts.map +1 -1
  165. package/dist/core/agent-session-services.js +16 -23
  166. package/dist/core/agent-session-services.js.map +1 -1
  167. package/dist/core/agent-session-tool-registry.d.ts.map +1 -1
  168. package/dist/core/agent-session-tool-registry.js +2 -1
  169. package/dist/core/agent-session-tool-registry.js.map +1 -1
  170. package/dist/core/agent-session-types.d.ts +2 -2
  171. package/dist/core/agent-session-types.d.ts.map +1 -1
  172. package/dist/core/agent-session-types.js.map +1 -1
  173. package/dist/core/agent-session.d.ts +2 -2
  174. package/dist/core/agent-session.d.ts.map +1 -1
  175. package/dist/core/agent-session.js +1 -1
  176. package/dist/core/agent-session.js.map +1 -1
  177. package/dist/core/auth-storage-backends.d.ts +1 -0
  178. package/dist/core/auth-storage-backends.d.ts.map +1 -1
  179. package/dist/core/auth-storage-backends.js +18 -4
  180. package/dist/core/auth-storage-backends.js.map +1 -1
  181. package/dist/core/auth-storage.d.ts +12 -139
  182. package/dist/core/auth-storage.d.ts.map +1 -1
  183. package/dist/core/auth-storage.js +68 -374
  184. package/dist/core/auth-storage.js.map +1 -1
  185. package/dist/core/copilot-env-routing.d.ts +36 -0
  186. package/dist/core/copilot-env-routing.d.ts.map +1 -0
  187. package/dist/core/copilot-env-routing.js +94 -0
  188. package/dist/core/copilot-env-routing.js.map +1 -0
  189. package/dist/core/extensions/loader-virtual-modules.d.ts.map +1 -1
  190. package/dist/core/extensions/loader-virtual-modules.js +10 -2
  191. package/dist/core/extensions/loader-virtual-modules.js.map +1 -1
  192. package/dist/core/extensions/provider-types.d.ts +0 -40
  193. package/dist/core/extensions/provider-types.d.ts.map +1 -1
  194. package/dist/core/extensions/provider-types.js.map +1 -1
  195. package/dist/core/fallback-models.d.ts +4 -4
  196. package/dist/core/fallback-models.d.ts.map +1 -1
  197. package/dist/core/fallback-models.js +3 -3
  198. package/dist/core/fallback-models.js.map +1 -1
  199. package/dist/core/model-config.d.ts +542 -0
  200. package/dist/core/model-config.d.ts.map +1 -0
  201. package/dist/core/{model-registry-schemas.js → model-config.js} +85 -34
  202. package/dist/core/model-config.js.map +1 -0
  203. package/dist/core/model-registry.d.ts +25 -85
  204. package/dist/core/model-registry.d.ts.map +1 -1
  205. package/dist/core/model-registry.js +65 -388
  206. package/dist/core/model-registry.js.map +1 -1
  207. package/dist/core/model-resolver-cli.d.ts +2 -2
  208. package/dist/core/model-resolver-cli.d.ts.map +1 -1
  209. package/dist/core/model-resolver-cli.js +2 -2
  210. package/dist/core/model-resolver-cli.js.map +1 -1
  211. package/dist/core/model-resolver-initial.d.ts +4 -4
  212. package/dist/core/model-resolver-initial.d.ts.map +1 -1
  213. package/dist/core/model-resolver-initial.js +17 -17
  214. package/dist/core/model-resolver-initial.js.map +1 -1
  215. package/dist/core/model-resolver-scope.d.ts +3 -3
  216. package/dist/core/model-resolver-scope.d.ts.map +1 -1
  217. package/dist/core/model-resolver-scope.js +4 -4
  218. package/dist/core/model-resolver-scope.js.map +1 -1
  219. package/dist/core/model-runtime-auth.d.ts +7 -0
  220. package/dist/core/model-runtime-auth.d.ts.map +1 -0
  221. package/dist/core/model-runtime-auth.js +14 -0
  222. package/dist/core/model-runtime-auth.js.map +1 -0
  223. package/dist/core/model-runtime-providers.d.ts +6 -0
  224. package/dist/core/model-runtime-providers.d.ts.map +1 -0
  225. package/dist/core/model-runtime-providers.js +22 -0
  226. package/dist/core/model-runtime-providers.js.map +1 -0
  227. package/dist/core/model-runtime-restoration.d.ts +6 -0
  228. package/dist/core/model-runtime-restoration.d.ts.map +1 -0
  229. package/dist/core/model-runtime-restoration.js +21 -0
  230. package/dist/core/model-runtime-restoration.js.map +1 -0
  231. package/dist/core/model-runtime-snapshot.d.ts +16 -0
  232. package/dist/core/model-runtime-snapshot.d.ts.map +1 -0
  233. package/dist/core/model-runtime-snapshot.js +52 -0
  234. package/dist/core/model-runtime-snapshot.js.map +1 -0
  235. package/dist/core/model-runtime-streaming.d.ts +17 -0
  236. package/dist/core/model-runtime-streaming.d.ts.map +1 -0
  237. package/dist/core/model-runtime-streaming.js +66 -0
  238. package/dist/core/model-runtime-streaming.js.map +1 -0
  239. package/dist/core/model-runtime-types.d.ts +21 -0
  240. package/dist/core/model-runtime-types.d.ts.map +1 -0
  241. package/dist/core/model-runtime-types.js +2 -0
  242. package/dist/core/model-runtime-types.js.map +1 -0
  243. package/dist/core/model-runtime.d.ts +50 -29
  244. package/dist/core/model-runtime.d.ts.map +1 -1
  245. package/dist/core/model-runtime.js +330 -90
  246. package/dist/core/model-runtime.js.map +1 -1
  247. package/dist/core/models-store.d.ts +2 -10
  248. package/dist/core/models-store.d.ts.map +1 -1
  249. package/dist/core/models-store.js +2 -29
  250. package/dist/core/models-store.js.map +1 -1
  251. package/dist/core/oauth-login.d.ts +24 -0
  252. package/dist/core/oauth-login.d.ts.map +1 -0
  253. package/dist/core/oauth-login.js +87 -0
  254. package/dist/core/oauth-login.js.map +1 -0
  255. package/dist/core/oauth-provider-metadata.d.ts +5 -0
  256. package/dist/core/oauth-provider-metadata.d.ts.map +1 -0
  257. package/dist/core/oauth-provider-metadata.js +19 -0
  258. package/dist/core/oauth-provider-metadata.js.map +1 -0
  259. package/dist/core/provider-composer-internal.d.ts +53 -0
  260. package/dist/core/provider-composer-internal.d.ts.map +1 -0
  261. package/dist/core/provider-composer-internal.js +273 -0
  262. package/dist/core/provider-composer-internal.js.map +1 -0
  263. package/dist/core/provider-composer.d.ts +16 -0
  264. package/dist/core/provider-composer.d.ts.map +1 -0
  265. package/dist/core/provider-composer.js +108 -0
  266. package/dist/core/provider-composer.js.map +1 -0
  267. package/dist/core/remote-catalog-provider.d.ts.map +1 -1
  268. package/dist/core/remote-catalog-provider.js +74 -122
  269. package/dist/core/remote-catalog-provider.js.map +1 -1
  270. package/dist/core/resolve-config-value.d.ts +8 -7
  271. package/dist/core/resolve-config-value.d.ts.map +1 -1
  272. package/dist/core/resolve-config-value.js +26 -23
  273. package/dist/core/resolve-config-value.js.map +1 -1
  274. package/dist/core/runtime-credentials.d.ts +16 -0
  275. package/dist/core/runtime-credentials.d.ts.map +1 -0
  276. package/dist/core/runtime-credentials.js +42 -0
  277. package/dist/core/runtime-credentials.js.map +1 -0
  278. package/dist/core/sdk-types.d.ts +1 -7
  279. package/dist/core/sdk-types.d.ts.map +1 -1
  280. package/dist/core/sdk-types.js.map +1 -1
  281. package/dist/core/sdk.d.ts.map +1 -1
  282. package/dist/core/sdk.js +27 -28
  283. package/dist/core/sdk.js.map +1 -1
  284. package/dist/extensions/llama/index.js +1 -1
  285. package/dist/extensions/llama/index.js.map +1 -1
  286. package/dist/extensions/llama/provider.d.ts +2 -4
  287. package/dist/extensions/llama/provider.d.ts.map +1 -1
  288. package/dist/extensions/llama/provider.js +25 -17
  289. package/dist/extensions/llama/provider.js.map +1 -1
  290. package/dist/index.d.ts +2 -3
  291. package/dist/index.d.ts.map +1 -1
  292. package/dist/index.js +3 -4
  293. package/dist/index.js.map +1 -1
  294. package/dist/main-runtime-api-key.d.ts +6 -0
  295. package/dist/main-runtime-api-key.d.ts.map +1 -0
  296. package/dist/main-runtime-api-key.js +6 -0
  297. package/dist/main-runtime-api-key.js.map +1 -0
  298. package/dist/main-session-options.d.ts +2 -2
  299. package/dist/main-session-options.d.ts.map +1 -1
  300. package/dist/main-session-options.js +3 -3
  301. package/dist/main-session-options.js.map +1 -1
  302. package/dist/main.d.ts.map +1 -1
  303. package/dist/main.js +9 -11
  304. package/dist/main.js.map +1 -1
  305. package/dist/modes/interactive/components/chat-session-host-actions.d.ts.map +1 -1
  306. package/dist/modes/interactive/components/chat-session-host-actions.js +2 -14
  307. package/dist/modes/interactive/components/chat-session-host-actions.js.map +1 -1
  308. package/dist/modes/interactive/components/chat-session-host-events.d.ts.map +1 -1
  309. package/dist/modes/interactive/components/chat-session-host-events.js +9 -0
  310. package/dist/modes/interactive/components/chat-session-host-events.js.map +1 -1
  311. package/dist/modes/interactive/components/chat-session-host-runtime.d.ts +25 -0
  312. package/dist/modes/interactive/components/chat-session-host-runtime.d.ts.map +1 -1
  313. package/dist/modes/interactive/components/chat-session-host-runtime.js +53 -0
  314. package/dist/modes/interactive/components/chat-session-host-runtime.js.map +1 -1
  315. package/dist/modes/interactive/components/chat-session-host.d.ts +13 -0
  316. package/dist/modes/interactive/components/chat-session-host.d.ts.map +1 -1
  317. package/dist/modes/interactive/components/chat-session-host.js +22 -1
  318. package/dist/modes/interactive/components/chat-session-host.js.map +1 -1
  319. package/dist/modes/interactive/components/footer.js +1 -1
  320. package/dist/modes/interactive/components/footer.js.map +1 -1
  321. package/dist/modes/interactive/components/login-dialog.d.ts.map +1 -1
  322. package/dist/modes/interactive/components/login-dialog.js +1 -3
  323. package/dist/modes/interactive/components/login-dialog.js.map +1 -1
  324. package/dist/modes/interactive/components/model-selector.d.ts +4 -3
  325. package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
  326. package/dist/modes/interactive/components/model-selector.js +56 -73
  327. package/dist/modes/interactive/components/model-selector.js.map +1 -1
  328. package/dist/modes/interactive/components/oauth-selector.d.ts +4 -3
  329. package/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -1
  330. package/dist/modes/interactive/components/oauth-selector.js +15 -24
  331. package/dist/modes/interactive/components/oauth-selector.js.map +1 -1
  332. package/dist/modes/interactive/interactive-agent-events.js +10 -4
  333. package/dist/modes/interactive/interactive-agent-events.js.map +1 -1
  334. package/dist/modes/interactive/interactive-auth-login.js +20 -31
  335. package/dist/modes/interactive/interactive-auth-login.js.map +1 -1
  336. package/dist/modes/interactive/interactive-auth-routing.d.ts +1 -1
  337. package/dist/modes/interactive/interactive-auth-routing.d.ts.map +1 -1
  338. package/dist/modes/interactive/interactive-auth-routing.js +21 -47
  339. package/dist/modes/interactive/interactive-auth-routing.js.map +1 -1
  340. package/dist/modes/interactive/interactive-autocomplete.js +3 -3
  341. package/dist/modes/interactive/interactive-autocomplete.js.map +1 -1
  342. package/dist/modes/interactive/interactive-deferred-startup.js +8 -8
  343. package/dist/modes/interactive/interactive-deferred-startup.js.map +1 -1
  344. package/dist/modes/interactive/interactive-extension-runtime.js +2 -1
  345. package/dist/modes/interactive/interactive-extension-runtime.js.map +1 -1
  346. package/dist/modes/interactive/interactive-model-catalog-startup.js +2 -2
  347. package/dist/modes/interactive/interactive-model-catalog-startup.js.map +1 -1
  348. package/dist/modes/interactive/interactive-model-routing.js +11 -11
  349. package/dist/modes/interactive/interactive-model-routing.js.map +1 -1
  350. package/dist/modes/interactive/interactive-render-chat.js +1 -1
  351. package/dist/modes/interactive/interactive-render-chat.js.map +1 -1
  352. package/dist/modes/interactive/interactive-slash-commands.js +2 -2
  353. package/dist/modes/interactive/interactive-slash-commands.js.map +1 -1
  354. package/dist/modes/interactive/interactive-startup.js +1 -1
  355. package/dist/modes/interactive/interactive-startup.js.map +1 -1
  356. package/dist/modes/interactive-engine/isolated-auth.d.ts +2 -2
  357. package/dist/modes/interactive-engine/isolated-auth.d.ts.map +1 -1
  358. package/dist/modes/interactive-engine/isolated-auth.js +4 -3
  359. package/dist/modes/interactive-engine/isolated-auth.js.map +1 -1
  360. package/dist/modes/interactive-engine/isolated-runtime.d.ts.map +1 -1
  361. package/dist/modes/interactive-engine/isolated-runtime.js +4 -3
  362. package/dist/modes/interactive-engine/isolated-runtime.js.map +1 -1
  363. package/dist/modes/interactive-engine/remote-model-catalog.d.ts +0 -1
  364. package/dist/modes/interactive-engine/remote-model-catalog.d.ts.map +1 -1
  365. package/dist/modes/interactive-engine/remote-model-catalog.js +11 -50
  366. package/dist/modes/interactive-engine/remote-model-catalog.js.map +1 -1
  367. package/dist/modes/rpc/rpc-client-api.d.ts +2 -2
  368. package/dist/modes/rpc/rpc-client-api.d.ts.map +1 -1
  369. package/dist/modes/rpc/rpc-client-api.js.map +1 -1
  370. package/dist/modes/rpc/rpc-command-handler.d.ts.map +1 -1
  371. package/dist/modes/rpc/rpc-command-handler.js +26 -19
  372. package/dist/modes/rpc/rpc-command-handler.js.map +1 -1
  373. package/dist/modes/rpc/rpc-oauth-client.d.ts +1 -1
  374. package/dist/modes/rpc/rpc-oauth-client.d.ts.map +1 -1
  375. package/dist/modes/rpc/rpc-oauth-client.js +1 -1
  376. package/dist/modes/rpc/rpc-oauth-client.js.map +1 -1
  377. package/dist/modes/rpc/rpc-oauth-interaction.d.ts +1 -1
  378. package/dist/modes/rpc/rpc-oauth-interaction.d.ts.map +1 -1
  379. package/dist/modes/rpc/rpc-oauth-interaction.js +1 -1
  380. package/dist/modes/rpc/rpc-oauth-interaction.js.map +1 -1
  381. package/dist/modes/rpc/rpc-provider-auth.d.ts +4 -5
  382. package/dist/modes/rpc/rpc-provider-auth.d.ts.map +1 -1
  383. package/dist/modes/rpc/rpc-provider-auth.js +19 -66
  384. package/dist/modes/rpc/rpc-provider-auth.js.map +1 -1
  385. package/dist/modes/rpc/rpc-session-binding.js +1 -1
  386. package/dist/modes/rpc/rpc-session-binding.js.map +1 -1
  387. package/dist/modes/rpc/rpc-types.d.ts +7 -4
  388. package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
  389. package/dist/modes/rpc/rpc-types.js.map +1 -1
  390. package/dist/package-manager-cli.d.ts.map +1 -1
  391. package/dist/package-manager-cli.js +5 -7
  392. package/dist/package-manager-cli.js.map +1 -1
  393. package/docs/changelog.mdx +1 -1
  394. package/docs/custom-provider.md +1 -1
  395. package/docs/models.md +4 -6
  396. package/docs/providers.md +13 -0
  397. package/docs/quickstart.md +2 -1
  398. package/docs/sdk.md +32 -49
  399. package/docs/tui.md +7 -2
  400. package/docs/workflows.md +4 -4
  401. package/examples/sdk/02-custom-model.ts +8 -10
  402. package/examples/sdk/09-api-keys-and-oauth.ts +17 -23
  403. package/examples/sdk/12-full-control.ts +9 -11
  404. package/examples/sdk/README.md +17 -21
  405. package/npm-shrinkwrap.json +23 -23
  406. package/package.json +2 -2
  407. package/dist/builtin/workflows/skills/impeccable/reference/brand.md +0 -108
  408. package/dist/builtin/workflows/skills/impeccable/reference/codex.md +0 -105
  409. package/dist/builtin/workflows/skills/impeccable/reference/interaction-design.md +0 -189
  410. package/dist/core/model-registry-auth.d.ts +0 -10
  411. package/dist/core/model-registry-auth.d.ts.map +0 -1
  412. package/dist/core/model-registry-auth.js +0 -98
  413. package/dist/core/model-registry-auth.js.map +0 -1
  414. package/dist/core/model-registry-builtins.d.ts +0 -8
  415. package/dist/core/model-registry-builtins.d.ts.map +0 -1
  416. package/dist/core/model-registry-builtins.js +0 -104
  417. package/dist/core/model-registry-builtins.js.map +0 -1
  418. package/dist/core/model-registry-custom-loader.d.ts +0 -3
  419. package/dist/core/model-registry-custom-loader.d.ts.map +0 -1
  420. package/dist/core/model-registry-custom-loader.js +0 -255
  421. package/dist/core/model-registry-custom-loader.js.map +0 -1
  422. package/dist/core/model-registry-dynamic.d.ts +0 -7
  423. package/dist/core/model-registry-dynamic.d.ts.map +0 -1
  424. package/dist/core/model-registry-dynamic.js +0 -189
  425. package/dist/core/model-registry-dynamic.js.map +0 -1
  426. package/dist/core/model-registry-extension-refresh.d.ts +0 -23
  427. package/dist/core/model-registry-extension-refresh.d.ts.map +0 -1
  428. package/dist/core/model-registry-extension-refresh.js +0 -32
  429. package/dist/core/model-registry-extension-refresh.js.map +0 -1
  430. package/dist/core/model-registry-loader.d.ts +0 -5
  431. package/dist/core/model-registry-loader.d.ts.map +0 -1
  432. package/dist/core/model-registry-loader.js +0 -29
  433. package/dist/core/model-registry-loader.js.map +0 -1
  434. package/dist/core/model-registry-schemas.d.ts +0 -1399
  435. package/dist/core/model-registry-schemas.d.ts.map +0 -1
  436. package/dist/core/model-registry-schemas.js.map +0 -1
  437. package/dist/core/model-registry-types.d.ts +0 -91
  438. package/dist/core/model-registry-types.d.ts.map +0 -1
  439. package/dist/core/model-registry-types.js +0 -2
  440. package/dist/core/model-registry-types.js.map +0 -1
  441. package/dist/core/model-registry-validation.d.ts +0 -7
  442. package/dist/core/model-registry-validation.d.ts.map +0 -1
  443. package/dist/core/model-registry-validation.js +0 -12
  444. package/dist/core/model-registry-validation.js.map +0 -1
  445. package/dist/core/oauth-compat.d.ts +0 -17
  446. package/dist/core/oauth-compat.d.ts.map +0 -1
  447. package/dist/core/oauth-compat.js +0 -2
  448. package/dist/core/oauth-compat.js.map +0 -1
  449. package/dist/core/oauth-provider-bridge.d.ts +0 -63
  450. package/dist/core/oauth-provider-bridge.d.ts.map +0 -1
  451. package/dist/core/oauth-provider-bridge.js +0 -232
  452. package/dist/core/oauth-provider-bridge.js.map +0 -1
@@ -0,0 +1,53 @@
1
+ Report and repair drift between this project's Impeccable artifacts and what the installed version reads: PRODUCT.md, DESIGN.md and its `.impeccable/design.json` sidecar, `.impeccable/config.json`, persisted surface briefs, and the design hook.
2
+
3
+ This is maintenance, not design. Do not redesign anything, do not open files outside the ones the report names, and do not run any other command as a side effect.
4
+
5
+ ## What this owns, and what it does not
6
+
7
+ Three kinds of drift travel under "out of date". Keep them apart:
8
+
9
+ - **Tool version.** The installed skill is older than the published one. `context.mjs` reports that at boot as `UPDATE_AVAILABLE` and `npx impeccable update` fixes it. Not this command's job.
10
+ - **Schema drift.** An artifact was written by an older Impeccable: fields nothing reads, fields now expected, files in retired locations. Mechanical, and this command repairs most of it.
11
+ - **Truth drift.** The code moved on and the document no longer describes it. No file comparison settles this. `document` owns DESIGN.md, `init` owns PRODUCT.md, and this command's job is to hand them a specific gap rather than a vague suspicion.
12
+
13
+ ## Step 1: Run the pass
14
+
15
+ ```
16
+ node .agents/skills/impeccable/scripts/doctor.mjs --json
17
+ ```
18
+
19
+ Add `--target <path>` when the user named a workspace, file, or route in a monorepo. Without it the report describes the repo root, and in a monorepo that is often the wrong project.
20
+
21
+ The output carries `findings` (each with `id`, `artifact`, `path`, `severity`, `summary`, `fix`) and, in a monorepo, `workspaces` with each app's product and design resolution. `ruleRegistryAvailable: false` means ignored rule ids could not be validated; say so rather than implying that list is clean.
22
+
23
+ An empty `findings` array is the good outcome. Say so in one line and stop.
24
+
25
+ ## Step 2: Act by severity
26
+
27
+ The severity says what should happen, not how bad it is.
28
+
29
+ - **`auto`** carries no decision. Run `node .agents/skills/impeccable/scripts/doctor.mjs --fix` once to apply these, then report what it moved in one line. Do not ask permission first, and do not ask about them afterward.
30
+ - **`mention`** needs the user to know but not to decide anything now. State each one in a sentence with its offered fix.
31
+ - **`route`** needs a specific command. Name the command and the gap it would close. Run it only if the user asks in this turn; `init` and `document` are conversations, not repairs you perform unattended.
32
+
33
+ Report all three groups in one pass. Findings are not errors and the command does not fail on them.
34
+
35
+ ## Step 3: Deprecated fields are binding
36
+
37
+ A finding that reports a deprecated field (`## Register` is the current one) is not a style note. Treat that field as absent for every decision from here on, whatever value it holds, and offer to delete the section. Preserving it "just in case" is how a retired axis keeps steering current output.
38
+
39
+ ## Step 4: Do not overclaim on truth drift
40
+
41
+ `design-md-drift` counts commits to the visual source directories since DESIGN.md was last edited. A commit count is not a contradiction. Report the number, say what it measures, and if the user wants to know whether the document is actually wrong, read DESIGN.md against the current tokens and components and answer from that. Never assert that DESIGN.md is stale because the number is large.
42
+
43
+ The same restraint applies to `workspace-context-inherited`. Inheritance is a designed behavior. Whether one product record truthfully describes several apps is a question for the user, not a defect to fix.
44
+
45
+ ## Monorepo notes
46
+
47
+ - `workspace-platform-native-evidence` is the finding that matters most here: a workspace carrying native build files while inheriting a root record that resolves to web gets web guidance for its whole life and never loads [ios.md](ios.md) or [android.md](android.md). The repair is a child PRODUCT.md in that workspace, because one inherited record cannot hold two platforms.
48
+ - `config-project-roots-match-nothing` means every `projectRoots` glob missed, so the repo root is silently standing in as the active project. A renamed workspace directory is the usual cause. Report the patterns and ask which directories they should name.
49
+ - Use the `workspaces` table to show the user which apps carry their own context, which inherit, and which have none, before proposing any change.
50
+
51
+ ## Opting out of the boot check
52
+
53
+ `context.mjs` reports the cheap subset of these findings at session start, throttled to once a week per project. Set `"stalenessCheck": false` in `.impeccable/config.json` to silence that, or `IMPECCABLE_NO_STALENESS_CHECK=1` for one session. This command still works with the check disabled, and that is the combination to suggest for a user who wants the report only when they ask for it.
@@ -1,6 +1,6 @@
1
1
  Generate a `DESIGN.md` file at the project root that captures the current visual design system, so AI agents generating new screens stay on-brand.
2
2
 
3
- DESIGN.md follows the [official DESIGN.md format spec](https://raw.githubusercontent.com/google-labs-code/design.md/main/docs/spec.md): YAML frontmatter carrying machine-readable design tokens, followed by a markdown body with exactly six sections in a fixed order. **Tokens are normative; prose provides context for how to apply them.** Sections may be omitted when not relevant, but **do not reorder them and do not rename them**. Section headers must match the spec character-for-character so the file stays parseable by other DESIGN.md-aware tools (Stitch itself, awesome-design-md, skill-rest, etc.).
3
+ DESIGN.md follows the [official DESIGN.md format spec](https://raw.githubusercontent.com/google-labs-code/design.md/main/docs/spec.md): optional YAML frontmatter carrying machine-readable design tokens, followed by up to eight markdown sections in a fixed order. **Tokens are normative; prose provides context for how to apply them.** Sections may be omitted when not relevant, but those present stay in the specified order. Use the canonical headings below so the file remains portable across DESIGN.md-aware tools.
4
4
 
5
5
  ## The frontmatter: token schema
6
6
 
@@ -43,26 +43,28 @@ components:
43
43
  Rules that matter:
44
44
 
45
45
  - **Token refs** use `{path.to.token}` (e.g. `{colors.primary}`, `{rounded.md}`). Components may reference primitives; primitives may not reference each other.
46
- - **Stitch validates colors as hex sRGB only** (`#RGB` / `#RGBA` / `#RRGGBB` / `#RRGGBBAA`); OKLCH/HSL/P3 trigger a linter warning, not a hard error. YAML accepts the string either way and our own parser is format-agnostic. Choose based on project posture: (a) if the project has an "OKLCH-only" doctrine or uses Display-P3 values that don't round-trip through sRGB, put OKLCH directly in the frontmatter and accept the Stitch linter warning; (b) if the project wants strict Stitch compliance or plans to use their Tailwind/DTCG export pipeline, put hex in the frontmatter and keep OKLCH in prose as the canonical reference. Never split the source of truth without explicit reason.
46
+ - **Colors accept any valid CSS color string.** Hex is the recommended default for portability, but preserve an incumbent `rgb()`, `hsl()`, `oklch()`, wide-gamut, or mixed-color value when it is the project's normative source. Never split the source of truth without explicit reason.
47
47
  - **Component sub-tokens** are limited to 8 props: `backgroundColor`, `textColor`, `typography`, `rounded`, `padding`, `size`, `height`, `width`. Shadows, motion, focus rings, backdrop-filter: none of those fit. Carry them in the sidecar (Step 4b).
48
48
  - **Scale keys are open-ended.** Use whatever names the project already uses (`oxblood-deep`, `surface-container-low`). Don't rename to Material defaults.
49
49
  - **Variants are naming convention, not schema.** `button-primary` / `button-primary-hover` / `button-primary-active` as sibling keys.
50
50
 
51
- ## The markdown body: six sections (exact order)
51
+ ## The markdown body: eight sections (canonical order)
52
52
 
53
53
  1. `## Overview`
54
54
  2. `## Colors`
55
55
  3. `## Typography`
56
- 4. `## Elevation`
57
- 5. `## Components`
58
- 6. `## Do's and Don'ts`
56
+ 4. `## Layout`
57
+ 5. `## Elevation & Depth`
58
+ 6. `## Shapes`
59
+ 7. `## Components`
60
+ 8. `## Do's and Don'ts`
59
61
 
60
- Optional evocative subtitles are allowed in the form `## 2. Colors: The [Name] Palette` (Stitch's own outputs do this), but the literal word in each header (Overview, Colors, Typography, Elevation, Components, Do's and Don'ts) must be present. Do NOT add extra top-level sections (Layout Principles, Responsive Behavior, Motion, Agent Prompt Guide). Fold that content into the six spec sections where it naturally belongs.
62
+ Omit irrelevant sections rather than filling them with invented rules. Put responsive layout in Layout, depth in Elevation & Depth, radius and form language in Shapes, and per-component behavior in Components. Unknown sections are preserved by the format, but new visual guidance should use the canonical structure whenever it fits.
61
63
 
62
64
  ## When to run
63
65
 
64
- - The user just ran `$impeccable init` and needs the visual side documented.
65
- - The skill noticed no `DESIGN.md` exists and nudged the user to create one.
66
+ - New-work found a coherent incumbent visual system but no `DESIGN.md`.
67
+ - The first implementation of a new world is complete and its provisional decisions need to be carbonized.
66
68
  - An existing `DESIGN.md` is stale (the design has drifted).
67
69
  - Before a large redesign, to capture the current state as a reference.
68
70
 
@@ -71,9 +73,9 @@ If a `DESIGN.md` already exists, **do not silently overwrite it**. Show the user
71
73
  ## Two paths
72
74
 
73
75
  - **Scan mode** (default): the project has design tokens, components, or rendered output. Extract, then confirm descriptive language. Use when there's code to analyze.
74
- - **Seed mode**: the project is pre-implementation (fresh init, nothing built yet). Interview for five high-level answers, write a minimal DESIGN.md marked `<!-- SEED -->`. Re-run in scan mode once there's code.
76
+ - **Seed mode**: the project is pre-implementation. Ensure PRODUCT.md exists, then reuse new-work's visual-world workshop and write its directional DESIGN.md seed. Re-run in scan mode once there's code.
75
77
 
76
- Decide by scanning first (Scan mode Step 1). If the scan finds no tokens, no component files, and no rendered site, offer seed mode; don't silently switch. `$impeccable document --seed` forces seed mode regardless of code presence.
78
+ Decide by scanning first (Scan mode Step 1). If the scan finds no tokens, no component files, and no rendered site, offer seed mode; don't silently switch. `$impeccable document --seed` requests new-work's world workshop, but it does not authorize replacing coherent code: when an incumbent system exists, offer scan mode or route an explicit identity-replacement request through new-work.
77
79
 
78
80
  ## Scan mode (approach C: auto-extract, then confirm descriptive language)
79
81
 
@@ -97,7 +99,8 @@ Build a structured draft from the discovered tokens. For each token class:
97
99
  - **Typography**: Map observed sizes and weights to the Material hierarchy (display / headline / title / body / label). Note font-family stacks and the scale ratio.
98
100
  - **Elevation**: Catalogue the shadow vocabulary. If the project is flat and uses tonal layering instead, that's a valid answer; state it explicitly.
99
101
  - **Components**: For each common component (button, card, input, chip, list item, tooltip, nav), extract shape (radius), color assignment, hover/focus treatment, internal padding.
100
- - **Spacing + layout**: Fold into Overview or relevant Components. The spec does NOT have a Layout section.
102
+ - **Layout + spacing**: Extract grid, container, breakpoint, rhythm, and density behavior into Layout.
103
+ - **Shapes**: Extract radius, corner, border, clipping, and recurring form behavior into Shapes.
101
104
 
102
105
  ### Step 2b: Stage the frontmatter
103
106
 
@@ -112,19 +115,19 @@ Skip anything the project doesn't have. Empty scale keys or fabricated tokens po
112
115
 
113
116
  ### Step 3: Ask the user for qualitative language
114
117
 
115
- The following require creative input that cannot be auto-extracted. Group them into one `AskUserQuestion` interaction:
118
+ The following require creative input that cannot be auto-extracted. Ask them in two structured rounds of no more than three questions each (or the harness's lower limit), waiting between rounds:
116
119
 
117
120
  - **Creative North Star**: a single named metaphor for the whole system ("The Editorial Sanctuary", "The Golden State Curator", "The Lab Notebook"). Offer 2-3 options that honor PRODUCT.md's brand personality.
118
- - **Overview voice**: mood adjectives, aesthetic philosophy in 2-3 sentences, anti-references (what the system should not feel like).
121
+ - **Overview voice**: mood adjectives, aesthetic philosophy in 2-3 sentences, and any confirmed visual anti-reference.
119
122
  - **Color character** (for auto-extracted colors): descriptive names ("Deep Muted Teal-Navy", not "blue-800"). Suggest 2-3 options per key color based on hue/saturation.
120
123
  - **Elevation philosophy**: flat/layered/lifted. If shadows exist, is their role ambient or structural?
121
124
  - **Component philosophy**: the feel of buttons, cards, inputs in one phrase ("tactile and confident" vs. "refined and restrained").
122
125
 
123
- Quote a line from PRODUCT.md when possible so the user sees their own strategic language carry forward.
126
+ Carry a line from PRODUCT.md only when it is a durable brand commitment that actually constrains the visual system. Page strategy and surface concepts do not belong here.
124
127
 
125
128
  ### Step 4: Write DESIGN.md
126
129
 
127
- The file opens with the YAML frontmatter staged in Step 2b (schema documented at the top of this reference), then the markdown body using the structure below. Headers must match character-for-character. Optional evocative subtitles (e.g. `## 2. Colors: The Coastal Palette`) are allowed.
130
+ The file opens with the YAML frontmatter staged in Step 2b (schema documented at the top of this reference), then the markdown body using the canonical structure below.
128
131
 
129
132
  ```markdown
130
133
  ---
@@ -136,13 +139,13 @@ colors:
136
139
 
137
140
  # Design System: [Project Title]
138
141
 
139
- ## 1. Overview
142
+ ## Overview
140
143
 
141
144
  **Creative North Star: "[Named metaphor in quotes]"**
142
145
 
143
- [2-3 paragraph holistic description: personality, density, aesthetic philosophy. Start from the North Star and work outward. State what this system explicitly rejects (pulled from PRODUCT.md's anti-references). End with a short **Key Characteristics:** bullet list.]
146
+ [2-3 paragraph holistic description: personality, density, and aesthetic philosophy. Start from the North Star and work outward. State only confirmed visual rejections. End with a short **Key Characteristics:** bullet list.]
144
147
 
145
- ## 2. Colors
148
+ ## Colors
146
149
 
147
150
  [Describe the palette character in one sentence.]
148
151
 
@@ -162,7 +165,7 @@ colors:
162
165
  ### Named Rules (optional, powerful)
163
166
  **The [Rule Name] Rule.** [Short, forceful prohibition or doctrine, e.g. "The One Voice Rule. The primary accent is used on ≤10% of any given screen. Its rarity is the point."]
164
167
 
165
- ## 3. Typography
168
+ ## Typography
166
169
 
167
170
  **Display Font:** [Family] (with [fallback])
168
171
  **Body Font:** [Family] (with [fallback])
@@ -180,7 +183,11 @@ colors:
180
183
  ### Named Rules (optional)
181
184
  **The [Rule Name] Rule.** [Short doctrine about type use.]
182
185
 
183
- ## 4. Elevation
186
+ ## Layout
187
+
188
+ [Describe the grid or spatial model, container behavior, density, responsive changes, and the spacing rhythm. Include exact values only when observed.]
189
+
190
+ ## Elevation & Depth
184
191
 
185
192
  [One paragraph: does this system use shadows, tonal layering, or a hybrid? If "no shadows", say so explicitly and describe how depth is conveyed instead.]
186
193
 
@@ -191,7 +198,11 @@ colors:
191
198
  ### Named Rules (optional)
192
199
  **The [Rule Name] Rule.** [e.g. "The Flat-By-Default Rule. Surfaces are flat at rest. Shadows appear only as a response to state (hover, elevation, focus)."]
193
200
 
194
- ## 5. Components
201
+ ## Shapes
202
+
203
+ [Describe the form language: corner/radius strategy, borders, clipping, and any recurring silhouette or geometry.]
204
+
205
+ ## Components
195
206
 
196
207
  For each component, lead with a short character line, then specify shape, color assignment, states, and any distinctive behavior.
197
208
 
@@ -223,16 +234,16 @@ For each component, lead with a short character line, then specify shape, color
223
234
  ### [Signature Component] (optional; if the project has a distinctive custom component worth documenting)
224
235
  [Description.]
225
236
 
226
- ## 6. Do's and Don'ts
237
+ ## Do's and Don'ts
227
238
 
228
- Concrete, forceful guardrails. Lead each with "Do" or "Don't". Be specific: include exact colors, pixel values, and named anti-patterns the user mentioned in PRODUCT.md. **Every anti-reference in PRODUCT.md should show up here as a "Don't" with the same language**, so the visual spec carries the strategic line through. Quote PRODUCT.md directly where possible: if PRODUCT.md says *"avoid dark mode with purple gradients, neon accents, glassmorphism"*, the Don'ts here should repeat that by name.
239
+ Concrete visual guardrails grounded in the incumbent implementation or the user's chosen world. Lead each with "Do" or "Don't" and include exact values only when established. Do not turn a task-specific concept or surface strategy into a system-wide prohibition.
229
240
 
230
241
  ### Do:
231
242
  - **Do** [specific prescription with exact values / named rule].
232
243
  - **Do** [...]
233
244
 
234
245
  ### Don't:
235
- - **Don't** [specific prohibition, e.g. "use border-left greater than 1px as a colored stripe"].
246
+ - **Don't** [specific prohibition confirmed by the incumbent system or the user].
236
247
  - **Don't** [...]
237
248
  - **Don't** [...]
238
249
  ```
@@ -274,7 +285,7 @@ Regenerate the sidecar whenever you regenerate root `DESIGN.md`. If the user onl
274
285
  "kind": "button | input | nav | chip | card | custom",
275
286
  "refersTo": "button-primary",
276
287
  "description": "One-line what and when.",
277
- "html": "<button class=\"ds-btn-primary\">GET STARTED</button>",
288
+ "html": "<button class=\"ds-btn-primary\">SAVE CHANGES</button>",
278
289
  "css": ".ds-btn-primary { background: #191c1d; color: #fff; padding: 16px 48px; letter-spacing: 0.05em; text-transform: uppercase; font-weight: 500; border: none; border-radius: 0; transition: background 0.2s, transform 0.2s; } .ds-btn-primary:hover { background: oklch(60% 0.25 350); transform: translateY(-2px); }"
279
290
  }
280
291
  ],
@@ -307,7 +318,7 @@ The `html` and `css` fields must be **self-contained, drop-in snippets** that re
307
318
  Aim for a tight set of **5-10 components** that best represent the visual system:
308
319
 
309
320
  - **Canonical primitives (always include if the project has them):** button (each variant as a separate component entry), input/text field, navigation, chip/tag, card.
310
- - **Signature components (include if distinctive):** hero CTA, featured card, filter pill, any custom pattern the user mentioned as important in PRODUCT.md.
321
+ - **Signature components (include if distinctive):** the recurring custom patterns that actually define the implemented system.
311
322
  - **Skip the rest.** Utility components, form building blocks, wrapper layouts: not worth documenting unless visually distinctive.
312
323
 
313
324
  If the project has **no component library yet** (bare landing page, new project), synthesize canonical primitives from the tokens using best-practice defaults consistent with the DESIGN.md's rules. Every `.impeccable/design.json` has *something* to render, even on day zero.
@@ -338,64 +349,40 @@ Your own write is the freshest source; subsequent commands in this session don't
338
349
 
339
350
  ## Seed mode
340
351
 
341
- For projects with no visual system to extract yet. Produces a minimal scaffold, not a full spec.
342
-
343
- ### Step 1: Confirm seed mode
344
-
345
- Before interviewing: "There's no existing visual system to scan. I'll ask five quick questions to seed a starter DESIGN.md. You can re-run `$impeccable document` once there's code, to capture the real tokens and components. OK?"
346
-
347
- If the user prefers to skip, stop. No file.
348
-
349
- ### Step 2: Five questions
350
-
351
- Group into one `AskUserQuestion` interaction. Options must be concrete.
352
-
353
- 1. **Color strategy.** Pick one:
354
- - Restrained: tinted neutrals + one accent ≤10%
355
- - Committed: one saturated color carries 30–60% of the surface
356
- - Full palette: 3–4 named color roles, each deliberate
357
- - Drenched: the surface IS the color
358
-
359
- Then: one hue family or anchor reference ("deep teal", "mustard", "Klim #ff4500 orange").
352
+ For projects with no visual system to extract yet. Produces a user-chosen visual-world scaffold, not a fabricated token spec.
360
353
 
361
- 2. **Typography direction.** Pick one (specific fonts come later):
362
- - Serif display + sans body
363
- - Single sans (warm / technical / geometric / humanist; pick a feel)
364
- - Display + mono
365
- - Mono-forward
366
- - Editorial script + sans
354
+ ### Step 1: Route through new-work's workshop
367
355
 
368
- 3. **Motion energy.** Pick one:
369
- - Restrained: state changes only
370
- - Responsive: feedback + transitions, no choreography
371
- - Choreographed: orchestrated entrances, scroll-driven sequences
356
+ PRODUCT.md is the prerequisite. If it is missing, load [init.md](init.md) and complete its product interview first. Do not create a visual identity without durable product context.
372
357
 
373
- 4. **Three named references.** Brands, products, printed objects. Not adjectives.
358
+ If PRODUCT.md exists, load [new-work.md](new-work.md) and resolve visual authority. Seed mode requires a concrete first surface: use the target the user named, or ask what they want to make first. Run new-work's **Create or replace the visual world** flow, then **Commit the world**, so the visual world and its first expression are chosen together. Stop after the directional DESIGN.md seed and surface brief; do not implement. A structured simulated user counts as the user and must get the same choice.
374
359
 
375
- 5. **One anti-reference.** What it should NOT feel like. Also named.
360
+ If new-work already completed the workshop in this session, use its chosen direction directly. Do not ask again.
376
361
 
377
- ### Step 3: Write seed DESIGN.md
362
+ ### Step 2: Write seed DESIGN.md
378
363
 
379
- Use the six-section spec from Scan mode. Populate what the interview answers; leave the rest as honest placeholders. The seed is a scaffold, not a fabricated spec.
364
+ Use the canonical section order from Scan mode. Populate the selected workshop direction and leave unresolved implementation facts as honest placeholders. The seed commits a world and its invariants; it does not pretend implementation tokens already exist.
380
365
 
381
366
  Lead the file with:
382
367
 
383
368
  ```markdown
384
- <!-- SEED: re-run $impeccable document once there's code to capture the actual tokens and components. -->
369
+ <!-- SEED: established with the user before implementation; re-run $impeccable document once there's code to capture the actual tokens and components. -->
385
370
  ```
386
371
 
387
372
  Per-section guidance in seed mode:
388
373
 
389
- - **Overview**: Creative North Star and philosophy phrased from the answers (color strategy + motion energy + references). Reference the user's anti-reference directly.
390
- - **Colors**: Color strategy as a Named Rule (e.g. *"The Drenched Rule. The surface IS the color."*). Hue family or anchor reference. No hex values; mark as `[to be resolved during implementation]`.
391
- - **Typography**: the direction the user picked (e.g. "Serif display + sans body"). No font names yet: `[font pairing to be chosen at implementation]`.
392
- - **Elevation**: inferred from motion energy. Restrained/Responsive flat by default; Choreographed layered. One sentence.
374
+ - **Overview**: the chosen design thesis, layout behavior, material character, imagery stance, motion grammar, and reusable signature. Keep the selected first-surface expression in its surface brief; do not promote its composition into the global world.
375
+ - **Colors**: the selected palette strategy and roles. Include values only when the user, an existing asset, or new-work's exploration established them; otherwise mark them `[to be resolved during implementation]`.
376
+ - **Typography**: the selected type character and role relationship. Include font names only when established; otherwise mark the pairing `[to be resolved during implementation]`.
377
+ - **Layout**: the selected spatial grammar and responsive behavior, without pretending exact measurements are settled.
378
+ - **Elevation & Depth**: the selected material and depth behavior, stated as an invariant rather than inferred from a generic preset.
379
+ - **Shapes**: the selected form and corner language.
393
380
  - **Components**: omit entirely; no components exist yet.
394
- - **Do's and Don'ts**: carry PRODUCT.md's anti-references directly plus the anti-reference named in Q5.
381
+ - **Do's and Don'ts**: record the durable guardrails confirmed during the world choice, not task-local refusals.
395
382
 
396
383
  Seed mode writes a minimal frontmatter with `name` and `description` only; no colors, typography, rounded, spacing, or components yet. Real tokens land on the next Scan-mode run. Skip the `.impeccable/design.json` sidecar in seed mode for the same reason: nothing to render.
397
384
 
398
- ### Step 4: Confirm
385
+ ### Step 3: Confirm
399
386
 
400
387
  1. Show the seed DESIGN.md. Call out that it is a seed (the marker is the literal commitment).
401
388
  2. Tell the user: "Re-run `$impeccable document` once you have some code. That pass will extract real tokens and generate the sidecar."
@@ -405,15 +392,15 @@ Your own write is the freshest source; no reload needed.
405
392
  ## Style guidelines
406
393
 
407
394
  - **Frontmatter first, prose second.** Tokens go in the YAML frontmatter; prose contextualizes them. Don't redefine a token value in two places; the frontmatter is normative.
408
- - **Cite PRODUCT.md anti-references by name** in the Do's and Don'ts section. If PRODUCT.md lists "SaaS landing-page clichés" or "generic AI tool marketing" as anti-references, the DESIGN.md Don'ts should repeat those phrases verbatim so the visual spec enforces the strategic line.
409
- - **Match the spec, don't invent new sections.** The six section names are fixed. If you have Layout/Motion/Responsive content to document, fold it into Overview (philosophy-level rules) or Components (per-component behavior).
395
+ - **Carry only durable product constraints.** A binding logo, identity asset, accessibility need, or brand commitment from PRODUCT.md may constrain DESIGN.md. Surface strategy stays in its surface brief.
396
+ - **Match the spec.** Use its eight canonical sections in order and omit any that are irrelevant. Put motion guidance with the world or component it affects rather than creating a token group the schema does not support.
410
397
  - **Descriptive > technical**: "Gently curved edges (8px radius)" > "rounded-lg". Include the technical value in parens, lead with the description.
411
398
  - **Functional > decorative**: for each token, explain WHERE and WHY it's used, not just WHAT it is.
412
399
  - **Exact values in parens**: hex codes, px/rem values, font weights; always the number in parens alongside the description.
413
400
  - **Use Named Rules**: `**The [Name] Rule.** [short doctrine]`. These are memorable, citable, and much stickier for AI consumers than bullet lists. Stitch's own outputs use them heavily ("The No-Line Rule", "The Ghost Border Fallback"). Aim for 1-3 per section.
414
- - **Be forceful**. The voice of a design director. "Prohibited", "forbidden", "never", "always", not "consider", "might", "prefer". Match PRODUCT.md's tone.
415
- - **Concrete anti-pattern tests**. Stitch writes things like *"If it looks like a 2014 app, the shadow is too dark and the blur is too small."* A one-sentence audit test beats a paragraph of principle.
416
- - **Reference PRODUCT.md**. The anti-references section of PRODUCT.md should directly inform the Do's and Don'ts section here. Quote or paraphrase.
401
+ - **Be decisive where evidence is decisive.** Use hard language for actual invariants and softer language for provisional guidance.
402
+ - **Use concrete audit tests only when they are grounded in the observed system or a confirmed user decision.** A one-sentence test beats a paragraph of principle.
403
+ - **Reference PRODUCT.md selectively.** Product truth explains why the world fits; it does not supply page composition or a visual don't-list by default.
417
404
  - **Group colors by role**, not by hex-order or hue-order. Primary / Secondary / Tertiary / Neutral is the spec ordering.
418
405
 
419
406
  ## Pitfalls
@@ -423,7 +410,7 @@ Your own write is the freshest source; no reload needed.
423
410
  - Don't invent components that don't exist. If the project only has buttons and cards, only document those.
424
411
  - Don't overwrite an existing DESIGN.md without asking.
425
412
  - Don't duplicate content from PRODUCT.md. DESIGN.md is strictly visual.
426
- - Don't add a "Layout Principles" or "Motion" or "Responsive Behavior" top-level section. The spec has six, not nine. Fold that content where it belongs.
413
+ - Don't replace canonical sections with near-synonyms. Put layout and responsive behavior in `Layout`; put motion with the affected world or component.
427
414
  - Don't rename sections even slightly. "Colors" not "Color Palette & Roles". "Typography" not "Typography Rules". Tooling parsing depends on exact headers.
428
415
  - Don't duplicate token values between frontmatter and prose. If a color is in `colors.primary` as hex, the prose can name it and describe its role but should not reassert a different hex. The frontmatter is normative.
429
416
  - Don't invent frontmatter token groups outside Stitch's schema (no `motion:`, `breakpoints:`, `shadows:` at the top level). Stitch's Zod schema only accepts `colors`, `typography`, `rounded`, `spacing`, `components`. Anything else belongs in the sidecar's `extensions`.
@@ -78,7 +78,7 @@ Systematically improve resilience:
78
78
 
79
79
  **Responsive text sizing**:
80
80
  - Use `clamp()` for fluid typography
81
- - Set minimum readable sizes (14px on mobile)
81
+ - Set minimum readable sizes (16px body on mobile, the same floor the typography guidance sets; 14px only for genuinely secondary text. iOS Safari force-zooms focused inputs under 16px, which breaks form layouts)
82
82
  - Test text scaling (zoom to 200%)
83
83
  - Ensure containers expand with text
84
84
 
@@ -261,17 +261,6 @@ t('items', { count }) // Handles complex plural rules
261
261
  - Descriptive alt text
262
262
  - Semantic HTML
263
263
 
264
- **Motion sensitivity**:
265
- ```css
266
- @media (prefers-reduced-motion: reduce) {
267
- * {
268
- animation-duration: 0.01ms !important;
269
- animation-iteration-count: 1 !important;
270
- transition-duration: 0.01ms !important;
271
- }
272
- }
273
- ```
274
-
275
264
  **High contrast mode**:
276
265
  - Test in Windows high contrast mode
277
266
  - Don't rely only on color
@@ -4,6 +4,10 @@ Manage the **design detector hook** for the current project.
4
4
 
5
5
  The hook runs the impeccable design detector on direct file edits to design-relevant files (`.tsx`, `.jsx`, `.html`, `.vue`, `.svelte`, `.astro`, `.css`, `.scss`, `.sass`, `.less`, `.ts`, `.js`). Claude Code, Codex, and GitHub Copilot use a post-tool-use hook and push a short system reminder into the agent's context after the edit; findings get a correction prompt, pending issues get a re-nudge, and clean UI-ish files get a short ack unless quiet mode is on (`hook.quiet` in config). Plain `.ts` and `.js` files are still scanned, but stay quiet unless the detector finds something.
6
6
 
7
+ The detector rules run in two tiers. The per-edit hook surfaces only the immediate tier: mechanical, unambiguous problems worth interrupting an edit for, such as broken images, overflowing or clipped content, contrast and legibility failures, gradient text, glow shadows, and design-system drift. Everything else (copy cadence, palette and typography taste, layout rhythm) is deferred to a deep pass on the `Stop` hook event, which runs the full rule set over every UI file touched in the session and surfaces the remaining findings once, deduplicated against what the per-edit pass already reported. A session with nothing left to report stops silently. Set `hook.perEditRules` to `"all"` in `.impeccable/config.json` to restore the full rule set on every edit. The Stop deep pass is wired for Claude Code and Codex, which both dispatch a native `Stop` hook event. GitHub Copilot's stop-style events do not feed context back to the model, so it keeps the full detector per edit.
8
+
9
+ Every hook is a mechanical pass. The reflexes no scanner catches live in [craft-floor.md](craft-floor.md), which the skill loads before it edits UI, so they apply whether or not a hook is wired. A session with no automatic hook gets one `MANUAL_DETECTOR_REQUIRED` directive from `context.mjs` asking for a single detector run at the end.
10
+
7
11
  This command toggles the hook **per project** by editing `.impeccable/config.json` (the unified Impeccable config; hook runtime settings live under its `hook` key, and shared detector ignores live under `detector`). Per-developer overrides, including the install consent decision (`hook.consent`) the CLI records, live in the gitignored `.impeccable/config.local.json`. Set `hook.enabled: false` to turn the hook off, `hook.quiet: true` to silence the clean/pending acks, or `hook.auditLog` to a file path for an NDJSON log. The legacy `IMPECCABLE_HOOK_DISABLED`, `IMPECCABLE_HOOK_QUIET`, and `IMPECCABLE_HOOK_LOG` env vars are still honored and override these config values when set.
8
12
 
9
13
  Declare server-side template extensions under **`detector.extensions`** when the project uses Blade, Twig, ERB, or Handlebars files; the hook skips them otherwise because they sit outside the built-in extension list. One entry per extension, `{ "ext": ".blade.php", "engine": "html" }`. `engine` picks the analyzer (`html` for markup templates, `text` for JS/TS/CSS-like files) and defaults to `html`. Match against the end of the filename, so double extensions like `.blade.php` and `.html.erb` work. Config only adds extensions; the built-in list always applies.
@@ -21,10 +25,11 @@ The first argument is the action. Defaults to `status`.
21
25
  | `status` | Print current state, shared/local config paths, ignored rules / files / values, env override. |
22
26
  | `on` | Set `enabled: true` in `.impeccable/config.json`, record local hook consent as accepted, and install/repair provider hook manifests when the skill is installed. |
23
27
  | `off` | Set `enabled: false` in `.impeccable/config.json`. |
24
- | `ignore-rule <id>` | Append `<id>` to `detector.ignoreRules`; for `overused-font`, requires `--all-values`. |
25
- | `ignore-file <glob>` | Append `<glob>` to `detector.ignoreFiles`. |
28
+ | `ignore-rule <id>` | Append `<id>` to `detector.ignoreRules`; for `overused-font`, requires `--all-values`. Suppresses the rule across the whole project. |
29
+ | `ignore-file <glob>` | Append `<glob>` to `detector.ignoreFiles`. Suppresses **every** rule for matching files. |
26
30
  | `ignore-value <id> <value> [--shared] [--reason "..."]` | Append a rule/value suppression to shared `.impeccable/config.json`. |
27
31
  | `ignore-value <id> <value> --local [--reason "..."]` | Append a private rule/value suppression to `.impeccable/config.local.json`. |
32
+ | `ignore-value <id> "*" --file <glob> [--file <glob>...]` | Turn one rule off in matching files only, leaving it active everywhere else. Repeat `--file`, or use `--file=<glob>` / `--files=<glob>`. A bare `"*"` with no `--file` is refused: use `ignore-rule <id>` if you really mean project-wide. |
28
33
  | `reset` | Delete the project config and dedup cache. |
29
34
 
30
35
  ## Flow
@@ -49,7 +54,8 @@ Prefer the narrowest exception:
49
54
 
50
55
  - If the finding line shows an exact `ignore-value` command, run that command. This writes shared `.impeccable/config.json` by default.
51
56
  - For value-specific findings such as `overused-font` and `bounce-easing`, use `ignore-value` when the user confirms the specific value. Do not use `ignore-rule overused-font` for a specific font.
52
- - If the finding has no value-specific command, such as `side-tab`, prefer `ignore-file <path>` for the current file.
57
+ - If the finding has no value-specific command, such as `side-tab`, scope that one rule to the file: `ignore-value <id> "*" --file <path>`. Run `npx impeccable detect <path>` first to see what actually fires there.
58
+ - Reach for `ignore-file <path>` only when the whole file is out of scope for design review: a fixture, a generated artifact, a deliberate slop demo. It silences every rule for that file permanently, including rules that have not been written yet. A real UI surface with one noisy rule wants the file-scoped value ignore above.
53
59
  - Use `ignore-rule <id>` only when the user asks to suppress that whole rule across the project. For broad overused-font suppression, use `ignore-rule overused-font --all-values` only when the user asks to ignore overused fonts generally.
54
60
  - Prefer config ignores (the commands above) by default; they keep suppressions in one reviewable place. Reach for an inline comment only when the waiver must travel with a single file that leaves the repo (a generated/exported standalone document, an emailed HTML file). The supported marker is `impeccable-disable <rule>` (whole file) or `impeccable-disable-line` / `impeccable-disable-next-line` (one line), in any comment syntax, with an optional reason after `:` or `--`. The detector honors it by default; `--no-inline-ignores` or `--no-config` bypasses it.
55
61
 
@@ -71,7 +77,14 @@ Example whole-rule font exception:
71
77
  node .agents/skills/impeccable/scripts/hook-admin.mjs ignore-rule overused-font --all-values --reason "User asked to ignore overused fonts generally"
72
78
  ```
73
79
 
74
- Example file-scoped exception:
80
+ Example one-rule-in-one-file exception, for a file that is still worth reviewing
81
+ for everything else:
82
+
83
+ ```bash
84
+ node .agents/skills/impeccable/scripts/hook-admin.mjs ignore-value design-system-font-size "*" --file "src/overlay/widget.js" --reason "Injected widget builds its own type scale; DESIGN.md's ramp describes the site"
85
+ ```
86
+
87
+ Example whole-file exception, for a file that is out of scope entirely:
75
88
 
76
89
  ```bash
77
90
  node .agents/skills/impeccable/scripts/hook-admin.mjs ignore-file "src/legacy/Card.tsx"