@nusoft/nuos-build-catalogue 0.31.0 → 0.32.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nusoft/nuos-build-catalogue",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.32.0",
|
|
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": {
|
|
@@ -190,6 +190,20 @@ If `methodfile.json` has `e2e.enabled: true`, run the Playwright test suite from
|
|
|
190
190
|
|
|
191
191
|
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?"*
|
|
192
192
|
|
|
193
|
+
## Step 5.7 — Code-quality lite gate (only if the coder touched source)
|
|
194
|
+
|
|
195
|
+
Runs after the test gates pass, before promotion. Pure self-check by the coordinator on the coder's staged diff. Skip entirely if the WU was design-only or only touched docs/registers.
|
|
196
|
+
|
|
197
|
+
Against `git diff --name-only <base>...HEAD` filtered to source files (same filter as Step 5.5 Gate B), scan for these three lite-gate items only:
|
|
198
|
+
|
|
199
|
+
1. **1k-line cross** — did this WU push any file from under 1000 lines to over 1000 lines? If yes, surface to the operator: *"WU N pushed [file] from X → Y lines. Decompose before promotion, or accept the sprawl?"* Don't auto-decompose; this is an operator call.
|
|
200
|
+
2. **Spaghetti** — does the diff add ad-hoc conditionals, one-off booleans, or special-case branches bolted into unrelated flows? If yes, send back to the coder with: *"This adds a special-case branch into [flow]. Move it behind its own abstraction before promotion."*
|
|
201
|
+
3. **Canonical-helper duplication** — does the diff introduce a bespoke helper that duplicates an existing utility the codebase already has? If yes, send back to the coder with the path to the canonical helper.
|
|
202
|
+
|
|
203
|
+
These are the three highest-yield checks from the full thermo-nuclear code-quality rubric. The full rubric runs at end-of-session against the staged commit diff (see [end-of-session.md](end-of-session.md) Step 10) and escalates to `/thermo-nuclear-code-quality-review` for the harsh pass. The lite gate here is the cheap-early-warning so structural mistakes are caught before they layer with downstream agent output.
|
|
204
|
+
|
|
205
|
+
Record `✓ code-quality lite gate passed` (or the trigger if it fired) in the swarm audit entry under `## Gate triggers`.
|
|
206
|
+
|
|
193
207
|
## Step 6 — Record the swarm run
|
|
194
208
|
|
|
195
209
|
Write an audit entry at `docs/build/swarm/YYYY-MM-DD-wu-<handle>.md`. Use the template at `docs/build/swarm/_template.md`. Capture:
|
|
@@ -84,7 +84,21 @@ Before committing, scan:
|
|
|
84
84
|
- Cross-references resolve (no dead links)
|
|
85
85
|
- Dates are right
|
|
86
86
|
|
|
87
|
-
### 10.
|
|
87
|
+
### 10. Code-quality gate (only if staged diff touches source)
|
|
88
|
+
|
|
89
|
+
If `git diff --cached --name-only` shows source files (`*.ts`, `*.tsx`, `*.js`, `*.jsx`, `*.sh`, `*.py` — NOT markdown, decisions, sessions, or registers), run this 7-point pass against the staged diff before committing. If only docs/registers are staged, skip the gate entirely.
|
|
90
|
+
|
|
91
|
+
1. **Code-judo** — is there a reframing that *deletes* whole branches/helpers/layers rather than rearranging them? Push for the simpler model, not the cleaner version of the same model.
|
|
92
|
+
2. **1k-line rule** — did any file cross 1000 lines? If yes, decompose first; don't ship the sprawl.
|
|
93
|
+
3. **Spaghetti growth** — new ad-hoc conditionals, one-off booleans, or special-case branches bolted into unrelated flows? Push the logic behind its own abstraction.
|
|
94
|
+
4. **Boundaries** — feature-specific logic leaking into shared paths; bespoke helpers duplicating a canonical one; logic landing in the wrong layer/package.
|
|
95
|
+
5. **Types** — unnecessary `any` / `unknown` / optionality / casts masking the real contract? Make boundaries explicit.
|
|
96
|
+
6. **Atomicity** — serial async where parallel is simpler and clearer; partial-update flows that can leave state half-applied.
|
|
97
|
+
7. **Wrappers** — thin abstractions, identity passthroughs, or pass-through helpers adding indirection without buying clarity?
|
|
98
|
+
|
|
99
|
+
If a finding is non-trivial, fix it inline or file a follow-up WU before committing. **Escalate to the full rubric** by invoking `/thermo-nuclear-code-quality-review` if the lite pass smells anything structural — the full skill is the "this should not ship as-is" reviewer; the 7-point pass above is the cheap pre-flight.
|
|
100
|
+
|
|
101
|
+
### 11. Commit
|
|
88
102
|
|
|
89
103
|
Single commit. Message format:
|
|
90
104
|
|