wize-dev-kit 0.16.0 → 0.16.1

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 (228) hide show
  1. package/AGENTS.md +37 -0
  2. package/ARCH.md +77 -24
  3. package/CHANGELOG.md +4 -0
  4. package/DECISIONS.md +27 -1
  5. package/README.es.md +295 -0
  6. package/README.pt-BR.md +293 -0
  7. package/ROSTER.md +11 -3
  8. package/adapters/README.md +8 -7
  9. package/adapters/antigravity/README.md +5 -5
  10. package/adapters/claude-code/README.md +1 -1
  11. package/adapters/codex/README.md +5 -5
  12. package/adapters/codex/adapter.yaml +1 -1
  13. package/adapters/codex/render.js +1 -1
  14. package/adapters/continue/README.md +5 -5
  15. package/adapters/cursor/README.md +2 -2
  16. package/adapters/generic/README.md +1 -1
  17. package/adapters/hermes/README.md +23 -0
  18. package/adapters/hermes/adapter.yaml +8 -0
  19. package/adapters/hermes/render.js +17 -0
  20. package/adapters/kimi-code/README.md +5 -5
  21. package/adapters/kimi-code/render.js +2 -2
  22. package/adapters/opencode/README.md +3 -3
  23. package/adapters/opencode/render.js +27 -1
  24. package/adapters/windsurf/README.md +3 -3
  25. package/docs/harnesses/antigravity.md +20 -0
  26. package/docs/harnesses/antigravity.pt-BR.md +20 -0
  27. package/docs/harnesses/claude-code.md +23 -0
  28. package/docs/harnesses/claude-code.pt-BR.md +23 -0
  29. package/docs/harnesses/codex.md +21 -0
  30. package/docs/harnesses/codex.pt-BR.md +21 -0
  31. package/docs/harnesses/continue.md +21 -0
  32. package/docs/harnesses/continue.pt-BR.md +21 -0
  33. package/docs/harnesses/cursor.md +22 -0
  34. package/docs/harnesses/cursor.pt-BR.md +22 -0
  35. package/docs/harnesses/generic.md +20 -0
  36. package/docs/harnesses/generic.pt-BR.md +20 -0
  37. package/docs/harnesses/hermes.md +26 -0
  38. package/docs/harnesses/hermes.pt-BR.md +26 -0
  39. package/docs/harnesses/kimi-code.md +19 -0
  40. package/docs/harnesses/kimi-code.pt-BR.md +19 -0
  41. package/docs/harnesses/opencode.md +31 -0
  42. package/docs/harnesses/opencode.pt-BR.md +31 -0
  43. package/docs/harnesses/windsurf.md +22 -0
  44. package/docs/harnesses/windsurf.pt-BR.md +22 -0
  45. package/package.json +1 -1
  46. package/schemas/agent.schema.json +2 -2
  47. package/schemas/workflow.schema.json +1 -1
  48. package/src/app-overlay/wize-app-release-channels/workflow.md +2 -0
  49. package/src/app-overlay/wize-app-scaffold/workflow.md +2 -0
  50. package/src/app-overlay/wize-app-store-listing/workflow.md +2 -0
  51. package/src/builder-skills/wize-create-agent/workflow.md +2 -0
  52. package/src/builder-skills/wize-create-skill/workflow.md +2 -0
  53. package/src/builder-skills/wize-create-workflow/workflow.md +2 -0
  54. package/src/core-skills/wize-advanced-elicitation/skill.md +2 -0
  55. package/src/core-skills/wize-brainstorming/skill.md +2 -0
  56. package/src/core-skills/wize-customize/skill.md +116 -0
  57. package/src/core-skills/wize-editorial-review-prose/skill.md +94 -0
  58. package/src/core-skills/wize-editorial-review-structure/skill.md +99 -0
  59. package/src/core-skills/wize-grill/skill.md +77 -0
  60. package/src/core-skills/wize-index-docs/skill.md +119 -0
  61. package/src/core-skills/wize-pre-pr-check/skill.md +134 -0
  62. package/src/core-skills/wize-review-adversarial/skill.md +3 -0
  63. package/src/core-skills/wize-review-edge-case-hunter/skill.md +115 -0
  64. package/src/core-skills/wize-shard-doc/skill.md +2 -0
  65. package/src/core-skills/wize-spec/assets/headless-schemas.md +39 -0
  66. package/src/core-skills/wize-spec/assets/spec-template.md +40 -0
  67. package/src/core-skills/wize-spec/customize.toml +20 -0
  68. package/src/core-skills/wize-spec/skill.md +112 -0
  69. package/src/method-skills/1-analysis/wize-agent-analyst/agent.yaml +3 -0
  70. package/src/method-skills/1-analysis/wize-document-project/documentation-requirements.csv +12 -0
  71. package/src/method-skills/1-analysis/wize-document-project/templates/api-contracts-template.md +38 -0
  72. package/src/method-skills/1-analysis/wize-document-project/templates/architecture-template.md +54 -0
  73. package/src/method-skills/1-analysis/wize-document-project/templates/component-inventory-template.md +40 -0
  74. package/src/method-skills/1-analysis/wize-document-project/templates/contribution-guide-template.md +34 -0
  75. package/src/method-skills/1-analysis/wize-document-project/templates/data-models-template.md +36 -0
  76. package/src/method-skills/1-analysis/wize-document-project/templates/deep-dive-template.md +312 -0
  77. package/src/method-skills/1-analysis/wize-document-project/templates/deployment-guide-template.md +42 -0
  78. package/src/method-skills/1-analysis/wize-document-project/templates/development-guide-template.md +61 -0
  79. package/src/method-skills/1-analysis/wize-document-project/templates/index-template.md +185 -0
  80. package/src/method-skills/1-analysis/wize-document-project/templates/project-overview-template.md +110 -0
  81. package/src/method-skills/1-analysis/wize-document-project/templates/project-scan-report-schema.json +159 -0
  82. package/src/method-skills/1-analysis/wize-document-project/templates/source-tree-template.md +142 -0
  83. package/src/method-skills/1-analysis/wize-document-project/workflow.md +213 -20
  84. package/src/method-skills/1-analysis/wize-domain-research/customize.toml +14 -0
  85. package/src/method-skills/1-analysis/wize-domain-research/domain-steps/step-01-init.md +49 -0
  86. package/src/method-skills/1-analysis/wize-domain-research/domain-steps/step-02-domain-analysis.md +39 -0
  87. package/src/method-skills/1-analysis/wize-domain-research/domain-steps/step-03-competitive-landscape.md +39 -0
  88. package/src/method-skills/1-analysis/wize-domain-research/domain-steps/step-04-regulatory-focus.md +39 -0
  89. package/src/method-skills/1-analysis/wize-domain-research/domain-steps/step-05-technical-trends.md +39 -0
  90. package/src/method-skills/1-analysis/wize-domain-research/domain-steps/step-06-research-synthesis.md +43 -0
  91. package/src/method-skills/1-analysis/wize-domain-research/research.template.md +31 -0
  92. package/src/method-skills/1-analysis/wize-domain-research/workflow.md +58 -0
  93. package/src/method-skills/1-analysis/wize-market-research/customize.toml +14 -0
  94. package/src/method-skills/1-analysis/wize-market-research/research.template.md +31 -0
  95. package/src/method-skills/1-analysis/wize-market-research/steps/step-01-init.md +57 -0
  96. package/src/method-skills/1-analysis/wize-market-research/steps/step-02-customer-behavior.md +39 -0
  97. package/src/method-skills/1-analysis/wize-market-research/steps/step-03-customer-pain-points.md +37 -0
  98. package/src/method-skills/1-analysis/wize-market-research/steps/step-04-customer-decisions.md +39 -0
  99. package/src/method-skills/1-analysis/wize-market-research/steps/step-05-competitive-analysis.md +37 -0
  100. package/src/method-skills/1-analysis/wize-market-research/steps/step-06-research-completion.md +47 -0
  101. package/src/method-skills/1-analysis/wize-market-research/workflow.md +66 -0
  102. package/src/method-skills/1-analysis/wize-prfaq/workflow.md +152 -11
  103. package/src/method-skills/1-analysis/wize-product-brief/workflow.md +92 -19
  104. package/src/method-skills/1-analysis/wize-refresh-knowledge/workflow.md +129 -0
  105. package/src/method-skills/1-analysis/wize-research/workflow.md +39 -12
  106. package/src/method-skills/1-analysis/wize-technical-research/customize.toml +14 -0
  107. package/src/method-skills/1-analysis/wize-technical-research/research.template.md +31 -0
  108. package/src/method-skills/1-analysis/wize-technical-research/technical-steps/step-01-init.md +49 -0
  109. package/src/method-skills/1-analysis/wize-technical-research/technical-steps/step-02-technical-overview.md +45 -0
  110. package/src/method-skills/1-analysis/wize-technical-research/technical-steps/step-03-integration-patterns.md +39 -0
  111. package/src/method-skills/1-analysis/wize-technical-research/technical-steps/step-04-architectural-patterns.md +39 -0
  112. package/src/method-skills/1-analysis/wize-technical-research/technical-steps/step-05-implementation-research.md +42 -0
  113. package/src/method-skills/1-analysis/wize-technical-research/technical-steps/step-06-research-synthesis.md +46 -0
  114. package/src/method-skills/1-analysis/wize-technical-research/workflow.md +60 -0
  115. package/src/method-skills/1-analysis/wize-trigger-map/workflow.md +82 -16
  116. package/src/method-skills/2-plan-workflows/wize-create-prd/workflow.md +135 -23
  117. package/src/method-skills/2-plan-workflows/wize-edit-prd/workflow.md +110 -0
  118. package/src/method-skills/2-plan-workflows/wize-ux-design/workflow.md +134 -28
  119. package/src/method-skills/2-plan-workflows/wize-ux-scenarios/workflow.md +93 -15
  120. package/src/method-skills/2-plan-workflows/wize-validate-prd/workflow.md +108 -12
  121. package/src/method-skills/3-solutioning/wize-check-implementation-readiness/workflow.md +103 -11
  122. package/src/method-skills/3-solutioning/wize-create-architecture/architecture-decision-template.md +41 -0
  123. package/src/method-skills/3-solutioning/wize-create-architecture/customize.toml +20 -0
  124. package/src/method-skills/3-solutioning/wize-create-architecture/steps/step-01-init.md +95 -0
  125. package/src/method-skills/3-solutioning/wize-create-architecture/steps/step-01b-continue.md +32 -0
  126. package/src/method-skills/3-solutioning/wize-create-architecture/steps/step-02-context.md +126 -0
  127. package/src/method-skills/3-solutioning/wize-create-architecture/steps/step-03-starter.md +110 -0
  128. package/src/method-skills/3-solutioning/wize-create-architecture/steps/step-04-decisions.md +129 -0
  129. package/src/method-skills/3-solutioning/wize-create-architecture/steps/step-05-patterns.md +109 -0
  130. package/src/method-skills/3-solutioning/wize-create-architecture/steps/step-06-structure.md +97 -0
  131. package/src/method-skills/3-solutioning/wize-create-architecture/steps/step-07-validation.md +124 -0
  132. package/src/method-skills/3-solutioning/wize-create-architecture/steps/step-08-complete.md +59 -0
  133. package/src/method-skills/3-solutioning/wize-create-architecture/workflow.md +55 -48
  134. package/src/method-skills/3-solutioning/wize-create-epics-and-stories/workflow.md +154 -15
  135. package/src/method-skills/3-solutioning/wize-design-system/workflow.md +184 -22
  136. package/src/method-skills/3-solutioning/wize-nfr-principles/workflow.md +145 -17
  137. package/src/method-skills/3-solutioning/wize-project-context/workflow.md +120 -0
  138. package/src/method-skills/3-solutioning/wize-tech-vision/workflow.md +130 -22
  139. package/src/method-skills/4-implementation/wize-agent-dev/persona.md +12 -0
  140. package/src/method-skills/4-implementation/wize-changelog/workflow.md +184 -0
  141. package/src/method-skills/4-implementation/wize-checkpoint-preview/workflow.md +117 -0
  142. package/src/method-skills/4-implementation/wize-code-review/customize.toml +21 -0
  143. package/src/method-skills/4-implementation/wize-code-review/steps/step-01-gather-context.md +64 -0
  144. package/src/method-skills/4-implementation/wize-code-review/steps/step-02-review.md +40 -0
  145. package/src/method-skills/4-implementation/wize-code-review/steps/step-03-triage.md +43 -0
  146. package/src/method-skills/4-implementation/wize-code-review/steps/step-04-present.md +100 -0
  147. package/src/method-skills/4-implementation/wize-code-review/workflow.md +54 -12
  148. package/src/method-skills/4-implementation/wize-correct-course/workflow.md +93 -0
  149. package/src/method-skills/4-implementation/wize-create-story/workflow.md +154 -10
  150. package/src/method-skills/4-implementation/wize-dev-story/workflow.md +185 -17
  151. package/src/method-skills/4-implementation/wize-investigate/workflow.md +123 -0
  152. package/src/method-skills/4-implementation/wize-quick-dev/workflow.md +136 -18
  153. package/src/method-skills/4-implementation/wize-release/workflow.md +162 -0
  154. package/src/method-skills/4-implementation/wize-retrospective/workflow.md +114 -10
  155. package/src/method-skills/4-implementation/wize-sprint-planning/workflow.md +78 -11
  156. package/src/method-skills/4-implementation/wize-sprint-status/workflow.md +45 -11
  157. package/src/method-skills/module.yaml +28 -0
  158. package/src/orchestrator-skills/module.yaml +7 -1
  159. package/src/orchestrator-skills/wize/skill.md +164 -0
  160. package/src/orchestrator-skills/wize-check/skill.md +98 -0
  161. package/src/orchestrator-skills/wize-help/skill.md +227 -67
  162. package/src/orchestrator-skills/wize-onboarding/workflow.md +78 -14
  163. package/src/orchestrator-skills/wize-orchestrator/agent.yaml +2 -0
  164. package/src/orchestrator-skills/wize-orchestrator/persona.md +44 -3
  165. package/src/orchestrator-skills/wize-party-mode/workflow.md +2 -0
  166. package/src/security-overlay/_shared/allowlist.js +154 -0
  167. package/src/security-overlay/_shared/backlog.js +169 -0
  168. package/src/security-overlay/_shared/cli-runner.js +87 -0
  169. package/src/security-overlay/_shared/cvss.js +108 -0
  170. package/src/security-overlay/_shared/detect.js +125 -0
  171. package/src/security-overlay/_shared/install-script.js +205 -0
  172. package/src/security-overlay/_shared/invoke-phase.js +86 -0
  173. package/src/security-overlay/_shared/owasp.js +56 -0
  174. package/src/security-overlay/_shared/partial.js +225 -0
  175. package/src/security-overlay/_shared/preflight.js +175 -0
  176. package/src/security-overlay/_shared/scope-gate.js +172 -0
  177. package/src/security-overlay/_shared/scope-parser.js +147 -0
  178. package/src/security-overlay/agents/red-teamer/agent.yaml +54 -0
  179. package/src/security-overlay/agents/red-teamer/persona.md +49 -0
  180. package/src/security-overlay/data/common.txt +115 -0
  181. package/src/security-overlay/data/owasp-top10.json +15 -0
  182. package/src/security-overlay/data/tool-allowlist.json +31 -0
  183. package/src/security-overlay/skills/wize-sec-enumerate/scripts/run-enumerate.js +180 -0
  184. package/src/security-overlay/skills/wize-sec-enumerate/skill.md +34 -0
  185. package/src/security-overlay/skills/wize-sec-exploit/data/common.txt +117 -0
  186. package/src/security-overlay/skills/wize-sec-exploit/scripts/run-ffuf.js +147 -0
  187. package/src/security-overlay/skills/wize-sec-exploit/scripts/run-nikto.js +145 -0
  188. package/src/security-overlay/skills/wize-sec-exploit/scripts/run-nuclei.js +176 -0
  189. package/src/security-overlay/skills/wize-sec-exploit/scripts/run-sqlmap.js +139 -0
  190. package/src/security-overlay/skills/wize-sec-pentest/scripts/run-pipeline.js +184 -0
  191. package/src/security-overlay/skills/wize-sec-pentest/skill.md +54 -0
  192. package/src/security-overlay/skills/wize-sec-recon/scripts/run-gitleaks.js +139 -0
  193. package/src/security-overlay/skills/wize-sec-recon/scripts/run-osv.js +227 -0
  194. package/src/security-overlay/skills/wize-sec-recon/scripts/run-recon.js +162 -0
  195. package/src/security-overlay/skills/wize-sec-recon/skill.md +37 -0
  196. package/src/security-overlay/skills/wize-sec-report/scripts/render-report.js +1033 -0
  197. package/src/security-overlay/skills/wize-sec-scope/scripts/generate-scope.js +106 -0
  198. package/src/security-overlay/skills/wize-sec-scope/skill.md +52 -0
  199. package/src/tea-skills/wize-qa-generate-e2e-tests/workflow.md +121 -0
  200. package/src/tea-skills/wize-tea-design/workflow.md +107 -13
  201. package/src/tea-skills/wize-tea-gate/workflow.md +118 -25
  202. package/src/tea-skills/wize-tea-nfr/workflow.md +107 -14
  203. package/src/tea-skills/wize-tea-review/workflow.md +123 -13
  204. package/src/tea-skills/wize-tea-risk/workflow.md +113 -10
  205. package/src/tea-skills/wize-tea-trace/workflow.md +86 -12
  206. package/src/web-overlay/wize-web-deploy/workflow.md +2 -0
  207. package/src/web-overlay/wize-web-scaffold/workflow.md +2 -0
  208. package/src/web-overlay/wize-web-seo-audit/workflow.md +2 -0
  209. package/tools/installer/baseline.js +133 -0
  210. package/tools/installer/commands/agent.js +197 -0
  211. package/tools/installer/commands/doctor.js +320 -0
  212. package/tools/installer/commands/document-project.js +93 -0
  213. package/tools/installer/commands/sync.js +45 -0
  214. package/tools/installer/commands/update.js +172 -0
  215. package/tools/installer/document-project/batch-scanner.js +93 -0
  216. package/tools/installer/document-project/classify.js +170 -0
  217. package/tools/installer/document-project/modes/deep-dive.js +196 -0
  218. package/tools/installer/document-project/modes/full-rescan.js +15 -0
  219. package/tools/installer/document-project/modes/initial-scan.js +100 -0
  220. package/tools/installer/document-project/modes/quick.js +211 -0
  221. package/tools/installer/document-project/render-index.js +101 -0
  222. package/tools/installer/document-project/state.js +110 -0
  223. package/tools/installer/onboarding.js +14 -20
  224. package/tools/installer/render-shared.js +159 -15
  225. package/tools/installer/setup-helpers.js +1 -0
  226. package/tools/installer/validators/run-all.js +3 -2
  227. package/tools/installer/version-check.js +117 -0
  228. package/tools/installer/wize-cli.js +500 -70
@@ -1,37 +1,130 @@
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
7
- status: stub
10
+ status: ready
8
11
  ---
9
12
 
10
13
  # TEA — NFR Assessment
11
14
 
12
- **Goal.** Verify the epic meets Fury's NFR principles: performance, security, reliability, maintainability, accessibility, cost.
15
+ **Goal.** Verify that the **epic** as a whole meets Fury's NFR principles: performance, security, reliability, maintainability, accessibility, cost. Story-level gates miss NFRs that emerge only at integration; this gate catches them.
16
+
17
+ Hawkeye drives. Tony reviews perf + security findings. Fury escalates if a non-negotiable is at risk. Runs **per epic**, just before any of its stories merges.
13
18
 
14
19
  ## Inputs
15
- - `.wize/planning/nfr-principles.md`
20
+
21
+ - `.wize/planning/nfr-principles.md` (Fury's targets)
16
22
  - Code from all stories in the epic
17
- - Telemetry/benchmark output
23
+ - Telemetry / benchmark output (lighthouse, web-vitals, macrobenchmark, Sentry perf)
24
+ - Overlay perf playbooks: `web-perf-budgets.md`, `mobile-perf-budgets.md`
18
25
 
19
26
  ## Output
27
+
20
28
  - `.wize/implementation/tea/nfr/{epic}.md`
21
29
 
22
- ## YAML frontmatter
30
+ ## Steps
31
+
32
+ ### 1. For each category, run the verifier
33
+
34
+ | Category | Verifier (typical) |
35
+ |---|---|
36
+ | Performance | lighthouse-ci against epic-scope routes; web-vitals beacon delta |
37
+ | Security | `npm audit --omit=dev`; manual OWASP Top 10 walk; secret scan |
38
+ | Reliability | injected-failure tests (`@chaos` tag); retry policy review; idempotency check |
39
+ | Maintainability | coverage delta; cyclomatic complexity delta; lint baseline |
40
+ | Accessibility | axe on every epic-scope route; keyboard walk on critical flows |
41
+ | Cost | cost dashboard delta in the epic window |
42
+
43
+ ### 2. Score each
44
+
45
+ For each category: `PASS` (meets non-negotiable) / `CONCERNS` (within stretch range; below non-negotiable on a measurable item with mitigation plan) / `FAIL` (non-negotiable missed; no plan) / `WAIVED` (with documented reason + sign-off).
46
+
47
+ ### 3. Findings (one per slip)
48
+
49
+ If anything failed or concerned, write the finding: what we measured, what was expected, why the slip, what the next step is.
50
+
51
+ ### 4. Hand off
52
+
53
+ `PASS` → epic can merge. `CONCERNS` (advisory) → flag in PR description. `FAIL` (enforcing) → blocks merge.
54
+
55
+ ## YAML frontmatter (canonical)
56
+
23
57
  ```yaml
24
58
  ---
25
59
  gate: nfr
26
- epic: …
27
- status: PASS | CONCERNS | FAIL | WAIVED
60
+ epic: 01-onboarding
61
+ status: CONCERNS
28
62
  scores:
29
- performance: …
30
- security: …
31
- reliability: …
32
- maintainability: …
33
- accessibility: …
34
- cost: …
35
- findings: [...]
63
+ performance: PASS
64
+ security: PASS
65
+ reliability: CONCERNS
66
+ maintainability: PASS
67
+ accessibility: PASS
68
+ cost: PASS
69
+ findings:
70
+ - id: NFR-01-1
71
+ category: reliability
72
+ severity: medium
73
+ summary: "Outbox retry interval too aggressive for Resend's documented backoff."
74
+ expected: "Exponential 30s/2m/10m; we set 5s/15s/45s."
75
+ actual: "Spike in Resend 429s during integration test."
76
+ recommendation: "Update retry policy in `lib/email/outbox.ts`; capture with `outbox-retry.spec.ts`."
77
+ owner: shuri
78
+ blocking: false
79
+ created_at: 2026-06-11T18:00:00Z
36
80
  ---
37
81
  ```
82
+
83
+ ## Body of `nfr/{epic}.md`
84
+
85
+ ```markdown
86
+ ## Summary
87
+ Epic 01 (onboarding) at gate. Performance and a11y pass non-negotiables; reliability has one mid-severity concern around outbox backoff.
88
+
89
+ ## Per category
90
+
91
+ ### Performance — PASS
92
+ - LCP (signup): 1.45s p75 (target ≤ 2.5s).
93
+ - INP (signup): 90ms p75 (target ≤ 200ms).
94
+ - CLS (signup): 0.03 (target ≤ 0.1).
95
+ - LCP (onboarding): 1.7s p75.
96
+
97
+ ### Security — PASS
98
+ - `npm audit` clean (dev advisories noted in `.audit-ignore.md`).
99
+ - OWASP Top 10 walk: no findings.
100
+ - RLS verified on `users`, `teams`, `memberships`.
101
+
102
+ ### Reliability — CONCERNS
103
+ - See NFR-01-1.
104
+
105
+ ### Maintainability — PASS
106
+ - Coverage 84% on logic modules in this epic.
107
+ - No file > 300 LOC introduced.
108
+
109
+ ### Accessibility — PASS
110
+ - axe clean on `/signup`, `/signup/error`, `/onboarding`, `/onboarding/invite-sent`.
111
+ - Keyboard walk: focus order matches visual; modal traps + restores.
112
+
113
+ ### Cost — PASS
114
+ - No cost dashboard change beyond expected (account creation; mailer spend within budget).
115
+
116
+ ## Action items
117
+ - Shuri: PR-XXX fixes NFR-01-1. Re-run NFR after merge.
118
+ - Hawkeye: re-baseline web-vitals after epic ships to prod.
119
+ ```
120
+
121
+ ## Anti-patterns Hawkeye rejects
122
+
123
+ - **Self-reported "looks fine" with no verifier output.** Attach the artifact.
124
+ - **Concerns left for "later."** Either an action item with owner+deadline or it's not a concern.
125
+ - **Waived without sign-off.** WAIVED needs `waived_by: NAME` + reason.
126
+ - **NFR run on stage with synthetic data.** Use realistic distributions whenever possible.
127
+
128
+ ## Hand-off
129
+
130
+ > NFR gate for Epic 01: **CONCERNS**. PR can proceed if the reliability finding (NFR-01-1) is committed to be addressed in the next sprint. Otherwise hold the merge.
@@ -1,35 +1,145 @@
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
7
- status: stub
10
+ status: ready
8
11
  ---
9
12
 
10
13
  # TEA — Story Review
11
14
 
12
- **Goal.** Structured story review (separate from Shuri's `wize-code-review`).
15
+ **Goal.** A structured review of one story before its gate decision. Distinct from Shuri's `wize-code-review` (which audits code health). This one audits **AC fulfillment, test discipline, and risk-spot coverage**.
16
+
17
+ Hawkeye drives. Runs at story end, right before `tea-gate`.
13
18
 
14
19
  ## Inputs
15
- - Story file (ACs)
16
- - Test results
17
- - Trace doc
20
+
21
+ - Story file (the AC list, out-of-scope, notes).
22
+ - `tea-design.md` + `tea-trace.md`.
23
+ - Test run results (PR CI).
24
+ - Code diff (the PR).
18
25
 
19
26
  ## Output
27
+
20
28
  - `.wize/implementation/tea/{epic}/{story}/review.md`
21
29
 
22
- ## YAML frontmatter
30
+ ## Steps
31
+
32
+ ### 1. AC check (per AC)
33
+
34
+ For each AC, observe the actual behavior on a staging or local build and decide: `met` / `partial` / `not-met`. Use the recorded video/screenshot when CI captured one (Playwright `screenshot: only-on-failure` or always for review tag).
35
+
36
+ ### 2. Test discipline
37
+
38
+ Walk:
39
+ - Are `tea-design.md`'s declared tests present in code?
40
+ - Is every assertion meaningful (not just `expect(true).toBe(true)`)?
41
+ - Are selectors stable (role/label/testid) rather than brittle (CSS classes)?
42
+ - Are mocks at the network boundary (MSW) rather than in the unit under test?
43
+ - Are there `test.skip` or `test.only` left in?
44
+
45
+ ### 3. Risk-spot coverage
46
+
47
+ If the story touches any `R-x` from the risk profile, walk the mitigation contract and confirm it's met.
48
+
49
+ ### 4. Story scope discipline
50
+
51
+ Did the story stay within its declared scope? Any out-of-scope item that crept in is flagged in the review (and either moved to a new story or backed out).
52
+
53
+ ### 5. Knowledge update check
54
+
55
+ Did this story touch any of the 5 `document-project` axes (architecture / conventions / risk-spots / dependencies / overview)? If yes, walk the PR diff and confirm the corresponding `.wize/knowledge/document-project/*.md` got 1–3 new lines this commit.
56
+
57
+ Decision:
58
+ - **Touched + updated** → record as PASS, no finding.
59
+ - **Touched + NOT updated** → record finding `KN-NN` (severity `medium`); recommendation: `gate CONCERNS` (advisory mode) or `gate FAIL` (enforcing).
60
+ - **Not touched** → write `knowledge: n/a` in the body, move on.
61
+
62
+ This is what keeps the brownfield baseline alive instead of stale. Without it, `document-project` is honest in week 1 and obsolete in week 24.
63
+
64
+ ### 6. Findings
65
+
66
+ For each issue, write: severity (`low / medium / high`), what, why it matters, what to do.
67
+
68
+ ### 7. Recommend gate outcome
69
+
70
+ Review doesn't *make* the gate decision (that's `tea-gate`); it recommends. Possible recommendations:
71
+ - `gate PASS`
72
+ - `gate CONCERNS` with N findings
73
+ - `gate FAIL` (only if a non-negotiable AC is `not-met`)
74
+ - `gate WAIVED` (only with documented reason + senior signoff)
75
+
76
+ ## YAML frontmatter (canonical)
77
+
23
78
  ```yaml
24
79
  ---
25
80
  gate: review
26
- story_id: …
27
- status: PASS | CONCERNS | FAIL
81
+ story_id: E01-S03
82
+ status: PASS
28
83
  ac_check:
29
- - id: AC-1
30
- met: true|partial|false
31
- evidence: …
32
- findings: [...]
33
- recommendations: [...]
84
+ - id: AC-02-1
85
+ met: true
86
+ evidence: "e2e/onboarding/invite.spec.ts::happy path passed on PR-#412; recording in CI artifact #412-1"
87
+ - id: AC-02-2
88
+ met: true
89
+ evidence: "InviteForm.spec.tsx::error region announces"
90
+ knowledge_axes_touched: [conventions, risk-spots]
91
+ knowledge_axes_updated: [conventions, risk-spots] # leave empty array if axes touched but no update happened
92
+ findings:
93
+ - id: REV-01
94
+ severity: low
95
+ summary: "Empty-state copy slightly differs from Mantis' spec."
96
+ recommendation: "Update `<EmptyTeamPanel>` heading to 'Invite your first teammate'."
97
+ owner: shuri
98
+ blocking: false
99
+ risk_links: [R-1]
100
+ recommendation: gate-PASS
101
+ created_at: 2026-06-11T20:00:00Z
34
102
  ---
35
103
  ```
104
+
105
+ ## Body of `review.md`
106
+
107
+ ```markdown
108
+ ## Per-AC
109
+
110
+ ### AC-02-1 — met
111
+ Evidence: E2E `e2e/onboarding/invite.spec.ts::happy path` passed locally + CI run #412. Banner appears 720ms after click (well within 1s NFR).
112
+
113
+ ### AC-02-2 — met
114
+ Evidence: Unit + component test both pass. Manually walked screen-reader output — VoiceOver announces "Email — error — Enter a valid email." correctly.
115
+
116
+ ## Test discipline
117
+ - All declared tests present.
118
+ - `data-testid` discipline solid (invite-form, invite-email, invite-cta, invite-sent-banner).
119
+ - No `test.skip` / `.only`.
120
+ - One snapshot test — small enough to be useful; not a tree snapshot.
121
+
122
+ ## Risk coverage
123
+ - R-1 (mailer): integration test covers the right path; happy path E2E confirms end-to-end. PASS.
124
+
125
+ ## Scope discipline
126
+ - Two minor copy tweaks crept in (out-of-spec; logged as REV-01).
127
+
128
+ ## Findings
129
+ - REV-01 (low): empty-state copy.
130
+
131
+ ## Recommendation
132
+ Recommend `gate PASS` with one low-severity finding to fix in a follow-up.
133
+ ```
134
+
135
+ ## Anti-patterns Hawkeye rejects
136
+
137
+ - **Review without walking the code.** Reading the test names isn't review.
138
+ - **AC marked "met" without observed evidence.** Tests passing + screenshot/recording, please.
139
+ - **Findings without owners.** Same as everywhere else in the kit.
140
+ - **Recommending PASS when an AC is `partial`.** No.
141
+ - **Recommending PASS when a non-negotiable NFR slipped.** That's a gate FAIL.
142
+
143
+ ## Hand-off
144
+
145
+ > Review for E01-S03 at `.wize/implementation/tea/E01-S03/review.md`. All ACs `met`, one low-severity copy finding. Recommending `gate PASS`. Final at `wize-tea-gate`.
@@ -1,39 +1,142 @@
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
7
- status: stub
10
+ status: ready
8
11
  ---
9
12
 
10
13
  # TEA — Risk Profile
11
14
 
12
- **Goal.** Build the probability × impact matrix that prioritizes the rest of TEA's work.
15
+ **Goal.** Build the **probability × impact** matrix that prioritizes the rest of TEA's work. Areas in `HIGH` get deep test design; areas in `LOW` get smoke. Without a risk profile, every story is tested the same — wasteful, and unsafe.
16
+
17
+ Hawkeye drives. Tony co-signs. Runs **once**, right after architecture is signed off; revisit only on significant scope or architecture changes.
13
18
 
14
19
  ## Inputs
20
+
15
21
  - `.wize/solutioning/architecture.md`
16
22
  - `.wize/solutioning/epics/`
23
+ - `.wize/planning/nfr-principles.md`
24
+ - `.wize/knowledge/document-project/risk-spots.md` (brownfield)
25
+ - `.wize/knowledge/document-project/index.md` (documentation gap markers)
17
26
 
18
27
  ## Output
28
+
19
29
  - `.wize/implementation/tea/risk-profile.md`
20
30
 
31
+ ## Steps
32
+
33
+ ### 1. List candidate hot spots
34
+
35
+ For every architectural component + every epic, ask: *"If this misbehaves, what hurts?"*. Write candidates without filtering.
36
+
37
+ ### 2. Score each
38
+
39
+ | Axis | Levels |
40
+ |---|---|
41
+ | Probability | `low` (would be a surprise), `medium` (could happen), `high` (likely without explicit work) |
42
+ | Impact | `low` (cosmetic / opex), `medium` (user friction / revenue dent), `high` (data loss / outage / regulatory) |
43
+
44
+ Composite score:
45
+ - `low × low` = LOW
46
+ - `low × medium`, `medium × low`, `medium × medium` = MEDIUM
47
+ - anything touching `high` = HIGH
48
+
49
+ ### 3. For each finding, write the mitigation contract
50
+
51
+ Per row:
52
+ - **What test makes us confident?** Unit / integration / E2E / NFR / manual.
53
+ - **Who owns the mitigation?** Shuri / Tony / external service.
54
+ - **When is it verified?** Story-level / epic-level / pre-launch.
55
+
56
+ ### 4. Hand off
57
+
58
+ Hawkeye uses this in every `tea-design.md`. Tony respects it when picking ADR options.
59
+
21
60
  ## YAML frontmatter (canonical)
61
+
22
62
  ```yaml
23
63
  ---
24
64
  gate: risk
25
65
  status: PASS | CONCERNS | FAIL | WAIVED
26
66
  score: 0-100
27
- created_at: ISO-8601
67
+ created_at: 2026-06-11T12:00:00Z
28
68
  findings:
29
69
  - id: R-1
30
- area: …
31
- probability: low | medium | high
32
- impact: low | medium | high
33
- rationale: …
34
- mitigation: …
70
+ area: "Outbox / mailer"
71
+ probability: high
72
+ impact: medium
73
+ rationale: "Sign-up flow depends on email delivery; first impression failure is high-cost."
74
+ mitigation: "Integration test against Resend sandbox; outbox retry with backoff; on-call alert on delivery failure rate > 5%."
75
+ owner: shuri + tony
76
+ verified_when: story E01-S04 + NFR per epic
77
+ - id: R-2
78
+ area: "Database migrations under load"
79
+ probability: medium
80
+ impact: high
81
+ rationale: "Future migrations must be rolled out without lock contention."
82
+ mitigation: "Online schema changes; canary on staging with synthetic load; ADR-006 process."
83
+ owner: tony
84
+ verified_when: pre-launch
85
+ - id: R-3
86
+ area: "Auth: token refresh during long-running tabs"
87
+ probability: medium
88
+ impact: medium
89
+ rationale: "Cookie refresh race in RSC + edge can sign user out unexpectedly."
90
+ mitigation: "E2E covering > 1h tab; refresh strategy ADR-008; on-call alert on `auth_session_expired_unexpected`."
91
+ owner: shuri
92
+ verified_when: story E04-S02 + post-launch monitoring
35
93
  ---
36
94
  ```
37
95
 
38
- ## Body
39
- Narrative summary; the structured data is the YAML.
96
+ ## Body of `risk-profile.md`
97
+
98
+ The narrative explains the matrix; the YAML is the structured truth. Hawkeye writes 1–2 lines per finding explaining the *why*.
99
+
100
+ ```markdown
101
+ ## Matrix
102
+
103
+ | | Impact LOW | Impact MEDIUM | Impact HIGH |
104
+ |---|---|---|---|
105
+ | **Prob HIGH** | R-7 | R-1 | R-2 |
106
+ | **Prob MEDIUM** | R-4 | R-3 | R-5 |
107
+ | **Prob LOW** | — | R-6 | — |
108
+
109
+ ## Top-3 (drive test design)
110
+
111
+ 1. **R-2** — Database migrations under load. Pre-launch verification mandatory.
112
+ 2. **R-1** — Outbox/mailer. Story E01-S04 covers; epic NFR re-verifies.
113
+ 3. **R-5** — Payment idempotency. Story E03-S02 covers.
114
+
115
+ ## What this means for `tea-design.md`
116
+
117
+ - E01-S04 (mailer): 1 unit (retry policy), 1 integration (Resend sandbox), 1 E2E (sign-up arrives within 5min).
118
+ - E03-S02 (payments): 2 integration (Stripe idempotency keys), 1 E2E (double-click guard).
119
+ - Other stories follow the default 70/20/10 split.
120
+ ```
121
+
122
+ ## Documentation gap risk category
123
+
124
+ In brownfield repos, missing or stale documentation is an operational risk: new contributors make unsafe assumptions, AI agents hallucinate context, and reviews miss implicit contracts. Hawkeye treats it as a first-class risk area.
125
+
126
+ | Symptom | Severity | Rationale | Mitigation |
127
+ |---|---|---|---|
128
+ | `index.md` contains `_(To be generated)_` markers | medium | Conditional docs were skipped; the baseline is incomplete. | Schedule `wize-document-project initial_scan` for the next cooldown. |
129
+ | Baseline files older than 60 days | medium | Docs may no longer reflect the codebase. | Run `wize-refresh-knowledge` at sprint end. |
130
+ | No baseline exists in a brownfield repo | high | Team is flying blind; architecture and conventions are tribal knowledge. | Run `wize-dev-kit document-project quick` immediately. |
131
+
132
+ ## Anti-patterns Hawkeye rejects
133
+
134
+ - **Findings without mitigation.** A finding without a contract is a wish.
135
+ - **Mitigation owned by "the team."** Name a persona/human.
136
+ - **HIGH impact, MEDIUM probability, no NFR re-check.** Wire it into epic NFR gate.
137
+ - **Cosmetic risks scored HIGH.** Calibration. Reserve HIGH for data, outage, regulatory.
138
+ - **Risk profile rewritten per sprint.** Run once; revise on real architecture changes.
139
+
140
+ ## Hand-off
141
+
142
+ > Risk profile at `.wize/implementation/tea/risk-profile.md`. Top-3 drive deep `tea-design.md` for E01-S04, E03-S02, plus pre-launch migration drill. Default 70/20/10 split for the rest.
@@ -1,36 +1,110 @@
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
7
- status: stub
10
+ status: ready
8
11
  ---
9
12
 
10
13
  # TEA — Traceability
11
14
 
12
- **Goal.** Map every Acceptance Criterion to one or more concrete tests in the repo.
15
+ **Goal.** Map every Acceptance Criterion to **one or more concrete tests in the repo**. Reports honest coverage: `covered`, `partial`, `missing`. A story with `missing` rows cannot pass gate.
16
+
17
+ Hawkeye drives. Runs while Shuri implements (or right after PR open).
13
18
 
14
19
  ## Inputs
15
- - Story file (ACs)
16
- - Test files produced by Shuri
20
+
21
+ - Story file (the AC list).
22
+ - `tea-design.md` (the test contract).
23
+ - Repo (the actual test files).
17
24
 
18
25
  ## Output
26
+
19
27
  - `.wize/implementation/tea/{epic}/{story}/trace.md`
20
28
 
21
- ## YAML frontmatter
29
+ ## Steps
30
+
31
+ ### 1. Walk every AC
32
+
33
+ For each AC ID:
34
+ - Find the test(s) that exercise it.
35
+ - Reference the file + test name precisely.
36
+ - Decide status: `covered` (every assertion of the AC has a test) / `partial` (some assertions only) / `missing` (no test).
37
+
38
+ ### 2. Compute coverage score
39
+
40
+ - `covered_count / total_acs`.
41
+ - Reported but doesn't drive gate alone; the **per-AC status** drives gate.
42
+
43
+ ### 3. Flag holes
44
+
45
+ For every `partial` / `missing`, write what's needed in one line. Hawkeye proposes the test; Shuri writes it.
46
+
47
+ ### 4. Hand off
48
+
49
+ If everything is `covered`, status `PASS`. Otherwise `CONCERNS` (advisory) or `FAIL` (enforcing) until holes are closed.
50
+
51
+ ## YAML frontmatter (canonical)
52
+
22
53
  ```yaml
23
54
  ---
24
55
  gate: trace
25
- story_id: …
26
- status: PASS | CONCERNS | FAIL
56
+ story_id: E01-S03
57
+ status: PASS
27
58
  coverage:
28
- - ac_id: AC-1
59
+ - ac_id: AC-02-1
60
+ status: covered
61
+ tests:
62
+ - "src/onboarding/invite/__tests__/validateInviteEmail.spec.ts::valid email"
63
+ - "src/onboarding/invite/__tests__/inviteTeammate.spec.ts::calls mailer with right args"
64
+ - "e2e/onboarding/invite.spec.ts::happy path on Playwright @chromium"
65
+ - ac_id: AC-02-2
66
+ status: covered
29
67
  tests:
30
- - path/to/test.spec.ts::case-name
31
- status: covered | partial | missing
68
+ - "src/onboarding/invite/__tests__/validateInviteEmail.spec.ts::invalid email rules"
69
+ - "src/onboarding/invite/__tests__/InviteForm.spec.tsx::error region announces"
70
+ created_at: 2026-06-11T15:30:00Z
32
71
  ---
33
72
  ```
34
73
 
35
- ## Body
36
- For any `missing` or `partial`, propose what to write.
74
+ ## Body of `trace.md`
75
+
76
+ ```markdown
77
+ ## Per-AC
78
+
79
+ ### AC-02-1 — covered
80
+ Tests:
81
+ - `validateInviteEmail.spec.ts::valid email`
82
+ - `inviteTeammate.spec.ts::calls mailer with right args`
83
+ - `e2e/onboarding/invite.spec.ts::happy path`
84
+
85
+ ### AC-02-2 — covered
86
+ Tests:
87
+ - `validateInviteEmail.spec.ts::invalid email rules`
88
+ - `InviteForm.spec.tsx::error region announces`
89
+
90
+ ## Edges (from `design.md`)
91
+
92
+ - E1 (empty) — covered (validateInviteEmail.spec.ts::empty).
93
+ - E3 (idempotency) — **partial**. Integration test exists but doesn't assert second insert is no-op. Propose: assert `db.invites.count({ email, team_id })` = 1 after two calls.
94
+ - E4 (offline) — **missing**. Propose: Playwright `context.setOffline(true)` before click; assert offline banner.
95
+
96
+ ## Action items
97
+ - Shuri: add the missing offline E2E (or split into next story; flag in `review.md` then).
98
+ - Hawkeye: re-run trace once PR has the new tests.
99
+ ```
100
+
101
+ ## Anti-patterns Hawkeye rejects
102
+
103
+ - **Trace by file count, not per-AC.** "We have 24 tests" tells you nothing. Per AC, please.
104
+ - **Counting passing CI as trace.** CI passes when a test exists; trace cares whether the test exercises the AC.
105
+ - **`partial` left unflagged.** Either close or list as a known-open with story link.
106
+ - **Re-naming tests after trace.** The trace breaks; Shuri renames in agreement with Hawkeye or doesn't rename.
107
+
108
+ ## Hand-off
109
+
110
+ > Trace for E01-S03 at `.wize/implementation/tea/E01-S03/trace.md`. All ACs `covered`. Two edges still open (E3, E4); proposing follow-up. Ready for `tea-review`.
@@ -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
@@ -1,5 +1,7 @@
1
1
  ---
2
+
2
3
  code: wize-web-seo-audit
4
+ description: "Use quando o projeto web estiver no ar e precisar de auditoria de SEO."
3
5
  name: Web SEO Audit
4
6
  overlay: web
5
7
  owner: wize-agent-pm # Maria Hill commissions; Mantis + Tony execute