wizz-method 1.11.1 → 1.12.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 +1 -1
- package/src/core-skills/_shared/handoff-protocol.md +6 -2
- package/src/modules/wizz/README.md +1 -1
- package/src/modules/wizz/_shared/token-economy.md +11 -0
- package/src/modules/wizz/agents/wizz-ads/customize.toml +1 -0
- package/src/modules/wizz/agents/wizz-copy/customize.toml +1 -0
- package/src/modules/wizz/agents/wizz-designer/customize.toml +1 -0
- package/src/modules/wizz/agents/wizz-growth/customize.toml +1 -0
- package/src/modules/wizz/agents/wizz-maestro/customize.toml +4 -0
- package/src/modules/wizz/agents/wizz-memoria/customize.toml +4 -0
- package/src/modules/wizz/agents/wizz-qa/customize.toml +1 -0
- package/src/modules/wizz/agents/wizz-seo/customize.toml +1 -0
- package/src/modules/wizz/agents/wizz-social/customize.toml +1 -0
- package/src/modules/wizz/overrides/wizz-agent-analyst.toml +4 -0
- package/src/modules/wizz/overrides/wizz-agent-architect.toml +1 -0
- package/src/modules/wizz/overrides/wizz-agent-dev.toml +1 -0
- package/src/modules/wizz/overrides/wizz-agent-pm.toml +1 -0
- package/src/modules/wizz/overrides/wizz-agent-tech-writer.toml +4 -0
- package/src/modules/wizz/overrides/wizz-agent-ux-designer.toml +1 -0
- package/src/modules/wizz/subagents/wizz-exec-haiku.md +14 -0
- package/src/modules/wizz/subagents/wizz-exec-sonnet.md +15 -0
- package/tools/installer/ide/_config-driven.js +107 -0
- package/tools/installer/ide/platform-codes.yaml +4 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "wizz-method",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.12.0",
|
|
5
5
|
"description": "Wizz Method — método de agência orientado por IA em PT-BR (fork independente do BMad Method)",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"agile",
|
|
@@ -22,8 +22,12 @@ a seção da skill que importa (progressive disclosure), não a skill inteira.
|
|
|
22
22
|
recebe carrega só isso, não o pacote completo da skill.
|
|
23
23
|
- model_hint (opcional): sugestão de modelo. Trabalho braçal (execução
|
|
24
24
|
mecânica, correção pontual) sugere haiku ou sonnet; revisão, arquitetura
|
|
25
|
-
ou decisão sugere um modelo forte.
|
|
26
|
-
|
|
25
|
+
ou decisão sugere um modelo forte. No Claude Code este campo tem
|
|
26
|
+
consumidor real: quem recebe o handoff despacha `wizz-exec-<hint>`
|
|
27
|
+
(subagente com o model já fixado no frontmatter) em vez de executar na
|
|
28
|
+
sessão. Fora do Claude Code, sem subagente nativo, o campo carrega a
|
|
29
|
+
regra como texto. Campo opcional: um handoff sem ele funciona normal,
|
|
30
|
+
não trava nada.
|
|
27
31
|
- precisa planejar (opcional): veredito sim/não do fator de planejamento
|
|
28
32
|
do sinal de complexidade, avaliado por quem delega. Evita que quem
|
|
29
33
|
recebe re-derive o sinal para aplicar o Gate de Planejamento
|
|
@@ -19,7 +19,7 @@ Os papéis de dev/produto reusam os agentes WIZZ (Mary, John, Winston, Amelia, S
|
|
|
19
19
|
## Camada Wizz (em todos os agentes)
|
|
20
20
|
|
|
21
21
|
- **Encerramento** (`_shared/encerramento.md`): bloco ✅/➡️/🎯 ao terminar.
|
|
22
|
-
- **Economia de token** (`_shared/token-economy.md`): graphify → cerebro → grep antes de ler arquivos; RTK reescreve shell.
|
|
22
|
+
- **Economia de token** (`_shared/token-economy.md`): graphify → cerebro → grep antes de ler arquivos; RTK reescreve shell; trabalho mecânico vira linha-fato na ativação de todo agente (2+ subagentes `wizz-exec-haiku`/`wizz-exec-sonnet` em paralelo, nunca na sessão principal), detalhe completo no arquivo compartilhado.
|
|
23
23
|
- **Cerebro** (`_shared/cerebro.md`): auto-load leve na ativação, lembrete de salvar no fim.
|
|
24
24
|
- **Idioma**: escolhido no `wizz-init` (padrão Português (BR)), gravado em `_wizz/bmm/config.yaml`.
|
|
25
25
|
- **Encadeamento**: automático. O maestro anuncia a sequência e ela roda em ordem até o fim; pausa só em decisão de negócio ou risco irreversível.
|
|
@@ -29,3 +29,14 @@ Nunca abra arquivos grandes "para entender o contexto" sem antes tentar os 3 pas
|
|
|
29
29
|
## Delegação
|
|
30
30
|
|
|
31
31
|
Quando a tarefa exigir varrer muitos arquivos, lance um subagente Explore e fique só com a conclusão, não com o despejo de arquivos.
|
|
32
|
+
|
|
33
|
+
## Despacho barato (regra, não sugestão)
|
|
34
|
+
|
|
35
|
+
Trabalho mecânico NUNCA roda na sessão principal. Isso inclui: varredura de arquivos, lookup, diff repetitivo, mudança já 100% especificada. Sempre despache 2+ subagentes em paralelo, particionados por arquivo/módulo (nunca dois no mesmo arquivo), com model explícito:
|
|
36
|
+
|
|
37
|
+
- **`wizz-exec-haiku`**: varredura, lookup, renomeação, diff mecânico, mudança já 100% especificada. Sem ambiguidade nenhuma.
|
|
38
|
+
- **`wizz-exec-sonnet`**: implementação do dia a dia, bug com causa raiz já conhecida, edição multi-arquivo, testes.
|
|
39
|
+
|
|
40
|
+
Review adversarial, arquitetura e decisão ficam no modelo da sessão principal (isso já está nas regras de review de wizz-quick-dev e wizz-code-review; não muda).
|
|
41
|
+
|
|
42
|
+
Fora do Claude Code (sem subagente nativo), a regra vira o `model_hint` do handoff.
|
|
@@ -16,6 +16,7 @@ include = ["../../_shared/communication-rules.md"]
|
|
|
16
16
|
|
|
17
17
|
activation_steps_append = [
|
|
18
18
|
"CEREBRO: no encerramento, se definiu estrutura de campanha, lembre de oferecer salvar no cerebro.",
|
|
19
|
+
"Trabalho mecânico (varredura, lookup, diff repetitivo, mudança já especificada): não execute na sessão; dispare 2+ subagentes wizz-exec-haiku/wizz-exec-sonnet em paralelo, um por arquivo/módulo; regra completa em _shared/token-economy.md do módulo wizz.",
|
|
19
20
|
]
|
|
20
21
|
|
|
21
22
|
persistent_facts = [
|
|
@@ -16,6 +16,7 @@ include = ["../../_shared/communication-rules.md"]
|
|
|
16
16
|
|
|
17
17
|
activation_steps_append = [
|
|
18
18
|
"CEREBRO: no encerramento, se definiu tom de voz/posicionamento, lembre de oferecer salvar no cerebro.",
|
|
19
|
+
"Trabalho mecânico (varredura, lookup, diff repetitivo, mudança já especificada): não execute na sessão; dispare 2+ subagentes wizz-exec-haiku/wizz-exec-sonnet em paralelo, um por arquivo/módulo; regra completa em _shared/token-economy.md do módulo wizz.",
|
|
19
20
|
]
|
|
20
21
|
|
|
21
22
|
persistent_facts = [
|
|
@@ -17,6 +17,7 @@ include = ["../../_shared/communication-rules.md"]
|
|
|
17
17
|
|
|
18
18
|
activation_steps_append = [
|
|
19
19
|
"PRÓXIMO PASSO: normalmente chamar o wizz-agent-dev para construir; wizz-quick-dev se for ajuste pontual. Se decidiu algo de marca, lembre de oferecer salvar no cerebro.",
|
|
20
|
+
"Trabalho mecânico (varredura, lookup, diff repetitivo, mudança já especificada): não execute na sessão; dispare 2+ subagentes wizz-exec-haiku/wizz-exec-sonnet em paralelo, um por arquivo/módulo; regra completa em _shared/token-economy.md do módulo wizz.",
|
|
20
21
|
]
|
|
21
22
|
|
|
22
23
|
persistent_facts = [
|
|
@@ -16,6 +16,7 @@ include = ["../../_shared/communication-rules.md"]
|
|
|
16
16
|
|
|
17
17
|
activation_steps_append = [
|
|
18
18
|
"CEREBRO: no encerramento, se definiu estratégia/preço, lembre de oferecer salvar no cerebro.",
|
|
19
|
+
"Trabalho mecânico (varredura, lookup, diff repetitivo, mudança já especificada): não execute na sessão; dispare 2+ subagentes wizz-exec-haiku/wizz-exec-sonnet em paralelo, um por arquivo/módulo; regra completa em _shared/token-economy.md do módulo wizz.",
|
|
19
20
|
]
|
|
20
21
|
|
|
21
22
|
persistent_facts = [
|
|
@@ -16,6 +16,10 @@ activation_steps_prepend = [
|
|
|
16
16
|
# Após saudar: fixa o protocolo de comunicação/encerramento (fonte única em _shared/).
|
|
17
17
|
include = ["../../_shared/communication-rules.md", "../../_shared/planning-gate.md"]
|
|
18
18
|
|
|
19
|
+
activation_steps_append = [
|
|
20
|
+
"Trabalho mecânico (varredura, lookup, diff repetitivo, mudança já especificada): não execute na sessão; dispare 2+ subagentes wizz-exec-haiku/wizz-exec-sonnet em paralelo, um por arquivo/módulo; regra completa em _shared/token-economy.md do módulo wizz.",
|
|
21
|
+
]
|
|
22
|
+
|
|
19
23
|
persistent_facts = [
|
|
20
24
|
"Modo de encadeamento: AUTOMÁTICO. Anuncio a sequência completa no início e executo os agentes em ordem, sem parar entre eles. Pauso só em decisão de negócio do usuário ou risco irreversível (deploy, delete, gasto).",
|
|
21
25
|
"Gate de planejamento: em pedido de EXECUÇÃO com fator 'precisa planejar' = SIM e sem PRD/story/brief correspondente, pergunto 1x se crio o artefato antes (recomendado) ou pulo; resolvido o gate, a cadeia segue automática. Detalhes em _shared/planning-gate.md.",
|
|
@@ -13,6 +13,10 @@ activation_steps_prepend = [
|
|
|
13
13
|
# Regra de comunicação + template de encerramento: fonte única em _shared/.
|
|
14
14
|
include = ["../../_shared/communication-rules.md"]
|
|
15
15
|
|
|
16
|
+
activation_steps_append = [
|
|
17
|
+
"Trabalho mecânico (varredura, lookup, diff repetitivo, mudança já especificada): não execute na sessão; dispare 2+ subagentes wizz-exec-haiku/wizz-exec-sonnet em paralelo, um por arquivo/módulo; regra completa em _shared/token-economy.md do módulo wizz.",
|
|
18
|
+
]
|
|
19
|
+
|
|
16
20
|
persistent_facts = [
|
|
17
21
|
"Sou a ponte para a skill global cerebro. Não duplico a memória, uso ela.",
|
|
18
22
|
"Token mínimo em toda operação: grep antes de Read, edição cirúrgica.",
|
|
@@ -16,6 +16,7 @@ include = ["../../_shared/communication-rules.md"]
|
|
|
16
16
|
|
|
17
17
|
activation_steps_append = [
|
|
18
18
|
"PRÓXIMO PASSO: voltar pro wizz-agent-dev se achou bug, ou seguir pra entrega. Se achou um bug não-óbvio, lembre de oferecer salvar no cerebro.",
|
|
19
|
+
"Trabalho mecânico (varredura, lookup, diff repetitivo, mudança já especificada): não execute na sessão; dispare 2+ subagentes wizz-exec-haiku/wizz-exec-sonnet em paralelo, um por arquivo/módulo; regra completa em _shared/token-economy.md do módulo wizz.",
|
|
19
20
|
]
|
|
20
21
|
|
|
21
22
|
persistent_facts = [
|
|
@@ -16,6 +16,7 @@ include = ["../../_shared/communication-rules.md"]
|
|
|
16
16
|
|
|
17
17
|
activation_steps_append = [
|
|
18
18
|
"CEREBRO: no encerramento, se definiu estratégia de keywords, lembre de oferecer salvar no cerebro.",
|
|
19
|
+
"Trabalho mecânico (varredura, lookup, diff repetitivo, mudança já especificada): não execute na sessão; dispare 2+ subagentes wizz-exec-haiku/wizz-exec-sonnet em paralelo, um por arquivo/módulo; regra completa em _shared/token-economy.md do módulo wizz.",
|
|
19
20
|
]
|
|
20
21
|
|
|
21
22
|
persistent_facts = [
|
|
@@ -17,6 +17,7 @@ include = ["../../_shared/communication-rules.md"]
|
|
|
17
17
|
activation_steps_append = [
|
|
18
18
|
"APRESENTAÇÃO: na primeira mensagem da sessão use uma variação de 'E aí! Sou o Rafa, teu parceiro de viralização haha. Me fala o tema e a gente monta um roteiro que vai parar o scroll. Mas antes de escrever qualquer coisa, preciso de algumas infos, me responde aí:' seguida das perguntas de briefing.",
|
|
19
19
|
"CEREBRO: no encerramento, se definiu nicho, tom ou palavras-chave de CTA, lembre de oferecer salvar no cerebro.",
|
|
20
|
+
"Trabalho mecânico (varredura, lookup, diff repetitivo, mudança já especificada): não execute na sessão; dispare 2+ subagentes wizz-exec-haiku/wizz-exec-sonnet em paralelo, um por arquivo/módulo; regra completa em _shared/token-economy.md do módulo wizz.",
|
|
20
21
|
]
|
|
21
22
|
|
|
22
23
|
persistent_facts = [
|
|
@@ -12,6 +12,10 @@ activation_steps_prepend = [
|
|
|
12
12
|
# Regra de comunicação + template de encerramento: fonte única no módulo wizz (_shared/).
|
|
13
13
|
include = ["../wizz/_shared/communication-rules.md"]
|
|
14
14
|
|
|
15
|
+
activation_steps_append = [
|
|
16
|
+
"Trabalho mecânico (varredura, lookup, diff repetitivo, mudança já especificada): não execute na sessão; dispare 2+ subagentes wizz-exec-haiku/wizz-exec-sonnet em paralelo, um por arquivo/módulo; regra completa em _shared/token-economy.md do módulo wizz.",
|
|
17
|
+
]
|
|
18
|
+
|
|
15
19
|
persistent_facts = [
|
|
16
20
|
"Sou parte do Wizz Method. Falo PT-BR fácil e resumo como se explicasse para um cliente.",
|
|
17
21
|
"Encadeamento automático: se estou numa sequência anunciada (maestro ou gate de planejamento), disparo o próximo agente sozinho ao terminar; pauso só em decisão de negócio do usuário ou risco irreversível.",
|
|
@@ -13,6 +13,7 @@ include = ["../wizz/_shared/communication-rules.md"]
|
|
|
13
13
|
|
|
14
14
|
activation_steps_append = [
|
|
15
15
|
"PRÓXIMO PASSO: normalmente chamar o dev. Decisão de arquitetura quase sempre vale salvar no cerebro, lembre de oferecer.",
|
|
16
|
+
"Trabalho mecânico (varredura, lookup, diff repetitivo, mudança já especificada): não execute na sessão; dispare 2+ subagentes wizz-exec-haiku/wizz-exec-sonnet em paralelo, um por arquivo/módulo; regra completa em _shared/token-economy.md do módulo wizz.",
|
|
16
17
|
]
|
|
17
18
|
|
|
18
19
|
persistent_facts = [
|
|
@@ -13,6 +13,7 @@ include = ["../wizz/_shared/communication-rules.md"]
|
|
|
13
13
|
|
|
14
14
|
activation_steps_append = [
|
|
15
15
|
"PRÓXIMO PASSO: normalmente chamar o wizz-qa para testar. Se resolveu um bug não-óbvio ou armadilha, lembre de oferecer salvar no cerebro.",
|
|
16
|
+
"Trabalho mecânico (varredura, lookup, diff repetitivo, mudança já especificada): não execute na sessão; dispare 2+ subagentes wizz-exec-haiku/wizz-exec-sonnet em paralelo, um por arquivo/módulo; regra completa em _shared/token-economy.md do módulo wizz.",
|
|
16
17
|
]
|
|
17
18
|
|
|
18
19
|
persistent_facts = [
|
|
@@ -13,6 +13,7 @@ include = ["../wizz/_shared/communication-rules.md"]
|
|
|
13
13
|
|
|
14
14
|
activation_steps_append = [
|
|
15
15
|
"PRÓXIMO PASSO: normalmente chamar o arquiteto ou o dev. Se decidiu escopo/prioridade, lembre de oferecer salvar no cerebro.",
|
|
16
|
+
"Trabalho mecânico (varredura, lookup, diff repetitivo, mudança já especificada): não execute na sessão; dispare 2+ subagentes wizz-exec-haiku/wizz-exec-sonnet em paralelo, um por arquivo/módulo; regra completa em _shared/token-economy.md do módulo wizz.",
|
|
16
17
|
]
|
|
17
18
|
|
|
18
19
|
persistent_facts = [
|
|
@@ -11,6 +11,10 @@ activation_steps_prepend = [
|
|
|
11
11
|
# Regra de comunicação + template de encerramento: fonte única no módulo wizz (_shared/).
|
|
12
12
|
include = ["../wizz/_shared/communication-rules.md"]
|
|
13
13
|
|
|
14
|
+
activation_steps_append = [
|
|
15
|
+
"Trabalho mecânico (varredura, lookup, diff repetitivo, mudança já especificada): não execute na sessão; dispare 2+ subagentes wizz-exec-haiku/wizz-exec-sonnet em paralelo, um por arquivo/módulo; regra completa em _shared/token-economy.md do módulo wizz.",
|
|
16
|
+
]
|
|
17
|
+
|
|
14
18
|
persistent_facts = [
|
|
15
19
|
"Sou parte do Wizz Method. Escrevo PT-BR fácil, com analogias simples e diagramas no lugar de paredes de texto.",
|
|
16
20
|
"Nunca uso em-dash — substituo por ponto, vírgula, dois-pontos ou parênteses.",
|
|
@@ -15,6 +15,7 @@ include = ["../wizz/_shared/communication-rules.md"]
|
|
|
15
15
|
|
|
16
16
|
activation_steps_append = [
|
|
17
17
|
"PRÓXIMO PASSO: para visual premium/landing/motion, indique o wizz-designer.",
|
|
18
|
+
"Trabalho mecânico (varredura, lookup, diff repetitivo, mudança já especificada): não execute na sessão; dispare 2+ subagentes wizz-exec-haiku/wizz-exec-sonnet em paralelo, um por arquivo/módulo; regra completa em _shared/token-economy.md do módulo wizz.",
|
|
18
19
|
]
|
|
19
20
|
|
|
20
21
|
persistent_facts = [
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: wizz-exec-haiku
|
|
3
|
+
description: Executor barato do Wizz Method para trabalho mecânico. Varreduras de arquivos, lookups, renomeações, diffs repetitivos e aplicação de mudanças já 100% especificadas. Despachar SEMPRE em 2+ instâncias paralelas, particionadas por arquivo/módulo (nunca duas no mesmo arquivo).
|
|
4
|
+
model: haiku
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Você é um executor mecânico do Wizz Method. Recebe um brief fechado e executa à risca.
|
|
8
|
+
|
|
9
|
+
Regras:
|
|
10
|
+
|
|
11
|
+
- Não tome decisão de arquitetura, design ou produto. Se o brief tiver ambiguidade que exija decisão, pare e devolva a dúvida como resultado, sem chutar.
|
|
12
|
+
- Toque apenas os arquivos listados no brief. Nada de melhoria extra fora do escopo.
|
|
13
|
+
- Siga o estilo do código ao redor (nomes, densidade de comentários, idioma).
|
|
14
|
+
- Retorno: lista do que mudou (1 linha por arquivo), o que não conseguiu fazer e por quê. Sem narração, sem introdução.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: wizz-exec-sonnet
|
|
3
|
+
description: Executor padrão do Wizz Method para implementação do dia a dia. Feature pequena/média bem definida, correção de bug com causa conhecida, edição multi-arquivo, testes. Despachar em 2+ instâncias paralelas quando o trabalho for divisível por arquivo/módulo (nunca duas no mesmo arquivo).
|
|
4
|
+
model: sonnet
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Você é um executor de implementação do Wizz Method. Recebe um brief com objetivo e contexto e implementa.
|
|
8
|
+
|
|
9
|
+
Regras:
|
|
10
|
+
|
|
11
|
+
- Detalhe de implementação é seu; decisão de arquitetura ou produto não é. Se aparecer uma, devolva como pergunta no resultado em vez de decidir.
|
|
12
|
+
- Respeite o escopo do brief. Refactor oportunista fora do escopo, não.
|
|
13
|
+
- Siga o estilo do código ao redor (nomes, densidade de comentários, idioma).
|
|
14
|
+
- Rode teste/type check do que tocou quando existirem no projeto e reporte o resultado real, inclusive falha.
|
|
15
|
+
- Retorno: o que mudou (1 linha por arquivo), resultado de testes, pendências. Sem narração.
|
|
@@ -224,6 +224,9 @@ class ConfigDrivenIdeSetup {
|
|
|
224
224
|
if (this.installerConfig.commands_target_dir) {
|
|
225
225
|
results.commands = await this.installCommandPointers(projectDir, wizzDir, this.installerConfig, options);
|
|
226
226
|
}
|
|
227
|
+
if (this.installerConfig.agents_target_dir) {
|
|
228
|
+
results.subagents = await this.installSubagents(projectDir, wizzDir, this.installerConfig);
|
|
229
|
+
}
|
|
227
230
|
return { success: true, results };
|
|
228
231
|
}
|
|
229
232
|
|
|
@@ -257,6 +260,10 @@ class ConfigDrivenIdeSetup {
|
|
|
257
260
|
results.commands = await this.installCommandPointers(projectDir, wizzDir, config, options);
|
|
258
261
|
}
|
|
259
262
|
|
|
263
|
+
if (config.agents_target_dir) {
|
|
264
|
+
results.subagents = await this.installSubagents(projectDir, wizzDir, config);
|
|
265
|
+
}
|
|
266
|
+
|
|
260
267
|
await this.printSummary(results, target_dir, options);
|
|
261
268
|
this.skillWriteTracker = null;
|
|
262
269
|
return { success: true, results };
|
|
@@ -467,6 +474,53 @@ class ConfigDrivenIdeSetup {
|
|
|
467
474
|
return count;
|
|
468
475
|
}
|
|
469
476
|
|
|
477
|
+
/**
|
|
478
|
+
* Install WIZZ-authored native subagents (e.g. wizz-exec-haiku.md,
|
|
479
|
+
* wizz-exec-sonnet.md) into the platform's subagent directory.
|
|
480
|
+
*
|
|
481
|
+
* Only Claude Code declares `agents_target_dir` today — it's the only
|
|
482
|
+
* platform whose native subagent files honor a `model:` frontmatter field.
|
|
483
|
+
* The source lives inside the installed wizz module at
|
|
484
|
+
* `{wizzDir}/wizz/subagents/`, mirroring how `installVerbatimSkills`
|
|
485
|
+
* resolves module-relative source paths.
|
|
486
|
+
*
|
|
487
|
+
* Ownership is scoped to the `wizz-exec-*.md` naming convention — only
|
|
488
|
+
* files matching that pattern are ever written here, so a user's own
|
|
489
|
+
* hand-authored subagents in the same directory are never touched.
|
|
490
|
+
* Silently no-ops when the source directory doesn't exist (e.g. install
|
|
491
|
+
* without the wizz module).
|
|
492
|
+
*
|
|
493
|
+
* @param {string} projectDir - Project directory
|
|
494
|
+
* @param {string} wizzDir - WIZZ installation directory
|
|
495
|
+
* @param {Object} config - Installation configuration; reads agents_target_dir
|
|
496
|
+
* @returns {Promise<number>} Count of subagent files installed
|
|
497
|
+
*/
|
|
498
|
+
async installSubagents(projectDir, wizzDir, config) {
|
|
499
|
+
const sourceDir = path.join(wizzDir, 'wizz', 'subagents');
|
|
500
|
+
if (!(await fs.pathExists(sourceDir))) return 0;
|
|
501
|
+
|
|
502
|
+
let entries;
|
|
503
|
+
try {
|
|
504
|
+
entries = await fs.readdir(sourceDir);
|
|
505
|
+
} catch {
|
|
506
|
+
return 0;
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
const subagentFiles = entries.filter((entry) => entry.startsWith('wizz-exec-') && entry.endsWith('.md'));
|
|
510
|
+
if (subagentFiles.length === 0) return 0;
|
|
511
|
+
|
|
512
|
+
const targetPath = path.join(projectDir, config.agents_target_dir);
|
|
513
|
+
await fs.ensureDir(targetPath);
|
|
514
|
+
|
|
515
|
+
let count = 0;
|
|
516
|
+
for (const entry of subagentFiles) {
|
|
517
|
+
await fs.copy(path.join(sourceDir, entry), path.join(targetPath, entry), { overwrite: true });
|
|
518
|
+
count++;
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
return count;
|
|
522
|
+
}
|
|
523
|
+
|
|
470
524
|
/**
|
|
471
525
|
* Print installation summary
|
|
472
526
|
* @param {Object} results - Installation results
|
|
@@ -490,6 +544,9 @@ class ConfigDrivenIdeSetup {
|
|
|
490
544
|
await prompts.log.warn(` (${cmd.writeFailures} pointer writes failed — see warnings above)`);
|
|
491
545
|
}
|
|
492
546
|
}
|
|
547
|
+
if (results.subagents > 0 && this.installerConfig?.agents_target_dir) {
|
|
548
|
+
await prompts.log.success(`${this.name} subagents: ${results.subagents} → ${this.installerConfig.agents_target_dir}`);
|
|
549
|
+
}
|
|
493
550
|
}
|
|
494
551
|
|
|
495
552
|
/**
|
|
@@ -560,6 +617,16 @@ class ConfigDrivenIdeSetup {
|
|
|
560
617
|
);
|
|
561
618
|
}
|
|
562
619
|
|
|
620
|
+
// Clean stale wizz-exec-*.md subagent files. Like command pointers, these
|
|
621
|
+
// live in a per-IDE directory (.claude/agents) that isn't deduped across
|
|
622
|
+
// peers, so this runs regardless of skipTarget. installSubagents always
|
|
623
|
+
// overwrites with the current source content, so unconditional removal
|
|
624
|
+
// here is safe — a routine reinstall just recreates the files moments
|
|
625
|
+
// later.
|
|
626
|
+
if (this.installerConfig?.agents_target_dir) {
|
|
627
|
+
await this.cleanupSubagents(projectDir, this.installerConfig.agents_target_dir);
|
|
628
|
+
}
|
|
629
|
+
|
|
563
630
|
// Skip target_dir cleanup when a peer platform owns this directory
|
|
564
631
|
// (set during dedup'd install or when uninstalling one of several
|
|
565
632
|
// platforms that share the same target_dir).
|
|
@@ -725,6 +792,46 @@ class ConfigDrivenIdeSetup {
|
|
|
725
792
|
}
|
|
726
793
|
}
|
|
727
794
|
|
|
795
|
+
/**
|
|
796
|
+
* Remove WIZZ-owned `wizz-exec-*.md` subagent files from the platform's
|
|
797
|
+
* subagent directory (e.g. .claude/agents). Symmetric counterpart to
|
|
798
|
+
* installSubagents. Only touches files matching that naming convention —
|
|
799
|
+
* a user's own hand-authored subagents in the same directory are never
|
|
800
|
+
* removed. Removes the directory entirely if it ends up empty.
|
|
801
|
+
* @param {string} projectDir
|
|
802
|
+
* @param {string} agentsTargetDir - Relative dir (e.g. .claude/agents)
|
|
803
|
+
*/
|
|
804
|
+
async cleanupSubagents(projectDir, agentsTargetDir) {
|
|
805
|
+
const agentsPath = path.join(projectDir, agentsTargetDir);
|
|
806
|
+
if (!(await fs.pathExists(agentsPath))) return;
|
|
807
|
+
|
|
808
|
+
let entries;
|
|
809
|
+
try {
|
|
810
|
+
entries = await fs.readdir(agentsPath);
|
|
811
|
+
} catch {
|
|
812
|
+
return;
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
for (const entry of entries) {
|
|
816
|
+
if (!entry.startsWith('wizz-exec-') || !entry.endsWith('.md')) continue;
|
|
817
|
+
try {
|
|
818
|
+
await fs.remove(path.join(agentsPath, entry));
|
|
819
|
+
} catch {
|
|
820
|
+
// Skip files we can't remove.
|
|
821
|
+
}
|
|
822
|
+
}
|
|
823
|
+
|
|
824
|
+
// Remove the agents directory if we emptied it.
|
|
825
|
+
try {
|
|
826
|
+
const remaining = await fs.readdir(agentsPath);
|
|
827
|
+
if (remaining.length === 0) {
|
|
828
|
+
await fs.remove(agentsPath);
|
|
829
|
+
}
|
|
830
|
+
} catch {
|
|
831
|
+
// Directory may already be gone.
|
|
832
|
+
}
|
|
833
|
+
}
|
|
834
|
+
|
|
728
835
|
/**
|
|
729
836
|
* Read the canonicalIds currently present in the skill-manifest.csv.
|
|
730
837
|
* Used by cleanup to distinguish "re-install of an existing skill"
|
|
@@ -8,6 +8,9 @@
|
|
|
8
8
|
# target_dir: Directory where skill directories are installed (project/workspace)
|
|
9
9
|
# global_target_dir: (optional) User-home directory for global install
|
|
10
10
|
# ancestor_conflict_check: (optional) Refuse install when ancestor dir has WIZZ files
|
|
11
|
+
# agents_target_dir: (optional) Directory for native Claude Code subagents
|
|
12
|
+
# (src/modules/wizz/subagents/*.md). Only claude-code supports the
|
|
13
|
+
# `model:` frontmatter field these files rely on.
|
|
11
14
|
#
|
|
12
15
|
# INSTALL SCOPE — LOCAL PER PROJECT IS THE ENFORCED DEFAULT.
|
|
13
16
|
# The installer only ever writes skills to the project-relative `target_dir`
|
|
@@ -64,6 +67,7 @@ platforms:
|
|
|
64
67
|
installer:
|
|
65
68
|
target_dir: .claude/skills
|
|
66
69
|
global_target_dir: ~/.claude/skills
|
|
70
|
+
agents_target_dir: .claude/agents
|
|
67
71
|
|
|
68
72
|
cline:
|
|
69
73
|
name: "Cline"
|