diff --git a/.claude/skills/new-ssp/SKILL.md b/.claude/skills/new-ssp/SKILL.md index 0c6e835..f87742b 100644 --- a/.claude/skills/new-ssp/SKILL.md +++ b/.claude/skills/new-ssp/SKILL.md @@ -14,7 +14,7 @@ business content. Keep the machinery, replace the domain. Clone this repo, `npm ci`, then mechanise the mechanical parts (WP-45): ```bash -node scripts/create-ssp.mjs --name Kvk --context inschrijving +node scripts/create-frontend.mjs --name Kvk --context inschrijving ``` `--name` (PascalCase) replaces `BigRegister.*` everywhere; `--context` (lowercase Dutch @@ -65,7 +65,7 @@ Work through that checklist, keeping the GREEN gate below passing at every step. `@registratie/ui/dashboard.page` — too much else hardcodes `/dashboard` (login's post-auth redirect, `authGuard`'s fallback, header nav/logo, breadcrumb trail, several stories/specs). The script rewrites its `loadComponent` to point at the freshly scaffolded `--context` page - instead (a `TODO(create-ssp)` stopgap landing page, not a real overview). + instead (a `TODO(create-frontend)` stopgap landing page, not a real overview). - `scripts/gen-snippets.mjs` (showcase-only) + its `package.json` script entry + its CI/ `ci-local.sh` "showcase snippets drift" steps: deleted alongside `showcase/` — they run unconditionally, so leaving them breaks `npm run ci` immediately once `showcase/` is gone. diff --git a/docs/project/backlog/README.md b/docs/project/backlog/README.md index 0df2f7a..e55c45c 100644 --- a/docs/project/backlog/README.md +++ b/docs/project/backlog/README.md @@ -95,7 +95,7 @@ for its existing violations, so every WP ends green. | [WP-42](WP-42-privacy-security-showcase.md) | Privacy & security showcase page (mask + no-PII log) | 8 · platform/DX/showcase | done | | [WP-43](WP-43-scaffold-generators.md) | Runnable generators: value-object / form-machine (plop; ui-component/bff = skills) | 8 · platform/DX/showcase | done | | [WP-44](WP-44-context-generator.md) | Runnable generator: `gen:context` | 8 · platform/DX/showcase | done | -| [WP-45](WP-45-create-ssp-generator.md) | `create-ssp` bootstrap generator (mechanise new-ssp) | 8 · platform/DX/showcase | done | +| [WP-45](WP-45-create-frontend-generator.md) | `create-frontend` bootstrap generator (mechanise new-ssp) | 8 · platform/DX/showcase | done | | [WP-46](WP-46-vitest-coverage.md) | Vitest coverage (report + report-only thresholds) | 8 · platform/DX/showcase | done | | [WP-47](WP-47-feature-flags.md) | Runtime feature flags (catalog-in-code, admin toggle, FE+backend) | 8 · platform/DX/showcase | done | | [WP-48](WP-48-stamdata-deletion-protection.md) | Stamdata deletion protection (CI referential gate + editor expire/warn) | 8 · platform/DX/showcase | done | @@ -135,7 +135,7 @@ Phase 8 (platform/DX/showcase, WP-37..46): goal is BOTH a teaching showcase AND starter template. Priority: WP-37 (P0 quick fix) → WP-46 + WP-38 + WP-39 (P1, parallel) → WP-40 (P2) → WP-43 (P3) → WP-41 → WP-42 → WP-44 → WP-45 (P4). Ordering constraints: 41 needs 40's PII kernel; 42 needs 40+41; 44 (`gen:context`) needs 38 (declarative boundaries -make the generator simple) + 43; 45 (`create-ssp`) needs 43+44. 37/38/39/40/43/46 are otherwise +make the generator simple) + 43; 45 (`create-frontend`) needs 43+44. 37/38/39/40/43/46 are otherwise independent. Two open tool forks, decided as step 1 of their WP: 38 dependency-cruiser vs Sheriff; 43 plop vs Angular schematics. Phase 9 (OpenZaak/ZGW integration, WP-49..52) is strictly ordered 49 → 50 → 51 → 52: 49 lands diff --git a/docs/project/backlog/WP-45-create-ssp-generator.md b/docs/project/backlog/WP-45-create-frontend-generator.md similarity index 81% rename from docs/project/backlog/WP-45-create-ssp-generator.md rename to docs/project/backlog/WP-45-create-frontend-generator.md index be4f276..9514339 100644 --- a/docs/project/backlog/WP-45-create-ssp-generator.md +++ b/docs/project/backlog/WP-45-create-frontend-generator.md @@ -1,4 +1,4 @@ -# WP-45 — `create-ssp` bootstrap generator +# WP-45 — `create-frontend` bootstrap generator Status: done (ad7ca31) Phase: 8 — platform/DX/showcase @@ -13,7 +13,7 @@ scaffold keeping the enforced architecture + shared building blocks. ## Decisions -- A `create-ssp` script (Node/plop-driven) that clones-and-strips per the `new-ssp` recipe: +- A `create-frontend` script (Node/plop-driven) that clones-and-strips per the `new-ssp` recipe: drop the business contexts, prune their routes/aliases/boundary entries, rename `BigRegister.*`, re-point the `--rhc-*` token bridge, re-seed the backend, re-run `gen:api`. - Keep-as-is list from `new-ssp` (shared kernel/ui/layout, eslint/boundary config, check-tokens, @@ -22,7 +22,7 @@ scaffold keeping the enforced architecture + shared building blocks. ## Files -- New `scripts/create-ssp.*` (+ any templates); documented in `.claude/skills/new-ssp/SKILL.md`. +- New `scripts/create-frontend.*` (+ any templates); documented in `.claude/skills/new-ssp/SKILL.md`. ## Acceptance criteria diff --git a/docs/reference/scaffolding.md b/docs/reference/scaffolding.md index 2b5b791..ede12f1 100644 --- a/docs/reference/scaffolding.md +++ b/docs/reference/scaffolding.md @@ -71,7 +71,7 @@ step-by-step and its GREEN-at-every-step verify gate. - **`gen:context`** ([WP-44](../project/backlog/WP-44-context-generator.md)) — a runnable version of the `new-context` skill. Planned, not shipped. -- **`create-ssp`** ([WP-45](../project/backlog/WP-45-create-ssp-generator.md)) — +- **`create-frontend`** ([WP-45](../project/backlog/WP-45-create-frontend-generator.md)) — mechanised `new-ssp`. Planned, not shipped. Don't assume either command exists — use the corresponding skill until they land. diff --git a/package.json b/package.json index 99daaa4..ab723d4 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "gen:value-object": "plop value-object", "gen:form-machine": "plop form-machine", "gen:context": "plop context", - "create-ssp": "node scripts/create-ssp.mjs", + "create-frontend": "node scripts/create-frontend.mjs", "serve:i18n": "ng build --configuration development --localize && node scripts/serve-i18n.mjs", "ci": "bash scripts/ci-local.sh", "e2e": "playwright test", diff --git a/plopfile.mjs b/plopfile.mjs index 97bcd2d..b91d271 100644 --- a/plopfile.mjs +++ b/plopfile.mjs @@ -107,12 +107,15 @@ export default function (plop) { template: '"paths": {\n "@{{kebabCase name}}/*": ["src/app/{{kebabCase name}}/*"],\n', }, { - // Boundary entry (WP-38's single source of truth) — inserted right before the - // `showcase: null` line, which never moves. + // Boundary entry (WP-38's single source of truth) — inserted right after the + // `const CONTEXT_ALLOWED = {` opening line, which never moves. (Previously anchored + // on the `showcase: null,` line, but create-frontend.mjs strips that entry before running + // this generator, so the modify silently no-op'd and the new context got no fence at + // all — dep:check stayed green with the boundary rule simply missing.) type: 'modify', path: '.dependency-cruiser.js', - pattern: /(\s*)showcase: null,/, - template: "$1'{{kebabCase name}}': [],$1showcase: null,", + pattern: /const CONTEXT_ALLOWED = \{\n/, + template: 'const CONTEXT_ALLOWED = {\n {{kebabCase name}}: [],\n', }, { // Lazy route — inserted right before the catch-all, which never moves. diff --git a/scripts/create-ssp.mjs b/scripts/create-frontend.mjs similarity index 98% rename from scripts/create-ssp.mjs rename to scripts/create-frontend.mjs index 509738d..b87f96b 100644 --- a/scripts/create-ssp.mjs +++ b/scripts/create-frontend.mjs @@ -9,8 +9,8 @@ // from nothing — those steps print an explicit checklist instead of pretending to solve them. // // Usage: -// node scripts/create-ssp.mjs --name Kvk --context inschrijving -// node scripts/create-ssp.mjs --name Kvk --context inschrijving --keep registratie --dry-run +// node scripts/create-frontend.mjs --name Kvk --context inschrijving +// node scripts/create-frontend.mjs --name Kvk --context inschrijving --keep registratie --dry-run // // --name replaces BigRegister.* everywhere (required) // --context lowercase Dutch ubiquitous term, passed to `plop context` (required) @@ -43,7 +43,7 @@ function parseArgs(argv) { function usageAndExit(message) { if (message) console.error(message + '\n'); console.error( - 'Usage: node scripts/create-ssp.mjs --name --context ' + + 'Usage: node scripts/create-frontend.mjs --name --context ' + '[--keep ] [--dry-run] [--skip-backend]', ); process.exit(1); @@ -351,6 +351,7 @@ const RENAME_CONTENT_FILES = [ 'playwright.config.ts', 'README.md', 'backend/README.md', + 'scripts/ci-local.sh', ]; const SKIP_DIRS = new Set(['bin', 'obj', 'node_modules', '.git']); @@ -465,7 +466,7 @@ function repointDashboard(contextName, registratieWasStripped, args) { const pageClass = `${pascalCase(contextName)}Page`; const next = content.replace( /loadComponent: \(\) => import\('@registratie\/ui\/dashboard\.page'\)\.then\(\(m\) => m\.DashboardPage\),/, - `// TODO(create-ssp): stopgap landing page — point this at a real overview once you have one.\n` + + `// TODO(create-frontend): stopgap landing page — point this at a real overview once you have one.\n` + ` loadComponent: () =>\n` + ` import('@${contextName}/ui/${contextName}.page').then((m) => m.${pageClass}),`, );