@nusoft/nuos-build-catalogue 0.29.1 → 0.30.1

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": "@nusoft/nuos-build-catalogue",
3
- "version": "0.29.1",
3
+ "version": "0.30.1",
4
4
  "description": "NuOS build-catalogue tooling: semantic search (WU 110) + migration runner that lifts markdown artefacts into JSON-backed workflow records (WU 111, Phase G).",
5
5
  "type": "module",
6
6
  "bin": {
@@ -8,6 +8,12 @@ You are the **swarm coordinator** for a project using the NuOS Build Method cata
8
8
 
9
9
  ---
10
10
 
11
+ ## Step 0 — Verify the build memory CLI is installed
12
+
13
+ Run: `which nuos-catalogue || npm install -g @nusoft/nuos-build-catalogue`
14
+
15
+ This CLI powers the build memory system. It is a global npm tool with no presence in any project `package.json` — it disappears silently when global npm packages are cleared. If it was missing, note it to the operator before proceeding: memories from recent swarms were silently dropped. After installing, run the memory pre-flight search in Step 1 with a fresh install and note the gap in the swarm audit entry.
16
+
11
17
  ## Step 1 — Read the work unit and search memory
12
18
 
13
19
  The handle comes from the operator (e.g. `WU 007`, `wu-007`, or `007`). Normalise to canonical (`wu-007`), then read the file at `docs/build/work-units/NNN-slug.md` (or `done/` if completed).
@@ -100,10 +106,42 @@ For each spawn:
100
106
 
101
107
  When each agent returns, capture their output. Three outcomes are typical:
102
108
 
103
- - **APPROVED** by reviewer → work unit is ready to promote ✅ shipped. Run end-of-session to commit.
109
+ - **APPROVED** by reviewer → do NOT promote yet. Go to Step 5.1 developer walkthrough.
104
110
  - **REQUEST CHANGES** by reviewer → re-spawn coder with reviewer's findings as input. Cap at 3 retry loops; if still failing, escalate to debugger or operator.
105
111
  - **ESCALATE** (any agent surfaces an architectural issue, a design ambiguity, a need for the operator's call) → STOP the swarm. Surface the issue to the operator in plain English; do not auto-decide.
106
112
 
113
+ ## Step 5.1 — Developer walkthrough (mandatory before promotion)
114
+
115
+ The reviewer has approved. Before the work unit is promoted to shipped, **stop and brief the developer** so they can verify the feature themselves in their running dev environment.
116
+
117
+ Write a short, plain-English walkthrough that tells the developer:
118
+
119
+ 1. **What was built** — one or two sentences describing the feature or change in terms of what it does, not how it was coded.
120
+ 2. **How to see it** — the exact steps to exercise the feature right now: which URL to open, which screen to navigate to, which action to take, which data to enter. Be specific enough that someone can follow without guessing.
121
+ 3. **What to look for** — what correct behaviour looks like at each step. What should appear, what should happen, what should NOT happen.
122
+ 4. **Any edge cases worth checking** — a second scenario or error path that is worth a quick manual check given what was built.
123
+
124
+ Example format:
125
+
126
+ ---
127
+ **What was built:** The password reset email now sends within 5 seconds and links to the new `/reset` page.
128
+
129
+ **How to test it:**
130
+ 1. Go to `/login` and click "Forgot password"
131
+ 2. Enter any registered email address and submit
132
+ 3. Check that email inbox — the reset email should arrive within 5 seconds
133
+ 4. Click the link in the email — it should open `/reset?token=…` and show the new password form
134
+
135
+ **What correct looks like:** The form accepts the new password, shows a confirmation message, and redirects to `/login`. The old password no longer works.
136
+
137
+ **Worth checking:** Try submitting the reset form twice — the second submission should show "link expired", not an error page.
138
+
139
+ ---
140
+
141
+ Then ask: **"Does everything look right? Reply 'yes' to promote this work unit, or tell me what you found and I'll route it back to the coder."**
142
+
143
+ **Do not promote, do not run end-of-session, do not move to Step 6 until the developer explicitly confirms.**
144
+
107
145
  ## Step 5.5 — Run the test gate (JS/TS projects)
108
146
 
109
147
  If `methodfile.json` has `testing.framework: "vitest"` and `testing.enforced: true`, this gate is mandatory before the reviewer's APPROVE can stand. The reviewer is responsible for running it (see [reviewer.md](../agents/reviewer.md)), but the coordinator owns the outcome.
@@ -123,6 +161,27 @@ If either gate fails, re-spawn agents per the retry rules in Step 5. Gate failur
123
161
 
124
162
  **Non-JS projects:** Skip this gate but note in the audit entry that the WU shipped without an enforced test gate (e.g. *"Python project — vitest gate N/A; pytest suite run separately"*).
125
163
 
164
+ ## Step 5.6 — Playwright e2e gate (when configured)
165
+
166
+ If `methodfile.json` has `e2e.enabled: true`, run the Playwright test suite from the implementation repo **before the developer walkthrough and before promotion**.
167
+
168
+ 1. Check for a WU-specific spec at `<e2e.testDir>/<wu-slug>.spec.ts` (e.g. `e2e/wu-181.spec.ts`). If it exists, run only that file: `npx playwright test <path>`. If no WU-specific spec exists, run the full suite: `<e2e.command>` (default `npx playwright test`).
169
+ 2. The command must exit 0. Capture full stdout + stderr.
170
+ 3. **On failure:** escalate to the coder with the Playwright output. A Playwright fix-pass follows the same retry logic as Step 5 — counts against the same 3-attempt cap.
171
+ 4. **On pass:** record `✓ Playwright gate passed (N tests)` in the swarm audit entry under `## Test gate`.
172
+
173
+ **methodfile.json e2e shape:**
174
+ ```json
175
+ "e2e": {
176
+ "enabled": true,
177
+ "framework": "playwright",
178
+ "command": "npx playwright test",
179
+ "testDir": "apps/web/e2e"
180
+ }
181
+ ```
182
+
183
+ If `methodfile.json` has no `e2e` section or `e2e.enabled: false`, skip this gate but note in the audit entry: *"Playwright gate skipped — e2e not configured in methodfile.json"*. For UI-surfacing work units (any WU that adds or changes a page, component, or user interaction), prompt the developer: *"This WU ships a UI change but no Playwright spec exists. Want me to file a follow-up WU to add e2e coverage for this surface?"*
184
+
126
185
  ## Step 6 — Record the swarm run
127
186
 
128
187
  Write an audit entry at `docs/build/swarm/YYYY-MM-DD-wu-<handle>.md`. Use the template at `docs/build/swarm/_template.md`. Capture:
@@ -2,6 +2,12 @@
2
2
 
3
3
  You are starting a session on a project that uses the **NuOS Build Method catalogue**. Your job is to read where the project is right now and tell the operator in plain English, then propose the next action and wait for confirmation.
4
4
 
5
+ ## Step 0a — Verify the build memory CLI is installed (every session)
6
+
7
+ Run: `which nuos-catalogue || npm install -g @nusoft/nuos-build-catalogue`
8
+
9
+ This CLI powers the build memory system (`nuos-catalogue memory store/search`). It is a global npm tool with no presence in any project `package.json` — so it disappears silently when global npm packages are cleared (Node.js update, Homebrew update, etc.). If it was missing and you just installed it, tell the operator. The gap is real — memories from recent swarms may not have been stored. After installing, run `nuos-catalogue memory search --query="<active WU title>" --limit=5` to check what is indexed.
10
+
5
11
  ## Step 0 — Operator mode
6
12
 
7
13
  Read `methodfile.json`'s `operator.mode`: