@askrjs/cli 0.0.3 → 0.0.4

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 (287) hide show
  1. package/README.md +37 -0
  2. package/dist/add.d.ts +16 -0
  3. package/dist/add.js +33 -29
  4. package/dist/cli.d.ts +5 -0
  5. package/dist/cli.js +0 -2
  6. package/dist/create.d.ts +5 -0
  7. package/dist/create.js +104 -26
  8. package/dist/directory-swap-DWoHtx7C.js +35 -0
  9. package/dist/discovery-Difb7Y4G.js +0 -2
  10. package/dist/generate.d.ts +5 -0
  11. package/dist/generate.js +77 -12
  12. package/dist/is-direct-execution-Cdlr-ZUl.js +0 -2
  13. package/dist/openapi.d.ts +25 -0
  14. package/dist/openapi.js +44 -12
  15. package/dist/planner-VAj7qlxr.js +0 -2
  16. package/dist/range-YUs9eimn.js +0 -2
  17. package/dist/registry-CyrRHRG5.js +0 -2
  18. package/dist/skills/askr-ssr-ssg/SKILL.md +3 -1
  19. package/dist/{skills-Bh0mEhIx.js → skills-B7CbWur9.js} +89 -26
  20. package/dist/skills.d.ts +18 -0
  21. package/dist/skills.js +1 -1
  22. package/dist/specification-DXnDOC-0.js +0 -2
  23. package/dist/ssg-config.d.ts +41 -0
  24. package/dist/ssg-config.js +1 -0
  25. package/dist/ssg.d.ts +61 -0
  26. package/dist/ssg.js +360 -24
  27. package/dist/templates/full-stack/package.json +1 -1
  28. package/dist/templates/full-stack/src/server/action-registry.ts +0 -1
  29. package/dist/templates/full-stack/tsconfig.json +1 -1
  30. package/dist/templates/spa/package.json +2 -3
  31. package/dist/templates/spa/src/pages/app/_routes.tsx +2 -0
  32. package/dist/templates/spa/src/pages/public/_routes.tsx +2 -0
  33. package/dist/templates/spa/tsconfig.json +2 -1
  34. package/dist/templates/spa/vitest.config.ts +0 -4
  35. package/dist/templates/ssg/README.md +1 -1
  36. package/dist/templates/ssg/package.json +1 -1
  37. package/dist/templates/ssg/ssg.config.ts +7 -0
  38. package/dist/templates/ssg/tests/ssg-config.test.ts +2 -0
  39. package/dist/templates/ssg/tsconfig.json +2 -1
  40. package/dist/templates/ssg/vitest.config.ts +0 -4
  41. package/dist/templates/ssr/package.json +2 -2
  42. package/dist/templates/startkit/package.json +2 -2
  43. package/dist/templates/startkit/src/lib/mock-data.ts +17 -39
  44. package/dist/templates/startkit/tsconfig.json +2 -1
  45. package/dist/update.d.ts +41 -0
  46. package/dist/update.js +0 -2
  47. package/dist/writer-D8qe_7ud.js +0 -2
  48. package/package.json +13 -8
  49. package/dist/add.js.map +0 -1
  50. package/dist/cli.js.map +0 -1
  51. package/dist/create.js.map +0 -1
  52. package/dist/discovery-Difb7Y4G.js.map +0 -1
  53. package/dist/generate.js.map +0 -1
  54. package/dist/is-direct-execution-Cdlr-ZUl.js.map +0 -1
  55. package/dist/openapi.js.map +0 -1
  56. package/dist/planner-VAj7qlxr.js.map +0 -1
  57. package/dist/range-YUs9eimn.js.map +0 -1
  58. package/dist/registry-CyrRHRG5.js.map +0 -1
  59. package/dist/skills-Bh0mEhIx.js.map +0 -1
  60. package/dist/specification-DXnDOC-0.js.map +0 -1
  61. package/dist/ssg.js.map +0 -1
  62. package/dist/templates/full-stack/src/vite-server.d.ts +0 -5
  63. package/dist/templates/spa/src/styles.d.ts +0 -1
  64. package/dist/templates/ssg/src/vite-env.d.ts +0 -5
  65. package/dist/templates/ssr/src/vite-server.d.ts +0 -7
  66. package/dist/templates/startkit/src/vite-env.d.ts +0 -5
  67. package/dist/update.js.map +0 -1
  68. package/dist/writer-D8qe_7ud.js.map +0 -1
  69. package/skills/askr-accessibility/SKILL.md +0 -68
  70. package/skills/askr-accessibility/agents/openai.yaml +0 -4
  71. package/skills/askr-agent-execution/SKILL.md +0 -85
  72. package/skills/askr-agent-execution/agents/openai.yaml +0 -4
  73. package/skills/askr-agent-workflows/SKILL.md +0 -57
  74. package/skills/askr-agent-workflows/agents/openai.yaml +0 -4
  75. package/skills/askr-api-integration/SKILL.md +0 -79
  76. package/skills/askr-api-integration/agents/openai.yaml +0 -4
  77. package/skills/askr-app-builder/SKILL.md +0 -99
  78. package/skills/askr-app-builder/agents/openai.yaml +0 -4
  79. package/skills/askr-auth-access/SKILL.md +0 -74
  80. package/skills/askr-auth-access/agents/openai.yaml +0 -4
  81. package/skills/askr-cli-vite/SKILL.md +0 -76
  82. package/skills/askr-cli-vite/agents/openai.yaml +0 -4
  83. package/skills/askr-dashboard-charts/SKILL.md +0 -99
  84. package/skills/askr-dashboard-charts/agents/openai.yaml +0 -4
  85. package/skills/askr-design-system/SKILL.md +0 -86
  86. package/skills/askr-design-system/agents/openai.yaml +0 -4
  87. package/skills/askr-env-config/SKILL.md +0 -74
  88. package/skills/askr-env-config/agents/openai.yaml +0 -4
  89. package/skills/askr-error-loading-empty/SKILL.md +0 -89
  90. package/skills/askr-error-loading-empty/agents/openai.yaml +0 -4
  91. package/skills/askr-file-upload-artifacts/SKILL.md +0 -77
  92. package/skills/askr-file-upload-artifacts/agents/openai.yaml +0 -4
  93. package/skills/askr-forms-tables-crud/SKILL.md +0 -98
  94. package/skills/askr-forms-tables-crud/agents/openai.yaml +0 -4
  95. package/skills/askr-mental-model/SKILL.md +0 -109
  96. package/skills/askr-mental-model/agents/openai.yaml +0 -4
  97. package/skills/askr-migration-react/SKILL.md +0 -81
  98. package/skills/askr-migration-react/agents/openai.yaml +0 -4
  99. package/skills/askr-observability-debugging/SKILL.md +0 -83
  100. package/skills/askr-observability-debugging/agents/openai.yaml +0 -4
  101. package/skills/askr-project-structure/SKILL.md +0 -79
  102. package/skills/askr-project-structure/agents/openai.yaml +0 -4
  103. package/skills/askr-query-mutation/SKILL.md +0 -115
  104. package/skills/askr-query-mutation/agents/openai.yaml +0 -4
  105. package/skills/askr-realtime-streaming/SKILL.md +0 -76
  106. package/skills/askr-realtime-streaming/agents/openai.yaml +0 -4
  107. package/skills/askr-resources-data/SKILL.md +0 -100
  108. package/skills/askr-resources-data/agents/openai.yaml +0 -4
  109. package/skills/askr-routing-layouts/SKILL.md +0 -107
  110. package/skills/askr-routing-layouts/agents/openai.yaml +0 -4
  111. package/skills/askr-runtime-reactivity/SKILL.md +0 -92
  112. package/skills/askr-runtime-reactivity/agents/openai.yaml +0 -4
  113. package/skills/askr-ssr-ssg/SKILL.md +0 -76
  114. package/skills/askr-ssr-ssg/agents/openai.yaml +0 -4
  115. package/skills/askr-testing-determinism/SKILL.md +0 -75
  116. package/skills/askr-testing-determinism/agents/openai.yaml +0 -4
  117. package/skills/askr-theming/SKILL.md +0 -86
  118. package/skills/askr-theming/agents/openai.yaml +0 -4
  119. package/skills/askr-ui-composition/SKILL.md +0 -92
  120. package/skills/askr-ui-composition/agents/openai.yaml +0 -4
  121. package/templates/full-stack/AGENTS.md +0 -11
  122. package/templates/full-stack/README.md +0 -17
  123. package/templates/full-stack/gitignore.template +0 -4
  124. package/templates/full-stack/index.html +0 -13
  125. package/templates/full-stack/package.json +0 -39
  126. package/templates/full-stack/server.ts +0 -9
  127. package/templates/full-stack/src/action-authorizations.ts +0 -10
  128. package/templates/full-stack/src/actions/create-message.ts +0 -10
  129. package/templates/full-stack/src/i18n.ts +0 -8
  130. package/templates/full-stack/src/main.tsx +0 -11
  131. package/templates/full-stack/src/pages/home.tsx +0 -25
  132. package/templates/full-stack/src/pages/layout.tsx +0 -43
  133. package/templates/full-stack/src/pages/not-found.tsx +0 -7
  134. package/templates/full-stack/src/routes.tsx +0 -19
  135. package/templates/full-stack/src/schemas.ts +0 -10
  136. package/templates/full-stack/src/server/action-registry.ts +0 -8
  137. package/templates/full-stack/src/server/actions/create-message.ts +0 -14
  138. package/templates/full-stack/src/server/app.ts +0 -76
  139. package/templates/full-stack/src/server/dependencies.ts +0 -55
  140. package/templates/full-stack/src/server/entry-server.ts +0 -8
  141. package/templates/full-stack/src/telemetry.ts +0 -3
  142. package/templates/full-stack/src/vite-server.d.ts +0 -5
  143. package/templates/full-stack/tests/actions/create-message.test.ts +0 -12
  144. package/templates/full-stack/tsconfig.json +0 -15
  145. package/templates/full-stack/vite.config.ts +0 -10
  146. package/templates/spa/AGENTS.md +0 -60
  147. package/templates/spa/README.md +0 -96
  148. package/templates/spa/gitignore.template +0 -16
  149. package/templates/spa/index.html +0 -13
  150. package/templates/spa/package.json +0 -35
  151. package/templates/spa/src/adapters/operations-client.ts +0 -95
  152. package/templates/spa/src/components/shared/metric-card.tsx +0 -27
  153. package/templates/spa/src/components/shared/status-badge.tsx +0 -24
  154. package/templates/spa/src/features/operations/operations.query.ts +0 -9
  155. package/templates/spa/src/main.tsx +0 -10
  156. package/templates/spa/src/pages/_layout.tsx +0 -9
  157. package/templates/spa/src/pages/_routes.tsx +0 -27
  158. package/templates/spa/src/pages/app/_layout.tsx +0 -94
  159. package/templates/spa/src/pages/app/_routes.tsx +0 -10
  160. package/templates/spa/src/pages/app/admin-home.tsx +0 -170
  161. package/templates/spa/src/pages/app/agent-runs.tsx +0 -93
  162. package/templates/spa/src/pages/app/settings.tsx +0 -91
  163. package/templates/spa/src/pages/auth/_layout.tsx +0 -38
  164. package/templates/spa/src/pages/auth/_routes.tsx +0 -6
  165. package/templates/spa/src/pages/auth/login.tsx +0 -63
  166. package/templates/spa/src/pages/not-found.tsx +0 -22
  167. package/templates/spa/src/pages/public/_layout.tsx +0 -47
  168. package/templates/spa/src/pages/public/_routes.tsx +0 -6
  169. package/templates/spa/src/pages/public/home.tsx +0 -143
  170. package/templates/spa/src/shared/format.ts +0 -12
  171. package/templates/spa/src/shared/navigation.ts +0 -15
  172. package/templates/spa/src/styles/components.css +0 -49
  173. package/templates/spa/src/styles/layout.css +0 -192
  174. package/templates/spa/src/styles/reset.css +0 -44
  175. package/templates/spa/src/styles/theme.css +0 -57
  176. package/templates/spa/src/styles/tokens.css +0 -20
  177. package/templates/spa/src/styles.css +0 -7
  178. package/templates/spa/src/styles.d.ts +0 -1
  179. package/templates/spa/tests/app.test.tsx +0 -37
  180. package/templates/spa/tests/components/shared.test.tsx +0 -12
  181. package/templates/spa/tests/resources.test.ts +0 -22
  182. package/templates/spa/tsconfig.json +0 -20
  183. package/templates/spa/tsconfig.node.json +0 -10
  184. package/templates/spa/vite.config.ts +0 -24
  185. package/templates/spa/vitest.config.ts +0 -17
  186. package/templates/ssg/AGENTS.md +0 -55
  187. package/templates/ssg/README.md +0 -39
  188. package/templates/ssg/gitignore.template +0 -17
  189. package/templates/ssg/index.html +0 -13
  190. package/templates/ssg/package.json +0 -35
  191. package/templates/ssg/src/app.tsx +0 -14
  192. package/templates/ssg/src/components/badge.tsx +0 -3
  193. package/templates/ssg/src/components/counter.tsx +0 -30
  194. package/templates/ssg/src/components/site-shell.tsx +0 -111
  195. package/templates/ssg/src/jsx.d.ts +0 -23
  196. package/templates/ssg/src/main.tsx +0 -8
  197. package/templates/ssg/src/pages/about.tsx +0 -82
  198. package/templates/ssg/src/pages/content.tsx +0 -63
  199. package/templates/ssg/src/pages/example.tsx +0 -97
  200. package/templates/ssg/src/pages/home.tsx +0 -51
  201. package/templates/ssg/src/resources/user.ts +0 -15
  202. package/templates/ssg/src/routes.tsx +0 -15
  203. package/templates/ssg/src/styles.css +0 -89
  204. package/templates/ssg/src/vite-env.d.ts +0 -5
  205. package/templates/ssg/ssg.config.ts +0 -34
  206. package/templates/ssg/tests/app.test.tsx +0 -19
  207. package/templates/ssg/tests/components/counter.test.tsx +0 -18
  208. package/templates/ssg/tests/resources.test.ts +0 -11
  209. package/templates/ssg/tests/ssg-config.test.ts +0 -11
  210. package/templates/ssg/tsconfig.json +0 -20
  211. package/templates/ssg/tsconfig.node.json +0 -10
  212. package/templates/ssg/vite.config.ts +0 -24
  213. package/templates/ssg/vitest.config.ts +0 -17
  214. package/templates/ssr/AGENTS.md +0 -28
  215. package/templates/ssr/README.md +0 -38
  216. package/templates/ssr/gitignore.template +0 -16
  217. package/templates/ssr/index.html +0 -13
  218. package/templates/ssr/package.json +0 -34
  219. package/templates/ssr/server.ts +0 -10
  220. package/templates/ssr/src/app.tsx +0 -21
  221. package/templates/ssr/src/components/counter.tsx +0 -26
  222. package/templates/ssr/src/entry-server.tsx +0 -12
  223. package/templates/ssr/src/main.tsx +0 -11
  224. package/templates/ssr/src/pages/about.tsx +0 -75
  225. package/templates/ssr/src/pages/example.tsx +0 -113
  226. package/templates/ssr/src/pages/home.tsx +0 -56
  227. package/templates/ssr/src/resources/user.ts +0 -15
  228. package/templates/ssr/src/routes.tsx +0 -13
  229. package/templates/ssr/src/styles.css +0 -148
  230. package/templates/ssr/src/vite-server.d.ts +0 -7
  231. package/templates/ssr/tests/app.test.tsx +0 -24
  232. package/templates/ssr/tests/components/counter.test.tsx +0 -13
  233. package/templates/ssr/tests/resources.test.ts +0 -11
  234. package/templates/ssr/tsconfig.json +0 -22
  235. package/templates/ssr/tsconfig.node.json +0 -10
  236. package/templates/ssr/tsconfig.server.json +0 -15
  237. package/templates/ssr/vite.config.ts +0 -25
  238. package/templates/ssr/vitest.config.ts +0 -13
  239. package/templates/startkit/AGENTS.md +0 -77
  240. package/templates/startkit/README.md +0 -192
  241. package/templates/startkit/gitignore.template +0 -16
  242. package/templates/startkit/index.html +0 -13
  243. package/templates/startkit/package.json +0 -35
  244. package/templates/startkit/src/components/app-header.tsx +0 -93
  245. package/templates/startkit/src/components/app-sidebar.tsx +0 -95
  246. package/templates/startkit/src/components/data-table.tsx +0 -80
  247. package/templates/startkit/src/components/empty-state.tsx +0 -13
  248. package/templates/startkit/src/components/page-header.tsx +0 -23
  249. package/templates/startkit/src/components/stat-card.tsx +0 -24
  250. package/templates/startkit/src/features/accounts/account-filters.tsx +0 -61
  251. package/templates/startkit/src/features/accounts/account-table.tsx +0 -79
  252. package/templates/startkit/src/lib/format.ts +0 -31
  253. package/templates/startkit/src/lib/mock-data.ts +0 -441
  254. package/templates/startkit/src/lib/routes.ts +0 -116
  255. package/templates/startkit/src/main.tsx +0 -12
  256. package/templates/startkit/src/pages/_layout.tsx +0 -56
  257. package/templates/startkit/src/pages/auth/_layout.tsx +0 -7
  258. package/templates/startkit/src/pages/auth/login.tsx +0 -129
  259. package/templates/startkit/src/pages/home.tsx +0 -83
  260. package/templates/startkit/src/pages/not-found.tsx +0 -24
  261. package/templates/startkit/src/pages/workspace/_layout.tsx +0 -17
  262. package/templates/startkit/src/pages/workspace/accounts/index.tsx +0 -217
  263. package/templates/startkit/src/pages/workspace/dashboard.tsx +0 -118
  264. package/templates/startkit/src/pages/workspace/settings.tsx +0 -218
  265. package/templates/startkit/src/router.tsx +0 -7
  266. package/templates/startkit/src/routes/auth-config.ts +0 -38
  267. package/templates/startkit/src/routes/auth.ts +0 -8
  268. package/templates/startkit/src/routes/index.ts +0 -28
  269. package/templates/startkit/src/routes/public.ts +0 -8
  270. package/templates/startkit/src/routes/workspace/accounts.ts +0 -8
  271. package/templates/startkit/src/routes/workspace/index.ts +0 -14
  272. package/templates/startkit/src/styles/components.css +0 -396
  273. package/templates/startkit/src/styles/layout.css +0 -192
  274. package/templates/startkit/src/styles/reset.css +0 -38
  275. package/templates/startkit/src/styles/theme.css +0 -76
  276. package/templates/startkit/src/styles/tokens.css +0 -67
  277. package/templates/startkit/src/styles.css +0 -7
  278. package/templates/startkit/src/toast.ts +0 -55
  279. package/templates/startkit/src/utils/join-classes.ts +0 -4
  280. package/templates/startkit/src/vite-env.d.ts +0 -5
  281. package/templates/startkit/tests/app.test.tsx +0 -32
  282. package/templates/startkit/tests/preferences.test.ts +0 -43
  283. package/templates/startkit/tests/resources.test.ts +0 -82
  284. package/templates/startkit/tsconfig.json +0 -20
  285. package/templates/startkit/tsconfig.node.json +0 -10
  286. package/templates/startkit/vite.config.ts +0 -32
  287. package/templates/startkit/vitest.config.ts +0 -13
@@ -1,68 +0,0 @@
1
- ---
2
- name: askr-accessibility
3
- description: Use when making Askr UI accessible, including keyboard flows, focus management, ARIA names, dialogs, menus, forms, tables, live regions, screen-reader behavior, and @askrjs/ui primitive selection.
4
- ---
5
-
6
- # Askr Accessibility
7
-
8
- Use this for accessibility-sensitive UI or when composing interactive primitives. The goal is predictable keyboard flow, visible and announced state changes, and reuse of primitives that already own behavior.
9
-
10
- ## Use This When
11
-
12
- - The surface includes dialogs, menus, forms, tables, or other interactive controls.
13
- - Focus management, keyboard flow, or screen-reader behavior matters to the task.
14
- - Async status, stale state, or destructive confirmation must be announced clearly.
15
- - You need to review whether a UI change stayed accessible after composition or theming work.
16
-
17
- ## Inspect First
18
-
19
- - Existing `@askrjs/ui` primitive usage
20
- - Labels, accessible names, focus order, and keyboard behavior
21
- - Form errors, async status messages, and destructive confirmations
22
- - Browser tests for overlays, menus, forms, and tables
23
-
24
- ## Do This In Order
25
-
26
- 1. Prefer `@askrjs/ui` for behavior-heavy controls before raw HTML.
27
- 2. Make sure every interactive control has an accessible name.
28
- 3. Keep dialog, menu, and overlay focus behavior predictable.
29
- 4. Make form errors, async failures, and important status changes visible and announceable.
30
- 5. Check that stale, selected, pending, and error states are not color-only.
31
-
32
- ## Copy This Shape
33
-
34
- ```tsx
35
- <Show when={mutation.error}>
36
- <p role="alert">Unable to save changes.</p>
37
- </Show>
38
-
39
- <button aria-label="Archive account">Archive</button>
40
- ```
41
-
42
- ## Never Do These
43
-
44
- - Reimplementing primitive keyboard behavior.
45
- - Icon-only buttons without labels.
46
- - Focus loss after route changes, dialogs, or list updates.
47
- - Color-only error, stale, selected, or pending states.
48
- - Toast-only critical errors.
49
-
50
- ## Validate
51
-
52
- - Keyboard-only users can complete the workflow.
53
- - Focus lands in the expected place after navigation, dialog open or close, and submit.
54
- - Axe or equivalent accessibility checks pass for changed surfaces when available.
55
- - Browser tests cover complex focus and keyboard behavior.
56
-
57
- ## Done When
58
-
59
- - Keyboard, focus, and naming behavior are predictable.
60
- - Important async and failure states are announced or visible semantically.
61
- - The surface does not depend on color alone to communicate state.
62
- - Accessibility behavior is verified at the right test level.
63
-
64
- ## Handoff
65
-
66
- - Use `askr-ui-composition` when the hard part is primitive behavior composition.
67
- - Use `askr-error-loading-empty` when async state truth is the blocker.
68
- - Use `askr-testing-determinism` before closing browser-level accessibility changes.
@@ -1,4 +0,0 @@
1
- interface:
2
- display_name: "Askr Accessibility"
3
- short_description: "Make Askr UI accessible and usable"
4
- default_prompt: "Use $askr-accessibility to review or build accessible UI."
@@ -1,85 +0,0 @@
1
- ---
2
- name: askr-agent-execution
3
- description: Use when an AI coding agent needs the canonical execution playbook for reading an Askr repo, choosing the right skill, validating work, and avoiding invented primitives or foreign framework defaults.
4
- ---
5
-
6
- # Askr Agent Execution
7
-
8
- Use this before any edit in an Askr repo. This is the execution loop that every other Askr skill assumes.
9
-
10
- ## Use This When
11
-
12
- - Starting a new task.
13
- - The right Askr skill is not obvious yet.
14
- - You need a fixed read order before editing.
15
- - You need objective done criteria.
16
-
17
- ## Read In This Order
18
-
19
- 1. `package.json`
20
- 2. `AGENTS.md` when it exists
21
- 3. `src/main.tsx`
22
- 4. `src/router.tsx` or `src/pages/_routes.tsx`
23
- 5. The nearest branch `_routes.tsx` and `_layout.tsx`
24
- 6. The nearest `src/features/<feature>/` or `src/components/<feature>/` owner
25
- 7. Existing tests for the touched surface
26
- 8. `src/styles.css` and `src/styles/*` only when visual behavior changes
27
-
28
- ## Choose The Next Skill
29
-
30
- - File ownership unclear: use `askr-project-structure`.
31
- - Route tree, shell, metadata, or navigation change: use `askr-routing-layouts`.
32
- - Local state, derived values, keyed rendering, or call-order safety: use `askr-runtime-reactivity`.
33
- - One route or container owns an async read: use `askr-resources-data`.
34
- - Shared keyed reads or writes must coordinate across screens: use `askr-query-mutation`.
35
- - Loading, empty, stale, retry, or pending-write truth is the hard part: use `askr-error-loading-empty`.
36
- - You are closing the task and need the right checks: use `askr-testing-determinism`.
37
- - The task spans many app surfaces and no narrower owner is enough: use `askr-app-builder` last, not first.
38
-
39
- ## Execution Loop
40
-
41
- 1. Inspect the existing owner files before proposing a new abstraction.
42
- 2. Pick one owning skill for the current slice.
43
- 3. Make the smallest edit that matches the repo's current structure.
44
- 4. Run the narrowest executable validation for that slice.
45
- 5. Only widen scope after that validation passes or clearly changes your understanding.
46
- 6. Stop when the change is structurally correct, validated, and easy for the next agent to follow.
47
-
48
- ## Non-Negotiables
49
-
50
- - Keep pages route-focused, features workflow-focused, and adapters transport-focused.
51
- - Add files only where another agent could predict they belong.
52
- - Reuse existing layouts, route groups, features, and shared helpers before creating new ones.
53
- - Use `@askrjs/ui` and `@askrjs/themes` before inventing app-local primitives.
54
-
55
- ## Never Do These By Default
56
-
57
- - React hooks or React Router patterns.
58
- - TanStack Query or a generic query-client abstraction.
59
- - Custom routing systems or page-local route state copies.
60
- - App-local `Button`, `Card`, `Panel`, `Sidebar`, `Navbar`, `EmptyState`, `Page`, `Toolbar`, `HStack`, or `VStack` clones.
61
- - Generic store or service-locator layers when `state()`, `resource()`, `createQuery()`, or `createMutation()` already fit.
62
- - Diff-only validation when a narrower executable check exists.
63
-
64
- ## Validate In This Order
65
-
66
- 1. Run the narrowest relevant test for the touched behavior.
67
- 2. Run the nearest type check or project check.
68
- 3. Run build or template-specific checks if the change affects app boot, routing, SSR/SSG, or packaging.
69
- 4. Confirm loading, error, empty, stale, pending, focus, and overflow states when user-visible.
70
-
71
- Use existing scripts such as `npm test`, `npm run type-check`, `npm run build`, `npm run lint`, or `npm run check` when they exist. Do not invent new validation commands when the repo already defines the contract.
72
-
73
- ## Done When
74
-
75
- - You can name the owner file for every new change.
76
- - The chosen skill matches the slice you edited.
77
- - No foreign framework defaults or parallel architecture were introduced.
78
- - At least one executable validation ran, or the blocker is explicit.
79
- - The next likely skill for follow-up work is obvious.
80
-
81
- ## Handoff
82
-
83
- - Use `askr-project-structure` when the next step is mostly about file placement.
84
- - Use `askr-routing-layouts` when the next step is mostly about URL ownership or shell boundaries.
85
- - Use `askr-testing-determinism` before closing any user-visible or stateful change.
@@ -1,4 +0,0 @@
1
- interface:
2
- display_name: "Askr Agent Execution"
3
- short_description: "Follow the canonical Askr editing playbook"
4
- default_prompt: "Use $askr-agent-execution to decide how to read, edit, and validate an Askr repository."
@@ -1,57 +0,0 @@
1
- ---
2
- name: askr-agent-workflows
3
- description: Use when building Askr UI for AI or agent workflows, including prompts, runs, streaming output, tool timelines, approvals, cancellation, retries, audit logs, persistence, and event-sourced run state.
4
- ---
5
-
6
- # Askr Agent Workflows
7
-
8
- Use this for user-facing agentic product flows.
9
-
10
- ## Inspect First
11
-
12
- - Existing agent API adapters and run/event schemas.
13
- - Feature folders for prompts, runs, tools, approvals, or artifacts.
14
- - Realtime/event-streaming utilities.
15
- - Product requirements for human approval, audit, and cancellation.
16
-
17
- ## Run State Model
18
-
19
- Model agent work as a run, not a one-off response:
20
-
21
- - `draft`: user is composing input.
22
- - `queued`: backend accepted the run but no work is visible.
23
- - `running`: events or tokens are arriving.
24
- - `requires-action`: user approval, credential, or clarification is needed.
25
- - `cancelling`: cancel requested, waiting for acknowledgement.
26
- - `succeeded`, `failed`, `cancelled`: terminal states.
27
-
28
- ## Event-Sourced UX
29
-
30
- - Treat the server event log as the source of truth.
31
- - Apply events idempotently by event ID or sequence.
32
- - Show optimistic local intent separately from confirmed server state.
33
- - Preserve `lastEventId` or cursor for resume/reconnect.
34
- - On reconnect, request events after the last seen cursor and refetch the affected projection if a gap is detected.
35
- - When projections lag, display "saving", "syncing", or "finalizing" rather than pretending completion.
36
-
37
- ## UI Composition
38
-
39
- - Prompt composer owns draft state and submit intent.
40
- - Run timeline renders messages, tool calls, approvals, errors, and artifacts.
41
- - Approval cards make the requested action, risk, and resulting command explicit.
42
- - Cancel and retry controls reflect backend acknowledgement, not just button clicks.
43
-
44
- ## Avoid
45
-
46
- - A single `loading` boolean for the whole run.
47
- - Replacing the timeline wholesale when streaming events arrive.
48
- - Hiding tool calls or approvals in unstructured text.
49
- - Retrying runs without idempotency or parent-run linkage.
50
- - Losing partial output on refresh or reconnect.
51
-
52
- ## Checks
53
-
54
- - Run states map to visible UI.
55
- - Event application is idempotent and ordered.
56
- - Cancellation, retry, approval, and failure paths are covered.
57
- - The user can understand what the agent did and what still needs attention.
@@ -1,4 +0,0 @@
1
- interface:
2
- display_name: "Askr Agent Workflows"
3
- short_description: "Build agent run product flows"
4
- default_prompt: "Use $askr-agent-workflows to build an agent run workflow."
@@ -1,79 +0,0 @@
1
- ---
2
- name: askr-api-integration
3
- description: Use when integrating Askr apps with generated API clients, transport adapters, auth headers, cancellation, DTO mapping, error normalization, retries, and event-sourced consistency metadata.
4
- ---
5
-
6
- # Askr API Integration
7
-
8
- Use this for the boundary between Askr feature code and backend APIs. The goal is one adapter boundary, deterministic DTO mapping, and preserved cancellation and consistency metadata.
9
-
10
- ## Use This When
11
-
12
- - Frontend code crosses an HTTP, SSE, WebSocket, or generated-client boundary.
13
- - DTOs need mapping before they enter features or UI.
14
- - Auth headers, retries, request IDs, or error normalization belong in one place.
15
- - Event-sourced writes need version, cursor, or event metadata for reconciliation.
16
-
17
- ## Inspect First
18
-
19
- - Existing `src/adapters` generated clients and transport wrappers
20
- - Existing `src/features` query or mutation workflows
21
- - Existing `src/shared` config, error formatting, and auth helpers
22
- - API DTO naming, version fields, event IDs, cursor fields, and request IDs
23
-
24
- ## Choose The Boundary
25
-
26
- - `src/adapters`: generated clients, raw transport, auth header injection, and low-level retry behavior.
27
- - `src/features/<feature>`: app-level queries, mutations, DTO-to-model mapping, and workflow state.
28
- - `src/shared`: cross-cutting config, error normalization, formatters, and request tracing.
29
- - Components should consume app models and feature state, never raw transport DTOs.
30
-
31
- ## Do This In Order
32
-
33
- 1. Keep raw client calls in the adapter boundary.
34
- 2. Forward `AbortSignal` through every cancellable layer.
35
- 3. Map DTOs into app models before they leave the feature or adapter boundary.
36
- 4. Normalize errors into user-safe messages plus machine-readable diagnostics.
37
- 5. Preserve request IDs, versions, cursors, or event IDs when the UI needs freshness or reconciliation truth.
38
- 6. Retry only idempotent reads or commands with explicit idempotency keys.
39
-
40
- ## Copy This Shape
41
-
42
- ```ts
43
- export async function listAccounts({ signal }: { signal: AbortSignal }) {
44
- const response = await accountsClient.list({ signal });
45
-
46
- return {
47
- items: response.items.map(toAccount),
48
- version: response.version,
49
- lastEventId: response.last_event_id,
50
- };
51
- }
52
- ```
53
-
54
- ## Never Do These
55
-
56
- - Returning raw API DTOs directly to page props.
57
- - Hiding `signal`, request IDs, or version metadata because the first screen does not need them yet.
58
- - Retrying a non-idempotent command from the UI without a server-recognized idempotency key.
59
- - Putting raw clients in `src/pages` or generic UI components.
60
-
61
- ## Validate
62
-
63
- - Every async adapter accepts and forwards `signal`.
64
- - Errors normalize into user-safe messages and machine-readable codes.
65
- - DTO mapping is deterministic and tested where the boundary matters.
66
- - Event or version metadata reaches query or mutation state when consistency matters.
67
-
68
- ## Done When
69
-
70
- - Components no longer see raw transport DTOs.
71
- - `signal`, request IDs, and consistency metadata survive the adapter boundary.
72
- - Retry behavior is explicit and safe.
73
- - Error normalization is ready for both user copy and machine-readable handling.
74
-
75
- ## Handoff
76
-
77
- - Use `askr-query-mutation` when feature state must invalidate or reconcile shared reads.
78
- - Use `askr-auth-access` when auth headers or session policy shape the adapter behavior.
79
- - Use `askr-observability-debugging` when request IDs, traces, and safe diagnostics must survive end to end.
@@ -1,4 +0,0 @@
1
- interface:
2
- display_name: "Askr API Integration"
3
- short_description: "Connect APIs with Askr boundaries"
4
- default_prompt: "Use $askr-api-integration to connect an API to an Askr feature."
@@ -1,99 +0,0 @@
1
- ---
2
- name: askr-app-builder
3
- description: Use when building or substantially extending an Askr application, choosing scaffolds, planning app architecture, combining routing, state, data, UI primitives, theming, charts, SSR/SSG, or deciding which more specific Askr skill should guide the work.
4
- ---
5
-
6
- # Askr App Builder
7
-
8
- Use this only when a task spans multiple owned workflows and no single narrower skill is enough. This is a planning and dispatch skill, not the default starting point for everyday feature work.
9
-
10
- ## Use This When
11
-
12
- - A new feature spans routing, data ownership, UI composition, and validation together.
13
- - You need to choose a scaffold or template path before implementation.
14
- - You need to break a broad feature into smaller owned slices.
15
- - The task touches multiple branches, features, and render surfaces at once.
16
-
17
- ## Do Not Use This First When
18
-
19
- - The task is only about one route, one component, one async owner, or one UI surface.
20
- - File ownership is unclear but still local; use `askr-project-structure` instead.
21
- - The hard problem is already clearly routing, state, theming, auth, or validation.
22
-
23
- ## Inspect First
24
-
25
- - `AGENTS.md` when it exists
26
- - `package.json`
27
- - `src/main.tsx`
28
- - The top-level route registry and nearest branch layout
29
- - Existing `src/features`, `src/adapters`, `src/shared`, and `src/styles` ownership
30
- - Existing tests for the surfaces involved
31
-
32
- ## Plan The Slice
33
-
34
- 1. Pick the template or existing app baseline.
35
- 2. Identify the route owner, layout owner, feature owner, adapter owner, and validation owner.
36
- 3. Split the work into smaller slices that can each be guided by one narrower skill.
37
- 4. Apply those narrower skills in sequence instead of keeping the whole task under this one.
38
- 5. End with `askr-testing-determinism` once the slices are implemented.
39
-
40
- ## Choose The Baseline
41
-
42
- - New product app: `askr create startkit <name>`.
43
- - Minimal interactive app: `spa`.
44
- - Server-rendered app: `ssr`.
45
- - Static or docs site: `ssg`.
46
- - Existing app: follow its current route, layout, style, and test conventions before introducing new ones.
47
-
48
- ## Route The Work To Narrower Skills
49
-
50
- - File placement or ownership: `askr-project-structure`.
51
- - Route tree, metadata, shell boundaries, navigation: `askr-routing-layouts`.
52
- - Local state or keyed rendering: `askr-runtime-reactivity`.
53
- - Route-owned async reads: `askr-resources-data`.
54
- - Shared keyed reads and writes: `askr-query-mutation`.
55
- - Async truth states: `askr-error-loading-empty`.
56
- - CRUD workflow: `askr-forms-tables-crud`.
57
- - Auth and access: `askr-auth-access`.
58
- - Theming and UI composition: `askr-theming` and `askr-ui-composition`.
59
- - Realtime or event streams: `askr-realtime-streaming`.
60
- - SSR or SSG: `askr-ssr-ssg`.
61
- - Final validation: `askr-testing-determinism`.
62
-
63
- ## Copy This Shape
64
-
65
- ```text
66
- route owner -> src/pages/app/_routes.tsx
67
- layout owner -> src/pages/app/_layout.tsx
68
- feature owner -> src/features/agents/
69
- adapter owner -> src/adapters/agents-client.ts
70
- validation owner -> tests/ or nearest package test script
71
- ```
72
-
73
- ## Never Do These
74
-
75
- - React-shaped defaults such as `useEffect` data loading or implicit mutable state.
76
- - Mixing route registration, data transport, layout shell, and visual theme logic in one component.
77
- - Treating this skill as a substitute for narrower workflow skills.
78
- - Raw interactive HTML when an `@askrjs/ui` primitive owns the behavior.
79
- - App-local layout, shell, card, nav, feedback, or form primitives when `@askrjs/themes` already owns the surface.
80
- - Hardcoded `--ak-*` token literals in runtime TypeScript or JavaScript.
81
-
82
- ## Validate
83
-
84
- - The app has one clear route tree.
85
- - Route branches, layouts, feature workflows, adapters, shared helpers, UI behavior, and theme concerns sit in separate layers.
86
- - Loading, empty, error, disabled, and narrow-screen states are explicit.
87
- - `npm run check` or the closest available project check passes.
88
-
89
- ## Done When
90
-
91
- - The chosen template path still matches the app surface.
92
- - Each slice is routed to one narrower skill.
93
- - Route, layout, feature, adapter, shared, and theme concerns are separated.
94
- - No foreign framework defaults or invented primitives slipped in.
95
-
96
- ## Handoff
97
-
98
- - Use the narrower skill that owns the next slice.
99
- - Use `askr-testing-determinism` before finalizing the assembled result.
@@ -1,4 +0,0 @@
1
- interface:
2
- display_name: "Askr App Builder"
3
- short_description: "Build idiomatic Askr applications"
4
- default_prompt: "Use $askr-app-builder to plan and build an idiomatic Askr app."
@@ -1,74 +0,0 @@
1
- ---
2
- name: askr-auth-access
3
- description: Use when building Askr authentication, session loading, public/app route branches, protected layouts, role and permission requirements, redirects, login/logout, and access-denied UX.
4
- ---
5
-
6
- # Askr Auth Access
7
-
8
- Use this for authentication and authorization in route-first Askr apps. The goal is explicit route policy, explicit session resolution, and no token or permission logic leaking into pages.
9
-
10
- ## Inspect First
11
-
12
- - `src/pages/_routes.tsx`, `src/pages/public/_routes.tsx`, and `src/pages/app/_routes.tsx`
13
- - `src/pages/public/_layout.tsx` and `src/pages/app/_layout.tsx`
14
- - Existing session, token, and user helpers in `src/shared` or `src/features/auth`
15
- - Router auth resolver configuration
16
-
17
- ## Use This When
18
-
19
- - You need guest-only and authenticated route branches.
20
- - You need route-level auth or permission requirements.
21
- - You need login, logout, redirect, or forbidden behavior.
22
- - You need to keep access checks out of page-local component logic.
23
-
24
- ## Do This In Order
25
-
26
- 1. Keep public and authenticated branches explicit in the route tree.
27
- 2. Put an `AuthRequirement` on the narrowest route group or route that owns the policy.
28
- 3. Resolve session state before rendering protected data or destructive controls.
29
- 4. Redirect unauthenticated users to login with a return target when useful.
30
- 5. Show a signed-in forbidden state when the user is authenticated but lacks permission.
31
- 6. Keep token storage, refresh, and header policy in auth helpers or adapters, not components.
32
-
33
- ## Copy This Shape
34
-
35
- ```tsx
36
- import { requireAnonymous, requireUser } from "@askrjs/auth";
37
-
38
- group({ layout: AuthLayout, auth: requireAnonymous() }, () => {
39
- registerAuthRoutes();
40
- });
41
-
42
- group({ layout: AppLayout, auth: requireUser() }, () => {
43
- registerAppRoutes();
44
- });
45
- ```
46
-
47
- ## Never Do These
48
-
49
- - Per-page auth checks duplicated across protected routes.
50
- - Rendering protected app data before session resolution.
51
- - Putting token storage or API auth header logic in components.
52
- - Treating roles and permissions as visual-only state.
53
- - Client-only authorization decisions for sensitive server actions.
54
- - Silent redirects when the user is signed in but lacks access.
55
-
56
- ## Validate
57
-
58
- - Public and app branches are explicit.
59
- - Protected routes have a function-based auth requirement in the route tree.
60
- - Access-denied, loading, and redirect behavior are tested.
61
- - Auth state is available to adapters without leaking transport details into UI.
62
-
63
- ## Done When
64
-
65
- - Session resolution is explicit before protected data renders.
66
- - Auth and authorization live in route requirements or auth workflows, not scattered through pages.
67
- - Unauthorized, redirect, and signed-out states are all covered.
68
- - Sensitive transport or token logic did not leak into UI components.
69
-
70
- ## Handoff
71
-
72
- - Use `askr-routing-layouts` when auth changes also reshape the route tree.
73
- - Use `askr-api-integration` when auth headers, session refresh, or adapter policy is changing.
74
- - Use `askr-observability-debugging` when denial reasons or audit trails must stay visible.
@@ -1,4 +0,0 @@
1
- interface:
2
- display_name: "Askr Auth Access"
3
- short_description: "Model auth branches and access"
4
- default_prompt: "Use $askr-auth-access to add authentication and route access."
@@ -1,76 +0,0 @@
1
- ---
2
- name: askr-cli-vite
3
- description: Use when scaffolding Askr projects with @askrjs/cli, choosing spa/ssr/ssg/startkit templates, configuring @askrjs/vite, JSX import source, Vite build setup, generated app customization, or fixing transform wiring.
4
- ---
5
-
6
- # Askr CLI Vite
7
-
8
- Use this only when the task is scaffold choice, initial project setup, or repair of Vite and transform wiring. It is not a normal feature-work skill after the app is already on the canonical path.
9
-
10
- ## Use This When
11
-
12
- - Choosing between `spa`, `ssr`, `ssg`, and `startkit`.
13
- - Fixing `@askrjs/vite` plugin wiring or JSX import-source setup.
14
- - Repairing generated `package.json`, `vite.config.ts`, or `tsconfig` settings.
15
- - Adjusting scaffolded build integration without changing runtime architecture.
16
-
17
- ## Inspect First
18
-
19
- - `docs/create.md`
20
- - `docs/workflows.md`
21
- - Existing `package.json`, `vite.config.ts`, and `tsconfig.json`
22
- - The nearest matching template under `templates/`
23
-
24
- ## Start From The Closest Template
25
-
26
- - `startkit`: default for new product apps with dashboard, accounts, settings, login, themes, icons, and common checks.
27
- - `spa`: minimal client-rendered interactive app.
28
- - `ssr`: server-rendered app boundary.
29
- - `ssg`: static generation scaffold with `ssg.config.ts`.
30
-
31
- ## Do This In Order
32
-
33
- 1. Choose the closest template instead of starting from raw Vite.
34
- 2. Preserve generated Vite wiring unless the app has a concrete build requirement.
35
- 3. Keep `askr()` as the owning plugin for Askr JSX and transforms.
36
- 4. Keep runtime route, data, and component decisions out of build config.
37
- 5. Treat generated files as app-owned after scaffold, not immutable.
38
- 6. Validate scripts and transforms before moving on to feature work.
39
-
40
- ## Copy This Shape
41
-
42
- ```ts
43
- import { defineConfig } from "vite";
44
- import { askr } from "@askrjs/vite";
45
-
46
- export default defineConfig({
47
- plugins: [askr()],
48
- });
49
- ```
50
-
51
- ## Never Do These
52
-
53
- - Duplicating JSX transform setup in Vite, `tsconfig`, and custom esbuild config.
54
- - Choosing `startkit` for a tiny isolated demo when `spa` fits better.
55
- - Treating CLI-generated files as immutable.
56
- - Adding runtime route or data decisions to build config.
57
-
58
- ## Validate
59
-
60
- - `vite.config.ts` uses `askr()`.
61
- - `package.json` scripts match the selected template.
62
- - `tsconfig` JSX settings match template conventions.
63
- - `npm run dev`, `npm run build`, and available checks pass after setup.
64
-
65
- ## Done When
66
-
67
- - The template matches the runtime boundary the app actually needs.
68
- - Vite wiring stays package-owned and minimal.
69
- - Generated files are ready for normal workflow skills.
70
- - No runtime architecture leaked into build config.
71
-
72
- ## Handoff
73
-
74
- - Use `askr-app-builder` only when the task is still a broad app brief.
75
- - Use `askr-ssr-ssg` when the render boundary is the hard part.
76
- - Use the normal route, data, or UI workflow skills once the scaffold exists.
@@ -1,4 +0,0 @@
1
- interface:
2
- display_name: "Askr CLI Vite"
3
- short_description: "Scaffold and configure Askr apps"
4
- default_prompt: "Use $askr-cli-vite to scaffold or configure an askr Vite app."