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
@@ -0,0 +1,100 @@
1
+ ---
2
+ deferred_work_file: '{implementation_artifacts}/deferred-work.md'
3
+ ---
4
+
5
+ # Step 4: Present and Act
6
+
7
+ ## Rules
8
+
9
+ - Speak in `{communication_language}`.
10
+ - When `{spec_file}` is set, always write findings to the story file before offering action choices.
11
+ - `decision_needed` findings must be resolved before handling `patch` findings.
12
+
13
+ ## Instructions
14
+
15
+ ### 1. Clean review shortcut
16
+
17
+ If zero findings remain after triage, state that and proceed to section 6 (Sprint Status Update).
18
+
19
+ ### 2. Write findings to the story file
20
+
21
+ If `{spec_file}` exists and contains a Tasks/Subtasks section, append a `### Review Findings` subsection in this order:
22
+
23
+ 1. `decision_needed` (unchecked):
24
+ ```
25
+ - [ ] [Review][Decision] <Title> — <Detail>
26
+ ```
27
+ 2. `patch` (unchecked):
28
+ ```
29
+ - [ ] [Review][Patch] <Title> [<file>:<line>]
30
+ ```
31
+ 3. `defer` (checked):
32
+ ```
33
+ - [x] [Review][Defer] <Title> [<file>:<line>] — deferred, pre-existing
34
+ ```
35
+
36
+ Also append each `defer` finding to `{deferred_work_file}` under `## Deferred from: code review ({date})`.
37
+
38
+ ### 3. Present summary
39
+
40
+ ```
41
+ Code review complete.
42
+ - decision_needed: {D}
43
+ - patch: {P}
44
+ - defer: {W}
45
+ - dismissed: {R}
46
+ ```
47
+
48
+ If `{spec_file}` is set, add: "Findings written to `{spec_file}`."
49
+
50
+ ### 4. Resolve decision_needed findings
51
+
52
+ Present each `decision_needed` finding and ask the user to decide. Once resolved, each becomes a `patch`, `defer`, or is dismissed.
53
+
54
+ If deferred, ask for a one-line reason and append it to both the story file bullet and the deferred-work file.
55
+
56
+ ### 5. Handle patch findings
57
+
58
+ If `patch` findings exist, ask:
59
+
60
+ ```
61
+ How would you like to handle the {P} patch findings?
62
+ 1. Apply every patch — fix all now, no per-finding confirmation.
63
+ 2. Leave as action items — they are already in the story file (only if spec_file set).
64
+ 3. Walk through each patch — show details before deciding.
65
+ ```
66
+
67
+ Wait for the numbered choice. Do not proceed until selected.
68
+
69
+ - **Apply every patch**: apply all patch findings. Afterward, present a summary of changes and check off patch items in the story file if applicable.
70
+ - **Leave as action items**: done.
71
+ - **Walk through each patch**: present each finding with detail and suggested fix, then re-offer the menu.
72
+
73
+ ### 6. Update story status and sync sprint tracking
74
+
75
+ Skip if `{spec_file}` is not set.
76
+
77
+ Determine `{new_status}`:
78
+ - If all `decision_needed` and `patch` findings are resolved and no unresolved issues remain → `done`
79
+ - If patch findings were left as action items or unresolved issues remain → `in-progress`
80
+
81
+ Update the story file status and save it.
82
+
83
+ If `{story_key}` is set and a sprint-status file exists, update the matching `development_status` entry.
84
+
85
+ ### 7. Next steps
86
+
87
+ Present options:
88
+
89
+ ```
90
+ What would you like to do next?
91
+ 1. Start the next story — run wize-dev-story to pick up the next ready-for-dev story.
92
+ 2. Re-run code review — address findings and review again.
93
+ 3. Done — end the workflow.
94
+ ```
95
+
96
+ Wait for the numbered choice.
97
+
98
+ ## On complete
99
+
100
+ Run `{workflow.on_complete}` if non-empty.
@@ -1,24 +1,66 @@
1
1
  ---
2
+
2
3
  code: wize-code-review
4
+ description: "Use quando um PR estiver aberto e precisar de revisão de código por pares focada em saúde do código."
3
5
  name: Code Review
4
6
  phase: 4-implementation
5
- owner: wize-agent-dev # Shuri (peer Shuri — done at PR open time)
6
- status: stub
7
+ owner: wize-agent-dev # Shuri (peer review)
8
+ status: ready
7
9
  ---
8
10
 
9
11
  # Code Review
10
12
 
11
- **Goal.** Self/peer review focused on code health. Separate from Hawkeye's story review.
13
+ **Goal.** Review code changes adversarially using parallel review layers and structured triage into actionable categories.
14
+
15
+ This is **Shuri's peer code review** — separate from Hawkeye's `wize-tea-review` (which audits AC fulfillment). Both run on every story PR; they are complementary.
16
+
17
+ ## When to run
18
+
19
+ Every PR that ships code. Quick-dev PRs get a lighter review (skip architecture checks unless they touched architecture).
12
20
 
13
- ## What this checks
14
- - Naming, structure, dead code
15
- - Test coverage and quality (not just presence)
16
- - Security obvious-misses
17
- - Performance obvious-misses
18
- - Architectural drift (call Tony if found)
21
+ ## Inputs
19
22
 
20
- ## What this does NOT check
21
- - AC fulfillment — that's Hawkeye's `trace` + `review` + `gate`.
23
+ - The diff, PR, branch, or commit range to review.
24
+ - The spec/story file for context (optional but recommended).
25
+ - Existing code style and project context from `.wize/knowledge/document-project/`.
22
26
 
23
27
  ## Outputs
24
- - Inline comments / suggestions on the diff.
28
+
29
+ - Inline-style findings presented in the conversation.
30
+ - Optional patch application if the user chooses to fix findings now.
31
+ - Updated story file with a `### Review Findings` section when a spec file is provided.
32
+ - Updated sprint status when a story key is discovered.
33
+
34
+ ## Workflow architecture
35
+
36
+ This skill uses **step-file architecture**:
37
+
38
+ - Each step is self-contained and followed exactly.
39
+ - Sequential enforcement: complete steps in order, no skipping.
40
+ - State tracked in frontmatter variables set at runtime.
41
+ - Append-only building of findings.
42
+
43
+ ## Critical rules
44
+
45
+ - **Read completely** each step file before acting.
46
+ - **Never** load multiple step files simultaneously.
47
+ - **Always** halt at checkpoints and wait for human input.
48
+ - Use CWD-relative `path:line` for every code reference.
49
+
50
+ ## On activation
51
+
52
+ 1. Load `.wize/config/project.toml` and `.wize/config/user.toml`.
53
+ 2. Resolve `user_name`, `communication_language`, `document_output_language`, `implementation_artifacts`, `planning_artifacts`.
54
+ 3. Greet the user in `communication_language`.
55
+ 4. Read fully and follow `./steps/step-01-gather-context.md`.
56
+
57
+ ## Steps
58
+
59
+ 1. `step-01-gather-context.md` — identify the diff source, construct `{diff_output}`, set `{review_mode}` and `{spec_file}`.
60
+ 2. `step-02-review.md` — launch parallel review layers (Blind Hunter, Edge Case Hunter, Acceptance Auditor).
61
+ 3. `step-03-triage.md` — normalize, deduplicate, and classify findings into `decision_needed`, `patch`, `defer`, `dismiss`.
62
+ 4. `step-04-present.md` — present findings, resolve decisions, apply patches, update story status.
63
+
64
+ ## Hand-off
65
+
66
+ > Code review complete for `{story_key or change}`. `{decision_needed}` decision(s), `{patch}` patch(es), `{defer}` deferred, `{dismissed}` dismissed as noise. Next: re-run review or continue to `wize-tea-review` (Hawkeye).
@@ -0,0 +1,93 @@
1
+ ---
2
+
3
+ code: wize-correct-course
4
+ description: "Use quando o projeto desviar do plano e precisar de correção de curso com decisão documentada."
5
+ name: Correct Course
6
+ phase: 4-implementation
7
+ owner: wize-agent-pm # Maria Hill, with wize-orchestrator
8
+ status: ready
9
+ ---
10
+
11
+ # Correct Course
12
+
13
+ **Goal.** React when a sprint drifts. Detect the deviation, classify the cause, propose one of three corrective moves (cut scope, re-route, escalate), and update `sprint-status.yaml` after the user confirms.
14
+
15
+ Maria Hill chairs. Wizer is on call for cross-cutting decisions. The human always confirms the action.
16
+
17
+ ## When to run
18
+
19
+ - `wize-sprint-status` flagged a risk: "slipping" or "at risk".
20
+ - The team says "we won't make it" during a stand-up.
21
+ - A story's TEA gate came back as `FAIL` mid-sprint.
22
+ - An external event (incident, vendor outage) consumed capacity.
23
+ - **Automatic trigger:** any skill that completes step 7.5 (loop verification) and hits the max-cycles guard escalates to Wizer, who runs this skill.
24
+ - **Staleness monitor:** if `wize-sprint-status` has not been updated in 2+ days, Wizer auto-runs this skill on session start (detected in step 1).
25
+
26
+ ## Inputs
27
+
28
+ - `.wize/implementation/sprint-status.yaml`
29
+ - `.wize/implementation/tea/{epic}/{story}/gate.md` (when a gate failed)
30
+ - `.wize/knowledge/document-project/risk-spots.md` (for context on known risks)
31
+ - A free-form reason from the user: chat message, stand-up note, or incident link.
32
+
33
+ ## Output
34
+
35
+ - Updated `.wize/implementation/sprint-status.yaml` (statuses changed, items deferred).
36
+ - One-line entry in `.wize/implementation/course-corrections.md` with date, cause, action, owner.
37
+
38
+ ## Steps
39
+
40
+ ### 1. Detect
41
+
42
+ Wizer pulls the latest status file. If `last_updated` is older than 2 days, the sprint is stale. Mark this as risk #0: stale signal.
43
+
44
+ ### 2. Classify
45
+
46
+ Pick exactly one cause:
47
+
48
+ - **Cut scope.** Story turned out larger than one PR, or a non-essential AC can be deferred.
49
+ - **Re-route.** Story needs a different agent (e.g., Mantis for UX) or skill (e.g., `wize-investigate` for a regression).
50
+ - **Escalate.** Story needs more hands, or a decision outside the team.
51
+
52
+ A sprint can have multiple causes; the workflow handles one per run. Re-run for additional causes.
53
+
54
+ ### 3. Propose
55
+
56
+ For each cause, propose 1–3 specific actions. Each action is bounded: a story ID to move, a date to defer to, or a person to page. No vague "communicate more" — that’s not an action.
57
+
58
+ ### 4. Confirm with the human
59
+
60
+ List the actions; the human picks which to apply. Apply only what the human approved.
61
+
62
+ ### 5. Update the sprint
63
+
64
+ For each approved action:
65
+
66
+ - Change `sprint-status.yaml` statuses (e.g., story from `in-progress` → `backlog` if deferred).
67
+ - Append a row to `course-corrections.md` with `date`, `cause`, `action`, `owner`.
68
+
69
+ ### 6. Hand off
70
+
71
+ Notify the next workflow that should run (usually `wize-sprint-status` to confirm the new state, or `wize-dev-story` to continue the remaining work).
72
+
73
+ ## Output template — `course-corrections.md`
74
+
75
+ ```markdown
76
+ # Course corrections
77
+
78
+ | Date | Sprint | Cause | Action | Owner |
79
+ |---|---|---|---|---|
80
+ | 2026-06-15 | 4 | cut scope | E04-S02 split into S02a + S02b; S02b deferred to S5 | Hill |
81
+ | 2026-06-15 | 4 | escalate | Paged Tony to unblock E04-S01 (waiting on ADR-010) | Wizer |
82
+ ```
83
+
84
+ ## Anti-patterns Hill rejects
85
+
86
+ - Cutting scope without confirming the trade-off with the user.
87
+ - Moving a story to `done` to "stop tracking it" when it isn’t actually done.
88
+ - Re-routing to an agent who doesn’t have the context (always include a 3-sentence brief).
89
+ - Escalating without naming a specific decision blocker.
90
+
91
+ ## Hand-off
92
+
93
+ > "Course correction applied at `.wize/implementation/course-corrections.md`. Sprint {N} updated. Run `/wize-sprint-status` to confirm the new state."
@@ -1,27 +1,171 @@
1
1
  ---
2
+
2
3
  code: wize-create-story
4
+ description: "Use quando um epic estiver definido e precisar criar uma story individual com acceptance criteria detalhados."
3
5
  name: Create Story
4
6
  phase: 4-implementation
5
7
  owner: wize-agent-architect # Tony writes; Shuri may refine
6
- status: stub
8
+ status: ready
7
9
  ---
8
10
 
9
11
  # Create Story
10
12
 
11
- **Goal.** Author one Pull-Request-sized story unit with crisp acceptance criteria.
13
+ **Goal.** Author one Pull-Request-sized story with crisp acceptance criteria, named touch-points, and a contract for Hawkeye's `tea-design.md`. This is the single most-edited artifact in the lifecycle; make it useful.
14
+
15
+ Tony drives. Shuri reads and proposes refinements before pulling the story.
16
+
17
+ > **No estimates.** Never attach a time or effort estimate (hours, days, story points, S/M/L/XL) to a story — at any step. AI development speed has made them noise that only burns time and tokens. The only sizing question is binary: **does it fit one PR?** If not, slice it. Nothing else.
18
+
19
+ ## When to use
20
+
21
+ - New story splits from an epic (most common — done in `wize-create-epics-and-stories`).
22
+ - A story that comes in mid-sprint and needs a quick scaffold.
23
+ - A `tea-gate` waived rationale created a follow-up story.
12
24
 
13
25
  ## Inputs
26
+
27
+ Read central docs first, expand by dependency; don't pad with unrelated files:
28
+
29
+ - `AGENTS.md` + `.wize/config/project.toml` — profiles, languages, conventions.
14
30
  - `.wize/solutioning/architecture.md`
15
31
  - `.wize/solutioning/epics/{epic}.md`
16
- - (optional) UX screen reference
32
+ - `.wize/planning/prd.md` (the AC list)
33
+ - `.wize/knowledge/document-project/` (brownfield baseline, if present)
34
+ - (optional) `.wize/planning/ux/ux-design/{screen}.md`
35
+
36
+ ## Output
17
37
 
18
- ## Outputs
19
38
  - `.wize/solutioning/stories/{epic}/{story-id}.md`
20
39
 
21
- ## Story template
22
- (See `wize-create-epics-and-stories` for the canonical template.)
40
+ ## Steps
41
+
42
+ ### 1. Name it by outcome
43
+
44
+ Verb-led, user-visible. *"Onboarding: invite first teammate"* not *"Build invite form."*
45
+
46
+ ### 2. Frontmatter
47
+
48
+ ```yaml
49
+ ---
50
+ story_id: E01-S03
51
+ epic: 01-onboarding
52
+ status: ready-for-dev
53
+ priority: 2 # 1=now, 2=next, 3=later
54
+ linked_screens: [onboarding-step-1, invite-modal]
55
+ linked_acs: [AC-02-1, AC-02-2]
56
+ ---
57
+ ```
58
+
59
+ ### 3. Context (3–5 lines)
60
+
61
+ What place this story occupies in the user journey, why it matters here, what it depends on.
62
+
63
+ ### 4. ACs (lifted from PRD; not reworded)
64
+
65
+ Don't reword PRD ACs in a story — copy them verbatim. If they're not crisp enough, fix in the PRD first.
66
+
67
+ ### 5. Out of scope
68
+
69
+ Explicit. Other ACs the user might think this story touches, with a one-line reason it's not here.
70
+
71
+ ### 6. Sources of truth
72
+
73
+ List the exact docs Shuri must read before coding: `AGENTS.md`, `project.toml`, `document-project/*`, the parent epic, `architecture.md`, the linked screen, the TEA test contract, and the related code + tests already on this path.
74
+
75
+ ### 7. Restrictions
76
+
77
+ Beyond out-of-scope: name **protected behaviors** (what must not change), **compatibility** constraints (keys, contracts, migrations), and **security** constraints (boundary validation, authz). No silent scope creep — log recommended extras separately.
78
+
79
+ ### 8. Validation contract
80
+
81
+ Declare the **AC → test** map and the **required checks** (unit / integration / e2e, lint, format, type-check, build, security when applicable) plus which UI states (loading / empty / error) must be asserted. Hawkeye writes the real `tea-design.md`, but this is the binding shape it fills.
82
+
83
+ ### 9. Notes for Shuri
84
+
85
+ - Touch points: files Shuri will likely edit.
86
+ - Reuse: components from `design-system` already named.
87
+ - `testid` map: names Hawkeye expects.
88
+ - Edge cases worth flagging (only ones not derivable from ACs).
89
+
90
+ ### 10. Notes for Hawkeye
91
+
92
+ A one-paragraph hint: suggested split, fixtures, mocks, environment. Hawkeye writes the real `tea-design.md` but reads this hint.
93
+
94
+ ## INVEST rules
95
+
96
+ Every story passes:
97
+
98
+ - **I**ndependent.
99
+ - **N**egotiable.
100
+ - **V**aluable.
101
+ - **S**mall (≤ 1 PR) — the *only* sizing test; if it doesn't fit one PR, slice.
102
+ - **T**estable.
103
+
104
+ (INVEST's "Estimable" is dropped on purpose — see **No estimates** above. We don't size in time or points.)
105
+
106
+ If any letter fails, fix before queueing.
107
+
108
+ ## Full story template
109
+
110
+ ```markdown
111
+ ---
112
+ story_id: E01-S03
113
+ epic: 01-onboarding
114
+ status: ready-for-dev
115
+ priority: 2
116
+ linked_screens: [onboarding-step-1, invite-modal]
117
+ linked_acs: [AC-02-1, AC-02-2]
118
+ ---
119
+
120
+ # Story: Onboarding step 1 — invite first teammate
121
+
122
+ ## Context
123
+ After sign-up the admin lands on `/onboarding`. This story implements the first
124
+ moment-of-truth from scenario S1: inviting the first teammate.
125
+
126
+ ## Sources of truth (Shuri reads before coding)
127
+ - `AGENTS.md` + `.wize/config/project.toml` · `.wize/knowledge/document-project/*`.
128
+ - `prd.md` (AC source) · `architecture.md` · `ux-design/onboarding-step-1.md` · parent epic `01-onboarding.md`.
129
+ - The TEA test contract for this story · related code + tests already on this path.
130
+
131
+ ## Acceptance criteria
132
+ - **AC-02-1:** Given a new admin on `/onboarding`, When they enter a valid email and click "Send invite", Then a `teammate_invited` event fires and the screen advances to "Invite sent" within 1s.
133
+ - **AC-02-2:** Given an invalid email, When the user blurs the field, Then error text appears (200ms) identifying which rule failed.
134
+
135
+ ## Restrictions
136
+ - **Out of scope:** bulk invite (multiple emails) → E01-S07; custom invite message → E02-S03; "Skip for now" button — not a moment-of-truth path; out.
137
+ - **Protected behaviors:** existing sign-up + session flow must not change.
138
+ - **Compatibility:** `(team_id, email)` composite idempotency key — don't break existing invite rows.
139
+ - **Security:** validate email at the server boundary; auth context required on `inviteTeammate`.
140
+
141
+ ## Notes for Shuri (Dev)
142
+ - Touch points: `app/(onboarding)/invite/page.tsx`, `lib/email/send-invite.ts`, new server action `inviteTeammate`.
143
+ - Reuse: `Button` (primary), `Input`, `Banner` (success/error) from design-system.
144
+ - testid: `invite-form`, `invite-email`, `invite-cta`, `invite-sent-banner`.
145
+
146
+ ## Validation contract
147
+ - **AC → test:** AC-02-1 → E2E happy path (Playwright @chromium @ios) + unit `validateInviteEmail`; AC-02-2 → unit invalid-email rules + component error-state.
148
+ - **Required checks:** the unit/integration/E2E split Hawkeye declares below, plus lint, format, type-check, build. Authz asserted on the server action.
149
+ - **States:** loading, empty, error rendered and asserted.
150
+
151
+ ## Notes for Hawkeye (TEA)
152
+ Suggested split: 4 unit, 1 integration, 1 E2E.
153
+ - Unit: validateInviteEmail, mailer payload, server action error mapping, retry policy.
154
+ - Integration: server action calls mailer with right args (MSW on Resend).
155
+ - E2E: happy path on Playwright @chromium @ios.
156
+ - Risk: R-1 (mailer) — extra E2E asserts banner within 1s of click.
157
+
158
+ ## Done means
159
+ Every AC has a passing test (mapped above), gate PASS/CONCERNS, story `status: ready-for-review`, knowledge axes updated if touched.
160
+ ```
161
+
162
+ ## Anti-patterns Tony rejects
163
+
164
+ - **ACs reworded from PRD.** Source-of-truth drift.
165
+ - **Stories with no touch points.** Shuri spends an hour finding the files.
166
+ - **No notes for Hawkeye.** TEA designs in the dark.
167
+ - **Stories named by feature** ("Add invite button") — name by **outcome**.
168
+
169
+ ## Hand-off
23
170
 
24
- ## Rules
25
- - One story = one PR. If two, split.
26
- - Each AC must be testable. If Hawkeye can't write a test for it, rewrite the AC.
27
- - "Out of scope" is mandatory. Force the cut.
171
+ > Story E01-S03 ready. Shuri, pull when sprint allows. Hawkeye, `tea-design.md` for this story whenever you're ready.
@@ -1,33 +1,201 @@
1
1
  ---
2
+
2
3
  code: wize-dev-story
4
+ description: "Use quando uma story estiver pronta para implementação e precisar ser desenvolvida com TDD e commits rastreáveis."
3
5
  name: Dev Story
4
6
  phase: 4-implementation
5
7
  owner: wize-agent-dev # Shuri
6
- status: stub
8
+ status: ready
7
9
  ---
8
10
 
9
11
  # Dev Story
10
12
 
11
- **Goal.** Implement one story under TDD discipline.
13
+ **Goal.** Implement one story under TDD discipline. Tests first; minimum code to pass; refactor with green. Each commit cites an AC ID. The PR ends in a clean gate, not a "looks good to me."
14
+
15
+ Shuri drives. Hawkeye observes (test design is binding). Tony stays available for architectural questions.
16
+
17
+ ## Operating contract
18
+
19
+ I work inside a repo with WDK installed: `.wize/`, `AGENTS.md`, and the `wize-*` skills are my instructions and memory, not background reading. This section is the execution slice of the story's **mission contract** (see `/wize mission` or `/wize-help mission`).
20
+
21
+ - **Inspect before editing.** Read the story, its sources of truth, and the touched code first.
22
+ - **Reuse ladder before new code** (see `wize-agent-dev` persona): needs to exist → already here → stdlib → framework feature → installed dep → one-liner → only then new code.
23
+ - **Test-first, unconditionally.** Red before green, per the loop below — this is the strict-TDD workflow; the "when applicable" latitude lives in `wize-quick-dev`, not here. Smallest sufficient change; follow existing conventions.
24
+ - **Run real commands.** No success claim without evidence — a passing run, not "should pass."
25
+ - **Never stop at planning.** Planning is a step, not a deliverable.
12
26
 
13
27
  ## Inputs
14
- - `.wize/solutioning/stories/{epic}/{story-id}.md`
28
+
29
+ - `.wize/solutioning/stories/{epic}/{story}.md`
15
30
  - `.wize/solutioning/architecture.md`
16
- - `.wize/implementation/tea/{epic}/{story-id}/design.md` (Hawkeye must have produced this)
31
+ - `.wize/solutioning/design-system/` (use existing components)
32
+ - `.wize/implementation/tea/{epic}/{story}/design.md` (the test contract)
17
33
 
18
34
  ## Outputs
19
- - Code + tests in the target repo
20
- - Commit messages reference AC IDs
21
- - Story file updated to `status: ready-for-review`
22
-
23
- ## Steps (TDD loop)
24
- 1. **Read.** Story ACs and Hawkeye's design.
25
- 2. **Red.** Write the failing test first.
26
- 3. **Green.** Minimum code to pass.
27
- 4. **Refactor.** Clean — only with green tests.
28
- 5. **Repeat** until every AC has at least one test.
29
- 6. **Self-check.** Security, perf, dead code, naming.
30
- 7. **Hand-off.** Ping Hawkeye for trace + review.
35
+
36
+ - Code + tests in the target repo.
37
+ - Commit messages reference AC IDs.
38
+ - Story file updated to `status: ready-for-review`.
39
+
40
+ ## The loop (TDD, story-scoped)
41
+
42
+ ### 1. Read
43
+
44
+ Story ACs, out-of-scope, notes, `tea-design.md`. Confirm the test split. If the design doesn't match the story (mismatch on test count, mock, environment), ping Hawkeye **before** writing code.
45
+
46
+ ### 2. Slice the story into micro-cycles
47
+
48
+ Each cycle is one AC (or part of one) and produces a green test + small code change. Don't try to ship the whole story in one commit.
49
+
50
+ ### 3. Red
51
+
52
+ Write the failing test first. Match the assertion shape in `design.md`. Don't write code yet.
53
+
54
+ ```ts
55
+ // red — first run, fails
56
+ test('valid email returns ok', () => {
57
+ expect(validateInviteEmail('a@b.co')).toEqual({ ok: true });
58
+ });
59
+ ```
60
+
61
+ ### 4. Green
62
+
63
+ Before writing anything new, run Shuri's reuse ladder (see `wize-agent-dev` persona): does this need to exist → already in the codebase → stdlib → native/framework feature → installed dependency → one-liner → only then new code. Write the **minimum** code that turns the test green. No anticipated branches; no "just-in-case" handling.
64
+
65
+ ```ts
66
+ // green — minimum to pass
67
+ export const validateInviteEmail = (s: string) => ({ ok: /@/.test(s) });
68
+ ```
69
+
70
+ ### 5. Refactor
71
+
72
+ Now harden, with the test as safety net.
73
+
74
+ ```ts
75
+ // refactor — same green tests, real logic
76
+ import { z } from 'zod';
77
+ const schema = z.string().email();
78
+ export const validateInviteEmail = (s: string) =>
79
+ schema.safeParse(s).success ? { ok: true } : { ok: false, code: 'invalid_format', field: 'email' };
80
+ ```
81
+
82
+ ### 6. Commit
83
+
84
+ Conventional commits, AC IDs referenced.
85
+
86
+ ```
87
+ feat(invite): validate email per AC-02-1 / AC-02-2
88
+ - add validateInviteEmail with zod
89
+ - add 4 unit tests covering valid + invalid rules
90
+ ```
91
+
92
+ ### 7. Repeat
93
+
94
+ Until every AC has at least one test + minimum code that makes it pass.
95
+
96
+ ### 7.5. Loop verification (auto-check)
97
+
98
+ Before declaring the loop done, run these checks:
99
+
100
+ | Check | How | Fail → |
101
+ |---|---|---|
102
+ | **Evidence of iteration** | `git log --oneline` shows ≥2 commits with AC IDs (skip if story has only 1 AC) | Return to step 2 |
103
+ | **AC-to-test mapping** | Every AC in the story file has a corresponding test case name | Return to step 3 (Red) |
104
+ | **All AC tests green** | `npx vitest run --reporter=verbose` (or equivalent) — grep output for each AC's test name | Return to step 4 (Green) |
105
+
106
+ **Max-cycles guard.** If the same AC cycles through Red→Green→Refactor 3+ times without staying green, stop and escalate to Wizer: the test design may be wrong, the AC may be mis-sized, or the approach may need Tony.
107
+
108
+ ### 8. Knowledge update (inline, ~60s)
109
+
110
+ Before opening the PR, ask: **did this story touch any of the 5 baseline axes** documented in `.wize/knowledge/document-project/`?
111
+
112
+ | Axis | Touched when… | File to update |
113
+ |---|---|---|
114
+ | **Architecture** | new component, new sequence, changed data flow | `architecture-snapshot.md` |
115
+ | **Conventions** | new naming/folder/test pattern published as public contract (incl. `testid`) | `conventions.md` |
116
+ | **Risk-spots** | introduced a complexity hot spot OR resolved one | `risk-spots.md` |
117
+ | **Dependencies** | added / removed / upgraded a runtime dep | `dependencies.md` |
118
+ | **Overview** | new user-visible feature a new dev should know about | `overview.md` |
119
+
120
+ If yes for any axis: open the file and add **1–3 lines** under a new dated bullet — in the same PR.
121
+
122
+ ```markdown
123
+ ## 2026-06-12 — E01-S03
124
+ - Conventions: `data-testid="invite-*"` published as public contract; Hawkeye E2E depends on these.
125
+ - Risk: R-1 (mailer) mitigation now confirmed (integration test covers retry policy).
126
+ ```
127
+
128
+ If no axis was touched, you skip this step entirely — quick-dev-style changes don't need it. Hawkeye will check whether the call was correct in `tea-review`. A story that touched an axis but skipped the update gets a `KN-NN` finding in the gate (recommendation `CONCERNS` advisory, or `FAIL` enforcing).
129
+
130
+ This is how the brownfield baseline stays alive instead of going stale 6 months in.
131
+
132
+ ### 9. Pre-PR self-check
133
+
134
+ - All Hawkeye-declared tests exist + pass — **AC → test mapping complete**, every AC traced to a named passing test.
135
+ - Required checks run: unit + integration + e2e (as the test contract declares), lint, format, type-check, build — and security when the story touches auth/payments/boundaries. If a command couldn't run, say **exactly which and why** — don't silently drop it.
136
+ - No `test.skip` / `.only` left.
137
+ - Authz enforced at every server boundary the story adds.
138
+ - Loading / empty / error states rendered and asserted.
139
+ - `data-testid` matches story's "notes for Hawkeye".
140
+ - Story file frontmatter → `status: ready-for-review`.
141
+ - Self-walk the screen (web) or smoke a tab on simulator (app).
142
+
143
+ ### 10. Open PR
144
+
145
+ PR description includes:
146
+ - Story link.
147
+ - AC list with the test names that cover them.
148
+ - Screenshots / recordings of happy + failure paths.
149
+ - Knowledge update line (`Touched axis: <none|architecture|conventions|risk-spots|dependencies|overview>`).
150
+ - TEA expected next: design → trace → review → gate.
151
+
152
+ ### 11. Address gate findings
153
+
154
+ If `tea-review` or `tea-gate` flags issues, fix them in the same PR or open a follow-up if the story has shipped a separate value-bearing slice.
155
+
156
+ **Loop-back protocol:**
157
+ 1. Read each finding's `severity` and `blocking` flag.
158
+ 2. For each `blocking: true` finding → return to step 3 (Red) for the affected AC.
159
+ 3. For each `blocking: false` finding → log in story `notes` and fix in same PR before re-submitting to gate.
160
+ 4. **Max-retry guard:** if the same story cycles through gate → fix → gate 3+ times, stop and escalate to Wizer. The story may be mis-sized, the test design may be wrong, or the ACs may need renegotiation with Hill.
161
+
162
+ ## Security + perf during implementation
163
+
164
+ Shuri thinks both at write time, not at review time:
165
+
166
+ - Auth context on every server entry point — confirm via Tony's middleware pattern.
167
+ - Tokens never logged.
168
+ - Inputs validated at the boundary; trusted by the time they reach domain.
169
+ - Network calls in handlers wrapped with timeout + retry policy from architecture.
170
+ - Don't `await` in a loop without batching.
171
+ - Don't ship dead code (`isFooEnabled = true` always).
31
172
 
32
173
  ## Quick-dev exception
33
- If invoked via `wize-quick-dev`, the design step is replaced by smoke-test-only commitment.
174
+
175
+ If the work is small / well-scoped and Wizer invoked `wize-quick-dev` instead of this workflow, the design step is replaced by smoke-test-only commitment and the gate is a single one-line entry in `quick-dev-log.md`.
176
+
177
+ ## Anti-patterns Shuri rejects in her own work
178
+
179
+ - Writing code first and tests "after the bug fix" — that's not TDD; that's regression-tests.
180
+ - Commits that don't cite an AC.
181
+ - "Refactor while green" turning into "rewrite while green."
182
+ - Bundling cross-cutting refactors into the story PR. Split.
183
+ - Editing tests so they pass instead of editing code so tests pass.
184
+
185
+ ## Final report
186
+
187
+ When the story is done, report to the thread in this shape — decisions, evidence, results, blockers only; no extended private reasoning:
188
+
189
+ 1. **Route used** — full lifecycle (dev-story).
190
+ 2. **Solution summary** — what changed and why, in a few lines.
191
+ 3. **Files changed.**
192
+ 4. **AC → test mapping** — each AC and the passing test that covers it.
193
+ 5. **Commands run + results** — the real checks and their outcomes; name any that couldn't run and why.
194
+ 6. **`.wize/` artifacts updated** — story status, TEA artifacts, knowledge axes.
195
+ 7. **Relevant decisions** — including any ADR if architectural.
196
+ 8. **Residual risks / limitations / skipped items** — including recommended extras logged separately (no silent scope creep).
197
+ 9. **Single recommended next action** — usually the TEA gate.
198
+
199
+ ## Hand-off
200
+
201
+ > Story E01-S03 implemented. All ACs covered by tests; CI green. PR opened (#412). Hawkeye, ready for trace + review. Notes section of the story has the testid map you'll use.