diff --git a/.agents/skills/webjs/references/testing.md b/.agents/skills/webjs/references/testing.md index ec1b17507..8e9ecdf89 100644 --- a/.agents/skills/webjs/references/testing.md +++ b/.agents/skills/webjs/references/testing.md @@ -172,7 +172,7 @@ A cross-runtime proof is often a plain assert script rather than a test file, so ## Convention validation (`webjs check`) -`npm run check` is the correctness validator. Every rule catches code that is wrong to ship (a crash, a security leak, a type-strip failure), plus the `no-scaffold-placeholder` sentinel for unreplaced scaffold content. Run it and fix every violation before considering the change done (`npm run check -- --json` for an agent loop, `npm run check -- --rules` to list the rules). It is separate from `CONVENTIONS.md`, which carries the customizable project conventions you follow by judgment. +`npm run check` is the correctness validator. Every rule catches code that is wrong to ship, a crash, a security leak, a reactive prop that silently stops re-rendering, or a type-strip failure. Run it and fix every violation before considering the change done (`npm run check -- --json` for an agent loop, `npm run check -- --rules` to list the rules). It is separate from `CONVENTIONS.md`, which carries the customizable project conventions you follow by judgment. ## What NOT to do diff --git a/.claude/skills/webjs-scaffold-sync/SKILL.md b/.claude/skills/webjs-scaffold-sync/SKILL.md index 7f53642e8..6c058aa71 100644 --- a/.claude/skills/webjs-scaffold-sync/SKILL.md +++ b/.claude/skills/webjs-scaffold-sync/SKILL.md @@ -199,19 +199,24 @@ Run the mandatory generate + boot + check verifications in PARALLEL when more th ```sh # generate (files only is enough for structure/typecheck; install to boot) node -e "import('packages/cli/lib/create.js').then(m => m.scaffoldApp('probe', '/tmp/x', { template: 'full-stack', install: false }))" - # then in the generated app: webjs check (only no-scaffold-placeholder should - # remain), webjs typecheck (clean), and boot it to hit the new route(s). + # then in the generated app: webjs check (clean), webjs typecheck (clean), + # and boot it to hit the new route(s). ``` A scaffold change is NOT done until a freshly generated app of each affected - template BOOTS, serves the new/changed route, passes `webjs check` (only the - intended `no-scaffold-placeholder` markers), and `webjs typecheck` is clean. + template BOOTS, serves the new/changed route, passes `webjs check`, and + `webjs typecheck` is clean. 5. Run the scaffold tests (`node --test 'test/scaffolds/*.test.js'`) and add/adjust assertions (a new demo in the FEATURES list, a per-template inclusion/exclusion test, the counterfactual). 6. Respect the prose-punctuation invariant (#11) in every comment and doc, and keep each demo densely commented (a header stating the webjs concept + the - why, inline comments on the non-obvious idiom, a `webjs-scaffold-placeholder` - marker). The scaffold teaches by its comments; a thin demo is a bug. + why, and inline comments on the non-obvious idiom). Add a prune note where + removal is NOT obvious, which is what the demos that carry one do: a card + spanning several paths (the auth card names its route, its module, its api + routes and its schema column), or one that depends on another (the + server-actions card says to prune it with auth). A self-contained demo needs + none, since `npm run gallery:clear` sheds the lot. The scaffold teaches by its comments, and a thin demo is a + bug. ## Audit-mode procedure (sweep the scaffold for drift) diff --git a/AGENTS.md b/AGENTS.md index 11ba7368e..ac85c5094 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -290,7 +290,7 @@ Default export receives `{ children, params, searchParams, url }`, must embed `c ### Error / loading / metadata routes -`error.{js,ts}` default-exports `({ error, ...ctx }) => TemplateResult` (catches sibling-page / deeper render errors, innermost wins, prod sends only `error.message`). `loading.{js,ts}` wraps the sibling page in `Suspense` with an immediately-flushed fallback. `forbidden.{js,ts}` / `unauthorized.{js,ts}` render the nearest 403 / 401 boundary for a thrown `forbidden()` / `unauthorized()` (#848). Two **root-only** boundaries (`app/` root exactly): `global-error.{js,ts}` is the app-wide catch-all tried after the nested `error` boundaries are exhausted, and it renders its **own** `` document (returned verbatim, since a root-layout failure is when it fires). Because it is returned verbatim (no framework `` splice), it ships **no importmap or boot script**, so keep it **static HTML with no components/hydration** (a last-resort page must not depend on the module system that may have just failed); under an opt-in CSP, an inline `