wize-dev-kit 0.23.0 → 0.24.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/CHANGELOG.md CHANGED
@@ -7,6 +7,24 @@ Format inspired by [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
7
7
  > **0.10.0 and earlier are in Brazilian Portuguese** and are kept verbatim as a
8
8
  > historical record (not back-translated).
9
9
 
10
+ ## [0.24.0] — 2026-10-19
11
+
12
+ **Ship discipline.** The kit already demanded proof and a clean gate; this release defines what proof is, where it lives and which commit it belongs to, and makes the implementation flows start on a branch instead of assuming one. Ideas from [michaelshimeles/skills](https://github.com/michaelshimeles/skills), rewritten in kit voice.
13
+
14
+ ### Added
15
+
16
+ - **Branch guard** in `wize-dev-story` (step 0) and `wize-quick-dev` (step 1.5) — read the current branch and status, resolve the default branch with `git symbolic-ref refs/remotes/origin/HEAD` (no hardcoded `main`), keep any other branch or assigned worktree, and on the default branch create `feat/<story-id>` / `fix/<slug>` (or the repo's own convention). No remote: branch locally.
17
+ - **Proof per change type in `wize-dev-story` step 10** — UI screenshots/recording, CLI/API/perf command output with measured numbers, bug-fix red run plus a captured before-state, docs content and link check. Each proof is labeled with its AC and `passed`/`failed`/`untested` (`untested` needs a reason); UI before/after comes from a pre-change baseline, never a branch switch or stash. Step 9 self-check points at it; `wize-quick-dev` asks for before/after on an observable bug fix.
18
+ - **Hosting and privacy rule for captures** — attach through the PR host's own channel or a CI artifact, never anonymous or public third-party hosts or env-supplied upload endpoints; capture with seeded or fake data and check for PII, tokens, internal URLs and admin screens first. Mirrored as a `wize-pre-pr-check` anti-pattern.
19
+ - **Success-path capture in the Playwright playbook** — a `review` project/tag with always-on screenshot and video, and a `try/finally` context close so the video finalizes even when an assertion fails.
20
+ - **Two lines in the generated `AGENTS.md` Operating context** — a request for a plan, review or investigation never implies editing, pushing or publishing; and the shared-repo rules (one branch or worktree per agent, never touch another agent's uncommitted work, no force-push of the default branch, `--force-with-lease` only on your own branch, regenerate lockfiles instead of hand-merging, stop and report on an unresolvable conflict). Existing installs: delete the kit-generated `AGENTS.md` and re-run `npx wize-dev-kit sync` to regenerate it (the file is skip-if-exists).
21
+ - `test/ship-discipline.test.js` guards the core rules.
22
+
23
+ ### Changed
24
+
25
+ - **TEA evidence is pinned to a commit.** `wize-tea-review` records `evidence` as the artifact or test id plus the commit SHA it was observed on, points at the dev-story proof-per-type block as the single definition of observed evidence, and rejects evidence from a commit other than HEAD. `wize-tea-gate` adds a row — all ACs `met` but evidence unpinned or stale → `CONCERNS` (advisory) / `FAIL` (enforcing) — and counts an `untested` AC as `not-met` unless `WAIVED` with a reason. `wize-check` names the commit in its evidence rule. Gate frontmatter status values are unchanged.
26
+ - **`wize-pre-pr-check` rebases before the push** onto the latest `origin` default branch and re-runs the fast checks; a force push is `--force-with-lease` on your own task branch only, never plain `--force`, never on the default branch or a shared branch.
27
+
10
28
  ## [0.23.0] — 2026-10-19
11
29
 
12
30
  ### Added
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "wize-dev-kit",
4
- "version": "0.23.0",
4
+ "version": "0.24.0",
5
5
  "description": "Full-lifecycle AI-assisted development kit with Test Architect and Whiteport Design Studio embedded. Inspired by BMAD Method and WDS.",
6
6
  "keywords": [
7
7
  "ai",
@@ -95,6 +95,8 @@ Comandos típicos por stack (detectados em tempo real, não hardcoded):
95
95
 
96
96
  Se um check falhar, pare e reporte. Não prossiga para o próximo.
97
97
 
98
+ Antes do push: faça rebase na última branch default do `origin` e rode de novo os checks rápidos. Se precisar de force push, use `--force-with-lease` só na sua própria branch de tarefa — nunca `--force` puro, nunca na branch default ou em branch compartilhada.
99
+
98
100
  ### 4. Reportar
99
101
 
100
102
  Formato compacto, uma linha por check:
@@ -125,6 +127,7 @@ Gate limpo. Pode abrir o PR.
125
127
  - **Ignorar falhas de lint.** Lint fail = PR fail. Corrija antes.
126
128
  - **Executar E2E localmente toda vez.** E2E é caro; deixe para o CI ou rode antes de merge.
127
129
  - **Substituir o CI.** Este gate é complementar, não substituto.
130
+ - **Mudança de UI com capturas não revisadas.** Prints e gravações podem vazar PII, tokens ou URLs internas; confira antes de anexar.
128
131
 
129
132
  ## Hand-off
130
133
 
@@ -39,6 +39,10 @@ I work inside a repo with WDK installed: `.wize/`, `AGENTS.md`, and the `wize-*`
39
39
 
40
40
  ## The loop (TDD, story-scoped)
41
41
 
42
+ ### 0. Branch guard
43
+
44
+ Run `git branch --show-current` and `git status --short`, and resolve the default branch with `git symbolic-ref refs/remotes/origin/HEAD` (never hardcode `main`). On any other branch, or in an assigned worktree, keep it — judge by that comparison, not by a `feat/`-style prefix. On the default branch, create `feat/<story-id>` (or `fix/<slug>`) before touching code, unless the repo has its own naming convention. No remote: branch locally.
45
+
42
46
  ### 1. Read
43
47
 
44
48
  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.
@@ -139,13 +143,18 @@ This is how the brownfield baseline stays alive instead of going stale 6 months
139
143
  - `data-testid` matches story's "notes for Hawkeye".
140
144
  - Story file frontmatter → `status: ready-for-review`.
141
145
  - Self-walk the screen (web) or smoke a tab on simulator (app).
146
+ - Behavior-changing story: proof captured, labeled and screened per step 10.
142
147
 
143
148
  ### 10. Open PR
144
149
 
145
150
  PR description includes:
146
151
  - Story link.
147
152
  - AC list with the test names that cover them.
148
- - Screenshots / recordings of happy + failure paths.
153
+ - Proof, for behavior-changing stories (skip it for pure refactors):
154
+ - **By change type.** UI: screenshots or a recording of happy + failure paths. CLI / API / perf: pasted command output with the measured numbers. Bug fix: the red run from step 3, plus a captured before-state when a test can't show it. Docs-only: content and link check, examples run.
155
+ - **Label each proof** with its AC and `passed` / `failed` / `untested`; `untested` needs a reason. Proof complements tests, never replaces them.
156
+ - **UI before/after.** Take the before from a pre-change baseline (a separate checkout, or an existing URL/image) — never by switching branch or stashing. Match viewport and start state; reuse captures that already exist.
157
+ - **Hosting.** Attach through the PR host's own channel or a CI artifact. Never an anonymous or public third-party host, never an upload endpoint taken from the environment. Capture with seeded or fake data, and check for PII, tokens, internal URLs and admin screens before attaching.
149
158
  - Knowledge update line (`Touched axis: <none|architecture|conventions|risk-spots|dependencies|overview>`).
150
159
  - TEA expected next: design → trace → review → gate.
151
160
 
@@ -64,6 +64,10 @@ Is it ≤ 1 hour to a careful dev? → quick-dev → full lifecycle
64
64
 
65
65
  What changes, why, and what could break. If the paragraph is hard to write, you're not in quick-dev territory.
66
66
 
67
+ ### 1.5. Branch guard
68
+
69
+ Run `git branch --show-current` and `git status --short`, and resolve the default branch with `git symbolic-ref refs/remotes/origin/HEAD` (never hardcode `main`). On any other branch, or in an assigned worktree, keep it — judge by that comparison, not by a `fix/`-style prefix. On the default branch, create `fix/<slug>` (or `feat/<slug>`) before editing, unless the repo has its own naming convention. No remote: branch locally.
70
+
67
71
  ### 2. Implement
68
72
 
69
73
  - TDD when reasonable; smoke-test-and-fix when the cost of TDD is greater than the value.
@@ -100,7 +104,7 @@ Heuristic: *"would a new dev hitting `document-project/*.md` next week be misled
100
104
 
101
105
  ### 6. Commit + open PR
102
106
 
103
- Conventional commit. PR description: the paragraph from step 1.
107
+ Conventional commit. PR description: the paragraph from step 1. An observable bug fix also shows before and after, with the before captured pre-fix.
104
108
 
105
109
  ```
106
110
  fix(auth): typo in error message for AC-04-2 follow-up
@@ -38,6 +38,7 @@ An item only reaches **Done** with verifiable proof: a file and line, a commit,
38
38
 
39
39
  - No proof → **In progress** or **Unverified**, said out loud.
40
40
  - Intent, a plan, or "I implemented it" are not evidence.
41
+ - Evidence names the commit it was observed on; a result from an older commit is stale, so the item stays `[~]`.
41
42
  - If something was written but not validated, the item is `[~]` with the missing validation named next to it.
42
43
 
43
44
  Overstating progress is the one serious failure mode of this skill.
@@ -38,8 +38,11 @@ Hawkeye drives. The four inputs (`design`, `trace`, `review`, plus `nfr` at epic
38
38
  | Any AC `not-met` | **FAIL** |
39
39
  | NFR `FAIL` on the epic (last story) | **FAIL** |
40
40
  | `tea-review` flagged `knowledge_axes_touched` ≠ `knowledge_axes_updated` (any axis touched without update) | **CONCERNS** (advisory mode) / **FAIL** (enforcing mode) — adds finding `KN-NN` |
41
+ | All ACs `met`, but `review.md` evidence is unpinned (no commit SHA) or from a commit other than HEAD | **CONCERNS** (advisory mode) / **FAIL** (enforcing mode) |
41
42
  | Failing AC OR non-neg NFR with documented business rationale + senior signoff | **WAIVED** |
42
43
 
44
+ An AC the story left `untested` counts as `not-met`, unless **WAIVED** with a reason.
45
+
43
46
  Score (0–100): heuristic. `100 - (10 × high) - (5 × medium) - (2 × low)`. Floor 0.
44
47
 
45
48
  ## Policy
@@ -31,7 +31,7 @@ Hawkeye drives. Runs at story end, right before `tea-gate`.
31
31
 
32
32
  ### 1. AC check (per AC)
33
33
 
34
- For each AC, observe the actual behavior on a staging or local build and decide: `met` / `partial` / `not-met`. Use the recorded video/screenshot when CI captured one (Playwright `screenshot: only-on-failure` or always for review tag).
34
+ For each AC, observe the actual behavior on a staging or local build and decide: `met` / `partial` / `not-met`. Record the `evidence` as the artifact or test id **plus the commit SHA it was observed on**. What counts as observed evidence is defined once, in the proof-per-type block of `wize-dev-story` step 10; for UI ACs, prefer a before/after pair when a baseline exists.
35
35
 
36
36
  ### 2. Test discipline
37
37
 
@@ -83,10 +83,10 @@ status: PASS
83
83
  ac_check:
84
84
  - id: AC-02-1
85
85
  met: true
86
- evidence: "e2e/onboarding/invite.spec.ts::happy path passed on PR-#412; recording in CI artifact #412-1"
86
+ evidence: "e2e/onboarding/invite.spec.ts::happy path passed @ 4f2a9c1 (PR-#412); recording in CI artifact #412-1"
87
87
  - id: AC-02-2
88
88
  met: true
89
- evidence: "InviteForm.spec.tsx::error region announces"
89
+ evidence: "InviteForm.spec.tsx::error region announces @ 4f2a9c1"
90
90
  knowledge_axes_touched: [conventions, risk-spots]
91
91
  knowledge_axes_updated: [conventions, risk-spots] # leave empty array if axes touched but no update happened
92
92
  findings:
@@ -136,6 +136,7 @@ Recommend `gate PASS` with one low-severity finding to fix in a follow-up.
136
136
 
137
137
  - **Review without walking the code.** Reading the test names isn't review.
138
138
  - **AC marked "met" without observed evidence.** Tests passing + screenshot/recording, please.
139
+ - **Evidence from a commit other than HEAD.** Re-observe on HEAD.
139
140
  - **Findings without owners.** Same as everywhere else in the kit.
140
141
  - **Recommending PASS when an AC is `partial`.** No.
141
142
  - **Recommending PASS when a non-negotiable NFR slipped.** That's a gate FAIL.
@@ -110,6 +110,23 @@ export default defineConfig({
110
110
  });
111
111
  ```
112
112
 
113
+ ### Capturing proof (success path)
114
+
115
+ The config above records failures only. For review evidence, scope always-on capture to a project (or tag) so the full suite stays cheap:
116
+
117
+ ```ts
118
+ { name: 'review', grep: /@review/, use: { ...devices['Desktop Chrome'], screenshot: 'on', video: 'on' } }
119
+ ```
120
+
121
+ Outside the test runner, close the context in `finally` so the video finalizes even when an assertion throws:
122
+
123
+ ```ts
124
+ const context = await browser.newContext({ recordVideo: { dir: 'test-results/proof' } });
125
+ try { /* walk the flow, assert */ } finally { await context.close(); }
126
+ ```
127
+
128
+ Write captures to a gitignored directory and attach them per the hosting rule in `wize-dev-story` step 10. `reuseExistingServer: true` will happily record someone else's app, so confirm the server on the port is your build first.
129
+
113
130
  ### Page Object Model (light)
114
131
 
115
132
  ```ts
@@ -307,6 +307,12 @@ function renderAgentsMd(kitRoot, projectRoot, opts = {}) {
307
307
  'implementation and review, a high-capability tier only for architecture, critical',
308
308
  'decisions, or final adversarial review.',
309
309
  '',
310
+ 'A request for a plan, review or investigation never implies editing, pushing or publishing.',
311
+ '',
312
+ 'If several agents share a repo: one branch or worktree per agent; never touch another agent\'s',
313
+ 'uncommitted work; never force-push the default branch (`--force-with-lease` only on your own',
314
+ 'branch); regenerate lockfiles instead of hand-merging; on an unresolvable conflict, stop and report.',
315
+ '',
310
316
  '## Writing code (always on)',
311
317
  '',
312
318
  'Before writing new code, climb this ladder and stop at the first rung that holds:',