@code-migration/wow-migrator 0.1.0 → 0.1.2
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/README.md +59 -58
- package/bin/{kmp-skills.js → wow-migrator.js} +65 -17
- package/package.json +16 -8
- package/skills/android-project-analyst/MIGRATION.md +39 -23
- package/skills/android-project-analyst/SKILL.md +54 -44
- package/skills/android-project-analyst/bind.md +22 -14
- package/skills/android-project-analyst/dependencies.yaml +8 -4
- package/skills/android-project-analyst/roles/analysis-workspace-state.md +118 -0
- package/skills/android-project-analyst/roles/behavior-logic.md +163 -0
- package/skills/android-project-analyst/roles/data-contract-flow.md +167 -0
- package/skills/android-project-analyst/roles/presentation-resource.md +296 -0
- package/skills/android-project-analyst/roles/project-architecture.md +171 -0
- package/skills/android-project-analyst/workflow.md +118 -70
- package/skills/android-to-kmp-migrator/MIGRATION.md +61 -1
- package/skills/android-to-kmp-migrator/SKILL.md +96 -134
- package/skills/android-to-kmp-migrator/bind.md +33 -11
- package/skills/android-to-kmp-migrator/roles/completion-report.md +72 -0
- package/skills/android-to-kmp-migrator/roles/dependency-platform-gate.md +63 -0
- package/skills/android-to-kmp-migrator/roles/logic-implementation.md +66 -0
- package/skills/android-to-kmp-migrator/roles/migration-analysis-planning.md +65 -0
- package/skills/android-to-kmp-migrator/roles/migration-verification.md +77 -0
- package/skills/android-to-kmp-migrator/roles/migration-workspace-state.md +13 -1
- package/skills/android-to-kmp-migrator/roles/module-node-review-fix.md +74 -0
- package/skills/android-to-kmp-migrator/roles/presentation-integration.md +65 -0
- package/skills/android-to-kmp-migrator/roles/state-data-prep.md +63 -0
- package/skills/android-to-kmp-migrator/roles/ui-implementation.md +64 -0
- package/skills/android-to-kmp-migrator/workflow.md +175 -149
- package/skills/kmp-test-validator/MIGRATION.md +18 -3
- package/skills/kmp-test-validator/SKILL.md +44 -79
- package/skills/kmp-test-validator/bind.md +8 -8
- package/skills/kmp-test-validator/dependencies.yaml +3 -3
- package/skills/kmp-test-validator/roles/validation-intake-fidelity.md +67 -0
- package/skills/kmp-test-validator/roles/validation-plan-gate.md +66 -0
- package/skills/kmp-test-validator/roles/validation-remediation.md +7 -7
- package/skills/kmp-test-validator/roles/validation-report.md +8 -10
- package/skills/kmp-test-validator/roles/validation-test-runner.md +61 -0
- package/skills/kmp-test-validator/roles/validation-workspace-state.md +2 -2
- package/skills/kmp-test-validator/workflow.md +87 -119
- package/skills/migration-task-adapter/MIGRATION.md +34 -0
- package/skills/migration-task-adapter/SKILL.md +134 -0
- package/skills/migration-task-adapter/bind.md +113 -0
- package/skills/migration-task-adapter/dependencies.yaml +26 -0
- package/skills/migration-task-adapter/roles/task-reporter.md +129 -0
- package/skills/migration-task-adapter/roles/task-understanding-router.md +134 -0
- package/skills/migration-task-adapter/roles/workflow-orchestrator.md +140 -0
- package/skills/migration-task-adapter/roles/workspace-state-discipline-inspector.md +189 -0
- package/skills/migration-task-adapter/workflow.md +183 -0
- package/skills/android-project-analyst/roles/android-ecosystem.md +0 -141
- package/skills/android-project-analyst/roles/api-list.md +0 -136
- package/skills/android-project-analyst/roles/architecture-pattern.md +0 -131
- package/skills/android-project-analyst/roles/data-flow.md +0 -143
- package/skills/android-project-analyst/roles/logic-understand.md +0 -154
- package/skills/android-project-analyst/roles/resource-understand.md +0 -151
- package/skills/android-project-analyst/roles/ui-understand.md +0 -136
- package/skills/android-to-kmp-migrator/roles/api-contract-parity.md +0 -95
- package/skills/android-to-kmp-migrator/roles/dataflow-logic-implementation.md +0 -130
- package/skills/android-to-kmp-migrator/roles/dependency-resolution.md +0 -106
- package/skills/android-to-kmp-migrator/roles/incremental-build-check.md +0 -105
- package/skills/android-to-kmp-migrator/roles/legacy-spec-delta-review.md +0 -104
- package/skills/android-to-kmp-migrator/roles/migration-alignment.md +0 -119
- package/skills/android-to-kmp-migrator/roles/migration-report.md +0 -108
- package/skills/android-to-kmp-migrator/roles/module-node-migration-fix.md +0 -111
- package/skills/android-to-kmp-migrator/roles/module-node-migration-review.md +0 -108
- package/skills/android-to-kmp-migrator/roles/navigation-migration.md +0 -104
- package/skills/android-to-kmp-migrator/roles/platform-api-replacement.md +0 -104
- package/skills/android-to-kmp-migrator/roles/prd-completion-check.md +0 -124
- package/skills/android-to-kmp-migrator/roles/resource-migration.md +0 -109
- package/skills/android-to-kmp-migrator/roles/source-set-placement-guard.md +0 -95
- package/skills/android-to-kmp-migrator/roles/state-model-mapping.md +0 -109
- package/skills/android-to-kmp-migrator/roles/target-project-understand.md +0 -118
- package/skills/android-to-kmp-migrator/roles/theme-design-system-mapping.md +0 -101
- package/skills/android-to-kmp-migrator/roles/ui-mockup-implementation.md +0 -121
- package/skills/android-to-kmp-migrator/roles/ui-render-fidelity-check.md +0 -100
- package/skills/kmp-test-validator/roles/android-kmp-fidelity-audit.md +0 -102
- package/skills/kmp-test-validator/roles/build-preview-gate.md +0 -109
- package/skills/kmp-test-validator/roles/kmp-validation-plan.md +0 -108
- package/skills/kmp-test-validator/roles/test-case-decomposition.md +0 -103
- package/skills/kmp-test-validator/roles/test-execution.md +0 -104
- package/skills/kmp-test-validator/roles/validation-input-contract.md +0 -111
package/README.md
CHANGED
|
@@ -1,75 +1,89 @@
|
|
|
1
|
-
#
|
|
1
|
+
# WOW Migrator
|
|
2
2
|
|
|
3
|
-
Install
|
|
3
|
+
Install Android to Kotlin Multiplatform migration skills into AI coding tools through npm.
|
|
4
4
|
|
|
5
|
-
## Install
|
|
6
|
-
|
|
7
|
-
The package is not published to the npm registry yet. Install it from the local package directory:
|
|
5
|
+
## Install
|
|
8
6
|
|
|
9
7
|
```bash
|
|
10
|
-
npm install -g /
|
|
8
|
+
npm install -g @code-migration/wow-migrator
|
|
11
9
|
```
|
|
12
10
|
|
|
13
|
-
|
|
11
|
+
During `npm install`, the package runs `postinstall` and installs the bundled skills into every supported tool it detects on the machine.
|
|
12
|
+
|
|
13
|
+
To install the CLI but skip automatic skill installation:
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
|
-
npm install -g
|
|
16
|
+
WOW_MIGRATOR_SKIP_POSTINSTALL=1 npm install -g @code-migration/wow-migrator
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
## What Gets Installed
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
cd /Users/winson/CodeBase/Online/cli-plugins/npx_skills
|
|
23
|
-
npm pack
|
|
24
|
-
npm install -g ./code-migration-wow-migrator-0.1.0.tgz
|
|
25
|
-
```
|
|
21
|
+
The package bundles these skills:
|
|
26
22
|
|
|
27
|
-
|
|
23
|
+
- `android-project-analyst`
|
|
24
|
+
- `android-to-kmp-migrator`
|
|
25
|
+
- `kmp-test-validator`
|
|
26
|
+
|
|
27
|
+
They are copied into each target tool's `skills` directory. Re-running install is idempotent: the bundled skill directories are replaced with the package version.
|
|
28
|
+
|
|
29
|
+
## CLI Commands
|
|
30
|
+
|
|
31
|
+
The primary CLI command is `wow-migrator`.
|
|
28
32
|
|
|
29
33
|
```bash
|
|
30
|
-
|
|
34
|
+
wow-migrator install --yes
|
|
35
|
+
wow-migrator install --platform claude --yes
|
|
36
|
+
wow-migrator install --platform cursor,codex --yes
|
|
37
|
+
wow-migrator install --target "Claude Code,Codex"
|
|
38
|
+
wow-migrator uninstall --target all --yes
|
|
39
|
+
wow-migrator list
|
|
40
|
+
wow-migrator config
|
|
31
41
|
```
|
|
32
42
|
|
|
33
|
-
|
|
34
|
-
Set `KMP_SKILLS_SKIP_POSTINSTALL=1` to skip the automatic install.
|
|
43
|
+
## Install By Platform
|
|
35
44
|
|
|
36
|
-
|
|
45
|
+
Use `--platform`, `--target`, or `--tool`. They are aliases and accept a single platform, a comma-separated list, or `all`.
|
|
37
46
|
|
|
38
47
|
```bash
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
kmp-skills list
|
|
43
|
-
kmp-skills config
|
|
48
|
+
wow-migrator install --platform claude --yes
|
|
49
|
+
wow-migrator install --platform cursor,codex --yes
|
|
50
|
+
wow-migrator install --platform all --yes
|
|
44
51
|
```
|
|
45
52
|
|
|
46
|
-
|
|
53
|
+
Supported platforms:
|
|
47
54
|
|
|
48
|
-
|
|
|
49
|
-
| --- | --- | --- |
|
|
50
|
-
| OpenClaw | `~/.openclaw` or `openclaw` | `~/.openclaw/skills` |
|
|
51
|
-
| Claude Code | `~/.claude` or `claude` | `~/.claude/skills` |
|
|
52
|
-
| OpenCode | `~/.config/opencode` or `opencode` | `~/.config/opencode/skills` |
|
|
53
|
-
| Codex | `~/.codex` or `codex` | `~/.codex/skills` |
|
|
54
|
-
| Cursor | `~/.cursor` or `cursor` | `~/.cursor/skills` |
|
|
55
|
-
| Gemini | `~/.gemini` or `gemini` | `~/.gemini/skills` |
|
|
56
|
-
| JiuwenSwarm | `~/.jiuwenswarm` or Jiuwen CLI commands | `~/.jiuwenswarm/agent/workspace/skills` |
|
|
55
|
+
| Platform | Aliases | Detection | Skills directory |
|
|
56
|
+
| --- | --- | --- | --- |
|
|
57
|
+
| OpenClaw | `openclaw`, `open-claw` | `~/.openclaw` or `openclaw` | `~/.openclaw/skills` |
|
|
58
|
+
| Claude Code | `claude`, `claude-code`, `claudecode` | `~/.claude` or `claude` | `~/.claude/skills` |
|
|
59
|
+
| OpenCode | `opencode`, `open-code` | `~/.config/opencode` or `opencode` | `~/.config/opencode/skills` |
|
|
60
|
+
| Codex | `codex`, `openai-codex` | `~/.codex` or `codex` | `~/.codex/skills` |
|
|
61
|
+
| Cursor | `cursor` | `~/.cursor` or `cursor` | `~/.cursor/skills` |
|
|
62
|
+
| Gemini | `gemini`, `gemini-cli` | `~/.gemini` or `gemini` | `~/.gemini/skills` |
|
|
63
|
+
| JiuwenSwarm | `jiuwen`, `jiuwenswarm`, `jiuwen-swarm`, `jiuwenclaw` | `~/.jiuwenswarm` or Jiuwen CLI commands | `~/.jiuwenswarm/agent/workspace/skills` |
|
|
57
64
|
|
|
58
65
|
## Configuration
|
|
59
66
|
|
|
60
|
-
|
|
67
|
+
View or create the config file:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
wow-migrator config
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
The config file is stored at:
|
|
61
74
|
|
|
62
75
|
```text
|
|
63
|
-
~/.
|
|
76
|
+
~/.wow-migrator/config.json
|
|
64
77
|
```
|
|
65
78
|
|
|
66
|
-
Edit it to add custom tools
|
|
79
|
+
Edit it to add custom tools, aliases, commands, or skills directories:
|
|
67
80
|
|
|
68
81
|
```json
|
|
69
82
|
{
|
|
70
83
|
"tools": [
|
|
71
84
|
{
|
|
72
85
|
"name": "Claude Code",
|
|
86
|
+
"aliases": ["claude", "claude-code"],
|
|
73
87
|
"markerDir": "~/.claude",
|
|
74
88
|
"commands": ["claude"],
|
|
75
89
|
"skillsDir": "~/.claude/skills"
|
|
@@ -78,36 +92,23 @@ Edit it to add custom tools or paths. The shape is:
|
|
|
78
92
|
}
|
|
79
93
|
```
|
|
80
94
|
|
|
81
|
-
##
|
|
95
|
+
## Other Functions
|
|
82
96
|
|
|
83
|
-
|
|
97
|
+
List bundled skills:
|
|
84
98
|
|
|
85
99
|
```bash
|
|
86
|
-
|
|
87
|
-
npm run sync:skills
|
|
88
|
-
npm pack
|
|
100
|
+
wow-migrator list
|
|
89
101
|
```
|
|
90
102
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
Publish with the existing `code-migration` npm org scope:
|
|
103
|
+
Remove bundled skills from selected platforms:
|
|
94
104
|
|
|
95
105
|
```bash
|
|
96
|
-
|
|
106
|
+
wow-migrator uninstall --platform claude,cursor --yes
|
|
107
|
+
wow-migrator uninstall --platform all --yes
|
|
97
108
|
```
|
|
98
109
|
|
|
99
|
-
|
|
100
|
-
current npm user has publish access:
|
|
110
|
+
Preview an install without writing files:
|
|
101
111
|
|
|
102
112
|
```bash
|
|
103
|
-
|
|
104
|
-
npm org ls code-migration
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
For this package, `npm org ls code-migration` should list your user with owner
|
|
108
|
-
or publish-capable access. After that, publish and install with:
|
|
109
|
-
|
|
110
|
-
```bash
|
|
111
|
-
npm publish --access public
|
|
112
|
-
npm install -g @code-migration/wow-migrator
|
|
113
|
+
wow-migrator install --platform all --dry-run --yes
|
|
113
114
|
```
|
|
@@ -8,9 +8,10 @@ import { fileURLToPath } from 'node:url';
|
|
|
8
8
|
import readline from 'node:readline/promises';
|
|
9
9
|
|
|
10
10
|
const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
|
|
11
|
-
const CONFIG_DIR = path.join(os.homedir(), '.
|
|
11
|
+
const CONFIG_DIR = path.join(os.homedir(), '.wow-migrator');
|
|
12
12
|
const CONFIG_PATH = path.join(CONFIG_DIR, 'config.json');
|
|
13
13
|
const isWindows = process.platform === 'win32';
|
|
14
|
+
const CLI_NAME = path.basename(process.argv[1] ?? 'wow-migrator').replace(/\.js$/, '') || 'wow-migrator';
|
|
14
15
|
|
|
15
16
|
function expandHome(input) {
|
|
16
17
|
if (!input) return input;
|
|
@@ -107,42 +108,49 @@ function defaultTools() {
|
|
|
107
108
|
return [
|
|
108
109
|
{
|
|
109
110
|
name: 'OpenClaw',
|
|
111
|
+
aliases: ['openclaw', 'open-claw'],
|
|
110
112
|
markerDir: '~/.openclaw',
|
|
111
113
|
commands: ['openclaw'],
|
|
112
114
|
skillsDir: '~/.openclaw/skills'
|
|
113
115
|
},
|
|
114
116
|
{
|
|
115
117
|
name: 'Claude Code',
|
|
118
|
+
aliases: ['claude', 'claude-code', 'claudecode'],
|
|
116
119
|
markerDir: '~/.claude',
|
|
117
120
|
commands: ['claude'],
|
|
118
121
|
skillsDir: '~/.claude/skills'
|
|
119
122
|
},
|
|
120
123
|
{
|
|
121
124
|
name: 'OpenCode',
|
|
125
|
+
aliases: ['opencode', 'open-code'],
|
|
122
126
|
markerDir: '~/.config/opencode',
|
|
123
127
|
commands: ['opencode'],
|
|
124
128
|
skillsDir: '~/.config/opencode/skills'
|
|
125
129
|
},
|
|
126
130
|
{
|
|
127
131
|
name: 'Codex',
|
|
132
|
+
aliases: ['codex', 'openai-codex'],
|
|
128
133
|
markerDir: '~/.codex',
|
|
129
134
|
commands: ['codex'],
|
|
130
135
|
skillsDir: '~/.codex/skills'
|
|
131
136
|
},
|
|
132
137
|
{
|
|
133
138
|
name: 'Cursor',
|
|
139
|
+
aliases: ['cursor'],
|
|
134
140
|
markerDir: '~/.cursor',
|
|
135
141
|
commands: ['cursor'],
|
|
136
142
|
skillsDir: '~/.cursor/skills'
|
|
137
143
|
},
|
|
138
144
|
{
|
|
139
145
|
name: 'Gemini',
|
|
146
|
+
aliases: ['gemini', 'gemini-cli'],
|
|
140
147
|
markerDir: '~/.gemini',
|
|
141
148
|
commands: ['gemini'],
|
|
142
149
|
skillsDir: '~/.gemini/skills'
|
|
143
150
|
},
|
|
144
151
|
{
|
|
145
152
|
name: 'JiuwenSwarm',
|
|
153
|
+
aliases: ['jiuwen', 'jiuwenswarm', 'jiuwen-swarm', 'jiuwenclaw'],
|
|
146
154
|
markerDir: '~/.jiuwenswarm',
|
|
147
155
|
commands: defaultJiuwenCommands(),
|
|
148
156
|
skillsDir: '~/.jiuwenswarm/agent/workspace/skills'
|
|
@@ -156,6 +164,7 @@ function normalizeTool(raw) {
|
|
|
156
164
|
if (!skillsDir) return null;
|
|
157
165
|
return {
|
|
158
166
|
name: String(raw.name),
|
|
167
|
+
aliases: Array.isArray(raw.aliases) ? raw.aliases.map(String).filter(Boolean) : [],
|
|
159
168
|
markerDir: raw.markerDir ? String(raw.markerDir) : '',
|
|
160
169
|
commands: Array.isArray(raw.commands) ? raw.commands.map(String).filter(Boolean) : [],
|
|
161
170
|
skillsDir: String(skillsDir)
|
|
@@ -181,7 +190,11 @@ async function loadConfig(options = {}) {
|
|
|
181
190
|
: [];
|
|
182
191
|
const userTools = sourceTools.map(normalizeTool).filter(Boolean);
|
|
183
192
|
const merged = new Map(defaultTools().map((tool) => [tool.name, tool]));
|
|
184
|
-
for (const tool of userTools)
|
|
193
|
+
for (const tool of userTools) {
|
|
194
|
+
const existing = merged.get(tool.name);
|
|
195
|
+
const aliases = [...new Set([...(existing?.aliases ?? []), ...(tool.aliases ?? [])])];
|
|
196
|
+
merged.set(tool.name, existing ? { ...existing, ...tool, aliases } : tool);
|
|
197
|
+
}
|
|
185
198
|
return { tools: [...merged.values()] };
|
|
186
199
|
}
|
|
187
200
|
|
|
@@ -269,10 +282,21 @@ function parseArgs(argv) {
|
|
|
269
282
|
if (arg === '--yes' || arg === '-y') flags.yes = true;
|
|
270
283
|
else if (arg === '--postinstall') flags.postinstall = true;
|
|
271
284
|
else if (arg === '--dry-run') flags.dryRun = true;
|
|
272
|
-
else if (
|
|
285
|
+
else if (
|
|
286
|
+
arg === '--target' ||
|
|
287
|
+
arg === '--targets' ||
|
|
288
|
+
arg === '--platform' ||
|
|
289
|
+
arg === '--platforms' ||
|
|
290
|
+
arg === '--tool' ||
|
|
291
|
+
arg === '--tools'
|
|
292
|
+
) {
|
|
273
293
|
flags.targets = argv[++index]?.split(',').map((item) => item.trim()).filter(Boolean) ?? [];
|
|
274
294
|
} else if (arg.startsWith('--target=')) {
|
|
275
295
|
flags.targets = arg.slice('--target='.length).split(',').map((item) => item.trim()).filter(Boolean);
|
|
296
|
+
} else if (arg.startsWith('--platform=')) {
|
|
297
|
+
flags.targets = arg.slice('--platform='.length).split(',').map((item) => item.trim()).filter(Boolean);
|
|
298
|
+
} else if (arg.startsWith('--tool=')) {
|
|
299
|
+
flags.targets = arg.slice('--tool='.length).split(',').map((item) => item.trim()).filter(Boolean);
|
|
276
300
|
} else {
|
|
277
301
|
positional.push(arg);
|
|
278
302
|
}
|
|
@@ -280,11 +304,31 @@ function parseArgs(argv) {
|
|
|
280
304
|
return { command: positional[0] ?? 'install', flags };
|
|
281
305
|
}
|
|
282
306
|
|
|
307
|
+
function normalizeTargetId(value) {
|
|
308
|
+
return String(value).toLowerCase().replace(/[\s_-]+/g, '');
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
function targetIdsForTool(tool) {
|
|
312
|
+
return [tool.name, ...(tool.aliases ?? []), ...(tool.commands ?? [])]
|
|
313
|
+
.map(normalizeTargetId)
|
|
314
|
+
.filter(Boolean);
|
|
315
|
+
}
|
|
316
|
+
|
|
283
317
|
function selectTools(tools, detections, flags) {
|
|
284
318
|
if (flags.targets?.length) {
|
|
285
|
-
const wanted = new Set(flags.targets.map(
|
|
319
|
+
const wanted = new Set(flags.targets.map(normalizeTargetId));
|
|
286
320
|
if (wanted.has('all')) return tools;
|
|
287
|
-
|
|
321
|
+
const selected = tools.filter((tool) => targetIdsForTool(tool).some((id) => wanted.has(id)));
|
|
322
|
+
const matched = new Set(selected.flatMap(targetIdsForTool));
|
|
323
|
+
const unknown = [...wanted].filter((id) => !matched.has(id));
|
|
324
|
+
if (unknown.length > 0) {
|
|
325
|
+
const supported = tools
|
|
326
|
+
.map((tool) => `${tool.name} (${(tool.aliases ?? []).join(', ')})`)
|
|
327
|
+
.join('; ');
|
|
328
|
+
console.warn(`[wow-migrator] Unknown platform target(s): ${unknown.join(', ')}`);
|
|
329
|
+
console.warn(`[wow-migrator] Supported platforms: ${supported}`);
|
|
330
|
+
}
|
|
331
|
+
return selected;
|
|
288
332
|
}
|
|
289
333
|
if (flags.yes || flags.postinstall) {
|
|
290
334
|
return tools.filter((tool) => detections.get(tool.name)?.installed);
|
|
@@ -303,13 +347,13 @@ async function confirm(message) {
|
|
|
303
347
|
}
|
|
304
348
|
|
|
305
349
|
async function installCommand(flags) {
|
|
306
|
-
if (process.env.
|
|
350
|
+
if (process.env.WOW_MIGRATOR_SKIP_POSTINSTALL === '1' && flags.postinstall) return;
|
|
307
351
|
|
|
308
352
|
const skillsRoot = await findSkillsRoot();
|
|
309
353
|
if (!skillsRoot) {
|
|
310
354
|
const message = 'No bundled KMP skills found. Run `npm run sync:skills` before publishing this package.';
|
|
311
355
|
if (flags.postinstall) {
|
|
312
|
-
console.warn(`[
|
|
356
|
+
console.warn(`[wow-migrator] ${message}`);
|
|
313
357
|
return;
|
|
314
358
|
}
|
|
315
359
|
throw new Error(message);
|
|
@@ -322,7 +366,7 @@ async function installCommand(flags) {
|
|
|
322
366
|
|
|
323
367
|
const selectedTools = selectTools(tools, detections, flags);
|
|
324
368
|
if (selectedTools.length === 0) {
|
|
325
|
-
console.log('[
|
|
369
|
+
console.log('[wow-migrator] No supported AI tools detected. Edit config with `wow-migrator config`.');
|
|
326
370
|
return;
|
|
327
371
|
}
|
|
328
372
|
|
|
@@ -335,7 +379,7 @@ async function installCommand(flags) {
|
|
|
335
379
|
for (const tool of selectedTools) {
|
|
336
380
|
const targetRoot = await installToTool(tool, skillsRoot, skillNames, flags.dryRun);
|
|
337
381
|
const detected = detections.get(tool.name)?.installed ? 'detected' : 'custom';
|
|
338
|
-
console.log(`[
|
|
382
|
+
console.log(`[wow-migrator] ${flags.dryRun ? 'Would install' : 'Installed'} ${skillNames.length} skills -> ${tool.name} (${detected}) ${prettyPath(targetRoot)}`);
|
|
339
383
|
}
|
|
340
384
|
}
|
|
341
385
|
|
|
@@ -356,7 +400,7 @@ async function uninstallCommand(flags) {
|
|
|
356
400
|
|
|
357
401
|
for (const tool of selectedTools) {
|
|
358
402
|
const removed = await uninstallFromTool(tool, skillNames, flags.dryRun);
|
|
359
|
-
console.log(`[
|
|
403
|
+
console.log(`[wow-migrator] ${flags.dryRun ? 'Would remove' : 'Removed'} ${removed} skills from ${tool.name}`);
|
|
360
404
|
}
|
|
361
405
|
}
|
|
362
406
|
|
|
@@ -374,16 +418,20 @@ async function configCommand() {
|
|
|
374
418
|
}
|
|
375
419
|
|
|
376
420
|
function printHelp() {
|
|
377
|
-
console.log(
|
|
421
|
+
console.log(`${CLI_NAME}
|
|
378
422
|
|
|
379
423
|
Usage:
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
424
|
+
${CLI_NAME} install [--yes] [--platform claude,cursor] [--dry-run]
|
|
425
|
+
${CLI_NAME} install [--yes] [--target "Claude Code,Codex"] [--dry-run]
|
|
426
|
+
${CLI_NAME} uninstall [--yes] [--platform all] [--dry-run]
|
|
427
|
+
${CLI_NAME} list
|
|
428
|
+
${CLI_NAME} config
|
|
429
|
+
|
|
430
|
+
Platforms:
|
|
431
|
+
openclaw, claude, opencode, codex, cursor, gemini, jiuwen, all
|
|
384
432
|
|
|
385
433
|
Environment:
|
|
386
|
-
|
|
434
|
+
WOW_MIGRATOR_SKIP_POSTINSTALL=1 Skip npm postinstall auto-install.
|
|
387
435
|
`);
|
|
388
436
|
}
|
|
389
437
|
|
|
@@ -402,6 +450,6 @@ async function main() {
|
|
|
402
450
|
|
|
403
451
|
main().catch((error) => {
|
|
404
452
|
const message = error instanceof Error ? error.message : String(error);
|
|
405
|
-
console.error(`[
|
|
453
|
+
console.error(`[wow-migrator] ${message}`);
|
|
406
454
|
process.exitCode = 1;
|
|
407
455
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@code-migration/wow-migrator",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Install KMP migration skills into Claude Code, Codex, Cursor, Gemini, OpenCode, OpenClaw, and JiuwenSwarm via npm install.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"android",
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
"type": "module",
|
|
19
19
|
"repository": {
|
|
20
20
|
"type": "git",
|
|
21
|
-
"url": "https://github.com/winson-AI/cli-plugins.git"
|
|
21
|
+
"url": "git+https://github.com/winson-AI/cli-plugins.git"
|
|
22
22
|
},
|
|
23
23
|
"bin": {
|
|
24
|
-
"
|
|
24
|
+
"wow-migrator": "bin/wow-migrator.js"
|
|
25
25
|
},
|
|
26
26
|
"files": [
|
|
27
27
|
"bin",
|
|
@@ -30,14 +30,22 @@
|
|
|
30
30
|
"README.md"
|
|
31
31
|
],
|
|
32
32
|
"scripts": {
|
|
33
|
-
"install:skills": "node ./bin/
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
33
|
+
"install:skills": "node ./bin/wow-migrator.js install",
|
|
34
|
+
"install:all": "node ./bin/wow-migrator.js install --target all --yes",
|
|
35
|
+
"install:openclaw": "node ./bin/wow-migrator.js install --platform openclaw --yes",
|
|
36
|
+
"install:claude": "node ./bin/wow-migrator.js install --platform claude --yes",
|
|
37
|
+
"install:opencode": "node ./bin/wow-migrator.js install --platform opencode --yes",
|
|
38
|
+
"install:codex": "node ./bin/wow-migrator.js install --platform codex --yes",
|
|
39
|
+
"install:cursor": "node ./bin/wow-migrator.js install --platform cursor --yes",
|
|
40
|
+
"install:gemini": "node ./bin/wow-migrator.js install --platform gemini --yes",
|
|
41
|
+
"install:jiuwen": "node ./bin/wow-migrator.js install --platform jiuwen --yes",
|
|
42
|
+
"uninstall:skills": "node ./bin/wow-migrator.js uninstall",
|
|
43
|
+
"config": "node ./bin/wow-migrator.js config",
|
|
44
|
+
"list": "node ./bin/wow-migrator.js list",
|
|
37
45
|
"sync:skills": "node ./scripts/sync-skills.js",
|
|
38
46
|
"prepare": "node ./scripts/sync-skills.js --if-present",
|
|
39
47
|
"prepack": "node ./scripts/sync-skills.js",
|
|
40
|
-
"postinstall": "node ./bin/
|
|
48
|
+
"postinstall": "node ./bin/wow-migrator.js install --yes --postinstall"
|
|
41
49
|
},
|
|
42
50
|
"engines": {
|
|
43
51
|
"node": ">=18.0.0"
|
|
@@ -1,37 +1,53 @@
|
|
|
1
|
-
# Conversion Note: `android-project-analyst` → Swarm Skill
|
|
1
|
+
# Conversion Note: `android-project-analyst` → clustered Swarm Skill
|
|
2
2
|
|
|
3
|
-
This
|
|
3
|
+
This file records the role-shape history for the `android-project-analyst` skill folder. It is not an active dispatch contract; active node contracts live in [SKILL.md](SKILL.md), [workflow.md](workflow.md), and the files under [roles](roles/).
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Phase 1 — Controller support skill to Swarm Skill
|
|
6
|
+
|
|
7
|
+
The skill was first converted from a single controller-support skill (a flat `SKILL.md` registry plus seven sibling node-spec files) into a compliant **Swarm Skill** using `swarmskill-creator` convert mode.
|
|
8
|
+
|
|
9
|
+
### Source structure before Phase 1
|
|
6
10
|
|
|
7
11
|
- `SKILL.md` — controller registry describing convert mode, node contracts, dispatch order, and the SPEC output contract.
|
|
8
|
-
-
|
|
12
|
+
- Seven flat node specs at the skill root: `ui-understand.md`, `architecture-pattern.md`, `android-ecosystem.md`, `api-list.md`, `resource-understand.md`, `data-flow.md`, `logic-understand.md`. Each contained Role / Inputs / Mandatory Input Validation & Output Storage / Specific Task / Required Outputs / Return Format / Self-Check.
|
|
9
13
|
|
|
10
|
-
|
|
14
|
+
### What Phase 1 added
|
|
11
15
|
|
|
12
16
|
The registry already separated controller from nodes, but it did not encode the team as a first-class artifact: there were no per-role anti-convergence mottos, no `Forbidden`/`Mandatory` boundary blocks the validator could check, no pasteable `Inline Persona` (so each dispatch re-derived the contract by hand), no Mermaid topology making the parallel-then-pipeline shape explicit, and no resource/behavioral guardrails (`max_parallel_teammates`, token/wall-clock budgets, degraded modes). The handoff gates between stages lived only in prose.
|
|
13
17
|
|
|
14
|
-
|
|
18
|
+
The seven-role Swarm Skill preserved the source contracts while adding explicit topology, per-role boundaries, self-contained pasteable personas, budgets, and degraded modes.
|
|
19
|
+
|
|
20
|
+
## Phase 2 — Seven roles to four clustered roles
|
|
21
|
+
|
|
22
|
+
The second pass analyzed each role's function and duty, found repeated cataloging across adjacent personas, and reduced active dispatch from seven roles to four clustered personas. The full analysis is in [ROLE_CLUSTERING.md](ROLE_CLUSTERING.md).
|
|
23
|
+
|
|
24
|
+
## Phase 3 — Add workspace-state ledger role
|
|
25
|
+
|
|
26
|
+
The third pass adds `analysis-workspace-state`, following the ledger pattern used by `android-to-kmp-migrator` and `kmp-test-validator`. This role does not change the four clustered analysis personas. It tracks module/node artifact status, stale upstream inputs, rerun/blocker history, and next safe controller actions so global representations and SPEC files are not built from stale evidence.
|
|
15
27
|
|
|
16
|
-
|
|
17
|
-
- **Disjointness check: PASS.** No node's deliverable can substitute for another's — UI surface vs. architecture style vs. platform ecosystem vs. API contracts vs. resources vs. data movement vs. control-flow behavior are mutually exclusive ownership domains, enforced by each role's `## Boundary > Forbidden` naming its siblings.
|
|
28
|
+
## Old-to-new role map
|
|
18
29
|
|
|
19
|
-
|
|
30
|
+
| Old role(s) | New clustered role | Reason |
|
|
31
|
+
|---|---|---|
|
|
32
|
+
| `ui-understand` + `resource-understand` | `presentation-resource` | Resource usage and migration risk are meaningful only when tied to screens, components, navigation, and UI technology. |
|
|
33
|
+
| `architecture-pattern` + `android-ecosystem` | `project-architecture` | Module topology, architecture style, dependency ecosystem, DI scopes, generated tooling, and Android-only constraints form one project-structure reality check. |
|
|
34
|
+
| `api-list` + `data-flow` | `data-contract-flow` | APIs, local data sources, models, repositories, streams, cache/error behavior, transformations, and write-back paths are one data path. |
|
|
35
|
+
| `logic-understand` | `behavior-logic` | Behavior remains last because user/lifecycle/control-flow analysis requires verified upstream presentation, project, and data evidence. |
|
|
36
|
+
| none (new ledger role) | `analysis-workspace-state` | Workspace-state tracking is cross-cutting and read-only; it prevents stale module/node artifacts from being consumed downstream. |
|
|
20
37
|
|
|
21
|
-
|
|
38
|
+
## Current decomposition
|
|
39
|
+
|
|
40
|
+
- **Pattern: Workspace-state + Mixed B + C.** `analysis-workspace-state` is initialized after output-root lock and refreshed after each major artifact group. Stage A (`presentation-resource`, `project-architecture`, `data-contract-flow`) is parallel decomposition (B) over clustered slices. Stage B (`behavior-logic`) is a gated specialization step (C) that consumes verified, non-stale upstream outputs and must not rebuild them.
|
|
41
|
+
- **Boundary check: PASS.** Clustered roles remove the most common duplicate cataloging while preserving distinct ownership: workspace ledger vs. presentation/resource evidence vs. project architecture/ecosystem evidence vs. data contract/flow evidence vs. behavior/control evidence.
|
|
42
|
+
|
|
43
|
+
## Current content port map
|
|
44
|
+
|
|
45
|
+
| Contract content | Current location |
|
|
22
46
|
|---|---|
|
|
23
|
-
|
|
|
24
|
-
|
|
|
25
|
-
| `## Mandatory Input Validation And Output Storage` | role `## Boundary > Mandatory` + Inline Persona CONTROL block |
|
|
26
|
-
| `Do not:` lists + sibling routing | role `## Boundary > Forbidden` |
|
|
27
|
-
| `## Required Outputs` JSON/MD | role `## Output Schema` + Inline Persona OUTPUTS |
|
|
28
|
-
| `## Return Format` | role Inline Persona RETURN TO CONTROLLER |
|
|
29
|
-
| `## Self-Check` | role `## Success Criteria` |
|
|
30
|
-
| Controller dispatch order + verification | `workflow.md` (staged steps + gates) |
|
|
47
|
+
| Active role registry | `SKILL.md` frontmatter |
|
|
48
|
+
| Staged dispatch order + verification | `workflow.md` |
|
|
31
49
|
| Mandatory contract enforcement + agent-only rules | `bind.md` § Behavioral Constraints |
|
|
32
50
|
| Node failure / rerun handling | `bind.md` § Failure Handling |
|
|
33
|
-
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
The conversion preserves every source contract while adding: explicit parallel/pipeline topology with verifiable gates, per-role anti-overlap boundaries that name siblings, self-contained pasteable personas (no re-derivation per dispatch), resource/token/wall-clock budgets, and concrete degraded modes for large monorepos and missing tooling. The same-name controller subagent in `kmp-migration/agents/android-project-analyst.md` is unchanged in behavior; its `Control Nodes` table now points at `roles/<id>.md`.
|
|
51
|
+
| Function/duty analysis and old-to-new map | `ROLE_CLUSTERING.md` |
|
|
52
|
+
| Per-role identity, boundary, schema, and teammate persona | `roles/<clustered-role>.md` |
|
|
53
|
+
| SPEC output contract + MCP context | `SKILL.md` body |
|