wize-dev-kit 0.16.0 → 0.17.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 (235) hide show
  1. package/AGENTS.md +37 -0
  2. package/ARCH.md +77 -24
  3. package/CHANGELOG.md +14 -0
  4. package/DECISIONS.md +27 -1
  5. package/README.es.md +296 -0
  6. package/README.md +3 -2
  7. package/README.pt-BR.md +294 -0
  8. package/ROSTER.md +11 -3
  9. package/adapters/README.md +9 -7
  10. package/adapters/antigravity/README.md +5 -5
  11. package/adapters/claude-code/README.md +1 -1
  12. package/adapters/codex/README.md +5 -5
  13. package/adapters/codex/adapter.yaml +1 -1
  14. package/adapters/codex/render.js +1 -1
  15. package/adapters/continue/README.md +5 -5
  16. package/adapters/cursor/README.md +2 -2
  17. package/adapters/generic/README.md +1 -1
  18. package/adapters/hermes/README.md +23 -0
  19. package/adapters/hermes/adapter.yaml +8 -0
  20. package/adapters/hermes/render.js +17 -0
  21. package/adapters/kimi-code/README.md +5 -5
  22. package/adapters/kimi-code/render.js +2 -2
  23. package/adapters/kiro/README.md +30 -0
  24. package/adapters/kiro/adapter.yaml +8 -0
  25. package/adapters/kiro/render.js +21 -0
  26. package/adapters/opencode/README.md +3 -3
  27. package/adapters/opencode/render.js +27 -1
  28. package/adapters/windsurf/README.md +3 -3
  29. package/docs/harnesses/antigravity.md +20 -0
  30. package/docs/harnesses/antigravity.pt-BR.md +20 -0
  31. package/docs/harnesses/claude-code.md +23 -0
  32. package/docs/harnesses/claude-code.pt-BR.md +23 -0
  33. package/docs/harnesses/codex.md +21 -0
  34. package/docs/harnesses/codex.pt-BR.md +21 -0
  35. package/docs/harnesses/continue.md +21 -0
  36. package/docs/harnesses/continue.pt-BR.md +21 -0
  37. package/docs/harnesses/cursor.md +22 -0
  38. package/docs/harnesses/cursor.pt-BR.md +22 -0
  39. package/docs/harnesses/generic.md +20 -0
  40. package/docs/harnesses/generic.pt-BR.md +20 -0
  41. package/docs/harnesses/hermes.md +26 -0
  42. package/docs/harnesses/hermes.pt-BR.md +26 -0
  43. package/docs/harnesses/kimi-code.md +19 -0
  44. package/docs/harnesses/kimi-code.pt-BR.md +19 -0
  45. package/docs/harnesses/kiro.md +26 -0
  46. package/docs/harnesses/kiro.pt-BR.md +26 -0
  47. package/docs/harnesses/opencode.md +31 -0
  48. package/docs/harnesses/opencode.pt-BR.md +31 -0
  49. package/docs/harnesses/windsurf.md +22 -0
  50. package/docs/harnesses/windsurf.pt-BR.md +22 -0
  51. package/package.json +1 -1
  52. package/schemas/agent.schema.json +2 -2
  53. package/schemas/workflow.schema.json +1 -1
  54. package/src/app-overlay/wize-app-release-channels/workflow.md +2 -0
  55. package/src/app-overlay/wize-app-scaffold/workflow.md +2 -0
  56. package/src/app-overlay/wize-app-store-listing/workflow.md +2 -0
  57. package/src/builder-skills/wize-create-agent/workflow.md +2 -0
  58. package/src/builder-skills/wize-create-skill/workflow.md +2 -0
  59. package/src/builder-skills/wize-create-workflow/workflow.md +2 -0
  60. package/src/core-skills/wize-advanced-elicitation/skill.md +2 -0
  61. package/src/core-skills/wize-brainstorming/skill.md +2 -0
  62. package/src/core-skills/wize-customize/skill.md +116 -0
  63. package/src/core-skills/wize-editorial-review-prose/skill.md +94 -0
  64. package/src/core-skills/wize-editorial-review-structure/skill.md +99 -0
  65. package/src/core-skills/wize-grill/skill.md +77 -0
  66. package/src/core-skills/wize-index-docs/skill.md +119 -0
  67. package/src/core-skills/wize-pre-pr-check/skill.md +134 -0
  68. package/src/core-skills/wize-review-adversarial/skill.md +3 -0
  69. package/src/core-skills/wize-review-edge-case-hunter/skill.md +115 -0
  70. package/src/core-skills/wize-shard-doc/skill.md +2 -0
  71. package/src/core-skills/wize-spec/assets/headless-schemas.md +39 -0
  72. package/src/core-skills/wize-spec/assets/spec-template.md +40 -0
  73. package/src/core-skills/wize-spec/customize.toml +20 -0
  74. package/src/core-skills/wize-spec/skill.md +112 -0
  75. package/src/method-skills/1-analysis/wize-agent-analyst/agent.yaml +3 -0
  76. package/src/method-skills/1-analysis/wize-document-project/documentation-requirements.csv +12 -0
  77. package/src/method-skills/1-analysis/wize-document-project/templates/api-contracts-template.md +38 -0
  78. package/src/method-skills/1-analysis/wize-document-project/templates/architecture-template.md +54 -0
  79. package/src/method-skills/1-analysis/wize-document-project/templates/component-inventory-template.md +40 -0
  80. package/src/method-skills/1-analysis/wize-document-project/templates/contribution-guide-template.md +34 -0
  81. package/src/method-skills/1-analysis/wize-document-project/templates/data-models-template.md +36 -0
  82. package/src/method-skills/1-analysis/wize-document-project/templates/deep-dive-template.md +312 -0
  83. package/src/method-skills/1-analysis/wize-document-project/templates/deployment-guide-template.md +42 -0
  84. package/src/method-skills/1-analysis/wize-document-project/templates/development-guide-template.md +61 -0
  85. package/src/method-skills/1-analysis/wize-document-project/templates/index-template.md +185 -0
  86. package/src/method-skills/1-analysis/wize-document-project/templates/project-overview-template.md +110 -0
  87. package/src/method-skills/1-analysis/wize-document-project/templates/project-scan-report-schema.json +159 -0
  88. package/src/method-skills/1-analysis/wize-document-project/templates/source-tree-template.md +142 -0
  89. package/src/method-skills/1-analysis/wize-document-project/workflow.md +213 -20
  90. package/src/method-skills/1-analysis/wize-domain-research/customize.toml +14 -0
  91. package/src/method-skills/1-analysis/wize-domain-research/domain-steps/step-01-init.md +49 -0
  92. package/src/method-skills/1-analysis/wize-domain-research/domain-steps/step-02-domain-analysis.md +39 -0
  93. package/src/method-skills/1-analysis/wize-domain-research/domain-steps/step-03-competitive-landscape.md +39 -0
  94. package/src/method-skills/1-analysis/wize-domain-research/domain-steps/step-04-regulatory-focus.md +39 -0
  95. package/src/method-skills/1-analysis/wize-domain-research/domain-steps/step-05-technical-trends.md +39 -0
  96. package/src/method-skills/1-analysis/wize-domain-research/domain-steps/step-06-research-synthesis.md +43 -0
  97. package/src/method-skills/1-analysis/wize-domain-research/research.template.md +31 -0
  98. package/src/method-skills/1-analysis/wize-domain-research/workflow.md +58 -0
  99. package/src/method-skills/1-analysis/wize-market-research/customize.toml +14 -0
  100. package/src/method-skills/1-analysis/wize-market-research/research.template.md +31 -0
  101. package/src/method-skills/1-analysis/wize-market-research/steps/step-01-init.md +57 -0
  102. package/src/method-skills/1-analysis/wize-market-research/steps/step-02-customer-behavior.md +39 -0
  103. package/src/method-skills/1-analysis/wize-market-research/steps/step-03-customer-pain-points.md +37 -0
  104. package/src/method-skills/1-analysis/wize-market-research/steps/step-04-customer-decisions.md +39 -0
  105. package/src/method-skills/1-analysis/wize-market-research/steps/step-05-competitive-analysis.md +37 -0
  106. package/src/method-skills/1-analysis/wize-market-research/steps/step-06-research-completion.md +47 -0
  107. package/src/method-skills/1-analysis/wize-market-research/workflow.md +66 -0
  108. package/src/method-skills/1-analysis/wize-prfaq/workflow.md +152 -11
  109. package/src/method-skills/1-analysis/wize-product-brief/workflow.md +92 -19
  110. package/src/method-skills/1-analysis/wize-refresh-knowledge/workflow.md +129 -0
  111. package/src/method-skills/1-analysis/wize-research/workflow.md +39 -12
  112. package/src/method-skills/1-analysis/wize-technical-research/customize.toml +14 -0
  113. package/src/method-skills/1-analysis/wize-technical-research/research.template.md +31 -0
  114. package/src/method-skills/1-analysis/wize-technical-research/technical-steps/step-01-init.md +49 -0
  115. package/src/method-skills/1-analysis/wize-technical-research/technical-steps/step-02-technical-overview.md +45 -0
  116. package/src/method-skills/1-analysis/wize-technical-research/technical-steps/step-03-integration-patterns.md +39 -0
  117. package/src/method-skills/1-analysis/wize-technical-research/technical-steps/step-04-architectural-patterns.md +39 -0
  118. package/src/method-skills/1-analysis/wize-technical-research/technical-steps/step-05-implementation-research.md +42 -0
  119. package/src/method-skills/1-analysis/wize-technical-research/technical-steps/step-06-research-synthesis.md +46 -0
  120. package/src/method-skills/1-analysis/wize-technical-research/workflow.md +60 -0
  121. package/src/method-skills/1-analysis/wize-trigger-map/workflow.md +82 -16
  122. package/src/method-skills/2-plan-workflows/wize-create-prd/workflow.md +135 -23
  123. package/src/method-skills/2-plan-workflows/wize-edit-prd/workflow.md +110 -0
  124. package/src/method-skills/2-plan-workflows/wize-ux-design/workflow.md +134 -28
  125. package/src/method-skills/2-plan-workflows/wize-ux-scenarios/workflow.md +93 -15
  126. package/src/method-skills/2-plan-workflows/wize-validate-prd/workflow.md +108 -12
  127. package/src/method-skills/3-solutioning/wize-check-implementation-readiness/workflow.md +103 -11
  128. package/src/method-skills/3-solutioning/wize-create-architecture/architecture-decision-template.md +41 -0
  129. package/src/method-skills/3-solutioning/wize-create-architecture/customize.toml +20 -0
  130. package/src/method-skills/3-solutioning/wize-create-architecture/steps/step-01-init.md +95 -0
  131. package/src/method-skills/3-solutioning/wize-create-architecture/steps/step-01b-continue.md +32 -0
  132. package/src/method-skills/3-solutioning/wize-create-architecture/steps/step-02-context.md +126 -0
  133. package/src/method-skills/3-solutioning/wize-create-architecture/steps/step-03-starter.md +110 -0
  134. package/src/method-skills/3-solutioning/wize-create-architecture/steps/step-04-decisions.md +129 -0
  135. package/src/method-skills/3-solutioning/wize-create-architecture/steps/step-05-patterns.md +109 -0
  136. package/src/method-skills/3-solutioning/wize-create-architecture/steps/step-06-structure.md +97 -0
  137. package/src/method-skills/3-solutioning/wize-create-architecture/steps/step-07-validation.md +124 -0
  138. package/src/method-skills/3-solutioning/wize-create-architecture/steps/step-08-complete.md +59 -0
  139. package/src/method-skills/3-solutioning/wize-create-architecture/workflow.md +55 -48
  140. package/src/method-skills/3-solutioning/wize-create-epics-and-stories/workflow.md +154 -15
  141. package/src/method-skills/3-solutioning/wize-design-system/workflow.md +184 -22
  142. package/src/method-skills/3-solutioning/wize-nfr-principles/workflow.md +145 -17
  143. package/src/method-skills/3-solutioning/wize-project-context/workflow.md +120 -0
  144. package/src/method-skills/3-solutioning/wize-tech-vision/workflow.md +130 -22
  145. package/src/method-skills/4-implementation/wize-agent-dev/persona.md +12 -0
  146. package/src/method-skills/4-implementation/wize-changelog/workflow.md +184 -0
  147. package/src/method-skills/4-implementation/wize-checkpoint-preview/workflow.md +117 -0
  148. package/src/method-skills/4-implementation/wize-code-review/customize.toml +21 -0
  149. package/src/method-skills/4-implementation/wize-code-review/steps/step-01-gather-context.md +64 -0
  150. package/src/method-skills/4-implementation/wize-code-review/steps/step-02-review.md +40 -0
  151. package/src/method-skills/4-implementation/wize-code-review/steps/step-03-triage.md +43 -0
  152. package/src/method-skills/4-implementation/wize-code-review/steps/step-04-present.md +100 -0
  153. package/src/method-skills/4-implementation/wize-code-review/workflow.md +54 -12
  154. package/src/method-skills/4-implementation/wize-correct-course/workflow.md +93 -0
  155. package/src/method-skills/4-implementation/wize-create-story/workflow.md +154 -10
  156. package/src/method-skills/4-implementation/wize-dev-story/workflow.md +185 -17
  157. package/src/method-skills/4-implementation/wize-investigate/workflow.md +123 -0
  158. package/src/method-skills/4-implementation/wize-quick-dev/workflow.md +136 -18
  159. package/src/method-skills/4-implementation/wize-release/workflow.md +162 -0
  160. package/src/method-skills/4-implementation/wize-retrospective/workflow.md +114 -10
  161. package/src/method-skills/4-implementation/wize-sprint-planning/workflow.md +78 -11
  162. package/src/method-skills/4-implementation/wize-sprint-status/workflow.md +45 -11
  163. package/src/method-skills/module.yaml +28 -0
  164. package/src/orchestrator-skills/module.yaml +7 -1
  165. package/src/orchestrator-skills/wize/skill.md +164 -0
  166. package/src/orchestrator-skills/wize-check/skill.md +98 -0
  167. package/src/orchestrator-skills/wize-help/skill.md +227 -67
  168. package/src/orchestrator-skills/wize-onboarding/workflow.md +78 -14
  169. package/src/orchestrator-skills/wize-orchestrator/agent.yaml +2 -0
  170. package/src/orchestrator-skills/wize-orchestrator/persona.md +44 -3
  171. package/src/orchestrator-skills/wize-party-mode/workflow.md +2 -0
  172. package/src/security-overlay/_shared/allowlist.js +154 -0
  173. package/src/security-overlay/_shared/backlog.js +169 -0
  174. package/src/security-overlay/_shared/cli-runner.js +87 -0
  175. package/src/security-overlay/_shared/cvss.js +108 -0
  176. package/src/security-overlay/_shared/detect.js +125 -0
  177. package/src/security-overlay/_shared/install-script.js +205 -0
  178. package/src/security-overlay/_shared/invoke-phase.js +86 -0
  179. package/src/security-overlay/_shared/owasp.js +56 -0
  180. package/src/security-overlay/_shared/partial.js +225 -0
  181. package/src/security-overlay/_shared/preflight.js +175 -0
  182. package/src/security-overlay/_shared/scope-gate.js +172 -0
  183. package/src/security-overlay/_shared/scope-parser.js +147 -0
  184. package/src/security-overlay/agents/red-teamer/agent.yaml +54 -0
  185. package/src/security-overlay/agents/red-teamer/persona.md +49 -0
  186. package/src/security-overlay/data/common.txt +115 -0
  187. package/src/security-overlay/data/owasp-top10.json +15 -0
  188. package/src/security-overlay/data/tool-allowlist.json +31 -0
  189. package/src/security-overlay/skills/wize-sec-enumerate/scripts/run-enumerate.js +180 -0
  190. package/src/security-overlay/skills/wize-sec-enumerate/skill.md +34 -0
  191. package/src/security-overlay/skills/wize-sec-exploit/data/common.txt +117 -0
  192. package/src/security-overlay/skills/wize-sec-exploit/scripts/run-ffuf.js +147 -0
  193. package/src/security-overlay/skills/wize-sec-exploit/scripts/run-nikto.js +145 -0
  194. package/src/security-overlay/skills/wize-sec-exploit/scripts/run-nuclei.js +176 -0
  195. package/src/security-overlay/skills/wize-sec-exploit/scripts/run-sqlmap.js +139 -0
  196. package/src/security-overlay/skills/wize-sec-pentest/scripts/run-pipeline.js +184 -0
  197. package/src/security-overlay/skills/wize-sec-pentest/skill.md +54 -0
  198. package/src/security-overlay/skills/wize-sec-recon/scripts/run-gitleaks.js +139 -0
  199. package/src/security-overlay/skills/wize-sec-recon/scripts/run-osv.js +227 -0
  200. package/src/security-overlay/skills/wize-sec-recon/scripts/run-recon.js +162 -0
  201. package/src/security-overlay/skills/wize-sec-recon/skill.md +37 -0
  202. package/src/security-overlay/skills/wize-sec-report/scripts/render-report.js +1033 -0
  203. package/src/security-overlay/skills/wize-sec-scope/scripts/generate-scope.js +106 -0
  204. package/src/security-overlay/skills/wize-sec-scope/skill.md +52 -0
  205. package/src/tea-skills/wize-qa-generate-e2e-tests/workflow.md +121 -0
  206. package/src/tea-skills/wize-tea-design/workflow.md +107 -13
  207. package/src/tea-skills/wize-tea-gate/workflow.md +118 -25
  208. package/src/tea-skills/wize-tea-nfr/workflow.md +107 -14
  209. package/src/tea-skills/wize-tea-review/workflow.md +123 -13
  210. package/src/tea-skills/wize-tea-risk/workflow.md +113 -10
  211. package/src/tea-skills/wize-tea-trace/workflow.md +86 -12
  212. package/src/web-overlay/wize-web-deploy/workflow.md +2 -0
  213. package/src/web-overlay/wize-web-scaffold/workflow.md +2 -0
  214. package/src/web-overlay/wize-web-seo-audit/workflow.md +2 -0
  215. package/tools/check-eli5-all-adapters.js +3 -2
  216. package/tools/installer/baseline.js +138 -0
  217. package/tools/installer/commands/agent.js +197 -0
  218. package/tools/installer/commands/doctor.js +321 -0
  219. package/tools/installer/commands/document-project.js +93 -0
  220. package/tools/installer/commands/sync.js +45 -0
  221. package/tools/installer/commands/update.js +172 -0
  222. package/tools/installer/document-project/batch-scanner.js +93 -0
  223. package/tools/installer/document-project/classify.js +170 -0
  224. package/tools/installer/document-project/modes/deep-dive.js +196 -0
  225. package/tools/installer/document-project/modes/full-rescan.js +15 -0
  226. package/tools/installer/document-project/modes/initial-scan.js +100 -0
  227. package/tools/installer/document-project/modes/quick.js +211 -0
  228. package/tools/installer/document-project/render-index.js +101 -0
  229. package/tools/installer/document-project/state.js +110 -0
  230. package/tools/installer/onboarding.js +14 -20
  231. package/tools/installer/render-shared.js +159 -15
  232. package/tools/installer/setup-helpers.js +2 -0
  233. package/tools/installer/validators/run-all.js +3 -2
  234. package/tools/installer/version-check.js +117 -0
  235. package/tools/installer/wize-cli.js +501 -70
@@ -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
+ ```
@@ -0,0 +1,121 @@
1
+ ---
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."
5
+ name: Generate E2E Tests
6
+ owner: wize-agent-test-architect # Hawkeye
7
+ status: ready
8
+ ---
9
+
10
+ # Generate E2E Tests
11
+
12
+ **Goal.** Translate UX screens + PRD ACs into concrete E2E test cases. Hawkeye produces the cases (names, steps, selectors, expected outcome); the user (or Shuri) writes the actual test bodies in the chosen framework.
13
+
14
+ Hawkeye drives. Mantis confirms UX fidelity. Shuri confirms selectors match the design system.
15
+
16
+ ## When to run
17
+
18
+ - After `wize-ux-design` and `wize-create-prd` are validated.
19
+ - Before a story enters `in-progress` if the ACs are E2E-heavy.
20
+ - When the team adopts a new E2E framework and needs a baseline.
21
+
22
+ ## When NOT to run
23
+
24
+ - Before UX design is ready (no screens = no cases).
25
+ - For unit tests (covered by `wize-tea-design`).
26
+ - For visual / a11y (separate audit, out of scope here).
27
+
28
+ ## Inputs
29
+
30
+ - `.wize/planning/ux/ux-design/{screen}.md` — page specs.
31
+ - `.wize/planning/prd.md` — ACs.
32
+ - `.wize/solutioning/design-system/` — component + testid names.
33
+ - The active profile (web-overlay → Playwright; app-overlay → Detox; core-only → propose and let user pick).
34
+
35
+ ## Output
36
+
37
+ - `.wize/implementation/tea/e2e-cases/{screen}.md` — one file per screen with the test cases.
38
+
39
+ ## Steps
40
+
41
+ ### 1. Map (UX screen → ACs)
42
+
43
+ For each screen, list the ACs that touch it. Cross-reference the PRD. If a screen has no ACs, flag it (gap).
44
+
45
+ ### 2. Cases (3-10 per screen)
46
+
47
+ For each screen, generate 3-10 cases. For each case:
48
+ - **Name:** verb-led, in 1 line.
49
+ - **Pre-conditions:** setup (logged in, on screen X, etc.).
50
+ - **Steps:** numbered, observable actions.
51
+ - **Selectors:** `data-testid` values from the design system. If none exist, propose new ones.
52
+ - **Expected outcome:** what the test asserts.
53
+ - **Priority:** P0 (must pass before release) / P1 (should pass) / P2 (nice to have).
54
+
55
+ ### 3. Selectors
56
+
57
+ Derive selectors from `design-system/` tokens + story notes. If a story has a `data-testid` map, prefer that. New selectors go into a "proposed testids" section; Mantis signs off in the next design-system sync.
58
+
59
+ ### 4. Triage
60
+
61
+ Mark each case P0/P1/P2. P0 is the minimum viable E2E coverage. P1 expands happy paths. P2 covers edge cases.
62
+
63
+ ### 5. Hand off
64
+
65
+ Notify the next workflow:
66
+ - Shuri → implement the P0 cases first.
67
+ - Mantis → sign off on the new testids.
68
+ - The user → confirm the framework choice if it is ambiguous.
69
+
70
+ ## Output template
71
+
72
+ ```markdown
73
+ ---
74
+ screen: sign-in
75
+ generated: 2026-06-16
76
+ linked_acs: [AC-01-1, AC-01-2]
77
+ framework: playwright
78
+ ---
79
+
80
+ # E2E cases — sign-in
81
+
82
+ ## Map
83
+ - AC-01-1: user enters valid email + password
84
+ - AC-01-2: user enters invalid email → error message
85
+
86
+ ## Cases
87
+
88
+ ### P0 — happy path
89
+ - **Name:** Sign in with valid credentials
90
+ - **Pre-conditions:** not signed in; on /signin
91
+ - **Steps:** enter email; enter password; click "Sign in"
92
+ - **Selectors:** data-testid="email-input", data-testid="password-input", data-testid="signin-cta"
93
+ - **Expected outcome:** redirect to /dashboard; token in localStorage
94
+
95
+ ### P0 — invalid email
96
+ - **Name:** Sign in with invalid email
97
+ - **Pre-conditions:** not signed in; on /signin
98
+ - **Steps:** enter "not-an-email"; enter password; click "Sign in"
99
+ - **Selectors:** data-testid="email-input", data-testid="email-error"
100
+ - **Expected outcome:** error text appears within 200ms; no redirect
101
+
102
+ ## Proposed testids
103
+ - (none — using existing design system)
104
+
105
+ ## Triage summary
106
+ - P0: 2
107
+ - P1: 0
108
+ - P2: 0
109
+ ```
110
+
111
+ ## Anti-patterns Hawkeye rejects
112
+
113
+ - Generating 50 cases per screen. (Cap at 10; surface the rest as out-of-scope.)
114
+ - Skipping the priority. (P0 is the contract; the rest is optional.)
115
+ - Inventing selectors not present in the design system. (Propose them, but flag for Mantis.)
116
+ - Auto-writing Playwright code. (Hawkeye proposes cases; the human writes the bodies.)
117
+ - Skipping the screen-to-AC mapping. (Coverage gap = bug.)
118
+
119
+ ## Hand-off
120
+
121
+ > "E2E cases generated for {N} screens. {N0} P0, {N1} P1, {N2} P2. Files at `.wize/implementation/tea/e2e-cases/`. Next: implement P0 (Shuri), sign off new testids (Mantis)."
@@ -1,38 +1,132 @@
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
7
- status: stub
10
+ status: ready
8
11
  ---
9
12
 
10
13
  # TEA — Test Design
11
14
 
12
- **Goal.** For one story: declare the test split (unit / integration / e2e), required fixtures, mocks, environments.
15
+ **Goal.** For **one story**: declare the test split, the fixtures, the mocks, the environments, and the assertion targets. This is Hawkeye's contract Shuri implements against. No story enters dev without one.
16
+
17
+ Hawkeye drives. Runs at the start of every story (advisory; can be relaxed only when `tea.toml` says so).
13
18
 
14
19
  ## Inputs
20
+
15
21
  - `.wize/solutioning/stories/{epic}/{story}.md`
16
22
  - `.wize/solutioning/architecture.md`
23
+ - `.wize/implementation/tea/risk-profile.md`
24
+ - Overlay test playbooks if active:
25
+ - `web-overlay/playbooks/playwright-vitest.md`
26
+ - `app-overlay/playbooks/detox-maestro.md`
17
27
 
18
28
  ## Output
29
+
19
30
  - `.wize/implementation/tea/{epic}/{story}/design.md`
20
31
 
21
- ## YAML frontmatter
32
+ ## Steps
33
+
34
+ ### 1. Read the story; map every AC
35
+
36
+ For each AC, write **one assertion-shape sentence**: *"There will be a {kind} test that does {what} and expects {observable}."*
37
+
38
+ ### 2. Pick the test split
39
+
40
+ Defaults (from `playwright-vitest.md` / `detox-maestro.md`):
41
+ - **Low-risk story:** 70% unit / 20% integration / 10% E2E.
42
+ - **Risk-profile flagged story (R-1..R-3):** add 1–2 dedicated E2E + integration for the risk area.
43
+ - **UI-only story:** 60% unit / 30% component (Testing Library) / 10% E2E.
44
+ - **Server-only story:** 80% unit / 20% integration; no E2E unless an upstream consumer story bundles it.
45
+
46
+ ### 3. Declare fixtures + mocks
47
+
48
+ - Fixtures: known users, known DB rows, known files.
49
+ - Mocks: external services at the network boundary (MSW). Don't mock the unit under test.
50
+
51
+ ### 4. Environment
52
+
53
+ - Where it runs (local sim, headless emulator, real device farm).
54
+ - Network conditions (offline / 3G slow / lossy WiFi).
55
+ - OS / browser matrix (from `device-matrix.md` or playwright projects).
56
+
57
+ ### 5. Edge cases (cheap; pay back × 10)
58
+
59
+ List 3–7 edge cases the ACs don't name but the user might hit:
60
+ - Empty / max-length inputs.
61
+ - IME / paste / autofill.
62
+ - Offline mid-action.
63
+ - Concurrent users on the same resource.
64
+ - Time-zone / DST.
65
+ - Localized number/currency.
66
+
67
+ Each gets a test of its own (usually unit).
68
+
69
+ ### 6. Hand off
70
+
71
+ Mark `status: ready-for-dev` in the design.md frontmatter. Shuri reads before starting.
72
+
73
+ ## YAML frontmatter (canonical)
74
+
22
75
  ```yaml
23
76
  ---
24
77
  gate: design
25
- story_id: …
26
- ac_ids: [AC-1, AC-2, …]
78
+ story_id: E01-S03
79
+ ac_ids: [AC-02-1, AC-02-2]
80
+ status: PASS
81
+ created_at: 2026-06-11T12:00:00Z
27
82
  test_split:
28
- unit: count + brief description
29
- integration: count + brief description
30
- e2e: count + brief description
31
- fixtures: [...]
32
- mocks: [...]
33
- environment: dev|staging|isolated
83
+ unit: { count: 4, description: "validation, server-action contract, error mapper, mailer payload" }
84
+ integration: { count: 1, description: "server action calls mailer with right args, against MSW" }
85
+ e2e: { count: 1, description: "happy path; Playwright @chromium @ios" }
86
+ fixtures:
87
+ - "new-admin user"
88
+ - "empty team"
89
+ mocks:
90
+ - "Resend via MSW"
91
+ - "Auth session via fixture cookie"
92
+ environment: "local + Playwright project chromium + ios"
93
+ risk_links: [R-1]
94
+ edges:
95
+ - "invalid email rules: blank, missing @, weird IME chars"
96
+ - "duplicate teammate email"
97
+ - "offline at submit time"
34
98
  ---
35
99
  ```
36
100
 
37
- ## Body
38
- Plain-English rationale + edge-case list.
101
+ ## Body of `design.md`
102
+
103
+ ```markdown
104
+ ## Per-AC assertion shapes
105
+
106
+ - **AC-02-1**: Vitest unit on `validateInviteEmail()` → returns `{ ok: true }` for `name+tag@example.com`. Vitest integration on `inviteTeammate()` server action → asserts `mailer.send` called once with `{ to: 'name@example.com', template: 'team-invite' }`. Playwright E2E → clicks "Send invite", asserts `[data-testid="invite-sent-banner"]` appears within 1s.
107
+
108
+ - **AC-02-2**: Vitest unit on `validateInviteEmail()` → returns `{ ok: false, code: 'invalid_format', field: 'email' }` for empty/no-@. Component test (Testing Library) on `<InviteForm>` → asserts the input's `aria-describedby` error region announces "Enter a valid email."
109
+
110
+ ## Edge cases (additional tests)
111
+
112
+ - E1: Empty email — `validateInviteEmail('')` → `invalid_format`.
113
+ - E2: 254-char local part — boundary check; expect graceful clipping.
114
+ - E3: Same email submitted twice — second call hits `inviteTeammate()`, asserts second insert is a no-op (idempotency key based on `(team_id, email)`).
115
+ - E4: Offline at submit — Playwright `context.setOffline(true)` after click; banner shows "We'll retry when you're back online."
116
+
117
+ ## Run plan
118
+ - On every PR: full unit + integration; E2E `@smoke` tag only (≤ 30s).
119
+ - Nightly: full E2E suite + Lighthouse baseline.
120
+ ```
121
+
122
+ ## Anti-patterns Hawkeye rejects
123
+
124
+ - **`design.md` written after dev started.** Then the story slipped through; flag.
125
+ - **One test per AC, no edges.** Edges are where users live.
126
+ - **Mocking the unit under test.** You'd be testing the mock.
127
+ - **E2E that test the happy path only.** Cover failure too.
128
+ - **Selectors by visible text in a multilingual app.** Use `data-testid` or `role` with locale-aware patterns.
129
+
130
+ ## Hand-off
131
+
132
+ > Test design for E01-S03 at `.wize/implementation/tea/E01-S03/design.md`. 4 unit, 1 integration, 1 E2E, plus 4 edges. Shuri can start; I'll check `tea-trace.md` against this when the PR opens.
@@ -1,51 +1,144 @@
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
7
- status: stub
10
+ status: ready
8
11
  ---
9
12
 
10
13
  # TEA — Gate Decision
11
14
 
12
- **Goal.** Final per-story gate. PASS / CONCERNS / FAIL / WAIVED with documented rationale.
15
+ **Goal.** Final per-story decision. **PASS / CONCERNS / FAIL / WAIVED** with documented rationale, score, and policy mode. This is the line: a story doesn't advance past it without a recorded gate.
16
+
17
+ Hawkeye drives. The four inputs (`design`, `trace`, `review`, plus `nfr` at epic boundary) feed in. Policy is read from `.wize/config/tea.toml`.
13
18
 
14
19
  ## Inputs
15
- - `design.md`, `trace.md`, `review.md` for the story
16
- - `nfr/{epic}.md` if applicable
17
- - Story file
20
+
21
+ - `.wize/implementation/tea/{epic}/{story}/design.md`
22
+ - `.wize/implementation/tea/{epic}/{story}/trace.md`
23
+ - `.wize/implementation/tea/{epic}/{story}/review.md`
24
+ - `.wize/implementation/tea/nfr/{epic}.md` (when the story is the last of its epic)
25
+ - `.wize/config/tea.toml`
18
26
 
19
27
  ## Output
28
+
20
29
  - `.wize/implementation/tea/{epic}/{story}/gate.md`
21
30
 
31
+ ## Decision rules
32
+
33
+ | Inputs | Recommendation |
34
+ |---|---|
35
+ | All ACs `met`, no findings | **PASS** |
36
+ | All ACs `met`, only low/medium non-blocking findings | **PASS** with notes (or **CONCERNS** depending on count) |
37
+ | Any AC `partial` | **CONCERNS** |
38
+ | Any AC `not-met` | **FAIL** |
39
+ | NFR `FAIL` on the epic (last story) | **FAIL** |
40
+ | `tea-review` flagged `knowledge_axes_touched` ≠ `knowledge_axes_updated` (any axis touched without update) | **CONCERNS** (advisory mode) / **FAIL** (enforcing mode) — adds finding `KN-NN` |
41
+ | Failing AC OR non-neg NFR with documented business rationale + senior signoff | **WAIVED** |
42
+
43
+ Score (0–100): heuristic. `100 - (10 × high) - (5 × medium) - (2 × low)`. Floor 0.
44
+
45
+ ## Policy
46
+
47
+ `.wize/config/tea.toml` sets `policy = "advisory"` (default) or `"enforcing"`.
48
+
49
+ - **Advisory:** `FAIL` is a visible warning in PR; merge isn't auto-blocked. The team decides.
50
+ - **Enforcing:** `FAIL` blocks merge via CI status check (`tea-gate`). PASS / CONCERNS allowed through.
51
+
52
+ ## Steps
53
+
54
+ ### 1. Read the three inputs
55
+
56
+ If trace shows `partial`, you know the recommendation. If review recommends FAIL, you've got your decision. The gate doc just records it.
57
+
58
+ ### 2. Compute score
59
+
60
+ Don't game it. The score communicates magnitude to humans skimming a backlog.
61
+
62
+ ### 3. Write the doc
63
+
64
+ Frontmatter is the structured truth. The body is the narrative for humans.
65
+
66
+ ### 4. Notify
67
+
68
+ Update the PR description with the gate verdict + link to the doc. Maria Hill watches the gate status in `sprint-status.md`.
69
+
22
70
  ## YAML frontmatter (canonical)
71
+
23
72
  ```yaml
24
73
  ---
25
74
  gate: gate
26
- story_id: …
27
- status: PASS | CONCERNS | FAIL | WAIVED
28
- score: 0-100
29
- policy: advisory | enforcing
75
+ story_id: E01-S03
76
+ status: PASS
77
+ score: 95
78
+ policy: advisory
30
79
  inputs:
31
- - design.md: …
32
- - trace.md: …
33
- - review.md: …
34
- - nfr/{epic}.md: …
80
+ design: ".wize/implementation/tea/E01-S03/design.md"
81
+ trace: ".wize/implementation/tea/E01-S03/trace.md"
82
+ review: ".wize/implementation/tea/E01-S03/review.md"
83
+ nfr: null # not the last story of E01
35
84
  findings:
36
- - id: G-1
37
- severity: low | medium | high
38
- summary: …
39
- recommendation: …
40
- waived_by: null | "wizer"
41
- waived_reason: null | "…"
42
- created_at: ISO-8601
85
+ - id: REV-01
86
+ severity: low
87
+ summary: "Empty-state copy slightly differs from Mantis' spec."
88
+ recommendation: "Update `<EmptyTeamPanel>` heading in a follow-up."
89
+ - id: KN-01
90
+ severity: medium
91
+ summary: "Story added a new component (`<InviteForm>`) but architecture-snapshot.md was not updated."
92
+ recommendation: "Add 2 lines to `.wize/knowledge/document-project/architecture-snapshot.md` under a dated bullet referencing the new component + its public testid contract."
93
+ owner: shuri
94
+ blocking: false # advisory mode; would be true under enforcing
95
+ waived_by: null
96
+ waived_reason: null
97
+ created_at: 2026-06-11T20:30:00Z
43
98
  ---
44
99
  ```
45
100
 
46
- ## Body
47
- Narrative explanation; structured data is the YAML.
101
+ ## Body of `gate.md`
48
102
 
49
- ## Policy
50
- - **advisory** (default): FAIL is a warning. Merge proceeds.
51
- - **enforcing**: FAIL blocks merge via CI. Configured in `.wize/config/tea.toml`.
103
+ ```markdown
104
+ ## Verdict
105
+ **PASS** (score 95)
106
+
107
+ ## Why
108
+ - All ACs met with observed evidence.
109
+ - Trace clean; coverage 100% on ACs, partial on edges (E3, E4) — tracked for follow-up.
110
+ - Review found one low-severity copy finding (REV-01).
111
+ - Story is not the last in epic 01; NFR gate runs separately at epic boundary.
112
+
113
+ ## Notes for follow-up
114
+ - Open a tiny story (or include in next sprint planning) to fix REV-01 and close edges E3, E4.
115
+
116
+ ## Trail
117
+ - design.md → 4/1/1 split (unit/integration/e2e) + 4 edges declared.
118
+ - trace.md → all ACs `covered`; E3 `partial`, E4 `missing` (follow-up).
119
+ - review.md → ACs `met`, scope mostly disciplined, copy nit.
120
+ - nfr.md → N/A (mid-epic).
121
+ ```
122
+
123
+ ## When to WAIVE
124
+
125
+ Rare. Examples:
126
+ - A failing E2E that depends on a flaky external sandbox; the production code is unaffected; sign-off by Tony + Hill.
127
+ - A non-negotiable temporarily slipped because of an external integration blocker; we ship with mitigation in place; sign-off by Fury.
128
+
129
+ A WAIVE always lists:
130
+ - Who waived (`waived_by`).
131
+ - Why (`waived_reason`).
132
+ - The compensating control (a follow-up story, an SLA monitor, a feature flag).
133
+
134
+ ## Anti-patterns Hawkeye rejects
135
+
136
+ - **Gating without `review.md`.** No review → no gate.
137
+ - **PASS with a `not-met` AC.** Auto-fail.
138
+ - **WAIVED with no `waived_by` field.** Reject.
139
+ - **Scoring jiggered to clear a threshold.** Trust trumps point-scoring; if the count says 70, don't write 91.
140
+ - **Enforcing mode gates without CI check wiring.** Ghost gate; remove or wire it.
141
+
142
+ ## Hand-off
143
+
144
+ > Gate for E01-S03: **PASS** (score 95). One low-severity finding logged for follow-up. Maria Hill, sprint-status updated; Shuri, ready to start the next story.