@zero2webmaster/starter-kit 0.47.2 → 0.48.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.47.2 | **Framework:** 2.19.0
3
+ **Version:** 0.48.1 | **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.47.2 (current)** 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.
86
+ - **v0.48.1 (current)** 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.
87
+ - **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.
88
+ - **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.
87
89
  - **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.
88
90
 
89
91
  - **v0.47.0** keeps our names out of an outside customer's project. A scaffold made with `audience: "external"` used to carry, outside `CLAUDE.md`, code comments citing our internal rules and organizations and about 60 links to our private skills (133 lines across the eight project types). Those comments now read neutrally for everyone, skill links become plain names for outside customers, and an outside `wp-plugin` no longer lists our wordpress.org username. The `@zero2webmaster/starter-kit` credit stays.
@@ -146,4 +148,4 @@ Inquiries: kerry@zero2webmaster.com.
146
148
  ---
147
149
 
148
150
  *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.*
149
- *Version: 0.47.2 | Last Updated: 2026-10-27*
151
+ *Version: 0.48.1 | Last Updated: 2026-10-31*
package/dist/cli.js CHANGED
@@ -25,18 +25,16 @@
25
25
  // Pro SEO baseline extension files on top of the base scaffold. Gated by a
26
26
  // runtime license check.
27
27
  //
28
- // Airtable inventory auto-registration (ROADMAP Step 16): after a successful
29
- // scaffold, when AIRTABLE_WRITE_PAT is set in the environment, create the
30
- // project's row in Kerry's "Cursor Projects" inventory. Gated entirely on the
31
- // PAT's presence (no PAT → silent no-op, the case for every normal user) and
32
- // warn-and-proceed (never blocks the scaffold). `--no-airtable-row` opts out.
28
+ // Airtable inventory mirror (ROADMAP Step 16): RETIRED as a default at P6
29
+ // (2026-10-27, Kerry). Neon is the Project Registry; the Airtable "Cursor
30
+ // Projects" base is no longer written unless `--airtable-row` is passed (and
31
+ // AIRTABLE_WRITE_PAT is set). The code stays as a working path, not deleted.
32
+ // `--no-airtable-row` is still accepted so existing scripts keep working.
33
33
  //
34
- // Neon inventory write (project-inventory migration P3): the inventory is
35
- // migrating off Airtable onto Neon Postgres. After a scaffold, when
36
- // Z2W_INVENTORY_DATABASE_URL is set, UPSERT the project's row into the Neon
37
- // `projects` table — DUAL-WRITE alongside Airtable during the transition (the
38
- // Airtable write is dropped at P6). Same gate + warn-and-proceed posture as the
39
- // Airtable path; no URL → silent no-op. `--no-inventory-row` opts out.
34
+ // Neon inventory write (project-inventory migration P3): after a scaffold,
35
+ // when Z2W_INVENTORY_DATABASE_URL is set, UPSERT the project's row into the
36
+ // Neon `projects` table. No URL → silent no-op; warn-and-proceed.
37
+ // `--no-inventory-row` opts out.
40
38
  import { Command } from "commander";
41
39
  import { input as inquirerInput } from "@inquirer/prompts";
42
40
  import { registerProjectRow } from "./airtable.js";
@@ -154,10 +152,9 @@ async function runInit(flags) {
154
152
  // --no-repo
155
153
  process.stdout.write("\n(--no-repo: automatic GitHub repo creation skipped; the git/gh commands are under Next actions above)\n");
156
154
  }
157
- // Airtable inventory auto-registration (ROADMAP Step 16). No-op unless
158
- // AIRTABLE_WRITE_PAT is set (so it never fires for normal users) and never
159
- // blocks the scaffold — warn-and-proceed. `--no-airtable-row` opts out.
160
- if (flags.airtableRow !== false) {
155
+ // Airtable inventory mirror: opt-in only since P6 (2026-10-27). Still a
156
+ // no-op without AIRTABLE_WRITE_PAT, and still never blocks the scaffold.
157
+ if (flags.airtableRow === true) {
161
158
  const reg = await registerProjectRow(inputs, {
162
159
  dryRun: flags.dryRun === true,
163
160
  // Verify the coordination block on disk before asserting Registered.
@@ -170,8 +167,8 @@ async function runInit(flags) {
170
167
  process.stdout.write(`\n${reg.message}\n`);
171
168
  }
172
169
  }
173
- // Neon inventory write (project-inventory migration P3 — DUAL-WRITE alongside
174
- // Airtable during the transition; Airtable is dropped at P6). No-op unless
170
+ // Neon inventory write (project-inventory migration P3; the only registry
171
+ // write since P6). No-op unless
175
172
  // Z2W_INVENTORY_DATABASE_URL is set (so it never fires for normal users) and
176
173
  // never blocks the scaffold — warn-and-proceed. `--no-inventory-row` opts out.
177
174
  if (flags.inventoryRow !== false) {
@@ -207,7 +204,8 @@ program
207
204
  .option("--no-color", "disable colored output (default: auto-detect TTY)")
208
205
  .option("--no-repo", "skip the default creation of the private GitHub repo (git init + first commit + `gh repo create {githubOrg}/{slug} --private` + push)")
209
206
  .option("--with-pro-seo", "(paid; nextjs/cf-pages) layer the Pro SEO baseline extension on top of the base scaffold")
210
- .option("--no-airtable-row", "skip Airtable inventory auto-registration (only fires when AIRTABLE_WRITE_PAT is set; internal)")
207
+ .option("--airtable-row", "also write the retired Airtable inventory mirror (off by default since 2026-10-27; needs AIRTABLE_WRITE_PAT; internal)")
208
+ .option("--no-airtable-row", "(default) do not write the retired Airtable inventory mirror")
211
209
  .option("--no-inventory-row", "skip the Neon inventory write (only fires when Z2W_INVENTORY_DATABASE_URL is set; internal)")
212
210
  .action(async (opts) => {
213
211
  try {
@@ -223,7 +221,7 @@ program
223
221
  noColor: opts["color"] === false,
224
222
  repo: opts["repo"] !== false,
225
223
  withProSeo: opts["withProSeo"] === true,
226
- airtableRow: opts["airtableRow"] !== false,
224
+ airtableRow: opts["airtableRow"] === true,
227
225
  inventoryRow: opts["inventoryRow"] !== false,
228
226
  });
229
227
  }
@@ -231,7 +231,9 @@ function quickStartFor(inputs) {
231
231
  "```bash",
232
232
  "python3 -m venv .venv",
233
233
  "source .venv/bin/activate",
234
- "pip install -e .[dev] # or: pip install -r requirements.txt",
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");
@@ -16,7 +16,7 @@ const NARRATIVE = `## What this is
16
16
  \`\`\`bash
17
17
  python3 -m venv .venv
18
18
  source .venv/bin/activate
19
- pip install -e .[dev] # or: pip install -r requirements.txt
19
+ pip install -e '.[dev]'
20
20
  uvicorn {{slug_under}}.main:app --reload
21
21
  \`\`\`
22
22
 
@@ -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.35";
81
+ export declare const CANONICAL_COORDINATION_BLOCK_VERSION = "v0.1.36";
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.35";
489
+ export const CANONICAL_COORDINATION_BLOCK_VERSION = "v0.1.36";
490
490
  /**
491
491
  * The canonical **Capture Learnings** block, emitted VERBATIM into every
492
492
  * scaffolded `CLAUDE.md`.
package/dist/summary.js CHANGED
@@ -71,7 +71,10 @@ function installCommandFor(projectType) {
71
71
  case "library":
72
72
  return "npm install";
73
73
  case "python-service":
74
- return "python -m venv .venv && source .venv/bin/activate && pip install -e .";
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
  }
@@ -126,8 +129,8 @@ function buildNextActions(inputs, result, repoAutoCreated) {
126
129
  }
127
130
  if (isDecisionInserted(result.decisions, "neon-careful")) {
128
131
  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",
132
+ 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`,
133
+ 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
134
  });
132
135
  }
133
136
  if (isDecisionInserted(result.decisions, "uptime-kuma")) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zero2webmaster/starter-kit",
3
- "version": "0.47.2",
3
+ "version": "0.48.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",
@@ -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
- if (!statusChanged && !qualifierChanged && !consumesChanged) continue;
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