specweave 1.0.335 → 1.0.337

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "specweave",
3
- "version": "1.0.335",
3
+ "version": "1.0.337",
4
4
  "description": "Spec-driven development framework for AI coding agents. Works with Claude Code, Codex, Antigravity, Cursor, Copilot & more. 100+ skills, 49 CLI commands, verified skill certification, autonomous execution, and living documentation.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -51,7 +51,9 @@ See **Task Format** and **User Story Format** sections for templates.
51
51
 
52
52
  Never mark a task complete without proving it works:
53
53
  - Code compiles/builds successfully
54
- - Tests pass
54
+ - Run tests: `npx vitest run` (unit) + `npx playwright test` (E2E) after every task
55
+ - For critical paths: `/sw:grill` for quality, `/sw:judge-llm` for independent validation
56
+ - Ask user to manually verify: new UI flows, auth, payments, data migrations
55
57
  - Acceptance criteria actually satisfied
56
58
  - Ask: "Would a staff engineer approve this?"
57
59
 
@@ -105,6 +107,12 @@ Good: npm run build → node script.js → Success
105
107
  - Verify plan covers all ACs and edge cases before implementation
106
108
  - If the plan has gaps, fix the plan first — don't discover them mid-coding
107
109
  - Re-read the plan between tasks to stay aligned
110
+
111
+ ### Test Before Ship
112
+ - Tests pass at every step — unit after each task, E2E before close, no exceptions
113
+ - `/sw:test-aware-planner` generates BDD test plans during design — verify they exist before `/sw:do`
114
+ - TDD cycle: `/sw:tdd-red` → `/sw:tdd-green` → `/sw:tdd-refactor`
115
+ - E2E with Playwright CLI (`npx playwright test`) is a blocking closure gate
108
116
  <!-- /SECTION -->
109
117
 
110
118
  ---
@@ -348,17 +356,27 @@ specweave context projects
348
356
  4. Create `spec.md` — every US needs `**Project**:` field (see User Story Format)
349
357
  5. Create `tasks.md` (task checklist with BDD tests)
350
358
  6. Optional: `plan.md` for complex features
359
+ 7. **Verify** tasks.md has `**Test Plan**:` for every task with testable ACs
360
+ 8. **Verify** E2E scenarios exist for user-facing user stories — re-run `/sw:test-aware-planner` if missing
351
361
 
352
362
  ### Completing Tasks
353
363
  1. Implement the task
354
- 2. Update tasks.md: `[ ] pending` → `[x] completed`
355
- 3. Update spec.md: check off satisfied ACs
356
- 4. Sync to external trackers if enabled
364
+ 2. Run unit tests: `npx vitest run`
365
+ 3. Run E2E tests (if task touches UI/API): `npx playwright test`
366
+ 4. Only mark task `[x]` after tests pass
367
+ 5. Update tasks.md: `[ ] pending` → `[x] completed`
368
+ 6. Update spec.md: check off satisfied ACs
369
+ 7. Sync to external trackers if enabled
370
+ 8. If 3 consecutive test failures: STOP, re-plan, ask user
357
371
 
358
372
  ### Closing Increment
359
- 1. `/sw:done 0001` PM validates 3 gates (tasks, tests, docs)
360
- 2. Living docs synced automatically
361
- 3. GitHub/Jira issue closed if enabled
373
+ 1. Full test suite: `npx vitest run` (all unit + integration)
374
+ 2. Full E2E suite: `npx playwright test` (all scenarios)
375
+ 3. Coverage check: `npx vitest run --coverage` (must meet targets in config.json)
376
+ 4. Ask user for manual acceptance: new UI, auth, payments, data migrations
377
+ 5. `/sw:done 0001` — PM validates 3 gates (tasks, tests, docs)
378
+ 6. Living docs synced automatically
379
+ 7. GitHub/Jira issue closed if enabled
362
380
  <!-- /SECTION -->
363
381
 
364
382
  ---
@@ -77,8 +77,10 @@ SpecWeave auto-detects product descriptions and routes to `/sw:increment`:
77
77
 
78
78
  ### 3. Verification Before Done
79
79
  - Never mark a task complete without proving it works
80
+ - Run tests: `npx vitest run` (unit) + `npx playwright test` (E2E) after every task
81
+ - For critical paths: `/sw:grill` for quality, `/sw:judge-llm` for independent validation
82
+ - Ask user to manually verify: new UI flows, auth, payments, data migrations
80
83
  - Ask yourself: **"Would a staff engineer approve this?"**
81
- - Run tests, check logs, demonstrate correctness
82
84
 
83
85
  ### 4. Think-Before-Act (Dependencies)
84
86
  **Satisfy dependencies BEFORE dependent operations.**
@@ -184,9 +186,29 @@ Primary: `/sw:progress-sync`. Individual: `/sw-github:push`, `/sw-github:close`.
184
186
  <!-- /SECTION -->
185
187
 
186
188
  <!-- SECTION:testing -->
187
- ## Testing
189
+ ## Testing Pipeline (MANDATORY)
188
190
 
189
- BDD in tasks.md | Unit >80% | `.test.ts` (Vitest) | ESM mocking: `vi.hoisted()` + `vi.mock()`
191
+ **Testing is a pipeline step, not an afterthought.**
192
+
193
+ ### During Design (`/sw:increment`)
194
+ - `/sw:test-aware-planner` generates tasks.md with BDD test plans (Given/When/Then) for every AC
195
+ - Every task MUST have a `**Test Plan**:` block before implementation begins
196
+ - E2E test scenarios MUST be specified for user-facing features
197
+
198
+ ### During Implementation (`/sw:do`)
199
+ - TDD cycle: `/sw:tdd-red` → `/sw:tdd-green` → `/sw:tdd-refactor`
200
+ - Run tests after EVERY task: `npx vitest run` (unit) + `npx playwright test` (E2E when applicable)
201
+ - Never mark a task `[x]` until its tests pass
202
+
203
+ ### Before Closing (`/sw:done`)
204
+ - `/sw:grill` + `/sw:validate` — code quality + 130+ rule checks
205
+ - E2E with Playwright CLI: `npx playwright test` (blocking gate)
206
+ - Ask user for manual acceptance testing when: new UI flows, auth changes, payment flows, data migrations
207
+
208
+ ### Test Stack
209
+ - Unit/Integration: Vitest (`.test.ts`), ESM mocking with `vi.hoisted()` + `vi.mock()`
210
+ - E2E: Playwright CLI (`npx playwright test`)
211
+ - Coverage targets: unit 95%, integration 90%, e2e 100% of AC scenarios
190
212
  <!-- /SECTION -->
191
213
 
192
214
  <!-- SECTION:tdd -->
@@ -231,6 +253,7 @@ Plugins load automatically. Manual: `vskill install --repo anton-abyzov/vskill -
231
253
  4. **No Laziness**: Root causes, senior standards
232
254
  5. **DRY**: Don't Repeat Yourself — flag and eliminate repetitions aggressively
233
255
  6. **Plan Review**: Review the plan thoroughly before making any code changes
256
+ 7. **Test before ship**: Tests pass at every step — unit after each task, E2E before close, no exceptions
234
257
  <!-- /SECTION -->
235
258
 
236
259
  <!-- SECTION:linking -->