@bastani/atomic 0.9.5-alpha.7 → 0.9.5-alpha.9

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 (317) hide show
  1. package/CHANGELOG.md +33 -2
  2. package/dist/builtin/cursor/package.json +2 -2
  3. package/dist/builtin/intercom/CHANGELOG.md +17 -0
  4. package/dist/builtin/intercom/README.md +27 -21
  5. package/dist/builtin/intercom/broker/broker.ts +3 -6
  6. package/dist/builtin/intercom/broker/paths.ts +42 -5
  7. package/dist/builtin/intercom/broker/spawn.ts +78 -10
  8. package/dist/builtin/intercom/config.ts +6 -3
  9. package/dist/builtin/intercom/contact-supervisor-tool.ts +6 -4
  10. package/dist/builtin/intercom/index-heavy.ts +1 -1
  11. package/dist/builtin/intercom/index.ts +162 -130
  12. package/dist/builtin/intercom/intercom-tool.ts +9 -3
  13. package/dist/builtin/intercom/package.json +10 -1
  14. package/dist/builtin/intercom/result-renderers.ts +1 -1
  15. package/dist/builtin/intercom/ui/compose.ts +2 -2
  16. package/dist/builtin/intercom/ui/inline-message.ts +2 -2
  17. package/dist/builtin/intercom/ui/session-list.ts +2 -2
  18. package/dist/builtin/mcp/CHANGELOG.md +11 -0
  19. package/dist/builtin/mcp/README.md +6 -6
  20. package/dist/builtin/mcp/direct-tools.ts +41 -23
  21. package/dist/builtin/mcp/index.ts +31 -4
  22. package/dist/builtin/mcp/init.ts +4 -43
  23. package/dist/builtin/mcp/metadata-hydration.ts +37 -0
  24. package/dist/builtin/mcp/package.json +1 -1
  25. package/dist/builtin/mcp/proxy-info-modes.ts +67 -14
  26. package/dist/builtin/mcp/startup-warmup.ts +98 -0
  27. package/dist/builtin/mcp/tool-result-renderer.ts +3 -3
  28. package/dist/builtin/subagents/CHANGELOG.md +18 -0
  29. package/dist/builtin/subagents/package.json +1 -1
  30. package/dist/builtin/subagents/src/extension/index.ts +14 -25
  31. package/dist/builtin/subagents/src/extension/startup-maintenance.ts +89 -0
  32. package/dist/builtin/subagents/src/runs/background/async-execution-common.ts +23 -18
  33. package/dist/builtin/subagents/src/runs/background/result-watcher.ts +20 -10
  34. package/dist/builtin/subagents/src/runs/background/subagent-runner-streaming.ts +13 -3
  35. package/dist/builtin/subagents/src/runs/foreground/execution-attempt.ts +10 -2
  36. package/dist/builtin/subagents/src/runs/shared/pi-spawn.ts +28 -1
  37. package/dist/builtin/subagents/src/tui/render-event-formatting.ts +15 -48
  38. package/dist/builtin/subagents/src/tui/render-layout.ts +9 -0
  39. package/dist/builtin/subagents/src/tui/render-widget-graph.ts +27 -25
  40. package/dist/builtin/subagents/src/tui/render-widget.ts +72 -66
  41. package/dist/builtin/subagents/src/tui/render.ts +1 -1
  42. package/dist/builtin/web-access/package.json +1 -1
  43. package/dist/builtin/workflows/CHANGELOG.md +29 -0
  44. package/dist/builtin/workflows/README.md +4 -2
  45. package/dist/builtin/workflows/builtin/goal-artifacts.ts +3 -1
  46. package/dist/builtin/workflows/builtin/goal-prompts.ts +23 -2
  47. package/dist/builtin/workflows/builtin/goal-reducer.ts +21 -0
  48. package/dist/builtin/workflows/builtin/goal-review.ts +60 -6
  49. package/dist/builtin/workflows/builtin/goal-runner.ts +71 -22
  50. package/dist/builtin/workflows/builtin/goal-types.ts +7 -1
  51. package/dist/builtin/workflows/builtin/ralph-core.ts +52 -4
  52. package/dist/builtin/workflows/builtin/ralph-review-gate.ts +10 -3
  53. package/dist/builtin/workflows/builtin/ralph-reviewer-prompt.ts +23 -2
  54. package/dist/builtin/workflows/builtin/ralph-runner.ts +38 -16
  55. package/dist/builtin/workflows/builtin/review-convergence.ts +111 -0
  56. package/dist/builtin/workflows/package.json +1 -1
  57. package/dist/builtin/workflows/skills/create-spec/SKILL.md +2 -0
  58. package/dist/builtin/workflows/skills/impeccable/SKILL.md +16 -13
  59. package/dist/builtin/workflows/skills/impeccable/reference/adapt.md +1 -0
  60. package/dist/builtin/workflows/skills/impeccable/reference/adapt.native.md +58 -0
  61. package/dist/builtin/workflows/skills/impeccable/reference/android.md +40 -0
  62. package/dist/builtin/workflows/skills/impeccable/reference/animate.md +2 -0
  63. package/dist/builtin/workflows/skills/impeccable/reference/audit.md +2 -0
  64. package/dist/builtin/workflows/skills/impeccable/reference/audit.native.md +139 -0
  65. package/dist/builtin/workflows/skills/impeccable/reference/bolder.md +69 -62
  66. package/dist/builtin/workflows/skills/impeccable/reference/critique.md +21 -7
  67. package/dist/builtin/workflows/skills/impeccable/reference/document.md +1 -1
  68. package/dist/builtin/workflows/skills/impeccable/reference/hooks.md +92 -0
  69. package/dist/builtin/workflows/skills/impeccable/reference/init.md +29 -7
  70. package/dist/builtin/workflows/skills/impeccable/reference/ios.md +45 -0
  71. package/dist/builtin/workflows/skills/impeccable/reference/layout.md +25 -1
  72. package/dist/builtin/workflows/skills/impeccable/reference/typeset.md +23 -1
  73. package/dist/builtin/workflows/skills/impeccable/scripts/context-signals.mjs +2 -1
  74. package/dist/builtin/workflows/skills/impeccable/scripts/context.mjs +75 -14
  75. package/dist/builtin/workflows/skills/impeccable/scripts/detector/browser/injected/index.mjs +1 -1
  76. package/dist/builtin/workflows/skills/impeccable/scripts/detector/cli/main.mjs +31 -0
  77. package/dist/builtin/workflows/skills/impeccable/scripts/detector/design-system.mjs +64 -0
  78. package/dist/builtin/workflows/skills/impeccable/scripts/detector/detect-antipatterns-browser.js +118 -11
  79. package/dist/builtin/workflows/skills/impeccable/scripts/detector/engines/regex/detect-text.mjs +16 -11
  80. package/dist/builtin/workflows/skills/impeccable/scripts/detector/registry/antipatterns.mjs +66 -0
  81. package/dist/builtin/workflows/skills/impeccable/scripts/detector/rules/checks.mjs +42 -10
  82. package/dist/builtin/workflows/skills/impeccable/scripts/detector/shared/fonts.mjs +30 -0
  83. package/dist/builtin/workflows/skills/impeccable/scripts/detector/shared/page.mjs +4 -6
  84. package/dist/builtin/workflows/skills/impeccable/scripts/hook-admin.mjs +660 -0
  85. package/dist/builtin/workflows/skills/impeccable/scripts/hook-before-edit.mjs +516 -0
  86. package/dist/builtin/workflows/skills/impeccable/scripts/hook-lib.mjs +1764 -0
  87. package/dist/builtin/workflows/skills/impeccable/scripts/hook.mjs +61 -0
  88. package/dist/builtin/workflows/skills/impeccable/scripts/lib/impeccable-config.mjs +4 -2
  89. package/dist/builtin/workflows/skills/impeccable/scripts/lib/is-generated.mjs +2 -2
  90. package/dist/builtin/workflows/skills/impeccable/scripts/live/svelte-component.mjs +13 -16
  91. package/dist/builtin/workflows/skills/impeccable/scripts/live-accept.mjs +17 -11
  92. package/dist/builtin/workflows/skills/impeccable/scripts/live-browser.js +104 -37
  93. package/dist/builtin/workflows/skills/impeccable/scripts/live-wrap.mjs +9 -0
  94. package/dist/builtin/workflows/src/durable/backend.ts +12 -0
  95. package/dist/builtin/workflows/src/durable/child-primitive.ts +12 -8
  96. package/dist/builtin/workflows/src/durable/dbos-backend.ts +63 -2
  97. package/dist/builtin/workflows/src/durable/dbos-envelope.ts +28 -0
  98. package/dist/builtin/workflows/src/durable/resume-catalog.ts +12 -0
  99. package/dist/builtin/workflows/src/durable/resume-runtime.ts +5 -2
  100. package/dist/builtin/workflows/src/durable/stage-primitive.ts +165 -27
  101. package/dist/builtin/workflows/src/durable/types.ts +30 -1
  102. package/dist/builtin/workflows/src/engine/primitives/task.ts +1 -0
  103. package/dist/builtin/workflows/src/engine/run-durable-finalize.ts +1 -2
  104. package/dist/builtin/workflows/src/engine/run-returned-status.ts +50 -16
  105. package/dist/builtin/workflows/src/engine/run.ts +32 -32
  106. package/dist/builtin/workflows/src/engine/runtime.ts +5 -0
  107. package/dist/builtin/workflows/src/extension/extension-factory.ts +3 -0
  108. package/dist/builtin/workflows/src/extension/extension-lifecycle.ts +9 -2
  109. package/dist/builtin/workflows/src/extension/extension-runtime-state.ts +137 -27
  110. package/dist/builtin/workflows/src/extension/lifecycle-notifications.ts +22 -6
  111. package/dist/builtin/workflows/src/extension/public-types.ts +1 -1
  112. package/dist/builtin/workflows/src/extension/workflow-command-completions.ts +13 -1
  113. package/dist/builtin/workflows/src/extension/workflow-command-registration.ts +19 -4
  114. package/dist/builtin/workflows/src/extension/workflow-command-surfaces.ts +9 -0
  115. package/dist/builtin/workflows/src/extension/workflow-prompts.ts +2 -0
  116. package/dist/builtin/workflows/src/extension/workflow-run-control-command.ts +48 -23
  117. package/dist/builtin/workflows/src/extension/workflow-tool-control.ts +20 -8
  118. package/dist/builtin/workflows/src/extension/workflow-tool.ts +24 -8
  119. package/dist/builtin/workflows/src/runs/background/status.ts +4 -3
  120. package/dist/builtin/workflows/src/runs/foreground/executor-continuation.ts +13 -3
  121. package/dist/builtin/workflows/src/runs/foreground/executor-direct-helpers.ts +29 -8
  122. package/dist/builtin/workflows/src/runs/foreground/executor-hil.ts +2 -1
  123. package/dist/builtin/workflows/src/runs/foreground/executor-stage-factory.ts +4 -3
  124. package/dist/builtin/workflows/src/runs/foreground/stage-runner-controller.ts +18 -19
  125. package/dist/builtin/workflows/src/runs/foreground/stage-runner-unresolved-overflow.ts +38 -0
  126. package/dist/builtin/workflows/src/runs/shared/worktree-git.ts +155 -20
  127. package/dist/builtin/workflows/src/runs/shared/worktree-types.ts +6 -0
  128. package/dist/builtin/workflows/src/runs/shared/worktree.ts +2 -1
  129. package/dist/builtin/workflows/src/shared/persistence-restore-helpers.ts +18 -1
  130. package/dist/builtin/workflows/src/shared/persistence-restore.ts +23 -5
  131. package/dist/builtin/workflows/src/shared/persistence-session-entries.ts +4 -0
  132. package/dist/builtin/workflows/src/shared/returned-run-status.ts +116 -0
  133. package/dist/builtin/workflows/src/shared/workflow-failures-decisions.ts +2 -0
  134. package/dist/builtin/workflows/src/tui/graph-view-render-helpers.ts +21 -3
  135. package/dist/builtin/workflows/src/tui/graph-view-state.ts +3 -0
  136. package/dist/builtin/workflows/src/tui/graph-view-types.ts +3 -0
  137. package/dist/builtin/workflows/src/tui/status-list.ts +22 -15
  138. package/dist/builtin/workflows/src/tui/workflow-attach-pane.ts +4 -4
  139. package/dist/bun/internal-intercom-broker.d.ts +6 -0
  140. package/dist/bun/internal-intercom-broker.d.ts.map +1 -0
  141. package/dist/bun/internal-intercom-broker.js +39 -0
  142. package/dist/bun/internal-intercom-broker.js.map +1 -0
  143. package/dist/bun/split-loader.d.ts.map +1 -1
  144. package/dist/bun/split-loader.js +21 -8
  145. package/dist/bun/split-loader.js.map +1 -1
  146. package/dist/core/agent-session-auto-compaction.d.ts +21 -2
  147. package/dist/core/agent-session-auto-compaction.d.ts.map +1 -1
  148. package/dist/core/agent-session-auto-compaction.js +163 -11
  149. package/dist/core/agent-session-auto-compaction.js.map +1 -1
  150. package/dist/core/agent-session-events.d.ts.map +1 -1
  151. package/dist/core/agent-session-events.js +10 -1
  152. package/dist/core/agent-session-events.js.map +1 -1
  153. package/dist/core/agent-session-methods.d.ts +12 -3
  154. package/dist/core/agent-session-methods.d.ts.map +1 -1
  155. package/dist/core/agent-session-methods.js.map +1 -1
  156. package/dist/core/agent-session-models.d.ts +2 -2
  157. package/dist/core/agent-session-models.d.ts.map +1 -1
  158. package/dist/core/agent-session-models.js.map +1 -1
  159. package/dist/core/agent-session-prompt.d.ts.map +1 -1
  160. package/dist/core/agent-session-prompt.js +1 -0
  161. package/dist/core/agent-session-prompt.js.map +1 -1
  162. package/dist/core/agent-session-retry.d.ts +2 -0
  163. package/dist/core/agent-session-retry.d.ts.map +1 -1
  164. package/dist/core/agent-session-retry.js +152 -4
  165. package/dist/core/agent-session-retry.js.map +1 -1
  166. package/dist/core/agent-session-services.d.ts +1 -0
  167. package/dist/core/agent-session-services.d.ts.map +1 -1
  168. package/dist/core/agent-session-services.js +1 -0
  169. package/dist/core/agent-session-services.js.map +1 -1
  170. package/dist/core/agent-session-types.d.ts +15 -1
  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 +6 -0
  174. package/dist/core/agent-session.d.ts.map +1 -1
  175. package/dist/core/agent-session.js +6 -0
  176. package/dist/core/agent-session.js.map +1 -1
  177. package/dist/core/compaction/context-compaction-runner.d.ts.map +1 -1
  178. package/dist/core/compaction/context-compaction-runner.js +36 -20
  179. package/dist/core/compaction/context-compaction-runner.js.map +1 -1
  180. package/dist/core/copilot-anthropic-sse-repair.d.ts +23 -0
  181. package/dist/core/copilot-anthropic-sse-repair.d.ts.map +1 -0
  182. package/dist/core/copilot-anthropic-sse-repair.js +340 -0
  183. package/dist/core/copilot-anthropic-sse-repair.js.map +1 -0
  184. package/dist/core/copilot-gemini-reasoning.d.ts +16 -8
  185. package/dist/core/copilot-gemini-reasoning.d.ts.map +1 -1
  186. package/dist/core/copilot-gemini-reasoning.js +27 -22
  187. package/dist/core/copilot-gemini-reasoning.js.map +1 -1
  188. package/dist/core/copilot-hosts.d.ts +12 -0
  189. package/dist/core/copilot-hosts.d.ts.map +1 -0
  190. package/dist/core/copilot-hosts.js +33 -0
  191. package/dist/core/copilot-hosts.js.map +1 -0
  192. package/dist/core/extensions/agent-events.d.ts +1 -1
  193. package/dist/core/extensions/agent-events.d.ts.map +1 -1
  194. package/dist/core/extensions/agent-events.js.map +1 -1
  195. package/dist/core/extensions/loader-virtual-modules.d.ts +8 -1
  196. package/dist/core/extensions/loader-virtual-modules.d.ts.map +1 -1
  197. package/dist/core/extensions/loader-virtual-modules.js +2 -1
  198. package/dist/core/extensions/loader-virtual-modules.js.map +1 -1
  199. package/dist/core/footer-data-provider.d.ts +6 -0
  200. package/dist/core/footer-data-provider.d.ts.map +1 -1
  201. package/dist/core/footer-data-provider.js +72 -29
  202. package/dist/core/footer-data-provider.js.map +1 -1
  203. package/dist/core/http-dispatcher.d.ts.map +1 -1
  204. package/dist/core/http-dispatcher.js +5 -5
  205. package/dist/core/http-dispatcher.js.map +1 -1
  206. package/dist/core/openai-responses-payload-sanitizer.d.ts +1 -0
  207. package/dist/core/openai-responses-payload-sanitizer.d.ts.map +1 -1
  208. package/dist/core/openai-responses-payload-sanitizer.js +24 -9
  209. package/dist/core/openai-responses-payload-sanitizer.js.map +1 -1
  210. package/dist/core/sdk-types.d.ts +2 -0
  211. package/dist/core/sdk-types.d.ts.map +1 -1
  212. package/dist/core/sdk-types.js.map +1 -1
  213. package/dist/core/sdk.d.ts.map +1 -1
  214. package/dist/core/sdk.js +1 -0
  215. package/dist/core/sdk.js.map +1 -1
  216. package/dist/core/settings-manager-basic-accessors.d.ts +1 -0
  217. package/dist/core/settings-manager-basic-accessors.d.ts.map +1 -1
  218. package/dist/core/settings-manager-basic-accessors.js +6 -0
  219. package/dist/core/settings-manager-basic-accessors.js.map +1 -1
  220. package/dist/core/settings-types.d.ts +1 -0
  221. package/dist/core/settings-types.d.ts.map +1 -1
  222. package/dist/core/settings-types.js.map +1 -1
  223. package/dist/core/slash-commands.d.ts +2 -0
  224. package/dist/core/slash-commands.d.ts.map +1 -1
  225. package/dist/core/slash-commands.js +141 -0
  226. package/dist/core/slash-commands.js.map +1 -1
  227. package/dist/index-extensions.d.ts +1 -1
  228. package/dist/index-extensions.d.ts.map +1 -1
  229. package/dist/index-extensions.js.map +1 -1
  230. package/dist/index.d.ts +1 -0
  231. package/dist/index.d.ts.map +1 -1
  232. package/dist/index.js +1 -0
  233. package/dist/index.js.map +1 -1
  234. package/dist/main-deferred-startup.d.ts +12 -0
  235. package/dist/main-deferred-startup.d.ts.map +1 -1
  236. package/dist/main-deferred-startup.js +23 -2
  237. package/dist/main-deferred-startup.js.map +1 -1
  238. package/dist/main-early-input.d.ts +41 -0
  239. package/dist/main-early-input.d.ts.map +1 -0
  240. package/dist/main-early-input.js +154 -0
  241. package/dist/main-early-input.js.map +1 -0
  242. package/dist/main.d.ts +0 -6
  243. package/dist/main.d.ts.map +1 -1
  244. package/dist/main.js +20 -14
  245. package/dist/main.js.map +1 -1
  246. package/dist/modes/interactive/components/chat-session-host-actions.d.ts.map +1 -1
  247. package/dist/modes/interactive/components/chat-session-host-actions.js +0 -1
  248. package/dist/modes/interactive/components/chat-session-host-actions.js.map +1 -1
  249. package/dist/modes/interactive/components/chat-session-host-events.d.ts.map +1 -1
  250. package/dist/modes/interactive/components/chat-session-host-events.js +15 -0
  251. package/dist/modes/interactive/components/chat-session-host-events.js.map +1 -1
  252. package/dist/modes/interactive/interactive-agent-events.d.ts.map +1 -1
  253. package/dist/modes/interactive/interactive-agent-events.js +25 -0
  254. package/dist/modes/interactive/interactive-agent-events.js.map +1 -1
  255. package/dist/modes/interactive/interactive-autocomplete.d.ts.map +1 -1
  256. package/dist/modes/interactive/interactive-autocomplete.js +21 -9
  257. package/dist/modes/interactive/interactive-autocomplete.js.map +1 -1
  258. package/dist/modes/interactive/interactive-deferred-startup.d.ts.map +1 -1
  259. package/dist/modes/interactive/interactive-deferred-startup.js +41 -28
  260. package/dist/modes/interactive/interactive-deferred-startup.js.map +1 -1
  261. package/dist/modes/interactive/interactive-hotkeys-debug.d.ts.map +1 -1
  262. package/dist/modes/interactive/interactive-hotkeys-debug.js +1 -0
  263. package/dist/modes/interactive/interactive-hotkeys-debug.js.map +1 -1
  264. package/dist/modes/interactive/interactive-input-handling.d.ts.map +1 -1
  265. package/dist/modes/interactive/interactive-input-handling.js +318 -185
  266. package/dist/modes/interactive/interactive-input-handling.js.map +1 -1
  267. package/dist/modes/interactive/interactive-mode-base.d.ts +12 -0
  268. package/dist/modes/interactive/interactive-mode-base.d.ts.map +1 -1
  269. package/dist/modes/interactive/interactive-mode-base.js +39 -0
  270. package/dist/modes/interactive/interactive-mode-base.js.map +1 -1
  271. package/dist/modes/interactive/interactive-mode-deps.d.ts +1 -1
  272. package/dist/modes/interactive/interactive-mode-deps.d.ts.map +1 -1
  273. package/dist/modes/interactive/interactive-mode-deps.js +1 -1
  274. package/dist/modes/interactive/interactive-mode-deps.js.map +1 -1
  275. package/dist/modes/interactive/interactive-mode-surface.d.ts +6 -2
  276. package/dist/modes/interactive/interactive-mode-surface.d.ts.map +1 -1
  277. package/dist/modes/interactive/interactive-mode-surface.js.map +1 -1
  278. package/dist/modes/interactive/interactive-mode-types.d.ts +3 -0
  279. package/dist/modes/interactive/interactive-mode-types.d.ts.map +1 -1
  280. package/dist/modes/interactive/interactive-mode-types.js.map +1 -1
  281. package/dist/modes/interactive/interactive-model-routing.d.ts.map +1 -1
  282. package/dist/modes/interactive/interactive-model-routing.js +3 -1
  283. package/dist/modes/interactive/interactive-model-routing.js.map +1 -1
  284. package/dist/modes/interactive/interactive-process-lifecycle.d.ts.map +1 -1
  285. package/dist/modes/interactive/interactive-process-lifecycle.js +0 -3
  286. package/dist/modes/interactive/interactive-process-lifecycle.js.map +1 -1
  287. package/dist/modes/interactive/interactive-render-chat.d.ts.map +1 -1
  288. package/dist/modes/interactive/interactive-render-chat.js +36 -10
  289. package/dist/modes/interactive/interactive-render-chat.js.map +1 -1
  290. package/dist/modes/interactive/interactive-session-routing.d.ts.map +1 -1
  291. package/dist/modes/interactive/interactive-session-routing.js +5 -1
  292. package/dist/modes/interactive/interactive-session-routing.js.map +1 -1
  293. package/dist/modes/interactive/interactive-startup.d.ts.map +1 -1
  294. package/dist/modes/interactive/interactive-startup.js +26 -22
  295. package/dist/modes/interactive/interactive-startup.js.map +1 -1
  296. package/dist/modes/interactive/theme/global-theme.d.ts.map +1 -1
  297. package/dist/modes/interactive/theme/global-theme.js +26 -2
  298. package/dist/modes/interactive/theme/global-theme.js.map +1 -1
  299. package/dist/utils/fs-watch.d.ts +24 -1
  300. package/dist/utils/fs-watch.d.ts.map +1 -1
  301. package/dist/utils/fs-watch.js +60 -5
  302. package/dist/utils/fs-watch.js.map +1 -1
  303. package/docs/compaction.md +8 -0
  304. package/docs/development.md +4 -0
  305. package/docs/extensions.md +5 -0
  306. package/docs/json.md +3 -1
  307. package/docs/providers.md +1 -0
  308. package/docs/quickstart.md +1 -1
  309. package/docs/rpc.md +3 -1
  310. package/docs/settings.md +27 -1
  311. package/docs/subagents.md +4 -0
  312. package/docs/terminal-setup.md +4 -0
  313. package/docs/usage.md +2 -2
  314. package/docs/windows.md +4 -0
  315. package/docs/workflows.md +21 -9
  316. package/npm-shrinkwrap.json +513 -23
  317. package/package.json +3 -2
@@ -0,0 +1,139 @@
1
+ Run systematic **technical** quality checks on a native app (`ios` / `android` / `adaptive`) and generate a comprehensive report. Don't fix issues; document them for other commands to address.
2
+
3
+ This is a code-level audit, not a design critique. Audit from source (SwiftUI / UIKit / Compose / React Native / Flutter); no browser tooling or `detect.mjs` applies. Score against the platform reference(s): [ios.md](ios.md) / [android.md](android.md), both for `adaptive`. Read them before scoring if Setup hasn't already. The report skeleton mirrors [audit.md](audit.md); keep the two in sync when changing it.
4
+
5
+ ## Diagnostic Scan
6
+
7
+ Run comprehensive checks across 5 dimensions. Score each dimension 0-4 using the criteria below.
8
+
9
+ ### 1. Accessibility (VoiceOver / TalkBack)
10
+
11
+ **Check for**:
12
+ - **Missing labels**: interactive elements without accessibility labels, traits/roles, or state announcements
13
+ - **Reading and focus order**: illogical traversal, unreachable controls, focus lost on navigation
14
+ - **Text scaling**: fixed point sizes defeating Dynamic Type (iOS) or px instead of sp (Android); layouts that clip or overlap at large sizes
15
+ - **Touch targets**: below 44 pt (iOS) / 48 dp (Android), or crammed without spacing
16
+ - **Reduce Motion ignored**: parallax and large slides with no crossfade alternative
17
+ - **Contrast**: text failing contrast in either appearance, light or dark
18
+
19
+ **Score 0-4**: 0=Screen reader unusable, 1=Major gaps (unlabeled controls, no scaling), 2=Partial (labels exist, order or scaling breaks), 3=Good (minor gaps), 4=Excellent (labeled, ordered, scales cleanly, Reduce Motion honored)
20
+
21
+ ### 2. Performance
22
+
23
+ **Check for**:
24
+ - **Slow startup**: heavy work on launch before first frame
25
+ - **Unvirtualized lists**: long content without FlatList / LazyColumn / List recycling
26
+ - **Main-thread jank**: synchronous work in scroll or gesture paths, dropped frames on 60/120 Hz
27
+ - **Wasted rendering**: unnecessary re-renders (React Native) or recompositions (Compose); missing memoization/keys
28
+ - **Image handling**: full-size images decoded for thumbnails, no caching
29
+ - **App weight**: bloated JS bundle or binary, unused dependencies
30
+
31
+ **Score 0-4**: 0=Janky everywhere, 1=Major problems (unvirtualized lists, slow launch), 2=Partial, 3=Good (minor improvements possible), 4=Excellent (fast launch, smooth scroll, lean)
32
+
33
+ ### 3. Appearance & Theming
34
+
35
+ **Check for**:
36
+ - **Hard-coded colors**: raw hex instead of semantic system colors (iOS) / Material color roles (Android) / design tokens
37
+ - **Broken dark appearance**: missing dark variants, poor contrast in dark, quick inverts
38
+ - **Dynamic Color** (Android 12+): no static fallback scheme, or ignored where it fits
39
+ - **Off-platform materials**: hand-rolled blur/glassmorphism instead of system materials or tonal elevation
40
+
41
+ **Score 0-4**: 0=Hard-coded everything, 1=Minimal tokens, 2=Partial (tokens exist, inconsistently used), 3=Good (minor hard-coded values), 4=Excellent (semantic throughout, both appearances first-class)
42
+
43
+ ### 4. Platform Conformance (CRITICAL)
44
+
45
+ Score against the loaded platform reference(s), including their slop tests. **Check for**:
46
+ - **Broken system gestures**: edge-swipe back disabled (iOS), predictive Back hijacked (Android)
47
+ - **Inset violations**: content under the notch, Dynamic Island, home indicator, status bar, or keyboard
48
+ - **Off-platform navigation**: custom global nav, overloaded tab bars, iOS patterns on Android or vice versa
49
+ - **Web-shaped controls**: HTML-style buttons, custom toggles, hover-dependent affordances
50
+ - **Icon drift**: mixed icon sets instead of SF Symbols / Material Symbols
51
+ - **AI tells**: the shared absolute bans still apply (AI palette, gradient text, hero metrics)
52
+
53
+ **Score 0-4**: 0=Web port (nothing native), 1=Heavy violations (3-4 kinds), 2=Some (1-2 noticeable), 3=Mostly conformant (subtle issues), 4=Fully native (a fluent user trusts every screen)
54
+
55
+ ### 5. Adaptivity
56
+
57
+ **Check for**:
58
+ - **Stretched phone layouts**: tablet/iPad rendering a scaled-up phone UI instead of using size classes / window size classes
59
+ - **Orientation breakage**: landscape clipping, ignored, or locked without reason
60
+ - **Keyboard/IME handling**: inputs hidden behind the keyboard, no inset adjustment
61
+ - **Multitasking**: iPad Split View / Android multi-window breaking layout
62
+ - **Foldables**: hinge-unaware layouts on posture change (Android)
63
+
64
+ **Score 0-4**: 0=One screen size only, 1=Major breakage (landscape or tablet broken), 2=Partial, 3=Good (minor edge cases), 4=Excellent (adapts across sizes, orientations, and windowing)
65
+
66
+ ## Generate Report
67
+
68
+ ### Audit Health Score
69
+
70
+ | # | Dimension | Score | Key Finding |
71
+ |---|-----------|-------|-------------|
72
+ | 1 | Accessibility | ? | [most critical issue or "--"] |
73
+ | 2 | Performance | ? | |
74
+ | 3 | Appearance & Theming | ? | |
75
+ | 4 | Platform Conformance | ? | |
76
+ | 5 | Adaptivity | ? | |
77
+ | **Total** | | **??/20** | **[Rating band]** |
78
+
79
+ **Rating bands**: 18-20 Excellent (minor polish), 14-17 Good (address weak dimensions), 10-13 Acceptable (significant work needed), 6-9 Poor (major overhaul), 0-5 Critical (fundamental issues)
80
+
81
+ ### Platform Conformance Verdict
82
+ **Start here.** Pass/fail: does this read as a native app or a ported website? List specific violations. Be brutally honest.
83
+
84
+ ### Executive Summary
85
+ - Audit Health Score: **??/20** ([rating band])
86
+ - Total issues found (count by severity: P0/P1/P2/P3)
87
+ - Top 3-5 critical issues
88
+ - Recommended next steps
89
+
90
+ ### Detailed Findings by Severity
91
+
92
+ Tag every issue with **P0-P3 severity**:
93
+ - **P0 Blocking**: Prevents task completion. Fix immediately
94
+ - **P1 Major**: Significant difficulty or platform-guideline violation. Fix before release
95
+ - **P2 Minor**: Annoyance, workaround exists. Fix in next pass
96
+ - **P3 Polish**: Nice-to-fix, no real user impact. Fix if time permits
97
+
98
+ For each issue, document:
99
+ - **[P?] Issue name**
100
+ - **Location**: Screen, file, line
101
+ - **Category**: Accessibility / Performance / Theming / Conformance / Adaptivity
102
+ - **Impact**: How it affects users
103
+ - **Guideline**: The HIG / Material rule it violates (if applicable)
104
+ - **Recommendation**: How to fix it
105
+ - **Suggested command**: Which command to use (prefer: $impeccable adapt, $impeccable animate, $impeccable audit, $impeccable bolder, $impeccable clarify, $impeccable colorize, $impeccable critique, $impeccable delight, $impeccable distill, $impeccable document, $impeccable harden, $impeccable layout, $impeccable onboard, $impeccable optimize, $impeccable overdrive, $impeccable polish, $impeccable quieter, $impeccable shape, $impeccable typeset)
106
+
107
+ ### Patterns & Systemic Issues
108
+
109
+ Identify recurring problems that indicate systemic gaps rather than one-off mistakes:
110
+ - "Hard-coded colors appear in 15+ screens, should use semantic colors"
111
+ - "Touch targets consistently below 44 pt throughout the tab bar and list rows"
112
+
113
+ ### Positive Findings
114
+
115
+ Note what's working well: good practices to maintain and replicate.
116
+
117
+ ## Recommended Actions
118
+
119
+ List recommended commands in priority order (P0 first, then P1, then P2):
120
+
121
+ 1. **[P?] `$command-name`**: Brief description (specific context from audit findings)
122
+ 2. **[P?] `$command-name`**: Brief description (specific context)
123
+
124
+ **Rules**: Only recommend commands from: $impeccable adapt, $impeccable animate, $impeccable audit, $impeccable bolder, $impeccable clarify, $impeccable colorize, $impeccable critique, $impeccable delight, $impeccable distill, $impeccable document, $impeccable harden, $impeccable layout, $impeccable onboard, $impeccable optimize, $impeccable overdrive, $impeccable polish, $impeccable quieter, $impeccable shape, $impeccable typeset. Map findings to the most appropriate command. End with `$impeccable polish` as the final step if any fixes were recommended.
125
+
126
+ After presenting the summary, tell the user:
127
+
128
+ > You can ask me to run these one at a time, all at once, or in any order you prefer.
129
+ >
130
+ > Re-run `$impeccable audit` after fixes to see your score improve.
131
+
132
+ **IMPORTANT**: Be thorough but actionable. Too many P3 issues creates noise. Focus on what actually matters.
133
+
134
+ **NEVER**:
135
+ - Report issues without explaining impact (why does this matter?)
136
+ - Provide generic recommendations (be specific and actionable)
137
+ - Skip positive findings (celebrate what works)
138
+ - Forget to prioritize (everything can't be P0)
139
+ - Report false positives without verification
@@ -1,12 +1,12 @@
1
- When asked for "bolder," AI defaults to the same tired tricks: cyan/purple gradients, glassmorphism, neon accents on dark backgrounds, gradient text on metrics. These are the opposite of bold. Reject them first, then increase visual impact and personality through stronger hierarchy, committed scale, and decisive type.
1
+ When asked for "bolder," AI defaults to the same tired tricks: cyan/purple gradients, glassmorphism, neon accents on dark backgrounds, gradient text on metrics. These are the opposite of bold. Reject them first, then increase visual impact by making the existing design language more decisive, specific, and committed.
2
2
 
3
3
  ---
4
4
 
5
5
  ## Register
6
6
 
7
- Brand: "bolder" means distinctive. Extreme scale, unexpected color, typographic risk, committed POV.
7
+ Brand: "bolder" means distinctive. Express a stronger point of view through hierarchy, pacing, proportion, copy, evidence, and one committed visual idea.
8
8
 
9
- Product: "bolder" rarely means theatrics; those undermine trust. It means stronger hierarchy, clearer weight contrast, one sharper accent, more committed density. The amplification is in clarity, not drama.
9
+ Product: "bolder" rarely means theatrics; those undermine trust. It means stronger hierarchy, clearer weight contrast, sharper information density, and more decisive prioritization. The amplification is in clarity, not drama.
10
10
 
11
11
  ---
12
12
 
@@ -15,98 +15,105 @@ Product: "bolder" rarely means theatrics; those undermine trust. It means strong
15
15
  Analyze what makes the design feel too safe or boring:
16
16
 
17
17
  1. **Identify weakness sources**:
18
- - **Generic choices**: System fonts, basic colors, standard layouts
19
- - **Timid scale**: Everything is medium-sized with no drama
20
- - **Low contrast**: Everything has similar visual weight
21
- - **Static**: No motion, no energy, no life
22
- - **Predictable**: Standard patterns with no surprises
23
- - **Flat hierarchy**: Nothing stands out or commands attention
18
+ - **Generic choices**: The page could belong to any product in the category.
19
+ - **Timid scale**: Everything is medium-sized with no clear lead.
20
+ - **Low contrast**: Important and supporting elements have similar visual weight.
21
+ - **Static**: The surface has no meaningful moment of emphasis.
22
+ - **Predictable**: The composition follows a default pattern without a point of view.
23
+ - **Flat hierarchy**: Nothing stands out or commands attention.
24
24
 
25
25
  2. **Understand the context**:
26
- - What's the brand personality? (How far can we push?)
27
- - What's the purpose? (Marketing can be bolder than financial dashboards)
28
- - Who's the audience? (What will resonate?)
29
- - What are the constraints? (Brand guidelines, accessibility, performance)
26
+ - What is the brand personality?
27
+ - What is the purpose of this surface?
28
+ - Who is the audience?
29
+ - What design system, tokens, components, and visual conventions already exist?
30
30
 
31
31
  If any of these are unclear from the codebase, STOP and use Codex's structured user-input/question tool when available; if unavailable, ask directly in chat to clarify what you cannot infer.
32
32
 
33
- **CRITICAL**: "Bolder" doesn't mean chaotic or garish. It means distinctive, memorable, and confident. Think intentional drama, not random chaos.
33
+ **CRITICAL**: "Bolder" does not mean chaotic or garish. It means distinctive, memorable, and confident. Think intentional drama, not random noise.
34
34
 
35
35
  **WARNING - AI SLOP TRAP**: Review ALL the DON'T guidelines from the parent impeccable skill (already loaded in this context) before proceeding. Bold means distinctive, not "more effects."
36
36
 
37
+ ## Design-System Lock
38
+
39
+ If the project has `DESIGN.md`, tokens, theme variables, or established component styles, treat that system as the boundary. Make the existing language stronger before adding new language.
40
+
41
+ Do not invent new colors, gradients, radii, shadows, fonts, decorative backgrounds, or effects just because the request says "bolder." A bolder pass should usually change emphasis, proportion, rhythm, density, contrast, copy, artifact specificity, and layout relationships while staying inside the documented system.
42
+
43
+ If the existing system is genuinely too limited to express the bolder direction, stop and ask the user before expanding it. Name the exact additions, the role each would play, and why the current system cannot do the job. If the user approves expansion, update the design system or tokens alongside the implementation.
44
+
37
45
  ## Plan Amplification
38
46
 
39
47
  Create a strategy to increase impact while maintaining coherence:
40
48
 
41
- - **Focal point**: What should be the hero moment? (Pick ONE, make it amazing)
42
- - **Personality direction**: Maximalist chaos? Elegant drama? Playful energy? Dark moody? Choose a lane.
43
- - **Risk budget**: How experimental can we be? Push boundaries within constraints.
44
- - **Hierarchy amplification**: Make big things BIGGER, small things smaller (increase contrast)
49
+ - **Focal point**: Pick one thing the viewer should remember, then make the rest support it.
50
+ - **System levers**: Identify which existing tokens, components, layout patterns, and copy structures can carry more weight.
51
+ - **Risk budget**: Decide how far the surface can push while still feeling like the same product or brand.
52
+ - **Hierarchy amplification**: Increase contrast between primary, secondary, and tertiary content instead of making every element louder.
45
53
 
46
54
  **IMPORTANT**: Bold design must still be usable. Impact without function is just decoration.
47
55
 
48
56
  ## Amplify the Design
49
57
 
50
- Systematically increase impact across these dimensions:
58
+ Systematically increase impact through intention, not a menu of effects:
51
59
 
52
60
  ### Typography Amplification
53
- - **Replace generic fonts**: Swap system fonts for distinctive choices (see the parent skill's typography guidelines and the [Reference Material section of typeset.md](typeset.md#reference-material) for inspiration)
54
- - **Extreme scale**: Create dramatic size jumps (3x-5x differences, not 1.5x)
55
- - **Weight contrast**: Pair 900 weights with 200 weights, not 600 with 400
56
- - **Unexpected choices**: Variable fonts, display fonts for headlines, condensed/extended widths, monospace as intentional accent (not as lazy "dev tool" default)
57
-
58
- ### Color Intensification
59
- - **Increase saturation**: Shift to more vibrant, energetic colors (but not neon)
60
- - **Bold palette**: Introduce unexpected color combinations. Avoid the purple-blue gradient AI slop
61
- - **Dominant color strategy**: Let one bold color own 60% of the design
62
- - **Sharp accents**: High-contrast accent colors that pop
63
- - **Tinted neutrals**: Replace pure grays with tinted grays that harmonize with your palette
64
- - **Rich gradients**: Intentional multi-stop gradients (not generic purple-to-blue)
65
-
66
- ### Spatial Drama
67
- - **Extreme scale jumps**: Make important elements 3-5x larger than surroundings
68
- - **Break the grid**: Let hero elements escape containers and cross boundaries
69
- - **Asymmetric layouts**: Replace centered, balanced layouts with tension-filled asymmetry
70
- - **Generous space**: Use white space dramatically (100-200px gaps, not 20-40px)
71
- - **Overlap**: Layer elements intentionally for depth
72
-
73
- ### Visual Effects
74
- - **Dramatic shadows**: Large, soft shadows for elevation (but not generic drop shadows on rounded rectangles)
75
- - **Background treatments**: Mesh patterns, noise textures, geometric patterns, intentional gradients (not purple-to-blue)
76
- - **Texture & depth**: Grain, halftone, duotone, layered elements. NOT glassmorphism (it's overused AI slop)
77
- - **Borders & frames**: Thick borders, decorative frames, custom shapes (not rounded rectangles with colored border on one side)
78
- - **Custom elements**: Illustrative elements, custom icons, decorative details that reinforce brand
61
+ - Strengthen the existing type hierarchy before changing typefaces.
62
+ - Make important text meaningfully more dominant, and make supporting text quieter.
63
+ - Use weight, measure, spacing, and line breaks to sharpen the point of view.
64
+ - Add or replace fonts only after user-approved design-system expansion.
65
+
66
+ ### Color Amplification
67
+ - Use the existing palette more decisively before adding colors.
68
+ - Shift the proportion, placement, and contrast of documented colors to clarify meaning.
69
+ - Treat any new color, gradient, or tint ramp as a design-system expansion that requires user approval.
70
+ - Keep color tied to hierarchy, state, or brand meaning; do not use it as surface decoration.
71
+
72
+ ### Spatial Amplification
73
+ - Change proportion, density, alignment, and sequencing so the composition has a stronger point of view.
74
+ - Create clearer contrast between dense evidence and open breathing room.
75
+ - Let layout express priority and narrative order before adding ornament.
76
+ - Preserve responsive behavior and avoid text overflow at every breakpoint.
77
+
78
+ ### Surface Amplification
79
+ - Use existing surface, border, radius, and shadow rules more deliberately.
80
+ - Remove timid half-measures: either give an element a clear role or simplify it.
81
+ - Add texture, depth, illustration, or decorative treatments only when already established by the system or explicitly approved.
82
+ - Make real product artifacts, imagery, data, or copy carry attention before reaching for effects.
79
83
 
80
84
  ### Motion & Animation
81
- - **Hero moment**: One signature entrance, once. Not on every visit and not on every section.
82
- - **Micro-interactions**: Satisfying hover effects, click feedback, state changes.
83
- - **Transitions**: Smooth, noticeable transitions using ease-out-quart/quint/expo (not bounce or elastic, which cheapen the effect).
84
- - **Bolder scroll-fade-rise on every section.** That's the saturated AI default, the opposite of bold.
85
+ - Design one meaningful moment of emphasis when motion genuinely supports the point.
86
+ - Make interaction feedback feel more decisive without becoming distracting.
87
+ - Keep transitions smooth and intentional.
88
+ - **Bolder != scroll-fade-rise on every section.** That's the saturated AI default, the opposite of bold.
85
89
 
86
90
  ### Composition Boldness
87
- - **Hero moments**: Create clear focal points with dramatic treatment
88
- - **Diagonal flows**: Escape horizontal/vertical rigidity with diagonal arrangements
89
- - **Full-bleed elements**: Use full viewport width/height for impact
90
- - **Unexpected proportions**: Golden ratio? Throw it out. Try 70/30, 80/20 splits
91
+ - Make the dominant idea unmistakable.
92
+ - Use layout tension, sequencing, contrast, and restraint to create a stronger read.
93
+ - Let the page's structure communicate priority before adding decorative layers.
94
+ - If every element is louder, the composition is not bolder; it is flatter.
91
95
 
92
96
  **NEVER**:
93
- - Add effects randomly without purpose (chaos ≠ bold)
94
- - Sacrifice readability for aesthetics (body text must be readable)
95
- - Make everything bold (then nothing is bold; you need contrast)
96
- - Ignore accessibility (bold design must still meet WCAG standards)
97
- - Overwhelm with motion (animation fatigue is real)
98
- - Copy trendy aesthetics blindly (bold means distinctive, not derivative)
97
+ - Add undocumented design-system primitives without user approval
98
+ - Add effects randomly without purpose
99
+ - Hide weak hierarchy behind decoration
100
+ - Sacrifice readability for aesthetics
101
+ - Make everything bold; contrast is the point
102
+ - Ignore accessibility
103
+ - Overwhelm with motion
104
+ - Copy trendy aesthetics blindly
99
105
 
100
106
  ## Verify Quality
101
107
 
102
108
  Ensure amplification maintains usability and coherence:
103
109
 
110
+ - **System-faithful**: Did the pass make the existing design language stronger before adding anything new?
111
+ - **No undocumented drift**: Are new colors, gradients, shadows, radii, fonts, and effects either absent or explicitly approved and documented?
104
112
  - **NOT AI slop**: Does this look like every other AI-generated "bold" design? If yes, start over.
105
113
  - **Still functional**: Can users accomplish tasks without distraction?
106
114
  - **Coherent**: Does everything feel intentional and unified?
107
- - **Memorable**: Will users remember this experience?
108
- - **Performant**: Do all these effects run smoothly?
109
- - **Accessible**: Does it still meet accessibility standards?
115
+ - **Memorable**: Will users remember this experience for the intended reason?
116
+ - **Performant and accessible**: Does the result stay fast, readable, responsive, and WCAG-conscious?
110
117
 
111
118
  **The test**: If you showed this to someone and said "AI made this bolder," would they believe you immediately? If yes, you've failed. Bold means distinctive, not "more AI effects."
112
119
 
@@ -5,8 +5,9 @@ Resolve one stable target, run two independent assessments, synthesize a design
5
5
  ### Hard Invariants
6
6
 
7
7
  - Assessment A (design review) and Assessment B (detector/browser evidence) are both required.
8
+ - Assessment A and B MUST run as two isolated sub-agents whenever a sub-agent/Task tool is exposed. Running them inline in this context is "possible" but is NOT permitted; it is a degraded run. Inline is allowed ONLY when no sub-agent tool exists (or the user declined, on harnesses that ask).
9
+ - If you degrade for any reason, the report's first line MUST be a banner: `⚠️ DEGRADED: single-context (<reason>)`. A silent degraded critique is a failed critique.
8
10
  - Assessment A must finish before detector findings enter the parent synthesis context. Detector output is deterministic, but it still anchors judgment.
9
- - If sub-agents are unavailable, fall back sequentially: finish and record Assessment A first, then run Assessment B, then synthesize.
10
11
  - A skipped detector is a failed critique run unless `detect.mjs` is missing or crashes after a real attempt.
11
12
  - Viewable targets require browser inspection when available.
12
13
  - Any local server started only for critique visualization must run in the background, have a recorded stop method, and be stopped before final reporting unless the user asks to keep it.
@@ -27,14 +28,21 @@ Resolve one stable target, run two independent assessments, synthesize a design
27
28
 
28
29
  ### Assessment Orchestration
29
30
 
30
- Delegate Assessment A and Assessment B to separate sub-agents when possible. They must not see each other's output. Do not show findings to the user until synthesis.
31
+ Delegate Assessment A and Assessment B to separate sub-agents. They must not see each other's output. Do not show findings to the user until synthesis.
31
32
 
32
- Codex sub-agent gate:
33
+ Sub-agent gate (all harnesses):
34
+ - Unless a harness-specific gate below overrides this, spawn A and B as two isolated, parallel sub-agents whenever a sub-agent/Task tool is exposed. This is the default and is mandatory; do not run them inline because it is faster.
35
+ - "Unavailable" means exactly one thing: no sub-agent/Task tool is exposed in this session (or, on harnesses that ask, the user declined). It does not mean inconvenient.
36
+ - If and only if sub-agents are unavailable, fall back sequentially: finish and record Assessment A, then run Assessment B, then synthesize, and emit the degraded banner.
37
+ - Whichever path you take, declare it in the report header (see Report header provenance). Skipping sub-agents without the banner is the most common failure of this command.
38
+
39
+ Codex sub-agent gate (overrides the default above; Codex's permission model requires asking before spawning):
40
+ - Asking is the normal path, not a degradation. Approving and spawning is the dual-agent path; do not emit the degraded banner just for asking.
33
41
  - If `spawn_agent` is exposed and the user explicitly allowed sub-agents, delegation, or parallel agent work, spawn A and B immediately.
34
42
  - If `spawn_agent` is exposed but the user did not explicitly allow sub-agents, ask exactly once: "Impeccable critique is designed to run two independent sub-agents for an unanchored assessment. May I use sub-agents for this critique?" Then stop until the user answers.
35
- - If allowed, spawn A and B. If declined, run sequentially and report `Assessment independence: degraded (sub-agents declined by user)`.
36
- - If `spawn_agent` is not exposed, do not ask; run sequentially and report `Assessment independence: degraded (spawn_agent unavailable in this session)`.
37
- - If spawning fails after permission, run sequentially and report `Assessment independence: degraded (sub-agent spawn failed: <exact error>)`.
43
+ - If allowed, spawn A and B. If declined, run sequentially and lead the report with `⚠️ DEGRADED: single-context (sub-agents declined by user)`.
44
+ - If `spawn_agent` is not exposed, do not ask; run sequentially and lead with `⚠️ DEGRADED: single-context (spawn_agent unavailable in this session)`.
45
+ - If spawning fails after permission, run sequentially and lead with `⚠️ DEGRADED: single-context (sub-agent spawn failed: <exact error>)`.
38
46
  Prefer `fork_context: false` with self-contained prompts containing cwd, target, live URL, references, product context, and output contract. If using `fork_context: true`, omit `agent_type`, `model`, and `reasoning_effort`.
39
47
 
40
48
  If browser automation is available, each assessment creates its own new tab. Never reuse an existing tab, even if it is already at the right URL.
@@ -69,7 +77,7 @@ node .agents/skills/impeccable/scripts/detect.mjs --json [target]
69
77
 
70
78
  Browser visualization is required for a viewable target when browser automation is available. Use a localhost dev/static URL for local files; avoid `file://` unless the available browser explicitly supports this workflow. Overlay flow:
71
79
 
72
- 1. Create a fresh tab and navigate.
80
+ 1. Create a fresh tab and navigate. Prefer the harness's native/browser-canvas screenshot path before hand-rolling a Playwright/Puppeteer script; only fall back to a custom script when no native browser tool is exposed.
73
81
  2. Preflight mutable injection by setting `document.title` and appending a `<script>` tag. Read-only evaluate APIs do not count.
74
82
  3. If mutation is unavailable, skip live server, browser presentation, and injection; report fallback signal.
75
83
  4. If mutation is available, start `node .agents/skills/impeccable/scripts/live-server.mjs --background`, present the browser if supported, label `[Human]`, scroll top, inject `http://localhost:PORT/detect.js`, wait 2-3 seconds, read `impeccable` console messages, then stop the live server.
@@ -93,6 +101,12 @@ Codex final-answer note: `$impeccable critique` produces a report artifact, so t
93
101
 
94
102
  Structure your feedback as a design director would:
95
103
 
104
+ #### Report header provenance
105
+
106
+ The report's first line MUST declare how the assessments were run, so a degraded run is never silent:
107
+ - Dual-agent: `Method: dual-agent (A: <agent-id> · B: <agent-id>)`
108
+ - Degraded: `⚠️ DEGRADED: single-context (<reason, e.g. no sub-agent tool exposed>)`
109
+
96
110
  #### Design Health Score
97
111
  > *Consult the [Heuristics Scoring Guide](#heuristics-scoring-guide) section below.*
98
112
 
@@ -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 Google Stitch DESIGN.md format](https://stitch.withgoogle.com/docs/design-md/format/): 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): 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.).
4
4
 
5
5
  ## The frontmatter: token schema
6
6
 
@@ -0,0 +1,92 @@
1
+ # $impeccable hooks
2
+
3
+ Manage the **design detector hook** for the current project.
4
+
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. Cursor uses `preToolUse` to block bad proposed writes before they land and stays silent when it allows a clean write.
6
+
7
+ 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
+
9
+ 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.
10
+
11
+ Manual `npx impeccable detect` scans use the same project filter config by default: `detector.ignoreRules`, `detector.ignoreFiles`, `detector.ignoreValues`, and `detector.designSystem.enabled`. `hook.enabled` only controls automatic hook execution, not manual CLI scans. Use `npx impeccable detect --no-config ...` for a raw detector run that ignores project config/context. Use `npx impeccable ignores ...` for direct CLI CRUD on the same detector ignores.
12
+
13
+ Supported harnesses: Claude Code (`.claude/settings.local.json` in the project, which is gitignored so the hook stays machine-local; a hook you move into the shared `settings.json` is honored in place too), Codex (`.codex/hooks.json` in the project), Cursor (`.cursor/hooks.json` in the project), and GitHub Copilot (`.github/hooks$impeccable.json` in the project, a team-shared committed file that both the Copilot CLI and the cloud agent read). For the Copilot CLI, repo-level hooks fire once `.github/hooks$impeccable.json` is committed to the repository's default branch.
14
+
15
+ On **Cursor**, `preToolUse` checks proposed Write/Edit/Shell write content and denies only when the real detector finds an issue. The denial message is visible to the agent as the tool error, so the agent can reconsider before the bad write lands.
16
+
17
+ ## Routing
18
+
19
+ The first argument is the action. Defaults to `status`.
20
+
21
+ | Action | What it does |
22
+ |---|---|
23
+ | `status` | Print current state, shared/local config paths, ignored rules / files / values, env override. |
24
+ | `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. |
25
+ | `off` | Set `enabled: false` in `.impeccable/config.json`. |
26
+ | `ignore-rule <id>` | Append `<id>` to `detector.ignoreRules`; for `overused-font`, requires `--all-values`. |
27
+ | `ignore-file <glob>` | Append `<glob>` to `detector.ignoreFiles`. |
28
+ | `ignore-value <id> <value> [--shared] [--reason "..."]` | Append a rule/value suppression to shared `.impeccable/config.json`. |
29
+ | `ignore-value <id> <value> --local [--reason "..."]` | Append a private rule/value suppression to `.impeccable/config.local.json`. |
30
+ | `reset` | Delete the project config, dedup cache, and Cursor pending queue. |
31
+
32
+ ## Flow
33
+
34
+ 1. Resolve the action from the user's argument. If no action was given, default to `status`.
35
+ 2. Invoke the admin script and pass the user's output through verbatim:
36
+
37
+ ```bash
38
+ node .agents/skills/impeccable/scripts/hook-admin.mjs <action> [args...]
39
+ ```
40
+
41
+ 3. If `<action>` is `off`, follow up with a one-line note: "Done. New edits will not trigger the design hook in this project until you run `$impeccable hooks on`."
42
+ 4. If `<action>` is `on`, follow up with: "Done. The design hook will fire after the next Edit/Write/MultiEdit on a UI file."
43
+ 5. If `<action>` is `ignore-value`, `ignore-file`, or `ignore-rule`, just print the script output. The default scope is shared `.impeccable/config.json`; add `--local` only when the user explicitly asks for a private exception.
44
+ 6. If `<action>` is `status`, just print the script output. Do not add commentary unless the user asked a follow-up question.
45
+
46
+ ## Intentional findings
47
+
48
+ The hook itself never writes ignore config. Persist an exception only after the user explicitly confirms the flagged issue is intentional, and always go through `hook-admin.mjs`.
49
+
50
+ Prefer the narrowest exception:
51
+
52
+ - If the finding line shows an exact `ignore-value` command, run that command. This writes shared `.impeccable/config.json` by default.
53
+ - 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.
54
+ - If the finding has no value-specific command, such as `side-tab`, prefer `ignore-file <path>` for the current file.
55
+ - 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.
56
+ - 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.
57
+
58
+ Example value-specific exception:
59
+
60
+ ```bash
61
+ node .agents/skills/impeccable/scripts/hook-admin.mjs ignore-value overused-font Inter --shared --reason "User confirmed Inter is intentional"
62
+ ```
63
+
64
+ Example intentional motion exception:
65
+
66
+ ```bash
67
+ node .agents/skills/impeccable/scripts/hook-admin.mjs ignore-value bounce-easing bounce-ball --shared --reason "User confirmed ball bounce animation is intentional"
68
+ ```
69
+
70
+ Example whole-rule font exception:
71
+
72
+ ```bash
73
+ node .agents/skills/impeccable/scripts/hook-admin.mjs ignore-rule overused-font --all-values --reason "User asked to ignore overused fonts generally"
74
+ ```
75
+
76
+ Example file-scoped exception:
77
+
78
+ ```bash
79
+ node .agents/skills/impeccable/scripts/hook-admin.mjs ignore-file "src/legacy/Card.tsx"
80
+ ```
81
+
82
+ ## Constraints
83
+
84
+ - Never modify `.impeccable/config.json` or `.impeccable/config.local.json` by hand from this command. Always go through `hook-admin.mjs` so writes stay validated and the file shape stays consistent. One exception: `detector.extensions` has no admin action, so when the user asks to cover a template stack, edit that one field in `.impeccable/config.json` directly and leave the rest of the file untouched.
85
+ - Do not edit the hook scripts themselves (`hook.mjs`, `hook-lib.mjs`, `hook-before-edit.mjs`) from this flow. Those are skill plumbing.
86
+ - Cursor can block a proposed write when the detector finds a real issue. Claude Code, Codex, and GitHub Copilot do not block the edit; they emit a post-edit reminder instead. Disabling stops both blocking and reminders.
87
+ - The hook is bundled with the Impeccable skill and installed through project-local manifests: `.claude/settings.local.json`, `.codex/hooks.json`, `.cursor/hooks.json`, and `.github/hooks$impeccable.json`. On Codex, the user must approve the hook via `/hooks` the first time. On Cursor, confirm hooks are enabled under Settings -> Hooks. On GitHub Copilot, the CLI loads `.github/hooks$impeccable.json` once it is committed to the repository's default branch, and the cloud agent reads it from the repo directly.
88
+
89
+ ## Failure modes
90
+
91
+ - If `.impeccable/config.json` or `.impeccable/config.local.json` is unreadable or malformed, the hook ignores that file and uses the remaining valid config/defaults. `hook-admin.mjs status` will show malformed files as ignored.
92
+ - If the user asks to "disable the hook" globally, lead with `$impeccable hooks off` (persistent for this project; writes `hook.enabled: false` to config). The legacy `IMPECCABLE_HOOK_DISABLED=1` env var also works as a one-shot override that follows the shell.
@@ -3,7 +3,7 @@
3
3
  The setup command for a project. One codebase crawl feeds everything it writes:
4
4
 
5
5
  - **PRODUCT.md** (strategic): root project file for register, target users, product purpose, brand personality, anti-references, strategic design principles. Answers "who/what/why".
6
- - **DESIGN.md** (visual): root project file for visual theme, color palette, typography, components, layout. Follows the [Google Stitch DESIGN.md format](https://stitch.withgoogle.com/docs/design-md/format/). Answers "how it looks".
6
+ - **DESIGN.md** (visual): root project file for visual theme, color palette, typography, components, layout. Follows the [DESIGN.md format spec](https://raw.githubusercontent.com/google-labs-code/design.md/main/docs/spec.md). Answers "how it looks".
7
7
  - **`.impeccable/live/config.json`** (live mode): pre-configured so `$impeccable live` boots straight into variant mode with no first-time detour.
8
8
 
9
9
  It closes by pointing the user at the best command to run next. Every other impeccable command reads PRODUCT.md and DESIGN.md before doing any work.
@@ -16,6 +16,7 @@ Decision tree:
16
16
  - **Neither file exists (empty project or no context yet)**: do Steps 2-4 (write PRODUCT.md), then decide on DESIGN.md based on whether there's code to analyze.
17
17
  - **PRODUCT.md exists, DESIGN.md missing**: skip to Step 5 and offer to run `$impeccable document` for DESIGN.md.
18
18
  - **PRODUCT.md exists but has no `## Register` section (legacy)**: add it. Infer a hypothesis from the codebase (see Step 2), confirm with the user, write the field.
19
+ - **PRODUCT.md exists but has no `## Platform` section (legacy)**: add it the same way, but only when the project is native (`ios` / `android` / `adaptive`) or the user wants it explicit; a missing field already means `web`.
19
20
  - **Both exist**: STOP and use Codex's structured user-input/question tool when available; if unavailable, ask directly in chat to clarify what you cannot infer. Ask which file to refresh. Skip the one the user doesn't want changed.
20
21
  - **Just DESIGN.md exists (unusual)**: do Steps 2-4 to produce PRODUCT.md.
21
22
 
@@ -41,6 +42,13 @@ Also form a **register hypothesis** from what you find:
41
42
 
42
43
  Register is a hypothesis at this point, not a decision; Step 3 confirms it.
43
44
 
45
+ Also form a **platform hypothesis**:
46
+
47
+ - Native signals: React Native / Expo (`react-native`, `expo`), Flutter (`pubspec.yaml`, `flutter`), SwiftUI / UIKit (`.swift`, `.xcodeproj`, an `ios/` app target), Jetpack Compose / Android (`build.gradle`, an `android/` app module, `AndroidManifest.xml`). An `ios/` and/or `android/` directory that is a real app target, not just a Capacitor/Cordova wrapper around a website.
48
+ - Web signals (the default): a web framework (Vite, Next, Nuxt, SvelteKit, Astro), an HTML entry, a CSS/Tailwind setup, no native app target.
49
+
50
+ Values: `web` / `ios` / `android` / `adaptive` (one codebase, ships both, adapts per OS). Mobile web is still `web`. Like register, this is a hypothesis; Step 3 confirms it.
51
+
44
52
  Note what you've learned and what remains unclear. Also note any rough edges worth a follow-up command (thin hierarchy, flat or gray palette, missing error/empty states, dull copy); Step 7 turns these into concrete recommendations without re-analyzing.
45
53
 
46
54
  ## Step 3: Ask strategic questions (for PRODUCT.md)
@@ -55,12 +63,12 @@ If the repo is empty or the user's brief is sparse, run a short interview before
55
63
  - Ask **2-3 questions per round**, then wait for answers.
56
64
  - Use inferred answers as hypotheses or options, not as finished facts.
57
65
  - Complete at least one real user-answer round before drafting PRODUCT.md, unless every required answer is directly discoverable from repo docs.
58
- - Round 1 should establish register, users/purpose, and desired outcome.
66
+ - Round 1 should establish register, platform, users/purpose, and desired outcome.
59
67
  - Round 2 should establish brand personality or references, anti-references, and accessibility needs.
60
68
 
61
69
  ### Minimum viable interview
62
70
 
63
- Ask enough to complete PRODUCT.md. At minimum, cover register confirmation, users and purpose, brand personality, anti-references, and accessibility needs unless each answer is directly discoverable from repo context. After at least one interview round, you may propose inferred answers, but the user must confirm them before you write PRODUCT.md. Never synthesize PRODUCT.md from the original task prompt alone.
71
+ Ask enough to complete PRODUCT.md. At minimum, cover register confirmation, **platform confirmation** (`web` / `ios` / `android` / `adaptive`), users and purpose, brand personality, anti-references, and accessibility needs unless each answer is directly discoverable from repo context. Never let the template's default `web` stand unconfirmed for a native or cross-platform repo. After at least one interview round, you may propose inferred answers, but the user must confirm them before you write PRODUCT.md. Never synthesize PRODUCT.md from the original task prompt alone.
64
72
 
65
73
  ### Register (ask first; it shapes everything below)
66
74
 
@@ -70,6 +78,14 @@ If Step 2 produced a clear hypothesis, lead with it: *"From the codebase, this l
70
78
 
71
79
  If the signal is genuinely split (e.g. a product with a big marketing landing), STOP and use Codex's structured user-input/question tool when available; if unavailable, ask directly in chat to clarify what you cannot infer. Ask which register describes the **primary** surface. The register can be overridden per task later, but PRODUCT.md carries one default.
72
80
 
81
+ ### Platform (ask right after register)
82
+
83
+ Every project targets **web** (includes responsive mobile web), **ios**, **android**, or **adaptive** (one codebase, ships both, adapts per OS: Flutter, React Native, KMP). Platform picks the native rulebook: HIG for `ios`, Material 3 for `android`, both for `adaptive`, none for `web`.
84
+
85
+ If Step 2 produced a clear hypothesis, lead with it: *"From the codebase, this looks like a [web / ios / android / adaptive] project. Does that match?"* For cross-platform apps, decide by the **design language the app renders**, not the toolchain: one look on both platforms (Flutter's Material-everywhere default) takes that platform's value; genuine per-OS adaptation (Cupertino on iOS, Material on Android) is `adaptive`. When in doubt, `web`.
86
+
87
+ A monorepo shipping both a website and a native app gets a PRODUCT.md per app, each with its own `## Platform`; the root PRODUCT.md carries the primary surface's platform.
88
+
73
89
  ### Users & Purpose
74
90
  - Who uses this? What's their context when using it?
75
91
  - What job are they trying to get done?
@@ -101,6 +117,10 @@ Synthesize into a strategic document:
101
117
 
102
118
  product
103
119
 
120
+ ## Platform
121
+
122
+ web
123
+
104
124
  ## Users
105
125
  [Who they are, their context, the job to be done]
106
126
 
@@ -120,7 +140,7 @@ product
120
140
  [WCAG level, known user needs, considerations]
121
141
  ```
122
142
 
123
- Register is either `brand` or `product` as a bare value. No prose, no commentary.
143
+ Register is either `brand` or `product` as a bare value. No prose, no commentary. Platform is `web`, `ios`, `android`, or `adaptive`, also a bare value; omit the section only on legacy files you're leaving untouched, otherwise write `web` explicitly.
124
144
 
125
145
  Write to `PROJECT_ROOT/PRODUCT.md`. If `.impeccable.md` existed, the loader already renamed it; merge into that content rather than starting from scratch.
126
146
 
@@ -137,6 +157,8 @@ If the user prefers to skip, mention they can run `$impeccable document` any tim
137
157
 
138
158
  ## Step 6: Configure live mode (when code exists)
139
159
 
160
+ **Skip this step when the platform is native** (`ios` / `android` / `adaptive`): live mode drives a browser overlay. A hybrid wrapper or Expo web target serving HTML doesn't change that.
161
+
140
162
  If the project has code with HTML entries and a dev server (the same "code exists" condition that puts `$impeccable document` in scan mode), pre-configure live mode now. You already identified the framework and the served HTML entry in Step 2, so this is nearly free, and it spares the user the first-time setup detour when they later run `$impeccable live`.
141
163
 
142
164
  **Skip this step for empty / pre-implementation projects** (nothing to inject into yet). Tell the user live mode will configure itself the first time they run it once there's code.
@@ -154,16 +176,16 @@ Writing the config file is harmless and needs no consent; only the CSP **source-
154
176
  ## Step 7: Recommend starting points, then wrap up
155
177
 
156
178
  Summarize tersely:
157
- - Register captured (brand / product)
179
+ - Register captured (brand / product) and platform captured (web / ios / android / adaptive)
158
180
  - What was written (PRODUCT.md, DESIGN.md, live config, or a subset)
159
181
  - The 3-5 strategic principles from PRODUCT.md that will guide future work
160
182
  - If DESIGN.md or live config is pending, one line on how to set it up later
161
183
 
162
- Then recommend the **best commands to run next**, drawn from what your Step 2 crawl already surfaced. Do not run a fresh analysis here; surface observations you already have. Tailor to register and to what you saw, offer the 2-4 most relevant (not a menu dump), and give the exact command to type. Group by intent:
184
+ Then recommend the **best commands to run next**, drawn from what your Step 2 crawl already surfaced. Do not run a fresh analysis here; surface observations you already have. Tailor to register **and platform**, offer the 2-4 most relevant (not a menu dump), and give the exact command to type. Group by intent:
163
185
 
164
186
  - **Build something new**: `$impeccable craft <feature>` (shape, then build end-to-end) or `$impeccable shape <feature>` (plan first). Lead with this for empty or early-stage projects.
165
187
  - **Improve what's there**: name the specific surface. `$impeccable critique <page>` for a scored UX review; `$impeccable audit <area>` for a11y / perf / responsive checks; `$impeccable polish <component>` for a pre-ship pass. When the crawl flagged a specific weakness, point the matching command at it: thin hierarchy or spacing → `layout`, flat or gray palette → `colorize`, missing error / empty states → `harden` or `onboard`, dull or unclear copy → `clarify`.
166
- - **Iterate visually**: `$impeccable live` (configured in Step 6) to pick elements in the browser and generate variants in place.
188
+ - **Iterate visually** (web only): `$impeccable live` (configured in Step 6) to pick elements in the browser and generate variants in place. **Skip this group for native platforms.**
167
189
 
168
190
  The full command menu is one bare `$impeccable` away; keep this list short and pointed.
169
191