wizz-method 2.5.0 → 2.6.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.
Files changed (35) hide show
  1. package/package.json +1 -1
  2. package/src/bmm-skills/4-implementation/wizz-code-review/references/review-economy.md +1 -1
  3. package/src/bmm-skills/4-implementation/wizz-code-review/steps/step-03-triage.md +1 -1
  4. package/src/bmm-skills/4-implementation/wizz-quick-dev/references/review-economy.md +1 -1
  5. package/src/bmm-skills/4-implementation/wizz-quick-dev/step-04-review.md +1 -1
  6. package/src/core-skills/_shared/handoff-protocol.md +15 -10
  7. package/src/modules/wizz/README.md +1 -1
  8. package/src/modules/wizz/_shared/despacho-barato.md +1 -1
  9. package/src/modules/wizz/_shared/model-ladder.md +53 -30
  10. package/src/modules/wizz/_shared/token-economy.md +7 -6
  11. package/src/modules/wizz/subagents/codex/{wizz-exec-haiku.toml → wizz-exec-mechanical.toml} +4 -3
  12. package/src/modules/wizz/subagents/codex/wizz-exec-review.toml +3 -2
  13. package/src/modules/wizz/subagents/codex/{wizz-exec-sonnet.toml → wizz-exec-standard.toml} +5 -3
  14. package/src/modules/wizz/subagents/codex/{wizz-exec-opus.toml → wizz-exec-strong.toml} +7 -5
  15. package/src/modules/wizz/subagents/codex/wizz-exec-ultra.toml +35 -0
  16. package/src/modules/wizz/subagents/gemini/{wizz-exec-haiku.md → wizz-exec-mechanical.md} +6 -4
  17. package/src/modules/wizz/subagents/gemini/wizz-exec-review.md +4 -2
  18. package/src/modules/wizz/subagents/gemini/{wizz-exec-sonnet.md → wizz-exec-standard.md} +7 -4
  19. package/src/modules/wizz/subagents/gemini/{wizz-exec-opus.md → wizz-exec-strong.md} +8 -5
  20. package/src/modules/wizz/subagents/opencode/{wizz-exec-haiku.md → wizz-exec-mechanical.md} +3 -2
  21. package/src/modules/wizz/subagents/opencode/wizz-exec-review.md +2 -1
  22. package/src/modules/wizz/subagents/opencode/{wizz-exec-sonnet.md → wizz-exec-standard.md} +4 -2
  23. package/src/modules/wizz/subagents/opencode/{wizz-exec-opus.md → wizz-exec-strong.md} +5 -3
  24. package/src/modules/wizz/subagents/opencode/wizz-exec-ultra.md +34 -0
  25. package/src/modules/wizz/subagents/spec.yaml +104 -51
  26. package/src/modules/wizz/subagents/{wizz-exec-haiku.md → wizz-exec-mechanical.md} +5 -3
  27. package/src/modules/wizz/subagents/wizz-exec-review.md +4 -1
  28. package/src/modules/wizz/subagents/{wizz-exec-sonnet.md → wizz-exec-standard.md} +7 -3
  29. package/src/modules/wizz/subagents/{wizz-exec-opus.md → wizz-exec-strong.md} +8 -4
  30. package/src/modules/wizz/subagents/wizz-exec-ultra.md +36 -0
  31. package/src/skills-lib/wizz-router/SKILL.md +1 -1
  32. package/tools/hooks/wizz-decision-trace.js +2 -1
  33. package/tools/hooks/wizz-router-enforce.js +2 -1
  34. package/tools/installer/commands/trace-report.js +60 -2
  35. package/tools/installer/ide/_config-driven.js +11 -3
@@ -198,6 +198,46 @@ function aggregate(entries) {
198
198
  };
199
199
  }
200
200
 
201
+ // Escada de modelos v2 (ladder v2, 2026-09): tiers atuais + apelidos
202
+ // legados, pra que entradas `type: "ladder"` já gravadas em disco com os
203
+ // nomes antigos (wizz-exec-haiku/sonnet/opus) continuem contando no tier
204
+ // certo depois do rename. Legado → tier novo: haiku→mechanical,
205
+ // sonnet→standard, opus→strong. `ultra` é novo na v2 (sem apelido);
206
+ // `review` fica pinado no tier strong mas é contado à parte (nunca é
207
+ // escolha da escada, é sempre o revisor).
208
+ const TIER_ALIASES = {
209
+ mechanical: 'mechanical',
210
+ haiku: 'mechanical',
211
+ standard: 'standard',
212
+ sonnet: 'standard',
213
+ strong: 'strong',
214
+ opus: 'strong',
215
+ ultra: 'ultra',
216
+ review: 'review',
217
+ };
218
+
219
+ // Ordem de exibição fixa dos tiers — independente da ordem em que
220
+ // apareceram no arquivo, pra saída estável entre execuções.
221
+ const TIER_DISPLAY_ORDER = ['mechanical', 'standard', 'strong', 'ultra', 'review', 'outro'];
222
+
223
+ // Classifica um nome de subagente wizz-exec-* (ex.: "wizz-exec-sonnet",
224
+ // "wizz-exec-ultra", opcionalmente com prefixo de namespace terminado em
225
+ // ":" ou "/" como "plugin:wizz-exec-standard") no tier atual da escada,
226
+ // honrando os apelidos legados acima. O sufixo precisa ser o nome inteiro
227
+ // que sobra (âncora `$`): "wizz-exec-standard-v2" não é reconhecido, cai
228
+ // em "outro". Sufixo não reconhecido (ou `name` não é wizz-exec-*) →
229
+ // "outro". Usa `Object.hasOwn` em vez de acesso direto ao mapa: um sufixo
230
+ // como "constructor" existiria na prototype chain (`{}.constructor` é uma
231
+ // function) e faria `TIER_ALIASES[suffix]` devolver algo truthy mesmo sem
232
+ // entrada própria no mapa.
233
+ function classifyTier(name) {
234
+ if (typeof name !== 'string') return 'outro';
235
+ const match = /^(?:[^:/]+[:/])?wizz-exec-([a-z]+)$/i.exec(name);
236
+ if (!match) return 'outro';
237
+ const suffix = match[1].toLowerCase();
238
+ return Object.hasOwn(TIER_ALIASES, suffix) ? TIER_ALIASES[suffix] : 'outro';
239
+ }
240
+
201
241
  // Bucket de rota pra agregação da escada de modelos: agrupa qualquer
202
242
  // "agent:*" (designer, copy, seo, etc.) numa única chave — o que importa
203
243
  // pra aderência é "foi delegado a um agente de área", não qual área
@@ -217,6 +257,7 @@ function ladderBucket(rota) {
217
257
  // quebrado por rota. Função pura, mesmo espírito de `aggregate`.
218
258
  function aggregateLadder(entries) {
219
259
  const byRoute = {};
260
+ const byTier = {};
220
261
 
221
262
  const bump = (bucket, invoked) => {
222
263
  if (!byRoute[bucket]) byRoute[bucket] = { total: 0, withExec: 0 };
@@ -230,12 +271,17 @@ function aggregateLadder(entries) {
230
271
  for (const entry of entries) {
231
272
  if (!entry || entry.type !== 'ladder') continue;
232
273
  total++;
233
- const invoked = Array.isArray(entry.execs) && entry.execs.length > 0;
274
+ const execs = Array.isArray(entry.execs) ? entry.execs : [];
275
+ const invoked = execs.length > 0;
234
276
  if (invoked) withExec++;
235
277
  bump(ladderBucket(entry.rota), invoked);
278
+ for (const exec of execs) {
279
+ const tier = classifyTier(exec);
280
+ byTier[tier] = (byTier[tier] || 0) + 1;
281
+ }
236
282
  }
237
283
 
238
- return { total, withExec, byRoute };
284
+ return { total, withExec, byRoute, byTier };
239
285
  }
240
286
 
241
287
  // Percentual formatado, protegido contra divisão por zero (mostra "—" em
@@ -268,6 +314,7 @@ function formatSummary(stats, traceFile) {
268
314
  const ROUTE_DISPLAY_ORDER = ['agent:*', 'maestro', 'flat', 'outro'];
269
315
 
270
316
  function formatLadderSummary(ladderStats) {
317
+ const byTier = ladderStats.byTier || {};
271
318
  const lines = [
272
319
  `Pedidos roteados com dado de escada: ${ladderStats.total}`,
273
320
  `Invocaram algum wizz-exec-*: ${ladderStats.withExec} (${pct(ladderStats.withExec, ladderStats.total)})`,
@@ -284,6 +331,16 @@ function formatLadderSummary(ladderStats) {
284
331
  }
285
332
  }
286
333
 
334
+ lines.push('Por tier (execs) (wizz-exec-*, nomes legados contam no tier novo):');
335
+ const tiers = TIER_DISPLAY_ORDER.filter((tier) => byTier[tier]);
336
+ if (tiers.length === 0) {
337
+ lines.push(' (sem dados)');
338
+ } else {
339
+ for (const tier of tiers) {
340
+ lines.push(` ${tier.padEnd(10)} ${byTier[tier]}`);
341
+ }
342
+ }
343
+
287
344
  return lines.join('\n');
288
345
  }
289
346
 
@@ -365,6 +422,7 @@ module.exports = {
365
422
  formatSummary,
366
423
  aggregateLadder,
367
424
  ladderBucket,
425
+ classifyTier,
368
426
  formatLadderSummary,
369
427
  pct,
370
428
  collectSkillCatalog,
@@ -452,9 +452,10 @@ class ConfigDrivenIdeSetup {
452
452
  }
453
453
 
454
454
  /**
455
- * Install WIZZ-authored native subagents (e.g. wizz-exec-haiku.md,
456
- * wizz-exec-sonnet.md, or a platform-specific wizz-exec-haiku.toml) into
457
- * the platform's subagent directory.
455
+ * Install WIZZ-authored native subagents (e.g. wizz-exec-mechanical.md,
456
+ * wizz-exec-standard.md, wizz-exec-strong.md, wizz-exec-ultra.md,
457
+ * wizz-exec-review.md, or a platform-specific wizz-exec-mechanical.toml)
458
+ * into the platform's subagent directory.
458
459
  *
459
460
  * Claude Code, Codex, OpenCode, and Gemini CLI declare `agents_target_dir`.
460
461
  * Each platform reads its own native subagent file format, so the source
@@ -474,6 +475,13 @@ class ConfigDrivenIdeSetup {
474
475
  * Silently no-ops when the source directory doesn't exist (e.g. install
475
476
  * without the wizz module).
476
477
  *
478
+ * Tier names in the target dir are current (mechanical, standard, strong,
479
+ * ultra, review); a legacy tier from ladder v1 (wizz-exec-haiku/sonnet/opus)
480
+ * or a stale tier a platform's source no longer provides (e.g. an ultra
481
+ * file on a platform without an ultra tier) never lingers here — setup()
482
+ * runs cleanup() before installSubagents, and cleanup()'s cleanupSubagents
483
+ * already removed every wizz-exec-*.{md,toml} file from the target dir.
484
+ *
477
485
  * @param {string} projectDir - Project directory
478
486
  * @param {string} wizzDir - WIZZ installation directory
479
487
  * @param {Object} config - Installation configuration; reads agents_target_dir