@zero2webmaster/starter-kit 0.9.3 → 0.9.4
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 +4 -3
- package/dist/inventory.d.ts +16 -1
- package/dist/inventory.js +17 -2
- package/dist/standards.js +14 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# z2w-starter-kit
|
|
2
2
|
|
|
3
|
-
**Version:** 0.9.
|
|
3
|
+
**Version:** 0.9.4 | **Framework:** 2.13.0
|
|
4
4
|
|
|
5
5
|
> Node CLI to scaffold new Z2W projects from canonical Templates + AGENTS.md.
|
|
6
6
|
|
|
@@ -83,7 +83,8 @@ The Claude Code skill at `~/.claude/skills/instantiate-z2w-project/SKILL.md` and
|
|
|
83
83
|
|
|
84
84
|
## Status
|
|
85
85
|
|
|
86
|
-
- **v0.9.
|
|
86
|
+
- **v0.9.4 (current)** corrects a **privacy understatement in the emitted Sentry standard**. It had told every scaffolded web app to set `sendDefaultPii: true` and described the consequence as *"user IP + request headers"*. Verified against `@sentry/core` 10.69.0's own `defaultPiiToCollectionOptions()`, that flag resolves **ten** axes on — including `httpBodies` in all four directions, `databaseQueryData`, `stackFrameVariables` (local variable values), and `genAI: { inputs: true, outputs: true }`, which is the user's prompt and the model's completion. The standard now prescribes one complete `dataCollection` block, carries both counter-intuitive traps (a partial block flips the baseline to all-on; `stackFrameVariables` is on in *both* branches so `sendDefaultPii: false` cannot reach it), and makes the **resolver** the binding check rather than any list in a doc. Also retires the registry's `project_type` column in favour of `stack` + `audience`.
|
|
87
|
+
- **v0.9.3** fixes a scaffold-corrupting splice bug and the "GitHub org" wording. The canonical Agent Coordination block contains the anchor `` (`^## Current focus$`) ``, whose `$` and closing backtick form `` $` `` — a `String.replace()` special pattern meaning *"everything before the match"*. Because the block was passed as a replacement **string**, every scaffold emitted since 2026-07-30 pasted its own entire document head into the middle of that sentence. All four canonical-body splices now use a replacer **function**, whose return value is never pattern-interpreted. Separately, the brand block now reads `- **GitHub owner:**` and states the account type: `zero2webmaster` is a GitHub **User**, not an Organization, so `/organizations/...` URLs 404 — wording that had sent two agents to those 404s.
|
|
87
88
|
- **v0.9.2** re-syncs the emitted Capture Learnings block to canonical **v1.1.0** (the `AGENTS.md`/`GEMINI.md` mirror is now conditional). **v0.9.1** republishes v0.9.0 with the corrected LICENSE + README. The 0.9.0 tarball shipped the old text by accident — see CHANGELOG. **v0.9.0** gives every Next.js scaffold accessible form primitives — `components/FormBits.tsx` (`<Field>` / `<Required>` / `<InfoHint>`), the `app/globals.css` they need, a vitest runner, and an *emitted* `test/form-standards.test.ts` that fails on the next hand-rolled form which labels a field "(optional)", hides help text in a placeholder, or marks required with a bare `*`.
|
|
88
89
|
- **v0.8.0 (published)** emits the canonical Capture Learnings block into every scaffolded `CLAUDE.md`, so the session-end "should this become a skill?" step actually reaches the agent working in the new project.
|
|
89
90
|
- **v0.7.0** added `lib/seo/page-metadata.ts` — a `pageMetadata()` helper that returns a complete `openGraph` + `twitter` object every time. Next.js merges metadata *shallowly per top-level key*, so a page that hand-writes a partial `openGraph` silently drops `og:type`, `og:site_name` and `og:image` and downgrades its Twitter card.
|
|
@@ -110,4 +111,4 @@ Inquiries: kerry@zero2webmaster.com.
|
|
|
110
111
|
---
|
|
111
112
|
|
|
112
113
|
*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.*
|
|
113
|
-
*Version: 0.9.
|
|
114
|
+
*Version: 0.9.4 | Last Updated: 2026-08-03*
|
package/dist/inventory.d.ts
CHANGED
|
@@ -36,12 +36,27 @@ export interface BuildProjectRowOptions {
|
|
|
36
36
|
* licensing, notes, research_url, …) are intentionally omitted so the UPSERT's
|
|
37
37
|
* DO UPDATE never clobbers Kerry's hand-entered values.
|
|
38
38
|
*
|
|
39
|
-
* Difference from the Airtable mapper:
|
|
39
|
+
* Difference from the Airtable mapper: the scaffold type IS written here (the Neon
|
|
40
40
|
* column is plain text and the CLI knows the value, so it earns its place per the
|
|
41
41
|
* column-audit principle "a column earns its place only if the CLI can auto-fill
|
|
42
42
|
* it"). The Airtable mapper omitted it only because that base's Project Type is a
|
|
43
43
|
* single-select whose option names could 422 on first use. `skill_vault_aware` is
|
|
44
44
|
* a real boolean here (Neon column type), not the Airtable "Yes" string.
|
|
45
|
+
*
|
|
46
|
+
* 🛑 **`project_type` is SUPERSEDED as of 2026-08-02 and this mapper no longer
|
|
47
|
+
* writes it.** It had been carrying three questions in one column: an audience
|
|
48
|
+
* label a human typed into Airtable years ago, a stack slug THIS function
|
|
49
|
+
* emitted, and 20 NULLs — so `GROUP BY project_type` returned a clean-looking
|
|
50
|
+
* result that meant nothing. This CLI was the source of the second vocabulary,
|
|
51
|
+
* which makes the split ours to perform. Kerry ruled the field "out of date,
|
|
52
|
+
* needs a review and/or should be replaced" (2026-07-30) and ratified the
|
|
53
|
+
* replacement on 2026-08-02: `stack` (how it is built — this enum) and
|
|
54
|
+
* `audience` (who it is for — internal | client | personal).
|
|
55
|
+
*
|
|
56
|
+
* `audience` is deliberately NOT written here. The CLI cannot know it: every
|
|
57
|
+
* value is a judgement about who the project serves, and a scaffolder guessing
|
|
58
|
+
* `internal` for every new repo would recreate exactly the unvalidated
|
|
59
|
+
* categorisation Kerry just retired. It stays a human/agent field.
|
|
45
60
|
*/
|
|
46
61
|
export declare function buildProjectRow(inputs: ScaffoldInputs, opts?: BuildProjectRowOptions): ProjectRow;
|
|
47
62
|
/**
|
package/dist/inventory.js
CHANGED
|
@@ -53,12 +53,27 @@ export function resolveInventoryConfig(env = process.env) {
|
|
|
53
53
|
* licensing, notes, research_url, …) are intentionally omitted so the UPSERT's
|
|
54
54
|
* DO UPDATE never clobbers Kerry's hand-entered values.
|
|
55
55
|
*
|
|
56
|
-
* Difference from the Airtable mapper:
|
|
56
|
+
* Difference from the Airtable mapper: the scaffold type IS written here (the Neon
|
|
57
57
|
* column is plain text and the CLI knows the value, so it earns its place per the
|
|
58
58
|
* column-audit principle "a column earns its place only if the CLI can auto-fill
|
|
59
59
|
* it"). The Airtable mapper omitted it only because that base's Project Type is a
|
|
60
60
|
* single-select whose option names could 422 on first use. `skill_vault_aware` is
|
|
61
61
|
* a real boolean here (Neon column type), not the Airtable "Yes" string.
|
|
62
|
+
*
|
|
63
|
+
* 🛑 **`project_type` is SUPERSEDED as of 2026-08-02 and this mapper no longer
|
|
64
|
+
* writes it.** It had been carrying three questions in one column: an audience
|
|
65
|
+
* label a human typed into Airtable years ago, a stack slug THIS function
|
|
66
|
+
* emitted, and 20 NULLs — so `GROUP BY project_type` returned a clean-looking
|
|
67
|
+
* result that meant nothing. This CLI was the source of the second vocabulary,
|
|
68
|
+
* which makes the split ours to perform. Kerry ruled the field "out of date,
|
|
69
|
+
* needs a review and/or should be replaced" (2026-07-30) and ratified the
|
|
70
|
+
* replacement on 2026-08-02: `stack` (how it is built — this enum) and
|
|
71
|
+
* `audience` (who it is for — internal | client | personal).
|
|
72
|
+
*
|
|
73
|
+
* `audience` is deliberately NOT written here. The CLI cannot know it: every
|
|
74
|
+
* value is a judgement about who the project serves, and a scaffolder guessing
|
|
75
|
+
* `internal` for every new repo would recreate exactly the unvalidated
|
|
76
|
+
* categorisation Kerry just retired. It stays a human/agent field.
|
|
62
77
|
*/
|
|
63
78
|
export function buildProjectRow(inputs, opts = {}) {
|
|
64
79
|
const row = {
|
|
@@ -66,7 +81,7 @@ export function buildProjectRow(inputs, opts = {}) {
|
|
|
66
81
|
project_name: displayNameFromSlug(inputs.slug),
|
|
67
82
|
status: "Active",
|
|
68
83
|
creation_method: "Z2W Starter Kit",
|
|
69
|
-
|
|
84
|
+
stack: inputs.projectType,
|
|
70
85
|
// Write the conventional URL even if `gh repo create` is deferred — the
|
|
71
86
|
// inventory's slug-resolution needs it.
|
|
72
87
|
github_url: `https://github.com/${inputs.githubOrg}/${inputs.slug}`,
|
package/dist/standards.js
CHANGED
|
@@ -307,10 +307,20 @@ const SENTRY_BODY = `### Sentry runtime-error tracking (customer-facing web app)
|
|
|
307
307
|
>
|
|
308
308
|
> 1. **Wire via the wizard, once:** \`npx @sentry/wizard@latest -i nextjs\` (add \`--saas --org <z2w-org> --project {{slug}}\` to skip prompts). It writes the client/server/edge config, the \`instrumentation.ts\` hook, and the build-time source-map upload.
|
|
309
309
|
> 2. **DSN lives in config, NOT an env var.** The DSN is a publishable identifier (not a secret) — hard-code it in the Sentry config files the wizard generates; do NOT introduce a \`NEXT_PUBLIC_SENTRY_DSN\`. The one real secret is \`SENTRY_AUTH_TOKEN\` (build-time source-map upload) — scope it **Production-only** in Vercel and keep it out of the client bundle.
|
|
310
|
-
> 3. **Feature-flag defaults:** Tracing sample rate 1.0 (100%) at Z2W volume; Session Replay 10% of sessions / 100% of sessions-with-errors; Logs on
|
|
311
|
-
>
|
|
312
|
-
>
|
|
313
|
-
>
|
|
310
|
+
> 3. **Feature-flag defaults:** Tracing sample rate 1.0 (100%) at Z2W volume; Session Replay 10% of sessions / 100% of sessions-with-errors; Logs on.
|
|
311
|
+
>
|
|
312
|
+
> 4. **🔴 PII: do NOT set \`sendDefaultPii: true\`, and do NOT write a PARTIAL \`dataCollection\` block. Name every axis.** This bullet replaces a shorter one that said \`sendDefaultPii: true\` was fine because it "carries user IP + request headers." **That was a serious understatement and it shipped in this standard.** Verified 2026-08-02 by reading \`@sentry/core\` 10.69.0's own \`defaultPiiToCollectionOptions()\` rather than the docs — \`sendDefaultPii: true\` resolves **ten** axes on, including **\`httpBodies\` in all four directions** (incoming/outgoing request *and* response), **\`genAI: { inputs: true, outputs: true }\` — the user's PROMPT and the model's COMPLETION**, \`databaseQueryData: true\`, \`graphQL.variables: true\`, and \`stackFrameVariables: true\` (local variable values captured off the stack).
|
|
313
|
+
>
|
|
314
|
+
> **Two traps, both counter-intuitive, both measured:**
|
|
315
|
+
> - **Writing a \`dataCollection\` block AT ALL flips the baseline to all-on**, so every axis you do not name is enabled. \`{ httpBodies: [] }\` alone turns four other axes ON. An omitted key is not "leave as default" — it is an opt-in.
|
|
316
|
+
> - **\`stackFrameVariables: true\` is on in BOTH branches**, so \`sendDefaultPii: false\` does not turn it off. Only an explicit \`dataCollection\` block can. Local variables on an error path can hold a token, a decrypted payload, or a whole user record.
|
|
317
|
+
>
|
|
318
|
+
> **So: write ONE complete \`dataCollection\` block naming every axis, and pin it with a test that asserts what \`resolveDataCollectionOptions()\` RESOLVED — not what you typed.** A test that reads your own config object back to itself proves you typed what you meant and nothing about what the SDK did with it; that is exactly the gap that let a partial block sit unnoticed in three Z2W repos. \`[[sentry-runtime-errors]]\` carries the current block, the resolver one-liner, and the per-repo audit — **and because a hardcoded axis list in any doc goes stale silently and in the unsafe direction every time the SDK adds a collector, the binding instruction is the resolver check, not the snippet.** Re-run it on every SDK upgrade.
|
|
319
|
+
>
|
|
320
|
+
> Whatever you end up collecting, never forward a Sentry payload verbatim into a shared surface (the bulletin \`## Incidents\` pipe strips to summary + link + timestamp).
|
|
321
|
+
> 5. **Smoke it, then delete the smoke.** Add a throwaway auth-gated server-throw route (\`/api/boom\` style), confirm the error + replay land in Sentry and the alert email fires, then DELETE the route and the wizard's noisy example page (it's a honeypot that inflates your error count). Ship this cleanup as its own small commit.
|
|
322
|
+
> 6. **The wizard writes \`silent: !process.env.CI\`, so a missing \`SENTRY_AUTH_TOKEN\` is SILENT LOCALLY and LOUD ON CI.** Quiet on your machine is by configuration, not by design — \`CI\` is unset locally and Vercel sets \`CI=1\`, where the plugin warns **three times, once per runtime**. So do NOT conclude from a clean local build that source-map upload emits nothing: **grep the deployed build log for \`No auth token provided\`** — a free check that beats a manual dashboard visit. (Reported by \`site-control\` 2026-07-30 after documenting the opposite in five places from a local measurement. The general shape, which is worth more than the Sentry detail: **a fact established under one configuration silently changes meaning under another** — so print or fetch what actually resolved, in the environment that will run it.)
|
|
323
|
+
> 7. **2025 Sentry-UI quirks that waste time:** issue **alert rules** live at \`/alerts/rules/\` (NOT \`/monitors/alerts/\`); the "Test Notification" button does NOT auto-save the rule (save explicitly or it evaporates); the wizard's example page throws on every load until you remove it.
|
|
314
324
|
>
|
|
315
325
|
> **When to SKIP (do not wire Sentry):** WordPress sites (error tracking via Z2W Admin Suite Diagnostics + FluentSMTP logs); CLI libraries and protocol repos (no request surface); Cloudflare Workers / node-service / python-service that are API-only (the \`-i nextjs\` wizard doesn't fit — revisit per-runtime later); internal-only admin tools with a single operator who sees errors directly. The rule of thumb: wire it for any public-or-customer-facing Next.js / CF-Pages app that will have real users.
|
|
316
326
|
>
|