@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.
- package/CHANGELOG.md +26 -0
- package/README.md +1 -2
- package/config/stacks.yaml +0 -1
- package/dist/{chunk-YDASDMTH.js → chunk-26MXZUHU.js} +2 -2
- package/dist/{chunk-WSGKCBY5.js → chunk-2BWCR762.js} +2 -3
- package/dist/chunk-2BWCR762.js.map +1 -0
- package/dist/chunk-3VOL4WEG.js +31 -0
- package/dist/chunk-3VOL4WEG.js.map +1 -0
- package/dist/chunk-4QWDB2MD.js +571 -0
- package/dist/chunk-4QWDB2MD.js.map +1 -0
- package/dist/{chunk-ZML3OCYA.js → chunk-4R52TQ3K.js} +2 -2
- package/dist/{chunk-KPJJOLAQ.js → chunk-5FCHJLM7.js} +34 -16
- package/dist/chunk-5FCHJLM7.js.map +1 -0
- package/dist/chunk-5FPIKTSA.js +40 -0
- package/dist/chunk-5FPIKTSA.js.map +1 -0
- package/dist/{chunk-SPVSWDFM.js → chunk-5L724R4C.js} +5 -6
- package/dist/{chunk-SPVSWDFM.js.map → chunk-5L724R4C.js.map} +1 -1
- package/dist/{chunk-AXV7NFFJ.js → chunk-7LV4V6A4.js} +4 -4
- package/dist/{chunk-LESHL6SM.js → chunk-AWP5A6IM.js} +9 -3
- package/dist/chunk-AWP5A6IM.js.map +1 -0
- package/dist/chunk-C3Q43WLC.js +118 -0
- package/dist/chunk-C3Q43WLC.js.map +1 -0
- package/dist/{chunk-U2AEK4ZL.js → chunk-CMNKHDOX.js} +2 -2
- package/dist/{chunk-X3SZIBVW.js → chunk-D72AFYQR.js} +2 -2
- package/dist/chunk-D72AFYQR.js.map +1 -0
- package/dist/{chunk-FPTUCWBY.js → chunk-DCE423KO.js} +46 -30
- package/dist/chunk-DCE423KO.js.map +1 -0
- package/dist/chunk-GBOW6FUW.js +74 -0
- package/dist/chunk-GBOW6FUW.js.map +1 -0
- package/dist/{chunk-P2SFRDWI.js → chunk-HMSHB5EQ.js} +437 -185
- package/dist/chunk-HMSHB5EQ.js.map +1 -0
- package/dist/{chunk-GSPPOXMG.js → chunk-HYEUETIC.js} +2 -2
- package/dist/{chunk-IS7GP6XC.js → chunk-I6IOGZSZ.js} +61 -52
- package/dist/chunk-I6IOGZSZ.js.map +1 -0
- package/dist/{chunk-OTTITQ7C.js → chunk-JFF7P4LC.js} +30 -93
- package/dist/chunk-JFF7P4LC.js.map +1 -0
- package/dist/{chunk-FHKNG3UA.js → chunk-JWYRXE6C.js} +2 -2
- package/dist/{chunk-W62XVWXB.js → chunk-KAO3LKB5.js} +3 -3
- package/dist/{chunk-AMNCCZSG.js → chunk-KQOU4POU.js} +26 -28
- package/dist/chunk-KQOU4POU.js.map +1 -0
- package/dist/{chunk-VBAAATPU.js → chunk-M3GQ2R3E.js} +29 -28
- package/dist/chunk-M3GQ2R3E.js.map +1 -0
- package/dist/{chunk-2BVZOYJP.js → chunk-PGY5XROM.js} +2 -2
- package/dist/chunk-PGY5XROM.js.map +1 -0
- package/dist/{chunk-5MN5S3DV.js → chunk-QB5HHTAA.js} +8 -19
- package/dist/chunk-QB5HHTAA.js.map +1 -0
- package/dist/{chunk-34BP5BC4.js → chunk-QYLCINGC.js} +2 -2
- package/dist/{chunk-I52THVF6.js → chunk-RA2IPRO2.js} +2 -2
- package/dist/{chunk-G5OZQ376.js → chunk-RDWGYKDY.js} +4 -4
- package/dist/{chunk-7IAKVZL5.js → chunk-RFKDGJAJ.js} +26 -57
- package/dist/chunk-RFKDGJAJ.js.map +1 -0
- package/dist/{chunk-5O6GKXAN.js → chunk-SPFHPHYL.js} +7 -7
- package/dist/{chunk-NJVJ7VO5.js → chunk-U2W5SENM.js} +3 -3
- package/dist/{chunk-37QYD33C.js → chunk-U7X4V4HE.js} +2 -2
- package/dist/{chunk-C7DLY64D.js → chunk-UAD3SC27.js} +4 -12
- package/dist/chunk-UAD3SC27.js.map +1 -0
- package/dist/{chunk-YMUWTPOM.js → chunk-WBHPCBVN.js} +31 -11
- package/dist/chunk-WBHPCBVN.js.map +1 -0
- package/dist/chunk-WFFV254H.js +314 -0
- package/dist/chunk-WFFV254H.js.map +1 -0
- package/dist/{chunk-F7KTUFGU.js → chunk-WJHFV6RI.js} +3 -2
- package/dist/chunk-WJHFV6RI.js.map +1 -0
- package/dist/{chunk-DG2U2WY3.js → chunk-WLZHCM7O.js} +2 -2
- package/dist/{chunk-OHDEJEYB.js → chunk-XDSVV5GZ.js} +4 -4
- package/dist/{chunk-2DNDAXF6.js → chunk-YDYRAXSY.js} +57 -27
- package/dist/chunk-YDYRAXSY.js.map +1 -0
- package/dist/commands/build/marketplace.js +4 -4
- package/dist/commands/build/plugins.js +5 -5
- package/dist/commands/build/stack.js +5 -5
- package/dist/commands/compile.js +11 -9
- package/dist/commands/compile.js.map +1 -1
- package/dist/commands/config/get.js +4 -4
- package/dist/commands/config/index.js +5 -5
- package/dist/commands/config/path.js +4 -4
- package/dist/commands/config/set-project.js +4 -4
- package/dist/commands/config/show.js +5 -5
- package/dist/commands/config/unset-project.js +4 -4
- package/dist/commands/diff.js +4 -4
- package/dist/commands/doctor.js +4 -4
- package/dist/commands/edit.js +58 -52
- package/dist/commands/edit.js.map +1 -1
- package/dist/commands/eject.js +4 -4
- package/dist/commands/import/skill.js +5 -5
- package/dist/commands/info.js +5 -5
- package/dist/commands/init.js +40 -435
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/list.js +4 -4
- package/dist/commands/new/agent.js +11 -10
- package/dist/commands/new/agent.js.map +1 -1
- package/dist/commands/new/marketplace.js +24 -5
- package/dist/commands/new/marketplace.js.map +1 -1
- package/dist/commands/new/skill.js +15 -208
- package/dist/commands/new/skill.js.map +1 -1
- package/dist/commands/outdated.js +11 -7
- package/dist/commands/outdated.js.map +1 -1
- package/dist/commands/search.js +7 -7
- package/dist/commands/uninstall.js +6 -6
- package/dist/commands/update.js +6 -6
- package/dist/commands/validate.js +26 -247
- package/dist/commands/validate.js.map +1 -1
- package/dist/components/skill-search/skill-search.js +3 -3
- package/dist/components/wizard/category-grid.js +3 -2
- package/dist/components/wizard/category-grid.test.js +112 -58
- package/dist/components/wizard/category-grid.test.js.map +1 -1
- package/dist/components/wizard/checkbox-grid.js +5 -3
- package/dist/components/wizard/checkbox-grid.test.js +5 -4
- package/dist/components/wizard/checkbox-grid.test.js.map +1 -1
- package/dist/components/wizard/domain-selection.js +11 -9
- package/dist/components/wizard/help-modal.js +2 -2
- package/dist/components/wizard/menu-item.js +1 -1
- package/dist/components/wizard/search-modal.js +2 -2
- package/dist/components/wizard/search-modal.test.js +2 -2
- package/dist/components/wizard/section-progress.js +2 -2
- package/dist/components/wizard/section-progress.test.js +2 -2
- package/dist/components/wizard/selection-card.js +2 -2
- package/dist/components/wizard/source-grid.js +4 -3
- package/dist/components/wizard/source-grid.test.js +4 -3
- package/dist/components/wizard/source-grid.test.js.map +1 -1
- package/dist/components/wizard/stack-selection.js +8 -8
- package/dist/components/wizard/step-agents.js +10 -8
- package/dist/components/wizard/step-agents.test.js +18 -17
- package/dist/components/wizard/step-agents.test.js.map +1 -1
- package/dist/components/wizard/step-build.js +9 -8
- package/dist/components/wizard/step-build.test.js +11 -25
- package/dist/components/wizard/step-build.test.js.map +1 -1
- package/dist/components/wizard/step-confirm.js +4 -4
- package/dist/components/wizard/step-confirm.test.js +8 -8
- package/dist/components/wizard/step-refine.js +2 -2
- package/dist/components/wizard/step-refine.test.js +2 -2
- package/dist/components/wizard/step-settings.js +7 -5
- package/dist/components/wizard/step-settings.test.js +10 -8
- package/dist/components/wizard/step-settings.test.js.map +1 -1
- package/dist/components/wizard/step-sources.js +11 -10
- package/dist/components/wizard/step-sources.test.js +12 -11
- package/dist/components/wizard/step-sources.test.js.map +1 -1
- package/dist/components/wizard/step-stack.js +15 -12
- package/dist/components/wizard/step-stack.test.js +16 -13
- package/dist/components/wizard/step-stack.test.js.map +1 -1
- package/dist/components/wizard/view-title.js +2 -2
- package/dist/components/wizard/wizard-layout.js +8 -8
- package/dist/components/wizard/wizard-tabs.js +2 -2
- package/dist/components/wizard/wizard-tabs.test.js +2 -2
- package/dist/components/wizard/wizard.js +27 -25
- package/dist/config/stacks.yaml +0 -1
- package/dist/hooks/init.js +55 -3
- package/dist/hooks/init.js.map +1 -1
- package/dist/{source-manager-Y7R6WPOW.js → source-manager-BVB2SG73.js} +4 -4
- package/dist/src/agents/meta/agent-summoner/critical-reminders.md +1 -1
- package/dist/src/agents/meta/agent-summoner/critical-requirements.md +1 -1
- package/dist/src/agents/meta/agent-summoner/examples.md +2 -2
- package/dist/src/agents/meta/agent-summoner/output-format.md +1 -1
- package/dist/src/agents/meta/agent-summoner/workflow.md +5 -7
- package/{src/agents/meta/documentor/agent.yaml → dist/src/agents/meta/documentor/metadata.yaml} +1 -0
- package/dist/stores/wizard-store.js +5 -5
- package/dist/stores/wizard-store.test.js +79 -27
- package/dist/stores/wizard-store.test.js.map +1 -1
- package/package.json +1 -1
- package/src/agents/meta/agent-summoner/critical-reminders.md +1 -1
- package/src/agents/meta/agent-summoner/critical-requirements.md +1 -1
- package/src/agents/meta/agent-summoner/examples.md +2 -2
- package/src/agents/meta/agent-summoner/output-format.md +1 -1
- package/src/agents/meta/agent-summoner/workflow.md +5 -7
- package/{dist/src/agents/meta/documentor/agent.yaml → src/agents/meta/documentor/metadata.yaml} +1 -0
- package/src/schemas/agent.schema.json +1 -1
- package/src/schemas/project-config.schema.json +0 -3
- package/dist/chunk-2BVZOYJP.js.map +0 -1
- package/dist/chunk-2DNDAXF6.js.map +0 -1
- package/dist/chunk-5MN5S3DV.js.map +0 -1
- package/dist/chunk-7IAKVZL5.js.map +0 -1
- package/dist/chunk-AMNCCZSG.js.map +0 -1
- package/dist/chunk-AXZNJ5PN.js +0 -99
- package/dist/chunk-AXZNJ5PN.js.map +0 -1
- package/dist/chunk-C7DLY64D.js.map +0 -1
- package/dist/chunk-F7KTUFGU.js.map +0 -1
- package/dist/chunk-FPTUCWBY.js.map +0 -1
- package/dist/chunk-IS7GP6XC.js.map +0 -1
- package/dist/chunk-KPJJOLAQ.js.map +0 -1
- package/dist/chunk-LESHL6SM.js.map +0 -1
- package/dist/chunk-OTTITQ7C.js.map +0 -1
- package/dist/chunk-P2SFRDWI.js.map +0 -1
- package/dist/chunk-PY2XZUBF.js +0 -29
- package/dist/chunk-PY2XZUBF.js.map +0 -1
- package/dist/chunk-VBAAATPU.js.map +0 -1
- package/dist/chunk-WSGKCBY5.js.map +0 -1
- package/dist/chunk-X3SZIBVW.js.map +0 -1
- package/dist/chunk-YMUWTPOM.js.map +0 -1
- package/dist/src/agents/migration/cli-migrator/agent.yaml +0 -12
- package/dist/src/agents/migration/cli-migrator/anti-patterns.md +0 -158
- package/dist/src/agents/migration/cli-migrator/conversion-mappings.md +0 -63
- package/dist/src/agents/migration/cli-migrator/critical-reminders.md +0 -17
- package/dist/src/agents/migration/cli-migrator/critical-requirements.md +0 -13
- package/dist/src/agents/migration/cli-migrator/intro.md +0 -15
- package/dist/src/agents/migration/cli-migrator/output-format.md +0 -164
- package/dist/src/agents/migration/cli-migrator/workflow.md +0 -230
- package/src/agents/migration/cli-migrator/agent.yaml +0 -12
- package/src/agents/migration/cli-migrator/anti-patterns.md +0 -158
- package/src/agents/migration/cli-migrator/conversion-mappings.md +0 -63
- package/src/agents/migration/cli-migrator/critical-reminders.md +0 -17
- package/src/agents/migration/cli-migrator/critical-requirements.md +0 -13
- package/src/agents/migration/cli-migrator/intro.md +0 -15
- package/src/agents/migration/cli-migrator/output-format.md +0 -164
- package/src/agents/migration/cli-migrator/workflow.md +0 -230
- /package/dist/{chunk-YDASDMTH.js.map → chunk-26MXZUHU.js.map} +0 -0
- /package/dist/{chunk-ZML3OCYA.js.map → chunk-4R52TQ3K.js.map} +0 -0
- /package/dist/{chunk-AXV7NFFJ.js.map → chunk-7LV4V6A4.js.map} +0 -0
- /package/dist/{chunk-U2AEK4ZL.js.map → chunk-CMNKHDOX.js.map} +0 -0
- /package/dist/{chunk-GSPPOXMG.js.map → chunk-HYEUETIC.js.map} +0 -0
- /package/dist/{chunk-FHKNG3UA.js.map → chunk-JWYRXE6C.js.map} +0 -0
- /package/dist/{chunk-W62XVWXB.js.map → chunk-KAO3LKB5.js.map} +0 -0
- /package/dist/{chunk-34BP5BC4.js.map → chunk-QYLCINGC.js.map} +0 -0
- /package/dist/{chunk-I52THVF6.js.map → chunk-RA2IPRO2.js.map} +0 -0
- /package/dist/{chunk-G5OZQ376.js.map → chunk-RDWGYKDY.js.map} +0 -0
- /package/dist/{chunk-5O6GKXAN.js.map → chunk-SPFHPHYL.js.map} +0 -0
- /package/dist/{chunk-NJVJ7VO5.js.map → chunk-U2W5SENM.js.map} +0 -0
- /package/dist/{chunk-37QYD33C.js.map → chunk-U7X4V4HE.js.map} +0 -0
- /package/dist/{chunk-DG2U2WY3.js.map → chunk-WLZHCM7O.js.map} +0 -0
- /package/dist/{chunk-OHDEJEYB.js.map → chunk-XDSVV5GZ.js.map} +0 -0
- /package/dist/{source-manager-Y7R6WPOW.js.map → source-manager-BVB2SG73.js.map} +0 -0
- /package/dist/src/agents/developer/api-developer/{agent.yaml → metadata.yaml} +0 -0
- /package/dist/src/agents/developer/cli-developer/{agent.yaml → metadata.yaml} +0 -0
- /package/dist/src/agents/developer/web-architecture/{agent.yaml → metadata.yaml} +0 -0
- /package/dist/src/agents/developer/web-developer/{agent.yaml → metadata.yaml} +0 -0
- /package/dist/src/agents/meta/agent-summoner/{agent.yaml → metadata.yaml} +0 -0
- /package/dist/src/agents/meta/skill-summoner/{agent.yaml → metadata.yaml} +0 -0
- /package/dist/src/agents/pattern/pattern-scout/{agent.yaml → metadata.yaml} +0 -0
- /package/dist/src/agents/pattern/web-pattern-critique/{agent.yaml → metadata.yaml} +0 -0
- /package/dist/src/agents/planning/web-pm/{agent.yaml → metadata.yaml} +0 -0
- /package/dist/src/agents/researcher/api-researcher/{agent.yaml → metadata.yaml} +0 -0
- /package/dist/src/agents/researcher/web-researcher/{agent.yaml → metadata.yaml} +0 -0
- /package/dist/src/agents/reviewer/api-reviewer/{agent.yaml → metadata.yaml} +0 -0
- /package/dist/src/agents/reviewer/cli-reviewer/{agent.yaml → metadata.yaml} +0 -0
- /package/dist/src/agents/reviewer/web-reviewer/{agent.yaml → metadata.yaml} +0 -0
- /package/dist/src/agents/tester/cli-tester/{agent.yaml → metadata.yaml} +0 -0
- /package/dist/src/agents/tester/web-tester/{agent.yaml → metadata.yaml} +0 -0
- /package/src/agents/developer/api-developer/{agent.yaml → metadata.yaml} +0 -0
- /package/src/agents/developer/cli-developer/{agent.yaml → metadata.yaml} +0 -0
- /package/src/agents/developer/web-architecture/{agent.yaml → metadata.yaml} +0 -0
- /package/src/agents/developer/web-developer/{agent.yaml → metadata.yaml} +0 -0
- /package/src/agents/meta/agent-summoner/{agent.yaml → metadata.yaml} +0 -0
- /package/src/agents/meta/skill-summoner/{agent.yaml → metadata.yaml} +0 -0
- /package/src/agents/pattern/pattern-scout/{agent.yaml → metadata.yaml} +0 -0
- /package/src/agents/pattern/web-pattern-critique/{agent.yaml → metadata.yaml} +0 -0
- /package/src/agents/planning/web-pm/{agent.yaml → metadata.yaml} +0 -0
- /package/src/agents/researcher/api-researcher/{agent.yaml → metadata.yaml} +0 -0
- /package/src/agents/researcher/web-researcher/{agent.yaml → metadata.yaml} +0 -0
- /package/src/agents/reviewer/api-reviewer/{agent.yaml → metadata.yaml} +0 -0
- /package/src/agents/reviewer/cli-reviewer/{agent.yaml → metadata.yaml} +0 -0
- /package/src/agents/reviewer/web-reviewer/{agent.yaml → metadata.yaml} +0 -0
- /package/src/agents/tester/cli-tester/{agent.yaml → metadata.yaml} +0 -0
- /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>
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|