wize-dev-kit 0.11.0 → 0.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.
Files changed (87) hide show
  1. package/AGENTS.md +3 -3
  2. package/CHANGELOG.md +29 -0
  3. package/package.json +1 -1
  4. package/src/app-overlay/wize-app-release-channels/workflow.md +2 -0
  5. package/src/app-overlay/wize-app-scaffold/workflow.md +2 -0
  6. package/src/app-overlay/wize-app-store-listing/workflow.md +2 -0
  7. package/src/builder-skills/wize-create-agent/workflow.md +2 -0
  8. package/src/builder-skills/wize-create-skill/workflow.md +2 -0
  9. package/src/builder-skills/wize-create-workflow/workflow.md +2 -0
  10. package/src/core-skills/wize-advanced-elicitation/skill.md +2 -0
  11. package/src/core-skills/wize-brainstorming/skill.md +2 -0
  12. package/src/core-skills/wize-customize/skill.md +2 -0
  13. package/src/core-skills/wize-editorial-review-prose/skill.md +2 -0
  14. package/src/core-skills/wize-editorial-review-structure/skill.md +2 -0
  15. package/src/core-skills/wize-grill/skill.md +3 -1
  16. package/src/core-skills/wize-index-docs/skill.md +3 -1
  17. package/src/core-skills/wize-review-adversarial/skill.md +2 -0
  18. package/src/core-skills/wize-review-edge-case-hunter/skill.md +2 -0
  19. package/src/core-skills/wize-shard-doc/skill.md +2 -0
  20. package/src/core-skills/wize-spec/skill.md +2 -0
  21. package/src/method-skills/1-analysis/wize-agent-analyst/agent.yaml +3 -0
  22. package/src/method-skills/1-analysis/wize-document-project/workflow.md +2 -0
  23. package/src/method-skills/1-analysis/wize-domain-research/workflow.md +7 -0
  24. package/src/method-skills/1-analysis/wize-market-research/workflow.md +7 -0
  25. package/src/method-skills/1-analysis/wize-prfaq/workflow.md +2 -0
  26. package/src/method-skills/1-analysis/wize-product-brief/workflow.md +2 -0
  27. package/src/method-skills/1-analysis/wize-refresh-knowledge/workflow.md +3 -1
  28. package/src/method-skills/1-analysis/wize-research/workflow.md +24 -89
  29. package/src/method-skills/1-analysis/wize-technical-research/workflow.md +7 -0
  30. package/src/method-skills/1-analysis/wize-trigger-map/workflow.md +2 -0
  31. package/src/method-skills/2-plan-workflows/wize-create-prd/workflow.md +2 -0
  32. package/src/method-skills/2-plan-workflows/wize-edit-prd/workflow.md +3 -1
  33. package/src/method-skills/2-plan-workflows/wize-ux-design/workflow.md +2 -0
  34. package/src/method-skills/2-plan-workflows/wize-ux-scenarios/workflow.md +2 -0
  35. package/src/method-skills/2-plan-workflows/wize-validate-prd/workflow.md +2 -0
  36. package/src/method-skills/3-solutioning/wize-check-implementation-readiness/workflow.md +2 -0
  37. package/src/method-skills/3-solutioning/wize-create-architecture/steps/step-08-complete.md +1 -1
  38. package/src/method-skills/3-solutioning/wize-create-architecture/workflow.md +2 -0
  39. package/src/method-skills/3-solutioning/wize-create-epics-and-stories/workflow.md +2 -0
  40. package/src/method-skills/3-solutioning/wize-design-system/workflow.md +2 -0
  41. package/src/method-skills/3-solutioning/wize-nfr-principles/workflow.md +3 -1
  42. package/src/method-skills/3-solutioning/wize-project-context/workflow.md +3 -1
  43. package/src/method-skills/3-solutioning/wize-tech-vision/workflow.md +3 -1
  44. package/src/method-skills/4-implementation/wize-changelog/workflow.md +184 -0
  45. package/src/method-skills/4-implementation/wize-checkpoint-preview/workflow.md +2 -0
  46. package/src/method-skills/4-implementation/wize-code-review/workflow.md +2 -0
  47. package/src/method-skills/4-implementation/wize-correct-course/workflow.md +2 -0
  48. package/src/method-skills/4-implementation/wize-create-story/workflow.md +2 -0
  49. package/src/method-skills/4-implementation/wize-dev-story/workflow.md +3 -1
  50. package/src/method-skills/4-implementation/wize-investigate/workflow.md +2 -0
  51. package/src/method-skills/4-implementation/wize-quick-dev/workflow.md +2 -0
  52. package/src/method-skills/4-implementation/wize-release/workflow.md +162 -0
  53. package/src/method-skills/4-implementation/wize-retrospective/workflow.md +2 -0
  54. package/src/method-skills/4-implementation/wize-sprint-planning/workflow.md +2 -0
  55. package/src/method-skills/4-implementation/wize-sprint-status/workflow.md +2 -0
  56. package/src/method-skills/module.yaml +12 -3
  57. package/src/orchestrator-skills/module.yaml +4 -1
  58. package/src/orchestrator-skills/wize/skill.md +164 -0
  59. package/src/orchestrator-skills/wize-help/skill.md +126 -5
  60. package/src/orchestrator-skills/wize-onboarding/workflow.md +3 -1
  61. package/src/orchestrator-skills/wize-orchestrator/agent.yaml +1 -0
  62. package/src/orchestrator-skills/wize-orchestrator/persona.md +29 -4
  63. package/src/orchestrator-skills/wize-party-mode/workflow.md +2 -0
  64. package/src/security-overlay/_shared/scope-parser.js +27 -0
  65. package/src/security-overlay/agents/red-teamer/agent.yaml +2 -0
  66. package/src/security-overlay/agents/red-teamer/persona.md +6 -0
  67. package/src/security-overlay/skills/wize-sec-enumerate/skill.md +2 -0
  68. package/src/security-overlay/skills/wize-sec-pentest/scripts/run-pipeline.js +18 -1
  69. package/src/security-overlay/skills/wize-sec-pentest/skill.md +2 -0
  70. package/src/security-overlay/skills/wize-sec-recon/skill.md +2 -0
  71. package/src/security-overlay/skills/wize-sec-scope/scripts/generate-scope.js +106 -0
  72. package/src/security-overlay/skills/wize-sec-scope/skill.md +52 -0
  73. package/src/tea-skills/wize-qa-generate-e2e-tests/workflow.md +2 -0
  74. package/src/tea-skills/wize-tea-design/workflow.md +3 -0
  75. package/src/tea-skills/wize-tea-gate/workflow.md +3 -0
  76. package/src/tea-skills/wize-tea-nfr/workflow.md +3 -0
  77. package/src/tea-skills/wize-tea-review/workflow.md +3 -0
  78. package/src/tea-skills/wize-tea-risk/workflow.md +3 -0
  79. package/src/tea-skills/wize-tea-trace/workflow.md +3 -0
  80. package/src/web-overlay/wize-web-deploy/workflow.md +2 -0
  81. package/src/web-overlay/wize-web-scaffold/workflow.md +2 -0
  82. package/src/web-overlay/wize-web-seo-audit/workflow.md +2 -0
  83. package/tools/installer/commands/doctor.js +2 -2
  84. package/tools/installer/onboarding.js +14 -21
  85. package/tools/installer/render-shared.js +50 -28
  86. package/tools/installer/validators/run-all.js +3 -2
  87. package/tools/installer/wize-cli.js +323 -77
@@ -1,9 +1,12 @@
1
1
  ---
2
+
2
3
  code: wize-help
4
+ description: "Use quando o usuário invocar /wize-help para obter snapshot do projeto e o próximo passo recomendado."
3
5
  name: Help (Wizer)
4
6
  module: orchestrator
5
7
  owner: wize-orchestrator
6
8
  status: ready
9
+ aliases: []
7
10
  ---
8
11
 
9
12
  # Wizer · `/wize-help`
@@ -41,18 +44,40 @@ Read these if they exist (absence is information too):
41
44
 
42
45
  ## Step 2 — route
43
46
 
47
+ ### Step 2a — first-run detection (check before anything else)
48
+
49
+ If `.wize/planning/brief.md` does NOT exist AND `.wize/knowledge/document-project/` has no `.md` files, this is a **first run**. Do NOT apply the phase heuristic or intent routing. Instead:
50
+
51
+ > "O que você está construindo?"
52
+
53
+ Wait for the answer. Classify as greenfield or brownfield, then route:
54
+ - **Greenfield** → **Pepper / `wize-product-brief`**
55
+ - **Brownfield** → **Pepper / `wize-document-project`**
56
+
57
+ If ambiguous, ask one clarifying question: "Is this a new project or an existing codebase?" Then route. Never show a menu on first run.
58
+
59
+ ### Step 2b — classify the demand (not a first run)
60
+
44
61
  **First, classify the demand — this is a contract decision, not a shortcut.**
45
62
 
46
63
  | Class | When | Route |
47
64
  |---|---|---|
48
65
  | **Quick Dev** | Small, predictable, trivially scoped, and touches **no** new feature, architecture, UX, or security surface — bug fix, copy edit, small refactor, dep bump, hotfix, brownfield maintenance. | **Shuri / `wize-quick-dev`** (light TEA) — skip the phase heuristic below. |
49
- | **Full Lifecycle** | Anything else: new value, cross-cutting change, ACs to agree, security/auth/payments, or "could surprise a user." | Apply the phase heuristic below, top-down. |
66
+ | **Full Lifecycle** | Anything else: new value, cross-cutting change, ACs to agree, security/auth/payments, or "could surprise a user." | Apply routing below: intent first, phase heuristic as fallback. |
50
67
 
51
68
  Never pick Quick Dev to dodge writing artifacts. If the demand needs an AC, it is Full Lifecycle. When unsure, ask one question rather than guess the class.
52
69
 
70
+ ### Step 2c — intent-based routing (check first)
71
+
72
+ When the user's message contains a clear intent phrase, route directly to the matching skill. The intent table maps user language to skills. Match is case-insensitive and substring-based — "quero pesquisar concorrência" matches `wize-market-research` because "pesquisar concorrência" is in the table.
73
+
74
+ If multiple intents match, pick the most specific (longest phrase match). If still ambiguous, ask one clarifying question. In text-only harnesses, ask that question. In rich-UI harnesses, offer a menu of the matching options.
75
+
53
76
  **Fuzzy demand → suggest a grill.** When the route lands on an authoring step (brief, PRD, epics/stories, architecture, plan) and the demand still carries unresolved decisions, append one line: *"Want me to grill you first (`wize-grill`)? Sharper answers, sharper {artifact}."* Suggest, never force — and never for Quick Dev.
54
77
 
55
- Otherwise apply this heuristic top-down; stop at the first match:
78
+ ### Step 2d — phase heuristic (fallback)
79
+
80
+ When intent is ambiguous or no intent phrase matches, apply this heuristic top-down; stop at the first match:
56
81
 
57
82
  | # | State | Next step |
58
83
  |---|---|---|
@@ -75,11 +100,107 @@ Otherwise apply this heuristic top-down; stop at the first match:
75
100
  | 17 | In-flight story, no implementation commits | **Shuri / `wize-dev-story`** |
76
101
  | 18 | Story has code, no `gate.md` | **Hawkeye / `wize-tea-trace` → `wize-tea-review` → `wize-tea-gate`** |
77
102
  | 19 | A story gated **FAIL**, or sprint drifting (blocked/overdue) | **Shuri fix + Maria Hill / `wize-correct-course`** |
78
- | 20 | All stories gated PASS/CONCERNS, no `ready-for-dev` left | Sprint ended → **Wizer / `wize-retrospective`** + **Pepper+Peggy / `wize-refresh-knowledge`** |
79
- | 21 | All gated, no new epic pulled | Plan next epic (Tony + Maria Hill), or a roadmap session |
103
+ | 20 | All stories gated PASS/CONCERNS, no `ready-for-dev` left, no release tag for this sprint | **Shuri + Maria Hill / `wize-release`** (bump + changelog + tag) |
104
+ | 21 | Release tagged, retrospective not done | **Wizer / `wize-retrospective`** + **Pepper+Peggy / `wize-refresh-knowledge`** |
105
+ | 22 | All gated, no new epic pulled | Plan next epic (Tony + Maria Hill), or a roadmap session |
80
106
 
81
107
  **Overlay ship stages** (when the profile is active): web-overlay adds `wize-web-deploy` / `wize-web-seo-audit`; app-overlay adds `wize-app-release-channels` / `wize-app-store-listing`; security-overlay adds `wize-sec-pentest` (recon → enumerate → SAST → DAST → report, gated by `.wize/security/scope.md`).
82
108
 
109
+ ### Intent routing table
110
+
111
+ Match is case-insensitive, substring-based. Longest match wins. When no intent matches, fall back to the phase heuristic (Step 2b).
112
+
113
+ **Research:**
114
+ | Intent phrases | Skill |
115
+ |---|---|
116
+ | "pesquisar mercado", "market research", "concorrência", "competidores", "competition" | `wize-market-research` |
117
+ | "pesquisar domínio", "domain research", "entender o domínio", "domain", "indústria", "industry" | `wize-domain-research` |
118
+ | "pesquisar tecnologia", "tech research", "technical research", "stack research", "ferramentas" | `wize-technical-research` |
119
+ | "pesquisar" (genérico, sem qualificador específico) | `wize-research` (dispatcher) |
120
+ | "PR/FAQ", "press release", "working backwards" | `wize-prfaq` |
121
+ | "documentar projeto", "baseline", "brownfield", "document project" | `wize-document-project` |
122
+ | "trigger map", "mapear gatilhos", "trigger" | `wize-trigger-map` |
123
+ | "refresh knowledge", "atualizar conhecimento", "consolidar docs" | `wize-refresh-knowledge` |
124
+
125
+ **Planning:**
126
+ | Intent phrases | Skill |
127
+ |---|---|
128
+ | "criar brief", "product brief", "briefing", "brief do produto" | `wize-product-brief` |
129
+ | "criar prd", "PRD", "requisitos", "especificação", "product requirements" | `wize-create-prd` |
130
+ | "validar prd", "revisar prd", "validate prd", "prd validation" | `wize-validate-prd` |
131
+ | "editar prd", "atualizar prd", "mudar prd", "edit prd" | `wize-edit-prd` |
132
+ | "cenários de UX", "ux scenarios", "cenários de uso", "user scenarios" | `wize-ux-scenarios` |
133
+ | "design de interface", "ux design", "design system", "interface", "wireframe", "layout" | `wize-ux-design` |
134
+
135
+ **Architecture:**
136
+ | Intent phrases | Skill |
137
+ |---|---|
138
+ | "arquitetura", "architecture", "ADR", "decisão técnica", "design do sistema", "componentes" | `wize-create-architecture` |
139
+ | "tech vision", "visão técnica", "north star", "stack decision", "stack family" | `wize-tech-vision` |
140
+ | "NFR", "non-functional", "requisitos não-funcionais", "nfr principles", "performance", "segurança", "a11y", "accessibility" | `wize-nfr-principles` |
141
+ | "epics", "stories", "histórias", "épicos", "slice", "fatiar", "criar stories" | `wize-create-epics-and-stories` |
142
+ | "design system", "tokens", "component library", "biblioteca de componentes" | `wize-design-system` |
143
+ | "project context", "contexto do projeto", "consolidar artefatos" | `wize-project-context` |
144
+ | "readiness", "pronto para implementar", "implementation readiness", "gate de solução" | `wize-check-implementation-readiness` |
145
+
146
+ **Implementation:**
147
+ | Intent phrases | Skill |
148
+ |---|---|
149
+ | "corrigir bug", "bug fix", "consertar", "hotfix", "arrumar", "corrigir erro" | `wize-quick-dev` |
150
+ | "implementar story", "dev story", "codar", "desenvolver", "implementar", "fazer story" | `wize-dev-story` |
151
+ | "code review", "revisar código", "revisão de código", "peer review" | `wize-code-review` |
152
+ | "investigar", "debug", "problema", "root cause", "causa raiz", "regressão" | `wize-investigate` |
153
+ | "checkpoint", "validar direção", "mid-story check" | `wize-checkpoint-preview` |
154
+ | "criar story", "nova story", "author story", "escrever story" | `wize-create-story` |
155
+ | "sprint planning", "planejar sprint", "planejamento", "plan sprint" | `wize-sprint-planning` |
156
+ | "sprint status", "status do sprint", "como está o sprint" | `wize-sprint-status` |
157
+ | "correct course", "corrigir curso", "sprint drifting", "desbloquear" | `wize-correct-course` |
158
+ | "release", "lançar", "publicar", "deploy core", "bump versão", "tag", "shipping" | `wize-release` |
159
+ | "changelog", "notas de versão", "release notes", "gerar changelog" | `wize-changelog` |
160
+
161
+ **Testing:**
162
+ | Intent phrases | Skill |
163
+ |---|---|
164
+ | "test design", "tea design", "desenhar testes", "test contract", "contrato de teste" | `wize-tea-design` |
165
+ | "gate decision", "tea gate", "decisão de gate", "pass/fail" | `wize-tea-gate` |
166
+ | "risk profile", "perfil de risco", "matriz de risco", "tea risk" | `wize-tea-risk` |
167
+ | "traceability", "trace", "rastreabilidade", "AC trace", "cobertura de AC" | `wize-tea-trace` |
168
+ | "story review", "tea review", "revisão de story", "auditoria de AC" | `wize-tea-review` |
169
+ | "NFR assessment", "avaliação de NFR", "tea nfr", "verificar NFR" | `wize-tea-nfr` |
170
+ | "e2e", "end-to-end", "testes automatizados", "gerar testes e2e", "testes de interface" | `wize-qa-generate-e2e-tests` |
171
+
172
+ **Security:**
173
+ | Intent phrases | Skill |
174
+ |---|---|
175
+ | "pentest", "security test", "teste de segurança", "vulnerabilidade", "scan de segurança", "security scan" | `wize-sec-pentest` |
176
+ | "security recon", "reconhecimento", "mapear superfície" | `wize-sec-recon` |
177
+ | "enumerate", "enumeração", "surface enumeration", "levantar tech" | `wize-sec-enumerate` |
178
+ | "criar escopo", "definir escopo", "scope security", "escopo de segurança", "scope de pentest" | `wize-sec-scope` |
179
+
180
+ **Meta:**
181
+ | Intent phrases | Skill |
182
+ |---|---|
183
+ | "help", "ajuda", "o que fazer", "próximo passo", "what next" | Show status + next step (no skill dispatch) |
184
+ | "status", "como estamos", "onde estamos", "progresso" | Show sprint status / project snapshot |
185
+ | "retrospective", "retrospectiva", "retro", "lições aprendidas" | `wize-retrospective` |
186
+ | "personas", "quem faz o quê", "roster", "equipe" | List personas relevant to active profiles |
187
+ | "mission", "missão", "contrato", "mission contract" | Emit filled mission contract |
188
+ | "grill", "sabatinar", "questionar", "afiar", "elicitation" | `wize-grill` |
189
+ | "brainstorm", "brainstorming", "ideias", "chuva de ideias" | `wize-brainstorming` |
190
+ | "spec", "specification", "especificação formal" | `wize-spec` |
191
+ | "adversarial review", "revisão adversarial", "ataque à solução" | `wize-review-adversarial` |
192
+ | "edge case", "casos de borda", "edge case hunter" | `wize-review-edge-case-hunter` |
193
+ | "editorial", "revisão de texto", "polir prosa", "polish prose" | `wize-editorial-review-prose` |
194
+ | "editorial structure", "revisão estrutural", "estrutura do doc" | `wize-editorial-review-structure` |
195
+ | "index docs", "indexar docs", "índice" | `wize-index-docs` |
196
+ | "shard doc", "quebrar doc", "documento grande" | `wize-shard-doc` |
197
+ | "customize", "customizar", "personalizar kit" | `wize-customize` |
198
+ | "create agent", "criar agente", "novo agente" | `wize-create-agent` |
199
+ | "create skill", "criar skill", "nova skill" | `wize-create-skill` |
200
+ | "create workflow", "criar workflow", "novo workflow" | `wize-create-workflow` |
201
+ | "onboarding", "instalar kit", "primeiro uso" | `wize-onboarding` |
202
+ | "party mode", "multi-agent", "reunir agentes" | `wize-party-mode` |
203
+
83
204
  ## Step 2.5 — version skew (proactive)
84
205
 
85
206
  Compare `kit_version` (project.toml) vs the installed kit vs (if you have a terminal, 2s timeout) `npm view wize-dev-kit version`:
@@ -112,7 +233,7 @@ For `mission`, emit the filled **Mission contract** (see the section below) from
112
233
 
113
234
  End with one of: "Want me to call {persona}?" · "Want me to baseline the repo first?" (brownfield, no document-project) · "Want me to convene party-mode with {p1} + {p2}?" (cross-cutting decision) · "Want me to grill you first (`wize-grill`)?" (fuzzy demand heading into an authoring step).
114
235
 
115
- ## Mission contract (`/wize-help mission`)
236
+ ## Mission contract (`/wize mission` or `/wize-help mission`)
116
237
 
117
238
  When asked for a mission, fill this from project state and hand it to the executing persona. It is a contract, not a spec dump — each field is the minimum that makes the work traceable. Leave a field blank only when the project genuinely has no answer, and say so. If Objective, Scope, or ACs can't be filled from project state, offer a `wize-grill` pass before emitting a hollow contract.
118
239
 
@@ -1,5 +1,7 @@
1
1
  ---
2
+
2
3
  code: wize-onboarding
4
+ description: "Use quando o kit for instalado e precisar fazer a triagem inicial: greenfield vs brownfield, perfil, objetivo e roteamento para a persona correta."
3
5
  name: Onboarding
4
6
  owner: wize-orchestrator # Wizer
5
7
  status: ready
@@ -83,7 +85,7 @@ Never auto-launch the next workflow. The user must confirm.
83
85
  - Launching the next workflow without confirmation.
84
86
  - Re-asking the user’s name when it’s already in `user.toml`.
85
87
  - Dumping the full project state to the user. Summarize in ≤ 5 bullets.
86
- - Suggesting `wize-onboarding` from `/wize-help` once onboarding is complete. (Help should bypass onboarding for return users.)
88
+ - Suggesting `wize-onboarding` from `/wize` (or `/wize-help`) once onboarding is complete. (Help should bypass onboarding for return users.)
87
89
 
88
90
  ## Hand-off
89
91
 
@@ -33,6 +33,7 @@ routes_to:
33
33
  - wize-agent-tech-writer # for docs
34
34
 
35
35
  skills:
36
+ - wize
36
37
  - wize-onboarding
37
38
  - wize-party-mode
38
39
  - wize-help
@@ -7,10 +7,12 @@ I am **Wizer**. I am the host of this development kit. I know who you are, what
7
7
  ## Operating principles
8
8
 
9
9
  1. **Listen first.** Before routing, I make sure I understand the demand. One clarifying question is cheaper than three wrong hand-offs.
10
- 2. **Route, don't perform.** I rarely do the specialist's job. When the question is a brief, I call Pepper. When it is a PRD, Maria Hill. When it is architecture, Tony.
11
- 3. **Keep the thread.** I keep the knowledge of the project consistent across conversations. If something changed, I update `.wize/config/project.toml` before moving on.
12
- 4. **Pair when needed.** When a decision crosses concerns (UX touching architecture, PM touching TEA), I open a **party-mode** with the relevant agents.
13
- 5. **Treat the kit as the contract.** `.wize/`, `AGENTS.md`, and the installed `wize-*` skills are the operating instructions and persistent memory of whoever executes — not background reading. I make sure a demand is classified (Quick Dev vs Full Lifecycle, via `/wize-help`) and framed as a mission — objective, sources of truth, scope, acceptance criteria, validation — before any code is touched.
10
+ 2. **Route by intent, not just phase.** When the user's message contains a clear intent phrase ("quero pesquisar concorrência", "cria um PRD", "roda um pentest"), I route directly to the matching skill using the intent routing table. I use the phase heuristic only when intent is ambiguous or no intent phrase matches.
11
+ 3. **Route, don't perform.** I rarely do the specialist's job. When the question is a brief, I call Pepper. When it is a PRD, Maria Hill. When it is architecture, Tony.
12
+ 4. **Keep the thread.** I keep the knowledge of the project consistent across conversations. If something changed, I update `.wize/config/project.toml` before moving on.
13
+ 5. **Pair when needed.** When a decision crosses concerns (UX touching architecture, PM touching TEA), I open a **party-mode** with the relevant agents.
14
+ 6. **Treat the kit as the contract.** `.wize/`, `AGENTS.md`, and the installed `wize-*` skills are the operating instructions and persistent memory of whoever executes — not background reading. I make sure a demand is classified (Quick Dev vs Full Lifecycle, via `/wize` or `/wize-help`) and framed as a mission — objective, sources of truth, scope, acceptance criteria, validation — before any code is touched.
15
+ 7. **Harness-aware interaction.** In text-only harnesses, I ask one clarifying question when intent is ambiguous. In rich-UI harnesses, I offer a menu of matching options.
14
16
 
15
17
  ## Fan-out to subagents
16
18
 
@@ -39,6 +41,29 @@ Before greeting, read `.wize/config/user.toml` if it exists. If it has `[user] n
39
41
 
40
42
  If `user.toml` is missing or has no `name`, fall back to a neutral greeting.
41
43
 
44
+ ## First-run detection
45
+
46
+ Before greeting, check whether this is a first run:
47
+
48
+ 1. Read `.wize/planning/brief.md` — if it exists, this is NOT a first run.
49
+ 2. Read `.wize/knowledge/document-project/` — if it has content (any `.md` files), this is NOT a first run.
50
+ 3. If neither exists: **first run**.
51
+
52
+ ## First-run flow
53
+
54
+ When first run is detected, do NOT show a menu. Ask one question:
55
+
56
+ > "O que você está construindo?"
57
+
58
+ Wait for the answer. Then classify:
59
+
60
+ - **Greenfield** (new project, idea, feature, product): route to **Pepper / `wize-product-brief`**.
61
+ - **Brownfield** (existing codebase, legacy system, "we already have X"): route to **Pepper / `wize-document-project`**.
62
+
63
+ If the answer is ambiguous, ask one clarifying question: "Is this a new project or an existing codebase?" Then route.
64
+
65
+ Never show a menu on first run. One question → classify → route.
66
+
42
67
  ## Greet
43
68
 
44
69
  > "Welcome back{{`, ` + user.name when present, else ''}}. What are we working on?"
@@ -1,5 +1,7 @@
1
1
  ---
2
+
2
3
  code: wize-party-mode
4
+ description: "Use quando uma decisão cruzar preocupações de múltiplos agentes e precisar de discussão multi-agente facilitada."
3
5
  name: Party Mode (multi-agent)
4
6
  owner: wize-orchestrator # Wizer facilitates
5
7
  status: stub
@@ -111,10 +111,37 @@ function loadScope(scopePath) {
111
111
  return scope;
112
112
  }
113
113
 
114
+ // signScope(scopePath) — read, parse, recompute SHA-256 of the body, and
115
+ // rewrite the scope_sha256 field in the frontmatter. Returns metadata about
116
+ // the signed scope. Throws ScopeError on missing file or invalid format.
117
+ // Idempotent: running twice on the same body produces the same hash.
118
+ function signScope(scopePath) {
119
+ if (!fs.existsSync(scopePath)) {
120
+ throw new ScopeError('MISSING_FILE', null,
121
+ `scope.md ausente em ${scopePath} — crie com wize-sec-scope antes de assinar`);
122
+ }
123
+ const text = fs.readFileSync(scopePath, 'utf8');
124
+ const scope = parseScope(text);
125
+
126
+ const newHash = computeScopeSha256(scope.body);
127
+
128
+ // Replace scope_sha256 within the frontmatter block only (avoid
129
+ // accidental matches in the body).
130
+ const fmMatch = text.match(/^---\n([\s\S]*?)\n---\n/);
131
+ const fmBlock = fmMatch[0];
132
+ const newFmBlock = fmBlock.replace(/^(scope_sha256:\s*).*$/m, `$1${newHash}`);
133
+ const newText = text.replace(fmBlock, newFmBlock);
134
+
135
+ fs.writeFileSync(scopePath, newText, 'utf8');
136
+
137
+ return { path: scopePath, sha256: newHash, accepted_by: scope.frontmatter.accepted_by };
138
+ }
139
+
114
140
  module.exports = {
115
141
  parseScope,
116
142
  validateScope,
117
143
  computeScopeSha256,
118
144
  loadScope,
145
+ signScope,
119
146
  ScopeError
120
147
  };
@@ -22,9 +22,11 @@ overlay: security
22
22
 
23
23
  skills:
24
24
  - wize-sec-pentest
25
+ - wize-sec-scope
25
26
 
26
27
  commands:
27
28
  - /wize-sec-pentest
29
+ - /wize-sec-scope
28
30
 
29
31
  inputs:
30
32
  - ".wize/security/scope.md (gate of authorization)"
@@ -25,6 +25,12 @@ Each phase is a standalone skill; the orchestrator `wize-sec-pentest` chains the
25
25
  - **Missing tools degrade, they don't abort.** If a tool is not on `$PATH`, the corresponding check is recorded as `degraded_checks` in the partial. The pipeline continues.
26
26
  - **Flags via allowlist.** Every argument to every external tool is filtered through `data/tool-allowlist.json`. I never pass user-supplied flags directly to `execFile`.
27
27
 
28
+ ## Scope management
29
+
30
+ - **Create scope:** `/wize-sec-scope` — guided flow that asks for target URL, hosts, paths, and acceptance name. Generates `.wize/security/scope.md` with a valid `scope_sha256`.
31
+ - **Re-sign scope:** `/wize-sec-pentest --sign-scope` — recomputes the SHA-256 of the body and rewrites `scope_sha256` in the frontmatter. Use after editing the allowlist manually.
32
+ - **Validate scope:** `loadScope()` is called before any offensive action. An invalid scope (missing file, missing fields, hash mismatch) aborts the pipeline.
33
+
28
34
  ## Limits
29
35
 
30
36
  - I do NOT attack hosts, URLs, or paths outside the `scope.md` allowlist. Even with `--active`.
@@ -1,5 +1,7 @@
1
1
  ---
2
+
2
3
  code: wize-sec-enumerate
4
+ description: "Use quando o recon estiver concluído e precisar enumerar a superfície de ataque (portas, serviços, tecnologias) a partir dos alvos autorizados."
3
5
  name: wize-sec-enumerate
4
6
  overlay: security
5
7
  module: security-overlay
@@ -26,10 +26,11 @@ const PHASE_SCRIPTS = {
26
26
  };
27
27
 
28
28
  function parseArgv(argv) {
29
- const out = { active: false, scopePath: null, kitRoot: DEFAULT_KIT_ROOT };
29
+ const out = { active: false, scopePath: null, kitRoot: DEFAULT_KIT_ROOT, signScope: false };
30
30
  for (let i = 0; i < (argv || []).length; i++) {
31
31
  const a = argv[i];
32
32
  if (a === '--active') out.active = true;
33
+ else if (a === '--sign-scope') out.signScope = true;
33
34
  else if (a === '--scope' && argv[i + 1]) { out.scopePath = argv[i + 1]; i++; }
34
35
  else if (a.startsWith('--scope=')) out.scopePath = a.slice('--scope='.length);
35
36
  }
@@ -120,6 +121,22 @@ async function runPipeline(opts = {}) {
120
121
  // user invokes `/wize-sec-pentest`.
121
122
  async function main() {
122
123
  const args = parseArgv(process.argv.slice(2));
124
+
125
+ // --sign-scope: recompute SHA-256 and exit (no pipeline run).
126
+ if (args.signScope) {
127
+ try {
128
+ const { signScope } = require('../../../_shared/scope-parser.js');
129
+ const result = signScope(args.scopePath);
130
+ console.log(`✓ Scope re-assinado. SHA-256: ${result.sha256}`);
131
+ console.log(` aceite por: ${result.accepted_by}`);
132
+ console.log(` arquivo: ${result.path}`);
133
+ process.exit(0);
134
+ } catch (err) {
135
+ console.error('✖ sign-scope falhou:', err && err.message ? err.message : err);
136
+ process.exit(2);
137
+ }
138
+ }
139
+
123
140
  let result;
124
141
  try {
125
142
  // Derive the securityDir from the scopePath's parent (the .wize/security
@@ -1,5 +1,7 @@
1
1
  ---
2
+
2
3
  code: wize-sec-pentest
4
+ description: "Use quando o scope de segurança estiver definido e precisar executar o pipeline completo de pentest (recon → enumerate → exploit → report)."
3
5
  name: wize-sec-pentest
4
6
  overlay: security
5
7
  module: security-overlay
@@ -1,5 +1,7 @@
1
1
  ---
2
+
2
3
  code: wize-sec-recon
4
+ description: "Use quando o scope de segurança estiver autorizado e precisar executar reconhecimento passivo (nmap) nos alvos."
3
5
  name: wize-sec-recon
4
6
  overlay: security
5
7
  module: security-overlay
@@ -0,0 +1,106 @@
1
+ 'use strict';
2
+
3
+ // generate-scope.js — creates a valid .wize/security/scope.md from CLI args.
4
+ // Zero-dep. Computes scope_sha256 from the body (including the leading newline
5
+ // separator, matching parseScope's convention).
6
+
7
+ const fs = require('node:fs');
8
+ const path = require('node:path');
9
+ const crypto = require('node:crypto');
10
+
11
+ function parseArgv(argv) {
12
+ const out = { url: null, hosts: [], paths: [], acceptedBy: null, outPath: null };
13
+ for (let i = 0; i < (argv || []).length; i++) {
14
+ const a = argv[i];
15
+ if (a === '--url' && argv[i + 1]) { out.url = argv[i + 1]; i++; }
16
+ else if (a.startsWith('--url=')) out.url = a.slice('--url='.length);
17
+ else if (a === '--hosts' && argv[i + 1]) { out.hosts = argv[i + 1].split(',').map(s => s.trim()).filter(Boolean); i++; }
18
+ else if (a.startsWith('--hosts=')) out.hosts = a.slice('--hosts='.length).split(',').map(s => s.trim()).filter(Boolean);
19
+ else if (a === '--paths' && argv[i + 1]) { out.paths = argv[i + 1].split(',').map(s => s.trim()).filter(Boolean); i++; }
20
+ else if (a.startsWith('--paths=')) out.paths = a.slice('--paths='.length).split(',').map(s => s.trim()).filter(Boolean);
21
+ else if (a === '--accepted-by' && argv[i + 1]) { out.acceptedBy = argv[i + 1]; i++; }
22
+ else if (a.startsWith('--accepted-by=')) out.acceptedBy = a.slice('--accepted-by='.length);
23
+ else if (a === '--out' && argv[i + 1]) { out.outPath = argv[i + 1]; i++; }
24
+ else if (a.startsWith('--out=')) out.outPath = a.slice('--out='.length);
25
+ }
26
+ if (!out.outPath) out.outPath = path.join(process.cwd(), '.wize', 'security', 'scope.md');
27
+ return out;
28
+ }
29
+
30
+ function buildBody({ url, hosts, paths }) {
31
+ const lines = [];
32
+
33
+ lines.push('## allowlist');
34
+
35
+ lines.push('hosts:');
36
+ for (const h of hosts) lines.push(` - ${h}`);
37
+
38
+ lines.push('urls:');
39
+ if (url) lines.push(` - ${url.replace(/\/+$/, '')}/`);
40
+
41
+ lines.push('paths:');
42
+ if (paths.length > 0) {
43
+ for (const p of paths) lines.push(` - ${p}`);
44
+ } else {
45
+ lines.push(' - /');
46
+ }
47
+
48
+ lines.push('');
49
+ lines.push('## dast_target');
50
+ if (url) lines.push(`url: ${url}`);
51
+ lines.push('');
52
+ lines.push('## notes');
53
+ lines.push(`Scope gerado por wize-sec-scope em ${new Date().toISOString()}.`);
54
+ lines.push('');
55
+
56
+ return lines.join('\n');
57
+ }
58
+
59
+ function generateScope({ url, hosts, paths, acceptedBy, outPath }) {
60
+ const body = buildBody({ url, hosts, paths });
61
+
62
+ // The hash is computed on the body as parseScope returns it: with the
63
+ // leading newline separator between the closing --- and the body.
64
+ const signedBody = '\n' + body;
65
+ const scopeSha256 = crypto.createHash('sha256').update(signedBody, 'utf8').digest('hex');
66
+ const acceptedAt = new Date().toISOString();
67
+
68
+ const fm = [
69
+ `accepted_by: ${acceptedBy || 'unknown'}`,
70
+ `accepted_at: ${acceptedAt}`,
71
+ `scope_sha256: ${scopeSha256}`
72
+ ].join('\n');
73
+
74
+ const content = `---\n${fm}\n---\n${signedBody}`;
75
+
76
+ const dir = path.dirname(outPath);
77
+ fs.mkdirSync(dir, { recursive: true });
78
+ fs.writeFileSync(outPath, content, 'utf8');
79
+
80
+ return { path: outPath, sha256: scopeSha256, acceptedBy, acceptedAt };
81
+ }
82
+
83
+ function main() {
84
+ const args = parseArgv(process.argv.slice(2));
85
+
86
+ if (!args.url) {
87
+ console.error('✖ --url é obrigatório (ex: --url=http://localhost:8080)');
88
+ process.exit(2);
89
+ }
90
+ if (!args.acceptedBy) {
91
+ console.error('✖ --accepted-by é obrigatório (ex: --accepted-by="Seu Nome")');
92
+ process.exit(2);
93
+ }
94
+
95
+ const result = generateScope(args);
96
+ console.log(`✓ scope.md gerado em ${result.path}`);
97
+ console.log(` SHA-256: ${result.sha256}`);
98
+ console.log(` aceite por: ${result.acceptedBy}`);
99
+ console.log(` aceite em: ${result.acceptedAt}`);
100
+ }
101
+
102
+ if (require.main === module) {
103
+ main();
104
+ }
105
+
106
+ module.exports = { generateScope, buildBody, parseArgv };
@@ -0,0 +1,52 @@
1
+ ---
2
+
3
+ code: wize-sec-scope
4
+ description: "Use para criar ou re-assinar o scope.md de segurança. Guia o usuário com perguntas e gera o arquivo com hash SHA-256."
5
+ name: wize-sec-scope
6
+ overlay: security
7
+ module: security-overlay
8
+ owner: wize-sec-red-teamer # Natasha Romanoff
9
+ status: ready
10
+ ---
11
+
12
+ # wize-sec-scope — Criação guiada de scope.md
13
+
14
+ Cria o arquivo `.wize/security/scope.md` a partir de perguntas interativas. Gera o frontmatter com `accepted_by`, `accepted_at`, e `scope_sha256` (SHA-256 do corpo). O arquivo gerado passa na validação do `loadScope()` sem intervenção manual.
15
+
16
+ ## Uso
17
+
18
+ ```bash
19
+ /wize-sec-scope
20
+ ```
21
+
22
+ ## Fluxo guiado
23
+
24
+ O agente faz uma pergunta por vez:
25
+
26
+ 1. **URL base do alvo** — ex: `http://localhost:8080`
27
+ 2. **Hosts adicionais no escopo** — um por linha, Enter para pular
28
+ 3. **Paths no escopo** — ex: `/api/*`, Enter para todos (`/`)
29
+ 4. **Nome para o aceite** — quem está autorizando o pentest
30
+
31
+ Ao final, gera `scope.md` com:
32
+
33
+ - Frontmatter: `accepted_by`, `accepted_at` (ISO-8601), `scope_sha256`
34
+ - Corpo: `## allowlist` com hosts, urls e paths
35
+ - `## dast_target` com a URL base
36
+ - `## notes` com o timestamp de criação
37
+
38
+ ## Re-assinatura
39
+
40
+ Se o `scope.md` já existe e foi editado, use `--sign-scope` para recomputar o hash:
41
+
42
+ ```bash
43
+ /wize-sec-pentest --sign-scope
44
+ ```
45
+
46
+ ## Script
47
+
48
+ `scripts/generate-scope.js` — gera o arquivo programaticamente (usado pelo agente ou chamado diretamente).
49
+
50
+ ```bash
51
+ node scripts/generate-scope.js --url=http://localhost:8080 --hosts=localhost,127.0.0.1 --paths=/api,/admin --accepted-by="Seu Nome"
52
+ ```
@@ -1,5 +1,7 @@
1
1
  ---
2
+
2
3
  code: wize-qa-generate-e2e-tests
4
+ description: "Use quando o UX design e PRD estiverem validados e precisar gerar casos de teste E2E a partir das telas e ACs."
3
5
  name: Generate E2E Tests
4
6
  owner: wize-agent-test-architect # Hawkeye
5
7
  status: ready
@@ -1,6 +1,9 @@
1
1
  ---
2
+
2
3
  code: wize-tea-design
4
+ description: "Use quando uma story entrar em desenvolvimento e precisar do contrato de testes (split, fixtures, mocks, assertions) que a Shuri implementará."
3
5
  name: TEA Test Design
6
+ phase: 4-implementation
4
7
  gate: design
5
8
  owner: wize-agent-test-architect # Hawkeye
6
9
  when: per-story-start
@@ -1,6 +1,9 @@
1
1
  ---
2
+
2
3
  code: wize-tea-gate
4
+ description: "Use quando uma story chegar ao final e precisar da decisão de gate (PASS/CONCERNS/FAIL/WAIVED) com rationale documentado."
3
5
  name: TEA Gate Decision
6
+ phase: 4-implementation
4
7
  gate: gate
5
8
  owner: wize-agent-test-architect # Hawkeye
6
9
  when: story-final
@@ -1,6 +1,9 @@
1
1
  ---
2
+
2
3
  code: wize-tea-nfr
4
+ description: "Use quando um epic estiver próximo do merge e precisar verificar se atende aos princípios de NFR definidos pelo Fury."
3
5
  name: TEA NFR Assessment
6
+ phase: 4-implementation
4
7
  gate: nfr
5
8
  owner: wize-agent-test-architect # Hawkeye
6
9
  when: pre-merge-per-epic
@@ -1,6 +1,9 @@
1
1
  ---
2
+
2
3
  code: wize-tea-review
4
+ description: "Use quando uma story terminar implementação e precisar de revisão estruturada de AC fulfillment, disciplina de teste e cobertura de risco."
3
5
  name: TEA Story Review
6
+ phase: 4-implementation
4
7
  gate: review
5
8
  owner: wize-agent-test-architect # Hawkeye
6
9
  when: story-end
@@ -1,6 +1,9 @@
1
1
  ---
2
+
2
3
  code: wize-tea-risk
4
+ description: "Use quando a arquitetura for assinada e precisar construir a matriz probabilidade × impacto que prioriza todo o trabalho de TEA."
3
5
  name: TEA Risk Profile
6
+ phase: 4-implementation
4
7
  gate: risk
5
8
  owner: wize-agent-test-architect # Hawkeye
6
9
  when: once-after-architecture
@@ -1,6 +1,9 @@
1
1
  ---
2
+
2
3
  code: wize-tea-trace
4
+ description: "Use quando uma story estiver em implementação e precisar mapear cada AC para testes concretos no repositório."
3
5
  name: TEA Traceability
6
+ phase: 4-implementation
4
7
  gate: trace
5
8
  owner: wize-agent-test-architect # Hawkeye
6
9
  when: during-or-after-implementation
@@ -1,5 +1,7 @@
1
1
  ---
2
+
2
3
  code: wize-web-deploy
4
+ description: "Use quando o projeto web estiver pronto para deploy e precisar do playbook de publicação."
3
5
  name: Web Deploy Playbook
4
6
  overlay: web
5
7
  owner: wize-agent-architect # Tony
@@ -1,5 +1,7 @@
1
1
  ---
2
+
2
3
  code: wize-web-scaffold
4
+ description: "Use quando precisar criar o scaffold inicial de um projeto web com a stack aprovada pelo Fury."
3
5
  name: Web Scaffold
4
6
  overlay: web
5
7
  owner: wize-agent-architect # Tony executes; Fury approves stack family