@agents-inc/cli 0.48.0 → 0.50.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 (250) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/README.md +1 -2
  3. package/config/stacks.yaml +0 -1
  4. package/dist/{chunk-YDASDMTH.js → chunk-26MXZUHU.js} +2 -2
  5. package/dist/{chunk-WSGKCBY5.js → chunk-2BWCR762.js} +2 -3
  6. package/dist/chunk-2BWCR762.js.map +1 -0
  7. package/dist/chunk-3VOL4WEG.js +31 -0
  8. package/dist/chunk-3VOL4WEG.js.map +1 -0
  9. package/dist/chunk-4QWDB2MD.js +571 -0
  10. package/dist/chunk-4QWDB2MD.js.map +1 -0
  11. package/dist/{chunk-ZML3OCYA.js → chunk-4R52TQ3K.js} +2 -2
  12. package/dist/{chunk-KPJJOLAQ.js → chunk-5FCHJLM7.js} +34 -16
  13. package/dist/chunk-5FCHJLM7.js.map +1 -0
  14. package/dist/chunk-5FPIKTSA.js +40 -0
  15. package/dist/chunk-5FPIKTSA.js.map +1 -0
  16. package/dist/{chunk-SPVSWDFM.js → chunk-5L724R4C.js} +5 -6
  17. package/dist/{chunk-SPVSWDFM.js.map → chunk-5L724R4C.js.map} +1 -1
  18. package/dist/{chunk-AXV7NFFJ.js → chunk-7LV4V6A4.js} +4 -4
  19. package/dist/{chunk-LESHL6SM.js → chunk-AWP5A6IM.js} +9 -3
  20. package/dist/chunk-AWP5A6IM.js.map +1 -0
  21. package/dist/chunk-C3Q43WLC.js +118 -0
  22. package/dist/chunk-C3Q43WLC.js.map +1 -0
  23. package/dist/{chunk-U2AEK4ZL.js → chunk-CMNKHDOX.js} +2 -2
  24. package/dist/{chunk-X3SZIBVW.js → chunk-D72AFYQR.js} +2 -2
  25. package/dist/chunk-D72AFYQR.js.map +1 -0
  26. package/dist/{chunk-FPTUCWBY.js → chunk-DCE423KO.js} +46 -30
  27. package/dist/chunk-DCE423KO.js.map +1 -0
  28. package/dist/chunk-GBOW6FUW.js +74 -0
  29. package/dist/chunk-GBOW6FUW.js.map +1 -0
  30. package/dist/{chunk-P2SFRDWI.js → chunk-HMSHB5EQ.js} +437 -185
  31. package/dist/chunk-HMSHB5EQ.js.map +1 -0
  32. package/dist/{chunk-GSPPOXMG.js → chunk-HYEUETIC.js} +2 -2
  33. package/dist/{chunk-IS7GP6XC.js → chunk-I6IOGZSZ.js} +61 -52
  34. package/dist/chunk-I6IOGZSZ.js.map +1 -0
  35. package/dist/{chunk-OTTITQ7C.js → chunk-JFF7P4LC.js} +30 -93
  36. package/dist/chunk-JFF7P4LC.js.map +1 -0
  37. package/dist/{chunk-FHKNG3UA.js → chunk-JWYRXE6C.js} +2 -2
  38. package/dist/{chunk-W62XVWXB.js → chunk-KAO3LKB5.js} +3 -3
  39. package/dist/{chunk-AMNCCZSG.js → chunk-KQOU4POU.js} +26 -28
  40. package/dist/chunk-KQOU4POU.js.map +1 -0
  41. package/dist/{chunk-VBAAATPU.js → chunk-M3GQ2R3E.js} +29 -28
  42. package/dist/chunk-M3GQ2R3E.js.map +1 -0
  43. package/dist/{chunk-2BVZOYJP.js → chunk-PGY5XROM.js} +2 -2
  44. package/dist/chunk-PGY5XROM.js.map +1 -0
  45. package/dist/{chunk-5MN5S3DV.js → chunk-QB5HHTAA.js} +8 -19
  46. package/dist/chunk-QB5HHTAA.js.map +1 -0
  47. package/dist/{chunk-34BP5BC4.js → chunk-QYLCINGC.js} +2 -2
  48. package/dist/{chunk-I52THVF6.js → chunk-RA2IPRO2.js} +2 -2
  49. package/dist/{chunk-G5OZQ376.js → chunk-RDWGYKDY.js} +4 -4
  50. package/dist/{chunk-7IAKVZL5.js → chunk-RFKDGJAJ.js} +26 -57
  51. package/dist/chunk-RFKDGJAJ.js.map +1 -0
  52. package/dist/{chunk-5O6GKXAN.js → chunk-SPFHPHYL.js} +7 -7
  53. package/dist/{chunk-NJVJ7VO5.js → chunk-U2W5SENM.js} +3 -3
  54. package/dist/{chunk-37QYD33C.js → chunk-U7X4V4HE.js} +2 -2
  55. package/dist/{chunk-C7DLY64D.js → chunk-UAD3SC27.js} +4 -12
  56. package/dist/chunk-UAD3SC27.js.map +1 -0
  57. package/dist/{chunk-YMUWTPOM.js → chunk-WBHPCBVN.js} +31 -11
  58. package/dist/chunk-WBHPCBVN.js.map +1 -0
  59. package/dist/chunk-WFFV254H.js +314 -0
  60. package/dist/chunk-WFFV254H.js.map +1 -0
  61. package/dist/{chunk-F7KTUFGU.js → chunk-WJHFV6RI.js} +3 -2
  62. package/dist/chunk-WJHFV6RI.js.map +1 -0
  63. package/dist/{chunk-DG2U2WY3.js → chunk-WLZHCM7O.js} +2 -2
  64. package/dist/{chunk-OHDEJEYB.js → chunk-XDSVV5GZ.js} +4 -4
  65. package/dist/{chunk-2DNDAXF6.js → chunk-YDYRAXSY.js} +57 -27
  66. package/dist/chunk-YDYRAXSY.js.map +1 -0
  67. package/dist/commands/build/marketplace.js +4 -4
  68. package/dist/commands/build/plugins.js +5 -5
  69. package/dist/commands/build/stack.js +5 -5
  70. package/dist/commands/compile.js +11 -9
  71. package/dist/commands/compile.js.map +1 -1
  72. package/dist/commands/config/get.js +4 -4
  73. package/dist/commands/config/index.js +5 -5
  74. package/dist/commands/config/path.js +4 -4
  75. package/dist/commands/config/set-project.js +4 -4
  76. package/dist/commands/config/show.js +5 -5
  77. package/dist/commands/config/unset-project.js +4 -4
  78. package/dist/commands/diff.js +4 -4
  79. package/dist/commands/doctor.js +4 -4
  80. package/dist/commands/edit.js +58 -52
  81. package/dist/commands/edit.js.map +1 -1
  82. package/dist/commands/eject.js +4 -4
  83. package/dist/commands/import/skill.js +5 -5
  84. package/dist/commands/info.js +5 -5
  85. package/dist/commands/init.js +40 -435
  86. package/dist/commands/init.js.map +1 -1
  87. package/dist/commands/list.js +4 -4
  88. package/dist/commands/new/agent.js +11 -10
  89. package/dist/commands/new/agent.js.map +1 -1
  90. package/dist/commands/new/marketplace.js +24 -5
  91. package/dist/commands/new/marketplace.js.map +1 -1
  92. package/dist/commands/new/skill.js +15 -208
  93. package/dist/commands/new/skill.js.map +1 -1
  94. package/dist/commands/outdated.js +11 -7
  95. package/dist/commands/outdated.js.map +1 -1
  96. package/dist/commands/search.js +7 -7
  97. package/dist/commands/uninstall.js +6 -6
  98. package/dist/commands/update.js +6 -6
  99. package/dist/commands/validate.js +26 -247
  100. package/dist/commands/validate.js.map +1 -1
  101. package/dist/components/skill-search/skill-search.js +3 -3
  102. package/dist/components/wizard/category-grid.js +3 -2
  103. package/dist/components/wizard/category-grid.test.js +112 -58
  104. package/dist/components/wizard/category-grid.test.js.map +1 -1
  105. package/dist/components/wizard/checkbox-grid.js +5 -3
  106. package/dist/components/wizard/checkbox-grid.test.js +5 -4
  107. package/dist/components/wizard/checkbox-grid.test.js.map +1 -1
  108. package/dist/components/wizard/domain-selection.js +11 -9
  109. package/dist/components/wizard/help-modal.js +2 -2
  110. package/dist/components/wizard/menu-item.js +1 -1
  111. package/dist/components/wizard/search-modal.js +2 -2
  112. package/dist/components/wizard/search-modal.test.js +2 -2
  113. package/dist/components/wizard/section-progress.js +2 -2
  114. package/dist/components/wizard/section-progress.test.js +2 -2
  115. package/dist/components/wizard/selection-card.js +2 -2
  116. package/dist/components/wizard/source-grid.js +4 -3
  117. package/dist/components/wizard/source-grid.test.js +4 -3
  118. package/dist/components/wizard/source-grid.test.js.map +1 -1
  119. package/dist/components/wizard/stack-selection.js +8 -8
  120. package/dist/components/wizard/step-agents.js +10 -8
  121. package/dist/components/wizard/step-agents.test.js +18 -17
  122. package/dist/components/wizard/step-agents.test.js.map +1 -1
  123. package/dist/components/wizard/step-build.js +9 -8
  124. package/dist/components/wizard/step-build.test.js +11 -25
  125. package/dist/components/wizard/step-build.test.js.map +1 -1
  126. package/dist/components/wizard/step-confirm.js +4 -4
  127. package/dist/components/wizard/step-confirm.test.js +8 -8
  128. package/dist/components/wizard/step-refine.js +2 -2
  129. package/dist/components/wizard/step-refine.test.js +2 -2
  130. package/dist/components/wizard/step-settings.js +7 -5
  131. package/dist/components/wizard/step-settings.test.js +10 -8
  132. package/dist/components/wizard/step-settings.test.js.map +1 -1
  133. package/dist/components/wizard/step-sources.js +11 -10
  134. package/dist/components/wizard/step-sources.test.js +12 -11
  135. package/dist/components/wizard/step-sources.test.js.map +1 -1
  136. package/dist/components/wizard/step-stack.js +15 -12
  137. package/dist/components/wizard/step-stack.test.js +16 -13
  138. package/dist/components/wizard/step-stack.test.js.map +1 -1
  139. package/dist/components/wizard/view-title.js +2 -2
  140. package/dist/components/wizard/wizard-layout.js +8 -8
  141. package/dist/components/wizard/wizard-tabs.js +2 -2
  142. package/dist/components/wizard/wizard-tabs.test.js +2 -2
  143. package/dist/components/wizard/wizard.js +27 -25
  144. package/dist/config/stacks.yaml +0 -1
  145. package/dist/hooks/init.js +55 -3
  146. package/dist/hooks/init.js.map +1 -1
  147. package/dist/{source-manager-Y7R6WPOW.js → source-manager-BVB2SG73.js} +4 -4
  148. package/dist/src/agents/meta/agent-summoner/critical-reminders.md +1 -1
  149. package/dist/src/agents/meta/agent-summoner/critical-requirements.md +1 -1
  150. package/dist/src/agents/meta/agent-summoner/examples.md +2 -2
  151. package/dist/src/agents/meta/agent-summoner/output-format.md +1 -1
  152. package/dist/src/agents/meta/agent-summoner/workflow.md +5 -7
  153. package/{src/agents/meta/documentor/agent.yaml → dist/src/agents/meta/documentor/metadata.yaml} +1 -0
  154. package/dist/stores/wizard-store.js +5 -5
  155. package/dist/stores/wizard-store.test.js +79 -27
  156. package/dist/stores/wizard-store.test.js.map +1 -1
  157. package/package.json +1 -1
  158. package/src/agents/meta/agent-summoner/critical-reminders.md +1 -1
  159. package/src/agents/meta/agent-summoner/critical-requirements.md +1 -1
  160. package/src/agents/meta/agent-summoner/examples.md +2 -2
  161. package/src/agents/meta/agent-summoner/output-format.md +1 -1
  162. package/src/agents/meta/agent-summoner/workflow.md +5 -7
  163. package/{dist/src/agents/meta/documentor/agent.yaml → src/agents/meta/documentor/metadata.yaml} +1 -0
  164. package/src/schemas/agent.schema.json +1 -1
  165. package/src/schemas/project-config.schema.json +0 -3
  166. package/dist/chunk-2BVZOYJP.js.map +0 -1
  167. package/dist/chunk-2DNDAXF6.js.map +0 -1
  168. package/dist/chunk-5MN5S3DV.js.map +0 -1
  169. package/dist/chunk-7IAKVZL5.js.map +0 -1
  170. package/dist/chunk-AMNCCZSG.js.map +0 -1
  171. package/dist/chunk-AXZNJ5PN.js +0 -99
  172. package/dist/chunk-AXZNJ5PN.js.map +0 -1
  173. package/dist/chunk-C7DLY64D.js.map +0 -1
  174. package/dist/chunk-F7KTUFGU.js.map +0 -1
  175. package/dist/chunk-FPTUCWBY.js.map +0 -1
  176. package/dist/chunk-IS7GP6XC.js.map +0 -1
  177. package/dist/chunk-KPJJOLAQ.js.map +0 -1
  178. package/dist/chunk-LESHL6SM.js.map +0 -1
  179. package/dist/chunk-OTTITQ7C.js.map +0 -1
  180. package/dist/chunk-P2SFRDWI.js.map +0 -1
  181. package/dist/chunk-PY2XZUBF.js +0 -29
  182. package/dist/chunk-PY2XZUBF.js.map +0 -1
  183. package/dist/chunk-VBAAATPU.js.map +0 -1
  184. package/dist/chunk-WSGKCBY5.js.map +0 -1
  185. package/dist/chunk-X3SZIBVW.js.map +0 -1
  186. package/dist/chunk-YMUWTPOM.js.map +0 -1
  187. package/dist/src/agents/migration/cli-migrator/agent.yaml +0 -12
  188. package/dist/src/agents/migration/cli-migrator/anti-patterns.md +0 -158
  189. package/dist/src/agents/migration/cli-migrator/conversion-mappings.md +0 -63
  190. package/dist/src/agents/migration/cli-migrator/critical-reminders.md +0 -17
  191. package/dist/src/agents/migration/cli-migrator/critical-requirements.md +0 -13
  192. package/dist/src/agents/migration/cli-migrator/intro.md +0 -15
  193. package/dist/src/agents/migration/cli-migrator/output-format.md +0 -164
  194. package/dist/src/agents/migration/cli-migrator/workflow.md +0 -230
  195. package/src/agents/migration/cli-migrator/agent.yaml +0 -12
  196. package/src/agents/migration/cli-migrator/anti-patterns.md +0 -158
  197. package/src/agents/migration/cli-migrator/conversion-mappings.md +0 -63
  198. package/src/agents/migration/cli-migrator/critical-reminders.md +0 -17
  199. package/src/agents/migration/cli-migrator/critical-requirements.md +0 -13
  200. package/src/agents/migration/cli-migrator/intro.md +0 -15
  201. package/src/agents/migration/cli-migrator/output-format.md +0 -164
  202. package/src/agents/migration/cli-migrator/workflow.md +0 -230
  203. /package/dist/{chunk-YDASDMTH.js.map → chunk-26MXZUHU.js.map} +0 -0
  204. /package/dist/{chunk-ZML3OCYA.js.map → chunk-4R52TQ3K.js.map} +0 -0
  205. /package/dist/{chunk-AXV7NFFJ.js.map → chunk-7LV4V6A4.js.map} +0 -0
  206. /package/dist/{chunk-U2AEK4ZL.js.map → chunk-CMNKHDOX.js.map} +0 -0
  207. /package/dist/{chunk-GSPPOXMG.js.map → chunk-HYEUETIC.js.map} +0 -0
  208. /package/dist/{chunk-FHKNG3UA.js.map → chunk-JWYRXE6C.js.map} +0 -0
  209. /package/dist/{chunk-W62XVWXB.js.map → chunk-KAO3LKB5.js.map} +0 -0
  210. /package/dist/{chunk-34BP5BC4.js.map → chunk-QYLCINGC.js.map} +0 -0
  211. /package/dist/{chunk-I52THVF6.js.map → chunk-RA2IPRO2.js.map} +0 -0
  212. /package/dist/{chunk-G5OZQ376.js.map → chunk-RDWGYKDY.js.map} +0 -0
  213. /package/dist/{chunk-5O6GKXAN.js.map → chunk-SPFHPHYL.js.map} +0 -0
  214. /package/dist/{chunk-NJVJ7VO5.js.map → chunk-U2W5SENM.js.map} +0 -0
  215. /package/dist/{chunk-37QYD33C.js.map → chunk-U7X4V4HE.js.map} +0 -0
  216. /package/dist/{chunk-DG2U2WY3.js.map → chunk-WLZHCM7O.js.map} +0 -0
  217. /package/dist/{chunk-OHDEJEYB.js.map → chunk-XDSVV5GZ.js.map} +0 -0
  218. /package/dist/{source-manager-Y7R6WPOW.js.map → source-manager-BVB2SG73.js.map} +0 -0
  219. /package/dist/src/agents/developer/api-developer/{agent.yaml → metadata.yaml} +0 -0
  220. /package/dist/src/agents/developer/cli-developer/{agent.yaml → metadata.yaml} +0 -0
  221. /package/dist/src/agents/developer/web-architecture/{agent.yaml → metadata.yaml} +0 -0
  222. /package/dist/src/agents/developer/web-developer/{agent.yaml → metadata.yaml} +0 -0
  223. /package/dist/src/agents/meta/agent-summoner/{agent.yaml → metadata.yaml} +0 -0
  224. /package/dist/src/agents/meta/skill-summoner/{agent.yaml → metadata.yaml} +0 -0
  225. /package/dist/src/agents/pattern/pattern-scout/{agent.yaml → metadata.yaml} +0 -0
  226. /package/dist/src/agents/pattern/web-pattern-critique/{agent.yaml → metadata.yaml} +0 -0
  227. /package/dist/src/agents/planning/web-pm/{agent.yaml → metadata.yaml} +0 -0
  228. /package/dist/src/agents/researcher/api-researcher/{agent.yaml → metadata.yaml} +0 -0
  229. /package/dist/src/agents/researcher/web-researcher/{agent.yaml → metadata.yaml} +0 -0
  230. /package/dist/src/agents/reviewer/api-reviewer/{agent.yaml → metadata.yaml} +0 -0
  231. /package/dist/src/agents/reviewer/cli-reviewer/{agent.yaml → metadata.yaml} +0 -0
  232. /package/dist/src/agents/reviewer/web-reviewer/{agent.yaml → metadata.yaml} +0 -0
  233. /package/dist/src/agents/tester/cli-tester/{agent.yaml → metadata.yaml} +0 -0
  234. /package/dist/src/agents/tester/web-tester/{agent.yaml → metadata.yaml} +0 -0
  235. /package/src/agents/developer/api-developer/{agent.yaml → metadata.yaml} +0 -0
  236. /package/src/agents/developer/cli-developer/{agent.yaml → metadata.yaml} +0 -0
  237. /package/src/agents/developer/web-architecture/{agent.yaml → metadata.yaml} +0 -0
  238. /package/src/agents/developer/web-developer/{agent.yaml → metadata.yaml} +0 -0
  239. /package/src/agents/meta/agent-summoner/{agent.yaml → metadata.yaml} +0 -0
  240. /package/src/agents/meta/skill-summoner/{agent.yaml → metadata.yaml} +0 -0
  241. /package/src/agents/pattern/pattern-scout/{agent.yaml → metadata.yaml} +0 -0
  242. /package/src/agents/pattern/web-pattern-critique/{agent.yaml → metadata.yaml} +0 -0
  243. /package/src/agents/planning/web-pm/{agent.yaml → metadata.yaml} +0 -0
  244. /package/src/agents/researcher/api-researcher/{agent.yaml → metadata.yaml} +0 -0
  245. /package/src/agents/researcher/web-researcher/{agent.yaml → metadata.yaml} +0 -0
  246. /package/src/agents/reviewer/api-reviewer/{agent.yaml → metadata.yaml} +0 -0
  247. /package/src/agents/reviewer/cli-reviewer/{agent.yaml → metadata.yaml} +0 -0
  248. /package/src/agents/reviewer/web-reviewer/{agent.yaml → metadata.yaml} +0 -0
  249. /package/src/agents/tester/cli-tester/{agent.yaml → metadata.yaml} +0 -0
  250. /package/src/agents/tester/web-tester/{agent.yaml → metadata.yaml} +0 -0
@@ -1,15 +0,0 @@
1
- You are an expert CLI migration specialist converting Command.js + @clack/prompts code to oclif + Ink.
2
-
3
- **When converting CLI code, be comprehensive and thorough. Include all necessary pattern mappings, handle edge cases, and verify the converted code follows oclif + Ink best practices.**
4
-
5
- Your job is **surgical migration**: read the source Commander.js code, map patterns to oclif equivalents, convert @clack/prompts to Ink components, and verify the migration is complete.
6
-
7
- **Your focus:**
8
-
9
- - Converting Commander.js command definitions to oclif class-based commands
10
- - Migrating @clack/prompts interactive flows to Ink + @inkjs/ui components
11
- - Replacing picocolors with Ink's `<Text>` component styling
12
- - Converting wizard state machines to Zustand stores + Ink components
13
- - Ensuring consistent error handling and exit patterns
14
-
15
- **This is a TEMPORARY agent** created specifically for the migration from Commander.js to oclif + Ink. Once migration is complete, this agent should be retired.
@@ -1,164 +0,0 @@
1
- ## Output Format
2
-
3
- <output_format>
4
- Provide your migration in this structure:
5
-
6
- <summary>
7
- **Source:** [Commander.js file path]
8
- **Target:** [oclif command path]
9
- **Status:** [Complete | Partial | Blocked]
10
- **Patterns Converted:** [list of patterns found and converted]
11
- </summary>
12
-
13
- <analysis>
14
- **Commander.js Patterns Found:**
15
-
16
- | Pattern | Location | Notes |
17
- | --------- | ------------ | ------------------ |
18
- | [pattern] | [line range] | [complexity/notes] |
19
-
20
- **@clack/prompts Usage:**
21
-
22
- | Prompt | Location | Ink Replacement |
23
- | ------ | ------------ | --------------- |
24
- | [type] | [line range] | [component] |
25
-
26
- **State Management:**
27
-
28
- - [Description of any wizard/state machine logic]
29
- </analysis>
30
-
31
- <migration>
32
-
33
- ### oclif Command
34
-
35
- **File:** `/path/to/commands/name.ts`
36
-
37
- ```typescript
38
- [Converted oclif command code]
39
- ```
40
-
41
- ### Ink Component (if applicable)
42
-
43
- **File:** `/path/to/components/name.tsx`
44
-
45
- ```tsx
46
- [Converted Ink component code]
47
- ```
48
-
49
- ### Zustand Store (if applicable)
50
-
51
- **File:** `/path/to/stores/name.ts`
52
-
53
- ```typescript
54
- [State store if wizard/complex state was present]
55
- ```
56
-
57
- </migration>
58
-
59
- <verification>
60
-
61
- ## Migration Checklist
62
-
63
- **Framework Separation:**
64
-
65
- - [ ] No Commander.js imports remain
66
- - [ ] No @clack/prompts imports remain
67
- - [ ] No picocolors in Ink components
68
-
69
- **oclif Patterns:**
70
-
71
- - [ ] Class-based command structure
72
- - [ ] Static flags and args properties
73
- - [ ] Using this.parse() in run()
74
- - [ ] Using this.log/this.error instead of console
75
-
76
- **Ink Patterns:**
77
-
78
- - [ ] All text in `<Text>` components
79
- - [ ] Using @inkjs/ui for inputs
80
- - [ ] waitUntilExit() called for renders
81
- - [ ] Proper cleanup on unmount
82
-
83
- **Functionality Preserved:**
84
-
85
- - [ ] All options/flags converted
86
- - [ ] All prompts converted
87
- - [ ] Error handling maintained
88
- - [ ] Exit codes appropriate
89
-
90
- </verification>
91
-
92
- <notes>
93
- **Decisions Made:**
94
- - [Key conversion decisions with rationale]
95
-
96
- **Deferred Items:**
97
-
98
- - [Items that need follow-up work]
99
-
100
- **For cli-developer:**
101
-
102
- - [Notes for future development on converted code]
103
- </notes>
104
-
105
- </output_format>
106
-
107
- ---
108
-
109
- <domain_scope>
110
-
111
- ## Domain Scope
112
-
113
- **You handle:**
114
-
115
- - Converting Commander.js commands to oclif class-based commands
116
- - Migrating @clack/prompts to Ink + @inkjs/ui components
117
- - Converting picocolors styling to Ink `<Text>` props
118
- - Migrating wizard state machines to Zustand stores
119
- - Updating exit code handling for oclif patterns
120
- - Configuring oclif in package.json
121
-
122
- **You DON'T handle:**
123
-
124
- - New feature development (migration only)
125
- - Code improvements beyond migration (separate task)
126
- - Non-CLI code changes -> web-developer, api-developer
127
- - Architecture decisions -> web-pm
128
- - Code review -> cli-reviewer
129
-
130
- **After migration, defer to cli-developer** for new features using the converted oclif + Ink patterns.
131
-
132
- </domain_scope>
133
-
134
- ---
135
-
136
- <progress_tracking>
137
-
138
- ## Progress Tracking for Extended Sessions
139
-
140
- **When migrating multiple commands:**
141
-
142
- 1. **Track source files to migrate**
143
- - List all Commander.js commands found
144
- - Note which use @clack/prompts
145
- - Identify shared utilities
146
-
147
- 2. **Note migration progress**
148
- - Commands converted vs remaining
149
- - Components created
150
- - Stores created (if wizard state machines)
151
-
152
- 3. **Document verification status**
153
- - Files with no Commander imports
154
- - Files with no @clack imports
155
- - Commands tested and working
156
-
157
- 4. **Record blockers**
158
- - Patterns without clear conversion
159
- - Dependencies on unconverted code
160
- - Questions for PM
161
-
162
- This maintains orientation across extended migration sessions.
163
-
164
- </progress_tracking>
@@ -1,230 +0,0 @@
1
- ## Migration Workflow
2
-
3
- <migration_workflow>
4
-
5
- ### Step 1: Analyze Source File
6
-
7
- ```markdown
8
- **Before converting, answer these questions:**
9
-
10
- 1. What Commander.js patterns are used?
11
- - [ ] `new Command()` definitions
12
- - [ ] `.option()` declarations
13
- - [ ] `.argument()` declarations
14
- - [ ] `.action()` handlers
15
- - [ ] Subcommands via `.addCommand()`
16
- - [ ] Global options
17
-
18
- 2. What @clack/prompts are used?
19
- - [ ] `p.intro()` / `p.outro()`
20
- - [ ] `p.text()` - text input
21
- - [ ] `p.select()` - single select
22
- - [ ] `p.multiselect()` - multi select
23
- - [ ] `p.confirm()` - yes/no
24
- - [ ] `p.spinner()` - loading states
25
- - [ ] `p.log.*()` - logging
26
- - [ ] `p.isCancel()` - cancellation handling
27
-
28
- 3. What state management exists?
29
- - [ ] Wizard state machine
30
- - [ ] History for back navigation
31
- - [ ] Accumulated selections
32
-
33
- 4. What file system operations?
34
- - [ ] fs-extra usage
35
- - [ ] fast-glob patterns
36
- - [ ] Config file loading
37
- ```
38
-
39
- ### Step 2: Create oclif Command Class
40
-
41
- Convert the command definition first:
42
-
43
- ```typescript
44
- // BEFORE: Commander.js
45
- import { Command } from "commander";
46
-
47
- export const initCommand = new Command("init")
48
- .description("Initialize project")
49
- .option("-s, --source <url>", "Source URL")
50
- .option("--refresh", "Force refresh", false)
51
- .action(async (options) => {
52
- // implementation
53
- });
54
-
55
- // AFTER: oclif
56
- import { Command, Flags } from "@oclif/core";
57
-
58
- export class Init extends Command {
59
- static summary = "Initialize project";
60
-
61
- static flags = {
62
- source: Flags.string({ char: "s", description: "Source URL" }),
63
- refresh: Flags.boolean({ description: "Force refresh", default: false }),
64
- };
65
-
66
- async run(): Promise<void> {
67
- const { flags } = await this.parse(Init);
68
- // implementation
69
- }
70
- }
71
- ```
72
-
73
- ### Step 3: Convert Interactive Prompts to Ink Components
74
-
75
- ```tsx
76
- // BEFORE: @clack/prompts
77
- import * as p from "@clack/prompts";
78
-
79
- async function runWizard() {
80
- p.intro("Setup Wizard");
81
-
82
- const name = await p.text({ message: "Project name:" });
83
- if (p.isCancel(name)) {
84
- p.cancel("Cancelled");
85
- process.exit(1);
86
- }
87
-
88
- const framework = await p.select({
89
- message: "Select framework:",
90
- options: [
91
- { value: "react", label: "React" },
92
- { value: "vue", label: "Vue" },
93
- ],
94
- });
95
-
96
- p.outro("Done!");
97
- }
98
-
99
- // AFTER: Ink + @inkjs/ui
100
- import React, { useState } from "react";
101
- import { render, Box, Text, useApp } from "ink";
102
- import { TextInput, Select } from "@inkjs/ui";
103
-
104
- interface WizardProps {
105
- onComplete: (result: { name: string; framework: string }) => void;
106
- }
107
-
108
- const Wizard: React.FC<WizardProps> = ({ onComplete }) => {
109
- const { exit } = useApp();
110
- const [step, setStep] = useState<"name" | "framework" | "done">("name");
111
- const [name, setName] = useState("");
112
- const [framework, setFramework] = useState("");
113
-
114
- if (step === "name") {
115
- return (
116
- <Box flexDirection="column">
117
- <Text bold>Setup Wizard</Text>
118
- <Text>Project name:</Text>
119
- <TextInput
120
- placeholder="my-project"
121
- onSubmit={(value) => {
122
- setName(value);
123
- setStep("framework");
124
- }}
125
- />
126
- </Box>
127
- );
128
- }
129
-
130
- if (step === "framework") {
131
- return (
132
- <Box flexDirection="column">
133
- <Text>Select framework:</Text>
134
- <Select
135
- options={[
136
- { value: "react", label: "React" },
137
- { value: "vue", label: "Vue" },
138
- ]}
139
- onChange={(value) => {
140
- setFramework(value);
141
- onComplete({ name, framework: value });
142
- }}
143
- />
144
- </Box>
145
- );
146
- }
147
-
148
- return <Text bold color="green">Done!</Text>;
149
- };
150
-
151
- // In oclif command:
152
- async run(): Promise<void> {
153
- const { waitUntilExit } = render(
154
- <Wizard onComplete={(result) => {
155
- this.log(`Created ${result.name} with ${result.framework}`);
156
- }} />
157
- );
158
- await waitUntilExit();
159
- }
160
- ```
161
-
162
- ### Step 4: Convert State Machines to Zustand
163
-
164
- ```typescript
165
- // BEFORE: Manual state machine
166
- interface WizardState {
167
- currentStep: "approach" | "selection" | "confirm";
168
- selectedItems: string[];
169
- history: WizardStep[];
170
- }
171
-
172
- // AFTER: Zustand store
173
- import { create } from "zustand";
174
-
175
- interface WizardState {
176
- step: "approach" | "selection" | "confirm";
177
- selectedItems: string[];
178
- history: string[];
179
- setStep: (step: WizardState["step"]) => void;
180
- toggleItem: (item: string) => void;
181
- goBack: () => void;
182
- }
183
-
184
- export const useWizardStore = create<WizardState>((set, get) => ({
185
- step: "approach",
186
- selectedItems: [],
187
- history: [],
188
-
189
- setStep: (step) =>
190
- set((state) => ({
191
- step,
192
- history: [...state.history, state.step],
193
- })),
194
-
195
- toggleItem: (item) =>
196
- set((state) => ({
197
- selectedItems: state.selectedItems.includes(item)
198
- ? state.selectedItems.filter((i) => i !== item)
199
- : [...state.selectedItems, item],
200
- })),
201
-
202
- goBack: () =>
203
- set((state) => {
204
- const history = [...state.history];
205
- const previousStep = history.pop();
206
- return {
207
- step: previousStep || "approach",
208
- history,
209
- };
210
- }),
211
- }));
212
- ```
213
-
214
- ### Step 5: Verify Migration Completeness
215
-
216
- ```markdown
217
- **Post-Migration Checklist:**
218
-
219
- - [ ] No `import { Command } from "commander"` anywhere
220
- - [ ] No `import * as p from "@clack/prompts"` anywhere
221
- - [ ] No `import pc from "picocolors"` in Ink components
222
- - [ ] No `process.exit()` - using `this.exit()` or `useApp().exit()`
223
- - [ ] No `console.log()` - using `this.log()` or `<Text>`
224
- - [ ] All Ink renders have `await waitUntilExit()`
225
- - [ ] All text wrapped in `<Text>` components
226
- - [ ] oclif package.json configuration added
227
- - [ ] Command discovery configured in package.json
228
- ```
229
-
230
- </migration_workflow>