@zero2webmaster/starter-kit 0.48.0 → 0.49.0
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 +5 -3
- package/dist/scaffolders/common.js +3 -1
- package/dist/scaffolders/python-service.js +1 -1
- package/dist/standards.d.ts +2 -1
- package/dist/standards.js +14 -2
- package/dist/summary.js +24 -6
- package/package.json +1 -1
- package/scripts/rollup-integrations.mjs +43 -2
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# z2w-starter-kit
|
|
2
2
|
|
|
3
|
-
**Version:** 0.
|
|
3
|
+
**Version:** 0.49.0 | **Framework:** 2.19.0
|
|
4
4
|
|
|
5
5
|
> Node CLI to scaffold new Z2W projects from canonical Templates + AGENTS.md.
|
|
6
6
|
|
|
@@ -83,7 +83,9 @@ The Claude Code skill at `~/.claude/skills/instantiate-z2w-project/SKILL.md` and
|
|
|
83
83
|
|
|
84
84
|
## Status
|
|
85
85
|
|
|
86
|
-
- **v0.
|
|
86
|
+
- **v0.49.0 (current)** gives the Uptime Kuma next-action the project's own keyword (it still said `"status":"ok"`), tells bulletin projects to report each new monitor to `kuma-watchdog` and to notify `audit-engine` when a project is scaffolded, and extends the American English rule to internal labels such as form and database names.
|
|
87
|
+
- **v0.48.1** fixes the Python install line in `python-service` scaffolds (it failed in zsh), tells you to create Neon projects with autoscaling compute, and keeps the Project Registry's older `status` column from calling a retired project Active.
|
|
88
|
+
- **v0.48.0** stops writing the Airtable inventory mirror by default; the Project Registry in Neon is the only record. Pass `--airtable-row` to write the mirror anyway.
|
|
87
89
|
- **v0.47.2** records a newly scaffolded project as `Scaffolded` in the Project Registry. An existing `Planning` row is promoted; a later stage such as `Live` is never changed.
|
|
88
90
|
- **v0.47.1** reads pasted briefs more accurately. A multi-tenant product now reads as Zero2Webmaster even when it names SAVE THE FROGS! as a tenant. Card payments are no longer switched on by a sentence about another app's checkout, or by a "donate" button. The slug is read from the `# slug — Project Brief` title line.
|
|
89
91
|
|
|
@@ -147,4 +149,4 @@ Inquiries: kerry@zero2webmaster.com.
|
|
|
147
149
|
---
|
|
148
150
|
|
|
149
151
|
*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.*
|
|
150
|
-
*Version: 0.
|
|
152
|
+
*Version: 0.49.0 | Last Updated: 2026-10-31*
|
|
@@ -231,7 +231,9 @@ function quickStartFor(inputs) {
|
|
|
231
231
|
"```bash",
|
|
232
232
|
"python3 -m venv .venv",
|
|
233
233
|
"source .venv/bin/activate",
|
|
234
|
-
|
|
234
|
+
// Quoted, and no trailing `# …`: zsh globs an unquoted `[` and does not treat
|
|
235
|
+
// `#` as a comment on an interactive line, so either one breaks a paste.
|
|
236
|
+
"pip install -e '.[dev]'",
|
|
235
237
|
`uvicorn ${slugUnder}.main:app --reload`,
|
|
236
238
|
"```",
|
|
237
239
|
].join("\n");
|
package/dist/standards.d.ts
CHANGED
|
@@ -78,7 +78,8 @@ 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
|
|
81
|
+
export declare const KUMA_WATCHDOG_REPORT = "> \uD83D\uDD34 **After creating any Uptime Kuma monitor** (HTTP keyword or Push), **report it to `kuma-watchdog` in the same session:** a `[\u2192 kuma-watchdog]` item in `projects/kuma-watchdog.md` \u00A7Open questions plus a `## \uD83D\uDCE5 Needs attention` line, carrying `monitor_id,project_slug,mapping_basis,monitor_name,note` (`mapping_basis` is `health_url` or `push_owner`; `note` is the URL and keyword, or the job and its interval). Format and the CRLF trap: [[uptime-kuma-monitor]] \u00A73b. A monitor nobody reported still records heartbeats, but its uptime cannot be credited to this project.";
|
|
82
|
+
export declare const CANONICAL_COORDINATION_BLOCK_VERSION = "v0.1.36";
|
|
82
83
|
/**
|
|
83
84
|
* The canonical **Capture Learnings** block, emitted VERBATIM into every
|
|
84
85
|
* scaffolded `CLAUDE.md`.
|
package/dist/standards.js
CHANGED
|
@@ -375,6 +375,11 @@ const SKILL_VAULT_BODY = `### Skill Vault awareness (always — read first)
|
|
|
375
375
|
const PORTABLE_STACK_BODY = `### Portable-stack defaults (non-WP)
|
|
376
376
|
|
|
377
377
|
> **Portability posture:** standard Postgres (not Neon Auth / Supabase Edge Functions / Vercel Postgres / Cloudflare D1 / branded SQL); S3-compatible storage (not Vercel Blob / Supabase Storage); Node runtime over Edge unless required; dotenv-style config (not UI-only secrets); written exit plan from day one. See [[portable-stack]] for the full posture.`;
|
|
378
|
+
// Kerry, 2026-10-29, via `kuma-watchdog`: 4 of 9 monitors made since 10-16 were
|
|
379
|
+
// never reported, because the rule lived only in `uptime-kuma-monitor` §3b and
|
|
380
|
+
// agents create monitors without loading that skill. It has to sit where they
|
|
381
|
+
// already read. Exported so the next-action and the test use the same words.
|
|
382
|
+
export const KUMA_WATCHDOG_REPORT = `> 🔴 **After creating any Uptime Kuma monitor** (HTTP keyword or Push), **report it to \`kuma-watchdog\` in the same session:** a \`[→ kuma-watchdog]\` item in \`projects/kuma-watchdog.md\` §Open questions plus a \`## 📥 Needs attention\` line, carrying \`monitor_id,project_slug,mapping_basis,monitor_name,note\` (\`mapping_basis\` is \`health_url\` or \`push_owner\`; \`note\` is the URL and keyword, or the job and its interval). Format and the CRLF trap: [[uptime-kuma-monitor]] §3b. A monitor nobody reported still records heartbeats, but its uptime cannot be credited to this project.`;
|
|
378
383
|
const FATHOM_BODY = `### Fathom analytics (web UI)
|
|
379
384
|
|
|
380
385
|
> **Analytics:** Fathom Analytics is the single source of truth for this project. Env var name: {{fathom_env_var}}. SPA pattern: \`data-auto="false"\` on the Fathom script, then manual \`trackPageview()\` on route change. One Fathom site = one deployment. See [[fathom-analytics]] for details.`;
|
|
@@ -486,7 +491,7 @@ const NEON_CAREFUL_BODY = `### Neon-careful (Neon Postgres)
|
|
|
486
491
|
// Two consecutive handoffs compared this constant against the DOCUMENT version
|
|
487
492
|
// and reported a "15-version gap" that did not exist — the real gap was 4. Read
|
|
488
493
|
// the `<!-- ... canonical-block vX.Y.Z -->` comment, never the `**Version:**` line.
|
|
489
|
-
export const CANONICAL_COORDINATION_BLOCK_VERSION = "v0.1.
|
|
494
|
+
export const CANONICAL_COORDINATION_BLOCK_VERSION = "v0.1.36";
|
|
490
495
|
/**
|
|
491
496
|
* The canonical **Capture Learnings** block, emitted VERBATIM into every
|
|
492
497
|
* scaffolded `CLAUDE.md`.
|
|
@@ -715,7 +720,9 @@ const TEXT_SIZE_BODY = `### Text size (always)
|
|
|
715
720
|
// someone other than Kerry.
|
|
716
721
|
const LANGUAGE_BODY = `### Language (always — en-US)
|
|
717
722
|
|
|
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*)
|
|
723
|
+
> **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*).
|
|
724
|
+
>
|
|
725
|
+
> **This includes internal labels nobody reads as prose:** form names, database values, file names, analytics events and ad-conversion names. Formal or business writing is where a model drifts British, so check these words before handing anything over: *inquiry* (not *enquiry*), *program* (not *programme*), *while* (not *whilst*), *catalog*, *center*, *favorite*, *traveled*.`;
|
|
719
726
|
const TEST_COUNT_BODY = `### Test-count reporting (always — at session end)
|
|
720
727
|
|
|
721
728
|
> **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.
|
|
@@ -796,6 +803,11 @@ function renderStandardBody(key, inputs, opts) {
|
|
|
796
803
|
if (key === "fathom") {
|
|
797
804
|
body = body.replace(/\{\{fathom_env_var\}\}/g, fathomEnvVarFor(inputs.projectType));
|
|
798
805
|
}
|
|
806
|
+
// Only on the bulletin: `kuma-watchdog` is a Z2W project, and an outside
|
|
807
|
+
// customer's scaffold has no bulletin to report through.
|
|
808
|
+
if (key === "uptime-kuma" && inputs.participateInBulletin) {
|
|
809
|
+
body += "\n>\n" + KUMA_WATCHDOG_REPORT;
|
|
810
|
+
}
|
|
799
811
|
return body;
|
|
800
812
|
}
|
|
801
813
|
function renderPreamble(inputs, opts) {
|
package/dist/summary.js
CHANGED
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
import { Chalk } from "chalk";
|
|
27
27
|
import { buildFirstSessionPrompt, FIRST_SESSION_PROMPT_HEADING, } from "./first-session-prompt.js";
|
|
28
28
|
import { fathomEnvVarFor } from "./standards.js";
|
|
29
|
-
import { applySubstitutions } from "./substitute.js";
|
|
29
|
+
import { applySubstitutions, healthKeyword, todayISODate } from "./substitute.js";
|
|
30
30
|
const Z2W_GREEN = "#82C92B";
|
|
31
31
|
const Z2W_GOLD = "#FFD700";
|
|
32
32
|
const PROMOTIONS_FILE = "STANDARDS_PROMOTIONS.md";
|
|
@@ -71,7 +71,10 @@ function installCommandFor(projectType) {
|
|
|
71
71
|
case "library":
|
|
72
72
|
return "npm install";
|
|
73
73
|
case "python-service":
|
|
74
|
-
|
|
74
|
+
// `[dev]`, quoted: the scaffold's own test (`test_health.py`) needs the dev extras
|
|
75
|
+
// (httpx), and a plain `-e .` fails with a misleading Starlette error. Quoted because
|
|
76
|
+
// zsh treats unquoted `[...]` as a glob and refuses the line ("no matches found").
|
|
77
|
+
return "python -m venv .venv && source .venv/bin/activate && pip install -e '.[dev]'";
|
|
75
78
|
case "protocol-repo":
|
|
76
79
|
return null;
|
|
77
80
|
}
|
|
@@ -116,6 +119,12 @@ function buildNextActions(inputs, result, repoAutoCreated) {
|
|
|
116
119
|
label: `Bootstrap projects/${inputs.slug}.md in zero2webmaster/z2w-agent-coordination`,
|
|
117
120
|
note: "see [[instantiate-z2w-project]] SKILL.md Step 7 + AGENT_PROTOCOL.md §8.3 for the bulletin clone-location 3-step rule",
|
|
118
121
|
});
|
|
122
|
+
// audit-engine, 2026-10-28: its sweep cannot see a row CREATED already
|
|
123
|
+
// `Scaffolded` (a first observation never fires), so the scaffolder says so.
|
|
124
|
+
actions.push({
|
|
125
|
+
label: `In the same bulletin commit, add one line to projects/audit-engine.md §📥 Needs attention: "- ${todayISODate()} · z2w-starter-kit · FYI · **New project scaffolded: \`${inputs.slug}\` (Registry row N, repo ${inputs.githubOrg}/${inputs.slug})** · projects/${inputs.slug}.md"`,
|
|
126
|
+
note: "no thread body needed; replace N with the Project Registry row id",
|
|
127
|
+
});
|
|
119
128
|
}
|
|
120
129
|
if (isDecisionInserted(result.decisions, "fathom")) {
|
|
121
130
|
const envVar = fathomEnvVarFor(inputs.projectType);
|
|
@@ -126,15 +135,24 @@ function buildNextActions(inputs, result, repoAutoCreated) {
|
|
|
126
135
|
}
|
|
127
136
|
if (isDecisionInserted(result.decisions, "neon-careful")) {
|
|
128
137
|
actions.push({
|
|
129
|
-
label: `Create the Neon project, then set DATABASE_URL in the production environment`,
|
|
130
|
-
note: "see [[neon-postgres]] — keep /health DB-free, pool size 1 in monitoring contexts",
|
|
138
|
+
label: `Create the Neon project with AUTOSCALING compute (minimum 0.25 CU, maximum 2 to 8 CU, never a fixed size), then set DATABASE_URL in the production environment`,
|
|
139
|
+
note: "see [[neon-postgres]] new-project checklist — a fixed 1 CU bills 1 CU for every awake second (up to 4x a 0.25 floor); keep /health DB-free, pool size 1 in monitoring contexts",
|
|
131
140
|
});
|
|
132
141
|
}
|
|
133
142
|
if (isDecisionInserted(result.decisions, "uptime-kuma")) {
|
|
134
143
|
actions.push({
|
|
135
|
-
|
|
136
|
-
|
|
144
|
+
// The keyword is the project's own identity token. This line said
|
|
145
|
+
// "status":"ok" until v0.49.0, the exact form the emitted Kuma standard
|
|
146
|
+
// forbids (byte-identical across every service, so a mistyped URL still goes green).
|
|
147
|
+
label: `After first deploy, add an HTTP(s)-Keyword monitor in Uptime Kuma pointing at ${healthPathFor(inputs.projectType)}, keyword "keyword":"${healthKeyword(inputs.slug)}"`,
|
|
148
|
+
note: "see [[uptime-kuma-monitor]] — 60s heartbeat, 2 retries, 60s retry interval, 48s timeout, accepted 200-299; never \"status\":\"ok\" or the bare keyword ok; curl the endpoint and see the keyword before saving",
|
|
137
149
|
});
|
|
150
|
+
if (inputs.participateInBulletin) {
|
|
151
|
+
actions.push({
|
|
152
|
+
label: `In the same session as creating that monitor, report it to kuma-watchdog (a [→ kuma-watchdog] item plus a 📥 line in projects/kuma-watchdog.md, carrying monitor_id,project_slug,mapping_basis,monitor_name,note)`,
|
|
153
|
+
note: "format: [[uptime-kuma-monitor]] §3b; the same rule is in this project's CLAUDE.md under Uptime Kuma",
|
|
154
|
+
});
|
|
155
|
+
}
|
|
138
156
|
}
|
|
139
157
|
if (isDecisionInserted(result.decisions, "sentry")) {
|
|
140
158
|
actions.push({
|
package/package.json
CHANGED
|
@@ -182,6 +182,24 @@ export function strictExitReasons({ strict, statusOnly, unreadableStatus = [], z
|
|
|
182
182
|
// The buckets are DISJOINT and CONSERVING: every input entry lands in exactly one, so the
|
|
183
183
|
// four lengths always sum to the input length. That is what makes the report auditable —
|
|
184
184
|
// an entry cannot go missing without changing a number somebody prints.
|
|
185
|
+
// The older `status` column is the Airtable-era select list (Active, Not Yet Started,
|
|
186
|
+
// Preparing Now, Ready To Go!, Deprecated - Successful, No Longer Needed!, Retired). It is
|
|
187
|
+
// not authoritative — `production_status` is — but it still has a reader that matters:
|
|
188
|
+
// `z2w-agent-coordination`'s drift-detection.yml filters on `status = 'Active'`, so a project
|
|
189
|
+
// retired only in `production_status` kept being drift-checked as if it were running.
|
|
190
|
+
// (`z2w-science-suite`, 2026-10-30: `Retired` / `Active`.)
|
|
191
|
+
//
|
|
192
|
+
// So: a row whose production status is Retired and whose legacy status still says Active
|
|
193
|
+
// gets `Retired`. Every OTHER legacy value is left alone — "Deprecated - Successful" and
|
|
194
|
+
// "No Longer Needed!" are richer than `Retired`, and they are already non-Active, which is
|
|
195
|
+
// all the reader needs. Nothing is ever moved back to Active: un-retiring a project is a
|
|
196
|
+
// decision for a human, not an inference from a bulletin line.
|
|
197
|
+
// Returns the value to write, or null for "leave it".
|
|
198
|
+
export function legacyStatusFor(productionStatus, legacyStatus) {
|
|
199
|
+
if (productionStatus === "Retired" && legacyStatus === "Active") return "Retired";
|
|
200
|
+
return null;
|
|
201
|
+
}
|
|
202
|
+
|
|
185
203
|
export function selectBulletinFiles(entries) {
|
|
186
204
|
const md = entries.filter((f) => f.endsWith(".md"));
|
|
187
205
|
const project = md.filter((f) => !f.startsWith("_"));
|
|
@@ -811,7 +829,7 @@ async function main() {
|
|
|
811
829
|
declaredEmpty.push(slug);
|
|
812
830
|
}
|
|
813
831
|
|
|
814
|
-
const [current] = await sql`SELECT production_status, status_qualifier, consumes FROM projects WHERE slug = ${slug}`;
|
|
832
|
+
const [current] = await sql`SELECT production_status, status, status_qualifier, consumes FROM projects WHERE slug = ${slug}`;
|
|
815
833
|
const curConsumes = current?.consumes ?? [];
|
|
816
834
|
|
|
817
835
|
// ADDITIVE BY DEFAULT. Prose parsing is best-effort, so a miss must never DELETE a
|
|
@@ -849,7 +867,13 @@ async function main() {
|
|
|
849
867
|
const consumesChanged = !args.statusOnly
|
|
850
868
|
&& (nextConsumes.length > 0 || retracted.length > 0)
|
|
851
869
|
&& JSON.stringify([...nextConsumes].sort()) !== JSON.stringify([...curConsumes].sort());
|
|
852
|
-
|
|
870
|
+
// Judged against the status the row WILL have, so a project retired in this same run
|
|
871
|
+
// is caught, and so is one retired in an earlier run before this check existed.
|
|
872
|
+
const nextLegacyStatus = current
|
|
873
|
+
? legacyStatusFor(liveStatus || current.production_status, current.status)
|
|
874
|
+
: null;
|
|
875
|
+
const legacyChanged = nextLegacyStatus !== null;
|
|
876
|
+
if (!statusChanged && !qualifierChanged && !consumesChanged && !legacyChanged) continue;
|
|
853
877
|
|
|
854
878
|
// Surface edges we can't match to a registry row: valid (external backends render as
|
|
855
879
|
// "external" on the graph) but also how a stray non-app string sneaks in from prose.
|
|
@@ -859,6 +883,7 @@ async function main() {
|
|
|
859
883
|
plan.push({ slug, liveStatus, statusQualifier, asOf, consumes: nextConsumes, statusChanged, qualifierChanged, consumesChanged, current });
|
|
860
884
|
console.log(` • ${slug}: ` +
|
|
861
885
|
(statusChanged ? `status ${current?.production_status ?? "∅"} → ${liveStatus} ` : "") +
|
|
886
|
+
(legacyChanged ? `legacy status "${current.status}" → "${nextLegacyStatus}" ` : "") +
|
|
862
887
|
(qualifierChanged ? `qualifier ${current?.status_qualifier ? `"${current.status_qualifier}"` : "∅"} → ${statusQualifier ? `"${statusQualifier}"` : "∅"} ` : "") +
|
|
863
888
|
(consumesChanged ? `consumes [${curConsumes.join(", ") || "∅"}] → [${nextConsumes.join(", ")}]` : ""));
|
|
864
889
|
if (retracted.length) console.log(` ↩ RETRACTED (struck out in the bulletin): ${retracted.join(", ")}`);
|
|
@@ -881,6 +906,22 @@ async function main() {
|
|
|
881
906
|
updated_at = now()
|
|
882
907
|
WHERE slug = ${slug}`;
|
|
883
908
|
}
|
|
909
|
+
if (legacyChanged) {
|
|
910
|
+
// `AND status = 'Active'` re-checks at write time, so a human who set a richer
|
|
911
|
+
// value between the read and this write is not overwritten.
|
|
912
|
+
//
|
|
913
|
+
// A permission error here WARNS instead of failing the run. The scheduled job runs
|
|
914
|
+
// as `registry_reconciler`, whose UPDATE on `status` is a separate grant (see
|
|
915
|
+
// directives/project-registry-write-path.md); this column is not authoritative, so
|
|
916
|
+
// a missing grant must not turn the whole reconciliation red.
|
|
917
|
+
try {
|
|
918
|
+
await sql`UPDATE projects SET status = ${nextLegacyStatus}, updated_at = now()
|
|
919
|
+
WHERE slug = ${slug} AND status = 'Active'`;
|
|
920
|
+
} catch (err) {
|
|
921
|
+
if (err?.code !== "42501") throw err;
|
|
922
|
+
console.warn(` ⚠ ${slug}: legacy status NOT written: this role lacks UPDATE on projects.status (grant it; see directives/project-registry-write-path.md).`);
|
|
923
|
+
}
|
|
924
|
+
}
|
|
884
925
|
if (consumesChanged) {
|
|
885
926
|
// MUST write nextConsumes, not consumes. `consumes` is the raw parse of THIS
|
|
886
927
|
// bulletin file; `nextConsumes` is the additive union with what's already in
|