wizz-method 2.18.0 → 2.19.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/package.json +5 -3
- package/removals.txt +10 -0
- package/skills-registry.yaml +50 -38
- package/src/bmm-skills/1-analysis/wizz-set-feature/SKILL.md +9 -9
- package/src/bmm-skills/4-implementation/wizz-create-story/SKILL.md +1 -1
- package/src/bmm-skills/4-implementation/wizz-dev-story/SKILL.md +1 -1
- package/src/bmm-skills/4-implementation/wizz-qa-generate-e2e-tests/SKILL.md +1 -1
- package/src/bmm-skills/4-implementation/wizz-qa-generate-e2e-tests/checklist.md +1 -1
- package/src/bmm-skills/4-implementation/wizz-quick-dev/SKILL.md +1 -1
- package/src/bmm-skills/4-implementation/wizz-sprint-status/SKILL.md +5 -5
- package/src/bmm-skills/module-help.csv +1 -1
- package/src/bmm-skills/module.yaml +1 -1
- package/src/core-skills/_shared/handoff-protocol.md +2 -2
- package/src/modules/lowticket/skills/wizz-lowticket-funil/SKILL.md +1 -1
- package/src/modules/lowticket/skills/wizz-lowticket-guia/SKILL.md +1 -1
- package/src/modules/lowticket/skills/wizz-lowticket-metodologia/SKILL.md +1 -1
- package/src/modules/lowticket/skills/wizz-lowticket-minerador/SKILL.md +1 -1
- package/src/modules/lowticket/skills/wizz-lowticket-pagina/SKILL.md +1 -1
- package/src/modules/lowticket/skills/wizz-lowticket-trafego/SKILL.md +1 -1
- package/src/modules/wizz/_shared/cerebro.md +7 -7
- package/src/modules/wizz/_shared/communication-rules.md +1 -1
- package/src/modules/wizz/_shared/encerramento.md +4 -3
- package/src/modules/wizz/_shared/organizacao.md +8 -4
- package/src/modules/wizz/_shared/token-economy.md +1 -1
- package/src/modules/wizz/_shared/video-pipeline.md +4 -4
- package/src/modules/wizz/agents/wizz-ads/SKILL.md +4 -1
- package/src/modules/wizz/agents/wizz-ads/customize.toml +12 -3
- package/src/modules/wizz/agents/wizz-ads/knowledge/playbook.md +36 -0
- package/src/modules/wizz/agents/wizz-copy/SKILL.md +4 -1
- package/src/modules/wizz/agents/wizz-copy/customize.toml +2 -3
- package/src/modules/wizz/agents/wizz-copy/knowledge/playbook.md +34 -0
- package/src/modules/wizz/agents/wizz-designer/SKILL.md +2 -2
- package/src/modules/wizz/agents/wizz-designer/customize.toml +2 -3
- package/src/modules/wizz/agents/wizz-growth/SKILL.md +4 -1
- package/src/modules/wizz/agents/wizz-growth/customize.toml +33 -4
- package/src/modules/wizz/agents/wizz-growth/knowledge/playbook.md +39 -0
- package/src/modules/wizz/agents/wizz-maestro/SKILL.md +6 -8
- package/src/modules/wizz/agents/wizz-maestro/customize.toml +2 -3
- package/src/modules/wizz/agents/wizz-memoria/SKILL.md +7 -7
- package/src/modules/wizz/agents/wizz-memoria/customize.toml +5 -6
- package/src/modules/wizz/agents/wizz-qa/SKILL.md +5 -6
- package/src/modules/wizz/agents/wizz-qa/customize.toml +3 -4
- package/src/modules/wizz/agents/wizz-seo/SKILL.md +4 -1
- package/src/modules/wizz/agents/wizz-seo/customize.toml +2 -3
- package/src/modules/wizz/agents/wizz-seo/knowledge/playbook.md +31 -0
- package/src/modules/wizz/agents/wizz-social/SKILL.md +3 -3
- package/src/modules/wizz/agents/wizz-social/customize.toml +2 -3
- package/src/modules/wizz/overrides/wizz-agent-analyst.toml +2 -2
- package/src/modules/wizz/overrides/wizz-agent-architect.toml +3 -3
- package/src/modules/wizz/overrides/wizz-agent-dev.toml +3 -3
- package/src/modules/wizz/overrides/wizz-agent-pm.toml +2 -2
- package/src/modules/wizz/overrides/wizz-agent-tech-writer.toml +2 -2
- package/src/modules/wizz/overrides/wizz-agent-ux-designer.toml +2 -2
- package/src/skills-lib/_shared/complexity-signal.md +8 -9
- package/src/skills-lib/_shared/dispatch-rule.yaml +21 -0
- package/src/skills-lib/{cerebro → wizz-cerebro}/SKILL.md +1 -1
- package/src/skills-lib/{ctc-align → wizz-ctc-align}/SKILL.md +1 -1
- package/src/skills-lib/{enhance-prompt → wizz-enhance-prompt}/SKILL.md +1 -1
- package/src/skills-lib/{find-skills → wizz-find-skills}/SKILL.md +1 -1
- package/src/skills-lib/wizz-huashu-design/references/sfx-library.md +1 -1
- package/src/skills-lib/wizz-huashu-design/scripts/add-music.sh +1 -1
- package/src/skills-lib/wizz-huashu-design/scripts/html2pptx.js +45 -37
- package/src/skills-lib/wizz-huashu-design/scripts/mix-voiceover.sh +1 -1
- package/src/skills-lib/wizz-huashu-design/scripts/narrate-pipeline.mjs +11 -5
- package/src/skills-lib/wizz-huashu-design/scripts/test_scripts.py +209 -0
- package/src/skills-lib/wizz-huashu-design/scripts/tts-doubao.mjs +42 -28
- package/src/skills-lib/wizz-ig-profile-optimizer/SKILL.md +1 -1
- package/src/skills-lib/wizz-inicio-de-projeto/SKILL.md +1 -1
- package/src/skills-lib/wizz-launch-readiness/SKILL.md +7 -7
- package/src/skills-lib/wizz-launch-readiness/references/02-seguranca.md +3 -3
- package/src/skills-lib/wizz-launch-readiness/references/03-seo-descoberta.md +5 -5
- package/src/skills-lib/wizz-launch-readiness/references/04-analytics-medicao.md +1 -1
- package/src/skills-lib/wizz-launch-readiness/references/05-conteudo-prova-social.md +6 -6
- package/src/skills-lib/wizz-launch-readiness/references/06-legal-lgpd.md +1 -1
- package/src/skills-lib/wizz-launch-readiness/references/08-fusao-priorizacao.md +1 -1
- package/src/skills-lib/wizz-offer-forge/SKILL.md +3 -3
- package/src/skills-lib/{pesquisa-de-publico-do-piva → wizz-pesquisa-de-publico-do-piva}/README.md +1 -1
- package/src/skills-lib/{pesquisa-de-publico-do-piva → wizz-pesquisa-de-publico-do-piva}/SKILL.md +1 -1
- package/src/skills-lib/wizz-router/SKILL.md +3 -3
- package/src/skills-lib/wizz-router/references/routing-table-flat.md +9 -9
- package/src/skills-lib/{security-audit-pentest → wizz-security-audit-pentest}/SKILL.md +1 -1
- package/src/skills-lib/{site-launch-kit → wizz-site-launch-kit}/SKILL.md +1 -1
- package/src/skills-lib/wizz-video-effects/SKILL.md +3 -3
- package/src/skills-lib/wizz-video-effects/references/data-contract.md +3 -3
- package/src/skills-lib/wizz-video-effects/scripts/fill_breaths.py +15 -1
- package/src/skills-lib/wizz-video-effects/scripts/test_fill_breaths.py +20 -0
- package/src/skills-lib/wizz-video-styles/SKILL.md +2 -2
- package/src/skills-lib/wizz-video-styles/data/recipes.json +32 -1
- package/src/skills-lib/wizz-video-styles/data/references.json +211 -1
- package/src/skills-lib/wizz-video-styles/data/styles.json +54 -0
- package/src/skills-lib/wizz-video-styles/references/generated-prompts.md +13 -3
- package/src/skills-lib/wizz-video-styles/references/style-picker.md +4 -2
- package/src/skills-lib/wizz-video-styles/references/styles/ui-morph.md +68 -0
- package/src/skills-lib/wizz-video-styles/scripts/analyze.sh +21 -9
- package/src/skills-lib/wizz-video-styles/scripts/references.mjs +1 -0
- package/src/skills-lib/wizz-web-security/SKILL.md +1 -1
- package/tools/fetch-assets.mjs +1 -1
- package/tools/hooks/README.md +18 -14
- package/tools/hooks/rtk-rewrite.js +95 -0
- package/tools/hooks/security-defensive-context.js +17 -1
- package/tools/hooks/session-rules.js +25 -5
- package/tools/hooks/wizz-arrumar.js +126 -12
- package/tools/hooks/wizz-artifact-guard.js +41 -7
- package/tools/hooks/wizz-cerebro-lib.js +239 -0
- package/tools/hooks/wizz-close-reminder.js +124 -0
- package/tools/hooks/wizz-debug-lib.js +55 -0
- package/tools/hooks/wizz-decision-trace.js +19 -2
- package/tools/hooks/wizz-feature.js +20 -4
- package/tools/hooks/wizz-router-enforce.js +30 -13
- package/tools/installer/command-text.js +243 -0
- package/tools/installer/commands/catalog.js +2 -0
- package/tools/installer/commands/doctor.js +10 -12
- package/tools/installer/commands/fetch-assets.js +5 -5
- package/tools/installer/commands/install.js +6 -7
- package/tools/installer/commands/resolve.js +17 -17
- package/tools/installer/commands/trace-report.js +40 -37
- package/tools/installer/core/doctor.js +60 -55
- package/tools/installer/core/hooks-settings.js +88 -14
- package/tools/installer/core/hooks-smoke.js +134 -0
- package/tools/installer/core/installer.js +61 -52
- package/tools/installer/core/quick-update.js +2 -3
- package/tools/installer/install-text.js +201 -0
- package/tools/installer/modules/channel-plan.js +2 -2
- package/tools/installer/modules/env-vars.js +5 -6
- package/tools/installer/modules/skills-lib.js +1 -1
- package/tools/installer/ui.js +17 -9
- /package/src/skills-lib/{cerebro → wizz-cerebro}/references/comandos-pesquisa-e-memoria.md +0 -0
- /package/src/skills-lib/{cerebro → wizz-cerebro}/references/comandos-rotina-e-captura.md +0 -0
- /package/src/skills-lib/{cerebro → wizz-cerebro}/references/comandos-sessao.md +0 -0
- /package/src/skills-lib/{ctc-align → wizz-ctc-align}/scripts/align.py +0 -0
- /package/src/skills-lib/{enhance-prompt → wizz-enhance-prompt}/README.md +0 -0
- /package/src/skills-lib/{enhance-prompt → wizz-enhance-prompt}/references/KEYWORDS.md +0 -0
- /package/src/skills-lib/{pesquisa-de-publico-do-piva → wizz-pesquisa-de-publico-do-piva}/assets/template.html +0 -0
- /package/src/skills-lib/{pesquisa-de-publico-do-piva → wizz-pesquisa-de-publico-do-piva}/prompts.md +0 -0
- /package/src/skills-lib/{security-audit-pentest → wizz-security-audit-pentest}/references/stage-1-validacao-entrada.md +0 -0
- /package/src/skills-lib/{security-audit-pentest → wizz-security-audit-pentest}/references/stage-2-autorizacao.md +0 -0
- /package/src/skills-lib/{security-audit-pentest → wizz-security-audit-pentest}/references/stage-3-abuso-volume.md +0 -0
- /package/src/skills-lib/{security-audit-pentest → wizz-security-audit-pentest}/references/stage-4-vazamento-resposta.md +0 -0
- /package/src/skills-lib/{security-audit-pentest → wizz-security-audit-pentest}/references/stage-5-fusao-plano.md +0 -0
- /package/src/skills-lib/{site-launch-kit → wizz-site-launch-kit}/references/01-cta-principal.md +0 -0
- /package/src/skills-lib/{site-launch-kit → wizz-site-launch-kit}/references/02-barra-fixa-mobile.md +0 -0
- /package/src/skills-lib/{site-launch-kit → wizz-site-launch-kit}/references/03-tempo-de-resposta.md +0 -0
- /package/src/skills-lib/{site-launch-kit → wizz-site-launch-kit}/references/04-prova-social.md +0 -0
- /package/src/skills-lib/{site-launch-kit → wizz-site-launch-kit}/references/05-faq-decisao.md +0 -0
- /package/src/skills-lib/{site-launch-kit → wizz-site-launch-kit}/references/06-imagens-reais.md +0 -0
- /package/src/skills-lib/{site-launch-kit → wizz-site-launch-kit}/references/07-endereco-como-chegar.md +0 -0
- /package/src/skills-lib/{site-launch-kit → wizz-site-launch-kit}/references/08-titles.md +0 -0
- /package/src/skills-lib/{site-launch-kit → wizz-site-launch-kit}/references/09-open-graph.md +0 -0
- /package/src/skills-lib/{site-launch-kit → wizz-site-launch-kit}/references/10-breadcrumbs.md +0 -0
- /package/src/skills-lib/{site-launch-kit → wizz-site-launch-kit}/references/11-alt-text.md +0 -0
- /package/src/skills-lib/{site-launch-kit → wizz-site-launch-kit}/references/12-schema-local.md +0 -0
- /package/src/skills-lib/{site-launch-kit → wizz-site-launch-kit}/references/13-robots-sitemap.md +0 -0
- /package/src/skills-lib/{site-launch-kit → wizz-site-launch-kit}/references/14-privacidade-termos.md +0 -0
- /package/src/skills-lib/{site-launch-kit → wizz-site-launch-kit}/references/15-medicao.md +0 -0
|
@@ -120,17 +120,14 @@ function findWizzRoot(startDir) {
|
|
|
120
120
|
return null;
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
+
// Gerado por tools/generate-dispatch-rule.mjs a partir de
|
|
124
|
+
// src/skills-lib/_shared/dispatch-rule.yaml (`hook_hint`). Não edite a linha
|
|
125
|
+
// abaixo: edite o yaml e rode `npm run generate:dispatch-rule`.
|
|
126
|
+
const WIZZ_PROJECT_HINT =
|
|
127
|
+
'🎛️ Wizz: NÃO invoque wizz-router. Capacidades → rel necessário à entrega → áreas → atalhos. 2+ áreas → `wizz-maestro`. 1 área: 2+ fatores (multi-passo, planejar, artefato memorável) → `wizz-maestro`; senão → Skill da área. Auth/pagamento/permissão/migração → maestro. Personas são skills, não subagent_type; Agent usa tipos disponíveis wizz-exec-*; difícil → wizz-exec-strong (ESCALAR → ultra).';
|
|
128
|
+
|
|
123
129
|
function buildContext(isWizzProject) {
|
|
124
|
-
if (isWizzProject)
|
|
125
|
-
return (
|
|
126
|
-
'🎛️ Wizz: NÃO invoque wizz-router. Capacidades → rel necessário à entrega → áreas → atalhos. 2+ áreas → `wizz-maestro`. ' +
|
|
127
|
-
'1 área: 2+ fatores (multi-passo, planejar, artefato memorável) → `wizz-maestro`; ' +
|
|
128
|
-
'senão → Skill da área. ' +
|
|
129
|
-
'Auth/pagamento/permissão/migração → maestro. ' +
|
|
130
|
-
'Personas são skills, não subagent_type; Agent usa tipos disponíveis wizz-exec-*' +
|
|
131
|
-
'; difícil → wizz-exec-strong (ESCALAR → ultra).'
|
|
132
|
-
);
|
|
133
|
-
}
|
|
130
|
+
if (isWizzProject) return WIZZ_PROJECT_HINT;
|
|
134
131
|
return (
|
|
135
132
|
'🎛️ Pedido não-trivial: invoque a Skill `wizz-router` antes de agir para ' +
|
|
136
133
|
'mapear skills/MCPs (liste candidatas via AskUserQuestion e confirme). ' +
|
|
@@ -138,6 +135,21 @@ function buildContext(isWizzProject) {
|
|
|
138
135
|
);
|
|
139
136
|
}
|
|
140
137
|
|
|
138
|
+
// Diagnóstico opt-in (WIZZ_DEBUG=1). Lib ausente numa cópia parcial: ainda avisa em stderr.
|
|
139
|
+
let debug = (hook, phase, err) => {
|
|
140
|
+
if (process.env.WIZZ_DEBUG !== '1') return;
|
|
141
|
+
try {
|
|
142
|
+
process.stderr.write(`[wizz-debug] ${hook} ${phase}: ${(err && err.message) || err}\n`);
|
|
143
|
+
} catch {
|
|
144
|
+
// stderr fechado
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
try {
|
|
148
|
+
({ debug } = require('./wizz-debug-lib.js'));
|
|
149
|
+
} catch (error) {
|
|
150
|
+
debug('router-enforce', 'require wizz-debug-lib', error);
|
|
151
|
+
}
|
|
152
|
+
|
|
141
153
|
// Linha de feature, por prompt, em projeto Wizz (2026-10-02, caso Spider).
|
|
142
154
|
// O SessionStart avisa 1x, mas é aqui que o pedido nomeado chega: sem este
|
|
143
155
|
// lembrete o despacho saía sem feature e o artefato caía na raiz. Fail-open:
|
|
@@ -152,7 +164,8 @@ function featureLine(wizzRoot) {
|
|
|
152
164
|
return ` Feature: nenhuma ativa. Pedido nomeado → ANTES de despachar \`${cmd} definir <slug do pedido>\` (sem perguntar); handoff leva \`feature:\`.`;
|
|
153
165
|
}
|
|
154
166
|
return ` Feature: ${state.slug}. Outro assunto → \`${cmd} definir <novo>\`; continuação mantém; entrega fechada → \`${cmd} encerrar\`. Handoff leva \`feature: ${state.slug}\`.`;
|
|
155
|
-
} catch {
|
|
167
|
+
} catch (error) {
|
|
168
|
+
debug('router-enforce', 'featureLine', error);
|
|
156
169
|
return '';
|
|
157
170
|
}
|
|
158
171
|
}
|
|
@@ -197,8 +210,9 @@ function checkFallbackWarnings(isWizzProject, wizzRoot) {
|
|
|
197
210
|
warnings.push(`routing-table-flat.md não encontrada em ${flatTablePath} — rode "npm run sync:global" no repo wizz-method`);
|
|
198
211
|
}
|
|
199
212
|
}
|
|
200
|
-
} catch {
|
|
213
|
+
} catch (error) {
|
|
201
214
|
// fail-silent — checagem de fallback nunca bloqueia o prompt
|
|
215
|
+
debug('router-enforce', 'checkFallbackWarnings', error);
|
|
202
216
|
}
|
|
203
217
|
return warnings;
|
|
204
218
|
}
|
|
@@ -218,7 +232,10 @@ function emitFallbackWarnings(warnings) {
|
|
|
218
232
|
|
|
219
233
|
function runHook() {
|
|
220
234
|
let input = '';
|
|
221
|
-
const stdinTimeout = setTimeout(() =>
|
|
235
|
+
const stdinTimeout = setTimeout(() => {
|
|
236
|
+
debug('router-enforce', 'stdin', 'timeout de 3s sem fim de stdin; saindo sem rotear');
|
|
237
|
+
process.exit(0);
|
|
238
|
+
}, 3000);
|
|
222
239
|
process.stdin.setEncoding('utf8');
|
|
223
240
|
process.stdin.on('data', (chunk) => (input += chunk));
|
|
224
241
|
process.stdin.on('end', () => {
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Text of the maintenance commands that run on an existing install:
|
|
3
|
+
* `wizz doctor` (core/doctor.js + core/hooks-smoke.js), `wizz resolve` and
|
|
4
|
+
* `wizz trace-report`. Merged into install-text.js, so `it()` and the en/pt
|
|
5
|
+
* key-parity test cover these keys too (pendência de 2026-10-15: these three
|
|
6
|
+
* commands only spoke Portuguese).
|
|
7
|
+
*
|
|
8
|
+
* The language comes from install-text.js `useCommandLang()`: WIZZ_LANG,
|
|
9
|
+
* then `communication_language` of the install, then English.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
const en = {
|
|
13
|
+
// wizz doctor (commands/doctor.js)
|
|
14
|
+
doctorTitle: 'wizz doctor — project diagnosis\n',
|
|
15
|
+
doctorSummary: 'Summary: {ok} ok, {warn} warn, {error} error.',
|
|
16
|
+
doctorNextErrors: 'Next step: fix the ERROR items above (wizz update restores the hook files) and run wizz doctor again.',
|
|
17
|
+
doctorNextWarns: 'Next step: warns are optional or degrade single features; follow the hint in each block when it makes sense.',
|
|
18
|
+
doctorResolveHint: 'For the customization snapshots, the command is: wizz resolve',
|
|
19
|
+
doctorAllGood: 'All good: install intact, tools in place and no drift in _wizz/.',
|
|
20
|
+
doctorFailed: 'wizz doctor failed: {error}',
|
|
21
|
+
|
|
22
|
+
// checks (core/doctor.js)
|
|
23
|
+
docSkipped: 'skipped.',
|
|
24
|
+
docHooksMissingFiles: 'Hook files missing in _wizz/hooks/: {list}. Run wizz update to restore them.',
|
|
25
|
+
docHooksNotRegistered:
|
|
26
|
+
'Files ok, but not registered in the PROJECT settings ({settings}): {list}. Not in the GLOBAL settings either ({global}). Run wizz install to register them in the project, or register them globally.',
|
|
27
|
+
docHooksSkippedNote: ' ({n} already registered in the global settings {global}, ok)',
|
|
28
|
+
docHooksOk: '{n} hooks checked{note}.',
|
|
29
|
+
docNoInstallHooks: 'No Wizz install in this directory (_wizz/ missing); project hooks not checked. Run wizz install.',
|
|
30
|
+
docRtkMissing:
|
|
31
|
+
'rtk not found on PATH. Optional, but without it the rtk-rewrite.sh hook is not registered and the token savings do not run. Install: cargo install rtk',
|
|
32
|
+
docRtkOld: 'rtk {installed} is older than the hook floor ({floor}); the rewrite fails with a warn. Update: cargo install rtk',
|
|
33
|
+
docRtkOk: 'rtk {version} on PATH.',
|
|
34
|
+
docVersionUnknown: '(version not reported)',
|
|
35
|
+
docJqMissing:
|
|
36
|
+
'jq not found on PATH. The rtk-rewrite.sh hook needs it; without jq the Bash rewrite warns and carries on without rewriting. Install: brew install jq',
|
|
37
|
+
docJqOk: 'jq on PATH.',
|
|
38
|
+
docPyOptional: 'Optional: the core runs on Node alone; Python only enables the skills that ship their own script ({skills}).',
|
|
39
|
+
docPyFull: 'Python {version} via {command} (tomllib ok): the Python skills run too.',
|
|
40
|
+
docPyFullNoPython3: 'Python {version} exists via {command}, but the scripts call python3, which is not on PATH. {optional}',
|
|
41
|
+
docPyPartial: 'Python {version} on PATH, without tomllib (the skills with their own script need 3.11+). {optional}',
|
|
42
|
+
docPyUnsupported: 'Python {version} is too old (the skills with their own script need 3.11+). {optional}',
|
|
43
|
+
docPyNone: 'python3 not found on PATH. {optional} To get them: brew install python3 (macOS).',
|
|
44
|
+
docDriftNoManifest:
|
|
45
|
+
'files-manifest.csv not found in _wizz/_config/. Without it drift cannot be detected; run wizz update to generate it.',
|
|
46
|
+
docDriftEmpty: 'files-manifest.csv is empty, nothing to compare.',
|
|
47
|
+
docDriftOk: '{n} files match files-manifest.csv.',
|
|
48
|
+
docDriftChanged: '{n} changed',
|
|
49
|
+
docDriftMissing: '{n} missing',
|
|
50
|
+
docDriftAnd: ' and ',
|
|
51
|
+
docDriftWarn:
|
|
52
|
+
'Drift in _wizz/: {parts} against files-manifest.csv (e.g. {examples}). Manual edits in _wizz/ are lost on the next update: move them to _wizz/custom/ and run wizz update.',
|
|
53
|
+
docNoInstallDrift: 'No Wizz install in this directory; drift not checked. Run wizz install.',
|
|
54
|
+
docResolvedNone: 'No installed skill has a customize.toml; nothing to resolve.',
|
|
55
|
+
docResolvedNoIndex: 'Index {file} missing or unreadable: cannot tell whether the {n} snapshots are up to date. Run wizz resolve.',
|
|
56
|
+
docResolvedOk: '{n} snapshots in _wizz/_resolved/ match the inputs that generated them.',
|
|
57
|
+
docResolvedMissing: '{n} without snapshot ({list})',
|
|
58
|
+
docResolvedStale: '{n} with a stale snapshot ({list})',
|
|
59
|
+
docResolvedPrefixStale: 'stale snapshot: run wizz resolve',
|
|
60
|
+
docResolvedPrefix: 'run wizz resolve',
|
|
61
|
+
docNoInstallResolved: 'No Wizz install in this directory; _wizz/_resolved/ snapshots not checked. Run wizz install.',
|
|
62
|
+
docInstrNoBlock: '{file} without the Wizz block at the top (run wizz install)',
|
|
63
|
+
docInstrNone: 'No CLAUDE.md/AGENTS.md in the project.',
|
|
64
|
+
docInstrOk: 'Wizz block present, no legacy rule.',
|
|
65
|
+
'docLegacy.gsd': 'GSD was replaced by the Wizz Method phases and checkpoints',
|
|
66
|
+
'docLegacy.superpowers': 'superpowers was replaced by the Wizz Method',
|
|
67
|
+
'docLegacy.bmad': 'plain BMAD commands and folders became wizz-* and _wizz/',
|
|
68
|
+
'docLegacy.modelo-aposentado': 'retired model ID; the Wizz ladder uses the current aliases',
|
|
69
|
+
|
|
70
|
+
// hooks-run (core/hooks-smoke.js)
|
|
71
|
+
hrBroke: '{id}: broke ({why}){tail}',
|
|
72
|
+
hrNoLibs: '{id}: cannot load its libs ({line})',
|
|
73
|
+
hrSwallowed: '{id}: swallowed error ({line})',
|
|
74
|
+
hrPartialCopy: 'Partial copy in _wizz/hooks/? Run wizz update to restore it.',
|
|
75
|
+
hrOk: '{n} hook(s) run with a minimal payload, no swallowed error.',
|
|
76
|
+
|
|
77
|
+
// wizz resolve (commands/resolve.js)
|
|
78
|
+
rsNoInstall: 'No Wizz install in this directory (_wizz/ missing). Run wizz install first.',
|
|
79
|
+
rsSkillMissing: 'Skill "{skill}" has no customize.toml anywhere in this project.',
|
|
80
|
+
rsSearched: 'Looked in:\n {list}',
|
|
81
|
+
rsOneDone: 'wizz resolve — {written} snapshot written, {skipped} skipped (skill {skill}).',
|
|
82
|
+
rsConfigOk: '_config.json rewritten',
|
|
83
|
+
rsConfigMissing: '_config.json NOT generated (config.toml missing or invalid)',
|
|
84
|
+
rsNoToml: 'No customize.toml in this project (neither in _wizz/ nor in the IDE skill folders).',
|
|
85
|
+
rsPruned: '{n} orphan snapshot(s) removed from _wizz/_resolved/.',
|
|
86
|
+
rsUpdateHint: '{config}. If the install looks incomplete, run: wizz update',
|
|
87
|
+
rsWritten: '{n} snapshot(s) written',
|
|
88
|
+
rsSkipped: '{n} skipped',
|
|
89
|
+
rsOrphans: '{n} orphan(s) removed',
|
|
90
|
+
rsDone: 'wizz resolve — {parts} in _wizz/_resolved/.',
|
|
91
|
+
rsSkippedNote:
|
|
92
|
+
'Skipped skills have an invalid customize.toml: their snapshot was removed and activation falls back to the raw customize.toml until the file is fixed.',
|
|
93
|
+
rsFailed: 'wizz resolve failed: {error}',
|
|
94
|
+
|
|
95
|
+
// wizz trace-report (commands/trace-report.js)
|
|
96
|
+
trCatalog: 'Catalog: {n} skills ({file})',
|
|
97
|
+
trDecisions: 'Decision traces: {n}',
|
|
98
|
+
trSelected: 'Selected (sel): {n} ({pct})',
|
|
99
|
+
trDiscarded: 'Discarded with reason: {n} ({pct})',
|
|
100
|
+
trNever: 'Never considered: {n} ({pct})',
|
|
101
|
+
trCoverage: 'Catalog coverage: {pct}',
|
|
102
|
+
trNoDecisions: '(no decision trace found; run with WIZZ_TRACE=1 and close routed requests to generate data)',
|
|
103
|
+
trNeverNone: 'Never considered: none, catalog 100% covered.',
|
|
104
|
+
trNeverHeader: 'Never considered:',
|
|
105
|
+
trFile: 'File: {file}',
|
|
106
|
+
trTotal: 'Total lines: {n}',
|
|
107
|
+
trTrivial: 'Trivial: {n}',
|
|
108
|
+
trRouted: 'Routed: {n}',
|
|
109
|
+
trModeWizz: ' wizz mode: {n}',
|
|
110
|
+
trModeFlat: ' flat mode: {n}',
|
|
111
|
+
trModeNull: ' null mode: {n}',
|
|
112
|
+
trWarnings: 'With warnings: {n}',
|
|
113
|
+
trPeriod: 'Period: {first} → {last}',
|
|
114
|
+
trCorrupted: 'Ignored lines (corrupted): {n}',
|
|
115
|
+
trLadderTotal: 'Routed requests with ladder data: {n}',
|
|
116
|
+
trLadderExec: 'Invoked some wizz-exec-*: {n} ({pct})',
|
|
117
|
+
trByRoute: 'By route:',
|
|
118
|
+
trNoData: ' (no data)',
|
|
119
|
+
trByTier: 'By tier (execs) (wizz-exec-*, legacy names count in the new tier):',
|
|
120
|
+
trNoTrace: 'No trace found.',
|
|
121
|
+
trExpected: 'Expected location: {file}',
|
|
122
|
+
trHowTo: 'Run install and turn on the routing meter, or export WIZZ_TRACE=1.',
|
|
123
|
+
trCatalogFail: 'Could not read the skill catalog: {error}',
|
|
124
|
+
trCatalogExpected: 'Expected at: {file}',
|
|
125
|
+
trCoverageTitle: 'Skill Catalog Coverage',
|
|
126
|
+
trLadderTitle: 'Model Ladder Adherence',
|
|
127
|
+
trFailed: 'Trace report failed: {error}',
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
const pt = {
|
|
131
|
+
doctorTitle: 'wizz doctor — diagnóstico do projeto\n',
|
|
132
|
+
doctorSummary: 'Resumo: {ok} ok, {warn} warn, {error} error.',
|
|
133
|
+
doctorNextErrors: 'Próximo passo: corrija os itens com ERROR acima (wizz update repõe os arquivos de hook) e rode wizz doctor de novo.',
|
|
134
|
+
doctorNextWarns: 'Próximo passo: os warns são opcionais ou degradam features pontuais; siga a dica de cada bloco quando fizer sentido.',
|
|
135
|
+
doctorResolveHint: 'Para os snapshots de customização, o comando é: wizz resolve',
|
|
136
|
+
doctorAllGood: 'Tudo certo: instalação íntegra, tools no lugar e sem drift em _wizz/.',
|
|
137
|
+
doctorFailed: 'wizz doctor falhou: {error}',
|
|
138
|
+
|
|
139
|
+
docSkipped: 'pulado.',
|
|
140
|
+
docHooksMissingFiles: 'Faltam arquivos de hook em _wizz/hooks/: {list}. Execute wizz update para repor.',
|
|
141
|
+
docHooksNotRegistered:
|
|
142
|
+
'Arquivos ok, mas sem registro no settings do PROJETO ({settings}): {list}. Também não estão no settings GLOBAL ({global}). Rode wizz install para registrar no projeto, ou registre no global.',
|
|
143
|
+
docHooksSkippedNote: ' ({n} já registrado(s) no settings global {global}, ok)',
|
|
144
|
+
docHooksOk: '{n} hooks verificados{note}.',
|
|
145
|
+
docNoInstallHooks: 'Sem instalação Wizz neste diretório (_wizz/ ausente); hooks do projeto não verificados. Rode wizz install.',
|
|
146
|
+
docRtkMissing:
|
|
147
|
+
'rtk não encontrado no PATH. Opcional, mas sem ele o hook rtk-rewrite.sh não é registrado e a economia de tokens não roda. Instale: cargo install rtk',
|
|
148
|
+
docRtkOld: 'rtk {installed} é mais antigo que o piso do hook ({floor}); o rewrite falha em warn. Atualize: cargo install rtk',
|
|
149
|
+
docRtkOk: 'rtk {version} no PATH.',
|
|
150
|
+
docVersionUnknown: '(versão não informada)',
|
|
151
|
+
docJqMissing:
|
|
152
|
+
'jq não encontrado no PATH. O hook rtk-rewrite.sh precisa dele; sem jq o rewrite de Bash avisa e segue sem reescrever. Instale: brew install jq',
|
|
153
|
+
docJqOk: 'jq no PATH.',
|
|
154
|
+
docPyOptional: 'Opcional: o núcleo roda só com Node; Python só habilita as skills com script próprio ({skills}).',
|
|
155
|
+
docPyFull: 'Python {version} via {command} (tomllib ok): as skills Python também rodam.',
|
|
156
|
+
docPyFullNoPython3: 'Python {version} existe via {command}, mas os scripts chamam python3, que não está no PATH. {optional}',
|
|
157
|
+
docPyPartial: 'Python {version} no PATH, sem tomllib (as skills com script próprio pedem 3.11+). {optional}',
|
|
158
|
+
docPyUnsupported: 'Python {version} é antigo demais (as skills com script próprio pedem 3.11+). {optional}',
|
|
159
|
+
docPyNone: 'python3 não encontrado no PATH. {optional} Para tê-las: brew install python3 (macOS).',
|
|
160
|
+
docDriftNoManifest:
|
|
161
|
+
'files-manifest.csv não encontrado em _wizz/_config/. Sem ele não dá para detectar drift; rode wizz update para gerar.',
|
|
162
|
+
docDriftEmpty: 'files-manifest.csv vazio, nada a comparar.',
|
|
163
|
+
docDriftOk: '{n} arquivos batem com o files-manifest.csv.',
|
|
164
|
+
docDriftChanged: '{n} alterado(s)',
|
|
165
|
+
docDriftMissing: '{n} ausente(s)',
|
|
166
|
+
docDriftAnd: ' e ',
|
|
167
|
+
docDriftWarn:
|
|
168
|
+
'Drift em _wizz/: {parts} contra o files-manifest.csv (ex.: {examples}). Edições manuais em _wizz/ são perdidas no próximo update: mova para _wizz/custom/ e rode wizz update.',
|
|
169
|
+
docNoInstallDrift: 'Sem instalação Wizz neste diretório; drift não verificado. Rode wizz install.',
|
|
170
|
+
docResolvedNone: 'Nenhuma skill com customize.toml instalada; nada a resolver.',
|
|
171
|
+
docResolvedNoIndex: 'Índice {file} ausente ou ilegível: não dá para saber se os {n} snapshots estão atualizados. Rode wizz resolve.',
|
|
172
|
+
docResolvedOk: '{n} snapshots em _wizz/_resolved/ batem com as entradas que os geraram.',
|
|
173
|
+
docResolvedMissing: '{n} sem snapshot ({list})',
|
|
174
|
+
docResolvedStale: '{n} com snapshot obsoleto ({list})',
|
|
175
|
+
docResolvedPrefixStale: 'snapshot obsoleto: rode wizz resolve',
|
|
176
|
+
docResolvedPrefix: 'rode wizz resolve',
|
|
177
|
+
docNoInstallResolved: 'Sem instalação Wizz neste diretório; snapshots de _wizz/_resolved/ não verificados. Rode wizz install.',
|
|
178
|
+
docInstrNoBlock: '{file} sem o bloco Wizz no topo (rode wizz install)',
|
|
179
|
+
docInstrNone: 'Sem CLAUDE.md/AGENTS.md no projeto.',
|
|
180
|
+
docInstrOk: 'Bloco Wizz presente, nenhuma regra legada.',
|
|
181
|
+
'docLegacy.gsd': 'GSD foi substituído pelas fases e checkpoints do Wizz Method',
|
|
182
|
+
'docLegacy.superpowers': 'superpowers foi substituído pelo Wizz Method',
|
|
183
|
+
'docLegacy.bmad': 'comandos e pastas do BMAD puro viraram wizz-* e _wizz/',
|
|
184
|
+
'docLegacy.modelo-aposentado': 'ID de modelo aposentado; a escada do Wizz usa os apelidos atuais',
|
|
185
|
+
|
|
186
|
+
hrBroke: '{id}: quebrou ({why}){tail}',
|
|
187
|
+
hrNoLibs: '{id}: não carrega suas libs ({line})',
|
|
188
|
+
hrSwallowed: '{id}: erro engolido ({line})',
|
|
189
|
+
hrPartialCopy: 'Cópia parcial em _wizz/hooks/? Execute wizz update para repor.',
|
|
190
|
+
hrOk: '{n} hook(s) executados com payload mínimo, sem erro engolido.',
|
|
191
|
+
|
|
192
|
+
rsNoInstall: 'Nenhuma instalação Wizz neste diretório (_wizz/ ausente). Rode wizz install primeiro.',
|
|
193
|
+
rsSkillMissing: 'Skill "{skill}" não tem customize.toml em lugar nenhum deste projeto.',
|
|
194
|
+
rsSearched: 'Procurei em:\n {list}',
|
|
195
|
+
rsOneDone: 'wizz resolve — {written} snapshot gravado, {skipped} pulado (skill {skill}).',
|
|
196
|
+
rsConfigOk: '_config.json regravado',
|
|
197
|
+
rsConfigMissing: '_config.json NÃO gerado (config.toml ausente ou inválido)',
|
|
198
|
+
rsNoToml: 'Nenhum customize.toml neste projeto (nem em _wizz/, nem nas pastas de skill dos IDEs).',
|
|
199
|
+
rsPruned: '{n} snapshot(s) órfão(s) removido(s) de _wizz/_resolved/.',
|
|
200
|
+
rsUpdateHint: '{config}. Se a instalação parece incompleta, rode: wizz update',
|
|
201
|
+
rsWritten: '{n} snapshot(s) gravado(s)',
|
|
202
|
+
rsSkipped: '{n} pulado(s)',
|
|
203
|
+
rsOrphans: '{n} órfão(s) removido(s)',
|
|
204
|
+
rsDone: 'wizz resolve — {parts} em _wizz/_resolved/.',
|
|
205
|
+
rsSkippedNote:
|
|
206
|
+
'Skills puladas têm customize.toml inválido: o snapshot delas foi removido e a ativação cai no customize.toml bruto até o arquivo ser corrigido.',
|
|
207
|
+
rsFailed: 'wizz resolve falhou: {error}',
|
|
208
|
+
|
|
209
|
+
trCatalog: 'Catálogo: {n} skills ({file})',
|
|
210
|
+
trDecisions: 'Traces de decisão: {n}',
|
|
211
|
+
trSelected: 'Selecionadas (sel): {n} ({pct})',
|
|
212
|
+
trDiscarded: 'Descartadas c/ motivo: {n} ({pct})',
|
|
213
|
+
trNever: 'Nunca consideradas: {n} ({pct})',
|
|
214
|
+
trCoverage: 'Cobertura do catálogo: {pct}',
|
|
215
|
+
trNoDecisions: '(nenhum trace de decisão encontrado; rode com WIZZ_TRACE=1 e feche pedidos roteados pra gerar dados)',
|
|
216
|
+
trNeverNone: 'Nunca consideradas: nenhuma, catálogo 100% coberto.',
|
|
217
|
+
trNeverHeader: 'Nunca consideradas:',
|
|
218
|
+
trFile: 'Arquivo: {file}',
|
|
219
|
+
trTotal: 'Total de linhas: {n}',
|
|
220
|
+
trTrivial: 'Triviais: {n}',
|
|
221
|
+
trRouted: 'Roteados: {n}',
|
|
222
|
+
trModeWizz: ' modo wizz: {n}',
|
|
223
|
+
trModeFlat: ' modo flat: {n}',
|
|
224
|
+
trModeNull: ' modo nulo: {n}',
|
|
225
|
+
trWarnings: 'Com warnings: {n}',
|
|
226
|
+
trPeriod: 'Período: {first} → {last}',
|
|
227
|
+
trCorrupted: 'Linhas ignoradas (corrompidas): {n}',
|
|
228
|
+
trLadderTotal: 'Pedidos roteados com dado de escada: {n}',
|
|
229
|
+
trLadderExec: 'Invocaram algum wizz-exec-*: {n} ({pct})',
|
|
230
|
+
trByRoute: 'Por rota:',
|
|
231
|
+
trNoData: ' (sem dados)',
|
|
232
|
+
trByTier: 'Por tier (execs) (wizz-exec-*, nomes legados contam no tier novo):',
|
|
233
|
+
trNoTrace: 'Nenhum trace encontrado.',
|
|
234
|
+
trExpected: 'Local esperado: {file}',
|
|
235
|
+
trHowTo: 'Rode o install e ligue o medidor de roteamento, ou exporte WIZZ_TRACE=1.',
|
|
236
|
+
trCatalogFail: 'Não foi possível ler o catálogo de skills: {error}',
|
|
237
|
+
trCatalogExpected: 'Esperado em: {file}',
|
|
238
|
+
trCoverageTitle: 'Cobertura do Catálogo de Skills',
|
|
239
|
+
trLadderTitle: 'Aderência à Escada de Modelos',
|
|
240
|
+
trFailed: 'Trace report falhou: {error}',
|
|
241
|
+
};
|
|
242
|
+
|
|
243
|
+
module.exports = { en, pt };
|
|
@@ -11,6 +11,7 @@ const os = require('node:os');
|
|
|
11
11
|
const prompts = require('../prompts');
|
|
12
12
|
const { runDoctor } = require('../core/doctor');
|
|
13
13
|
const { findWizzDir } = require('../core/installer');
|
|
14
|
+
const { it, useCommandLang } = require('../install-text');
|
|
14
15
|
|
|
15
16
|
/**
|
|
16
17
|
* Path do `settings.json` GLOBAL do usuário. Mesmo override que o installer
|
|
@@ -54,7 +55,7 @@ const STATUS_LABEL = {
|
|
|
54
55
|
|
|
55
56
|
module.exports = {
|
|
56
57
|
command: 'doctor',
|
|
57
|
-
description: '
|
|
58
|
+
description: 'Diagnose the Wizz project: hooks, rtk, jq, python and drift in _wizz/',
|
|
58
59
|
options: [],
|
|
59
60
|
// Exportado para teste (item 17 fase3, bug 9): prova, a partir do comando
|
|
60
61
|
// real da CLI, que o leitor de settings.json GLOBAL usado por checkHooks
|
|
@@ -65,6 +66,7 @@ module.exports = {
|
|
|
65
66
|
const projectDir = process.cwd();
|
|
66
67
|
const { wizzDir } = findWizzDir(projectDir);
|
|
67
68
|
const hasInstall = path.basename(wizzDir) && require('../fs-native').existsSync(wizzDir);
|
|
69
|
+
useCommandLang(hasInstall ? wizzDir : null);
|
|
68
70
|
|
|
69
71
|
const { results, exitCode } = await runDoctor({
|
|
70
72
|
deps: {
|
|
@@ -75,7 +77,7 @@ module.exports = {
|
|
|
75
77
|
},
|
|
76
78
|
});
|
|
77
79
|
|
|
78
|
-
await prompts.log.message('
|
|
80
|
+
await prompts.log.message(it('doctorTitle'));
|
|
79
81
|
|
|
80
82
|
for (const r of results) {
|
|
81
83
|
const line = `[${STATUS_LABEL[r.status]}] ${r.check}: ${r.detail}`;
|
|
@@ -93,28 +95,24 @@ module.exports = {
|
|
|
93
95
|
const oks = results.filter((r) => r.status === 'ok').length;
|
|
94
96
|
|
|
95
97
|
await prompts.log.message('');
|
|
96
|
-
await prompts.log.message(
|
|
98
|
+
await prompts.log.message(it('doctorSummary', { ok: oks, warn: warns, error: errors }));
|
|
97
99
|
|
|
98
100
|
const staleResolved = results.find((r) => r.check === 'resolved' && r.status === 'warn');
|
|
99
101
|
|
|
100
102
|
if (errors > 0) {
|
|
101
|
-
await prompts.log.message(
|
|
102
|
-
'Próximo passo: corrija os itens com ERROR acima (wizz update repor os arquivos de hook) e rode wizz doctor de novo.',
|
|
103
|
-
);
|
|
103
|
+
await prompts.log.message(it('doctorNextErrors'));
|
|
104
104
|
} else if (warns > 0) {
|
|
105
|
-
await prompts.log.message(
|
|
106
|
-
'Próximo passo: os warns são opcionais ou degradam features pontuais; siga a dica de cada bloco quando fizer sentido.',
|
|
107
|
-
);
|
|
105
|
+
await prompts.log.message(it('doctorNextWarns'));
|
|
108
106
|
if (staleResolved) {
|
|
109
|
-
await prompts.log.message('
|
|
107
|
+
await prompts.log.message(it('doctorResolveHint'));
|
|
110
108
|
}
|
|
111
109
|
} else {
|
|
112
|
-
await prompts.log.message('
|
|
110
|
+
await prompts.log.message(it('doctorAllGood'));
|
|
113
111
|
}
|
|
114
112
|
|
|
115
113
|
process.exit(exitCode);
|
|
116
114
|
} catch (error) {
|
|
117
|
-
await prompts.log.error(
|
|
115
|
+
await prompts.log.error(it('doctorFailed', { error: error.message }));
|
|
118
116
|
if (process.env.WIZZ_DEBUG) {
|
|
119
117
|
await prompts.log.message(error.stack);
|
|
120
118
|
}
|
|
@@ -22,12 +22,12 @@
|
|
|
22
22
|
|
|
23
23
|
module.exports = {
|
|
24
24
|
command: 'fetch-assets',
|
|
25
|
-
description: '
|
|
25
|
+
description: 'Download the heavy assets on demand (huashu-design MP3s, canvas-design fonts)',
|
|
26
26
|
options: [
|
|
27
|
-
['--bundle <name>', 'Bundle
|
|
28
|
-
['--dest <dir>', '
|
|
29
|
-
['--force', '
|
|
30
|
-
['--all', '
|
|
27
|
+
['--bundle <name>', 'Bundle to download (huashu-audio | canvas-fonts)'],
|
|
28
|
+
['--dest <dir>', 'Extraction target (default: the bundle location inside the wizz-method package)'],
|
|
29
|
+
['--force', 'Ignore the cache and download again even if the files exist'],
|
|
30
|
+
['--all', 'Download every known bundle'],
|
|
31
31
|
],
|
|
32
32
|
action: async (options) => {
|
|
33
33
|
const { fetchNamedBundle, BUNDLES } = await import('../../fetch-assets.mjs');
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
const { it } = require('../install-text');
|
|
1
2
|
const path = require('node:path');
|
|
2
3
|
const prompts = require('../prompts');
|
|
3
4
|
const { Installer } = require('../core/installer');
|
|
@@ -139,14 +140,12 @@ module.exports = {
|
|
|
139
140
|
// isQuickUpdate() gate in core/installer.js). Say so in the final
|
|
140
141
|
// summary too, not just as a menu hint and an in-run log line, so
|
|
141
142
|
// the "no new skills" outcome is never a silent surprise.
|
|
142
|
-
await prompts.log.info(
|
|
143
|
-
'Skills/MCPs/CLIs não foram alterados (Quick Update). Para provisioná-los, rode install e escolha "Modify Wizz Installation".',
|
|
144
|
-
);
|
|
143
|
+
await prompts.log.info(it('quickUpdateNoSkills'));
|
|
145
144
|
if (result.warnings > 0) {
|
|
146
|
-
await prompts.log.warn(
|
|
145
|
+
await prompts.log.warn(it('doneWarnings', { n: result.warnings }));
|
|
147
146
|
}
|
|
148
147
|
if (result.errors > 0) {
|
|
149
|
-
await prompts.log.error(
|
|
148
|
+
await prompts.log.error(it('doneErrors', { n: result.errors }));
|
|
150
149
|
process.exit(1);
|
|
151
150
|
}
|
|
152
151
|
process.exit(0);
|
|
@@ -169,10 +168,10 @@ module.exports = {
|
|
|
169
168
|
// count means a real failure happened and the exit code must reflect it.
|
|
170
169
|
if (result) {
|
|
171
170
|
if (result.warnings > 0) {
|
|
172
|
-
await prompts.log.warn(
|
|
171
|
+
await prompts.log.warn(it('doneWarnings', { n: result.warnings }));
|
|
173
172
|
}
|
|
174
173
|
if (result.errors > 0) {
|
|
175
|
-
await prompts.log.error(
|
|
174
|
+
await prompts.log.error(it('doneErrors', { n: result.errors }));
|
|
176
175
|
process.exit(1);
|
|
177
176
|
}
|
|
178
177
|
if (result.success) {
|
|
@@ -31,18 +31,20 @@ const prompts = require('../prompts');
|
|
|
31
31
|
const fs = require('../fs-native');
|
|
32
32
|
const { findWizzDir } = require('../core/installer');
|
|
33
33
|
const { resolveAll, resolveOne } = require('../core/resolved-customizations');
|
|
34
|
+
const { it, useCommandLang } = require('../install-text');
|
|
34
35
|
|
|
35
36
|
module.exports = {
|
|
36
37
|
command: 'resolve',
|
|
37
|
-
description: '
|
|
38
|
-
options: [['--skill <name>', '
|
|
38
|
+
description: 'Regenerate the customization snapshots in _wizz/_resolved/ (all skills or one)',
|
|
39
|
+
options: [['--skill <name>', 'Regenerate only this skill (directory name, e.g. wizz-maestro)']],
|
|
39
40
|
action: async (options = {}) => {
|
|
40
41
|
try {
|
|
41
42
|
const projectDir = process.cwd();
|
|
42
43
|
const { wizzDir } = findWizzDir(projectDir);
|
|
44
|
+
useCommandLang(fs.existsSync(wizzDir) ? wizzDir : null);
|
|
43
45
|
|
|
44
46
|
if (!fs.existsSync(wizzDir)) {
|
|
45
|
-
await prompts.log.error(
|
|
47
|
+
await prompts.log.error(it('rsNoInstall'));
|
|
46
48
|
process.exit(1);
|
|
47
49
|
return;
|
|
48
50
|
}
|
|
@@ -53,39 +55,37 @@ module.exports = {
|
|
|
53
55
|
if (skillName) {
|
|
54
56
|
const result = await resolveOne(projectDir, wizzDir, skillName, { warn, includeDeployed: true });
|
|
55
57
|
if (!result.found) {
|
|
56
|
-
await prompts.log.error(
|
|
57
|
-
await prompts.log.message(
|
|
58
|
+
await prompts.log.error(it('rsSkillMissing', { skill: skillName }));
|
|
59
|
+
await prompts.log.message(it('rsSearched', { list: (result.searched || []).join('\n ') }));
|
|
58
60
|
process.exit(1);
|
|
59
61
|
return;
|
|
60
62
|
}
|
|
61
|
-
await prompts.log.message(
|
|
63
|
+
await prompts.log.message(it('rsOneDone', { written: result.written, skipped: result.skipped, skill: skillName }));
|
|
62
64
|
process.exit(0);
|
|
63
65
|
return;
|
|
64
66
|
}
|
|
65
67
|
|
|
66
68
|
const result = await resolveAll({ projectRoot: projectDir, wizzDir, warn, includeDeployed: true });
|
|
67
|
-
const configNote = result.config ? '
|
|
69
|
+
const configNote = result.config ? it('rsConfigOk') : it('rsConfigMissing');
|
|
68
70
|
if (result.written === 0 && result.skipped === 0) {
|
|
69
|
-
await prompts.log.warn(
|
|
71
|
+
await prompts.log.warn(it('rsNoToml'));
|
|
70
72
|
if (result.pruned.length > 0) {
|
|
71
|
-
await prompts.log.message(
|
|
73
|
+
await prompts.log.message(it('rsPruned', { n: result.pruned.length }));
|
|
72
74
|
}
|
|
73
|
-
await prompts.log.message(
|
|
75
|
+
await prompts.log.message(it('rsUpdateHint', { config: configNote }));
|
|
74
76
|
process.exit(0);
|
|
75
77
|
return;
|
|
76
78
|
}
|
|
77
|
-
const parts = [
|
|
78
|
-
if (result.pruned.length > 0) parts.push(
|
|
79
|
+
const parts = [it('rsWritten', { n: result.written }), it('rsSkipped', { n: result.skipped })];
|
|
80
|
+
if (result.pruned.length > 0) parts.push(it('rsOrphans', { n: result.pruned.length }));
|
|
79
81
|
parts.push(configNote);
|
|
80
|
-
await prompts.log.message(
|
|
82
|
+
await prompts.log.message(it('rsDone', { parts: parts.join(', ') }));
|
|
81
83
|
if (result.skipped > 0) {
|
|
82
|
-
await prompts.log.message(
|
|
83
|
-
'Skills puladas têm customize.toml inválido: o snapshot delas foi removido e a ativação cai no customize.toml bruto até o arquivo ser corrigido.',
|
|
84
|
-
);
|
|
84
|
+
await prompts.log.message(it('rsSkippedNote'));
|
|
85
85
|
}
|
|
86
86
|
process.exit(0);
|
|
87
87
|
} catch (error) {
|
|
88
|
-
await prompts.log.error(
|
|
88
|
+
await prompts.log.error(it('rsFailed', { error: error.message }));
|
|
89
89
|
if (process.env.WIZZ_DEBUG) {
|
|
90
90
|
await prompts.log.message(error.stack);
|
|
91
91
|
}
|