@zero2webmaster/starter-kit 0.39.1 → 0.40.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 +2 -2
- package/dist/standards.d.ts +2 -2
- package/dist/standards.js +22 -2
- package/dist/summary.d.ts +11 -0
- package/dist/summary.js +17 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# z2w-starter-kit
|
|
2
2
|
|
|
3
|
-
**Version:** 0.
|
|
3
|
+
**Version:** 0.40.1 | **Framework:** 2.19.0
|
|
4
4
|
|
|
5
5
|
> Node CLI to scaffold new Z2W projects from canonical Templates + AGENTS.md.
|
|
6
6
|
|
|
@@ -135,4 +135,4 @@ Inquiries: kerry@zero2webmaster.com.
|
|
|
135
135
|
---
|
|
136
136
|
|
|
137
137
|
*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.*
|
|
138
|
-
*Version: 0.
|
|
138
|
+
*Version: 0.40.1 | Last Updated: 2026-10-16*
|
package/dist/standards.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ProjectType, ScaffoldInputs } from "./index.js";
|
|
2
2
|
import { type SubstitutionOptions } from "./substitute.js";
|
|
3
|
-
export type StandardKey = "skill-vault" | "portable-stack" | "fathom" | "uptime-kuma" | "sentry" | "service-hosting" | "neon-careful" | "temp-files" | "agent-coordination" | "seo-baseline" | "email-service" | "moderation" | "card-path-bot-protection" | "text-size" | "test-count";
|
|
3
|
+
export type StandardKey = "skill-vault" | "portable-stack" | "fathom" | "uptime-kuma" | "sentry" | "service-hosting" | "neon-careful" | "temp-files" | "agent-coordination" | "seo-baseline" | "email-service" | "moderation" | "card-path-bot-protection" | "text-size" | "language" | "test-count";
|
|
4
4
|
export type StandardDecisionState = "inserted-inline" | "skipped-not-applicable"
|
|
5
5
|
/**
|
|
6
6
|
* Applicable, rendered — and then removed again, because the audience gate
|
|
@@ -78,7 +78,7 @@ export interface StandardsResolution {
|
|
|
78
78
|
* family — the safe default for anything else with `has_web_ui=true`.
|
|
79
79
|
*/
|
|
80
80
|
export declare function fathomEnvVarFor(projectType: ProjectType): string;
|
|
81
|
-
export declare const CANONICAL_COORDINATION_BLOCK_VERSION = "v0.1.
|
|
81
|
+
export declare const CANONICAL_COORDINATION_BLOCK_VERSION = "v0.1.35";
|
|
82
82
|
/**
|
|
83
83
|
* The canonical **Capture Learnings** block, emitted VERBATIM into every
|
|
84
84
|
* scaffolded `CLAUDE.md`.
|
package/dist/standards.js
CHANGED
|
@@ -29,6 +29,9 @@
|
|
|
29
29
|
// the two-layer UGC-moderation baseline per [[moderation-system]]
|
|
30
30
|
// (requested by event-engine on the bulletin 2026-07-08)
|
|
31
31
|
// - text-size — always (Z2W standing org rule)
|
|
32
|
+
// - language — always (Kerry, 2026-09-30): write in American
|
|
33
|
+
// English (en-US) unless the owner asks otherwise;
|
|
34
|
+
// requested by financial-engine on the bulletin
|
|
32
35
|
// - test-count — always (Z2W standing org rule, 2026-06-20): every
|
|
33
36
|
// session reports its test count at session end in a
|
|
34
37
|
// stable greppable `Tests: {n} passing` line so the
|
|
@@ -59,6 +62,7 @@ const STANDARD_ORDER = [
|
|
|
59
62
|
"moderation",
|
|
60
63
|
"card-path-bot-protection",
|
|
61
64
|
"text-size",
|
|
65
|
+
"language",
|
|
62
66
|
"test-count",
|
|
63
67
|
];
|
|
64
68
|
const TITLES = {
|
|
@@ -76,6 +80,7 @@ const TITLES = {
|
|
|
76
80
|
moderation: "Moderation baseline (user-generated content)",
|
|
77
81
|
"card-path-bot-protection": "Card-path bot protection (accepts credit cards)",
|
|
78
82
|
"text-size": "Text size (readability)",
|
|
83
|
+
language: "Language (en-US)",
|
|
79
84
|
"test-count": "Test-count reporting (session end)",
|
|
80
85
|
};
|
|
81
86
|
const DEPLOY_TARGETS = [
|
|
@@ -307,6 +312,12 @@ function checkCardPathBotProtection(inputs) {
|
|
|
307
312
|
function checkTextSize() {
|
|
308
313
|
return { applies: true, reason: "Z2W standing org rule — applies to every project" };
|
|
309
314
|
}
|
|
315
|
+
function checkLanguage() {
|
|
316
|
+
return {
|
|
317
|
+
applies: true,
|
|
318
|
+
reason: "Z2W standing org rule (2026-09-30) — every project writes in American English (en-US)",
|
|
319
|
+
};
|
|
320
|
+
}
|
|
310
321
|
function checkTestCount() {
|
|
311
322
|
return {
|
|
312
323
|
applies: true,
|
|
@@ -475,7 +486,7 @@ const NEON_CAREFUL_BODY = `### Neon-careful (Neon Postgres)
|
|
|
475
486
|
// Two consecutive handoffs compared this constant against the DOCUMENT version
|
|
476
487
|
// and reported a "15-version gap" that did not exist — the real gap was 4. Read
|
|
477
488
|
// the `<!-- ... canonical-block vX.Y.Z -->` comment, never the `**Version:**` line.
|
|
478
|
-
export const CANONICAL_COORDINATION_BLOCK_VERSION = "v0.1.
|
|
489
|
+
export const CANONICAL_COORDINATION_BLOCK_VERSION = "v0.1.35";
|
|
479
490
|
/**
|
|
480
491
|
* The canonical **Capture Learnings** block, emitted VERBATIM into every
|
|
481
492
|
* scaffolded `CLAUDE.md`.
|
|
@@ -583,7 +594,7 @@ This project participates in the Z2W cross-project coordination bulletin.
|
|
|
583
594
|
|
|
584
595
|
**At session start:**
|
|
585
596
|
|
|
586
|
-
1. **Get a PRIVATE workspace — never do session work in the shared clone (v0.1.17).** If a clone exists at \`~/.cache/z2w-coordination\` OR at \`~/Desktop/Zero2Webmaster/AI/Cursor Projects/z2w-agent-coordination/\`, \`cd\` there — **since 2026-08-29 those are ONE clone: the Desktop path is a symlink to \`~/.cache/z2w-coordination\`, so \`pwd -P\` from either resolves to the same \`.git\`** (Kerry could not open his own protocol repo, because Finder hides dotfolders). Otherwise \`git clone git@github.com:zero2webmaster/z2w-agent-coordination.git ~/.cache/z2w-coordination\` (see §8.3). 🔴 **NO \`--depth 1\` — that flag was in this step until 2026-08-29 and it made git LIE about what is published (v0.1.31).** A shallow clone keeps no history, so git cannot compute that its commits are contained in \`origin/main\` and **reports already-pushed commits as unpushed**. The shared clone read as *"22 commits ahead of origin"* — understood as ~12 projects' bulletin updates one bad \`git add -A\` from being lost — and **all 22 were already on origin.** It costs ~2 s to clone this repo's ~5,000 commits in full; the depth saved nothing worth that. **If you are in a clone that is already shallow, \`git fetch --unshallow origin\` fixes it — objects only, no working file, branch or commit is touched** (\`agent-workspace.sh\` now does this for you, see below). Then, from that clone, take a workspace of your own — \`WS="$(bash scripts/agent-workspace.sh {{slug}})"\` and \`cd "$WS"\`. **Do every read and write of this session inside \`$WS\`**, and publish at session end with \`bash scripts/publish-from-workspace.sh "{{slug}}: session {id} — {one-line summary}"\` (it commits, prints \`git show --numstat HEAD\` before publishing, then pushes \`HEAD:main\`, rebasing and retrying if another agent pushed first). **Why:** two shared working trees were serving ~40 agents, and one shared git index produced **seven concurrent-write sweeps in six weeks** — an agent's work published inside another project's commit, or silently reverted, with the victim's commit sometimes gone entirely. Staging narrowly does not prevent it and neither does intending to exclude a file (occurrence #7 said so in its own commit message and swept the file anyway); a worktree has its own index, so the failure class is gone rather than mitigated. Costs ~0.1 s and ~8 MB, shares the object store, no re-download. \`agent-workspace.sh\` also runs \`set-bulletin-commit-identity.sh\` for you (bot identity, set locally per clone, so bulletin commits don't skew Kerry's personal GitHub contribution graph) and arms a \`pre-commit\` guard that makes the shared tree **refuse** commits — if you see that refusal, follow the three commands it prints. **Inside \`$WS\`, \`git add -A\` is safe** (your index contains nothing but your own edits), which is what \`publish-from-workspace.sh\` uses.
|
|
597
|
+
1. **Get a PRIVATE workspace — never do session work in the shared clone (v0.1.17).** If a clone exists at \`~/.cache/z2w-coordination\` OR at \`~/Desktop/Zero2Webmaster/AI/Cursor Projects/z2w-agent-coordination/\`, \`cd\` there — **since 2026-08-29 those are ONE clone: the Desktop path is a symlink to \`~/.cache/z2w-coordination\`, so \`pwd -P\` from either resolves to the same \`.git\`** (Kerry could not open his own protocol repo, because Finder hides dotfolders). Otherwise \`git clone git@github.com:zero2webmaster/z2w-agent-coordination.git ~/.cache/z2w-coordination\` (see §8.3). **A dirty shared clone is NOT a reason to make your own clone (v0.1.35, §8.3):** a hand-made clone has no hooks, so every commit gate is silently absent there. Take the workspace from the shared clone anyway; uncommitted edits in it are another session's and are never in your index. 🔴 **NO \`--depth 1\` — that flag was in this step until 2026-08-29 and it made git LIE about what is published (v0.1.31).** A shallow clone keeps no history, so git cannot compute that its commits are contained in \`origin/main\` and **reports already-pushed commits as unpushed**. The shared clone read as *"22 commits ahead of origin"* — understood as ~12 projects' bulletin updates one bad \`git add -A\` from being lost — and **all 22 were already on origin.** It costs ~2 s to clone this repo's ~5,000 commits in full; the depth saved nothing worth that. **If you are in a clone that is already shallow, \`git fetch --unshallow origin\` fixes it — objects only, no working file, branch or commit is touched** (\`agent-workspace.sh\` now does this for you, see below). Then, from that clone, take a workspace of your own — \`WS="$(bash scripts/agent-workspace.sh {{slug}})"\` and \`cd "$WS"\`. **Do every read and write of this session inside \`$WS\`**, and publish at session end with \`bash scripts/publish-from-workspace.sh "{{slug}}: session {id} — {one-line summary}"\` (it commits, prints \`git show --numstat HEAD\` before publishing, then pushes \`HEAD:main\`, rebasing and retrying if another agent pushed first). **Why:** two shared working trees were serving ~40 agents, and one shared git index produced **seven concurrent-write sweeps in six weeks** — an agent's work published inside another project's commit, or silently reverted, with the victim's commit sometimes gone entirely. Staging narrowly does not prevent it and neither does intending to exclude a file (occurrence #7 said so in its own commit message and swept the file anyway); a worktree has its own index, so the failure class is gone rather than mitigated. **The index is the ONLY private thing (v0.1.35).** Config, remotes, refs, hooks and the stash are shared with the clone and every other worktree: \`git remote remove origin\` run inside a worktree removed the remote for everyone. A worktree is a private staging area, not a disposable sandbox. Costs ~0.1 s and ~8 MB, shares the object store, no re-download. \`agent-workspace.sh\` also runs \`set-bulletin-commit-identity.sh\` for you (bot identity, set locally per clone, so bulletin commits don't skew Kerry's personal GitHub contribution graph) and arms a \`pre-commit\` guard that makes the shared tree **refuse** commits — if you see that refusal, follow the three commands it prints. **Inside \`$WS\`, \`git add -A\` is safe** (your index contains nothing but your own edits), which is what \`publish-from-workspace.sh\` uses.
|
|
587
598
|
|
|
588
599
|
1b. **🔴 READ THE LIVE BLOCK, AND PREFER IT OVER THE COPY YOU ARE READING NOW (v0.1.23).** Step 1 already put you in the bulletin clone, so this costs one command and no network call:
|
|
589
600
|
\`\`\`
|
|
@@ -698,6 +709,13 @@ const CARD_PATH_BOT_PROTECTION_BODY = `### Card-path bot protection (accepts cre
|
|
|
698
709
|
const TEXT_SIZE_BODY = `### Text size (always)
|
|
699
710
|
|
|
700
711
|
> **Readability:** per Z2W standing org rule, all public-facing pages and documents use large, easy-to-read type. Body text 18px+ baseline; headings proportionally larger; line-height ≥ 1.5.`;
|
|
712
|
+
// Always-on and deliberately short: it has to be read before the first reply,
|
|
713
|
+
// so it lives in the auto-loaded CLAUDE.md rather than in a skill. Says "the
|
|
714
|
+
// project owner", not a name, because an external-audience scaffold belongs to
|
|
715
|
+
// someone other than Kerry.
|
|
716
|
+
const LANGUAGE_BODY = `### Language (always — en-US)
|
|
717
|
+
|
|
718
|
+
> **Write in American English (en-US) everywhere** — replies, docs, code comments, commit messages, emails, UI copy and bulletin entries — unless the project owner asks otherwise. For example: *installment*, *organization*, *color*, *check*, *canceled* (not *instalment*, *organisation*, *colour*, *cheque*, *cancelled*).`;
|
|
701
719
|
const TEST_COUNT_BODY = `### Test-count reporting (always — at session end)
|
|
702
720
|
|
|
703
721
|
> **Report your test count at session end.** Per Zero2Webmaster standing org rule (2026-06-20), every session that touches code states how many tests pass on a stable, machine-greppable line: \`Tests: {n} passing\` — use the literal word \`Tests:\`, the running total your suite reports, and the word \`passing\`. Put that line in your session-end recap AND, if this project participates in the cross-project bulletin, in the \`## Recent commits\` entry you append (e.g. **\`Tests: 534 passing\`**). The phone-first command center greps this line across every project to display a portfolio-wide tally ("we've run N tests across the portfolio") — a real sales asset, and the uniform one-line format is what makes the total cheap to compute. If this project has no test suite yet, say so explicitly with \`Tests: none yet\` rather than omitting the line.
|
|
@@ -724,6 +742,7 @@ const BODIES = {
|
|
|
724
742
|
moderation: MODERATION_BODY,
|
|
725
743
|
"card-path-bot-protection": CARD_PATH_BOT_PROTECTION_BODY,
|
|
726
744
|
"text-size": TEXT_SIZE_BODY,
|
|
745
|
+
language: LANGUAGE_BODY,
|
|
727
746
|
"test-count": TEST_COUNT_BODY,
|
|
728
747
|
};
|
|
729
748
|
const APPLICABILITY = {
|
|
@@ -741,6 +760,7 @@ const APPLICABILITY = {
|
|
|
741
760
|
moderation: checkModeration,
|
|
742
761
|
"card-path-bot-protection": checkCardPathBotProtection,
|
|
743
762
|
"text-size": checkTextSize,
|
|
763
|
+
language: checkLanguage,
|
|
744
764
|
"test-count": checkTestCount,
|
|
745
765
|
};
|
|
746
766
|
/**
|
package/dist/summary.d.ts
CHANGED
|
@@ -23,6 +23,17 @@ export interface SummaryOptions {
|
|
|
23
23
|
*/
|
|
24
24
|
date?: string;
|
|
25
25
|
}
|
|
26
|
+
/**
|
|
27
|
+
* Project-type-specific install/setup command surfaced as the first
|
|
28
|
+
* post-scaffold install step in the next-actions checklist. `null` means no
|
|
29
|
+
* install is needed (currently only `protocol-repo`).
|
|
30
|
+
*/
|
|
31
|
+
/**
|
|
32
|
+
* The path the scaffolded health endpoint is actually served at. Next.js App
|
|
33
|
+
* Router route handlers live under a path segment, so a bare `/health` 404s
|
|
34
|
+
* there; a static Pages deploy serves the hand-written `health.json`.
|
|
35
|
+
*/
|
|
36
|
+
export declare function healthPathFor(projectType: ScaffoldInputs["projectType"]): string;
|
|
26
37
|
/**
|
|
27
38
|
* Render the post-scaffold summary block.
|
|
28
39
|
*
|
package/dist/summary.js
CHANGED
|
@@ -45,6 +45,21 @@ function buildChalk(opts, output) {
|
|
|
45
45
|
* post-scaffold install step in the next-actions checklist. `null` means no
|
|
46
46
|
* install is needed (currently only `protocol-repo`).
|
|
47
47
|
*/
|
|
48
|
+
/**
|
|
49
|
+
* The path the scaffolded health endpoint is actually served at. Next.js App
|
|
50
|
+
* Router route handlers live under a path segment, so a bare `/health` 404s
|
|
51
|
+
* there; a static Pages deploy serves the hand-written `health.json`.
|
|
52
|
+
*/
|
|
53
|
+
export function healthPathFor(projectType) {
|
|
54
|
+
switch (projectType) {
|
|
55
|
+
case "nextjs":
|
|
56
|
+
return "/api/health";
|
|
57
|
+
case "cf-pages":
|
|
58
|
+
return "/health.json";
|
|
59
|
+
default:
|
|
60
|
+
return "/health";
|
|
61
|
+
}
|
|
62
|
+
}
|
|
48
63
|
function installCommandFor(projectType) {
|
|
49
64
|
switch (projectType) {
|
|
50
65
|
case "wp-plugin":
|
|
@@ -117,8 +132,8 @@ function buildNextActions(inputs, result, repoAutoCreated) {
|
|
|
117
132
|
}
|
|
118
133
|
if (isDecisionInserted(result.decisions, "uptime-kuma")) {
|
|
119
134
|
actions.push({
|
|
120
|
-
label: `After first deploy, add an HTTP(s)-Keyword monitor in Uptime Kuma pointing at
|
|
121
|
-
note: "see [[uptime-kuma-monitor]] — 60s heartbeat, 2 retries, 60s retry interval, 48s timeout, accepted 200-299",
|
|
135
|
+
label: `After first deploy, add an HTTP(s)-Keyword monitor in Uptime Kuma pointing at ${healthPathFor(inputs.projectType)}, keyword "status":"ok"`,
|
|
136
|
+
note: "see [[uptime-kuma-monitor]] — 60s heartbeat, 2 retries, 60s retry interval, 48s timeout, accepted 200-299; never the bare keyword ok (it matches inside cookie/lookup/blocked on a 200 error page)",
|
|
122
137
|
});
|
|
123
138
|
}
|
|
124
139
|
if (isDecisionInserted(result.decisions, "sentry")) {
|