wize-dev-kit 0.1.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/ARCH.md +341 -0
- package/CHANGELOG.md +24 -0
- package/DECISIONS.md +141 -0
- package/LICENSE +31 -0
- package/README.md +113 -0
- package/ROSTER.md +25 -0
- package/adapters/README.md +26 -0
- package/adapters/antigravity/README.md +9 -0
- package/adapters/antigravity/adapter.yaml +8 -0
- package/adapters/antigravity/render.js +15 -0
- package/adapters/claude-code/README.md +9 -0
- package/adapters/claude-code/adapter.yaml +8 -0
- package/adapters/claude-code/render.js +15 -0
- package/adapters/codex/README.md +9 -0
- package/adapters/codex/adapter.yaml +8 -0
- package/adapters/codex/render.js +15 -0
- package/adapters/continue/README.md +9 -0
- package/adapters/continue/adapter.yaml +8 -0
- package/adapters/continue/render.js +15 -0
- package/adapters/cursor/README.md +9 -0
- package/adapters/cursor/adapter.yaml +8 -0
- package/adapters/cursor/render.js +15 -0
- package/adapters/generic/README.md +9 -0
- package/adapters/generic/adapter.yaml +8 -0
- package/adapters/generic/render.js +15 -0
- package/adapters/kimi-code/README.md +9 -0
- package/adapters/kimi-code/adapter.yaml +8 -0
- package/adapters/kimi-code/render.js +15 -0
- package/adapters/opencode/README.md +9 -0
- package/adapters/opencode/adapter.yaml +8 -0
- package/adapters/opencode/render.js +15 -0
- package/adapters/windsurf/README.md +9 -0
- package/adapters/windsurf/adapter.yaml +8 -0
- package/adapters/windsurf/render.js +15 -0
- package/package.json +52 -0
- package/schemas/agent.schema.json +37 -0
- package/schemas/module.schema.json +18 -0
- package/schemas/skill.schema.json +14 -0
- package/schemas/workflow.schema.json +19 -0
- package/src/app-overlay/module.yaml +40 -0
- package/src/app-overlay/wize-app-release-channels/workflow.md +21 -0
- package/src/app-overlay/wize-app-scaffold/workflow.md +27 -0
- package/src/app-overlay/wize-app-store-listing/workflow.md +22 -0
- package/src/builder-skills/module.yaml +23 -0
- package/src/builder-skills/wize-create-agent/workflow.md +40 -0
- package/src/builder-skills/wize-create-skill/workflow.md +25 -0
- package/src/builder-skills/wize-create-workflow/workflow.md +26 -0
- package/src/core-skills/module.yaml +27 -0
- package/src/core-skills/wize-advanced-elicitation/skill.md +22 -0
- package/src/core-skills/wize-brainstorming/skill.md +20 -0
- package/src/core-skills/wize-help/skill.md +18 -0
- package/src/core-skills/wize-review-adversarial/skill.md +19 -0
- package/src/core-skills/wize-shard-doc/skill.md +18 -0
- package/src/method-skills/1-analysis/wize-agent-analyst/agent.yaml +39 -0
- package/src/method-skills/1-analysis/wize-agent-analyst/persona.md +33 -0
- package/src/method-skills/1-analysis/wize-agent-tech-writer/agent.yaml +28 -0
- package/src/method-skills/1-analysis/wize-agent-tech-writer/persona.md +30 -0
- package/src/method-skills/1-analysis/wize-document-project/workflow.md +36 -0
- package/src/method-skills/1-analysis/wize-prfaq/workflow.md +27 -0
- package/src/method-skills/1-analysis/wize-product-brief/workflow.md +60 -0
- package/src/method-skills/1-analysis/wize-research/workflow.md +24 -0
- package/src/method-skills/1-analysis/wize-trigger-map/workflow.md +40 -0
- package/src/method-skills/2-plan-workflows/wize-agent-pm/agent.yaml +33 -0
- package/src/method-skills/2-plan-workflows/wize-agent-pm/persona.md +33 -0
- package/src/method-skills/2-plan-workflows/wize-agent-ux-designer/agent.yaml +39 -0
- package/src/method-skills/2-plan-workflows/wize-agent-ux-designer/persona.md +33 -0
- package/src/method-skills/2-plan-workflows/wize-create-prd/workflow.md +57 -0
- package/src/method-skills/2-plan-workflows/wize-ux-design/workflow.md +66 -0
- package/src/method-skills/2-plan-workflows/wize-ux-scenarios/workflow.md +48 -0
- package/src/method-skills/2-plan-workflows/wize-validate-prd/workflow.md +27 -0
- package/src/method-skills/3-solutioning/wize-agent-architect/agent.yaml +35 -0
- package/src/method-skills/3-solutioning/wize-agent-architect/persona.md +29 -0
- package/src/method-skills/3-solutioning/wize-agent-solution-strategist/agent.yaml +30 -0
- package/src/method-skills/3-solutioning/wize-agent-solution-strategist/persona.md +31 -0
- package/src/method-skills/3-solutioning/wize-check-implementation-readiness/workflow.md +22 -0
- package/src/method-skills/3-solutioning/wize-create-architecture/workflow.md +64 -0
- package/src/method-skills/3-solutioning/wize-create-epics-and-stories/workflow.md +48 -0
- package/src/method-skills/3-solutioning/wize-design-system/workflow.md +36 -0
- package/src/method-skills/3-solutioning/wize-nfr-principles/workflow.md +33 -0
- package/src/method-skills/3-solutioning/wize-tech-vision/workflow.md +43 -0
- package/src/method-skills/4-implementation/wize-agent-dev/agent.yaml +34 -0
- package/src/method-skills/4-implementation/wize-agent-dev/persona.md +33 -0
- package/src/method-skills/4-implementation/wize-code-review/workflow.md +24 -0
- package/src/method-skills/4-implementation/wize-create-story/workflow.md +27 -0
- package/src/method-skills/4-implementation/wize-dev-story/workflow.md +33 -0
- package/src/method-skills/4-implementation/wize-quick-dev/workflow.md +33 -0
- package/src/method-skills/4-implementation/wize-retrospective/workflow.md +36 -0
- package/src/method-skills/4-implementation/wize-sprint-planning/workflow.md +24 -0
- package/src/method-skills/4-implementation/wize-sprint-status/workflow.md +25 -0
- package/src/method-skills/module.yaml +105 -0
- package/src/orchestrator-skills/module.yaml +21 -0
- package/src/orchestrator-skills/wize-onboarding/workflow.md +28 -0
- package/src/orchestrator-skills/wize-orchestrator/agent.yaml +37 -0
- package/src/orchestrator-skills/wize-orchestrator/persona.md +22 -0
- package/src/orchestrator-skills/wize-party-mode/workflow.md +25 -0
- package/src/tea-skills/module.yaml +45 -0
- package/src/tea-skills/wize-agent-test-architect/agent.yaml +47 -0
- package/src/tea-skills/wize-agent-test-architect/persona.md +38 -0
- package/src/tea-skills/wize-tea-design/workflow.md +38 -0
- package/src/tea-skills/wize-tea-gate/workflow.md +51 -0
- package/src/tea-skills/wize-tea-nfr/workflow.md +37 -0
- package/src/tea-skills/wize-tea-review/workflow.md +35 -0
- package/src/tea-skills/wize-tea-risk/workflow.md +39 -0
- package/src/tea-skills/wize-tea-trace/workflow.md +36 -0
- package/src/web-overlay/module.yaml +41 -0
- package/src/web-overlay/wize-web-deploy/workflow.md +26 -0
- package/src/web-overlay/wize-web-scaffold/workflow.md +32 -0
- package/src/web-overlay/wize-web-seo-audit/workflow.md +22 -0
- package/tools/installer/detect.js +43 -0
- package/tools/installer/onboarding.js +32 -0
- package/tools/installer/sync.js +29 -0
- package/tools/installer/validators/run-all.js +82 -0
- package/tools/installer/validators/walk.js +40 -0
- package/tools/installer/wize-cli.js +346 -0
|
@@ -0,0 +1,346 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/*
|
|
3
|
+
* wize-dev-kit — CLI entry point
|
|
4
|
+
* Subcommands: install, update, uninstall, list, sync, agent, workflow, help
|
|
5
|
+
*
|
|
6
|
+
* This is a v0.1 scaffold. The interactive prompt logic and adapter rendering
|
|
7
|
+
* are stubs; the dispatcher and basic install/uninstall create the .wize/
|
|
8
|
+
* folder layout so downstream agents can be activated.
|
|
9
|
+
*/
|
|
10
|
+
'use strict';
|
|
11
|
+
|
|
12
|
+
const fs = require('node:fs');
|
|
13
|
+
const path = require('node:path');
|
|
14
|
+
const readline = require('node:readline');
|
|
15
|
+
|
|
16
|
+
const KIT_ROOT = path.resolve(__dirname, '..', '..');
|
|
17
|
+
const KIT_VERSION = require(path.join(KIT_ROOT, 'package.json')).version;
|
|
18
|
+
|
|
19
|
+
const TARGETS = [
|
|
20
|
+
{ code: 'claude-code', label: 'Claude Code (.claude/skills/)', default: true },
|
|
21
|
+
{ code: 'cursor', label: 'Cursor (.cursor/rules/)', default: false },
|
|
22
|
+
{ code: 'windsurf', label: 'Windsurf', default: false },
|
|
23
|
+
{ code: 'codex', label: 'Codex', default: false },
|
|
24
|
+
{ code: 'continue', label: 'Continue', default: false },
|
|
25
|
+
{ code: 'kimi-code', label: 'Kimi Code', default: false },
|
|
26
|
+
{ code: 'opencode', label: 'OpenCode', default: false },
|
|
27
|
+
{ code: 'antigravity', label: 'Antigravity (CLI + IDE)', default: false },
|
|
28
|
+
{ code: 'generic', label: 'Generic fallback (.wize/agents/)', default: true }
|
|
29
|
+
];
|
|
30
|
+
|
|
31
|
+
const PROFILES = [
|
|
32
|
+
{ code: 'core', label: 'Wize Dev Core', required: true },
|
|
33
|
+
{ code: 'web-overlay', label: 'Wize Web Dev (overlay)', required: false },
|
|
34
|
+
{ code: 'app-overlay', label: 'Wize App Development (overlay)', required: false }
|
|
35
|
+
];
|
|
36
|
+
|
|
37
|
+
const HELP = `wize-dev-kit v${KIT_VERSION}
|
|
38
|
+
|
|
39
|
+
Usage:
|
|
40
|
+
wize-dev-kit <command> [options]
|
|
41
|
+
|
|
42
|
+
Commands:
|
|
43
|
+
install Install the kit into the current repo (interactive).
|
|
44
|
+
update Apply upstream diff while preserving customizations.
|
|
45
|
+
uninstall Remove the kit from the current repo (preserves code).
|
|
46
|
+
list List installed agents, skills and workflows.
|
|
47
|
+
sync Regenerate IDE adapters for active targets.
|
|
48
|
+
agent <create|list> Manage agents (built-in or custom).
|
|
49
|
+
workflow <create|list> Manage workflows.
|
|
50
|
+
validate Run schema + lint + dry-run validators.
|
|
51
|
+
help Show this message.
|
|
52
|
+
|
|
53
|
+
Documentation:
|
|
54
|
+
${KIT_ROOT}/README.md
|
|
55
|
+
${KIT_ROOT}/ARCH.md
|
|
56
|
+
${KIT_ROOT}/ROSTER.md
|
|
57
|
+
`;
|
|
58
|
+
|
|
59
|
+
function logo() {
|
|
60
|
+
return [
|
|
61
|
+
'',
|
|
62
|
+
' ╭─────────────────────────────────────────────╮',
|
|
63
|
+
' │ Wize Development Kit │',
|
|
64
|
+
` │ v${KIT_VERSION.padEnd(8)} │`,
|
|
65
|
+
' ╰─────────────────────────────────────────────╯',
|
|
66
|
+
''
|
|
67
|
+
].join('\n');
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function prompt(question) {
|
|
71
|
+
const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
|
|
72
|
+
return new Promise(resolve => rl.question(question, ans => { rl.close(); resolve(ans.trim()); }));
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
async function confirm(question, defaultYes = true) {
|
|
76
|
+
const hint = defaultYes ? '[Y/n]' : '[y/N]';
|
|
77
|
+
const ans = (await prompt(`${question} ${hint} `)).toLowerCase();
|
|
78
|
+
if (!ans) return defaultYes;
|
|
79
|
+
return ans.startsWith('y');
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
async function multiSelect(label, items, isSelected = i => i.default) {
|
|
83
|
+
console.log(`\n${label}:`);
|
|
84
|
+
items.forEach((it, i) => {
|
|
85
|
+
const star = it.required ? '★ ' : ' ';
|
|
86
|
+
const def = isSelected(it) ? '(default on)' : '';
|
|
87
|
+
console.log(` ${i + 1}. ${star}${it.label} ${def}`);
|
|
88
|
+
});
|
|
89
|
+
const ans = await prompt('Pick numbers (comma-separated) or ENTER for defaults: ');
|
|
90
|
+
if (!ans) {
|
|
91
|
+
return items.filter(it => it.required || isSelected(it));
|
|
92
|
+
}
|
|
93
|
+
const indices = ans.split(',').map(s => parseInt(s.trim(), 10) - 1).filter(i => !isNaN(i));
|
|
94
|
+
const picked = indices.map(i => items[i]).filter(Boolean);
|
|
95
|
+
for (const req of items.filter(i => i.required)) {
|
|
96
|
+
if (!picked.includes(req)) picked.push(req);
|
|
97
|
+
}
|
|
98
|
+
return picked;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
function isGitRepo(dir) {
|
|
102
|
+
return fs.existsSync(path.join(dir, '.git'));
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
function detectBrownfield(dir) {
|
|
106
|
+
const signals = [];
|
|
107
|
+
if (fs.existsSync(path.join(dir, 'package.json'))) signals.push('package.json');
|
|
108
|
+
if (fs.existsSync(path.join(dir, 'pubspec.yaml'))) signals.push('pubspec.yaml');
|
|
109
|
+
if (fs.existsSync(path.join(dir, 'Cargo.toml'))) signals.push('Cargo.toml');
|
|
110
|
+
if (fs.existsSync(path.join(dir, 'go.mod'))) signals.push('go.mod');
|
|
111
|
+
if (fs.existsSync(path.join(dir, 'src'))) signals.push('src/');
|
|
112
|
+
return { brownfield: signals.length > 0, signals };
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
function mkdirp(p) {
|
|
116
|
+
fs.mkdirSync(p, { recursive: true });
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
function writeIfMissing(file, content) {
|
|
120
|
+
if (fs.existsSync(file)) return false;
|
|
121
|
+
mkdirp(path.dirname(file));
|
|
122
|
+
fs.writeFileSync(file, content, 'utf-8');
|
|
123
|
+
return true;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
const WIZE_DIRS = [
|
|
127
|
+
'.wize',
|
|
128
|
+
'.wize/config',
|
|
129
|
+
'.wize/planning',
|
|
130
|
+
'.wize/planning/ux',
|
|
131
|
+
'.wize/planning/ux/ux-design',
|
|
132
|
+
'.wize/planning/ux/design-system',
|
|
133
|
+
'.wize/solutioning',
|
|
134
|
+
'.wize/solutioning/adrs',
|
|
135
|
+
'.wize/solutioning/epics',
|
|
136
|
+
'.wize/solutioning/stories',
|
|
137
|
+
'.wize/solutioning/design-system',
|
|
138
|
+
'.wize/implementation',
|
|
139
|
+
'.wize/implementation/tea',
|
|
140
|
+
'.wize/implementation/tea/nfr',
|
|
141
|
+
'.wize/knowledge',
|
|
142
|
+
'.wize/knowledge/document-project',
|
|
143
|
+
'.wize/knowledge/decisions',
|
|
144
|
+
'.wize/custom',
|
|
145
|
+
'.wize/custom/agents',
|
|
146
|
+
'.wize/custom/skills',
|
|
147
|
+
'.wize/custom/workflows'
|
|
148
|
+
];
|
|
149
|
+
|
|
150
|
+
function projectToml({ profiles, targets, language, project_name }) {
|
|
151
|
+
const profileLine = profiles.map(p => `"${p.code}"`).join(', ');
|
|
152
|
+
const targetLine = targets.map(t => `"${t.code}"`).join(', ');
|
|
153
|
+
return `# Wize Development Kit — project config
|
|
154
|
+
# Generated at install. Edit user-level customizations in user.toml.
|
|
155
|
+
|
|
156
|
+
[project]
|
|
157
|
+
name = "${project_name}"
|
|
158
|
+
kit_version = "${KIT_VERSION}"
|
|
159
|
+
|
|
160
|
+
[install]
|
|
161
|
+
profiles = [${profileLine}]
|
|
162
|
+
ide_targets = [${targetLine}]
|
|
163
|
+
|
|
164
|
+
[language]
|
|
165
|
+
communication = "${language}"
|
|
166
|
+
document_output = "${language}"
|
|
167
|
+
|
|
168
|
+
[paths]
|
|
169
|
+
output_root = ".wize"
|
|
170
|
+
planning = ".wize/planning"
|
|
171
|
+
solutioning = ".wize/solutioning"
|
|
172
|
+
implementation = ".wize/implementation"
|
|
173
|
+
knowledge = ".wize/knowledge"
|
|
174
|
+
`;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
function teaToml() {
|
|
178
|
+
return `# Wize TEA (Hawkeye) — policy config
|
|
179
|
+
# Edit to flip to enforcing mode for CI gating.
|
|
180
|
+
|
|
181
|
+
[policy]
|
|
182
|
+
mode = "advisory" # "advisory" | "enforcing"
|
|
183
|
+
|
|
184
|
+
[gates]
|
|
185
|
+
risk = { granularity = "once-after-architecture" }
|
|
186
|
+
design = { granularity = "per-story" }
|
|
187
|
+
trace = { granularity = "per-story" }
|
|
188
|
+
nfr = { granularity = "per-epic" }
|
|
189
|
+
review = { granularity = "per-story" }
|
|
190
|
+
gate = { granularity = "per-story" }
|
|
191
|
+
`;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
function userToml() {
|
|
195
|
+
return `# Wize Development Kit — user-level customizations
|
|
196
|
+
# This file is preserved on update; project.toml may be rewritten.
|
|
197
|
+
`;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
async function cmdInstall(args) {
|
|
201
|
+
const cwd = process.cwd();
|
|
202
|
+
console.log(logo());
|
|
203
|
+
console.log('Installing Wize Development Kit into:', cwd);
|
|
204
|
+
if (!isGitRepo(cwd)) {
|
|
205
|
+
console.log('\n⚠ not a git repo. Initialize git first or proceed at your own risk.');
|
|
206
|
+
const ok = await confirm('Continue anyway?', false);
|
|
207
|
+
if (!ok) process.exit(1);
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
const detection = detectBrownfield(cwd);
|
|
211
|
+
if (detection.brownfield) {
|
|
212
|
+
console.log(`\nBrownfield signals detected: ${detection.signals.join(', ')}`);
|
|
213
|
+
} else {
|
|
214
|
+
console.log('\nGreenfield repo detected.');
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
const project_name = (await prompt(`Project name [${path.basename(cwd)}]: `)) || path.basename(cwd);
|
|
218
|
+
const profiles = await multiSelect('Select profile(s) to install', PROFILES);
|
|
219
|
+
const targets = await multiSelect('Select IDE target(s)', TARGETS);
|
|
220
|
+
const language = (await prompt('Communication language [en]: ')) || 'en';
|
|
221
|
+
|
|
222
|
+
console.log('\nCreating .wize/ skeleton...');
|
|
223
|
+
for (const dir of WIZE_DIRS) mkdirp(path.join(cwd, dir));
|
|
224
|
+
|
|
225
|
+
writeIfMissing(path.join(cwd, '.wize/config/project.toml'), projectToml({ profiles, targets, language, project_name }));
|
|
226
|
+
writeIfMissing(path.join(cwd, '.wize/config/user.toml'), userToml());
|
|
227
|
+
writeIfMissing(path.join(cwd, '.wize/config/tea.toml'), teaToml());
|
|
228
|
+
|
|
229
|
+
console.log('✓ .wize/ created');
|
|
230
|
+
console.log(`✓ profiles: ${profiles.map(p => p.code).join(', ')}`);
|
|
231
|
+
console.log(`✓ ide targets: ${targets.map(t => t.code).join(', ')}`);
|
|
232
|
+
|
|
233
|
+
console.log('\n(stub) IDE adapter generation would run now for each target.');
|
|
234
|
+
console.log('(stub) onboarding handoff to Wizer would start here.');
|
|
235
|
+
|
|
236
|
+
if (detection.brownfield) {
|
|
237
|
+
const baseline = await confirm('\nRun `wize-document-project` to baseline the existing repo now?', true);
|
|
238
|
+
if (baseline) {
|
|
239
|
+
console.log('(stub) Pepper + Peggy would now produce the baseline docs in .wize/knowledge/document-project/.');
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
console.log('\nDone. Activate Wizer in your IDE and say: "Brief me on this project."');
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
async function cmdUninstall() {
|
|
247
|
+
const cwd = process.cwd();
|
|
248
|
+
const dir = path.join(cwd, '.wize');
|
|
249
|
+
if (!fs.existsSync(dir)) {
|
|
250
|
+
console.log('No .wize/ folder found here.');
|
|
251
|
+
return;
|
|
252
|
+
}
|
|
253
|
+
const ok = await confirm(`Remove ${dir}? Your project source code is not touched.`, false);
|
|
254
|
+
if (!ok) return;
|
|
255
|
+
fs.rmSync(dir, { recursive: true, force: true });
|
|
256
|
+
console.log('Removed .wize/.');
|
|
257
|
+
console.log('(stub) IDE adapter files (.claude/skills/wize-*, .cursor/rules/wize-*) would be cleaned here.');
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
function cmdList() {
|
|
261
|
+
console.log(logo());
|
|
262
|
+
console.log('Agents:');
|
|
263
|
+
const list = [
|
|
264
|
+
['wize-orchestrator', 'Wizer'],
|
|
265
|
+
['wize-agent-analyst', 'Pepper Potts'],
|
|
266
|
+
['wize-agent-tech-writer', 'Peggy Carter'],
|
|
267
|
+
['wize-agent-pm', 'Maria Hill'],
|
|
268
|
+
['wize-agent-ux-designer', 'Mantis'],
|
|
269
|
+
['wize-agent-solution-strategist', 'Nick Fury'],
|
|
270
|
+
['wize-agent-architect', 'Tony Stark'],
|
|
271
|
+
['wize-agent-test-architect', 'Hawkeye'],
|
|
272
|
+
['wize-agent-dev', 'Shuri']
|
|
273
|
+
];
|
|
274
|
+
for (const [code, name] of list) console.log(` ${code.padEnd(36)} ${name}`);
|
|
275
|
+
|
|
276
|
+
console.log('\nWorkflows directories:');
|
|
277
|
+
const phases = ['1-analysis', '2-plan-workflows', '3-solutioning', '4-implementation'];
|
|
278
|
+
for (const phase of phases) {
|
|
279
|
+
const dir = path.join(KIT_ROOT, 'src/method-skills', phase);
|
|
280
|
+
if (!fs.existsSync(dir)) continue;
|
|
281
|
+
console.log(` ${phase}:`);
|
|
282
|
+
for (const entry of fs.readdirSync(dir)) {
|
|
283
|
+
if (entry.startsWith('wize-')) console.log(` - ${entry}`);
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
function cmdSync() {
|
|
289
|
+
console.log('(stub) Sync would regenerate IDE adapter files for active targets in .wize/config/project.toml.');
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
function cmdAgent(args) {
|
|
293
|
+
const sub = args[0] || 'list';
|
|
294
|
+
if (sub === 'list') return cmdList();
|
|
295
|
+
if (sub === 'create') {
|
|
296
|
+
console.log('(stub) Interactive agent creation. See src/builder-skills/wize-create-agent/workflow.md.');
|
|
297
|
+
return;
|
|
298
|
+
}
|
|
299
|
+
console.log(`Unknown agent subcommand: ${sub}`);
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
function cmdWorkflow(args) {
|
|
303
|
+
const sub = args[0] || 'list';
|
|
304
|
+
if (sub === 'list') return cmdList();
|
|
305
|
+
if (sub === 'create') {
|
|
306
|
+
console.log('(stub) Interactive workflow creation. See src/builder-skills/wize-create-workflow/workflow.md.');
|
|
307
|
+
return;
|
|
308
|
+
}
|
|
309
|
+
console.log(`Unknown workflow subcommand: ${sub}`);
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
function cmdValidate() {
|
|
313
|
+
require('./validators/run-all.js')(KIT_ROOT);
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
async function main() {
|
|
317
|
+
const [cmd, ...rest] = process.argv.slice(2);
|
|
318
|
+
if (!cmd || cmd === 'help' || cmd === '--help' || cmd === '-h') {
|
|
319
|
+
console.log(HELP);
|
|
320
|
+
return;
|
|
321
|
+
}
|
|
322
|
+
switch (cmd) {
|
|
323
|
+
case 'install': return cmdInstall(rest);
|
|
324
|
+
case 'update': console.log('(stub) Update: diff + preserve customizations. Not yet implemented.'); return;
|
|
325
|
+
case 'uninstall': return cmdUninstall();
|
|
326
|
+
case 'list': return cmdList();
|
|
327
|
+
case 'sync': return cmdSync();
|
|
328
|
+
case 'agent': return cmdAgent(rest);
|
|
329
|
+
case 'workflow': return cmdWorkflow(rest);
|
|
330
|
+
case 'validate': return cmdValidate();
|
|
331
|
+
case 'version':
|
|
332
|
+
case '--version':
|
|
333
|
+
case '-v':
|
|
334
|
+
console.log(`wize-dev-kit v${KIT_VERSION}`);
|
|
335
|
+
return;
|
|
336
|
+
default:
|
|
337
|
+
console.log(`Unknown command: ${cmd}\n`);
|
|
338
|
+
console.log(HELP);
|
|
339
|
+
process.exit(1);
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
main().catch(err => {
|
|
344
|
+
console.error('\n✖ wize-dev-kit failed:', err && err.message ? err.message : err);
|
|
345
|
+
process.exit(1);
|
|
346
|
+
});
|