@cloverleaf/reference-impl 0.8.4 → 0.8.6
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/VERSION +1 -1
- package/package.json +1 -1
- package/prompts/qa.md +5 -0
- package/prompts/reviewer.md +5 -0
- package/prompts/ui-reviewer.md +4 -1
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.8.
|
|
1
|
+
0.8.6
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloverleaf/reference-impl",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.6",
|
|
4
4
|
"description": "Reference implementation of the Cloverleaf methodology as Claude Code skills. Implements the Tight Loop (Implementer + Reviewer).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
package/prompts/qa.md
CHANGED
|
@@ -72,6 +72,11 @@ The Standard's QA contract requires a `preview_uri`. You were passed the sentine
|
|
|
72
72
|
- Read-only. Do NOT edit source files.
|
|
73
73
|
- Use `git worktree`: do NOT `git checkout` in the main working directory.
|
|
74
74
|
- Always teardown the worktree, even on error.
|
|
75
|
+
- **Loading or running a module directly.** Do not improvise `node -e "import('./lib/x.js')"` to spot-check a module — sources are `.ts` and the build emits `.mjs`, so a bare `.js` import resolves to neither and fails with `ERR_MODULE_NOT_FOUND`. Use `npx tsx` instead (already in the worktree's `node_modules`): it resolves `.ts` sources **and** the project's `.js`-style import specifiers, so the natural import works. Run it from the worktree's `reference-impl/` directory; for anything the test suite already covers, prefer `npm test`.
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
npx tsx -e "import('./lib/<module>.js').then(m => console.log(Object.keys(m)))"
|
|
79
|
+
```
|
|
75
80
|
|
|
76
81
|
## QA Report (v0.4)
|
|
77
82
|
|
package/prompts/reviewer.md
CHANGED
|
@@ -65,5 +65,10 @@ A `pass` verdict MAY have an empty `findings` array or omit it. A `bounce` verdi
|
|
|
65
65
|
Use `--detach` with a SHA rather than a branch name: when running inside a walker worktree, the feature branch (and main) may already be checked out in another worktree, causing `git worktree add` to fail with "fatal: branch … is already checked out". Detaching at a SHA bypasses this constraint entirely.
|
|
66
66
|
|
|
67
67
|
This keeps `.cloverleaf/` on main intact.
|
|
68
|
+
- **Loading or running a module directly.** Do not improvise `node -e "import('./lib/x.js')"` to spot-check a module — sources are `.ts` and the build emits `.mjs`, so a bare `.js` import resolves to neither and fails with `ERR_MODULE_NOT_FOUND`. Use `npx tsx` instead (already in the worktree's `node_modules`): it resolves `.ts` sources **and** the project's `.js`-style import specifiers, so the natural import works. Run it from the worktree's `reference-impl/` directory; for anything the test suite already covers, prefer `npm test`.
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
npx tsx -e "import('./lib/<module>.js').then(m => console.log(Object.keys(m)))"
|
|
72
|
+
```
|
|
68
73
|
- Severities (per the Cloverleaf feedback schema): `blocker` = wrong behavior / missing AC / broken tests; `error` = notable defect that should be fixed but doesn't break AC; `warning` = should fix; `info` = nit / style. Use `blocker` and `error` for bounces.
|
|
69
74
|
- If a criterion is subjective, lean toward pass — the task author chose those words deliberately.
|
package/prompts/ui-reviewer.md
CHANGED
|
@@ -92,7 +92,7 @@ Do not attempt to launch a missing engine — fail fast with `verdict: "escalate
|
|
|
92
92
|
SERVER_PID=$!
|
|
93
93
|
```
|
|
94
94
|
|
|
95
|
-
> **Playwright script placement (Bug #3 fix)
|
|
95
|
+
> **Playwright/driver script placement (Bug #3 fix) — applies to EVERY script you write, including retries and ad-hoc fallbacks:** place any standalone `.mjs` driver **inside the worktree** (e.g., `$WT/site/playwright-driver.mjs`) and run it from there (`node "$WT/site/playwright-driver.mjs"`). Node's ESM module resolution walks up from the script's own directory — a script placed anywhere outside the worktree (e.g. `/tmp`) cannot resolve the `playwright` import (or any `node_modules` package) and fails with `ERR_MODULE_NOT_FOUND`. If a driver errors and you retry, fix it in place in `$WT/site/` — never relocate or recreate it under `/tmp`.
|
|
96
96
|
|
|
97
97
|
4. Wait up to 30s for `http://localhost:{{preview_port}}/` to respond 200. If the server fails to start in 30s, kill it and return verdict `escalate`.
|
|
98
98
|
|
|
@@ -117,6 +117,9 @@ Do not attempt to launch a missing engine — fail fast with `verdict: "escalate
|
|
|
117
117
|
a. Launch a Playwright browser context using the `browser` engine.
|
|
118
118
|
|
|
119
119
|
b. **Visual-diff pass (when `visualDiff.enabled` is true):**
|
|
120
|
+
|
|
121
|
+
**Visual diffing is ONLY `compareVisual` (pixelmatch). There is no ImageMagick.** Never shell out to `convert`, `compare`, `magick`, or any external image tool to diff or convert images — they are not installed and not a dependency. Screenshot via Playwright (`page.screenshot`) → pass the buffer to `compareVisual` (`lib/visual-diff.ts`). If `compareVisual` is hard to invoke, your driver script failed to resolve — fix the script (see the placement rule), do **not** substitute an external tool.
|
|
122
|
+
|
|
120
123
|
For each route in the (capped) route list × each viewport in `{{ui_review_config}}.viewports`:
|
|
121
124
|
- Set Playwright viewport to `{ width, height }` from the config.
|
|
122
125
|
- Apply mask CSS — inject a style that sets `visibility: hidden` on any selector in `visualDiff.mask`.
|