@zero2webmaster/starter-kit 0.47.1 → 0.48.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # z2w-starter-kit
2
2
 
3
- **Version:** 0.47.1 | **Framework:** 2.19.0
3
+ **Version:** 0.48.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.47.1 (current)** 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.
86
+ - **v0.48.0 (current)** 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
+ - **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
+ - **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.
87
89
 
88
90
  - **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.
89
91
 
@@ -145,4 +147,4 @@ Inquiries: kerry@zero2webmaster.com.
145
147
  ---
146
148
 
147
149
  *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.*
148
- *Version: 0.47.1 | Last Updated: 2026-10-27*
150
+ *Version: 0.48.0 | Last Updated: 2026-10-27*
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
  }
@@ -73,6 +73,22 @@ export declare function ecosystemRoleFor(slug: string): string;
73
73
  * the next re-registration would have reintroduced one of them and 42 others.
74
74
  */
75
75
  export declare const INSERT_ONLY_COLUMNS: readonly string[];
76
+ /**
77
+ * Columns this CLI writes on a new row and may only PROMOTE on an existing one:
78
+ * the DO UPDATE replaces the stored value only when it is NULL or one of the
79
+ * listed earlier stages, and otherwise keeps it.
80
+ *
81
+ * `production_status` is the case (2026-10-27). A scaffold means the project is
82
+ * `Scaffolded`, but the row usually already exists as `Planning` (a greenlit
83
+ * project gets its Project Registry row before its scaffold), and the CLI used
84
+ * to leave it there: `booking`, `video-messages` and `grantseeker` were each set
85
+ * to `Scaffolded` by hand. A plain `= EXCLUDED` would fix those and break worse
86
+ * ones: re-registering a `Live` project would demote it. So it is neither
87
+ * insert-only nor freely updated.
88
+ */
89
+ export declare const PROMOTE_ONLY_COLUMNS: Readonly<Record<string, readonly string[]>>;
90
+ /** What a scaffold makes a project, written through `PROMOTE_ONLY_COLUMNS`. */
91
+ export declare const SCAFFOLDED_STATUS = "Scaffolded";
76
92
  export interface InventoryConfig {
77
93
  /** Postgres connection string (Neon pooled "Connection String"). */
78
94
  databaseUrl: string;
package/dist/inventory.js CHANGED
@@ -115,6 +115,24 @@ export function ecosystemRoleFor(slug) {
115
115
  * the next re-registration would have reintroduced one of them and 42 others.
116
116
  */
117
117
  export const INSERT_ONLY_COLUMNS = ["project_name"];
118
+ /**
119
+ * Columns this CLI writes on a new row and may only PROMOTE on an existing one:
120
+ * the DO UPDATE replaces the stored value only when it is NULL or one of the
121
+ * listed earlier stages, and otherwise keeps it.
122
+ *
123
+ * `production_status` is the case (2026-10-27). A scaffold means the project is
124
+ * `Scaffolded`, but the row usually already exists as `Planning` (a greenlit
125
+ * project gets its Project Registry row before its scaffold), and the CLI used
126
+ * to leave it there: `booking`, `video-messages` and `grantseeker` were each set
127
+ * to `Scaffolded` by hand. A plain `= EXCLUDED` would fix those and break worse
128
+ * ones: re-registering a `Live` project would demote it. So it is neither
129
+ * insert-only nor freely updated.
130
+ */
131
+ export const PROMOTE_ONLY_COLUMNS = {
132
+ production_status: ["Planning"],
133
+ };
134
+ /** What a scaffold makes a project, written through `PROMOTE_ONLY_COLUMNS`. */
135
+ export const SCAFFOLDED_STATUS = "Scaffolded";
118
136
  /**
119
137
  * Resolve the Neon inventory config from the environment. Returns null when no
120
138
  * Z2W_INVENTORY_DATABASE_URL is set — the signal that the Neon write is disabled
@@ -195,6 +213,9 @@ export function buildProjectRow(inputs, opts = {}) {
195
213
  // Derived rather than hardcoded so a re-registration of one of the 8 cannot
196
214
  // demote it through the UPSERT's DO UPDATE (see `ecosystemRoleFor`).
197
215
  ecosystem_role: ecosystemRoleFor(inputs.slug),
216
+ // Promote-only: lifts `Planning` (or empty) to `Scaffolded`, never demotes
217
+ // a later stage — see `PROMOTE_ONLY_COLUMNS`.
218
+ production_status: SCAFFOLDED_STATUS,
198
219
  };
199
220
  // Only assert agent_coordination = Registered when the scaffold actually
200
221
  // carries the coordination block; otherwise leave it unset for Kerry. When the
@@ -265,7 +286,15 @@ export function buildUpsert(row) {
265
286
  const placeholders = columns.map((_, i) => `$${i + 1}`);
266
287
  const updates = columns
267
288
  .filter((col) => col !== INVENTORY_CONFLICT_KEY && !INSERT_ONLY_COLUMNS.includes(col))
268
- .map((col) => `${col} = EXCLUDED.${col}`);
289
+ .map((col) => {
290
+ const promoteFrom = PROMOTE_ONLY_COLUMNS[col];
291
+ if (!promoteFrom)
292
+ return `${col} = EXCLUDED.${col}`;
293
+ // The stage names are our own constants, never user input.
294
+ const earlier = promoteFrom.map((v) => `'${v}'`).join(", ");
295
+ const current = `${INVENTORY_TABLE}.${col}`;
296
+ return `${col} = CASE WHEN ${current} IS NULL OR ${current} IN (${earlier}) THEN EXCLUDED.${col} ELSE ${current} END`;
297
+ });
269
298
  // A row may carry only `slug` in pathological cases; guard the empty SET.
270
299
  const conflictClause = updates.length > 0
271
300
  ? `ON CONFLICT (${INVENTORY_CONFLICT_KEY}) DO UPDATE SET ${updates.join(", ")}`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zero2webmaster/starter-kit",
3
- "version": "0.47.1",
3
+ "version": "0.48.0",
4
4
  "description": "Node CLI to scaffold new Z2W projects from canonical Templates + AGENTS.md.",
5
5
  "author": {
6
6
  "name": "Dr. Kerry Kriger",