@zero2webmaster/starter-kit 0.15.1 → 0.16.2

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.15.1 | **Framework:** 2.13.0
3
+ **Version:** 0.16.2 | **Framework:** 2.18.0
4
4
 
5
5
  > Node CLI to scaffold new Z2W projects from canonical Templates + AGENTS.md.
6
6
 
@@ -115,4 +115,4 @@ Inquiries: kerry@zero2webmaster.com.
115
115
  ---
116
116
 
117
117
  *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.*
118
- *Version: 0.15.1 | Last Updated: 2026-08-08*
118
+ *Version: 0.16.2 | Last Updated: 2026-08-13*
@@ -58,6 +58,11 @@ const INDEX_HTML_TEMPLATE = `<!DOCTYPE html>
58
58
  <meta name="description" content="{{description}}" />
59
59
  <link rel="canonical" href="__SITE_URL__/" />
60
60
 
61
+ <!-- Browser-tab icon. Generated placeholder (brand primary + initial) — it is
62
+ here so the tab is never blank. Replace icon.svg's contents with real
63
+ artwork, or point this at a favicon.ico, whenever you have one. -->
64
+ <link rel="icon" href="/icon.svg" type="image/svg+xml" />
65
+
61
66
  <!-- Open Graph -->
62
67
  <meta property="og:title" content="{{brand_name}} — {{slug}}" />
63
68
  <meta property="og:description" content="{{description}}" />
@@ -192,6 +197,7 @@ Per Z2W standing org requirement 2026-05-30. Run before adding a new page AND be
192
197
  - [ ] \`<title>\` is unique and intentional (not just brand name)
193
198
  - [ ] \`<meta name="description">\` is unique and intentional
194
199
  - [ ] \`<link rel="canonical">\` set
200
+ - [ ] \`<link rel="icon">\` present (copy it from \`index.html\` — a new HTML file added by hand starts with a blank tab)
195
201
  - [ ] OG + Twitter Card tags present; \`og:image\` resolves
196
202
  - [ ] Exactly one \`<h1>\` stating the page's primary topic
197
203
  - [ ] Heading hierarchy logical (H1 → H2 → H3, no skipped levels)
@@ -207,6 +213,7 @@ Per Z2W standing org requirement 2026-05-30. Run before adding a new page AND be
207
213
  - [ ] Exactly one \`<h1>\` per page; heading hierarchy logical
208
214
  - [ ] Canonical URL set on every page
209
215
  - [ ] OG + Twitter Card tags present; OG image resolves
216
+ - [ ] **Browser tab shows an icon.** \`icon.svg\` + the \`<link rel="icon">\` in \`index.html\` ship by default, so this should pass — check it anyway, because there is no build step here and nothing automated can. Verify against the SERVED site: \`curl -sI <url>/icon.svg\` returns \`200\` with \`content-type: image/svg+xml\`
210
217
  - [ ] Meaningful images have descriptive alt text; decorative images have \`alt=""\`
211
218
  - [ ] JSON-LD present where warranted; validates in Google Rich Results test
212
219
  - [ ] \`sitemap.xml\` generates correctly; \`robots.txt\` references it
@@ -220,6 +227,7 @@ Per Z2W standing org requirement 2026-05-30. Run before adding a new page AND be
220
227
  - ✅ \`sitemap.xml\`
221
228
  - ✅ \`robots.txt\` (references sitemap)
222
229
  - ✅ \`_headers\` — preview deploys emit \`X-Robots-Tag: noindex, nofollow\`
230
+ - ✅ \`icon.svg\` + \`<link rel="icon">\` — a generated brand mark so the browser tab is never blank
223
231
 
224
232
  ## Still author-driven (you fill these in)
225
233
 
@@ -228,6 +236,30 @@ Per Z2W standing org requirement 2026-05-30. Run before adding a new page AND be
228
236
  - ⏳ Drop a real 1200x630 \`public/og-image.png\` in place of the placeholder
229
237
  - ⏳ Tune the \`_headers\` preview-URL pattern if your domain layout differs from the default \`*.pages.dev\` pattern
230
238
  `;
239
+ /**
240
+ * The browser-tab icon for a static Pages deploy — the `cf-pages` counterpart
241
+ * to `nextjs`'s generated `app/icon.tsx`.
242
+ *
243
+ * Emitted for the same reason: NOTHING CATCHES ITS ABSENCE. There is no build
244
+ * step here at all, so a blank tab has even fewer signals than in the Next.js
245
+ * case — the only symptom is a human looking at the tab, which is how it was
246
+ * eventually found (Kerry, 2026-08-09).
247
+ *
248
+ * SVG rather than a generated PNG because a static host has no runtime to
249
+ * render one, and an inline SVG needs no toolchain, no binary asset in git, and
250
+ * no build. Modern browsers all accept `rel="icon"` with `image/svg+xml`.
251
+ *
252
+ * Real artwork later: replace this file's contents, or drop a `favicon.ico` at
253
+ * the site root and point the `<link rel="icon">` in `index.html` at it. The
254
+ * generated mark is a floor, not something to undo.
255
+ */
256
+ const ICON_SVG_TEMPLATE = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" role="img" aria-label="{{brand_name}}">
257
+ <title>{{brand_name}}</title>
258
+ <rect width="32" height="32" fill="{{primary_color}}" />
259
+ <text x="16" y="17" fill="#ffffff" font-family="system-ui, sans-serif" font-size="20" font-weight="700"
260
+ text-anchor="middle" dominant-baseline="central">{{brand_initial}}</text>
261
+ </svg>
262
+ `;
231
263
  export function scaffoldCfPages(inputs, opts) {
232
264
  const spec = resolveBrandSpec(inputs);
233
265
  const base = commonBaseFiles(inputs, opts, NARRATIVE);
@@ -238,6 +270,7 @@ export function scaffoldCfPages(inputs, opts) {
238
270
  { path: "_headers", content: sub(HEADERS_TEMPLATE, inputs, opts, spec) },
239
271
  { path: "_redirects", content: sub(REDIRECTS_TEMPLATE, inputs, opts, spec) },
240
272
  { path: "public/og-image.txt", content: OG_IMAGE_PLACEHOLDER },
273
+ { path: "icon.svg", content: sub(ICON_SVG_TEMPLATE, inputs, opts, spec) },
241
274
  { path: "health.json", content: HEALTH_JSON_TEMPLATE },
242
275
  {
243
276
  path: "SEO-CHECKLIST.md",
@@ -62,6 +62,12 @@ export declare function commonMarketing(inputs: ScaffoldInputs, opts: Scaffolder
62
62
  export declare function commonBackups(inputs: ScaffoldInputs, opts: ScaffolderOptions | undefined, spec: BrandPresetSpec): ScaffoldFile;
63
63
  export declare function commonVersion(): ScaffoldFile;
64
64
  export declare function commonCursorignore(): ScaffoldFile;
65
+ /**
66
+ * Tracked project config, NOT ignored — see CURSOR_INDEXING_IGNORE_TEMPLATE for
67
+ * the 2026-08-12 ruling and why the previous gitignore position was
68
+ * self-defeating.
69
+ */
70
+ export declare function commonCursorIndexingIgnore(): ScaffoldFile;
65
71
  export declare function commonDirective(inputs: ScaffoldInputs, opts: ScaffolderOptions | undefined, spec: BrandPresetSpec): ScaffoldFile;
66
72
  /**
67
73
  * Per-type `.gitignore` body. Sources: skill's "Inline mini-templates"
@@ -446,7 +446,50 @@ __pycache__/
446
446
  *.zip
447
447
  .specstory/
448
448
  .vscode/
449
- .cursorindexingignore
449
+ `;
450
+ /**
451
+ * `.cursorindexingignore` — EMITTED as tracked project config.
452
+ *
453
+ * **Ruling, 2026-08-12, at `audit-engine`'s request (their `standards.
454
+ * gitignore-entries` check had been held since 2026-07-27 over exactly this,
455
+ * ~48 findings behind it).** The portfolio openly disagreed with itself:
456
+ * `contest-management` documents in its own `.gitignore` that the file IS
457
+ * project config and should be tracked, `cursor-project-templates` ships it as
458
+ * content, 33 of 57 non-archived org repos track it — while this scaffolder's
459
+ * 2026-07-12 fix put it in the emitted `.gitignore`, and `dashboard-engine`
460
+ * untracked theirs. Both positions were held in writing by projects that had
461
+ * thought about it, so it needed a ruling rather than 33 bug reports.
462
+ *
463
+ * **The answer is TRACKED**, and the deciding evidence is that the file has a
464
+ * real, deliberate, IDENTICAL body everywhere it exists — Templates,
465
+ * `contest-management` and `leaderboard` are byte-for-byte the same two lines,
466
+ * naming this repo's own `.specstory/` directory. That is authored project
467
+ * config in the same category as `.gitignore`, `.editorconfig` or `.nvmrc`: a
468
+ * statement about THIS repository, true for every clone and every developer.
469
+ * It is not a per-machine preference like `.vscode/`.
470
+ *
471
+ * **The gitignore position was self-defeating, which is what settles it.**
472
+ * `cursor-project-templates` ships this file as canonical content; if the
473
+ * scaffolded `.gitignore` names it, that content can never reach a clone — the
474
+ * file would be emitted, immediately made invisible to git, and its carefully
475
+ * chosen rules would silently fail to travel. A canonical file that cannot
476
+ * propagate is worse than no canonical file.
477
+ *
478
+ * **And the 2026-07-12 problem is still solved, by better means.** That fix was
479
+ * motivated by a real symptom: a freshly-scaffolded repo opening to a dirty
480
+ * tree with one mystery untracked file, which stopped a first-session agent
481
+ * (`contact-registry`). EMITTING the file fixes that at least as well as
482
+ * ignoring it did — `git status` is clean because the file is tracked and lands
483
+ * in the initial commit, not because it is hidden — and the project gains a
484
+ * useful setting instead of losing one. The premise that failed was "Cursor
485
+ * auto-creates this," which is true of the empty machine-written case and false
486
+ * of the authored one the portfolio actually has.
487
+ *
488
+ * Body is copied verbatim from the canonical file rather than paraphrased.
489
+ */
490
+ const CURSOR_INDEXING_IGNORE_TEMPLATE = `
491
+ # Don't index SpecStory auto-save files, but allow explicit context inclusion via @ references
492
+ .specstory/**
450
493
  `;
451
494
  const DIRECTIVE_TEMPLATE = `# System Architecture — {{slug}}
452
495
 
@@ -787,6 +830,17 @@ export function commonVersion() {
787
830
  export function commonCursorignore() {
788
831
  return { path: ".cursorignore", content: CURSORIGNORE_TEMPLATE };
789
832
  }
833
+ /**
834
+ * Tracked project config, NOT ignored — see CURSOR_INDEXING_IGNORE_TEMPLATE for
835
+ * the 2026-08-12 ruling and why the previous gitignore position was
836
+ * self-defeating.
837
+ */
838
+ export function commonCursorIndexingIgnore() {
839
+ return {
840
+ path: ".cursorindexingignore",
841
+ content: CURSOR_INDEXING_IGNORE_TEMPLATE.trimStart(),
842
+ };
843
+ }
790
844
  export function commonDirective(inputs, opts, spec) {
791
845
  return {
792
846
  path: "directives/system-architecture.md",
@@ -885,8 +939,9 @@ const GITIGNORE_SECRET_SCRATCH_BLOCK = `
885
939
  .tmp/
886
940
  # SpecStory chat transcripts — local only; can contain pasted secrets
887
941
  .specstory/
888
- # Cursor's own index-management file — local, auto-created; keeps git status clean
889
- .cursorindexingignore
942
+ # NOTE: \`.cursorindexingignore\` is deliberately NOT ignored — it is TRACKED
943
+ # project config, and this scaffold emits one. See the ruling in
944
+ # CURSOR_INDEXING_IGNORE_TEMPLATE's docblock.
890
945
  # Editor/extension-local settings — created unbidden, nobody's project config.
891
946
  # If a shared setting is ever genuinely wanted, force-add the ONE narrow file
892
947
  # (e.g. \`git add -f .vscode/extensions.json\`).
@@ -1036,6 +1091,7 @@ export function commonBaseFiles(inputs, opts, perTypeNarrative) {
1036
1091
  commonBackups(inputs, opts, spec),
1037
1092
  commonVersion(),
1038
1093
  commonCursorignore(),
1094
+ commonCursorIndexingIgnore(),
1039
1095
  gitignoreFor(inputs.projectType),
1040
1096
  commonDirective(inputs, opts, spec),
1041
1097
  ];
@@ -6,4 +6,4 @@ export declare function scaffoldNextjs(inputs: ScaffoldInputs, opts?: Scaffolder
6
6
  * they can assert / require the canonical SEO baseline file list without
7
7
  * hardcoding the paths in two places.
8
8
  */
9
- export declare const NEXTJS_SEO_BASELINE_PATHS: readonly ["app/layout.tsx", "app/page.tsx", "app/sitemap.ts", "app/robots.ts", "lib/seo/canonical-host.mjs", "lib/seo/page-metadata.ts", "app/opengraph-image.tsx", "lib/analytics/utm.ts", "lib/analytics/Analytics.tsx", "lib/analytics/RouteTracker.tsx", "SEO-CHECKLIST.md", ".env.example"];
9
+ export declare const NEXTJS_SEO_BASELINE_PATHS: readonly ["app/layout.tsx", "app/page.tsx", "app/sitemap.ts", "app/robots.ts", "lib/seo/canonical-host.mjs", "lib/seo/page-metadata.ts", "app/opengraph-image.tsx", "app/icon.tsx", "lib/analytics/utm.ts", "lib/analytics/Analytics.tsx", "lib/analytics/RouteTracker.tsx", "SEO-CHECKLIST.md", ".env.example"];
@@ -83,6 +83,7 @@ The components carry **no** \`"use client"\` on purpose, so a Server Component c
83
83
  - \`app/robots.ts\` — robots generator. Indexable requires BOTH a production deployment AND a real canonical domain in \`NEXT_PUBLIC_SITE_URL\`; anything else emits \`Disallow: /\`. **Both files are prerendered at build time, so changing \`NEXT_PUBLIC_SITE_URL\` needs a redeploy.**
84
84
  - \`lib/seo/canonical-host.mjs\` — the one canonical-host predicate, shared by \`app/robots.ts\` and \`next.config.mjs\` so the indexability gate and the alias redirect cannot disagree.
85
85
  - \`app/opengraph-image.tsx\` — default OG image (replace placeholder before launch).
86
+ - \`app/icon.tsx\` — the browser-tab icon, generated from the brand color + initial so the tab is never blank. Next picks it up from the filename alone. To use real artwork, drop an \`icon.png\`/\`icon.svg\` in the same folder — a static file takes precedence, so you do not delete this one.
86
87
  - \`SEO-CHECKLIST.md\` — per-page checklist; consult before adding new pages.
87
88
 
88
89
  **Before launch:** run the SEO baseline pre-launch audit from CLAUDE.md.
@@ -1821,6 +1822,56 @@ describe("card-path bot protection", () => {
1821
1822
  });
1822
1823
  });
1823
1824
  `;
1825
+ /**
1826
+ * The Postgres connection string, appended whenever `dbStrategy` is
1827
+ * `neon-postgres`.
1828
+ *
1829
+ * **This path never had it.** Reported 2026-08-11 by `commerce-engine` on the
1830
+ * first working session of a repo scaffolded the day before, with the question
1831
+ * *"regression, or a path that never had it?"* — `git log -S DATABASE_URL` on
1832
+ * this file returns exactly one commit (v0.14.0, the card-path work), so the
1833
+ * answer is the latter: the `nextjs` scaffolder has never declared its own
1834
+ * connection string. `node-service` always has; only this type was missing it.
1835
+ *
1836
+ * What made a long-standing hole finally visible is worth recording, because it
1837
+ * is the reason nobody noticed for months. Until v0.14.0, `neon-postgres` on a
1838
+ * `nextjs` scaffold emitted no code that READ the variable — the project wired
1839
+ * its own DB layer by hand and declared the var while doing it. v0.14.0's
1840
+ * durable rate limiter is the first emitted module to read it, and it FAILS
1841
+ * OPEN by design (correctly — a limiter outage must never become a payment
1842
+ * outage). So the undocumented variable does not crash the project: it takes
1843
+ * payments with `durable: false` on every request, forever, which the module's
1844
+ * own comment calls "the right behaviour for an outage and the wrong state to
1845
+ * ship in deliberately." Leaving the var undeclared made shipping that state
1846
+ * the DEFAULT.
1847
+ *
1848
+ * Note the shape, which generalises past this variable: **a fail-open
1849
+ * dependency plus an undocumented config key is silent by construction.** Every
1850
+ * signal — build, typecheck, tests, the running app — reports success.
1851
+ *
1852
+ * The three caveats are `commerce-engine`'s own text, offered on the thread and
1853
+ * lifted with thanks; each is a mistake a first-timer makes exactly once.
1854
+ */
1855
+ const NEON_DB_ENV_BLOCK = `
1856
+ # ── Database (Neon Postgres) ─────────────────────────────────────────────────
1857
+ # Connection string for this project's Postgres database.
1858
+ # Create/copy from: https://console.neon.tech/ → your project → Connection Details
1859
+ #
1860
+ # Use the POOLED connection string (the host contains \`-pooler\`). A serverless
1861
+ # app opens a connection per invocation; the direct endpoint runs out.
1862
+ #
1863
+ # Run migrations and seeds as the OWNER role, but connect the APP as a role that
1864
+ # does NOT bypass RLS. \`neondb_owner\` — the role the Neon console hands you —
1865
+ # has \`rolbypassrls = true\`, and BYPASSRLS is evaluated BEFORE any policy is
1866
+ # consulted, so every policy you wrote becomes dead code while
1867
+ # \`pg_tables.rowsecurity\` still reads \`true\`. Check with:
1868
+ # SELECT rolname, rolbypassrls FROM pg_roles WHERE rolname = current_user;
1869
+ #
1870
+ # \`/api/health\` must never touch the database (per [[neon-postgres]] — routine
1871
+ # probes burn the Free tier's 100 CU-hour quota and defeat scale-to-zero). The
1872
+ # scaffolded health route is DB-free; keep it that way.
1873
+ DATABASE_URL=postgresql://user:pass@host-pooler.region.aws.neon.tech/dbname?sslmode=require
1874
+ `;
1824
1875
  const CARD_PATH_ENV_BLOCK = `
1825
1876
  # --- Card-path bot protection (Cloudflare Turnstile) -------------------------
1826
1877
  # Create a widget: https://dash.cloudflare.com/?to=/:account/turnstile
@@ -2691,6 +2742,85 @@ export default function OpengraphImage() {
2691
2742
  );
2692
2743
  }
2693
2744
  `;
2745
+ /**
2746
+ * The browser-tab icon, generated rather than sourced.
2747
+ *
2748
+ * Emitted because NOTHING CATCHES ITS ABSENCE. `next build`, `tsc --noEmit`,
2749
+ * lint and a full test suite are all green with no favicon; the only symptom is
2750
+ * a blank browser tab, which nobody files a bug about. `project-creator` — a
2751
+ * scaffold of this CLI — went through a production launch, four verification
2752
+ * sessions and an SEO pre-launch audit with a blank tab, until Kerry looked at
2753
+ * the tab himself (2026-08-09: *"any user-facing page should have a favicon if
2754
+ * that file or a usable logo file exists"*). Same shape as the OG-image checks
2755
+ * already in the baseline: an asset only a human looking at a rendered surface
2756
+ * will miss.
2757
+ *
2758
+ * Same technique as `app/opengraph-image.tsx` — `ImageResponse` with no source
2759
+ * asset — so **"we have no logo yet" is not a reason to defer it**, which is
2760
+ * precisely the reasoning that left every scaffold with a blank tab.
2761
+ *
2762
+ * Real artwork later needs no code change: an `icon.png` / `icon.svg` in the
2763
+ * same folder TAKES PRECEDENCE over `icon.tsx`, so the generated mark is a
2764
+ * floor rather than something to undo.
2765
+ *
2766
+ * The initial is derived in the emitted code rather than substituted at
2767
+ * scaffold time so it stays correct when the project renames its brand — and a
2768
+ * single glyph is deliberate: a three-letter wordmark is mush at 32px.
2769
+ */
2770
+ const APP_ICON_TEMPLATE = `// Browser-tab icon (favicon). Next.js picks this up from the FILENAME alone
2771
+ // and emits <link rel="icon"> — no app/layout.tsx change is needed.
2772
+ //
2773
+ // This is a generated placeholder, not a design: brand primary as the field,
2774
+ // the brand's first initial in white. It exists so the tab is never blank.
2775
+ //
2776
+ // To replace it with real artwork, drop an \`icon.png\` or \`icon.svg\` into this
2777
+ // same folder. A static icon file TAKES PRECEDENCE over this route, so you do
2778
+ // NOT need to delete this file first.
2779
+
2780
+ import { ImageResponse } from "next/og";
2781
+
2782
+ // NO \`runtime = "edge"\` here, deliberately — copying it from
2783
+ // app/opengraph-image.tsx is the obvious move and it is the wrong one.
2784
+ // Measured on a real build: with edge, \`next build\` warns "Using edge runtime
2785
+ // on a page currently disables static generation for that page" and /icon is
2786
+ // listed \`ƒ (Dynamic) server-rendered on demand\`. Without it, /icon is
2787
+ // \`○ (Static)\` and the PNG is prerendered to .next/server/app/icon.body at
2788
+ // build time — byte-identical output, no function invocation per request.
2789
+ // A favicon is fetched on essentially every cold page load, so this is the
2790
+ // difference between a CDN hit and an invocation. It also agrees with the
2791
+ // portable-stack standard this same scaffold emits: Node runtime over Edge
2792
+ // unless Edge is actually required.
2793
+ export const size = { width: 32, height: 32 };
2794
+ export const contentType = "image/png";
2795
+
2796
+ // Derived here rather than baked in at scaffold time so a brand rename stays
2797
+ // correct. One glyph on purpose — a wordmark is unreadable at 32px.
2798
+ const INITIAL = "{{brand_name}}".trim().charAt(0).toUpperCase();
2799
+
2800
+ export default function Icon() {
2801
+ return new ImageResponse(
2802
+ (
2803
+ <div
2804
+ style={{
2805
+ fontSize: 22,
2806
+ background: "{{primary_color}}",
2807
+ color: "#ffffff",
2808
+ width: "100%",
2809
+ height: "100%",
2810
+ display: "flex",
2811
+ alignItems: "center",
2812
+ justifyContent: "center",
2813
+ fontFamily: "system-ui, sans-serif",
2814
+ fontWeight: 700,
2815
+ }}
2816
+ >
2817
+ {INITIAL}
2818
+ </div>
2819
+ ),
2820
+ { ...size },
2821
+ );
2822
+ }
2823
+ `;
2694
2824
  const SEO_CHECKLIST_TEMPLATE = `# SEO Checklist — {{slug}}
2695
2825
 
2696
2826
  Per Z2W standing org requirement 2026-05-30. Run before adding a new page AND before launch.
@@ -2717,6 +2847,7 @@ Per Z2W standing org requirement 2026-05-30. Run before adding a new page AND be
2717
2847
  - [ ] Exactly one \`<h1>\` per page; heading hierarchy logical
2718
2848
  - [ ] Canonical URL set on every page
2719
2849
  - [ ] OG + Twitter Card tags present; OG image resolves
2850
+ - [ ] **Browser tab shows an icon.** \`app/icon.tsx\` ships a generated placeholder, so this should already pass — check it anyway, because nothing automated can: build, typecheck, lint and tests are all green with a blank tab. Verify against the SERVED page, not the source: \`curl -s <url> | grep -o '<link rel="icon"[^>]*>'\` then open that href and confirm it returns an image
2720
2851
  - [ ] Meaningful images have descriptive alt text; decorative images have \`alt=""\`
2721
2852
  - [ ] JSON-LD present where warranted; validates in Google Rich Results test
2722
2853
  - [ ] \`sitemap.xml\` generates correctly; \`robots.txt\` references it
@@ -2835,6 +2966,13 @@ export function scaffoldNextjs(inputs, opts) {
2835
2966
  if (durableLimit)
2836
2967
  packageJson = withExtraDeps(packageJson, NEON_DRIVER_DEP);
2837
2968
  let envExample = sub(ENV_EXAMPLE_TEMPLATE, inputs, opts, spec);
2969
+ // Gated on the DB STRATEGY, not on `durableLimit` — the variable belongs to
2970
+ // the project's database, not to the one emitted module that happens to read
2971
+ // it today. Gating it on the limiter would re-open the same hole for the next
2972
+ // emitted module, and would leave a `neon-postgres` project that takes no
2973
+ // cards with an undeclared connection string.
2974
+ if (inputs.dbStrategy === "neon-postgres")
2975
+ envExample += NEON_DB_ENV_BLOCK;
2838
2976
  if (sendsEmail)
2839
2977
  envExample += EMAIL_ENV_BLOCK;
2840
2978
  // The host allowlist serves auth email (magic links derive URLs from the Host)
@@ -2899,6 +3037,7 @@ export function scaffoldNextjs(inputs, opts) {
2899
3037
  path: "app/opengraph-image.tsx",
2900
3038
  content: sub(APP_OG_IMAGE_TEMPLATE, inputs, opts, spec),
2901
3039
  },
3040
+ { path: "app/icon.tsx", content: sub(APP_ICON_TEMPLATE, inputs, opts, spec) },
2902
3041
  {
2903
3042
  path: "SEO-CHECKLIST.md",
2904
3043
  content: sub(SEO_CHECKLIST_TEMPLATE, inputs, opts, spec),
@@ -2966,6 +3105,11 @@ export const NEXTJS_SEO_BASELINE_PATHS = [
2966
3105
  // and downgrades the Twitter card.
2967
3106
  "lib/seo/page-metadata.ts",
2968
3107
  "app/opengraph-image.tsx",
3108
+ // The browser-tab icon. In this list because its absence is invisible to
3109
+ // every automated signal — build, typecheck, lint and tests are all green
3110
+ // with a blank tab — so a path-list assertion is the only thing that can
3111
+ // notice it going missing.
3112
+ "app/icon.tsx",
2969
3113
  // Fathom (SEO baseline item 7) — the three-file pattern; the loader alone
2970
3114
  // (data-auto="false" with no RouteTracker) records zero pageviews.
2971
3115
  "lib/analytics/utm.ts",
@@ -51,7 +51,7 @@ export interface StandardsResolution {
51
51
  * family — the safe default for anything else with `has_web_ui=true`.
52
52
  */
53
53
  export declare function fathomEnvVarFor(projectType: ProjectType): string;
54
- export declare const CANONICAL_COORDINATION_BLOCK_VERSION = "v0.1.24";
54
+ export declare const CANONICAL_COORDINATION_BLOCK_VERSION = "v0.1.25";
55
55
  /**
56
56
  * The canonical **Capture Learnings** block, emitted VERBATIM into every
57
57
  * scaffolded `CLAUDE.md`.
@@ -68,7 +68,7 @@ export declare const CANONICAL_COORDINATION_BLOCK_VERSION = "v0.1.24";
68
68
  * missing it on 2026-07-27 — including every project this CLI has scaffolded.
69
69
  * Reported as an ACTION by `z2w-observability-bridge` (2026-07-27); closed here.
70
70
  */
71
- export declare const CAPTURE_LEARNINGS_BLOCK_VERSION = "v1.1.0";
71
+ export declare const CAPTURE_LEARNINGS_BLOCK_VERSION = "v1.2.0";
72
72
  /**
73
73
  * The literal markdown heading each standard renders, keyed by `StandardKey`.
74
74
  *
package/dist/standards.js CHANGED
@@ -403,7 +403,7 @@ const NEON_CAREFUL_BODY = `### Neon-careful (Neon Postgres)
403
403
  // Two consecutive handoffs compared this constant against the DOCUMENT version
404
404
  // and reported a "15-version gap" that did not exist — the real gap was 4. Read
405
405
  // the `<!-- ... canonical-block vX.Y.Z -->` comment, never the `**Version:**` line.
406
- export const CANONICAL_COORDINATION_BLOCK_VERSION = "v0.1.24";
406
+ export const CANONICAL_COORDINATION_BLOCK_VERSION = "v0.1.25";
407
407
  /**
408
408
  * The canonical **Capture Learnings** block, emitted VERBATIM into every
409
409
  * scaffolded `CLAUDE.md`.
@@ -420,7 +420,7 @@ export const CANONICAL_COORDINATION_BLOCK_VERSION = "v0.1.24";
420
420
  * missing it on 2026-07-27 — including every project this CLI has scaffolded.
421
421
  * Reported as an ACTION by `z2w-observability-bridge` (2026-07-27); closed here.
422
422
  */
423
- export const CAPTURE_LEARNINGS_BLOCK_VERSION = "v1.1.0";
423
+ export const CAPTURE_LEARNINGS_BLOCK_VERSION = "v1.2.0";
424
424
  /**
425
425
  * Mirrored from the [[instantiate-z2w-project]] skill's
426
426
  * `references/standards-block.md` per OP #2. **The skill had this standard and
@@ -446,7 +446,7 @@ const CAPTURE_LEARNINGS_BODY = `## Capture Learnings (session end)
446
446
 
447
447
  <!-- cursor-project-templates capture-learnings-block ${CAPTURE_LEARNINGS_BLOCK_VERSION} -->
448
448
 
449
- *(↓ copy this section, including this heading AND the HTML fingerprint comment above, verbatim into each project's \`CLAUDE.md\`, and into \`AGENTS.md\`/\`GEMINI.md\` **where the project already keeps them** — never create those files just to hold this block. The fingerprint lets \`grep\` detect drift across projects. Canonical source: \`Resources/CAPTURE_LEARNINGS_BLOCK.md\` in \`zero2webmaster/cursor-project-templates\`.)*
449
+ *(↓ copy this section, including this heading AND the HTML fingerprint comment above, verbatim into each project's \`CLAUDE.md\`, and into \`AGENTS.md\`/\`GEMINI.md\` **where the project already keeps them** — never create those files just to hold this block. The fingerprint lets \`grep\` detect drift across projects. Canonical source: \`Resources/CAPTURE_LEARNINGS_BLOCK.md\`, in the framework-templates repo named by the fingerprint comment above.)*
450
450
 
451
451
  **At the end of every session, decide whether anything you learned this session should become a skill — and state the verdict in your recap.** This fires by default, unasked. It is **never** a question you put to the project owner ("want me to make a skill?"); it is a decision you make and report.
452
452
 
@@ -462,7 +462,7 @@ const CAPTURE_LEARNINGS_BODY = `## Capture Learnings (session end)
462
462
 
463
463
  **Report the verdict even when it's negative.** "Nothing worth capturing this session" is a valid and expected outcome, and saying it out loud is the point: a reflex nobody can see is indistinguishable from a reflex nobody ran.
464
464
 
465
- **If you notice this step missing from another project, do not just fix that one file.** Two or more projects missing it means the *enrollment* step is the bug, not the rows. File it with \`cursor-project-templates\` (owns the canonical block), \`z2w-starter-kit\` (owns the scaffold/\`init\` path), and \`z2w-agent-coordination\` (owns \`scripts/check-fingerprint-drift.sh\`, the only propagation checker in this ecosystem that has demonstrably worked).
465
+ **If you notice this step missing from another project, do not just fix that one file.** Two or more projects missing it means the *enrollment* step is the bug, not the rows. File it with the three owners — the repo that owns this canonical block, the repo that owns the scaffold/\`init\` path, and the repo that owns the propagation checker (a fingerprint drift sweep is the only propagation mechanism in this ecosystem that has demonstrably worked) — rather than with whichever project you happened to notice it in. The **\`capture-learning\`** skill names all three for this organization.
466
466
 
467
467
  Full routing rubric, worked examples, and the Skill Vault's own commit conventions: the **\`capture-learning\`** skill.
468
468
  `;
@@ -41,6 +41,19 @@ export declare function upperSnakeFromSlug(slug: string): string;
41
41
  * map to the WP AGENTS line; everything else to the generic line.
42
42
  */
43
43
  export declare function frameworkVersionForType(projectType: ProjectType): string;
44
+ /**
45
+ * A single uppercase glyph for the generated favicon in static scaffolds
46
+ * (`cf-pages`), where there is no runtime to derive one.
47
+ *
48
+ * ONE letter is deliberate — a three-letter wordmark is mush at 32px.
49
+ *
50
+ * Restricted to `[A-Za-z0-9]` because the value is interpolated into SVG
51
+ * markup: a brand whose name opens with `&` or `<` would otherwise emit an
52
+ * XML-malformed icon, and a broken favicon fails exactly as silently as an
53
+ * absent one. The `slug` fallback cannot itself fail — slugs are validated
54
+ * against `^[a-z][a-z0-9-]{2,49}$`, so character 0 is always a letter.
55
+ */
56
+ export declare function brandInitial(brandName: string, slug: string): string;
44
57
  /**
45
58
  * Build the placeholder → value map for a set of inputs. Exposed (not just
46
59
  * used internally by applySubstitutions) so callers can inspect or extend
@@ -68,6 +68,22 @@ function resolveBrandSpec(inputs, opts) {
68
68
  return opts.brandSpec;
69
69
  return getBrandSpec(inputs.brand, inputs.customBrand, inputs.githubOrg);
70
70
  }
71
+ /**
72
+ * A single uppercase glyph for the generated favicon in static scaffolds
73
+ * (`cf-pages`), where there is no runtime to derive one.
74
+ *
75
+ * ONE letter is deliberate — a three-letter wordmark is mush at 32px.
76
+ *
77
+ * Restricted to `[A-Za-z0-9]` because the value is interpolated into SVG
78
+ * markup: a brand whose name opens with `&` or `<` would otherwise emit an
79
+ * XML-malformed icon, and a broken favicon fails exactly as silently as an
80
+ * absent one. The `slug` fallback cannot itself fail — slugs are validated
81
+ * against `^[a-z][a-z0-9-]{2,49}$`, so character 0 is always a letter.
82
+ */
83
+ export function brandInitial(brandName, slug) {
84
+ const fromBrand = /[A-Za-z0-9]/.exec(brandName);
85
+ return (fromBrand ? fromBrand[0] : slug.charAt(0)).toUpperCase();
86
+ }
71
87
  /**
72
88
  * Build the placeholder → value map for a set of inputs. Exposed (not just
73
89
  * used internally by applySubstitutions) so callers can inspect or extend
@@ -84,6 +100,7 @@ export function buildSubstitutionMap(inputs, opts = {}) {
84
100
  description: inputs.description,
85
101
  brand_name: spec.brandName,
86
102
  brand_name_rule: spec.brandNameRule,
103
+ brand_initial: brandInitial(spec.brandName, inputs.slug),
87
104
  primary_color: spec.primaryColor,
88
105
  accent_color: spec.accentColor,
89
106
  author: spec.author,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zero2webmaster/starter-kit",
3
- "version": "0.15.1",
3
+ "version": "0.16.2",
4
4
  "description": "Node CLI to scaffold new Z2W projects from canonical Templates + AGENTS.md.",
5
5
  "author": {
6
6
  "name": "Dr. Kerry Kriger",
@@ -131,6 +131,35 @@ export function parseArgs(argv) {
131
131
  return args;
132
132
  }
133
133
 
134
+ // Decide whether `--strict` should fail the run, and say WHY.
135
+ //
136
+ // 🔴 `--strict` MUST only judge the dimensions THIS INVOCATION ACTUALLY RECONCILED.
137
+ // `--status-only` deliberately skips the edges half (see `consumesChanged` below), so a
138
+ // zero-edge section is a finding that run has no power to act on and did not look at.
139
+ // The first cut gated on `unreadableStatus || zeroEdges` unconditionally, which meant
140
+ // `--status-only --strict` — the exact pair the Project Registry reconciler cron runs —
141
+ // exited non-zero whenever ANY project file had an unparseable Integrations section,
142
+ // forever, no matter how clean the status lines it was actually reconciling were.
143
+ // `z2w-agent-coordination` reported it 2026-08-13 as the last thing keeping that cron on
144
+ // `workflow_dispatch`.
145
+ //
146
+ // The general rule, and it is why this is a named function rather than an `if`: a strict
147
+ // gate that fails on a signal its own mode ignores is not strict, it is stuck — and it
148
+ // trains the operator to pass `--strict` and disregard the exit code, which costs more
149
+ // than never having had it. Returns the blocking reasons so the caller can print them.
150
+ export function strictExitReasons({ strict, statusOnly, unreadableStatus = [], zeroEdges = [] }) {
151
+ if (!strict) return [];
152
+ const reasons = [];
153
+ if (unreadableStatus.length > 0) {
154
+ reasons.push(`${unreadableStatus.length} unreadable status line(s) (${unreadableStatus.join(", ")})`);
155
+ }
156
+ // Edges are only reconciled when NOT --status-only, so only judge them then.
157
+ if (!statusOnly && zeroEdges.length > 0) {
158
+ reasons.push(`${zeroEdges.length} zero-edge section(s) (${zeroEdges.join(", ")})`);
159
+ }
160
+ return reasons;
161
+ }
162
+
134
163
  // Extract the `## Integrations` section body (everything until the next `## ` heading).
135
164
  export function extractIntegrationsSection(md) {
136
165
  const lines = md.split("\n");
@@ -559,8 +588,14 @@ async function main() {
559
588
 
560
589
  // A scheduled runner needs a non-zero exit to be visible; a human at a terminal reads
561
590
  // the warnings. So strictness is opt-in, and any scheduled invocation should pass it.
562
- if (args.strict && (unreadableStatus.length > 0 || zeroEdges.length > 0)) {
563
- console.error(`\n✗ --strict: ${unreadableStatus.length} unreadable status line(s) + ${zeroEdges.length} zero-edge section(s). Exiting non-zero so this does not pass unnoticed.`);
591
+ const blocking = strictExitReasons({
592
+ strict: args.strict,
593
+ statusOnly: args.statusOnly,
594
+ unreadableStatus,
595
+ zeroEdges,
596
+ });
597
+ if (blocking.length > 0) {
598
+ console.error(`\n✗ --strict: ${blocking.join("; ")}. Exiting non-zero so this does not pass unnoticed.`);
564
599
  process.exit(1);
565
600
  }
566
601
  }