@zero2webmaster/starter-kit 0.40.0 → 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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # z2w-starter-kit
2
2
 
3
- **Version:** 0.40.0 | **Framework:** 2.19.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.40.0 | Last Updated: 2026-09-30*
138
+ *Version: 0.40.1 | Last Updated: 2026-10-16*
@@ -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.34";
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
@@ -486,7 +486,7 @@ const NEON_CAREFUL_BODY = `### Neon-careful (Neon Postgres)
486
486
  // Two consecutive handoffs compared this constant against the DOCUMENT version
487
487
  // and reported a "15-version gap" that did not exist — the real gap was 4. Read
488
488
  // the `<!-- ... canonical-block vX.Y.Z -->` comment, never the `**Version:**` line.
489
- export const CANONICAL_COORDINATION_BLOCK_VERSION = "v0.1.34";
489
+ export const CANONICAL_COORDINATION_BLOCK_VERSION = "v0.1.35";
490
490
  /**
491
491
  * The canonical **Capture Learnings** block, emitted VERBATIM into every
492
492
  * scaffolded `CLAUDE.md`.
@@ -594,7 +594,7 @@ This project participates in the Z2W cross-project coordination bulletin.
594
594
 
595
595
  **At session start:**
596
596
 
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). 🔴 **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.
598
598
 
599
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:
600
600
  \`\`\`
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 /health`,
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")) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zero2webmaster/starter-kit",
3
- "version": "0.40.0",
3
+ "version": "0.40.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",