@zero2webmaster/starter-kit 0.46.0 → 0.47.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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # z2w-starter-kit
2
2
 
3
- **Version:** 0.46.0 | **Framework:** 2.19.0
3
+ **Version:** 0.47.1 | **Framework:** 2.19.0
4
4
 
5
5
  > Node CLI to scaffold new Z2W projects from canonical Templates + AGENTS.md.
6
6
 
@@ -83,7 +83,11 @@ The Claude Code skill at `~/.claude/skills/instantiate-z2w-project/SKILL.md` and
83
83
 
84
84
  ## Status
85
85
 
86
- - **v0.46.0 (current)** gets `nextjs` scaffolds ready for phones. Installed to a home screen, the app now draws edge to edge (`viewport-fit=cover`), and the page is padded by the phone's safe areas so the notch and home indicator never cover content; CSS variables (`--safe-top`, `--safe-bottom` and so on) let a fixed bar pad itself. A `prefers-reduced-motion` rule turns any animation or transition into an instant change for people who switch on Reduce Motion. Verified on a real build in Chromium: no change at all on an ordinary screen.
86
+ - **v0.47.1 (current)** reads pasted briefs more accurately. A multi-tenant product now reads as Zero2Webmaster even when it names SAVE THE FROGS! as a tenant. Card payments are no longer switched on by a sentence about another app's checkout, or by a "donate" button. The slug is read from the `# slug — Project Brief` title line.
87
+
88
+ - **v0.47.0** keeps our names out of an outside customer's project. A scaffold made with `audience: "external"` used to carry, outside `CLAUDE.md`, code comments citing our internal rules and organizations and about 60 links to our private skills (133 lines across the eight project types). Those comments now read neutrally for everyone, skill links become plain names for outside customers, and an outside `wp-plugin` no longer lists our wordpress.org username. The `@zero2webmaster/starter-kit` credit stays.
89
+
90
+ - **v0.46.0** gets `nextjs` scaffolds ready for phones. Installed to a home screen, the app now draws edge to edge (`viewport-fit=cover`), and the page is padded by the phone's safe areas so the notch and home indicator never cover content; CSS variables (`--safe-top`, `--safe-bottom` and so on) let a fixed bar pad itself. A `prefers-reduced-motion` rule turns any animation or transition into an instant change for people who switch on Reduce Motion. Verified on a real build in Chromium: no change at all on an ordinary screen.
87
91
 
88
92
  - **v0.45.0** runs the tests before every push. `nextjs`, `cf-worker`, `library` and `node-service` scaffolds now ship a tracked `pre-push` hook that runs `npm test`, installed into the repo's own `.git/hooks/` by `npm install` (skipped in CI, never fails an install). Until now the scaffold emitted a test script that nothing ran: `audit-engine` measured 24 of 29 multi-tenant apps whose cross-tenant tests ran only when someone typed the command. A `library` scaffold also gets a starter test, because its first `npm test` used to fail with "No test files found". Verified on real scaffolds from the built `dist/`, through the global hook dispatcher: a green push passes, a red one is refused.
89
93
 
@@ -141,4 +145,4 @@ Inquiries: kerry@zero2webmaster.com.
141
145
  ---
142
146
 
143
147
  *Scaffolded 2026-05-28 via the [[instantiate-z2w-project]] Claude Code skill v1; reconciled against the consolidated skill v1.1.0 (brief-first + Agent Coordination block) on 2026-05-29.*
144
- *Version: 0.46.0 | Last Updated: 2026-10-27*
148
+ *Version: 0.47.1 | Last Updated: 2026-10-27*
@@ -151,6 +151,13 @@ function inferSlug(brief) {
151
151
  if (isValidSlug(candidate))
152
152
  return candidate;
153
153
  }
154
+ // The house brief shape opens `# booking — Project Brief`. Taken only when
155
+ // the first word is ALREADY a lowercase slug, so a display title such as
156
+ // `# Z2W CrowdCommerce — ...` is never kebab-cased into one. Before
157
+ // 2026-10-27 this was missing and every recent brief returned no slug.
158
+ const title = /^#\s+`?([a-z][a-z0-9-]*)`?\s+[—–-]/m.exec(brief);
159
+ if (title && isValidSlug(title[1]))
160
+ return title[1];
154
161
  const purpose = extractSection(brief, "purpose");
155
162
  if (purpose) {
156
163
  const firstSentence = purpose.split(/[.\n]/)[0] ?? "";
@@ -267,15 +274,32 @@ function inferBrand(brief) {
267
274
  if (value === "custom")
268
275
  return "custom";
269
276
  }
270
- const text = brief.toLowerCase();
271
- if (/\bsave\s*the\s*frogs\b|\bstf\b/.test(text))
272
- return "save-the-frogs";
273
- if (/\bbansuri\s*bliss\b/.test(text))
274
- return "bansuri-bliss";
275
- if (/\bvideo\s*migrator\b/.test(text))
276
- return "videomigrator";
277
- if (/\bloom\s*in\s*us\b/.test(text))
278
- return "loominus";
277
+ // Paths and URLs say where files live, not who the app is for: nearly every
278
+ // brief carries `~/Desktop/Zero2Webmaster/...` or `zero2webmaster/<repo>`.
279
+ const text = brief.toLowerCase().replace(/\S*\/\S*/g, " ");
280
+ // A multi-tenant product is a Zero2Webmaster product, whichever
281
+ // organizations it names as tenants (Kerry, 2026-10-07: "all of these
282
+ // should be multi-tenant as we will license them for a fee"). Until
283
+ // 2026-10-27 the first rule below won instead, and 25 of 43 real briefs read
284
+ // as SAVE THE FROGS! — `booking` among them — while every one of those
285
+ // repos lives under the `zero2webmaster` org.
286
+ if (/\bmulti-?tenant\b|\blicensed?\s+(to\s+outside|for\s+a\s+fee)/.test(text)) {
287
+ return "zero2webmaster";
288
+ }
289
+ const named = [
290
+ ["save-the-frogs", /\bsave\s*the\s*frogs\b|\bstf\b/],
291
+ ["bansuri-bliss", /\bbansuri\s*bliss\b/],
292
+ ["videomigrator", /\bvideo\s*migrator\b/],
293
+ ["loominus", /\bloom\s*in\s*us\b/],
294
+ ]
295
+ .filter(([, pattern]) => pattern.test(text))
296
+ .map(([preset]) => preset);
297
+ if (named.length === 1)
298
+ return named[0];
299
+ // Two organizations named and no explicit Brand: field is a guess either
300
+ // way, so leave it unset and let the confirm screen ask.
301
+ if (named.length > 1)
302
+ return null;
279
303
  if (/\bzero2webmaster\b|\bz2w\b/.test(text))
280
304
  return "zero2webmaster";
281
305
  return null;
@@ -579,7 +603,7 @@ function inferHasPublicSurface(brief, projectType) {
579
603
  * a card path is a payment processor, a checkout/donation surface, or a
580
604
  * subscription. A human still confirms on line 14.
581
605
  */
582
- function inferAcceptsCards(brief) {
606
+ function inferAcceptsCards(brief, ownSlug) {
583
607
  const explicit = explicitBoolean(brief, [
584
608
  "accepts credit cards",
585
609
  "accept credit cards",
@@ -589,8 +613,22 @@ function inferAcceptsCards(brief) {
589
613
  ]);
590
614
  if (explicit !== null)
591
615
  return explicit;
592
- const text = brief.toLowerCase();
593
- return /\bstripe\b|\bpayment\s?intent|\bsetup\s?intent|\bcheckout\b|\bcredit\s?cards?\b|\bdonation|\bdonate\b|\bsubscription billing\b|\brecurring (payments?|billing|giving)\b|\bpaypal\b|\bpayment (gateway|processor|element)\b/.test(text);
616
+ // Judged per sentence, because a sentence that names another engine is
617
+ // describing THAT app: `booking`'s brief read as card-taking from "cart and
618
+ // checkout" in a list of what `commerce-engine` owns. Bare "donate" is out
619
+ // for the same reason (it is usually a button that links elsewhere);
620
+ // "donation" still counts.
621
+ const paymentTerms = /\bstripe\b|\bpayment\s?intent|\bsetup\s?intent|\bcheckout\b|\bcredit\s?cards?\b|\bdonation|\bsubscription billing\b|\brecurring (payments?|billing|giving)\b|\bpaypal\b|\bpayment (gateway|processor|element)\b/;
622
+ const otherApps = /\b[a-z0-9]+(?:-[a-z0-9]+)*-engine\b|\b(?:z2w-)?crowdcommerce\b/g;
623
+ // ...unless the sentence also names this project, which makes it the
624
+ // subject ("event-engine creates a Stripe checkout; financial-engine
625
+ // records it").
626
+ const namesAnotherApp = (sentence) => !(ownSlug !== null && new RegExp(`\\b${ownSlug}\\b`).test(sentence)) &&
627
+ (sentence.match(otherApps) ?? []).some((name) => name !== ownSlug);
628
+ return brief
629
+ .toLowerCase()
630
+ .split(/(?<=[.!?])\s+|\n+/)
631
+ .some((sentence) => paymentTerms.test(sentence) && !namesAnotherApp(sentence));
594
632
  }
595
633
  function inferParticipateInBulletin(brief, brand) {
596
634
  const text = brief.toLowerCase();
@@ -725,8 +763,9 @@ export function parseBrief(brief) {
725
763
  const brand = inferBrand(trimmed);
726
764
  const projectType = inferProjectType(trimmed);
727
765
  const hasWebUi = inferHasWebUi(trimmed, projectType);
766
+ const slug = inferSlug(trimmed);
728
767
  return {
729
- slug: inferSlug(trimmed),
768
+ slug,
730
769
  description: inferDescription(trimmed),
731
770
  projectType,
732
771
  brand,
@@ -739,7 +778,7 @@ export function parseBrief(brief) {
739
778
  sendsEmail: inferSendsEmail(trimmed),
740
779
  hasUserContent: inferHasUserContent(trimmed),
741
780
  hasObservability: inferHasObservability(trimmed, projectType, hasWebUi),
742
- acceptsCards: inferAcceptsCards(trimmed),
781
+ acceptsCards: inferAcceptsCards(trimmed, slug),
743
782
  hasPublicSurface: inferHasPublicSurface(trimmed, projectType),
744
783
  briefSections: extractBriefSections(trimmed),
745
784
  raw: brief,
@@ -196,7 +196,7 @@ const SITEMAP_XML_TEMPLATE = `<?xml version="1.0" encoding="UTF-8"?>
196
196
  `;
197
197
  const HEADERS_TEMPLATE = `# Cloudflare Pages headers for {{slug}}.
198
198
  #
199
- # Preview / non-production deploys MUST be noindex per the Z2W SEO baseline
199
+ # Preview / non-production deploys MUST be noindex per the SEO baseline
200
200
  # standing requirement (2026-05-30). On Cloudflare Pages, the simplest
201
201
  # approach is to set a header for the preview URL pattern. Pages also
202
202
  # supports \`!\` patterns for any non-default branch. Adjust the pattern below
@@ -206,7 +206,7 @@ const HEADERS_TEMPLATE = `# Cloudflare Pages headers for {{slug}}.
206
206
  # Preview deploys (*.pages.dev): noindex.
207
207
 
208
208
  # ── The five-header baseline ─────────────────────────────────────────────
209
- # Measured by \`audit-engine\` on 2026-08-20: 22 of 26 reachable Z2W surfaces
209
+ # Measured by an audit on 2026-08-20: 22 of 26 reachable production sites
210
210
  # carried NONE of these. They are config-only and none of them can break
211
211
  # rendering, so there is no reason for a new site to ship without them.
212
212
  #
@@ -312,8 +312,7 @@ Format: [Semantic Versioning](https://semver.org/).
312
312
  // `marketing_plan` field (the at-a-glance status the command center reads).
313
313
  const MARKETING_TEMPLATE = `# Marketing Plan — {{slug}}
314
314
 
315
- > A first-class, tracked artifact for every Z2W project. Per the standing
316
- > Zero2Webmaster rule (2026-06-18): every coding project with any likelihood of
315
+ > A first-class, tracked artifact. Every coding project with any likelihood of
317
316
  > being sold or licensed should carry a marketing plan, kept up to date here.
318
317
 
319
318
  **Project:** {{slug}}
@@ -362,7 +361,7 @@ const MARKETING_TEMPLATE = `# Marketing Plan — {{slug}}
362
361
  // the command center can surface each project's backup status / last-completed.
363
362
  const BACKUPS_TEMPLATE = `# Backup Plan — {{slug}}
364
363
 
365
- > A first-class, tracked artifact for every Z2W project. State here what parts
364
+ > A first-class, tracked artifact for this project. State here what parts
366
365
  > of this project need backups, which are actually backed up, how, and when each
367
366
  > was last verified. Keep it up to date.
368
367
 
@@ -575,7 +574,7 @@ const DIRECTIVE_TEMPLATE = `# System Architecture — {{slug}}
575
574
 
576
575
  **Version:** {{version}} | **Last updated:** {{date}}
577
576
 
578
- This document describes the 3-layer architecture for {{slug}} per the Z2W canonical AGENTS contract. Fill in concrete details as the project takes shape.
577
+ This document describes the 3-layer architecture for {{slug}} per the AGENTS contract in CLAUDE.md. Fill in concrete details as the project takes shape.
579
578
 
580
579
  ## Layer 1: Directive (What to do)
581
580
 
@@ -1023,7 +1022,7 @@ export function commonDirective(inputs, opts, spec) {
1023
1022
  * `settings.json`).
1024
1023
  */
1025
1024
  const GITIGNORE_SECRET_SCRATCH_BLOCK = `
1026
- # Scratch / intermediates (Z2W convention) — never commit
1025
+ # Scratch / intermediates — never commit
1027
1026
  .tmp/
1028
1027
  # SpecStory chat transcripts — local only; can contain pasted secrets
1029
1028
  .specstory/
@@ -1231,7 +1230,7 @@ export function commonBaseFiles(inputs, opts, perTypeNarrative) {
1231
1230
  * event-engine, on Kerry's steer). A provider-router mailer with a stable
1232
1231
  * `sendEmail()` signature: default provider Amazon SES, Resend as a one-env-var
1233
1232
  * swappable alternative (`EMAIL_PROVIDER=resend`). SES is the default because
1234
- * the Z2W stacks already run authenticated SES in production (zero new vendor).
1233
+ * a stack that already runs authenticated SES in production adds no new vendor.
1235
1234
  * See [[email-service-router]].
1236
1235
  *
1237
1236
  * The mailer body has NO {{tokens}} and NO relative imports, so it is
@@ -1284,10 +1283,9 @@ const EMAIL_MAILER_BODY = `// Transactional / auth email — provider router. De
1284
1283
  // credentials from process.env and pulls in the AWS/Resend SDKs.
1285
1284
  //
1286
1285
  // Why SES is the default ([[email-service-router]], 2026-06-28): when a stack
1287
- // already runs authenticated SES in production (SAVE THE FROGS! / Bansuri Bliss /
1288
- // Zero2Webmaster all do), SES is zero new vendor, no domain warmup, and cheap at
1289
- // burst volume — past Resend Free's 100/day · 3k/mo cap, which is shared across
1290
- // the whole Z2W portfolio. Resend stays wired for a non-developer tenant who
1286
+ // already runs authenticated SES in production, SES is zero new vendor, no domain
1287
+ // warmup, and cheap at burst volume — past Resend Free's 100/day · 3k/mo cap,
1288
+ // which is shared by every app on one Resend account. Resend stays wired for a non-developer tenant who
1291
1289
  // wants the easier DX: set EMAIL_PROVIDER=resend + RESEND_API_KEY + RESEND_FROM,
1292
1290
  // no code change. Do NOT add a fifth mail vendor (SendGrid/Mailgun/Postmark/…) —
1293
1291
  // [[email-service-router]] sanctions exactly these.
@@ -1510,7 +1508,7 @@ const EMAIL_SETUP_DIRECTIVE = `# Directive — Wire transactional / auth email f
1510
1508
 
1511
1509
  **Decision (2026-06-28):** {{slug}} sends via **Amazon SES by default**, with
1512
1510
  Resend as a swappable alternative (\`EMAIL_PROVIDER=resend\`). SES is the default
1513
- because the Z2W stacks already run authenticated SES in production — zero new
1511
+ because a stack that already runs authenticated SES in production adds zero new
1514
1512
  vendor, no domain warmup, cheap at burst volume (past Resend Free's shared
1515
1513
  100/day · 3k/mo cap). Resend stays wired for a non-developer client who prefers
1516
1514
  the easier DX. See [[email-service-router]]; DO NOT add a fifth mail vendor.
@@ -376,10 +376,9 @@ function securityHeadersModule(inputs) {
376
376
  // next.config.mjs is plain ESM loaded before any TypeScript exists. tsconfig.json
377
377
  // sets \`allowJs: true\`, so test/security-headers.test.ts type-checks it too.
378
378
  //
379
- // Baseline: OWASP Secure Headers + the Z2W standard in [[web-security-headers]],
380
- // whose reference implementation is the \`leaderboard\` app. Measured by
381
- // \`audit-engine\` on 2026-08-20: 22 of 26 reachable Z2W surfaces carried NONE of
382
- // these five headers, and \`leaderboard\` carried five of five. This file is the
379
+ // Baseline: OWASP Secure Headers + the standard in [[web-security-headers]].
380
+ // Measured by an audit on 2026-08-20: 22 of 26 reachable production sites
381
+ // carried NONE of these five headers. This file is the
383
382
  // second half of that -- the baseline arrives with the scaffold instead of with a
384
383
  // retrofit session someone has to schedule.
385
384
  //
@@ -466,7 +465,7 @@ const JSON_LD_MODULE_TEMPLATE = `// The single gate for JSON-LD. Every \`applica
466
465
  // not care that the sequence was "inside a string" -- from the parser's position
467
466
  // there is no string.
468
467
  //
469
- // JSON.stringify({ name: 'Kerry</scr' + 'ipt><img src=x onerror=alert(1)>' })
468
+ // JSON.stringify({ name: 'Ada</scr' + 'ipt><img src=x onerror=alert(1)>' })
470
469
  // -> a closed script tag followed by a live <img onerror>, from a display name.
471
470
  //
472
471
  // JSON-LD is the dangerous sink and the easiest to miss, for three reasons that
@@ -628,7 +627,7 @@ import { fileURLToPath } from "node:url";
628
627
  import { serializeJsonLd } from "../lib/json-ld";
629
628
 
630
629
  const ROOT = join(dirname(fileURLToPath(import.meta.url)), "..");
631
- const HOSTILE = "Kerry</scr" + "ipt><img src=x onerror=alert(1)>";
630
+ const HOSTILE = "Ada</scr" + "ipt><img src=x onerror=alert(1)>";
632
631
  const U2028 = String.fromCharCode(0x2028);
633
632
 
634
633
  /** Every source file under the project's own directories. */
@@ -712,7 +711,7 @@ import { securityHeaders } from "./lib/security-headers.mjs";
712
711
 
713
712
  // SEO: redirect EVERY auto-assigned PRODUCTION *.vercel.app alias to the custom
714
713
  // domain so none is crawled as an indexable duplicate of the whole site
715
- // (Z2W standing heads-up 2026-06-29; recipe = [[portable-stack]] §24).
714
+ // (recipe: [[portable-stack]] §24).
716
715
  // It lives in-repo (portable — survives a move off Vercel) and self-disables:
717
716
  // - It matches ANY "*.vercel.app" host (regex), so it covers all of Vercel's
718
717
  // production aliases at once — the default project alias, the random-suffixed
@@ -1490,8 +1489,7 @@ function globalsCss(primaryColor) {
1490
1489
  return `/* Global styles.
1491
1490
  *
1492
1491
  * Body typography lives here, not as an inline style on <body>, so there is ONE
1493
- * home for it. Per the standing Zero2Webmaster organization rule, public-facing
1494
- * text is large and easy to read: body 18px+, line-height >= 1.5.
1492
+ * home for it. Public-facing text is large and easy to read: body 18px+, line-height >= 1.5.
1495
1493
  */
1496
1494
 
1497
1495
  :root {
@@ -1774,7 +1772,7 @@ body {
1774
1772
  * the user agent's grey, and \`:disabled\` becomes a state with no appearance.
1775
1773
  * The button then looks completely pressable, the click does nothing, and the
1776
1774
  * user concludes the app is broken rather than that the control is unavailable.
1777
- * That is not hypothetical — a sibling Z2W app shipped fully-pressable-looking
1775
+ * That is not hypothetical — a sibling app shipped fully-pressable-looking
1778
1776
  * disabled buttons across ~50 screens from its first commit, behind a clean
1779
1777
  * typecheck, a green production build and 1,051 passing tests, because this is a
1780
1778
  * rendered-pixel property that no type system or unit test can hold.
@@ -2050,7 +2048,7 @@ const CARD_PATH_GUARD_TEMPLATE = `/**
2050
2048
  * ║ \`test/card-path-standards.test.ts\` runs this for you on every \`npm test\`. ║
2051
2049
  * ╚══════════════════════════════════════════════════════════════════════════╝
2052
2050
  *
2053
- * Why the grep is part of the standard: a Z2W WooCommerce gateway (measured
2051
+ * Why the grep is part of the standard: a WooCommerce gateway (measured
2054
2052
  * 2026-08-06) had a working \`verify_turnstile()\` and \`is_rate_limited()\` and
2055
2053
  * called them in EXACTLY ONE of three card-accepting paths. The two bare ones
2056
2054
  * were authenticated, nonce'd and ownership-checked — none of which limits
@@ -2647,7 +2645,7 @@ const CARD_PATH_STANDARDS_TEST_TEMPLATE = `/**
2647
2645
  * not *how many* — an authenticated, nonce'd, ownership-checked endpoint is still
2648
2646
  * a card-testing oracle if nothing limits volume.
2649
2647
  *
2650
- * A Z2W WooCommerce gateway (measured 2026-08-06) had both guards implemented and
2648
+ * A WooCommerce gateway (measured 2026-08-06) had both guards implemented and
2651
2649
  * called them in exactly ONE of three card-accepting paths. Nobody spotted it by
2652
2650
  * reading the code; a grep did. This test is that grep, run on every \`npm test\`.
2653
2651
  *
@@ -3978,8 +3976,7 @@ describe("Sentry data-collection policy", () => {
3978
3976
  });
3979
3977
  });
3980
3978
  `;
3981
- const APP_LAYOUT_TEMPLATE = `// Root layout — SEO baseline wiring per Z2W standing org requirement
3982
- // 2026-05-30. Every indexable page MUST export its own \`metadata\`; do not
3979
+ const APP_LAYOUT_TEMPLATE = `// Root layout — SEO baseline wiring. Every indexable page MUST export its own \`metadata\`; do not
3983
3980
  // rely on these defaults to fill in per-page values.
3984
3981
  //
3985
3982
  // ⚠️ These \`openGraph\` / \`twitter\` objects are DEFAULTS, not a base to extend.
@@ -3992,8 +3989,7 @@ import { Analytics } from "@/lib/analytics/Analytics";
3992
3989
  import { InfoHintCloser } from "@/components/InfoHintCloser";
3993
3990
  import { serializeJsonLd } from "@/lib/json-ld";
3994
3991
 
3995
- // Global styles. Body typography (18px / 1.5, per the standing Zero2Webmaster
3996
- // readability rule) lives in this file, NOT as an inline style on <body>, so
3992
+ // Global styles. Body typography (18px / 1.5, for readability) lives in this file, NOT as an inline style on <body>, so
3997
3993
  // there is one home for it rather than two that can drift.
3998
3994
  import "./globals.css";
3999
3995
 
@@ -4154,7 +4150,7 @@ const PWA_ICON_SVG_TEMPLATE = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="
4154
4150
  `;
4155
4151
  const PWA_SERVICE_WORKER_TEMPLATE = `// Service worker for {{brand_name}} — {{slug}}.
4156
4152
  //
4157
- // 🔴 IT NEVER STORES A PAGE. Most Z2W apps show something personal once a
4153
+ // 🔴 IT NEVER STORES A PAGE. Most apps show something personal once a
4158
4154
  // person signs in (their records, their organization's data, their name in the
4159
4155
  // header). A cached copy of such a page stays in the browser after sign-out,
4160
4156
  // readable offline by whoever picks the phone up next, and it shows yesterday's
@@ -4172,7 +4168,7 @@ const PWA_SERVICE_WORKER_TEMPLATE = `// Service worker for {{brand_name}} — {{
4172
4168
  // ids only where it can, and clears it at sign-out (the \`mobile-apps\` skill,
4173
4169
  // references/offline-sync.md). Not here.
4174
4170
  //
4175
- // The cache name is namespaced per app because two Z2W apps can share an
4171
+ // The cache name is namespaced per app because two apps can share an
4176
4172
  // origin (rootdomain.com/app-a, rootdomain.com/app-b — see
4177
4173
  // [[subdomain-vs-subdirectory]]) and a shared cache name would have them
4178
4174
  // evicting each other's entries on every activate.
@@ -4201,7 +4197,7 @@ self.addEventListener("activate", (event) => {
4201
4197
  caches
4202
4198
  .keys()
4203
4199
  // 🔴 Scoped to OUR prefix, not "everything that is not the current
4204
- // cache". caches.keys() returns every cache on the ORIGIN, and two Z2W
4200
+ // cache". caches.keys() returns every cache on the ORIGIN, and two
4205
4201
  // apps routinely share one — the standing guidance is to put
4206
4202
  // SEO-important apps at rootdomain.com/path behind a Cloudflare front
4207
4203
  // door rather than on a subdomain ([[subdomain-vs-subdirectory]]). An
@@ -4421,7 +4417,7 @@ const ANALYTICS_UTM_TEMPLATE = `export const UTM_KEYS = [
4421
4417
  export type UtmKey = (typeof UTM_KEYS)[number];
4422
4418
  export type UtmParams = Partial<Record<UtmKey, string>>;
4423
4419
 
4424
- // Slug-namespaced so two Z2W apps sharing a domain don't collide in storage.
4420
+ // Slug-namespaced so two apps sharing a domain don't collide in storage.
4425
4421
  const STORAGE_KEY = "{{slug}}_utm_first_touch";
4426
4422
  const SENT_FLAG_KEY = "{{slug}}_utm_event_sent";
4427
4423
 
@@ -4898,7 +4894,7 @@ CANONICAL_HOSTS=
4898
4894
  # not remove it — the same fail-closed-on-empty rule as ALLOWED_EMAILS.
4899
4895
  #
4900
4896
  # Magic-link auth needs this and it is not optional: \`trustHost: true\` with no
4901
- # AUTH_URL (the correct Z2W setting — a fixed AUTH_URL breaks tenant vanity
4897
+ # AUTH_URL (the correct setting — a fixed AUTH_URL breaks tenant vanity
4902
4898
  # domains) means Auth.js derives every magic-link URL from the incoming Host
4903
4899
  # header with NOTHING validating it. An attacker can request a link for someone
4904
4900
  # else's address on a forged Host; the victim gets a genuine, correctly-signed
@@ -5690,7 +5686,7 @@ const VERCEL_JSON = JSON.stringify({ $schema: "https://openapi.vercel.sh/vercel.
5690
5686
  const VERCEL_IGNORE_TEST_TEMPLATE = `/**
5691
5687
  * vercel.json carries an Ignored Build Step: a push that changes nothing but
5692
5688
  * Markdown (STATUS.md, HANDOFF.md, CHANGELOG.md, ...) does NOT rebuild the site.
5693
- * Measured 2026-09-22 across 19 Zero2Webmaster Vercel projects: 35.6% of commits
5689
+ * Measured 2026-09-22 across 19 production Vercel projects: 35.6% of commits
5694
5690
  * to main changed no application code, and build CPU was 71% of the Vercel bill.
5695
5691
  *
5696
5692
  * Vercel's exit codes are INVERTED: exit 0 SKIPS the build, anything else builds.
@@ -58,7 +58,7 @@ const PROTOCOL_README_TEMPLATE = `# {{slug}}
58
58
 
59
59
  ## How consumers use it
60
60
 
61
- Each consumer agent in the Z2W ecosystem reads this repo via \`gh api repos/{{github_org}}/{{slug}}/contents/<file>.md\` or \`git clone\`. Auth = each consumer's existing \`gh\` CLI auth — zero new credentials.
61
+ Each consumer agent reads this repo via \`gh api repos/{{github_org}}/{{slug}}/contents/<file>.md\` or \`git clone\`. Auth = each consumer's existing \`gh\` CLI auth — zero new credentials.
62
62
 
63
63
  ## File layout
64
64
 
@@ -92,7 +92,7 @@ This document defines the live protocol consumers of \`{{slug}}\` follow. The RE
92
92
 
93
93
  ## §2 — Participating projects
94
94
 
95
- [TODO — list which Z2W projects are participants in this protocol, and how they're identified.]
95
+ [TODO — list which projects are participants in this protocol, and how they're identified.]
96
96
 
97
97
  ## §3 — File format
98
98
 
@@ -138,7 +138,7 @@ This file holds cross-project signals that affect 2+ participating projects, or
138
138
  `;
139
139
  const PROJECTS_KEEP_TEMPLATE = `# Per-project files
140
140
 
141
- This directory holds one markdown file per participating Z2W project. Each consumer agent maintains its own file (\`projects/<their-slug>.md\`) and reads other projects' files for cross-project signals.
141
+ This directory holds one markdown file per participating project. Each consumer agent maintains its own file (\`projects/<their-slug>.md\`) and reads other projects' files for cross-project signals.
142
142
 
143
143
  Bootstrap a new project file by copying the schema from any existing one, or from the AGENT_PROTOCOL.md mini-template if one is defined.
144
144
  `;
@@ -127,6 +127,17 @@ if (!defined('WP_UNINSTALL_PLUGIN')) {
127
127
  // Example:
128
128
  // delete_option('{{slug_under}}_settings');
129
129
  `;
130
+ /**
131
+ * `Contributors:` takes wordpress.org usernames. Ours is `kerrykriger`, which is
132
+ * right for our own brands and wrong for a custom (outside) brand, whose
133
+ * username we do not know. Guessing one would state something nobody measured,
134
+ * so a custom brand gets no line at all; WordPress reads the file without it.
135
+ */
136
+ function readmeTxtTemplate(inputs) {
137
+ if (inputs.brand !== "custom")
138
+ return README_TXT_TEMPLATE;
139
+ return README_TXT_TEMPLATE.replace("Contributors: kerrykriger\n", "");
140
+ }
130
141
  const README_TXT_TEMPLATE = `=== {{slug}} ===
131
142
  Contributors: kerrykriger
132
143
  Tags: {{slug}}
@@ -194,7 +205,7 @@ const MODULE_LOADER_TEMPLATE = `<?php
194
205
  * Module loader for {{slug}}.
195
206
  *
196
207
  * Singleton; instantiates registered modules in a fixed order. Mirrors the
197
- * canonical Z2W WordPress module-loader pattern (see [[wordpress-plugins-skill]]).
208
+ * canonical WordPress module-loader pattern (see [[wordpress-plugins-skill]]).
198
209
  *
199
210
  * To add a module:
200
211
  * 1. Drop the class file in includes/modules/
@@ -244,7 +255,7 @@ export function scaffoldWpPlugin(inputs, opts) {
244
255
  const typeSpecific = [
245
256
  { path: `${inputs.slug}.php`, content: sub(PLUGIN_HEADER_TEMPLATE, inputs, opts, spec) },
246
257
  { path: "uninstall.php", content: sub(UNINSTALL_TEMPLATE, inputs, opts, spec) },
247
- { path: "readme.txt", content: sub(README_TXT_TEMPLATE, inputs, opts, spec) },
258
+ { path: "readme.txt", content: sub(readmeTxtTemplate(inputs), inputs, opts, spec) },
248
259
  {
249
260
  path: `includes/class-${inputs.slug}-activator.php`,
250
261
  content: sub(ACTIVATOR_TEMPLATE, inputs, opts, spec),
package/dist/writer.js CHANGED
@@ -366,6 +366,20 @@ export async function writeScaffold(inputs, targetPath, opts = {}) {
366
366
  files.push(file);
367
367
  }
368
368
  }
369
+ // The same pointer rewrite for EVERY other emitted file. Until v0.47.0 it ran
370
+ // on CLAUDE.md alone, so an outside customer's code comments and env files
371
+ // still carried ~60 `[[skill]]` links they cannot open (`project-creator`,
372
+ // 2026-10-07; measured across all eight project types 2026-10-27).
373
+ // TOML is skipped because `[[name]]` is real syntax there (an array of tables,
374
+ // e.g. `[[routes]]` in wrangler.toml), and rewriting it would break the file.
375
+ if (audience === "external") {
376
+ for (let i = 0; i < files.length; i++) {
377
+ const file = files[i];
378
+ if (file.path === "CLAUDE.md" || file.path.endsWith(".toml"))
379
+ continue;
380
+ files[i] = { ...file, content: stripVaultPointers(file.content, audience) };
381
+ }
382
+ }
369
383
  for (const file of files) {
370
384
  assertScaffoldedPathSafe(resolvedTarget, file);
371
385
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zero2webmaster/starter-kit",
3
- "version": "0.46.0",
3
+ "version": "0.47.1",
4
4
  "description": "Node CLI to scaffold new Z2W projects from canonical Templates + AGENTS.md.",
5
5
  "author": {
6
6
  "name": "Dr. Kerry Kriger",