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.
- package/AGENTS.md +37 -0
- package/ARCH.md +77 -24
- package/CHANGELOG.md +14 -0
- package/DECISIONS.md +27 -1
- package/README.es.md +296 -0
- package/README.md +3 -2
- package/README.pt-BR.md +294 -0
- package/ROSTER.md +11 -3
- package/adapters/README.md +9 -7
- package/adapters/antigravity/README.md +5 -5
- package/adapters/claude-code/README.md +1 -1
- package/adapters/codex/README.md +5 -5
- package/adapters/codex/adapter.yaml +1 -1
- package/adapters/codex/render.js +1 -1
- package/adapters/continue/README.md +5 -5
- package/adapters/cursor/README.md +2 -2
- package/adapters/generic/README.md +1 -1
- package/adapters/hermes/README.md +23 -0
- package/adapters/hermes/adapter.yaml +8 -0
- package/adapters/hermes/render.js +17 -0
- package/adapters/kimi-code/README.md +5 -5
- package/adapters/kimi-code/render.js +2 -2
- package/adapters/kiro/README.md +30 -0
- package/adapters/kiro/adapter.yaml +8 -0
- package/adapters/kiro/render.js +21 -0
- package/adapters/opencode/README.md +3 -3
- package/adapters/opencode/render.js +27 -1
- package/adapters/windsurf/README.md +3 -3
- package/docs/harnesses/antigravity.md +20 -0
- package/docs/harnesses/antigravity.pt-BR.md +20 -0
- package/docs/harnesses/claude-code.md +23 -0
- package/docs/harnesses/claude-code.pt-BR.md +23 -0
- package/docs/harnesses/codex.md +21 -0
- package/docs/harnesses/codex.pt-BR.md +21 -0
- package/docs/harnesses/continue.md +21 -0
- package/docs/harnesses/continue.pt-BR.md +21 -0
- package/docs/harnesses/cursor.md +22 -0
- package/docs/harnesses/cursor.pt-BR.md +22 -0
- package/docs/harnesses/generic.md +20 -0
- package/docs/harnesses/generic.pt-BR.md +20 -0
- package/docs/harnesses/hermes.md +26 -0
- package/docs/harnesses/hermes.pt-BR.md +26 -0
- package/docs/harnesses/kimi-code.md +19 -0
- package/docs/harnesses/kimi-code.pt-BR.md +19 -0
- package/docs/harnesses/kiro.md +26 -0
- package/docs/harnesses/kiro.pt-BR.md +26 -0
- package/docs/harnesses/opencode.md +31 -0
- package/docs/harnesses/opencode.pt-BR.md +31 -0
- package/docs/harnesses/windsurf.md +22 -0
- package/docs/harnesses/windsurf.pt-BR.md +22 -0
- package/package.json +1 -1
- package/schemas/agent.schema.json +2 -2
- package/schemas/workflow.schema.json +1 -1
- package/src/app-overlay/wize-app-release-channels/workflow.md +2 -0
- package/src/app-overlay/wize-app-scaffold/workflow.md +2 -0
- package/src/app-overlay/wize-app-store-listing/workflow.md +2 -0
- package/src/builder-skills/wize-create-agent/workflow.md +2 -0
- package/src/builder-skills/wize-create-skill/workflow.md +2 -0
- package/src/builder-skills/wize-create-workflow/workflow.md +2 -0
- package/src/core-skills/wize-advanced-elicitation/skill.md +2 -0
- package/src/core-skills/wize-brainstorming/skill.md +2 -0
- package/src/core-skills/wize-customize/skill.md +116 -0
- package/src/core-skills/wize-editorial-review-prose/skill.md +94 -0
- package/src/core-skills/wize-editorial-review-structure/skill.md +99 -0
- package/src/core-skills/wize-grill/skill.md +77 -0
- package/src/core-skills/wize-index-docs/skill.md +119 -0
- package/src/core-skills/wize-pre-pr-check/skill.md +134 -0
- package/src/core-skills/wize-review-adversarial/skill.md +3 -0
- package/src/core-skills/wize-review-edge-case-hunter/skill.md +115 -0
- package/src/core-skills/wize-shard-doc/skill.md +2 -0
- package/src/core-skills/wize-spec/assets/headless-schemas.md +39 -0
- package/src/core-skills/wize-spec/assets/spec-template.md +40 -0
- package/src/core-skills/wize-spec/customize.toml +20 -0
- package/src/core-skills/wize-spec/skill.md +112 -0
- package/src/method-skills/1-analysis/wize-agent-analyst/agent.yaml +3 -0
- package/src/method-skills/1-analysis/wize-document-project/documentation-requirements.csv +12 -0
- package/src/method-skills/1-analysis/wize-document-project/templates/api-contracts-template.md +38 -0
- package/src/method-skills/1-analysis/wize-document-project/templates/architecture-template.md +54 -0
- package/src/method-skills/1-analysis/wize-document-project/templates/component-inventory-template.md +40 -0
- package/src/method-skills/1-analysis/wize-document-project/templates/contribution-guide-template.md +34 -0
- package/src/method-skills/1-analysis/wize-document-project/templates/data-models-template.md +36 -0
- package/src/method-skills/1-analysis/wize-document-project/templates/deep-dive-template.md +312 -0
- package/src/method-skills/1-analysis/wize-document-project/templates/deployment-guide-template.md +42 -0
- package/src/method-skills/1-analysis/wize-document-project/templates/development-guide-template.md +61 -0
- package/src/method-skills/1-analysis/wize-document-project/templates/index-template.md +185 -0
- package/src/method-skills/1-analysis/wize-document-project/templates/project-overview-template.md +110 -0
- package/src/method-skills/1-analysis/wize-document-project/templates/project-scan-report-schema.json +159 -0
- package/src/method-skills/1-analysis/wize-document-project/templates/source-tree-template.md +142 -0
- package/src/method-skills/1-analysis/wize-document-project/workflow.md +213 -20
- package/src/method-skills/1-analysis/wize-domain-research/customize.toml +14 -0
- package/src/method-skills/1-analysis/wize-domain-research/domain-steps/step-01-init.md +49 -0
- package/src/method-skills/1-analysis/wize-domain-research/domain-steps/step-02-domain-analysis.md +39 -0
- package/src/method-skills/1-analysis/wize-domain-research/domain-steps/step-03-competitive-landscape.md +39 -0
- package/src/method-skills/1-analysis/wize-domain-research/domain-steps/step-04-regulatory-focus.md +39 -0
- package/src/method-skills/1-analysis/wize-domain-research/domain-steps/step-05-technical-trends.md +39 -0
- package/src/method-skills/1-analysis/wize-domain-research/domain-steps/step-06-research-synthesis.md +43 -0
- package/src/method-skills/1-analysis/wize-domain-research/research.template.md +31 -0
- package/src/method-skills/1-analysis/wize-domain-research/workflow.md +58 -0
- package/src/method-skills/1-analysis/wize-market-research/customize.toml +14 -0
- package/src/method-skills/1-analysis/wize-market-research/research.template.md +31 -0
- package/src/method-skills/1-analysis/wize-market-research/steps/step-01-init.md +57 -0
- package/src/method-skills/1-analysis/wize-market-research/steps/step-02-customer-behavior.md +39 -0
- package/src/method-skills/1-analysis/wize-market-research/steps/step-03-customer-pain-points.md +37 -0
- package/src/method-skills/1-analysis/wize-market-research/steps/step-04-customer-decisions.md +39 -0
- package/src/method-skills/1-analysis/wize-market-research/steps/step-05-competitive-analysis.md +37 -0
- package/src/method-skills/1-analysis/wize-market-research/steps/step-06-research-completion.md +47 -0
- package/src/method-skills/1-analysis/wize-market-research/workflow.md +66 -0
- package/src/method-skills/1-analysis/wize-prfaq/workflow.md +152 -11
- package/src/method-skills/1-analysis/wize-product-brief/workflow.md +92 -19
- package/src/method-skills/1-analysis/wize-refresh-knowledge/workflow.md +129 -0
- package/src/method-skills/1-analysis/wize-research/workflow.md +39 -12
- package/src/method-skills/1-analysis/wize-technical-research/customize.toml +14 -0
- package/src/method-skills/1-analysis/wize-technical-research/research.template.md +31 -0
- package/src/method-skills/1-analysis/wize-technical-research/technical-steps/step-01-init.md +49 -0
- package/src/method-skills/1-analysis/wize-technical-research/technical-steps/step-02-technical-overview.md +45 -0
- package/src/method-skills/1-analysis/wize-technical-research/technical-steps/step-03-integration-patterns.md +39 -0
- package/src/method-skills/1-analysis/wize-technical-research/technical-steps/step-04-architectural-patterns.md +39 -0
- package/src/method-skills/1-analysis/wize-technical-research/technical-steps/step-05-implementation-research.md +42 -0
- package/src/method-skills/1-analysis/wize-technical-research/technical-steps/step-06-research-synthesis.md +46 -0
- package/src/method-skills/1-analysis/wize-technical-research/workflow.md +60 -0
- package/src/method-skills/1-analysis/wize-trigger-map/workflow.md +82 -16
- package/src/method-skills/2-plan-workflows/wize-create-prd/workflow.md +135 -23
- package/src/method-skills/2-plan-workflows/wize-edit-prd/workflow.md +110 -0
- package/src/method-skills/2-plan-workflows/wize-ux-design/workflow.md +134 -28
- package/src/method-skills/2-plan-workflows/wize-ux-scenarios/workflow.md +93 -15
- package/src/method-skills/2-plan-workflows/wize-validate-prd/workflow.md +108 -12
- package/src/method-skills/3-solutioning/wize-check-implementation-readiness/workflow.md +103 -11
- package/src/method-skills/3-solutioning/wize-create-architecture/architecture-decision-template.md +41 -0
- package/src/method-skills/3-solutioning/wize-create-architecture/customize.toml +20 -0
- package/src/method-skills/3-solutioning/wize-create-architecture/steps/step-01-init.md +95 -0
- package/src/method-skills/3-solutioning/wize-create-architecture/steps/step-01b-continue.md +32 -0
- package/src/method-skills/3-solutioning/wize-create-architecture/steps/step-02-context.md +126 -0
- package/src/method-skills/3-solutioning/wize-create-architecture/steps/step-03-starter.md +110 -0
- package/src/method-skills/3-solutioning/wize-create-architecture/steps/step-04-decisions.md +129 -0
- package/src/method-skills/3-solutioning/wize-create-architecture/steps/step-05-patterns.md +109 -0
- package/src/method-skills/3-solutioning/wize-create-architecture/steps/step-06-structure.md +97 -0
- package/src/method-skills/3-solutioning/wize-create-architecture/steps/step-07-validation.md +124 -0
- package/src/method-skills/3-solutioning/wize-create-architecture/steps/step-08-complete.md +59 -0
- package/src/method-skills/3-solutioning/wize-create-architecture/workflow.md +55 -48
- package/src/method-skills/3-solutioning/wize-create-epics-and-stories/workflow.md +154 -15
- package/src/method-skills/3-solutioning/wize-design-system/workflow.md +184 -22
- package/src/method-skills/3-solutioning/wize-nfr-principles/workflow.md +145 -17
- package/src/method-skills/3-solutioning/wize-project-context/workflow.md +120 -0
- package/src/method-skills/3-solutioning/wize-tech-vision/workflow.md +130 -22
- package/src/method-skills/4-implementation/wize-agent-dev/persona.md +12 -0
- package/src/method-skills/4-implementation/wize-changelog/workflow.md +184 -0
- package/src/method-skills/4-implementation/wize-checkpoint-preview/workflow.md +117 -0
- package/src/method-skills/4-implementation/wize-code-review/customize.toml +21 -0
- package/src/method-skills/4-implementation/wize-code-review/steps/step-01-gather-context.md +64 -0
- package/src/method-skills/4-implementation/wize-code-review/steps/step-02-review.md +40 -0
- package/src/method-skills/4-implementation/wize-code-review/steps/step-03-triage.md +43 -0
- package/src/method-skills/4-implementation/wize-code-review/steps/step-04-present.md +100 -0
- package/src/method-skills/4-implementation/wize-code-review/workflow.md +54 -12
- package/src/method-skills/4-implementation/wize-correct-course/workflow.md +93 -0
- package/src/method-skills/4-implementation/wize-create-story/workflow.md +154 -10
- package/src/method-skills/4-implementation/wize-dev-story/workflow.md +185 -17
- package/src/method-skills/4-implementation/wize-investigate/workflow.md +123 -0
- package/src/method-skills/4-implementation/wize-quick-dev/workflow.md +136 -18
- package/src/method-skills/4-implementation/wize-release/workflow.md +162 -0
- package/src/method-skills/4-implementation/wize-retrospective/workflow.md +114 -10
- package/src/method-skills/4-implementation/wize-sprint-planning/workflow.md +78 -11
- package/src/method-skills/4-implementation/wize-sprint-status/workflow.md +45 -11
- package/src/method-skills/module.yaml +28 -0
- package/src/orchestrator-skills/module.yaml +7 -1
- package/src/orchestrator-skills/wize/skill.md +164 -0
- package/src/orchestrator-skills/wize-check/skill.md +98 -0
- package/src/orchestrator-skills/wize-help/skill.md +227 -67
- package/src/orchestrator-skills/wize-onboarding/workflow.md +78 -14
- package/src/orchestrator-skills/wize-orchestrator/agent.yaml +2 -0
- package/src/orchestrator-skills/wize-orchestrator/persona.md +44 -3
- package/src/orchestrator-skills/wize-party-mode/workflow.md +2 -0
- package/src/security-overlay/_shared/allowlist.js +154 -0
- package/src/security-overlay/_shared/backlog.js +169 -0
- package/src/security-overlay/_shared/cli-runner.js +87 -0
- package/src/security-overlay/_shared/cvss.js +108 -0
- package/src/security-overlay/_shared/detect.js +125 -0
- package/src/security-overlay/_shared/install-script.js +205 -0
- package/src/security-overlay/_shared/invoke-phase.js +86 -0
- package/src/security-overlay/_shared/owasp.js +56 -0
- package/src/security-overlay/_shared/partial.js +225 -0
- package/src/security-overlay/_shared/preflight.js +175 -0
- package/src/security-overlay/_shared/scope-gate.js +172 -0
- package/src/security-overlay/_shared/scope-parser.js +147 -0
- package/src/security-overlay/agents/red-teamer/agent.yaml +54 -0
- package/src/security-overlay/agents/red-teamer/persona.md +49 -0
- package/src/security-overlay/data/common.txt +115 -0
- package/src/security-overlay/data/owasp-top10.json +15 -0
- package/src/security-overlay/data/tool-allowlist.json +31 -0
- package/src/security-overlay/skills/wize-sec-enumerate/scripts/run-enumerate.js +180 -0
- package/src/security-overlay/skills/wize-sec-enumerate/skill.md +34 -0
- package/src/security-overlay/skills/wize-sec-exploit/data/common.txt +117 -0
- package/src/security-overlay/skills/wize-sec-exploit/scripts/run-ffuf.js +147 -0
- package/src/security-overlay/skills/wize-sec-exploit/scripts/run-nikto.js +145 -0
- package/src/security-overlay/skills/wize-sec-exploit/scripts/run-nuclei.js +176 -0
- package/src/security-overlay/skills/wize-sec-exploit/scripts/run-sqlmap.js +139 -0
- package/src/security-overlay/skills/wize-sec-pentest/scripts/run-pipeline.js +184 -0
- package/src/security-overlay/skills/wize-sec-pentest/skill.md +54 -0
- package/src/security-overlay/skills/wize-sec-recon/scripts/run-gitleaks.js +139 -0
- package/src/security-overlay/skills/wize-sec-recon/scripts/run-osv.js +227 -0
- package/src/security-overlay/skills/wize-sec-recon/scripts/run-recon.js +162 -0
- package/src/security-overlay/skills/wize-sec-recon/skill.md +37 -0
- package/src/security-overlay/skills/wize-sec-report/scripts/render-report.js +1033 -0
- package/src/security-overlay/skills/wize-sec-scope/scripts/generate-scope.js +106 -0
- package/src/security-overlay/skills/wize-sec-scope/skill.md +52 -0
- package/src/tea-skills/wize-qa-generate-e2e-tests/workflow.md +121 -0
- package/src/tea-skills/wize-tea-design/workflow.md +107 -13
- package/src/tea-skills/wize-tea-gate/workflow.md +118 -25
- package/src/tea-skills/wize-tea-nfr/workflow.md +107 -14
- package/src/tea-skills/wize-tea-review/workflow.md +123 -13
- package/src/tea-skills/wize-tea-risk/workflow.md +113 -10
- package/src/tea-skills/wize-tea-trace/workflow.md +86 -12
- package/src/web-overlay/wize-web-deploy/workflow.md +2 -0
- package/src/web-overlay/wize-web-scaffold/workflow.md +2 -0
- package/src/web-overlay/wize-web-seo-audit/workflow.md +2 -0
- package/tools/check-eli5-all-adapters.js +3 -2
- package/tools/installer/baseline.js +138 -0
- package/tools/installer/commands/agent.js +197 -0
- package/tools/installer/commands/doctor.js +321 -0
- package/tools/installer/commands/document-project.js +93 -0
- package/tools/installer/commands/sync.js +45 -0
- package/tools/installer/commands/update.js +172 -0
- package/tools/installer/document-project/batch-scanner.js +93 -0
- package/tools/installer/document-project/classify.js +170 -0
- package/tools/installer/document-project/modes/deep-dive.js +196 -0
- package/tools/installer/document-project/modes/full-rescan.js +15 -0
- package/tools/installer/document-project/modes/initial-scan.js +100 -0
- package/tools/installer/document-project/modes/quick.js +211 -0
- package/tools/installer/document-project/render-index.js +101 -0
- package/tools/installer/document-project/state.js +110 -0
- package/tools/installer/onboarding.js +14 -20
- package/tools/installer/render-shared.js +159 -15
- package/tools/installer/setup-helpers.js +2 -0
- package/tools/installer/validators/run-all.js +3 -2
- package/tools/installer/version-check.js +117 -0
- package/tools/installer/wize-cli.js +501 -70
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
---
|
|
2
|
+
diff_output: ''
|
|
3
|
+
spec_file: ''
|
|
4
|
+
review_mode: ''
|
|
5
|
+
story_key: ''
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Step 1: Gather Context
|
|
9
|
+
|
|
10
|
+
## Rules
|
|
11
|
+
|
|
12
|
+
- Speak in `{communication_language}`.
|
|
13
|
+
- The prompt that triggered this workflow IS the intent.
|
|
14
|
+
- Do not modify any files in this step. Read-only.
|
|
15
|
+
|
|
16
|
+
## Instructions
|
|
17
|
+
|
|
18
|
+
1. **Find the review target.** Check in this order and stop as soon as the target is identified:
|
|
19
|
+
|
|
20
|
+
**Tier 1 — Explicit argument.**
|
|
21
|
+
Did the user pass a PR, commit SHA, branch, spec file, or diff source?
|
|
22
|
+
- PR reference → resolve to branch/commit via `gh pr view`.
|
|
23
|
+
- Commit or branch → use directly.
|
|
24
|
+
- Spec file → set `{spec_file}` to the path. Check its frontmatter for `baseline_commit`.
|
|
25
|
+
- Diff-mode keywords: `staged`, `uncommitted`, `branch diff`, `commit range`, `this diff`.
|
|
26
|
+
|
|
27
|
+
**Tier 2 — Recent conversation.**
|
|
28
|
+
Look for refs in the last few messages.
|
|
29
|
+
|
|
30
|
+
**Tier 3 — Sprint tracking.**
|
|
31
|
+
Look for `*sprint-status*` files and find stories with status `review`.
|
|
32
|
+
|
|
33
|
+
**Tier 4 — Current git state.**
|
|
34
|
+
If not on the default branch, confirm whether to review the current branch.
|
|
35
|
+
|
|
36
|
+
**Tier 5 — Ask.**
|
|
37
|
+
Present options: uncommitted changes, staged changes, branch diff, commit range, provided diff.
|
|
38
|
+
|
|
39
|
+
2. **Construct `{diff_output}`.**
|
|
40
|
+
- Staged only: `git diff --cached`
|
|
41
|
+
- Uncommitted: `git diff HEAD`
|
|
42
|
+
- Branch diff: `git diff <base>..<branch>`
|
|
43
|
+
- Commit range: `git diff <from>..<to>`
|
|
44
|
+
- Provided diff: validate and use verbatim
|
|
45
|
+
- File list: `git diff HEAD -- <files...>`, with untracked files included via `git diff --no-index /dev/null <path>`
|
|
46
|
+
|
|
47
|
+
If `{diff_output}` is empty, halt and say so.
|
|
48
|
+
|
|
49
|
+
3. **Set the spec context.**
|
|
50
|
+
- If `{spec_file}` is set and readable, set `{review_mode}` = `"full"`.
|
|
51
|
+
- Otherwise ask: "Is there a spec or story file that provides context for these changes?"
|
|
52
|
+
- Yes → set `{spec_file}`, verify it, set `{review_mode}` = `"full"`.
|
|
53
|
+
- No → set `{review_mode}` = `"no-spec"`.
|
|
54
|
+
|
|
55
|
+
4. **Sanity check.**
|
|
56
|
+
If the diff exceeds ~3000 lines, warn and offer to chunk.
|
|
57
|
+
|
|
58
|
+
### Checkpoint
|
|
59
|
+
|
|
60
|
+
Present a summary: diff stats, `{review_mode}`, loaded spec/context docs. Halt and wait for confirmation to proceed.
|
|
61
|
+
|
|
62
|
+
## Next
|
|
63
|
+
|
|
64
|
+
Read fully and follow `./step-02-review.md`.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
failed_layers: ''
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Step 2: Review
|
|
6
|
+
|
|
7
|
+
## Rules
|
|
8
|
+
|
|
9
|
+
- Speak in `{communication_language}`.
|
|
10
|
+
- The Blind Hunter subagent receives **only** the diff — no project context.
|
|
11
|
+
- The Edge Case Hunter subagent receives the diff and project read access.
|
|
12
|
+
- The Acceptance Auditor subagent receives the diff, spec, and context docs.
|
|
13
|
+
- All review subagents run at the same model capability as the current session.
|
|
14
|
+
|
|
15
|
+
## Instructions
|
|
16
|
+
|
|
17
|
+
This step is an instance of Wizer's subagent fan-out pattern (see `wize-orchestrator` persona): name, scope, dispatch on whatever the current harness natively supports, tolerate partial failure.
|
|
18
|
+
|
|
19
|
+
1. If `{review_mode}` = `"no-spec"`, note: "Acceptance Auditor skipped — no spec file provided."
|
|
20
|
+
|
|
21
|
+
2. Launch parallel subagents without conversation context:
|
|
22
|
+
|
|
23
|
+
- **Blind Hunter** — receives `{diff_output}` only. Invoke via `wize-review-adversarial`.
|
|
24
|
+
Prompt: "Review this diff cynically. Assume problems exist. Find at least ten issues. Output as a Markdown list with one-line titles."
|
|
25
|
+
|
|
26
|
+
- **Edge Case Hunter** — receives `{diff_output}` and read access to the project. Invoke via `wize-review-edge-case-hunter`.
|
|
27
|
+
Prompt: "Walk every branching path and boundary condition in this diff. Report only unhandled edge cases as a JSON array."
|
|
28
|
+
|
|
29
|
+
- **Acceptance Auditor** (only if `{review_mode}` = `"full"`) — receives `{diff_output}`, `{spec_file}` content, and context docs.
|
|
30
|
+
Prompt: "Review this diff against the spec. Check for violations of acceptance criteria, deviations from spec intent, and missing behavior. Output findings as a Markdown list with AC/constraint reference and evidence."
|
|
31
|
+
|
|
32
|
+
3. If subagents are unavailable, generate prompt files in `{implementation_artifacts}` and halt, asking the user to run each in a separate session.
|
|
33
|
+
|
|
34
|
+
4. If any subagent fails, times out, or returns empty, append the layer name to `{failed_layers}` and proceed with findings from the remaining layers.
|
|
35
|
+
|
|
36
|
+
5. Collect all findings from completed layers.
|
|
37
|
+
|
|
38
|
+
## Next
|
|
39
|
+
|
|
40
|
+
Read fully and follow `./step-03-triage.md`.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Step 3: Triage
|
|
2
|
+
|
|
3
|
+
## Rules
|
|
4
|
+
|
|
5
|
+
- Speak in `{communication_language}`.
|
|
6
|
+
- Be precise. When uncertain between categories, prefer the more conservative classification.
|
|
7
|
+
|
|
8
|
+
## Instructions
|
|
9
|
+
|
|
10
|
+
1. **Normalize** findings into a common format. Expected input formats:
|
|
11
|
+
- Blind Hunter: Markdown list of descriptions.
|
|
12
|
+
- Edge Case Hunter: JSON array with `location`, `trigger_condition`, `guard_snippet`, `potential_consequence`.
|
|
13
|
+
- Acceptance Auditor: Markdown list with title, AC/constraint reference, and evidence.
|
|
14
|
+
|
|
15
|
+
Convert all to a unified list with:
|
|
16
|
+
- `id` — sequential integer
|
|
17
|
+
- `source` — `blind`, `edge`, `auditor`, or merged (`blind+edge`, etc.)
|
|
18
|
+
- `title` — one-line summary
|
|
19
|
+
- `detail` — full description
|
|
20
|
+
- `location` — file and line reference if available
|
|
21
|
+
|
|
22
|
+
2. **Deduplicate.** Merge findings that describe the same issue:
|
|
23
|
+
- Use the most specific finding as the base (prefer Edge Case Hunter JSON with location).
|
|
24
|
+
- Append unique detail, reasoning, or locations from other findings.
|
|
25
|
+
- Set `source` to merged sources.
|
|
26
|
+
|
|
27
|
+
3. **Classify** each finding into exactly one bucket:
|
|
28
|
+
- **decision_needed** — ambiguous choice requiring human input. Only possible if `{review_mode}` = `"full"`.
|
|
29
|
+
- **patch** — code issue fixable without human input.
|
|
30
|
+
- **defer** — pre-existing issue not caused by this change.
|
|
31
|
+
- **dismiss** — noise, false positive, or handled elsewhere.
|
|
32
|
+
|
|
33
|
+
If `{review_mode}` = `"no-spec"` and a finding would be `decision_needed`, reclassify as `patch` or `defer`.
|
|
34
|
+
|
|
35
|
+
4. **Drop** all `dismiss` findings. Record the dismiss count.
|
|
36
|
+
|
|
37
|
+
5. If `{failed_layers}` is non-empty, report which layers failed. If zero findings remain and layers failed, warn the user that the review may be incomplete.
|
|
38
|
+
|
|
39
|
+
6. If zero findings remain after triage, state: "✅ Clean review — all layers passed."
|
|
40
|
+
|
|
41
|
+
## Next
|
|
42
|
+
|
|
43
|
+
Read fully and follow `./step-04-present.md`.
|
|
@@ -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
|
|
6
|
-
status:
|
|
7
|
+
owner: wize-agent-dev # Shuri (peer review)
|
|
8
|
+
status: ready
|
|
7
9
|
---
|
|
8
10
|
|
|
9
11
|
# Code Review
|
|
10
12
|
|
|
11
|
-
**Goal.**
|
|
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
|
-
##
|
|
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
|
-
|
|
21
|
-
-
|
|
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
|
-
|
|
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:
|
|
8
|
+
status: ready
|
|
7
9
|
---
|
|
8
10
|
|
|
9
11
|
# Create Story
|
|
10
12
|
|
|
11
|
-
**Goal.** Author one Pull-Request-sized story
|
|
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
|
-
- (
|
|
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
|
-
##
|
|
22
|
-
|
|
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
|
-
|
|
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.
|