@zero2webmaster/starter-kit 0.18.1 → 0.18.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 +6 -3
- package/dist/scaffolders/common.js +24 -0
- package/dist/scaffolders/nextjs.js +1 -1
- package/dist/standards.d.ts +1 -1
- package/dist/standards.js +1 -1
- package/dist/writer.js +19 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# z2w-starter-kit
|
|
2
2
|
|
|
3
|
-
**Version:** 0.18.
|
|
3
|
+
**Version:** 0.18.4 | **Framework:** 2.18.0
|
|
4
4
|
|
|
5
5
|
> Node CLI to scaffold new Z2W projects from canonical Templates + AGENTS.md.
|
|
6
6
|
|
|
@@ -83,7 +83,10 @@ The Claude Code skill at `~/.claude/skills/instantiate-z2w-project/SKILL.md` and
|
|
|
83
83
|
|
|
84
84
|
## Status
|
|
85
85
|
|
|
86
|
-
- **v0.18.
|
|
86
|
+
- **v0.18.4 (current)** points the writer's cross-cutting placeholder check at EVERY emitted file. It had run against `CLAUDE.md` alone since Step 6 — one of the ~42 files a Next.js scaffold emits — so `sentry.shared.ts` shipped a literal `{{project_name}}`, a key that has never existed in the substitution map. Found by dogfooding a real scaffold, not by the suite. A per-project-type sweep now covers all eight types.
|
|
87
|
+
- **v0.18.3** makes every emitted `.gitignore` refuse a downloaded cloud service-account key. The Google Cloud console names a private key `<project-id>-<12 hex>.json`, which matched nothing in the scaffolded ignore file and, unlike a stray `.env.production`, carries no hint in its filename that it is a credential. Found when a live Gmail delegation key for two SAVE THE FROGS! mailboxes landed in a repo this CLI had emitted.
|
|
88
|
+
- **v0.18.2** bumps the emitted Agent Coordination fingerprint to **v0.1.26**, matching what `z2w-agent-coordination` currently publishes. Every scaffold emitted while the constant said `v0.1.25` carries a stale fingerprint, which is precisely the drift the fingerprint exists to detect.
|
|
89
|
+
- **v0.18.1** returns the audience gate's findings as **data** (`ScaffoldResult.audienceGate`) rather than only printing them. v0.18.0 wrote its dangling-reference warning to the terminal, but `previewScaffold()` discards its output stream by design — and that is the entry point a web UI uses — so the report had no receiver on the one path where an external audience actually occurs. No emitted file changes by a byte.
|
|
87
90
|
- **v0.18.0** implements **Kerry's 2026-08-14 ruling — Option A: "ship the artifact, not the doctrine."** A new `audience` input (`internal` | `external`, defaulting to `internal`) gates what an outside customer's scaffold contains. The emitted **code is untouched** — that is the value a customer is buying — but the ~40 KB prose corpus explaining which internal rulings produced it is not emitted: `Standards block`, `Z2W Portfolio Standards`, `Capture Learnings`, `Keeping This Framework Current`, `Common Name & Terminology Glossary` and `Agent Coordination` are dropped as **whole `##` sections**, and surviving `[[skill]]` Vault pointers are unwrapped to plain text. Measured on a real customer scaffold: **CLAUDE.md 85,702 → 44,848 B, a 47.7% reduction, 0 Vault pointers, 0 bulletin-repo mentions**; the internal control is byte-for-byte unchanged. **Whole sections, never edited sentences** — omitting a fingerprinted block makes no identity claim, whereas editing one ships a modified body under an unmodified fingerprint and an emitter mints that lie forever. The gate **refuses to emit** when a section it must drop cannot be found (a renamed heading would otherwise re-leak it silently), and **reports** surviving back-references to dropped sections rather than editing the canonical body to fix them.
|
|
88
91
|
**Also fixes a defect that was wrong under every option and had nothing to do with the ruling:** `buildCustomBrandSpec()` hardcoded `author: DEFAULT_AUTHOR` and `CustomBrandInputs` had no author field, so **every outside-customer scaffold emitted `© 2026 Dr. Kerry Kriger` into the customer's own `README.md` and page footer** — the inverse of an IP leak, a false ownership claim on someone else's repo, live on the `project-creator` path. A custom brand now supplies its own `author`/`authorUrl` and falls back to its **own brand name**, the README's hardcoded `, Zero2Webmaster` is empty for custom brands, and the typography rule no longer cites a "Z2W standing organization instruction" at somebody else's organisation. The `marketing.md` / `BACKUPS.md` instructions to mirror status into the **private** Project Registry are omitted for external audiences. Tests **983 → 1,009**.
|
|
89
92
|
- **v0.17.2** closes the gap v0.17.1 left open and stated: the file selection behind that denominator was still an inline chain of filters in `main()`, so **nothing could execute it** without a live database and a full run — the same untestable-inline shape v0.16.2 had just fixed for `--strict`, in the same file, for a second decision. `selectBulletinFiles()` and `describeSelection()` are now pure exported functions with 13 tests, canary-verified by replanting the v0.17.0 bug. Two things came out of the extraction: the selection now **partitions** its input (four disjoint buckets that always sum to the entry count, so a file cannot leave the denominator without changing a number somebody prints), which surfaced two exclusion classes the report had never mentioned; and `main()` now **refuses a run that selected zero files** instead of printing `scanned: 0 / rows that WOULD change: 0` — a summary byte-identical to a healthy, fully-in-sync run. That is this script's own founding failure, relocated one layer up from the parse into the file selection. Real-corpus figure unchanged at **52**, so the refactor is behaviour-preserving.
|
|
@@ -122,4 +125,4 @@ Inquiries: kerry@zero2webmaster.com.
|
|
|
122
125
|
---
|
|
123
126
|
|
|
124
127
|
*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.*
|
|
125
|
-
*Version: 0.18.
|
|
128
|
+
*Version: 0.18.4 | Last Updated: 2026-08-15*
|
|
@@ -955,6 +955,30 @@ const GITIGNORE_SECRET_SCRATCH_BLOCK = `
|
|
|
955
955
|
# \`.env.example\` is re-allowed: it carries variable NAMES only, never values.
|
|
956
956
|
.env.*
|
|
957
957
|
!.env.example
|
|
958
|
+
# Cloud provider service-account / credential keys, which the \`.env\` family
|
|
959
|
+
# above does NOT match. The Google Cloud console downloads a service-account
|
|
960
|
+
# private key as \`<project>-<keyid>.json\` — a filename that looks like ordinary
|
|
961
|
+
# project config and gives no hint it is a credential, so it survives the glance
|
|
962
|
+
# that catches a stray \`.env.production\`. Broadened to the family rather than
|
|
963
|
+
# pinned, because nothing matching these names should ever be tracked.
|
|
964
|
+
# (support-desk, 2026-08-15: a live Gmail delegation key landed in a repo where
|
|
965
|
+
# NONE of the patterns above matched it.)
|
|
966
|
+
*-sa.json
|
|
967
|
+
*service-account*.json
|
|
968
|
+
*-serviceaccount*.json
|
|
969
|
+
gcp-*.json
|
|
970
|
+
gcloud-*.json
|
|
971
|
+
credentials.json
|
|
972
|
+
client_secret*.json
|
|
973
|
+
# ...and the shape the console ACTUALLY produces, which none of the readable
|
|
974
|
+
# patterns above catch: \`<gcp-project-id>-<first 12 hex of the key id>.json\`,
|
|
975
|
+
# e.g. \`stf-support-desk-5e7d167d1199.json\`. The project id is arbitrary, so
|
|
976
|
+
# the only stable part is the 12-hex suffix. Verified with real
|
|
977
|
+
# \`git check-ignore\` against both key shapes AND against package.json /
|
|
978
|
+
# tsconfig.json / components.json / wrangler.json / vercel.json /
|
|
979
|
+
# tailwind.config.json / en-US.json / 2026-08-15.json, none of which it
|
|
980
|
+
# swallows — see the test in scaffolders.test.ts.
|
|
981
|
+
*-[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f].json
|
|
958
982
|
`;
|
|
959
983
|
/**
|
|
960
984
|
* Per-type `.gitignore` body. Sources: skill's "Inline mini-templates"
|
|
@@ -2116,7 +2116,7 @@ describe("form standards", () => {
|
|
|
2116
2116
|
* is a deliberate act with a comment saying why.
|
|
2117
2117
|
*/
|
|
2118
2118
|
const SENTRY_SHARED_TEMPLATE = `/**
|
|
2119
|
-
* Sentry data-collection policy for {{
|
|
2119
|
+
* Sentry data-collection policy for {{slug}} — the single source of truth.
|
|
2120
2120
|
*
|
|
2121
2121
|
* Every Sentry runtime config (\`sentry.client.config.ts\`,
|
|
2122
2122
|
* \`sentry.server.config.ts\`, \`sentry.edge.config.ts\`) MUST spread
|
package/dist/standards.d.ts
CHANGED
|
@@ -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.
|
|
54
|
+
export declare const CANONICAL_COORDINATION_BLOCK_VERSION = "v0.1.26";
|
|
55
55
|
/**
|
|
56
56
|
* The canonical **Capture Learnings** block, emitted VERBATIM into every
|
|
57
57
|
* scaffolded `CLAUDE.md`.
|
package/dist/standards.js
CHANGED
|
@@ -447,7 +447,7 @@ const NEON_CAREFUL_BODY = `### Neon-careful (Neon Postgres)
|
|
|
447
447
|
// Two consecutive handoffs compared this constant against the DOCUMENT version
|
|
448
448
|
// and reported a "15-version gap" that did not exist — the real gap was 4. Read
|
|
449
449
|
// the `<!-- ... canonical-block vX.Y.Z -->` comment, never the `**Version:**` line.
|
|
450
|
-
export const CANONICAL_COORDINATION_BLOCK_VERSION = "v0.1.
|
|
450
|
+
export const CANONICAL_COORDINATION_BLOCK_VERSION = "v0.1.26";
|
|
451
451
|
/**
|
|
452
452
|
* The canonical **Capture Learnings** block, emitted VERBATIM into every
|
|
453
453
|
* scaffolded `CLAUDE.md`.
|
package/dist/writer.js
CHANGED
|
@@ -286,6 +286,25 @@ export async function writeScaffold(inputs, targetPath, opts = {}) {
|
|
|
286
286
|
claudeContent = stripVaultPointers(gate.content, audience);
|
|
287
287
|
checkNoUnfilledMarkers(claudeContent, "CLAUDE.md");
|
|
288
288
|
files[claudeIdx] = { path: claudeFile.path, content: claudeContent };
|
|
289
|
+
// 🔴 Run the SAME check over EVERY emitted file, not just CLAUDE.md.
|
|
290
|
+
//
|
|
291
|
+
// The header of this module has advertised a "cross-cutting correctness
|
|
292
|
+
// check" since Step 6, and for that entire time it ran against exactly one
|
|
293
|
+
// of the ~42 files a Next.js scaffold emits. That is the [[zero-is-not-a-pass]]
|
|
294
|
+
// shape in this repo's own writer: a check that examines one specimen and
|
|
295
|
+
// reports like it examined the set.
|
|
296
|
+
//
|
|
297
|
+
// Found 2026-08-15 by dogfooding a real `volunteer-engine` scaffold, which
|
|
298
|
+
// shipped `sentry.shared.ts` carrying a literal `{{project_name}}` — a key
|
|
299
|
+
// that has never existed in `buildSubstitutionMap` (the map says `slug`).
|
|
300
|
+
// `applySubstitutions` leaves an unknown placeholder untouched by design, so
|
|
301
|
+
// nothing upstream objected, and the one guard that would have caught it was
|
|
302
|
+
// pointed at a different file. Consistent with this project's standing note
|
|
303
|
+
// that every scaffold defect to date was found by someone dogfooding the
|
|
304
|
+
// artifact rather than by the suite.
|
|
305
|
+
for (const file of files) {
|
|
306
|
+
checkNoUnfilledMarkers(file.content, file.path);
|
|
307
|
+
}
|
|
289
308
|
// Append promotions follow-up file if any standard was promoted.
|
|
290
309
|
if (promotions.some((p) => p.choice === "promote")) {
|
|
291
310
|
const dateForFile = opts.date ?? new Date().toISOString().slice(0, 10);
|