@chiralkit/cli 0.1.0-alpha.1 → 0.2.0-alpha.1

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 (256) hide show
  1. package/LICENSE +95 -21
  2. package/README.md +55 -62
  3. package/dist/add.d.ts +13 -0
  4. package/dist/add.js +51 -114
  5. package/dist/add.js.map +1 -1
  6. package/dist/config.d.ts +3 -1
  7. package/dist/config.js +6 -3
  8. package/dist/config.js.map +1 -1
  9. package/dist/doctor.js +1 -1
  10. package/dist/doctor.js.map +1 -1
  11. package/dist/index.js +5 -104
  12. package/dist/index.js.map +1 -1
  13. package/dist/init.d.ts +1 -0
  14. package/dist/init.js +25 -16
  15. package/dist/init.js.map +1 -1
  16. package/dist/installers/context.d.ts +5 -1
  17. package/dist/installers/context.js +15 -7
  18. package/dist/installers/context.js.map +1 -1
  19. package/dist/installers/index.js +4 -0
  20. package/dist/installers/index.js.map +1 -1
  21. package/dist/installers/react/react/installer.d.ts +10 -0
  22. package/dist/installers/react/react/installer.js +16 -0
  23. package/dist/installers/react/react/installer.js.map +1 -0
  24. package/dist/installers/react/react/manifest.json +22 -0
  25. package/dist/installers/stencil/django-template/installer.js.map +1 -1
  26. package/dist/installers/stencil/react/installer.js +2 -1
  27. package/dist/installers/stencil/react/installer.js.map +1 -1
  28. package/dist/kits-root.d.ts +1 -0
  29. package/dist/kits-root.js +16 -0
  30. package/dist/kits-root.js.map +1 -0
  31. package/dist/lock.d.ts +1 -0
  32. package/dist/lock.js +1 -0
  33. package/dist/lock.js.map +1 -1
  34. package/dist/manifest.js +1 -1
  35. package/dist/manifest.js.map +1 -1
  36. package/dist/operations/add-remote.d.ts +47 -0
  37. package/dist/operations/add-remote.js +376 -0
  38. package/dist/operations/add-remote.js.map +1 -0
  39. package/dist/operations/add.d.ts +33 -0
  40. package/dist/operations/add.js +183 -0
  41. package/dist/operations/add.js.map +1 -0
  42. package/dist/operations/index.d.ts +8 -0
  43. package/dist/operations/index.js +5 -0
  44. package/dist/operations/index.js.map +1 -0
  45. package/dist/operations/result.d.ts +9 -0
  46. package/dist/operations/result.js +2 -0
  47. package/dist/operations/result.js.map +1 -0
  48. package/dist/operations/update.d.ts +53 -0
  49. package/dist/operations/update.js +406 -0
  50. package/dist/operations/update.js.map +1 -0
  51. package/dist/paths-migrate.d.ts +12 -0
  52. package/dist/paths-migrate.js +242 -0
  53. package/dist/paths-migrate.js.map +1 -0
  54. package/dist/public-cli.d.ts +6 -0
  55. package/dist/public-cli.js +76 -0
  56. package/dist/public-cli.js.map +1 -0
  57. package/dist/registry-layout.d.ts +1 -3
  58. package/dist/registry-layout.js +20 -23
  59. package/dist/registry-layout.js.map +1 -1
  60. package/dist/remote/fetch-item.d.ts +12 -0
  61. package/dist/remote/fetch-item.js +66 -0
  62. package/dist/remote/fetch-item.js.map +1 -0
  63. package/dist/remote/file-targets.d.ts +8 -0
  64. package/dist/remote/file-targets.js +31 -0
  65. package/dist/remote/file-targets.js.map +1 -0
  66. package/dist/remote/registry-url.d.ts +5 -0
  67. package/dist/remote/registry-url.js +32 -0
  68. package/dist/remote/registry-url.js.map +1 -0
  69. package/dist/remote/terminal.d.ts +1 -0
  70. package/dist/remote/terminal.js +10 -0
  71. package/dist/remote/terminal.js.map +1 -0
  72. package/dist/source-paths.d.ts +9 -0
  73. package/dist/source-paths.js +51 -0
  74. package/dist/source-paths.js.map +1 -0
  75. package/dist/tokens-migrate/map-to-chiral.js +9 -9
  76. package/dist/tokens-migrate/map-to-chiral.js.map +1 -1
  77. package/dist/tokens-migrate/render-chiraltokens.js +1 -1
  78. package/dist/tokens-migrate/render-chiraltokens.js.map +1 -1
  79. package/dist/tokens-migrate/run.js +12 -2
  80. package/dist/tokens-migrate/run.js.map +1 -1
  81. package/dist/update.d.ts +2 -19
  82. package/dist/update.js +20 -379
  83. package/dist/update.js.map +1 -1
  84. package/package.json +32 -27
  85. package/dist/agents/subprocess.d.ts +0 -10
  86. package/dist/agents/subprocess.js +0 -43
  87. package/dist/agents/subprocess.js.map +0 -1
  88. package/dist/automation/index.d.ts +0 -14
  89. package/dist/automation/index.js +0 -129
  90. package/dist/automation/index.js.map +0 -1
  91. package/dist/automation/install.d.ts +0 -19
  92. package/dist/automation/install.js +0 -116
  93. package/dist/automation/install.js.map +0 -1
  94. package/dist/automation/parsers/audit-report.d.ts +0 -2
  95. package/dist/automation/parsers/audit-report.js +0 -42
  96. package/dist/automation/parsers/audit-report.js.map +0 -1
  97. package/dist/automation/parsers/exit-code.d.ts +0 -2
  98. package/dist/automation/parsers/exit-code.js +0 -6
  99. package/dist/automation/parsers/exit-code.js.map +0 -1
  100. package/dist/automation/parsers/index.d.ts +0 -10
  101. package/dist/automation/parsers/index.js +0 -13
  102. package/dist/automation/parsers/index.js.map +0 -1
  103. package/dist/automation/parsers/observer-snapshot.d.ts +0 -2
  104. package/dist/automation/parsers/observer-snapshot.js +0 -30
  105. package/dist/automation/parsers/observer-snapshot.js.map +0 -1
  106. package/dist/automation/parsers/plan-report.d.ts +0 -2
  107. package/dist/automation/parsers/plan-report.js +0 -53
  108. package/dist/automation/parsers/plan-report.js.map +0 -1
  109. package/dist/automation/parsers/refinement-report.d.ts +0 -2
  110. package/dist/automation/parsers/refinement-report.js +0 -149
  111. package/dist/automation/parsers/refinement-report.js.map +0 -1
  112. package/dist/automation/parsers/types.d.ts +0 -7
  113. package/dist/automation/parsers/types.js +0 -2
  114. package/dist/automation/parsers/types.js.map +0 -1
  115. package/dist/automation/run.d.ts +0 -25
  116. package/dist/automation/run.js +0 -68
  117. package/dist/automation/run.js.map +0 -1
  118. package/dist/automation/schema.d.ts +0 -130
  119. package/dist/automation/schema.js +0 -46
  120. package/dist/automation/schema.js.map +0 -1
  121. package/dist/automation/status.d.ts +0 -16
  122. package/dist/automation/status.js +0 -56
  123. package/dist/automation/status.js.map +0 -1
  124. package/dist/automation/verifiers/index.d.ts +0 -7
  125. package/dist/automation/verifiers/index.js +0 -5
  126. package/dist/automation/verifiers/index.js.map +0 -1
  127. package/dist/automation/verifiers/shell.d.ts +0 -5
  128. package/dist/automation/verifiers/shell.js +0 -17
  129. package/dist/automation/verifiers/shell.js.map +0 -1
  130. package/dist/automation/verifiers/types.d.ts +0 -12
  131. package/dist/automation/verifiers/types.js +0 -2
  132. package/dist/automation/verifiers/types.js.map +0 -1
  133. package/dist/backlog/add.d.ts +0 -10
  134. package/dist/backlog/add.js +0 -30
  135. package/dist/backlog/add.js.map +0 -1
  136. package/dist/backlog/index.d.ts +0 -1
  137. package/dist/backlog/index.js +0 -53
  138. package/dist/backlog/index.js.map +0 -1
  139. package/dist/generate.d.ts +0 -1
  140. package/dist/generate.js +0 -275
  141. package/dist/generate.js.map +0 -1
  142. package/dist/generator/agent.d.ts +0 -8
  143. package/dist/generator/agent.js +0 -66
  144. package/dist/generator/agent.js.map +0 -1
  145. package/dist/generator/api.d.ts +0 -7
  146. package/dist/generator/api.js +0 -42
  147. package/dist/generator/api.js.map +0 -1
  148. package/dist/generator/config.d.ts +0 -23
  149. package/dist/generator/config.js +0 -121
  150. package/dist/generator/config.js.map +0 -1
  151. package/dist/generator/parse-response.d.ts +0 -5
  152. package/dist/generator/parse-response.js +0 -58
  153. package/dist/generator/parse-response.js.map +0 -1
  154. package/dist/generator/prompt.d.ts +0 -9
  155. package/dist/generator/prompt.js +0 -166
  156. package/dist/generator/prompt.js.map +0 -1
  157. package/dist/generator/request.d.ts +0 -17
  158. package/dist/generator/request.js +0 -15
  159. package/dist/generator/request.js.map +0 -1
  160. package/dist/generators/prompts/stencil.md +0 -45
  161. package/dist/pm/audit.d.ts +0 -36
  162. package/dist/pm/audit.js +0 -147
  163. package/dist/pm/audit.js.map +0 -1
  164. package/dist/pm/backlog.d.ts +0 -3
  165. package/dist/pm/backlog.js +0 -123
  166. package/dist/pm/backlog.js.map +0 -1
  167. package/dist/pm/brief.d.ts +0 -4
  168. package/dist/pm/brief.js +0 -18
  169. package/dist/pm/brief.js.map +0 -1
  170. package/dist/pm/git.d.ts +0 -3
  171. package/dist/pm/git.js +0 -43
  172. package/dist/pm/git.js.map +0 -1
  173. package/dist/pm/grid.d.ts +0 -8
  174. package/dist/pm/grid.js +0 -16
  175. package/dist/pm/grid.js.map +0 -1
  176. package/dist/pm/index.d.ts +0 -25
  177. package/dist/pm/index.js +0 -199
  178. package/dist/pm/index.js.map +0 -1
  179. package/dist/pm/observe.d.ts +0 -55
  180. package/dist/pm/observe.js +0 -177
  181. package/dist/pm/observe.js.map +0 -1
  182. package/dist/pm/plan.d.ts +0 -54
  183. package/dist/pm/plan.js +0 -151
  184. package/dist/pm/plan.js.map +0 -1
  185. package/dist/pm/refinement-worktree.d.ts +0 -31
  186. package/dist/pm/refinement-worktree.js +0 -160
  187. package/dist/pm/refinement-worktree.js.map +0 -1
  188. package/dist/pm/refinement.d.ts +0 -79
  189. package/dist/pm/refinement.js +0 -326
  190. package/dist/pm/refinement.js.map +0 -1
  191. package/dist/pm/render.d.ts +0 -2
  192. package/dist/pm/render.js +0 -39
  193. package/dist/pm/render.js.map +0 -1
  194. package/dist/pm/roadmap-rings.d.ts +0 -7
  195. package/dist/pm/roadmap-rings.js +0 -31
  196. package/dist/pm/roadmap-rings.js.map +0 -1
  197. package/dist/pm/roadmap.d.ts +0 -2
  198. package/dist/pm/roadmap.js +0 -118
  199. package/dist/pm/roadmap.js.map +0 -1
  200. package/dist/pm/snapshot.d.ts +0 -10
  201. package/dist/pm/snapshot.js +0 -129
  202. package/dist/pm/snapshot.js.map +0 -1
  203. package/dist/pm/types.d.ts +0 -99
  204. package/dist/pm/types.js +0 -29
  205. package/dist/pm/types.js.map +0 -1
  206. package/dist/scaffold-registry.d.ts +0 -10
  207. package/dist/scaffold-registry.js +0 -283
  208. package/dist/scaffold-registry.js.map +0 -1
  209. package/dist/scaffold.d.ts +0 -1
  210. package/dist/scaffold.js +0 -32
  211. package/dist/scaffold.js.map +0 -1
  212. package/dist/spec/agent-ds.d.ts +0 -32
  213. package/dist/spec/agent-ds.js +0 -106
  214. package/dist/spec/agent-ds.js.map +0 -1
  215. package/dist/spec/agents.d.ts +0 -24
  216. package/dist/spec/agents.js +0 -146
  217. package/dist/spec/agents.js.map +0 -1
  218. package/dist/spec/automation-stage.d.ts +0 -28
  219. package/dist/spec/automation-stage.js +0 -201
  220. package/dist/spec/automation-stage.js.map +0 -1
  221. package/dist/spec/backlog-parser.d.ts +0 -21
  222. package/dist/spec/backlog-parser.js +0 -140
  223. package/dist/spec/backlog-parser.js.map +0 -1
  224. package/dist/spec/feature-stage.d.ts +0 -27
  225. package/dist/spec/feature-stage.js +0 -120
  226. package/dist/spec/feature-stage.js.map +0 -1
  227. package/dist/spec/metadata.d.ts +0 -154
  228. package/dist/spec/metadata.js +0 -98
  229. package/dist/spec/metadata.js.map +0 -1
  230. package/dist/spec/orchestrator.d.ts +0 -18
  231. package/dist/spec/orchestrator.js +0 -163
  232. package/dist/spec/orchestrator.js.map +0 -1
  233. package/dist/spec/promotion.d.ts +0 -13
  234. package/dist/spec/promotion.js +0 -78
  235. package/dist/spec/promotion.js.map +0 -1
  236. package/dist/spec/step-mapping.d.ts +0 -6
  237. package/dist/spec/step-mapping.js +0 -72
  238. package/dist/spec/step-mapping.js.map +0 -1
  239. package/dist/spec/verdict.d.ts +0 -78
  240. package/dist/spec/verdict.js +0 -37
  241. package/dist/spec/verdict.js.map +0 -1
  242. package/dist/spec-from-react.d.ts +0 -11
  243. package/dist/spec-from-react.js +0 -522
  244. package/dist/spec-from-react.js.map +0 -1
  245. package/dist/spec-from-stencil.d.ts +0 -7
  246. package/dist/spec-from-stencil.js +0 -275
  247. package/dist/spec-from-stencil.js.map +0 -1
  248. package/dist/spec.d.ts +0 -1
  249. package/dist/spec.js +0 -72
  250. package/dist/spec.js.map +0 -1
  251. package/dist/tokens-map.d.ts +0 -11
  252. package/dist/tokens-map.js +0 -43
  253. package/dist/tokens-map.js.map +0 -1
  254. package/dist/workspace-init.d.ts +0 -9
  255. package/dist/workspace-init.js +0 -119
  256. package/dist/workspace-init.js.map +0 -1
package/LICENSE CHANGED
@@ -1,21 +1,95 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 xHadal
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ Elastic License 2.0
2
+
3
+ URL: https://www.elastic.co/licensing/elastic-license
4
+
5
+ Acceptance
6
+
7
+ By using the software, you agree to all of the terms and conditions below.
8
+
9
+ Copyright License
10
+
11
+ The licensor grants you a non-exclusive, royalty-free, worldwide,
12
+ non-sublicensable, non-transferable license to use, copy, distribute, make
13
+ available, and prepare derivative works of the software, in each case subject to
14
+ the limitations and conditions below.
15
+
16
+ Limitations
17
+
18
+ You may not provide the software to third parties as a hosted or managed
19
+ service, where the service provides users with access to any substantial set of
20
+ the features or functionality of the software.
21
+
22
+ You may not move, change, disable, or circumvent the license key functionality
23
+ in the software, and you may not remove or obscure any functionality in the
24
+ software that is protected by the license key.
25
+
26
+ You may not alter, remove, or obscure any licensing, copyright, or other notices
27
+ of the licensor in the software. Any use of the licensor’s trademarks is subject
28
+ to applicable law.
29
+
30
+ Patents
31
+
32
+ The licensor grants you a license, under any patent claims the licensor can
33
+ license, or becomes able to license, to make, have made, use, sell, offer for
34
+ sale, import and have imported the software, in each case subject to the
35
+ limitations and conditions in this license. This license does not cover any
36
+ patent claims that you cause to be infringed by modifications or additions to
37
+ the software. If you or your company make any written claim that the software
38
+ infringes or contributes to infringement of any patent, your patent license for
39
+ the software granted under these terms ends immediately. If your company makes
40
+ such a claim, your patent license ends immediately for work on behalf of your
41
+ company.
42
+
43
+ Notices
44
+
45
+ You must ensure that anyone who gets a copy of any part of the software from you
46
+ also gets a copy of these terms.
47
+
48
+ If you modify the software, you must include in any modified copies of the
49
+ software prominent notices stating that you have modified the software.
50
+
51
+ No Other Rights
52
+
53
+ These terms do not imply any licenses other than those expressly granted in
54
+ these terms.
55
+
56
+ Termination
57
+
58
+ If you use the software in violation of these terms, such use is not licensed,
59
+ and your licenses will automatically terminate. If the licensor provides you
60
+ with a notice of your violation, and you cease all violation of this license no
61
+ later than 30 days after you receive that notice, your licenses will be
62
+ reinstated retroactively. However, if you violate these terms after such
63
+ reinstatement, any additional violation of these terms will cause your licenses
64
+ to terminate automatically and permanently.
65
+
66
+ No Liability
67
+
68
+ As far as the law allows, the software comes as is, without any warranty or
69
+ condition, and the licensor will not be liable to you for any damages arising
70
+ out of these terms or the use or nature of the software, under any kind of
71
+ legal claim.
72
+
73
+ Definitions
74
+
75
+ The licensor is the entity offering these terms, and the software is the
76
+ software the licensor makes available under these terms, including any portion
77
+ of it.
78
+
79
+ you refers to the individual or entity agreeing to these terms.
80
+
81
+ your company is any legal entity, sole proprietorship, or other kind of
82
+ organization that you work for, plus all organizations that have control over,
83
+ are under the control of, or are under common control with that
84
+ organization. control means ownership of substantially all the assets of an
85
+ entity, or the power to direct its management and policies by vote, contract, or
86
+ otherwise. Control can be direct or indirect.
87
+
88
+ your licenses are all the licenses granted to you for the software under
89
+ these terms.
90
+
91
+ use means anything you do with the software requiring one of your licenses.
92
+
93
+ trademark means trademarks, service marks, and similar rights.
94
+
95
+ Copyright (c) 2026 ChiralKit contributors
package/README.md CHANGED
@@ -2,96 +2,89 @@
2
2
 
3
3
  CLI for the Chiralkit registry.
4
4
 
5
- ## Commands
5
+ ## Quick start: ChiralUI from the hosted registry
6
6
 
7
- - `chiralkit init [--maintainer]` — write `ck/chiralkit.config.json`. Without `--maintainer`, detects a consumer framework and writes the consumer flavor. With `--maintainer`, writes (or merges into) a `maintainer` block with `design_system_path` + `registry_path`, enabling `scaffold registry` in this repo.
8
- - `chiralkit add <module>` — copy a module's files into the current project.
9
- - `chiralkit spec from-stencil <name>` — draft a `spec.json` from a Stencil component's source.
10
- - `chiralkit scaffold registry <name> [--force]` — onboard a Stencil component from `<designSystemPath>/ds-<name>/` into the registry (envelope + spec + reversed symlinks + `generation.json`).
11
- - `chiralkit generate <name> [--stack <s>] [--dry-run] [--debug-prompt] [--force]` — LLM-generate a stack implementation from `spec.json`.
12
- - `chiralkit doctor` — lint the registry (envelopes, specs, implementations).
7
+ In a React project (Vite, or Next.js with the App Router), with no chiralkit checkout. The native components import their own CSS file, which the Next.js Pages Router rejects outside `_app`.
13
8
 
14
- ## `generate` — two modes
9
+ ```bash
10
+ npx @chiralkit/cli@alpha add button
11
+ ```
15
12
 
16
- The generator reads `registry/generator.config.json`. It supports two modes; pick whichever fits.
13
+ `ck add` fetches the module from `https://chiralkit.dev/r/v1`, creates `ck/chiralkit.config.json` if it is missing, copies the source into `src/chiralkit/` (the code is yours to edit), installs the `tokens` module it depends on, and records every file hash in `ck/chiralkit.lock.json`. Import `src/chiralkit/tokens/chiraltokens.css` once in your app entry; the CLI prints this hint after writing the tokens.
17
14
 
18
- ### Agent mode (default; no API key required)
15
+ - `--registry <url>` picks another registry base, for example `--registry http://localhost:4321/r/v1` for a local build. Only `https` is accepted, plus plain `http` for `localhost`. Dependencies are resolved by name against the same base.
16
+ - **Modules in this alpha:** `button`, `input`, `select` (native React components with their own CSS) and `tokens`. The other ChiralUI components arrive as their native React implementations land.
17
+ - **`ck add tokens`** installs the ChiralUI tokens on their own as a module: it writes `src/chiralkit/tokens/chiraltokens.css` and records `tokens` in the lock. You do not need to install `@chiralkit/tokens` from npm.
18
+ - The items follow the shadcn registry-item format, so `npx shadcn@latest add https://chiralkit.dev/r/v1/react/button.json` writes the same `Button.tsx`. On that path shadcn merges the dark token values under its `.dark` class, while ChiralUI's own `chiraltokens.css` switches on `:root[data-theme="dark"]`; use whichever selector your app toggles.
19
+ - `ck update` does not update remote installs yet; it skips them and says so.
19
20
 
20
- Uses whatever local LLM agent CLI you have installed. Only Claude Code is wired today (`claude -p`); Aider / Codex CLI / gemini-cli are extensions.
21
+ ## Design token contracts
21
22
 
22
- ```json
23
- {
24
- "generator": {
25
- "agent": "claude-code"
26
- }
27
- }
28
- ```
23
+ Generated token maps and component specs should use the layered token catalog from `@chiralkit/tokens`: primitive values, semantic roles, and interactive states. Avoid emitting deprecated flat `--ds-color-*`, `--ds-spacing-*`, `--ds-radius-*`, or `--ds-font-*` aliases in new specs. The aliases remain available for existing consumers during migration and are scheduled for removal in a future major release.
24
+
25
+ ## Commands
29
26
 
30
- Prerequisite: `claude` binary on PATH (https://docs.claude.com/claude-code/quickstart).
27
+ - `ck init [--source-root <path>]` — detect your framework and write `ck/chiralkit.config.json`.
28
+ - `ck add <module> [--registry <url>]` — copy a module's files into the current project from the hosted registry (`https://chiralkit.dev/r/v1` by default).
29
+ - `ck update [name] [--check] [--yes]` — bump installed modules to the current registry version, with a diff preview.
30
+ - `ck lock --init` — snapshot the installed modules into `ck/chiralkit.lock.json`.
31
+ - `ck tokens migrate [--from <css>] [--out <path>] [--dry-run] [--force]` — write `tokens/chiraltokens.css` from your shadcn/ui theme (no AI).
32
+ - `ck paths migrate [--to <root>] [--check] [--yes]` — preview or apply a move of installed files into the source namespace.
33
+ - `ck doctor` — lint the registry (envelopes, specs, implementations).
34
+ - `ck manifest [--lang en|es]` — print the project mark and manifesto.
31
35
 
32
- ### API mode
36
+ ## Consumer source paths
33
37
 
34
- Direct call to the Vercel AI SDK. Requires the provider's env var (`ANTHROPIC_API_KEY` for the `anthropic` provider).
38
+ New React and HTML consumers use `src/chiralkit/`; Django uses `templates/chiralkit/`. Choose a custom root with `ck init --source-root custom/chiral`. New configs make `paths.source` authoritative and set `paths.components` to the same root:
35
39
 
36
40
  ```json
37
41
  {
38
- "generator": {
39
- "model": "anthropic/claude-opus-4-8"
42
+ "framework": "react",
43
+ "registry_path": "../chiralkit",
44
+ "paths": {
45
+ "source": "src/chiralkit",
46
+ "components": "src/chiralkit",
47
+ "assets": "public/chiralkit"
40
48
  }
41
49
  }
42
50
  ```
43
51
 
44
- Adding a provider = `pnpm --filter @chiralkit/cli add @ai-sdk/<provider>` + one case in `resolveModel()` at `src/generator/config.ts`.
52
+ Init creates `tokens/`, `primitives/`, `patterns/`, `enantiomers/`, `features/`, `compositions/layouts/` and `compositions/pages/`. Supported installers select source destinations using module ring metadata; this does not introduce support for additional module types or installers. Configuration and the lockfile stay in `ck/`; public/static assets keep their framework-native destination.
45
53
 
46
- ### Flags
54
+ Existing configs without `paths.source` keep `paths.components` as the legacy fallback. Add and update preserve configured paths and already locked destinations until an explicit migration.
47
55
 
48
- - `--stack <name>` — generate for a specific stack (defaults: every existing `implementations/<stack>/` folder).
49
- - `--dry-run` — call the LLM but do not write files; print the response.
50
- - `--debug-prompt` — print the prompt that WOULD be sent (AI SDK messages JSON in API mode; plaintext stdin in agent mode) and exit; do NOT invoke the LLM. Useful for debugging and for manually pasting into an agent that isn't wired yet.
51
- - `--force` — overwrite even if `generation.json.manually_edited` is `true`.
56
+ `ck tokens migrate` writes `<paths.source>/tokens/chiraltokens.css` with a configured source root, or `src/chiralkit/tokens/chiraltokens.css` in a new standalone project. Legacy configs and an existing standalone `ck/chiraltokens.css` retain the old output. `--out` always wins; `--dry-run` writes nothing, and existing output requires `--force` to overwrite.
52
57
 
53
- ## `scaffold registry` — onboarding a Stencil component
58
+ ### Explicit path migration
54
59
 
55
- Reads a `maintainer` block from `ck/chiralkit.config.json`:
56
-
57
- ```json
58
- {
59
- "maintainer": {
60
- "design_system_path": "packages/design-system/src/components",
61
- "registry_path": "registry"
62
- }
63
- }
60
+ ```bash
61
+ ck paths migrate # print a plan; no writes
62
+ ck paths migrate --check # exit 1 if changes are needed, otherwise 0
63
+ ck paths migrate --to src/chiralkit --yes # apply after reviewing the plan
64
64
  ```
65
65
 
66
- Given `<designSystemPath>/ds-<name>/ds-<name>.tsx` + `ds-<name>.css` (plus any companion files), `scaffold registry <name>` writes:
66
+ Only locked source files and known token CSS move. Assets, unknown files, local edits, original lock hashes and unknown metadata are preserved. Missing tracked files or destination collisions abort before writes. The config and lockfile remain in `ck/`.
67
67
 
68
- 1. `<registryPath>/<name>/component.json` — envelope with parsed `tag` + flattened `tokens_used`. Human fields (`description`, `category`, `translations`) start as sensible placeholders (`description: "TODO: describe <name>"`, `category: "primitive"`, `translations: {}`) — edit them after.
69
- 2. `<registryPath>/<name>/spec.json` — via `spec from-stencil`.
70
- 3. `<registryPath>/<name>/implementations/stencil/*` — per-file reversed symlinks (git mode 120000) into the source dir. Files-only, hidden-file-skipping, sub-directory-skipping. `--force` first sweeps any pre-existing symlinks so orphans don't survive source-file renames.
71
- 4. `<registryPath>/<name>/implementations/stencil/generation.json` — baseline `{manually_edited: true, ...nulls}`.
68
+ **Application imports are not rewritten.** Review the printed old-to-new import map and manually adjust consumer imports when applying the migration. Re-running an applied migration is a no-op.
72
69
 
73
- Refuses if the target already exists; pass `--force` to overwrite. When `--force` regenerates over an existing `spec.json` that had hand-authored `slot`, `a11y`, or `state_machine` fields (which `runFromStencil` doesn't extract), scaffold prints a `[WARN]` naming the dropped fields — re-add them before running `chiralkit doctor`.
70
+ ## Programmatic operations
74
71
 
75
- ## PM roadmap dashboard
72
+ Node hosts can use `@chiralkit/cli/operations` without starting the CLI or connecting a terminal. The entry exports `planAdd`, `applyAddPlan`, `planUpdate`, `applyUpdatePlan` and `formatUpdatePlan`, with their TypeScript contracts.
76
73
 
77
- ```bash
78
- ck pm # deterministic local dashboard; no model required
79
- ck pm --brief # same snapshot plus the read-only ck-pm interpretation
80
- ```
74
+ ```ts
75
+ import { planAdd, applyAddPlan, planUpdate, applyUpdatePlan } from '@chiralkit/cli/operations';
81
76
 
82
- The dashboard reads `ROADMAP.md` and `BACKLOG.md` independently, then adds active Git worktrees as operational context. Git inspection failures degrade only the Git section.
77
+ const installation = await planAdd({ moduleName: 'figure-canvas', cwd: projectRoot });
78
+ if (installation.status === 'blocked') throw new Error(installation.message);
79
+ // Inspect the plan before explicitly applying it. No files are installed yet.
80
+ await applyAddPlan(installation.plan); // Silent by default; accepts an optional log callback.
83
81
 
84
- Backlog tasks use explicit metadata:
85
-
86
- ```md
87
- - [ ] [fib:3] [priority:P1] [status:ready] Task text
82
+ const update = await planUpdate({ cwd: projectRoot });
83
+ if (update.status === 'blocked') throw new Error(update.message);
84
+ // A terminal, workspace or other Node host decides whether to apply the plan.
85
+ if (update.plan.modules.length > 0) await applyUpdatePlan(update.plan);
88
86
  ```
89
87
 
90
- - `fib`: `0 | 1 | 2 | 3 | 5 | 8 | 13`, expressing relative effort, difficulty, and time—not hours.
91
- - `priority`: `P0 | P1 | P2 | P3`, expressing attraction toward doing the task now.
92
- - `status`: `ready | active | blocked | done`.
93
- - `[x]` requires `status:done`; unchecked tasks cannot be `done`.
94
-
95
- Priority and Fibonacci are the planning pair `attraction ↔ resistance`; they remain separate and are never collapsed into one score. Missing or invalid metadata appears under `INVALID` and makes `ck pm` exit non-zero without hiding the rest of the dashboard. Tasks at `fib:8` or `fib:13` produce a decomposition warning, not an error.
88
+ Both planning operations share `OperationPreparation<TPlan>`: `{ status: "ready", plan }` or `{ status: "blocked", code, message }`. Planning reads configuration, registry metadata and installed files; it does not install files, modify package dependencies, write locks or prompt. Execution performs writes and returns data. `applyAddPlan` accepts `{ log, now }`; `applyUpdatePlan` accepts `{ now }`. The clock is optional and returns an ISO timestamp. CLI adapters translate blocked results into their existing messages and exit codes.
96
89
 
97
- `ck pm --brief` sends only the deterministic `ProjectSnapshot` to the L5 `ck-pm` persona. The agent cannot edit files, mutate Git, or infer missing planning data.
90
+ These are ephemeral plans for an explicit application root (`cwd`). They are not serialized transactions or protection against concurrent external edits. Update execution preserves the plan's lock snapshot. Filesystem operations remain Node-specific; this entry is not a browser API. Existing config/lock formats and legacy or namespaced destinations remain unchanged.
package/dist/add.d.ts CHANGED
@@ -1,4 +1,17 @@
1
1
  import { type ModuleType } from "@chiralkit/registry-schema";
2
+ export type AddArgs = {
3
+ ok: true;
4
+ name: string;
5
+ registry: string | undefined;
6
+ type: ModuleType | undefined;
7
+ } | {
8
+ ok: false;
9
+ message: string;
10
+ };
11
+ /** Parse `ck add` arguments: `--flag value` or `--flag=value`; any other `--flag` is an error. */
12
+ export declare function parseAddArgs(args: string[]): AddArgs;
13
+ export declare const REMOTE_TYPE_UNSUPPORTED = "--type is not supported with the remote registry yet.";
2
14
  export declare function runAdd(moduleName: string, cwd?: string, opts?: {
3
15
  type?: ModuleType;
16
+ registry?: string;
4
17
  }): Promise<void>;
package/dist/add.js CHANGED
@@ -1,118 +1,55 @@
1
- import { readFile, readdir, stat } from "node:fs/promises";
2
- import { join, resolve } from "node:path";
3
- import { parseModule, } from "@chiralkit/registry-schema";
4
- import { resolveKitsRoot } from "@chiralkit/kits";
5
- import { readConfig } from "./config.js";
6
- import { createInstallContext, findInstaller } from "./installers/index.js";
7
- import { hashFile, legacyLockExists, legacyLockMigrationHint, lockExists, lockKey, readLock, toRelativePosix, writeLock, } from "./lock.js";
8
- import { MODULE_ENVELOPE_FILENAME, TYPE_TO_FAMILY, walkAllKitRegistries, } from "./registry-layout.js";
9
- // Resolves a module name to its envelope path by walking every kit's
10
- // registry/<family>/<name>/ layout, family- and kit-agnostically. `type`,
11
- // when given, narrows the search to a single family up front — useful once
12
- // a name collides across families (see the ambiguity error below).
13
- async function resolveModuleRef(kitsRoot, moduleName, type) {
14
- const modules = await walkAllKitRegistries(kitsRoot);
15
- const matches = modules.filter((m) => m.name === moduleName && (type === undefined || m.family === TYPE_TO_FAMILY[type]));
16
- if (matches.length === 0) {
17
- throw new Error(type
18
- ? `Module '${moduleName}' (type '${type}') not found under ${kitsRoot}.`
19
- : `Module '${moduleName}' not found under ${kitsRoot}.`);
20
- }
21
- if (matches.length > 1) {
22
- const families = matches.map((m) => m.family).join(", ");
23
- throw new Error(`Module '${moduleName}' exists in multiple families (${families}). Pass --type <t> to disambiguate.`);
24
- }
25
- return matches[0];
26
- }
27
- export async function runAdd(moduleName, cwd = process.cwd(), opts = {}) {
28
- const config = await readConfig(cwd);
29
- const registryRoot = resolve(cwd, config.registry_path);
30
- const ref = await resolveModuleRef(resolveKitsRoot(), moduleName, opts.type);
31
- let raw;
32
- try {
33
- raw = await readFile(ref.envelopePath, "utf8");
34
- }
35
- catch {
36
- throw new Error(`Module '${moduleName}' not found at ${ref.envelopePath}.`);
37
- }
38
- const mod = parseModule(JSON.parse(raw));
39
- if (mod.type !== "ui-component") {
40
- throw new Error(`Only ui-component modules supported in v0. Got: ${mod.type}`);
41
- }
42
- const spec = mod.spec;
43
- const installer = findInstaller(spec.tech, config.framework);
44
- if (!installer.supports(mod)) {
45
- throw new Error(`Installer for '${spec.tech}' × '${config.framework}' does not support module '${mod.name}'.`);
46
- }
47
- const ctx = createInstallContext(cwd, registryRoot, config);
48
- await installer.install(mod, ctx);
49
- await recordInstall(cwd, ref, mod, config.paths.components);
50
- console.log(`Added: ${mod.name}@${mod.metadata.version} (${spec.tech} → ${config.framework})`);
51
- }
52
- // Appends (or replaces) the module's entry in chiralkit.lock.json. Runs
53
- // after the installer, so writing succeeds only when the copy did. When
54
- // the lock does not exist yet, it is created — 'add' is the natural
55
- // bootstrap point so first-time projects do not need to run 'lock --init'
56
- // before they have anything to lock.
57
- async function recordInstall(cwd, ref, mod, componentsRel) {
58
- if (!(await lockExists(cwd)) && (await legacyLockExists(cwd))) {
59
- throw new Error(legacyLockMigrationHint(cwd));
60
- }
61
- const lock = (await lockExists(cwd))
62
- ? await readLock(cwd)
63
- : { modules: {} };
64
- const componentsAbs = resolve(cwd, componentsRel);
65
- const registryBases = await collectRegistryFileBasenames(ref.moduleDir);
66
- const files = {};
67
- for (const base of registryBases) {
68
- const abs = join(componentsAbs, base);
69
- try {
70
- const h = await hashFile(abs);
71
- files[toRelativePosix(cwd, abs)] = h;
72
- }
73
- catch {
74
- // File was in the registry but not written to the consumer; skip.
75
- // This happens on stacks where component.assets covers only a
76
- // subset of the registry source tree (e.g. Django ships from
77
- // runtime.assets, not per-component).
1
+ import { MODULE_TYPES } from "@chiralkit/registry-schema";
2
+ import { planAdd, applyAddPlan } from "./operations/add.js";
3
+ import { applyRemoteAddPlan, planRemoteAdd, shouldUseRemote } from "./operations/add-remote.js";
4
+ const ADD_VALUE_FLAGS = new Set(["--registry", "--type"]);
5
+ /** Parse `ck add` arguments: `--flag value` or `--flag=value`; any other `--flag` is an error. */
6
+ export function parseAddArgs(args) {
7
+ const values = {};
8
+ let name;
9
+ for (let i = 0; i < args.length; i++) {
10
+ const arg = args[i];
11
+ if (!arg.startsWith("--")) {
12
+ name ??= arg;
13
+ continue;
78
14
  }
79
- }
80
- lock.modules[lockKey(mod.name, mod.type)] = {
81
- type: mod.type,
82
- version: mod.metadata.version,
83
- installed_at: new Date().toISOString(),
84
- files,
85
- };
86
- await writeLock(cwd, lock);
15
+ const eq = arg.indexOf("=");
16
+ const flag = eq < 0 ? arg : arg.slice(0, eq);
17
+ if (!ADD_VALUE_FLAGS.has(flag))
18
+ return { ok: false, message: `add: unknown option ${arg}` };
19
+ let value;
20
+ if (eq >= 0)
21
+ value = arg.slice(eq + 1);
22
+ else if (args[i + 1] !== undefined && !args[i + 1].startsWith("--"))
23
+ value = args[++i];
24
+ values[flag] = value;
25
+ }
26
+ const registry = values["--registry"];
27
+ if ("--registry" in values && !registry)
28
+ return { ok: false, message: "--registry requires a URL." };
29
+ const type = values["--type"];
30
+ if ("--type" in values && !MODULE_TYPES.includes(type ?? "")) {
31
+ return { ok: false, message: `--type must be one of ${MODULE_TYPES.join(", ")}. Got: ${type || "(missing)"}` };
32
+ }
33
+ if (!name)
34
+ return { ok: false, message: "add: missing module name" };
35
+ return { ok: true, name, registry, type: type };
87
36
  }
88
- async function collectRegistryFileBasenames(moduleDir) {
89
- const out = [];
90
- async function walk(dir) {
91
- let entries;
92
- try {
93
- entries = await readdir(dir, { withFileTypes: true });
94
- }
95
- catch {
96
- return;
97
- }
98
- for (const e of entries) {
99
- const p = join(dir, e.name);
100
- if (e.isDirectory()) {
101
- await walk(p);
102
- }
103
- else if (e.isFile() || e.isSymbolicLink()) {
104
- try {
105
- const s = await stat(p);
106
- if (s.isFile())
107
- out.push(e.name);
108
- }
109
- catch {
110
- /* dangling symlink; skip */
111
- }
112
- }
113
- }
114
- }
115
- await walk(moduleDir);
116
- return out.filter((b) => b !== MODULE_ENVELOPE_FILENAME && b !== "spec.json");
37
+ export const REMOTE_TYPE_UNSUPPORTED = "--type is not supported with the remote registry yet.";
38
+ export async function runAdd(moduleName, cwd = process.cwd(), opts = {}) {
39
+ const log = (message) => console.log(message);
40
+ if (await shouldUseRemote(cwd, { registry: opts.registry })) {
41
+ if (opts.type !== undefined)
42
+ throw new Error(REMOTE_TYPE_UNSUPPORTED);
43
+ const preparation = await planRemoteAdd({ moduleName, cwd, registryUrl: opts.registry });
44
+ if (preparation.status === "blocked")
45
+ throw new Error(preparation.message);
46
+ await applyRemoteAddPlan(preparation.plan, { log });
47
+ return;
48
+ }
49
+ const preparation = await planAdd({ moduleName, cwd, type: opts.type });
50
+ if (preparation.status === "blocked")
51
+ throw new Error(preparation.message);
52
+ const result = await applyAddPlan(preparation.plan, { log });
53
+ console.log(`Added: ${result.name}@${result.version} (${result.tech} → ${result.framework})`);
117
54
  }
118
55
  //# sourceMappingURL=add.js.map
package/dist/add.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"add.js","sourceRoot":"","sources":["../src/add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AAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;IACxE,IAAI,WAAW,CAAC,MAAM,KAAK,SAAS;QAAE,MAAM,IAAI,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;IAC3E,MAAM,MAAM,GAAG,MAAM,YAAY,CAAC,WAAW,CAAC,IAAI,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC;IAC7D,OAAO,CAAC,GAAG,CACT,UAAU,MAAM,CAAC,IAAI,IAAI,MAAM,CAAC,OAAO,KAAK,MAAM,CAAC,IAAI,MAAM,MAAM,CAAC,SAAS,GAAG,CACjF,CAAC;AACJ,CAAC"}
package/dist/config.d.ts CHANGED
@@ -3,12 +3,14 @@ export declare const CONFIG_DIR = "ck";
3
3
  export declare const CONFIG_FILE = "chiralkit.config.json";
4
4
  export declare function configPath(cwd: string): string;
5
5
  export interface ChiralkitPaths {
6
+ source?: string;
6
7
  components: string;
7
8
  assets: string;
8
9
  }
9
10
  export interface ChiralkitConfig {
10
11
  framework: FrameworkTarget;
11
- registry_path: string;
12
+ registry_path?: string;
13
+ registry_url?: string;
12
14
  paths: ChiralkitPaths;
13
15
  }
14
16
  export declare function defaultPaths(framework: FrameworkTarget): ChiralkitPaths;
package/dist/config.js CHANGED
@@ -6,19 +6,22 @@ export function configPath(cwd) {
6
6
  return join(cwd, CONFIG_DIR, CONFIG_FILE);
7
7
  }
8
8
  export function defaultPaths(framework) {
9
+ const source = framework === "django-template" ? "templates/chiralkit" : "src/chiralkit";
9
10
  switch (framework) {
10
11
  case "react":
11
12
  return {
12
- components: "src/components/chiralkit",
13
+ source: source,
14
+ components: source,
13
15
  assets: "public/chiralkit",
14
16
  };
15
17
  case "django-template":
16
18
  return {
17
- components: "templates/chiralkit",
19
+ source: source,
20
+ components: source,
18
21
  assets: "static/chiralkit-ds",
19
22
  };
20
23
  case "html":
21
- return { components: "components", assets: "assets" };
24
+ return { source: source, components: source, assets: "assets" };
22
25
  }
23
26
  }
24
27
  export async function configExists(cwd) {
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAG1C,MAAM,CAAC,MAAM,UAAU,GAAG,IAAI,CAAC;AAC/B,MAAM,CAAC,MAAM,WAAW,GAAG,uBAAuB,CAAC;AAEnD,MAAM,UAAU,UAAU,CAAC,GAAW;IACpC,OAAO,IAAI,CAAC,GAAG,EAAE,UAAU,EAAE,WAAW,CAAC,CAAC;AAC5C,CAAC;AAaD,MAAM,UAAU,YAAY,CAAC,SAA0B;IACrD,QAAQ,SAAS,EAAE,CAAC;QAClB,KAAK,OAAO;YACV,OAAO;gBACL,UAAU,EAAE,0BAA0B;gBACtC,MAAM,EAAE,kBAAkB;aAC3B,CAAC;QACJ,KAAK,iBAAiB;YACpB,OAAO;gBACL,UAAU,EAAE,qBAAqB;gBACjC,MAAM,EAAE,qBAAqB;aAC9B,CAAC;QACJ,KAAK,MAAM;YACT,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;IAC1D,CAAC;AACH,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,GAAW;IAC5C,IAAI,CAAC;QACH,MAAM,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC;QAC9B,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED,sEAAsE;AACtE,uEAAuE;AACvE,8CAA8C;AAC9C,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,GAAW;IAClD,IAAI,CAAC;QACH,MAAM,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,WAAW,CAAC,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,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC;QAC5D,MAAM,IAAI,KAAK,CACb,GAAG,UAAU,IAAI,WAAW,4IAA4I,CACzK,CAAC;IACJ,CAAC;IACD,MAAM,KAAK,GAAG,CAA4B,CAAC;IAC3C,MAAM,EAAE,GAAG,KAAK,CAAC,oBAAoB,CAAC,CAAC;IACvC,MAAM,EAAE,GAAG,KAAK,CAAC,eAAe,CAAC,CAAC;IAClC,IAAI,OAAO,EAAE,KAAK,QAAQ,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC9C,MAAM,IAAI,KAAK,CACb,gJAAgJ,CACjJ,CAAC;IACJ,CAAC;IACD,IAAI,OAAO,EAAE,KAAK,QAAQ,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC9C,MAAM,IAAI,KAAK,CACb,oGAAoG,CACrG,CAAC;IACJ,CAAC;IACD,OAAO,EAAE,kBAAkB,EAAE,EAAE,EAAE,aAAa,EAAE,EAAE,EAAE,CAAC;AACvD,CAAC"}
package/dist/doctor.js CHANGED
@@ -2,7 +2,7 @@ import { readdir, readFile, realpath } from "node:fs/promises";
2
2
  import { join, relative, resolve, sep } from "node:path";
3
3
  import { z } from "zod";
4
4
  import { parseComponentContract, parseAgentCapabilities, parseAgentContract, parseAgentSpec, parseModule, } from "@chiralkit/registry-schema";
5
- import { resolveKitsRoot } from "@chiralkit/kits";
5
+ import { resolveKitsRoot } from "./kits-root.js";
6
6
  import { MODULE_ENVELOPE_FILENAME, walkAllKitRegistries, } from "./registry-layout.js";
7
7
  import { runInvariants } from "./doctor-invariants.js";
8
8
  function ok(r, msg) {