wize-dev-kit 0.4.0 → 0.5.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.
@@ -0,0 +1,108 @@
1
+ ---
2
+ code: wize-edit-prd
3
+ name: Edit PRD
4
+ phase: 2-plan-workflows
5
+ owner: wize-agent-pm # Maria Hill
6
+ status: ready
7
+ ---
8
+
9
+ # Edit PRD
10
+
11
+ **Goal.** Update `.wize/planning/prd.md` without rewriting from scratch. Every change is recorded in `.wize/planning/prd-changelog.md` so the team can see *what* changed, *when*, *why*, and *by whom*.
12
+
13
+ Maria Hill drives. Peggy polishes prose on the diff. Wizer is on call for cross-cutting impacts (architecture, NFR, scope).
14
+
15
+ ## When to run
16
+
17
+ - A new AC is needed (new requirement from the user, market shift, regulator).
18
+ - An AC is no longer correct (validated learning, scoping mistake).
19
+ - An item moves in-scope ↔ out-of-scope.
20
+ - A non-goal is added or removed.
21
+ - A new decision is made that affects the PRD (e.g., cut a feature).
22
+
23
+ ## When NOT to run
24
+
25
+ - Rewriting the PRD from scratch → use `/wize-create-prd`.
26
+ - Validating the PRD → use `/wize-validate-prd`.
27
+
28
+ ## Inputs
29
+
30
+ - `.wize/planning/prd.md` (current)
31
+ - A free-form change request from the user.
32
+
33
+ ## Output
34
+
35
+ - Updated `.wize/planning/prd.md`.
36
+ - New row in `.wize/planning/prd-changelog.md` (one row per change).
37
+
38
+ ## Steps
39
+
40
+ ### 1. Read the current PRD
41
+
42
+ Parse the PRD frontmatter (`status`, `owner`, `created`, `last_updated`) and the body. Confirm the change is in scope of "edit" (not a rewrite). If the change touches > 25% of the PRD, route to `/wize-create-prd` instead.
43
+
44
+ ### 2. Classify the edit
45
+
46
+ Pick exactly one type:
47
+
48
+ - **A** — Add or change an AC.
49
+ - **B** — Move item in-scope ↔ out-of-scope.
50
+ - **C** — Add or remove a non-goal.
51
+ - **D** — Register a decision that affects the PRD (link to ADR or sprint decision).
52
+
53
+ One edit per run. Re-run for additional edits.
54
+
55
+ ### 3. Apply the edit
56
+
57
+ Make the change in `prd.md`. Mark the changed section with a trailing note: `(edited 2026-06-15, see changelog row 4)`.
58
+
59
+ Update frontmatter: `last_updated` to today; `status` stays the same (only `/wize-validate-prd` flips it to `validated`).
60
+
61
+ ### 4. Append to changelog
62
+
63
+ Add a row to `prd-changelog.md`:
64
+
65
+ ```markdown
66
+ | Date | Type | Section | Change | Author |
67
+ |---|---|---|---|---|
68
+ | 2026-06-15 | A | AC-04-2 | Added: "rate limit per team" | Hill |
69
+ | 2026-06-15 | B | Out of scope | Removed "bulk invite" (now in scope per E04-S02) | Hill |
70
+ ```
71
+
72
+ ### 5. Cross-cutting check
73
+
74
+ Wizer flags any downstream impact:
75
+
76
+ - New AC → check that the epic + stories covering it exist. If not, route to `/wize-create-epics-and-stories`.
77
+ - New non-goal → check that no in-flight story assumes the opposite. If yes, flag the story.
78
+ - In-scope move → trigger a fresh `/wize-sprint-planning` consideration.
79
+
80
+ ### 6. Hand off
81
+
82
+ Notify the next workflow:
83
+
84
+ - If AC changed → `/wize-validate-prd` to confirm consistency.
85
+ - If epic + stories need refresh → `/wize-create-epics-and-stories`.
86
+ - If sprint needs re-prioritization → `/wize-sprint-planning`.
87
+
88
+ ## Output template — `prd-changelog.md`
89
+
90
+ ```markdown
91
+ # PRD changelog
92
+
93
+ | # | Date | Type | Section | Change | Author |
94
+ |---|---|---|---|---|---|
95
+ | 1 | 2026-06-15 | A | AC-04-2 | Added: "rate limit per team" | Hill |
96
+ | 2 | 2026-06-15 | B | Out of scope | Removed "bulk invite" | Hill |
97
+ ```
98
+
99
+ ## Anti-patterns Hill rejects
100
+
101
+ - Editing the PRD without recording the change in the changelog. (Source-of-truth drift.)
102
+ - Bundling 4 edits in one run. (One edit per run keeps blame clean.)
103
+ - Editing the PRD without checking downstream impact. (Wizer’s cross-cutting step is mandatory.)
104
+ - Re-running `/wize-create-prd` to "keep things tidy." The changelog exists for that.
105
+
106
+ ## Hand-off
107
+
108
+ > "PRD updated at `.wize/planning/prd.md`. Changelog row N appended. Next: `/wize-validate-prd` (re-validate) or `/wize-create-epics-and-stories` (refresh stories)."
@@ -0,0 +1,118 @@
1
+ ---
2
+ code: wize-project-context
3
+ name: Project Context
4
+ phase: 3-solutioning
5
+ owner: wize-agent-architect # Tony Stark
6
+ status: ready
7
+ ---
8
+
9
+ # Project Context
10
+
11
+ **Goal.** Consolidate the 5 foundational artifacts (brief, PRD, UX, architecture, risk profile) into a single `.wize/knowledge/project-context.md` so other agents (Shuri, Hawkeye, Mantis, Wizer) can read the project in one shot instead of stitching it from 5 files.
12
+
13
+ Tony drives. Peggy polishes prose. Wizer is on call for cross-cutting drift.
14
+
15
+ ## When to run
16
+
17
+ - After Phase 3 closeout (architecture + ADRs + risk profile all exist).
18
+ - After any major change to brief / PRD / architecture (rerun).
19
+ - Before sprint planning if context feels stale.
20
+
21
+ ## When NOT to run
22
+
23
+ - During greenfield with no artifacts yet (run only after brief + PRD exist).
24
+ - As a CI step (manual; expensive to run on every commit).
25
+
26
+ ## Inputs
27
+
28
+ - `.wize/planning/brief.md` — Vision, Audience.
29
+ - `.wize/planning/prd.md` — Goals, scope.
30
+ - `.wize/planning/ux/ux-design/index.md` — UX stack, key screens.
31
+ - `.wize/solutioning/architecture.md` — Tech stack, components.
32
+ - `.wize/solutioning/adrs/*.md` — Key decisions.
33
+ - `.wize/implementation/tea/risk-profile.md` — Active risks.
34
+
35
+ ## Output
36
+
37
+ - `.wize/knowledge/project-context.md` (5 sections, YAML frontmatter, `last_updated` date).
38
+
39
+ ## Steps
40
+
41
+ ### 1. Vision and Audience
42
+
43
+ Copy from `brief.md` (or `prd.md` if brief is missing). One paragraph each. Mark the source file in a comment.
44
+
45
+ ### 2. Tech stack
46
+
47
+ From `architecture.md`, list: runtime, framework, database, key libraries, build tool. One bullet per item. Skip items that are "TBD".
48
+
49
+ ### 3. Key ADRs
50
+
51
+ List the 5 most recent ADRs from `.wize/solutioning/adrs/`. For each: title, decision, why. Older ADRs are out of scope; refer to `adrs/index.md` for the full list.
52
+
53
+ ### 4. Active risks
54
+
55
+ Copy from `risk-profile.md` the top 5 risks (highest prob × impact). One bullet per risk with the mitigation. Defer the rest.
56
+
57
+ ### 5. Active sprint
58
+
59
+ Read `.wize/implementation/sprint-status.yaml` and include: sprint number, capacity, in-progress stories. Skip if no active sprint.
60
+
61
+ ### 6. Hand off
62
+
63
+ Output is a markdown file. Wizer uses this file to seed `/wize-help`, `/wize-dev-story`, and `/wize-onboarding` reads.
64
+
65
+ ## Output template
66
+
67
+ ```markdown
68
+ ---
69
+ generated: YYYY-MM-DD
70
+ last_updated: YYYY-MM-DD
71
+ sources:
72
+ - .wize/planning/brief.md
73
+ - .wize/planning/prd.md
74
+ - .wize/planning/ux/ux-design/index.md
75
+ - .wize/solutioning/architecture.md
76
+ - .wize/solutioning/adrs/
77
+ - .wize/implementation/tea/risk-profile.md
78
+ ---
79
+
80
+ # Project Context — {project_name}
81
+
82
+ ## Vision
83
+ {paragraph from brief.md}
84
+
85
+ ## Audience
86
+ {paragraph from brief.md or prd.md}
87
+
88
+ ## Tech stack
89
+ - Runtime: {value}
90
+ - Framework: {value}
91
+ - Database: {value}
92
+ - Key libraries: {value}
93
+ - Build: {value}
94
+
95
+ ## Key ADRs
96
+ 1. **{title}** — {decision}. Why: {why}.
97
+ 2. ...
98
+
99
+ ## Active risks
100
+ 1. **{R-id}** — {description}. Mitigation: {mitigation}.
101
+ 2. ...
102
+
103
+ ## Active sprint
104
+ - Sprint: {N}
105
+ - Capacity: {days}
106
+ - In-progress: {stories}
107
+ ```
108
+
109
+ ## Anti-patterns Tony rejects
110
+
111
+ - Reading all 6 sources in full and dumping them. Summarize in 5 sections.
112
+ - Editing the project-context.md by hand. (Always re-run the workflow to keep `last_updated` honest.)
113
+ - Skipping the frontmatter. Other agents parse it.
114
+ - Including items marked "TBD". Surface them in the `Open questions` section instead.
115
+
116
+ ## Hand-off
117
+
118
+ > "Project context updated at `.wize/knowledge/project-context.md`. {N} sources, 5 sections, {date}. Next: `/wize-onboarding` (Wizer) reads this for first contact."
@@ -0,0 +1,115 @@
1
+ ---
2
+ code: wize-checkpoint-preview
3
+ name: Checkpoint Preview
4
+ phase: 4-implementation
5
+ owner: wize-agent-dev # Shuri (+ wize-agent-architect Tony on call)
6
+ status: ready
7
+ ---
8
+
9
+ # Checkpoint Preview
10
+
11
+ **Goal.** Pause mid-story to validate direction before continuing. For M/L stories where the cost of going off-rail is high, a quick checkpoint catches drift before it becomes rework.
12
+
13
+ Shuri drives. Tony on call for architectural drift. Hawkeye on call for test design drift.
14
+
15
+ ## When to run
16
+
17
+ - Manually, when a story is taking longer than expected.
18
+ - After the first 2-3 commits of an M or L story.
19
+ - When a new constraint is mentioned (security review, perf budget, vendor change).
20
+
21
+ ## When NOT to run
22
+
23
+ - Quick-dev / S stories (overhead exceeds the value).
24
+ - When the story is < 50% done and no surprise has come up yet.
25
+
26
+ ## Inputs
27
+
28
+ - The current story file: `.wize/solutioning/stories/{epic}/{story}.md`
29
+ - The git diff: uncommitted + committed since story start
30
+ - The `tea-design.md` for the story
31
+ - The `design-system/` tokens used so far
32
+
33
+ ## Output
34
+
35
+ - `.wize/implementation/checkpoints/{story_id}.md` (one file per checkpoint, append over time)
36
+ - A decision: continue / pivot / stop
37
+
38
+ ## Steps
39
+
40
+ ### 1. Pause
41
+
42
+ Stop writing code. Do not commit any pending work until the checkpoint is recorded.
43
+
44
+ ### 2. Snapshot
45
+
46
+ Write 5 lines:
47
+
48
+ - Files touched: (list, max 10)
49
+ - ACs done vs. remaining: (X / Y)
50
+ - Tests added: (count, by split)
51
+ - New dependencies: (list)
52
+ - Time spent: (estimate)
53
+
54
+ ### 3. Sanity check (3 questions)
55
+
56
+ - **Are we solving the right problem?** Compare the implementation with the story's Context and ACs. If the story's intent was misunderstood, pivot.
57
+ - **Is the design holding?** Compare the code with the architecture. If a new pattern emerged without an ADR, flag it.
58
+ - **Any new constraints?** Did anything new appear (security finding, perf regression, vendor change, new stakeholder)?
59
+
60
+ ### 4. Decide
61
+
62
+ One of three:
63
+
64
+ - **Continue** — the path is right. Record the snapshot; resume.
65
+ - **Pivot** — change scope or approach. Open a follow-up story with `wize-create-story`; do not edit the current story's ACs.
66
+ - **Stop** — the story is no longer worth it. Move it to `backlog` via `wize-correct-course`.
67
+
68
+ One decision per checkpoint. Re-run for additional decisions.
69
+
70
+ ### 5. Hand off
71
+
72
+ Notify the next workflow:
73
+
74
+ - Continue → `/wize-dev-story` (resume).
75
+ - Pivot → `/wize-create-story` (new story for the pivot).
76
+ - Stop → `/wize-correct-course` (defer the original).
77
+
78
+ ## Output template
79
+
80
+ ```markdown
81
+ ---
82
+ story_id: E04-S02
83
+ checkpoint: 1
84
+ date: 2026-06-16
85
+ author: Shuri
86
+ ---
87
+
88
+ # Checkpoint — E04-S02
89
+
90
+ ## Snapshot
91
+ - Files touched: src/...
92
+ - ACs done vs. remaining: 1 / 4
93
+ - Tests added: 2 unit, 1 integration
94
+ - New dependencies: none
95
+ - Time spent: ~3h
96
+
97
+ ## Sanity check
98
+ - Right problem? Yes.
99
+ - Design holding? Yes.
100
+ - New constraints? Vendor X deprecated their API; need a different client lib.
101
+
102
+ ## Decision
103
+ **Pivot** — see follow-up E04-S04 (client lib migration).
104
+ ```
105
+
106
+ ## Anti-patterns Shuri rejects
107
+
108
+ - Skipping the snapshot to "save time" — the snapshot is the artifact.
109
+ - Auto-pivoting (changing scope without an explicit checkpoint).
110
+ - Recording "continue" without the sanity check answers.
111
+ - Bundling multiple pivots in one checkpoint (one decision per run).
112
+
113
+ ## Hand-off
114
+
115
+ > "Checkpoint recorded for **{story_id}** (decision: {continue|pivot|stop}). Next: `/wize-dev-story` / `/wize-create-story` / `/wize-correct-course`."
@@ -0,0 +1,89 @@
1
+ ---
2
+ code: wize-correct-course
3
+ name: Correct Course
4
+ phase: 4-implementation
5
+ owner: wize-agent-pm # Maria Hill, with wize-orchestrator
6
+ status: ready
7
+ ---
8
+
9
+ # Correct Course
10
+
11
+ **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.
12
+
13
+ Maria Hill chairs. Wizer is on call for cross-cutting decisions. The human always confirms the action.
14
+
15
+ ## When to run
16
+
17
+ - `wize-sprint-status` flagged a risk: “slipping” or “at risk”.
18
+ - The team says "we won’t make it" during a stand-up.
19
+ - A story’s TEA gate came back as `FAIL` mid-sprint.
20
+ - An external event (incident, vendor outage) consumed capacity.
21
+
22
+ ## Inputs
23
+
24
+ - `.wize/implementation/sprint-status.yaml`
25
+ - `.wize/implementation/tea/{epic}/{story}/gate.md` (when a gate failed)
26
+ - `.wize/knowledge/document-project/risk-spots.md` (for context on known risks)
27
+ - A free-form reason from the user: chat message, stand-up note, or incident link.
28
+
29
+ ## Output
30
+
31
+ - Updated `.wize/implementation/sprint-status.yaml` (statuses changed, items deferred).
32
+ - One-line entry in `.wize/implementation/course-corrections.md` with date, cause, action, owner.
33
+
34
+ ## Steps
35
+
36
+ ### 1. Detect
37
+
38
+ 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.
39
+
40
+ ### 2. Classify
41
+
42
+ Pick exactly one cause:
43
+
44
+ - **Cut scope.** Story is bigger than estimated, or a non-essential AC can be deferred.
45
+ - **Re-route.** Story needs a different agent (e.g., Mantis for UX) or skill (e.g., `wize-investigate` for a regression).
46
+ - **Escalate.** Story needs more hands, or a decision outside the team.
47
+
48
+ A sprint can have multiple causes; the workflow handles one per run. Re-run for additional causes.
49
+
50
+ ### 3. Propose
51
+
52
+ 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.
53
+
54
+ ### 4. Confirm with the human
55
+
56
+ List the actions; the human picks which to apply. Apply only what the human approved.
57
+
58
+ ### 5. Update the sprint
59
+
60
+ For each approved action:
61
+
62
+ - Change `sprint-status.yaml` statuses (e.g., story from `in-progress` → `backlog` if deferred).
63
+ - Append a row to `course-corrections.md` with `date`, `cause`, `action`, `owner`.
64
+
65
+ ### 6. Hand off
66
+
67
+ 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).
68
+
69
+ ## Output template — `course-corrections.md`
70
+
71
+ ```markdown
72
+ # Course corrections
73
+
74
+ | Date | Sprint | Cause | Action | Owner |
75
+ |---|---|---|---|---|
76
+ | 2026-06-15 | 4 | cut scope | E04-S02 split into S02a + S02b; S02b deferred to S5 | Hill |
77
+ | 2026-06-15 | 4 | escalate | Paged Tony to unblock E04-S01 (waiting on ADR-010) | Wizer |
78
+ ```
79
+
80
+ ## Anti-patterns Hill rejects
81
+
82
+ - Cutting scope without confirming the trade-off with the user.
83
+ - Moving a story to `done` to "stop tracking it" when it isn’t actually done.
84
+ - Re-routing to an agent who doesn’t have the context (always include a 3-sentence brief).
85
+ - Escalating without naming a specific decision blocker.
86
+
87
+ ## Hand-off
88
+
89
+ > "Course correction applied at `.wize/implementation/course-corrections.md`. Sprint {N} updated. Run `/wize-sprint-status` to confirm the new state."
@@ -0,0 +1,121 @@
1
+ ---
2
+ code: wize-investigate
3
+ name: Investigate
4
+ phase: 4-implementation
5
+ owner: wize-agent-dev # Shuri (+ wize-agent-test-architect Hawkeye on call)
6
+ status: ready
7
+ ---
8
+
9
+ # Investigate
10
+
11
+ **Goal.** Structured root-cause analysis for a failed test, regression, or unexpected behavior. Produces a written report so the team (and future-you) can retrace the steps.
12
+
13
+ Shuri drives. Hawkeye on call for test-specific analysis. Wizer is on call for cross-cutting impact.
14
+
15
+ ## When to run
16
+
17
+ - A test fails and the cause is not obvious from the diff.
18
+ - A regression appears in production or CI.
19
+ - A user reports a bug with unclear repro steps.
20
+ - An incident triggers post-mortem.
21
+
22
+ ## When NOT to run
23
+
24
+ - The cause is obvious from the diff → use `wize-quick-dev` to fix directly.
25
+ - A new feature is needed (use `wize-create-story`).
26
+ - A security finding is suspected (escalate immediately; do not investigate solo).
27
+
28
+ ## Inputs
29
+
30
+ - The failing test, error log, or user report.
31
+ - The commit range since the last known-good state.
32
+ - The relevant story file (if any).
33
+ - A free-form description of the symptoms.
34
+
35
+ ## Output
36
+
37
+ - `.wize/implementation/investigations/{YYYY-MM-DD}-{short-slug}.md` — a written report.
38
+
39
+ ## Steps
40
+
41
+ ### 1. Frame
42
+
43
+ One paragraph: what broke, when it was first noticed, who reported it, and how serious. If you cannot write this in 3 sentences, the report is too broad.
44
+
45
+ ### 2. Reproduce
46
+
47
+ Step-by-step: how to reproduce locally. Include environment (OS, Node version, branch), commands, expected vs. actual output. If unreproducible, mark "not reproducible after N attempts" and stop.
48
+
49
+ ### 3. Hypothesize
50
+
51
+ List 3 root causes, ranked by likelihood. For each:
52
+ - What would explain the symptoms.
53
+ - A 1-line test to confirm or refute.
54
+ - Confidence: low / medium / high.
55
+
56
+ ### 4. Verify
57
+
58
+ For each hypothesis, run the 1-line test. Record: confirmed / refuted / inconclusive. If all refuted, return to step 3 and re-rank.
59
+
60
+ ### 5. Conclude
61
+
62
+ Pick the surviving root cause. State:
63
+ - **Root cause:** {description}.
64
+ - **Fix path:** {one paragraph: what to change and why}.
65
+ - **Effort:** S / M / L.
66
+ - **Risk of fix:** low / medium / high.
67
+ - **Recommended next step:** open a quick-dev, open a story, or escalate.
68
+
69
+ ### 6. Hand off
70
+
71
+ Notify the next workflow:
72
+ - S / low risk → `/wize-quick-dev` (Shuri fixes directly).
73
+ - M+ or higher risk → `/wize-create-story` (new story for the fix).
74
+ - Escalation → `/wize-correct-course` (involve PM + Wizer).
75
+
76
+ ## Output template
77
+
78
+ ```markdown
79
+ ---
80
+ date: 2026-06-16
81
+ author: Shuri
82
+ severity: high
83
+ related_story: E04-S02
84
+ related_test: test/document-project-classify.test.js
85
+ status: concluded
86
+ ---
87
+
88
+ # Investigation — {short-slug}
89
+
90
+ ## Frame
91
+ {one paragraph}
92
+
93
+ ## Reproduce
94
+ 1. ...
95
+ 2. ...
96
+ **Expected:** {x}
97
+ **Actual:** {y}
98
+
99
+ ## Hypotheses
100
+ 1. **{hypothesis}** — Confidence: high. Test: {1-liner}. Result: confirmed.
101
+ 2. ...
102
+
103
+ ## Conclude
104
+ - **Root cause:** {description}
105
+ - **Fix path:** {one paragraph}
106
+ - **Effort:** M
107
+ - **Risk of fix:** low
108
+ - **Next:** /wize-create-story (E04-S05)
109
+ ```
110
+
111
+ ## Anti-patterns Shuri rejects
112
+
113
+ - Skipping the hypothesis ranking. (Ranking forces you to consider alternatives.)
114
+ - Stopping at "I think it's X" without the verification test. (Confirmation bias.)
115
+ - Mixing the investigation with the fix. (Investigate, then propose; do not edit code yet.)
116
+ - One-paragraph reports. (If it's a real investigation, it's at least 5 sections.)
117
+ - Sharing the report only in chat. (Always write to disk for archival.)
118
+
119
+ ## Hand-off
120
+
121
+ > "Investigation concluded. Root cause: {summary}. Next: `/wize-create-story` (M+ fix) or `/wize-quick-dev` (S fix)."