@prestyj/cli 5.7.0 → 5.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (364) hide show
  1. package/README.md +2 -2
  2. package/assets/skills/evidence-led-ui/LICENSES.md +12 -0
  3. package/assets/skills/evidence-led-ui/SKILL.md +14 -6
  4. package/assets/skills/evidence-led-ui/references/anti-defaults.md +9 -1
  5. package/assets/skills/evidence-led-ui/references/craft-rulings.md +33 -0
  6. package/assets/skills/evidence-led-ui/references/production-contract.md +41 -21
  7. package/assets/skills/evidence-led-ui/references/provenance.md +7 -5
  8. package/assets/skills/evidence-led-ui/references/quality-rubric.md +10 -10
  9. package/dist/app-sidecar-sessions.d.ts +8 -0
  10. package/dist/app-sidecar-sessions.d.ts.map +1 -0
  11. package/dist/app-sidecar-sessions.js +31 -0
  12. package/dist/app-sidecar-sessions.js.map +1 -0
  13. package/dist/app-sidecar-sessions.test.d.ts +2 -0
  14. package/dist/app-sidecar-sessions.test.d.ts.map +1 -0
  15. package/dist/app-sidecar-sessions.test.js +83 -0
  16. package/dist/app-sidecar-sessions.test.js.map +1 -0
  17. package/dist/app-sidecar.js +488 -156
  18. package/dist/app-sidecar.js.map +1 -1
  19. package/dist/cli/auth.d.ts.map +1 -1
  20. package/dist/cli/auth.js +5 -2
  21. package/dist/cli/auth.js.map +1 -1
  22. package/dist/cli/shared.d.ts.map +1 -1
  23. package/dist/cli/shared.js +2 -0
  24. package/dist/cli/shared.js.map +1 -1
  25. package/dist/cli.d.ts.map +1 -1
  26. package/dist/cli.js +61 -29
  27. package/dist/cli.js.map +1 -1
  28. package/dist/config.d.ts +4 -0
  29. package/dist/config.d.ts.map +1 -1
  30. package/dist/config.js +10 -0
  31. package/dist/config.js.map +1 -1
  32. package/dist/config.test.js +7 -0
  33. package/dist/config.test.js.map +1 -1
  34. package/dist/core/agent-session-compaction.test.js +540 -10
  35. package/dist/core/agent-session-compaction.test.js.map +1 -1
  36. package/dist/core/agent-session-memory-tail.test.js +1 -1
  37. package/dist/core/agent-session-memory-tail.test.js.map +1 -1
  38. package/dist/core/agent-session-queue.test.js +1 -1
  39. package/dist/core/agent-session-queue.test.js.map +1 -1
  40. package/dist/core/agent-session-review-coverage.test.js +26 -0
  41. package/dist/core/agent-session-review-coverage.test.js.map +1 -1
  42. package/dist/core/agent-session-tool-result-policy.test.d.ts +2 -0
  43. package/dist/core/agent-session-tool-result-policy.test.d.ts.map +1 -0
  44. package/dist/core/agent-session-tool-result-policy.test.js +25 -0
  45. package/dist/core/agent-session-tool-result-policy.test.js.map +1 -0
  46. package/dist/core/agent-session.d.ts +44 -8
  47. package/dist/core/agent-session.d.ts.map +1 -1
  48. package/dist/core/agent-session.js +369 -99
  49. package/dist/core/agent-session.js.map +1 -1
  50. package/dist/core/agents.d.ts +1 -1
  51. package/dist/core/agents.d.ts.map +1 -1
  52. package/dist/core/agents.js +4 -1
  53. package/dist/core/agents.js.map +1 -1
  54. package/dist/core/auth-providers.d.ts.map +1 -1
  55. package/dist/core/auth-providers.js +15 -8
  56. package/dist/core/auth-providers.js.map +1 -1
  57. package/dist/core/auth-storage.d.ts +1 -1
  58. package/dist/core/auth-storage.d.ts.map +1 -1
  59. package/dist/core/auth-storage.js +1 -1
  60. package/dist/core/auth-storage.js.map +1 -1
  61. package/dist/core/compaction/active-context.d.ts +17 -0
  62. package/dist/core/compaction/active-context.d.ts.map +1 -0
  63. package/dist/core/compaction/active-context.js +20 -0
  64. package/dist/core/compaction/active-context.js.map +1 -0
  65. package/dist/core/compaction/active-context.test.d.ts +2 -0
  66. package/dist/core/compaction/active-context.test.d.ts.map +1 -0
  67. package/dist/core/compaction/active-context.test.js +36 -0
  68. package/dist/core/compaction/active-context.test.js.map +1 -0
  69. package/dist/core/compaction/compactor.d.ts +19 -18
  70. package/dist/core/compaction/compactor.d.ts.map +1 -1
  71. package/dist/core/compaction/compactor.js +84 -53
  72. package/dist/core/compaction/compactor.js.map +1 -1
  73. package/dist/core/compaction/compactor.test.js +135 -65
  74. package/dist/core/compaction/compactor.test.js.map +1 -1
  75. package/dist/core/compaction/token-estimator.d.ts +25 -1
  76. package/dist/core/compaction/token-estimator.d.ts.map +1 -1
  77. package/dist/core/compaction/token-estimator.js +86 -1
  78. package/dist/core/compaction/token-estimator.js.map +1 -1
  79. package/dist/core/compaction/token-estimator.test.js +147 -1
  80. package/dist/core/compaction/token-estimator.test.js.map +1 -1
  81. package/dist/core/compaction/tool-result-pruner.d.ts +37 -0
  82. package/dist/core/compaction/tool-result-pruner.d.ts.map +1 -0
  83. package/dist/core/compaction/tool-result-pruner.js +103 -0
  84. package/dist/core/compaction/tool-result-pruner.js.map +1 -0
  85. package/dist/core/compaction/tool-result-pruner.test.d.ts +2 -0
  86. package/dist/core/compaction/tool-result-pruner.test.d.ts.map +1 -0
  87. package/dist/core/compaction/tool-result-pruner.test.js +148 -0
  88. package/dist/core/compaction/tool-result-pruner.test.js.map +1 -0
  89. package/dist/core/event-bus.d.ts +5 -0
  90. package/dist/core/event-bus.d.ts.map +1 -1
  91. package/dist/core/event-bus.js +6 -0
  92. package/dist/core/event-bus.js.map +1 -1
  93. package/dist/core/goal-controller.test.js +3 -3
  94. package/dist/core/goal-controller.test.js.map +1 -1
  95. package/dist/core/ideal-review.d.ts +6 -0
  96. package/dist/core/ideal-review.d.ts.map +1 -1
  97. package/dist/core/ideal-review.js +14 -0
  98. package/dist/core/ideal-review.js.map +1 -1
  99. package/dist/core/ideal-review.test.js +10 -1
  100. package/dist/core/ideal-review.test.js.map +1 -1
  101. package/dist/core/index.d.ts +3 -3
  102. package/dist/core/index.d.ts.map +1 -1
  103. package/dist/core/index.js +3 -3
  104. package/dist/core/index.js.map +1 -1
  105. package/dist/core/input-normalization.test.d.ts +2 -0
  106. package/dist/core/input-normalization.test.d.ts.map +1 -0
  107. package/dist/core/input-normalization.test.js +75 -0
  108. package/dist/core/input-normalization.test.js.map +1 -0
  109. package/dist/core/loop-breaker.d.ts +38 -1
  110. package/dist/core/loop-breaker.d.ts.map +1 -1
  111. package/dist/core/loop-breaker.js +84 -2
  112. package/dist/core/loop-breaker.js.map +1 -1
  113. package/dist/core/loop-breaker.test.js +108 -1
  114. package/dist/core/loop-breaker.test.js.map +1 -1
  115. package/dist/core/message-images.d.ts +12 -0
  116. package/dist/core/message-images.d.ts.map +1 -0
  117. package/dist/core/message-images.js +52 -0
  118. package/dist/core/message-images.js.map +1 -0
  119. package/dist/core/message-images.test.d.ts +2 -0
  120. package/dist/core/message-images.test.d.ts.map +1 -0
  121. package/dist/core/message-images.test.js +62 -0
  122. package/dist/core/message-images.test.js.map +1 -0
  123. package/dist/core/project-discovery.d.ts +7 -10
  124. package/dist/core/project-discovery.d.ts.map +1 -1
  125. package/dist/core/project-discovery.js +125 -66
  126. package/dist/core/project-discovery.js.map +1 -1
  127. package/dist/core/project-discovery.test.js +177 -0
  128. package/dist/core/project-discovery.test.js.map +1 -1
  129. package/dist/core/resolve-start.test.js +1 -0
  130. package/dist/core/resolve-start.test.js.map +1 -1
  131. package/dist/core/session-compaction.d.ts +3 -0
  132. package/dist/core/session-compaction.d.ts.map +1 -1
  133. package/dist/core/session-compaction.js +14 -1
  134. package/dist/core/session-compaction.js.map +1 -1
  135. package/dist/core/session-compaction.test.js +5 -0
  136. package/dist/core/session-compaction.test.js.map +1 -1
  137. package/dist/core/session-manager.d.ts +35 -8
  138. package/dist/core/session-manager.d.ts.map +1 -1
  139. package/dist/core/session-manager.js +264 -125
  140. package/dist/core/session-manager.js.map +1 -1
  141. package/dist/core/session-manager.test.js +17 -0
  142. package/dist/core/session-manager.test.js.map +1 -1
  143. package/dist/core/session-preview.d.ts +11 -0
  144. package/dist/core/session-preview.d.ts.map +1 -0
  145. package/dist/core/session-preview.js +50 -0
  146. package/dist/core/session-preview.js.map +1 -0
  147. package/dist/core/session-storage.d.ts +57 -0
  148. package/dist/core/session-storage.d.ts.map +1 -0
  149. package/dist/core/session-storage.js +568 -0
  150. package/dist/core/session-storage.js.map +1 -0
  151. package/dist/core/session-storage.test.d.ts +2 -0
  152. package/dist/core/session-storage.test.d.ts.map +1 -0
  153. package/dist/core/session-storage.test.js +269 -0
  154. package/dist/core/session-storage.test.js.map +1 -0
  155. package/dist/core/settings-manager.d.ts +3 -0
  156. package/dist/core/settings-manager.d.ts.map +1 -1
  157. package/dist/core/settings-manager.js +10 -2
  158. package/dist/core/settings-manager.js.map +1 -1
  159. package/dist/core/sidecar-error-reporter.d.ts +12 -0
  160. package/dist/core/sidecar-error-reporter.d.ts.map +1 -0
  161. package/dist/core/sidecar-error-reporter.js +57 -0
  162. package/dist/core/sidecar-error-reporter.js.map +1 -0
  163. package/dist/core/sidecar-error-reporter.test.d.ts +2 -0
  164. package/dist/core/sidecar-error-reporter.test.d.ts.map +1 -0
  165. package/dist/core/sidecar-error-reporter.test.js +61 -0
  166. package/dist/core/sidecar-error-reporter.test.js.map +1 -0
  167. package/dist/core/skills.d.ts +1 -1
  168. package/dist/core/skills.d.ts.map +1 -1
  169. package/dist/core/skills.js +4 -1
  170. package/dist/core/skills.js.map +1 -1
  171. package/dist/core/subagent-manager.d.ts +9 -4
  172. package/dist/core/subagent-manager.d.ts.map +1 -1
  173. package/dist/core/subagent-manager.js +30 -2
  174. package/dist/core/subagent-manager.js.map +1 -1
  175. package/dist/core/subagent-manager.test.js +47 -3
  176. package/dist/core/subagent-manager.test.js.map +1 -1
  177. package/dist/core/verify-commands.d.ts.map +1 -1
  178. package/dist/core/verify-commands.js +1 -6
  179. package/dist/core/verify-commands.js.map +1 -1
  180. package/dist/core/verify-commands.test.js +1 -5
  181. package/dist/core/verify-commands.test.js.map +1 -1
  182. package/dist/core/workspace-guard.d.ts +38 -0
  183. package/dist/core/workspace-guard.d.ts.map +1 -0
  184. package/dist/core/workspace-guard.js +112 -0
  185. package/dist/core/workspace-guard.js.map +1 -0
  186. package/dist/core/workspace-guard.test.d.ts +2 -0
  187. package/dist/core/workspace-guard.test.d.ts.map +1 -0
  188. package/dist/core/workspace-guard.test.js +86 -0
  189. package/dist/core/workspace-guard.test.js.map +1 -0
  190. package/dist/index.d.ts +1 -1
  191. package/dist/index.d.ts.map +1 -1
  192. package/dist/index.js +1 -1
  193. package/dist/index.js.map +1 -1
  194. package/dist/modes/json-mode.d.ts.map +1 -1
  195. package/dist/modes/json-mode.js +9 -0
  196. package/dist/modes/json-mode.js.map +1 -1
  197. package/dist/modes/subagent-worker-mode.d.ts.map +1 -1
  198. package/dist/modes/subagent-worker-mode.js +11 -0
  199. package/dist/modes/subagent-worker-mode.js.map +1 -1
  200. package/dist/session.d.ts +4 -4
  201. package/dist/session.d.ts.map +1 -1
  202. package/dist/session.js +38 -101
  203. package/dist/session.js.map +1 -1
  204. package/dist/session.test.d.ts +2 -0
  205. package/dist/session.test.d.ts.map +1 -0
  206. package/dist/session.test.js +35 -0
  207. package/dist/session.test.js.map +1 -0
  208. package/dist/system-prompt.d.ts +12 -0
  209. package/dist/system-prompt.d.ts.map +1 -1
  210. package/dist/system-prompt.js +86 -19
  211. package/dist/system-prompt.js.map +1 -1
  212. package/dist/system-prompt.test.js +132 -8
  213. package/dist/system-prompt.test.js.map +1 -1
  214. package/dist/tools/bash.d.ts +12 -2
  215. package/dist/tools/bash.d.ts.map +1 -1
  216. package/dist/tools/bash.js +65 -24
  217. package/dist/tools/bash.js.map +1 -1
  218. package/dist/tools/bash.test.d.ts +2 -0
  219. package/dist/tools/bash.test.d.ts.map +1 -0
  220. package/dist/tools/bash.test.js +89 -0
  221. package/dist/tools/bash.test.js.map +1 -0
  222. package/dist/tools/edit.d.ts +2 -1
  223. package/dist/tools/edit.d.ts.map +1 -1
  224. package/dist/tools/edit.js +7 -1
  225. package/dist/tools/edit.js.map +1 -1
  226. package/dist/tools/edit.test.js +7 -0
  227. package/dist/tools/edit.test.js.map +1 -1
  228. package/dist/tools/exit-plan.d.ts.map +1 -1
  229. package/dist/tools/exit-plan.js +15 -4
  230. package/dist/tools/exit-plan.js.map +1 -1
  231. package/dist/tools/exit-plan.test.d.ts +2 -0
  232. package/dist/tools/exit-plan.test.d.ts.map +1 -0
  233. package/dist/tools/exit-plan.test.js +72 -0
  234. package/dist/tools/exit-plan.test.js.map +1 -0
  235. package/dist/tools/grep.d.ts.map +1 -1
  236. package/dist/tools/grep.js +8 -3
  237. package/dist/tools/grep.js.map +1 -1
  238. package/dist/tools/grep.test.js +6 -0
  239. package/dist/tools/grep.test.js.map +1 -1
  240. package/dist/tools/index.d.ts +8 -0
  241. package/dist/tools/index.d.ts.map +1 -1
  242. package/dist/tools/index.js +3 -2
  243. package/dist/tools/index.js.map +1 -1
  244. package/dist/tools/overflow.d.ts +12 -2
  245. package/dist/tools/overflow.d.ts.map +1 -1
  246. package/dist/tools/overflow.js +49 -4
  247. package/dist/tools/overflow.js.map +1 -1
  248. package/dist/tools/overflow.test.d.ts +2 -0
  249. package/dist/tools/overflow.test.d.ts.map +1 -0
  250. package/dist/tools/overflow.test.js +62 -0
  251. package/dist/tools/overflow.test.js.map +1 -0
  252. package/dist/tools/screenshot.js +1 -1
  253. package/dist/tools/screenshot.js.map +1 -1
  254. package/dist/tools/skill.d.ts.map +1 -1
  255. package/dist/tools/skill.js +4 -2
  256. package/dist/tools/skill.js.map +1 -1
  257. package/dist/tools/source-path.d.ts.map +1 -1
  258. package/dist/tools/source-path.js +9 -0
  259. package/dist/tools/source-path.js.map +1 -1
  260. package/dist/tools/subagent-shared.d.ts +9 -1
  261. package/dist/tools/subagent-shared.d.ts.map +1 -1
  262. package/dist/tools/subagent-shared.js +4 -1
  263. package/dist/tools/subagent-shared.js.map +1 -1
  264. package/dist/tools/subagent-shared.test.js +21 -1
  265. package/dist/tools/subagent-shared.test.js.map +1 -1
  266. package/dist/tools/subagent.d.ts +3 -8
  267. package/dist/tools/subagent.d.ts.map +1 -1
  268. package/dist/tools/subagent.js +10 -8
  269. package/dist/tools/subagent.js.map +1 -1
  270. package/dist/tools/subagent.test.js +17 -1
  271. package/dist/tools/subagent.test.js.map +1 -1
  272. package/dist/tools/web-search.d.ts.map +1 -1
  273. package/dist/tools/web-search.js +13 -2
  274. package/dist/tools/web-search.js.map +1 -1
  275. package/dist/tools/write.d.ts +2 -1
  276. package/dist/tools/write.d.ts.map +1 -1
  277. package/dist/tools/write.js +7 -1
  278. package/dist/tools/write.js.map +1 -1
  279. package/dist/tools/write.test.js +12 -0
  280. package/dist/tools/write.test.js.map +1 -1
  281. package/dist/ui/App.d.ts +0 -2
  282. package/dist/ui/App.d.ts.map +1 -1
  283. package/dist/ui/App.js +23 -87
  284. package/dist/ui/App.js.map +1 -1
  285. package/dist/ui/app-items.d.ts +10 -0
  286. package/dist/ui/app-items.d.ts.map +1 -1
  287. package/dist/ui/app-items.js +10 -0
  288. package/dist/ui/app-items.js.map +1 -1
  289. package/dist/ui/components/ActivityIndicator.d.ts.map +1 -1
  290. package/dist/ui/components/ActivityIndicator.js +1 -0
  291. package/dist/ui/components/ActivityIndicator.js.map +1 -1
  292. package/dist/ui/components/Footer.test.js +1 -1
  293. package/dist/ui/components/ModelSelector.d.ts.map +1 -1
  294. package/dist/ui/components/ModelSelector.js +1 -0
  295. package/dist/ui/components/ModelSelector.js.map +1 -1
  296. package/dist/ui/components/SubAgentPanel.d.ts +2 -0
  297. package/dist/ui/components/SubAgentPanel.d.ts.map +1 -1
  298. package/dist/ui/components/SubAgentPanel.js +4 -2
  299. package/dist/ui/components/SubAgentPanel.js.map +1 -1
  300. package/dist/ui/hooks/useAgentLoop.d.ts +7 -6
  301. package/dist/ui/hooks/useAgentLoop.d.ts.map +1 -1
  302. package/dist/ui/hooks/useAgentLoop.js +56 -11
  303. package/dist/ui/hooks/useAgentLoop.js.map +1 -1
  304. package/dist/ui/hooks/useAgentLoop.test.js +31 -0
  305. package/dist/ui/hooks/useAgentLoop.test.js.map +1 -1
  306. package/dist/ui/hooks/useContextCompaction.d.ts +5 -8
  307. package/dist/ui/hooks/useContextCompaction.d.ts.map +1 -1
  308. package/dist/ui/hooks/useContextCompaction.js +77 -16
  309. package/dist/ui/hooks/useContextCompaction.js.map +1 -1
  310. package/dist/ui/hooks/useContextCompaction.test.d.ts +2 -0
  311. package/dist/ui/hooks/useContextCompaction.test.d.ts.map +1 -0
  312. package/dist/ui/hooks/useContextCompaction.test.js +135 -0
  313. package/dist/ui/hooks/useContextCompaction.test.js.map +1 -0
  314. package/dist/ui/hooks/useSessionPersistence.d.ts.map +1 -1
  315. package/dist/ui/hooks/useSessionPersistence.js +3 -0
  316. package/dist/ui/hooks/useSessionPersistence.js.map +1 -1
  317. package/dist/ui/hooks/useTerminalTitle.d.ts +3 -3
  318. package/dist/ui/hooks/useTerminalTitle.d.ts.map +1 -1
  319. package/dist/ui/hooks/useTerminalTitle.js +5 -9
  320. package/dist/ui/hooks/useTerminalTitle.js.map +1 -1
  321. package/dist/ui/hooks/useTranscriptHistory.d.ts +8 -5
  322. package/dist/ui/hooks/useTranscriptHistory.d.ts.map +1 -1
  323. package/dist/ui/hooks/useTranscriptHistory.js +2 -30
  324. package/dist/ui/hooks/useTranscriptHistory.js.map +1 -1
  325. package/dist/ui/login.d.ts.map +1 -1
  326. package/dist/ui/login.js +7 -2
  327. package/dist/ui/login.js.map +1 -1
  328. package/dist/ui/render.d.ts +0 -2
  329. package/dist/ui/render.d.ts.map +1 -1
  330. package/dist/ui/render.js +0 -4
  331. package/dist/ui/render.js.map +1 -1
  332. package/dist/ui/render.test.js +10 -1
  333. package/dist/ui/render.test.js.map +1 -1
  334. package/dist/ui/terminal-history.js +6 -2
  335. package/dist/ui/terminal-history.js.map +1 -1
  336. package/dist/ui/terminal-history.test.js +2 -2
  337. package/dist/ui/terminal-history.test.js.map +1 -1
  338. package/dist/ui/tui-history-parity.test.js +8 -1
  339. package/dist/ui/tui-history-parity.test.js.map +1 -1
  340. package/dist/utils/git.d.ts +2 -0
  341. package/dist/utils/git.d.ts.map +1 -1
  342. package/dist/utils/git.js +12 -0
  343. package/dist/utils/git.js.map +1 -1
  344. package/dist/utils/git.test.d.ts +2 -0
  345. package/dist/utils/git.test.d.ts.map +1 -0
  346. package/dist/utils/git.test.js +36 -0
  347. package/dist/utils/git.test.js.map +1 -0
  348. package/dist/utils/http-body.d.ts +19 -0
  349. package/dist/utils/http-body.d.ts.map +1 -0
  350. package/dist/utils/http-body.js +58 -0
  351. package/dist/utils/http-body.js.map +1 -0
  352. package/dist/utils/http-body.test.d.ts +2 -0
  353. package/dist/utils/http-body.test.d.ts.map +1 -0
  354. package/dist/utils/http-body.test.js +68 -0
  355. package/dist/utils/http-body.test.js.map +1 -0
  356. package/dist/utils/text.d.ts +9 -0
  357. package/dist/utils/text.d.ts.map +1 -0
  358. package/dist/utils/text.js +11 -0
  359. package/dist/utils/text.js.map +1 -0
  360. package/package.json +5 -5
  361. package/dist/utils/session-title.d.ts +0 -19
  362. package/dist/utils/session-title.d.ts.map +0 -1
  363. package/dist/utils/session-title.js +0 -82
  364. package/dist/utils/session-title.js.map +0 -1
package/README.md CHANGED
@@ -71,7 +71,7 @@ Switch mid-conversation with `/model`. Not locked to anyone.
71
71
  |---|---|---|
72
72
  | **Anthropic** | Claude Opus 4.8, Sonnet 5, Haiku 4.5 | OAuth |
73
73
  | **OpenAI** | GPT-5.5, GPT-5.5 Pro, GPT-5.4, GPT-5.3 Codex | OAuth |
74
- | **Moonshot** | Kimi K2.6 | API key |
74
+ | **Moonshot** | Kimi K3, Kimi K2.7 Code | OAuth or API key |
75
75
  | **Z.AI (GLM)** | GLM-5.1, GLM-4.7, GLM-4.7 Flash | API key |
76
76
  | **MiniMax** | MiniMax M3 (image + video) | API key |
77
77
  | **Xiaomi (MiMo)** | MiMo-V2.5-Pro, MiMo-V2.5-Pro-UltraSpeed, MiMo-V2.5 (image + video) | API key |
@@ -80,7 +80,7 @@ Switch mid-conversation with `/model`. Not locked to anyone.
80
80
 
81
81
  The same conversation, the same tools, the same project context — only the model changes. Use a strong reasoning model when you need it, swap to a fast cheap one for grunt work, never restart your session.
82
82
 
83
- **Attachments.** Drag, paste, or type a path to attach images and video in the chat input. Video is sent natively to models that support it (Gemini 3.x, Kimi K2.6, MiniMax M3, MiMo-V2.5); for other models the video is saved to a temp file and the model is told to inspect it with ffmpeg or its own tools.
83
+ **Attachments.** Drag, paste, or type a path to attach images and video in the chat input. Video is sent natively to models that support it (Gemini 3.x, Kimi K3/K2.7 Code, MiniMax M3, MiMo-V2.5); for other models the video is saved to a temp file and the model is told to inspect it with ffmpeg or its own tools.
84
84
 
85
85
  ---
86
86
 
@@ -44,6 +44,18 @@ The following works informed research comparisons. Their source text, assets, da
44
44
  - Status checked 2026-07-13: W3C Recommendation, 12 December 2024
45
45
  - Use here: linked accessibility conformance floor; W3C text is not redistributed.
46
46
 
47
+ ### WCAG2ICT
48
+
49
+ - Source: https://www.w3.org/TR/wcag2ict-22/
50
+ - Status checked 2026-07-21: W3C Group Note; informative guidance for applying WCAG 2 Level A and AA to non-web software.
51
+ - Use here: linked native-software accessibility guidance; W3C text is not redistributed.
52
+
53
+ ### U.S. Department of Justice ADA web and mobile accessibility guidance
54
+
55
+ - Sources: https://www.ada.gov/resources/web-guidance/ and https://www.ada.gov/resources/2024-03-08-web-rule/
56
+ - Status checked 2026-07-21: current DOJ guidance and Title II rule fact sheet.
57
+ - Use here: legal-context and equal-access boundary only; no source text is redistributed and no legal-compliance conclusion is inferred.
58
+
47
59
  ### WCAG 3.0
48
60
 
49
61
  - Source: https://www.w3.org/TR/wcag-3.0/
@@ -21,11 +21,17 @@ Apply these on every UI task. Read `references/craft-rulings.md` when implementi
21
21
 
22
22
  - **No emoji UI:** Never use emoji as icons, bullets, status marks, or decoration unless explicitly requested. Reuse the project icon system; otherwise use one coherent icon package.
23
23
  - **Uniform geometry:** Align containers, columns, section edges, baselines, dividers, control heights, and repeated component anatomy. Break alignment only for a clear content reason.
24
+ - **One shared content rail:** Default navigation, header, main content, footer, and adjacent sections to the same max-width, inline gutters, and breakpoint padding. Full-bleed backgrounds may differ, but their inner content edges must align. Any different width or offset needs an explicit user or content reason, never one-off margin or padding.
25
+ - **No edge-hugging control icons:** Select, dropdown, and combobox chevrons and other trailing icons need a deliberate inline-end inset plus enough reserved text padding for the icon and gap. They must never touch the control edge or overlap content; use logical properties so the anatomy also works in RTL.
24
26
  - **Reuse first:** Search for existing components, variants, tokens, utilities, icon wrappers, focus rings, and motion curves before creating new ones.
25
27
  - **Purposeful feedback:** Relevant hover, focus, press, selected, expanded, loading, success, and error states need clear feedback. Avoid abrupt changes when a short transition improves continuity.
28
+ - **No soft semantic tint-on-tint:** Do not default badges, buttons, toasts, cards, selected states, or icon medallions to a low-opacity semantic-color background with saturated same-hue text or icons, with or without a matching border. Unless the user explicitly requests that treatment or an established system must be preserved, choose a product-specific alternative rather than imposing one universal replacement style.
29
+ - **No sticky pointer focus:** Clicking or tapping must not leave a focus ring, highlighted border, shadow, background, or container `:focus-within` treatment stuck after the interaction ends, a native popup closes, or the user clicks elsewhere. Preserve immediate, visible keyboard focus by distinguishing input modality instead of suppressing focus globally.
26
30
  - **No generic hover lift:** Do not default to `translateY`, bobbing, floating, or scale-up on hover. Prefer color, border, underline, icon fill, opacity, or restrained shadow changes.
27
31
  - **No `transition: all`:** Name transition properties, reuse duration/easing tokens, and provide a reduced-motion path.
28
32
  - **Intentional type:** Reuse the existing type system. For net-new web work, select an appropriate modern family or pairing; do not use Arial, Helvetica, or bare `system-ui` as the aesthetic direction.
33
+ - **WCAG 2.2 Level AA is the accessibility floor:** Every web UI and complete user flow must meet every applicable Level A and Level AA success criterion, not a hand-picked subset. Native apps apply WCAG2ICT where relevant plus current platform accessibility requirements. Stricter project, contract, platform, or jurisdiction rules win; accessibility cannot be traded for aesthetics, scope, delivery speed, or a higher rubric score.
34
+ - **No unsupported accessibility claims:** Treat ADA as an equal-access legal obligation, not a badge earned by Lighthouse, axe, or another scanner. Never label a UI `ADA compliant` or `WCAG conformant` from source review or automated checks alone; a claim requires a defined scope, per-criterion evidence, manual keyboard and assistive-technology testing, and qualified legal or product-owner review when legal compliance is asserted.
29
35
  - **Measured contrast:** Meet WCAG 2.2 contrast for text, controls, icons, focus, and meaningful graphics. Muted text must remain readable.
30
36
  - **Consistent flow:** Repeated navigation and actions keep the same order, labels, icons, placement, and behavior across sections and pages.
31
37
  - **No generated em dashes:** Do not write em dashes in user-facing UI copy unless explicitly requested or exact supplied source text must remain unchanged.
@@ -35,7 +41,7 @@ Apply these on every UI task. Read `references/craft-rulings.md` when implementi
35
41
  Resolve every path from the installed skill root. Load only what the task needs:
36
42
 
37
43
  - `references/craft-rulings.md`: implementation detail for the binding defaults above.
38
- - `references/production-contract.md`: pass/fail semantics, forms, accessibility, performance, resilience, platform, trust, AI, media, theme, and release checks. Read it for broad features, behavior changes, forms, navigation, data/AI interfaces, native work, performance work, or release review.
44
+ - `references/production-contract.md`: binding pass/fail semantics, WCAG/ADA accessibility, forms, performance, resilience, platform, trust, AI, media, theme, and release checks. Read its accessibility sections for every implemented or reviewed UI; read the full contract for broad features, behavior changes, forms, navigation, data/AI interfaces, native work, performance work, or release review.
39
45
  - `references/archetypes.md`: surface-specific direction and relevant source slugs. Read for net-new UI, redesigns, or unresolved visual direction.
40
46
  - `references/observed-patterns.md`: measured corpus observations. Read only sections that answer a real design question.
41
47
  - `references/anti-defaults.md`: transferable AI-generated patterns to challenge. Read for broad visual work or generic-looking output.
@@ -90,7 +96,7 @@ One thesis leads. Do not combine several aesthetic directions into a mood-board
90
96
 
91
97
  ### 5. Run the anti-default check
92
98
 
93
- For broad visual work, read `references/anti-defaults.md`. Flag emoji UI, mixed icon families, arbitrary misalignment, duplicated local styling, abrupt interaction, generic hover lift, generic type, generated em dashes, centered gradient heroes, glass cards, equal card grids, decorative eyebrows, random metric blocks, ubiquitous pills, dark-premium assumptions, fake terminals, floating screenshots, bento layouts, ambient motion, icon medallions, and invented proof.
99
+ For broad visual work, read `references/anti-defaults.md`. Flag emoji UI, mixed icon families, arbitrary misalignment, duplicated local styling, abrupt interaction, generic hover lift, soft semantic tint-on-tint treatments, generic type, generated em dashes, centered gradient heroes, glass cards, equal card grids, decorative eyebrows, random metric blocks, ubiquitous pills, dark-premium assumptions, fake terminals, floating screenshots, bento layouts, ambient motion, icon medallions, and invented proof.
94
100
 
95
101
  Keep a flagged pattern only after completing: **“This belongs because…”** with a product-specific reason. Replace choices that could survive unchanged in an unrelated product.
96
102
 
@@ -101,10 +107,12 @@ Plan only relevant states, but include the complete primary path and recovery:
101
107
  - loading, empty, error, retry, offline, success, disabled, and destructive outcomes;
102
108
  - hover, focus-visible, press, selected, expanded, and pending feedback;
103
109
  - keyboard order, accessible names/status, overlay focus, and drag alternatives;
110
+ - pointer-versus-keyboard focus behavior, including native popup dismissal and clicks onto non-focusable space;
104
111
  - narrow, intermediate, desktop, wide/resizable, pointer, touch, and no-hover behavior;
105
- - reduced motion, forced colors, zoom/reflow, long/localized/RTL text, missing media, and realistic data extremes.
112
+ - reduced motion, forced colors, zoom/reflow, long/localized/RTL text, missing media, and realistic data extremes;
113
+ - text alternatives and media equivalents, landmarks/headings, language, labels/instructions/errors, status announcements, timing, flashing, and sensory-independent instructions where applicable.
106
114
 
107
- For broad behavior, forms, navigation, native, data/AI, performance, or release work, read and apply `references/production-contract.md`. A visual score cannot compensate for a relevant contract failure.
115
+ For every UI, read and apply the accessibility sections of `references/production-contract.md`. For broad behavior, forms, navigation, native, data/AI, performance, or release work, apply the full contract. A visual score cannot compensate for a relevant contract failure.
108
116
 
109
117
  ### 7. Document broad work
110
118
 
@@ -114,7 +122,7 @@ For a broad page, multi-screen feature, or redesign, create or update `DESIGN.md
114
122
 
115
123
  Use real project content and data. Label fixtures honestly. Never invent testimonials, customer logos, ratings, metrics, or claims as fact.
116
124
 
117
- Reuse dependencies and primitives. Use one coherent icon system. Maintain semantic controls, visible focus, keyboard operation, measured contrast, readable line lengths, stable adaptive layout, and reduced-motion support. Implement the complete planned flow, not only its first screenshot.
125
+ Reuse dependencies and primitives. Use one coherent icon system. Meet every applicable WCAG 2.2 Level A and AA criterion across the complete flow, including its states and responsive variants. Maintain semantic controls, visible keyboard focus, keyboard operation, assistive-technology output, measured contrast, readable line lengths, stable adaptive layout, and reduced-motion support. Pointer interaction must not leave a false focus, active, or selected-looking highlight behind. Implement the complete planned flow, not only its first screenshot.
118
126
 
119
127
  The representative initial state must keep decision-critical information and the primary action visible or one obvious action away on desktop and mobile. Preserve selected context through master-detail recomposition. Keep demo, debug, and state-switching controls subordinate and non-obscuring.
120
128
 
@@ -124,7 +132,7 @@ Capture representative desktop and narrow/mobile output. Score broad work with `
124
132
 
125
133
  Default to one critique-and-revision cycle. Run another only when evidence still fails the score or production gate. If a check is unavailable, report it as unverified instead of looping or substituting more polish.
126
134
 
127
- Broad work is complete at **20/24 or higher**, with no zero in accessibility, consistency and flow, responsive behavior, state completeness, or content authenticity, and only after applicable production checks pass. A small component must score 2 on every applicable quality-floor criterion.
135
+ Broad work is complete at **20/24 or higher**, with no zero in accessibility, consistency and flow, responsive behavior, state completeness, or content authenticity, and only after applicable production checks pass. Any applicable WCAG Level A or AA failure blocks completion regardless of score. A small component must score 2 on every applicable quality-floor criterion and pass its accessibility contract checks.
128
136
 
129
137
  ## Review-only mode
130
138
 
@@ -3,7 +3,7 @@
3
3
  ## Contents
4
4
 
5
5
  - Purpose and review method
6
- - Template composition: centered gradient hero, glass cards, equal card grids, eyebrows, metric blocks, pills, dark-premium assumptions, huge type, fake terminals, floating screenshots, and bento layouts
6
+ - Template composition: centered gradient hero, glass cards, equal card grids, eyebrows, metric blocks, pills, soft semantic tint-on-tint treatments, dark-premium assumptions, huge type, fake terminals, floating screenshots, and bento layouts
7
7
  - Decoration and truth: ambient motion, icon medallions, false authenticity, emoji, and mixed icon language
8
8
  - Craft regressions: generic hover lift, abrupt states, accidental misalignment, reimplemented local styling, generic type, and generated em dashes
9
9
  - Final anti-default review
@@ -62,6 +62,14 @@ For every flagged pattern, write one sentence: **“This belongs because…”**
62
62
 
63
63
  **Legitimate when:** The project already uses an orbital/capsule motif, a control’s variable label length needs it, or tactile consumer friendliness is a deliberate material rule.
64
64
 
65
+ ## Soft semantic tint-on-tint
66
+
67
+ **AI tell:** Badges, buttons, toasts, cards, selected states, status rows, and icon medallions repeatedly use low-opacity semantic-color backgrounds with saturated same-hue text or icons, sometimes with a matching border. Component libraries often name this formula `soft`, `subtle`, `surface`, or `tonal`.
68
+
69
+ **Default action:** Replace the formula, then derive the new treatment from the product's actual aesthetic and component role. A neutral surface with one semantic marker, a solid fill with neutral high-contrast text, monochrome styling, product accent, typography, or another coherent local material model can work; none is the universal replacement.
70
+
71
+ **Legitimate when:** The user explicitly requests tint-on-tint or exact reuse of an established design-system variant is required by scope. Unlike most patterns in this file, this is a binding craft default rather than a pattern justified by generic claims such as `clean`, `friendly`, or `modern`.
72
+
65
73
  ## Dark equals premium
66
74
 
67
75
  **AI tell:** Near-black canvas, purple glow, thin gray borders, and muted text chosen without product evidence.
@@ -38,6 +38,22 @@ Uniformity means shared geometry, not equal visual importance.
38
38
  - Preserve alignment through responsive recomposition. Mobile may change order or layout, but repeated controls and content edges remain internally consistent.
39
39
  - Break the grid only to express real hierarchy, media behavior, or editorial emphasis. A deliberate exception should be visible as an exception, not look accidental.
40
40
 
41
+ ### Shared content rails and spacing ownership
42
+
43
+ Establish one page-shell or container primitive that owns the default max-width and responsive inline gutters. Reuse it for navigation, headers, breadcrumbs, main content, adjacent sections, and footers. A full-bleed background or divider may span the viewport, but its inner content returns to the shared rail. A navbar that is slightly wider or narrower than the page body, or neighboring sections with almost-matching edges, is a craft failure unless the user or content explicitly requires a different composition.
44
+
45
+ Use the project's spacing tokens for repeated section padding, stack gaps, grid gaps, and component insets. The parent layout owns spacing between siblings; each component owns its internal padding. Do not combine ad hoc child margins, wrapper padding, and arbitrary offsets until one section merely looks close to another. A deliberate nested rail, breakout, or asymmetric section needs a visible hierarchy or content reason and must resolve cleanly at every breakpoint.
46
+
47
+ Test by drawing vertical guides through navigation, header, main, repeated sections, and footer at narrow, intermediate, desktop, and wide sizes. Their inner edges and breakpoint changes must align exactly by default. Compare repeated vertical gaps and section padding side by side; equal roles use equal tokens.
48
+
49
+ ### Control icon insets
50
+
51
+ A select, dropdown, or combobox chevron is part of the control anatomy, not decoration pasted onto its edge. Give every trailing icon a deliberate `inset-inline-end` that follows the control's horizontal-padding token. Reserve `padding-inline-end` for the outer inset, icon width, and a readable gap so labels, selected values, placeholders, loading indicators, clear buttons, and long or localized content never collide with it. An icon at `right: 0`, touching the border, or squeezed into an unreserved text area is a craft failure.
52
+
53
+ Keep the icon optically centered and preserve the full control hit area. For a decorative custom chevron over a native select, avoid stacking it over the browser indicator and ensure the overlay does not create a dead pointer zone. Use logical inline properties and verify RTL rather than hard-coding right-side geometry.
54
+
55
+ Test every control size with the longest plausible value, 200% text zoom, narrow width, RTL, disabled/error/loading states, and both native and custom rendering paths. The trailing inset should visually belong to the same spacing rhythm as the leading content inset.
56
+
41
57
  Carbon's grid guidance uses consistent mini-unit multiples, key lines, fixed padding within breakpoints, and type aligned to box padding. Apply the principle through the project's own grid rather than copying Carbon's exact values.
42
58
 
43
59
  ## 3. Reuse before invention
@@ -65,6 +81,14 @@ Default motion behavior:
65
81
  - Avoid animating layout properties such as `width`, `height`, `top`, and `left` unless spatial change is the meaning and performance is verified.
66
82
  - Keep focus indication immediate and visible. A transition must never delay awareness of keyboard focus.
67
83
 
84
+ ### No sticky pointer focus
85
+
86
+ Pointer focus must not masquerade as a persistent selected, active, or error state. Clicking or tapping a control, native select, combobox, card, or focusable container must not leave a focus ring, highlighted border, shadow, background, or ancestor `:focus-within` treatment stuck after activation, popup dismissal, or a click elsewhere. A genuine selected, expanded, validation, or drag state may persist, but it must use its own semantics and styling rather than an accidental focus treatment.
87
+
88
+ Prefer `:focus-visible` where it behaves correctly. For native controls or browser quirks that expose focus-visible after pointer activation, track the input modality locally and suppress only the pointer-originated focus treatment. Never solve this with a global `outline: none`, by hiding all focus, or by blurring controls in a way that breaks keyboard operation; keyboard-originated focus must remain immediate, visible, correctly ordered, and restored after overlays.
89
+
90
+ Test mouse and touch activation separately from Tab and Shift+Tab. Include opening and dismissing native dropdowns, selecting an option, clicking non-focusable blank space, clicking the next control, closing overlays, and switching back to keyboard navigation. No pointer-only highlight may remain after its interaction context ends.
91
+
68
92
  Reuse existing motion tokens first. If none exist, begin with these restrained bands, then tune by component size and distance:
69
93
 
70
94
  | Role | Typical duration | Use |
@@ -130,6 +154,14 @@ Never use faint light-gray text on white, faint dark-gray text on black, or low-
130
154
  - Aim above the minimum for small, thin, long-form, or mission-critical text. Verify computed colors rather than judging from a screenshot alone.
131
155
  - Do not use color as the only status cue. Pair color with text, shape, icon, or pattern.
132
156
 
157
+ ### No soft semantic tint-on-tint
158
+
159
+ Do not default badges, buttons, toasts, alerts, cards, selected states, status rows, or icon medallions to the familiar `soft`, `subtle`, `surface`, or `tonal` formula: a low-opacity red, green, amber, blue, or purple background paired with saturated same-hue text or icons, often finished with a same-hue border. The border is optional; the same-hue tinted surface plus same-hue foreground is the rejected pattern.
160
+
161
+ Choose the replacement from the product's existing aesthetic and the component's role. Viable directions include a neutral surface with an isolated semantic icon, dot, or edge; a solid semantic fill with neutral high-contrast text; monochrome treatment; a product accent; plain typography; or another coherent local material model. These are options, not a new house style. Preserve hierarchy, measured contrast, and a non-color cue for status.
162
+
163
+ Retain tint-on-tint only when the user explicitly asks for it or exact reuse of an established design-system variant is required by scope. Existing examples are evidence to inspect, not permission to spread the treatment into new component families.
164
+
133
165
  ## 7. Consistency and flow
134
166
 
135
167
  A polished interface feels like one system from section to section, component to component, and page to page.
@@ -163,5 +195,6 @@ Before calling UI work complete, verify:
163
195
  - reduced motion preserves state meaning;
164
196
  - typography is intentional, loaded efficiently, and stable during fallback;
165
197
  - all text and meaningful non-text contrast is measured;
198
+ - no soft semantic tint-on-tint treatment was introduced without an explicit user request or required existing-system match;
166
199
  - repeated navigation/actions remain consistent across sections and pages;
167
200
  - generated UI copy contains no em dashes unless explicitly allowed.
@@ -3,7 +3,7 @@
3
3
  ## Contents
4
4
 
5
5
  1. Semantics and interaction architecture
6
- 2. Accessibility beyond contrast
6
+ 2. WCAG and ADA accessibility conformance
7
7
  3. Forms, errors, and user control
8
8
  4. Responsive and international resilience
9
9
  5. Performance and visual stability
@@ -24,24 +24,38 @@ This is a binding, pass/fail quality floor for implemented web and native UI. Ap
24
24
  - Modal work uses the platform dialog primitive when suitable; non-modal top-layer content uses the Popover API when suitable. Manage initial focus, containment for modal UI, Escape/close behavior, background inertness, and focus return. A popover does not automatically supply menu or dialog semantics.
25
25
  - Preserve browser and platform navigation. Meaningful destinations and shareable state need stable URLs or routes; Back, Forward, refresh, deep links, and native back behavior must not discard work or trap the user.
26
26
 
27
- ## 2. Accessibility beyond contrast
27
+ ## 2. WCAG and ADA accessibility conformance
28
28
 
29
- WCAG 2.2 Level AA is the web conformance floor. Project, platform, legal, or contractual requirements may be stricter.
29
+ WCAG 2.2 Level AA is the default technical floor for web UI. Conformance means every applicable Level A and Level AA success criterion across full pages, complete processes, responsive variants, and all relevant states, not a selected checklist of visible issues. Native apps apply WCAG2ICT where relevant plus current platform accessibility requirements. Any stricter project, procurement, contract, platform, or jurisdiction requirement wins.
30
30
 
31
- - Keep a visible focus indicator and ensure sticky headers, footers, cookie bars, drawers, and overlays do not obscure the focused control.
31
+ ADA is a civil-rights and equal-access obligation, not a technical certification. WCAG 2.2 Level AA is the engineering baseline, but meeting it does not by itself establish full ADA compliance. When ADA applies, verify the current Title II or Title III obligations, scope, exceptions, effective-communication duties, and alternative arrangements with the responsible product or legal owner. Never claim `ADA compliant` or `WCAG conformant` without evidence for a defined scope.
32
+
33
+ - Define the conformance scope before broad implementation: routes/screens, complete user processes, content types, components and states, supported technologies, and the browser, device, input, and assistive-technology matrix. Audit against the current official [WCAG 2.2 Quick Reference](https://www.w3.org/WAI/WCAG22/quickref/), criterion by criterion; this summary is not a substitute. Track every applicable Level A and AA criterion as pass, fail, or not applicable with a rationale and evidence.
34
+ - Satisfy all five WCAG conformance requirements: the claimed level, full pages, every page in each complete process, only accessibility-supported uses of technology, and non-interference from any non-conforming content. One unresolved applicable failure blocks conformance.
35
+ - Use native semantics and controls first. Supply meaningful text alternatives for informative images, controls, and graphics; mark decoration as decorative. Preserve programmatic information and relationships, headings, landmarks, lists, tables, meaningful sequence, page and passage language, reading order, and a bypass route for repeated blocks.
36
+ - Provide the required alternatives for every prerecorded or live media type, including synchronized captions, transcripts or equivalent alternatives, and audio description where the criterion requires it. Autoplaying audio needs an immediate pause, stop, or independent volume control. Do not use images of text when styled real text can communicate the same information.
37
+ - Give every page or screen a descriptive title. Link purpose must be clear in context; headings and labels describe topic or purpose; users have more than one way to locate pages when required. Keep repeated navigation, component identification, and help mechanisms consistent.
38
+ - Every function works by keyboard without a trap or timing race. Focus order follows meaning; focus is visible, not obscured, and restored after overlays. Keyboard shortcuts, character-key commands, and custom composite widgets follow the applicable WCAG and WAI-ARIA keyboard requirements.
39
+ - Pointer activation, native popup dismissal, and clicks elsewhere must not leave a focus ring, highlighted border, shadow, background, or container focus treatment stuck as a false selected or active state. Distinguish pointer from keyboard focus and distinguish focus from genuine selected, expanded, and error states; never suppress visible keyboard focus globally.
40
+ - Meet WCAG 2.2 contrast and appearance criteria in every theme and state: at least 4.5:1 for normal text, 3:1 for large text, and 3:1 for meaningful non-text controls, state indicators, focus cues, and graphics where the criterion applies. Never use color, shape, position, sound, motion, or another single sensory cue as the only instruction or status signal.
41
+ - Content revealed by hover or focus must be dismissible, hoverable, and persistent where required. Text spacing overrides must not break content. Audio, animation, and visual effects cannot make text unreadable or block operation.
32
42
  - WCAG 2.2 Target Size (Minimum) is 24 by 24 CSS pixels with defined exceptions. Default touch-oriented web controls to a 44 by 44 CSS-pixel hit area where layout permits. Native work follows its platform target guidance, such as 44 by 44 points on Apple platforms and 48 by 48 density-independent pixels in Material guidance.
33
- - Provide a single-pointer alternative for every non-essential drag interaction. Reordering also needs keyboard and assistive-technology operation.
34
- - Do not require users to re-enter information already supplied in the same process when it can be selected or populated. Preserve data across validation errors and recoverable navigation.
35
- - Authentication must work with password managers, copy/paste, and accessible alternatives. Do not make memory, transcription, puzzles, or blocked paste the only route unless an applicable exception is verified.
36
- - Announce important asynchronous status and validation changes without moving focus unnecessarily. Do not rely on color, motion, position, or an icon alone to communicate meaning.
37
- - Verify text resizing to 200%, reflow at 320 CSS pixels where WCAG applies, keyboard operation, reduced motion, and forced-colors/high-contrast behavior.
43
+ - Provide a single-pointer alternative for every non-essential drag interaction. Reordering also needs keyboard and assistive-technology operation. Do not require path-based gestures, multipoint gestures, or device motion when a simpler accessible input can perform the task. Support pointer cancellation, and ensure an accessible name contains the visible label so speech-input users can target the control.
44
+ - Give every control a programmatic name that includes its visible label, and expose role, value, state, instructions, requirements, and errors correctly. Announce important asynchronous status and validation changes without moving focus unnecessarily. Do not over-announce streaming or frequently updating content.
45
+ - Do not trigger an unexpected context change merely on focus or input. Identify common input purposes programmatically, make required fields and formats explicit, identify errors in text, suggest corrections when known, and prevent or confirm consequential legal, financial, test, and data changes where WCAG requires it.
46
+ - Preserve use at 200% text resize and at 320 CSS-pixel reflow where WCAG applies, without loss, overlap, two-dimensional scrolling except for allowed content, or essential truncation. Support required orientation, browser zoom, text spacing, reduced motion, forced colors/high contrast, and user font or platform text scaling.
47
+ - Users can pause, stop, hide, extend, or adjust time limits and moving, blinking, auto-updating, or autoplaying content where required. Do not ship content that violates flash thresholds. Reduced-motion alternatives preserve information and task completion.
48
+ - Do not require users to re-enter information already supplied in the same process when it can be selected or populated. Preserve data across validation errors and recoverable navigation. Authentication must work with password managers, copy/paste, and accessible alternatives; memory, transcription, puzzles, or blocked paste cannot be the only route unless an applicable exception is verified.
49
+ - Include first-party, embedded, vendor-supplied, document/PDF, and authenticated content in scope unless a verified legal and standards exception applies. An exception does not erase ADA duties for effective communication, reasonable modification, or equal access; route those decisions to the responsible legal or product owner.
50
+ - Accessibility overlays, injected widgets, and a separate `accessible version` do not substitute for fixing the primary experience. Use an alternate route only when the governing standard and law permit it and it provides genuinely equivalent, current information and functionality. Provide a discoverable way to report accessibility barriers when the product has a public support or feedback surface.
38
51
 
39
- Automated accessibility tooling is a defect detector, not proof of conformance. Manual keyboard, focus, zoom/reflow, and assistive-technology checks remain required for relevant flows.
52
+ Automated accessibility tooling is a defect detector, not proof of conformance. Run the project's scanner, then manually verify semantics, keyboard use, focus, zoom/reflow, contrast, media alternatives, and representative assistive-technology output across the primary flow and high-risk states. Record the tested tool/browser/assistive-technology combinations. Unavailable checks remain `unverified`, never silently pass, and block a conformance claim.
40
53
 
41
54
  ## 3. Forms, errors, and user control
42
55
 
43
56
  - Every control has a persistent programmatic label. Associate help, units, requirements, and errors with the field; placeholder text is an example, never the only label.
44
57
  - Use the correct input type, `autocomplete`, `inputmode`, and semantic grouping. Keep browser autofill, password-manager, paste, and native validation affordances working unless the product has a verified reason to replace them.
58
+ - Select, dropdown, and combobox indicators must have a deliberate logical trailing inset and reserved content padding for the icon width and gap. They fail when the indicator touches the edge, overlaps text or adjacent actions, duplicates the native indicator, or creates a dead pointer zone; verify long values, narrow widths, zoom, and RTL.
45
59
  - Validate at a helpful time. Do not show errors before the user can reasonably act. On submit, summarize errors when the form is long, focus or link to the first problem, preserve values, and explain how to recover.
46
60
  - Async actions expose pending, success, failure, retry, and duplicate-submission behavior. Do not silently lose work or replace the whole layout with a spinner.
47
61
  - Match safeguards to consequence. Prefer undo for cheap reversible actions; use explicit confirmation for destructive, expensive, security-sensitive, or irreversible actions. State the object and consequence in concrete language.
@@ -49,6 +63,7 @@ Automated accessibility tooling is a defect detector, not proof of conformance.
49
63
  ## 4. Responsive and international resilience
50
64
 
51
65
  - Use viewport queries for page composition and container queries for reusable components when the support policy permits. Use Grid, Flexbox, and `subgrid` to maintain key lines instead of JavaScript layout or breakpoint-specific duplication.
66
+ - Navigation, header, main content, adjacent sections, and footer must reuse a shared content rail, responsive gutters, and spacing tokens by default. Full-bleed outer surfaces may differ, but inner edges must align. Any width, offset, margin, or padding exception needs an explicit content or user reason and must remain coherent at every breakpoint.
52
67
  - Prefer logical properties and flow-relative alignment. Declare document language and direction, use locale-aware number/date/plural formatting, and avoid sentence construction by string concatenation.
53
68
  - Test right-to-left layout when localization is relevant, long German-like expansion, short labels, CJK text, long unbroken values, dynamic type or 200% text, and missing media. Essential content must not depend on truncation.
54
69
  - Account for safe areas, on-screen keyboards, dynamic viewport units, orientation, window resizing, no-hover input, coarse pointers, and split-screen or large-screen layouts where the platform can expose them.
@@ -75,6 +90,7 @@ For web surfaces, use current Core Web Vitals as the shared target at the 75th p
75
90
  ## 7. Tokens and component contracts
76
91
 
77
92
  - Reuse the host system first. For a net-new scalable system, separate primitive values from semantic roles and component tokens; define modes without duplicating meaning.
93
+ - Do not introduce soft semantic tint-on-tint as the default status variant: low-opacity semantic backgrounds paired with saturated same-hue text or icons, with or without matching borders. Derive a replacement from the host aesthetic and preserve non-color status cues; retain the treatment only when explicitly requested or exact established-system reuse is required.
78
94
  - The Design Tokens Community Group 2025.10 format is a stable interoperability option, not a W3C Standard and not a mandatory migration target. Use it only when tools need a portable source of truth.
79
95
  - Each shared component documents anatomy, semantic element, variants, sizes, content limits, states, keyboard behavior, responsive behavior, and accessibility name/description rules.
80
96
  - Keep one source of truth. Generated platform outputs must not become competing hand-edited token stores.
@@ -107,14 +123,18 @@ For web surfaces, use current Core Web Vitals as the shared target at the 75th p
107
123
 
108
124
  For every broad implementation, record:
109
125
 
110
- 1. representative desktop and narrow/mobile renders, plus native/adaptive sizes when applicable;
111
- 2. primary-flow keyboard completion, visible focus, focus return, and no obscured focus;
112
- 3. project accessibility-tool output plus manual semantics and status review;
113
- 4. 200% text, 320 CSS-pixel reflow where applicable, longest content, and one localization stress case;
114
- 5. reduced-motion and forced-colors/high-contrast results where supported;
115
- 6. loading, empty, error, retry, disabled, success, destructive, and offline/slow-network states that apply;
116
- 7. route, refresh, deep-link, Back/Forward or native-back behavior that applies;
117
- 8. measured performance evidence or an explicit unverified item with the exact missing measurement;
118
- 9. the project's supported browser, device, and input matrix.
119
-
120
- A small component records only applicable evidence, but semantics, keyboard/focus, content extremes, and relevant states cannot be skipped. Report contract failures plainly and fix them before calling broad UI work complete.
126
+ 1. the defined accessibility conformance scope plus a WCAG 2.2 Level A/AA criterion matrix or an explicit changed-scope audit with pass, fail, and justified not-applicable results;
127
+ 2. representative desktop and narrow/mobile renders, plus native/adaptive sizes when applicable;
128
+ 3. primary-flow keyboard completion, visible focus, focus return, no traps, and no obscured focus;
129
+ 4. project accessibility-tool output plus manual semantics, accessible-name, reading-order, media-alternative, and status review;
130
+ 5. primary-flow output from at least one representative screen-reader or native assistive-technology combination in the supported matrix;
131
+ 6. 200% text, 320 CSS-pixel reflow where applicable, browser zoom or platform text scaling, longest content, and one localization stress case;
132
+ 7. reduced-motion and forced-colors/high-contrast results where supported;
133
+ 8. loading, empty, error, retry, disabled, success, destructive, and offline/slow-network states that apply;
134
+ 9. route, refresh, deep-link, Back/Forward or native-back behavior that applies;
135
+ 10. measured performance evidence or an explicit unverified item with the exact missing measurement;
136
+ 11. a first-party, embedded, vendor, document/PDF, and authenticated-content inventory with any exception and responsible owner recorded;
137
+ 12. the accessibility-feedback route and remediation owner when the product has a public support surface;
138
+ 13. the project's supported browser, device, input, and assistive-technology matrix.
139
+
140
+ A broad implementation is not complete while an applicable WCAG Level A or AA criterion is failed or unverified. A small component records only applicable evidence, but semantics, accessible naming, keyboard/focus, assistive-technology output, content extremes, and relevant states cannot be skipped. Report failures plainly and fix them before calling the UI accessible. Never turn partial evidence into an ADA-compliance or WCAG-conformance claim.
@@ -42,12 +42,14 @@ As fetched on 2026-07-13, [`styles.refero.design/robots.txt`](https://styles.ref
42
42
 
43
43
  Therefore this skill must not bulk-scrape Refero, call undocumented Refero endpoints, or mirror its catalog. Refero may be used only through an authorized Refero MCP or a user-provided export the user is entitled to share. Live access is optional; the skill works without it.
44
44
 
45
- ## Accessibility standards
45
+ ## Accessibility standards and ADA context
46
46
 
47
- - **Conformance floor:** [Web Content Accessibility Guidelines (WCAG) 2.2](https://www.w3.org/TR/WCAG22/), W3C Recommendation dated 12 December 2024 in the current W3C publication fetched 2026-07-13.
47
+ - **Web conformance floor:** [Web Content Accessibility Guidelines (WCAG) 2.2](https://www.w3.org/TR/WCAG22/), W3C Recommendation dated 12 December 2024 in the current publication fetched 2026-07-21. The [W3C WCAG overview](https://www.w3.org/WAI/standards-guidelines/wcag/) encourages the latest version and states that WCAG 2.2 conformance is backward compatible with WCAG 2.1 and 2.0.
48
+ - **Native application guidance:** [WCAG2ICT](https://www.w3.org/TR/wcag2ict-22/) explains how Level A and AA criteria apply to non-web software. It is informative guidance, not a normative standard, and native work still needs platform and product-specific accessibility requirements.
49
+ - **U.S. ADA context:** The Department of Justice [ADA web accessibility guidance](https://www.ada.gov/resources/web-guidance/) explains equal access and effective communication under Titles II and III. The current [Title II web and mobile app rule fact sheet](https://www.ada.gov/resources/2024-03-08-web-rule/) names WCAG 2.1 Level AA as its technical standard and documents scope, exceptions, and compliance timing. These sources were checked 2026-07-21.
48
50
  - **Not the conformance target:** [W3C Accessibility Guidelines (WCAG) 3.0](https://www.w3.org/TR/wcag-3.0/) is a W3C Working Draft dated 3 March 2026. W3C says publication as a Working Draft does not imply endorsement and that it is inappropriate to cite as anything other than work in progress.
49
51
 
50
- Project or jurisdictional requirements may exceed this floor. Use the current official standard and product-specific accessibility requirements at implementation time.
52
+ WCAG 2.2 Level AA is the default engineering floor because it includes and extends WCAG 2.1, but technical WCAG conformance alone does not prove compliance with the ADA or another law. Project, procurement, contractual, platform, and jurisdictional requirements may exceed this floor. Use the current official standard and obtain qualified product or legal review before making a legal-compliance claim.
51
53
 
52
54
  ## UI craft research checked 14 July 2026
53
55
 
@@ -68,11 +70,11 @@ The motion recommendations were also checked against the pinned local corpus. Se
68
70
 
69
71
  Refero content was not accessed for this update because no authorized Refero MCP or user-provided export was available. The existing Refero boundary remains unchanged.
70
72
 
71
- ## Production-practice research checked 14 July 2026
73
+ ## Production-practice research checked 21 July 2026
72
74
 
73
75
  The pass/fail contract in `references/production-contract.md` was checked against current primary guidance:
74
76
 
75
- - [What's New in WCAG 2.2](https://www.w3.org/WAI/standards-guidelines/wcag/new-in-22/) and the linked Understanding documents: focus not obscured, target size minimum, dragging alternatives, redundant entry, and accessible authentication;
77
+ - [WCAG 2.2](https://www.w3.org/TR/WCAG22/), its [conformance requirements](https://www.w3.org/TR/WCAG22/#conformance-reqs), [How to Meet WCAG 2](https://www.w3.org/WAI/WCAG22/quickref/), and [What's New in WCAG 2.2](https://www.w3.org/WAI/standards-guidelines/wcag/new-in-22/): all applicable Level A and AA criteria across full pages and complete processes, plus focus not obscured, target size minimum, dragging alternatives, redundant entry, and accessible authentication;
76
78
  - [WAI-ARIA Authoring Practices](https://www.w3.org/WAI/ARIA/apg/) and its dialog, menu button, combobox, and keyboard-interface patterns: native semantics first and complete keyboard/focus behavior for custom composites;
77
79
  - [WAI Forms Tutorial](https://www.w3.org/WAI/tutorials/forms/): labels, grouping, instructions, validation, notifications, and accessible custom controls;
78
80
  - the [WHATWG HTML Standard for dialog](https://html.spec.whatwg.org/multipage/interactive-elements.html#the-dialog-element) and [popover](https://html.spec.whatwg.org/multipage/popover.html), plus [MDN Popover API guidance](https://developer.mozilla.org/en-US/docs/Web/API/Popover_API): modal versus non-modal top-layer behavior and the semantics authors must still provide;
@@ -36,11 +36,11 @@ Maximum: **24 points**. Ship broad UI work only at **20/24 or higher**, with no
36
36
 
37
37
  ## 3. Composition
38
38
 
39
- - **0:** Layout breaks, clips, ignores shared key lines, or relies on arbitrary modules.
40
- - **1:** Grid is stable but generic, repetitive, or weakly related to content; some section edges or component geometry drift.
41
- - **2:** Scale, key lines, alignment, whitespace, and asymmetry/symmetry express content relationships and remain deliberate across viewports.
39
+ - **0:** Layout breaks, clips, ignores shared key lines, uses arbitrary modules, or lets navigation, header, main, section, and footer rails drift without a content reason.
40
+ - **1:** Grid is stable but generic, repetitive, or weakly related to content; some section edges, spacing tokens, or component geometry drift.
41
+ - **2:** Scale, shared content rails, key lines, alignment, whitespace, and asymmetry/symmetry express content relationships and remain deliberate across viewports.
42
42
 
43
- **Test:** Draw vertical and horizontal guides through major regions. Shared edges, baselines, dividers, and repeated component anatomy should align unless an exception communicates real hierarchy.
43
+ **Test:** Draw vertical and horizontal guides through navigation, header, main, repeated sections, and footer at every representative breakpoint. Full-bleed outer surfaces may differ, but their inner content edges must align by default. Compare repeated margins, padding, and gaps side by side; equal roles use equal tokens unless an exception communicates real hierarchy.
44
44
 
45
45
  ## 4. Consistency and flow
46
46
 
@@ -48,7 +48,7 @@ Maximum: **24 points**. Ship broad UI work only at **20/24 or higher**, with no
48
48
  - **1:** Most patterns repeat, but spacing cadence, icon treatment, controls, actions, or section transitions contain visible inconsistencies.
49
49
  - **2:** Existing primitives are reused; one icon family, spacing rhythm, component anatomy, navigation order, action placement, and surface logic carry through the full flow.
50
50
 
51
- **Test:** Compare adjacent sections and pages side by side. Trace one repeated action through every occurrence, then inspect container edges, control heights, icon weight, spacing, borders, labels, and state behavior.
51
+ **Test:** Compare adjacent sections and pages side by side. Trace one repeated action through every occurrence, then inspect container edges, control heights, icon weight, spacing, borders, labels, and state behavior. For selects, dropdowns, and comboboxes, verify the trailing icon has intentional edge inset and reserved text clearance at every size, in RTL, and with the longest plausible value. Flag any low-opacity semantic background paired with saturated same-hue text or icons; it fails unless the user requested it or exact established-system reuse is required.
52
52
 
53
53
  ## 5. Typography
54
54
 
@@ -72,7 +72,7 @@ Maximum: **24 points**. Ship broad UI work only at **20/24 or higher**, with no
72
72
  - **1:** Happy-path interaction works, but secondary states, feedback, timing, recovery, or layout continuity are generic or incomplete.
73
73
  - **2:** Relevant loading, empty, error, validation, retry, offline, focus, hover/press, selected, expanded, pending, disabled, destructive, and success states are coherent, preserve work and layout, and provide purposeful feedback.
74
74
 
75
- **Test:** Trigger each relevant state with realistic content length and failure wording. Confirm preservation, recovery, duplicate-submission behavior, status announcement, and that any transition improves continuity rather than decoration.
75
+ **Test:** Trigger each relevant state with realistic content length and failure wording. Confirm preservation, recovery, duplicate-submission behavior, status announcement, and that any transition improves continuity rather than decoration. Test pointer and keyboard focus separately, including native dropdown dismissal and clicks onto non-focusable space; no pointer-only highlight may stick, and keyboard focus must remain visible.
76
76
 
77
77
  ## 8. Responsive behavior
78
78
 
@@ -84,11 +84,11 @@ Maximum: **24 points**. Ship broad UI work only at **20/24 or higher**, with no
84
84
 
85
85
  ## 9. Accessibility quality floor
86
86
 
87
- - **0:** Keyboard path, focus, semantics, contrast, labels, icon meaning, status, drag-only operation, or target sizes block use.
88
- - **1:** Basics exist but focus order/visibility, text/non-text contrast, motion, icon labels, status cues, composite-widget behavior, forced colors, or assistive naming has gaps.
89
- - **2:** Native semantics or verified APG behavior, visible and unobscured focus, keyboard operation, meaningful labels/status, WCAG 2.2 target minimums with platform-appropriate touch targets, reduced motion, forced colors, text contrast of at least 4.5:1 (3:1 for large text), and meaningful non-text contrast of at least 3:1 are verified.
87
+ - **0:** Any applicable WCAG 2.2 Level A or AA criterion fails, or keyboard use, focus, semantics, contrast, labels, media alternatives, status, drag alternatives, target sizes, or assistive-technology output blocks use.
88
+ - **1:** Basics work, but the changed-scope criterion audit is incomplete or focus order/visibility, text/non-text contrast, motion, icon labels, status cues, composite-widget behavior, forced colors, zoom/reflow, media alternatives, or assistive-technology verification has gaps.
89
+ - **2:** The changed scope has evidence that every applicable WCAG 2.2 Level A and AA criterion passes. Native semantics or verified APG behavior, visible and unobscured focus, complete keyboard operation, meaningful names/instructions/status, media alternatives, target minimums, reduced motion, forced colors, 200% text and 320 CSS-pixel reflow where applicable, representative assistive-technology output, text contrast of at least 4.5:1 (3:1 for large text), and meaningful non-text contrast of at least 3:1 are verified.
90
90
 
91
- **Test:** Complete the primary task by keyboard; inspect accessible names and status; verify overlay focus and drag alternatives; measure text, icon, control, and focus contrast; run project accessibility tooling; test 200% text/reflow, `prefers-reduced-motion`, and forced colors; verify color is not the only cue.
91
+ **Test:** Audit every applicable Level A and AA criterion for the changed scope against the official WCAG Quick Reference and all five conformance requirements. Complete the primary task by keyboard and with a representative screen reader or native assistive technology. Inspect names, roles, values, status, reading order, page and passage language, titles, link purpose, multiple navigation paths, consistent help, text/media alternatives, images of text, hover/focus content, overlay focus, context changes, timing, forms and error prevention, pointer cancellation, and gesture/drag alternatives. Measure text, icon, control, state, and focus contrast; run project accessibility tooling; test 200% text, 320 CSS-pixel reflow, zoom or platform text scaling, `prefers-reduced-motion`, and forced colors. Record pass, fail, or justified not applicable. Automated output alone never earns a pass or supports an ADA-compliance or WCAG-conformance claim.
92
92
 
93
93
  ## 10. Motion purpose
94
94
 
@@ -0,0 +1,8 @@
1
+ import { type ChatAgentId } from "./chat-agents/index.js";
2
+ import { type RecentSession } from "./core/project-discovery.js";
3
+ export type SidecarSession = RecentSession & {
4
+ chatAgent?: ChatAgentId;
5
+ };
6
+ /** List coding or chat sessions using the caps exposed by the ezcoder-app sidecar. */
7
+ export declare function listSidecarSessions(cwd: string, requestedAgent: string | null, coderSessionsDir: string): Promise<SidecarSession[]>;
8
+ //# sourceMappingURL=app-sidecar-sessions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app-sidecar-sessions.d.ts","sourceRoot":"","sources":["../src/app-sidecar-sessions.ts"],"names":[],"mappings":"AAEA,OAAO,EAIL,KAAK,WAAW,EACjB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAsB,KAAK,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAKrF,MAAM,MAAM,cAAc,GAAG,aAAa,GAAG;IAAE,SAAS,CAAC,EAAE,WAAW,CAAA;CAAE,CAAC;AAEzE,sFAAsF;AACtF,wBAAsB,mBAAmB,CACvC,GAAG,EAAE,MAAM,EACX,cAAc,EAAE,MAAM,GAAG,IAAI,EAC7B,gBAAgB,EAAE,MAAM,GACvB,OAAO,CAAC,cAAc,EAAE,CAAC,CAgC3B"}
@@ -0,0 +1,31 @@
1
+ import fs from "node:fs/promises";
2
+ import { CHAT_AGENT_IDS, chatAgentSessionsDir, sessionsDirForChatAgent, } from "./chat-agents/index.js";
3
+ import { listRecentSessions } from "./core/project-discovery.js";
4
+ const CODING_SESSION_LIMIT = 5;
5
+ const CHAT_SESSION_LIMIT = 30;
6
+ /** List coding or chat sessions using the caps exposed by the ezcoder-app sidecar. */
7
+ export async function listSidecarSessions(cwd, requestedAgent, coderSessionsDir) {
8
+ if (requestedAgent !== "all") {
9
+ const sessionsDir = requestedAgent
10
+ ? sessionsDirForChatAgent(coderSessionsDir, requestedAgent)
11
+ : coderSessionsDir;
12
+ const sessionLimit = requestedAgent ? CHAT_SESSION_LIMIT : CODING_SESSION_LIMIT;
13
+ return listRecentSessions(cwd, sessionLimit, sessionsDir);
14
+ }
15
+ const groups = await Promise.all(CHAT_AGENT_IDS.map(async (agentId) => {
16
+ const sessions = await listRecentSessions(cwd, CHAT_SESSION_LIMIT, chatAgentSessionsDir(coderSessionsDir, agentId));
17
+ return sessions.map((session) => ({ ...session, chatAgent: agentId }));
18
+ }));
19
+ const dated = await Promise.all(groups.flat().map(async (session) => ({
20
+ session,
21
+ mtime: await fs
22
+ .stat(session.path)
23
+ .then((stat) => stat.mtimeMs)
24
+ .catch(() => 0),
25
+ })));
26
+ return dated
27
+ .sort((left, right) => right.mtime - left.mtime)
28
+ .slice(0, CHAT_SESSION_LIMIT)
29
+ .map(({ session }) => session);
30
+ }
31
+ //# sourceMappingURL=app-sidecar-sessions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app-sidecar-sessions.js","sourceRoot":"","sources":["../src/app-sidecar-sessions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAElC,OAAO,EACL,cAAc,EACd,oBAAoB,EACpB,uBAAuB,GAExB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,kBAAkB,EAAsB,MAAM,6BAA6B,CAAC;AAErF,MAAM,oBAAoB,GAAG,CAAC,CAAC;AAC/B,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAI9B,sFAAsF;AACtF,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACvC,GAAW,EACX,cAA6B,EAC7B,gBAAwB;I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SAC/C,KAAK,CAAC,CAAC,EAAE,kBAAkB,CAAC;SAC5B,GAAG,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC;AACnC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=app-sidecar-sessions.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app-sidecar-sessions.test.d.ts","sourceRoot":"","sources":["../src/app-sidecar-sessions.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,83 @@
1
+ import fs from "node:fs/promises";
2
+ import os from "node:os";
3
+ import path from "node:path";
4
+ import { afterEach, beforeEach, describe, expect, it } from "vitest";
5
+ import { chatAgentSessionsDir } from "./chat-agents/index.js";
6
+ import { listSidecarSessions } from "./app-sidecar-sessions.js";
7
+ import { encodeCwd } from "./core/encode-cwd.js";
8
+ import { archiveColdSession, archiveSessionPath } from "./core/session-storage.js";
9
+ async function writeSessions(sessionsRoot, cwd, prefix, count) {
10
+ const projectSessionsDir = path.join(sessionsRoot, encodeCwd(cwd));
11
+ await fs.mkdir(projectSessionsDir, { recursive: true });
12
+ for (let index = 0; index < count; index++) {
13
+ const timestamp = new Date(Date.now() + index * 1_000).toISOString();
14
+ const file = path.join(projectSessionsDir, `${prefix}-${index}.jsonl`);
15
+ const records = [
16
+ {
17
+ type: "session",
18
+ version: 2,
19
+ id: `${prefix}-${index}`,
20
+ conversationId: `${prefix}-${index}`,
21
+ timestamp,
22
+ cwd,
23
+ provider: "anthropic",
24
+ model: "claude-sonnet-5",
25
+ },
26
+ {
27
+ type: "message",
28
+ id: `${prefix}-message-${index}`,
29
+ timestamp,
30
+ message: { role: "user", content: `Session ${index}` },
31
+ },
32
+ ];
33
+ await fs.writeFile(file, records.map((record) => JSON.stringify(record)).join("\n") + "\n");
34
+ const modified = new Date(timestamp);
35
+ await fs.utimes(file, modified, modified);
36
+ }
37
+ }
38
+ describe("ezcoder-app sidecar session listings", () => {
39
+ let tmp;
40
+ let cwd;
41
+ let coderSessionsDir;
42
+ beforeEach(async () => {
43
+ tmp = await fs.mkdtemp(path.join(os.tmpdir(), "gg-sidecar-sessions-"));
44
+ cwd = path.join(tmp, "project");
45
+ coderSessionsDir = path.join(tmp, "sessions");
46
+ await fs.mkdir(cwd, { recursive: true });
47
+ });
48
+ afterEach(async () => {
49
+ await fs.rm(tmp, { recursive: true, force: true });
50
+ });
51
+ it("returns up to 30 chat sessions while coding remains capped at 5", async () => {
52
+ await writeSessions(coderSessionsDir, cwd, "coding", 31);
53
+ await writeSessions(chatAgentSessionsDir(coderSessionsDir, "general"), cwd, "chat", 31);
54
+ const codingSessions = await listSidecarSessions(cwd, null, coderSessionsDir);
55
+ const chatSessions = await listSidecarSessions(cwd, "all", coderSessionsDir);
56
+ expect(codingSessions).toHaveLength(5);
57
+ expect(codingSessions.map((session) => session.id)).toEqual([
58
+ "coding-30",
59
+ "coding-29",
60
+ "coding-28",
61
+ "coding-27",
62
+ "coding-26",
63
+ ]);
64
+ expect(chatSessions).toHaveLength(30);
65
+ expect(chatSessions[0]).toMatchObject({ id: "chat-30", chatAgent: "general" });
66
+ expect(chatSessions.at(-1)).toMatchObject({ id: "chat-1", chatAgent: "general" });
67
+ });
68
+ it("lists archived coding and chat sessions once despite their redirect counterparts", async () => {
69
+ const chatRoot = chatAgentSessionsDir(coderSessionsDir, "general");
70
+ await writeSessions(coderSessionsDir, cwd, "coding-archive", 1);
71
+ await writeSessions(chatRoot, cwd, "chat-archive", 1);
72
+ const codingPlain = path.join(coderSessionsDir, encodeCwd(cwd), "coding-archive-0.jsonl");
73
+ const chatPlain = path.join(chatRoot, encodeCwd(cwd), "chat-archive-0.jsonl");
74
+ await Promise.all([archiveColdSession(codingPlain), archiveColdSession(chatPlain)]);
75
+ const codingSessions = await listSidecarSessions(cwd, null, coderSessionsDir);
76
+ const chatSessions = await listSidecarSessions(cwd, "general", coderSessionsDir);
77
+ expect(codingSessions).toHaveLength(1);
78
+ expect(codingSessions[0]?.path).toBe(archiveSessionPath(codingPlain));
79
+ expect(chatSessions).toHaveLength(1);
80
+ expect(chatSessions[0]?.path).toBe(archiveSessionPath(chatPlain));
81
+ });
82
+ });
83
+ //# sourceMappingURL=app-sidecar-sessions.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app-sidecar-sessions.test.js","sourceRoot":"","sources":["../src/app-sidecar-sessions.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAErE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAEnF,KAAK,UAAU,aAAa,CAC1B,YAAoB,EACpB,GAAW,EACX,MAAc,EACd,KAAa;IAEb,MAAM,kBAAkB,GAAG,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;IACnE,MAAM,EAAE,CAAC,KAAK,CAAC,kBAAkB,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAExD,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC;QAC3C,MAAM,SAAS,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,KAAK,GAAG,KAAK,CAAC,CAAC,WAAW,EAAE,CAAC;QACrE,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,kBAAk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