wei-wuwei 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.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,10 @@ One section per published version, newest first. `wuwei update` prints the
4
4
  sections between the installed version and the new one before it asks;
5
5
  `wuwei check` fails when package.json's version has no section here.
6
6
 
7
+ ## 0.5.0
8
+
9
+ - feat(plan-check): a script is an e2e harness too (#69)
10
+
7
11
  ## 0.4.0
8
12
 
9
13
  - feat: review turns — claims-scan, batched lens checks, review-collect breakdown (#68)
package/bin/wuwei.js CHANGED
@@ -1421,8 +1421,14 @@ function cmdPlanCheck(argv) {
1421
1421
  // mobile: Maestro flows, Flutter's patrol/integration_test, an XCUITest target, Espresso
1422
1422
  || existsSync(join(dest, '.maestro')) || /^\s*(patrol|integration_test):/m.test(read(join(dest, 'pubspec.yaml')) ?? '')
1423
1423
  || readdirSync(dest).some(f => /UITests$/.test(f)) || existsSync(join(dest, 'app', 'src', 'androidTest'))
1424
- if (acceptance && /\be2e\b/i.test(acceptance) && !harness)
1425
- warns.push('ACCEPTANCE.md binds e2e, and no harness was found (playwright/cypress/wdio config, one in package.json, .maestro/, patrol, *UITests, androidTest) — the first phase with a bound item adds it as its first task')
1424
+ // a script harness — a CLI, a library, a backend — is named, since nothing on
1425
+ // disk tells an e2e script from a unit test: `e2e harness: sh test/e2e.sh`
1426
+ const declared = acceptance?.match(/^\s*[-*]?\s*e2e harness:\s*`?([^`\n]+?)`?\s*$/im)?.[1]
1427
+ const script = declared?.split(/\s+/).find(t => /[\\/]|\.(sh|bats|[cm]?js|ts|py|rb)$/.test(t))
1428
+ if (declared && script && !existsSync(join(dest, script)))
1429
+ warns.push(`e2e harness \`${declared}\`: ${script} does not exist yet — the first phase with a bound item adds it as its first task`)
1430
+ else if (acceptance && /\be2e\b/i.test(acceptance) && !harness && !declared)
1431
+ warns.push('ACCEPTANCE.md binds e2e, and no harness was found (playwright/cypress/wdio config, one in package.json, .maestro/, patrol, *UITests, androidTest) — name a script one as `e2e harness: <command>`, or the first phase with a bound item adds one as its first task')
1426
1432
 
1427
1433
  // STATE.md agrees with phases/
1428
1434
  const row = (readStateRows(join(dest, '.wuwei', 'STATE.md')) ?? []).find(r => r.stream === stream)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wei-wuwei",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "description": "為無為,則無不治 — a source-of-truth skills & agents framework that compiles to Claude Code and Codex (Cursor and Gemini CLI planned). Write once, run in every agent, govern without forcing.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -172,9 +172,10 @@ tags: [planning, workflow]
172
172
  route each to automatable e2e (bound to a phase per step 1's strategy —
173
173
  red blocks that phase)
174
174
  or manual UAT (steps + expected result). **A repo with no e2e harness is
175
- not a reason for UAT**: the first phase with a bound item adds one
176
- (Playwright on web, Maestro on mobile — what `wuwei verify` runs on) as
177
- its first task.
175
+ not a reason for UAT**: the first phase with a bound item adds one as its
176
+ first task — Playwright on web, Maestro on mobile (what `wuwei verify`
177
+ runs on), a script for a CLI, library or backend, running the real
178
+ program on a temp fixture and named `e2e harness: <command>`.
178
179
  **`## Verify`** lists each page that shows fetched data — `- <page>:
179
180
  <route> · phase: NN`, the phase that builds it; its error, 403, empty,
180
181
  loading and failed-refetch states are `wuwei verify`'s, not UAT's. No
@@ -305,10 +306,7 @@ tags: [planning, workflow]
305
306
  - The contract is what makes auto mode safe: the executor never defines its
306
307
  own finish line.
307
308
  - In auto mode execute's steps 2–6 run without the user, and its steps 4–6
308
- loop at least three times inside that; execute's step 7 always stops. Step 1's
309
- strategy question is not an exception to that: auto is only ever entered at
310
- a sign-off, which recorded the answer, so a resumed auto stream reads it
311
- instead of asking.
309
+ loop at least three times inside that; execute's step 7 always stops.
312
310
  - Sign-off is why step 8 sits where it does: the stream stops being paper
313
311
  there, and it is the only moment a human is present to confirm what the
314
312
  branch is based on. Cutting earlier leaves a branch behind for a stream