@zero2webmaster/starter-kit 0.49.0 → 0.50.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.49.0 | **Framework:** 2.19.0
3
+ **Version:** 0.50.0 | **Framework:** 2.19.0
4
4
 
5
5
  > Node CLI to scaffold new Z2W projects from canonical Templates + AGENTS.md.
6
6
 
@@ -50,7 +50,7 @@ Brand presets: `save-the-frogs`, `bansuri-bliss`, `zero2webmaster`, `custom`.
50
50
  | `--input <source>` | Non-interactive mode. `--input <path>` reads `ScaffoldInputs` JSON from a file; `--input -` reads from stdin. Bypasses brief / confirm / wizard entirely. For CI use |
51
51
  | `--dry-run` | Print the file list + contents that would be written, without touching disk |
52
52
  | `--target-path <path>` | Override the target path from inputs |
53
- | `--templates-path <path>` | Point at a Templates folder other than `~/Desktop/Zero2Webmaster/AI/Templates/`. Strict — only that exact folder is consulted |
53
+ | `--templates-path <path>` | Point at a Templates folder other than the default locations (below). Strict — only that exact folder is consulted |
54
54
  | `--promote-standards` | Run the interactive (a) inline / (b) promote-into-Templates dialog per applicable standard. Promoted standards are captured in `STANDARDS_PROMOTIONS.md` alongside the scaffold (the Templates-folder write itself is a v0.3.x concern) |
55
55
  | `--allow-non-empty` | Write into a non-empty target directory. Off by default — the CLI refuses to scaffold over existing content unless explicitly opted in |
56
56
  | `--no-color` | Suppress ANSI color in the final summary output. Honored regardless of terminal capability, per POSIX `NO_COLOR` convention |
@@ -70,8 +70,9 @@ For non-WP web apps (`nextjs`, `cf-pages` with `hasWebUi`), the CLI emits the fu
70
70
  The CLI resolves canonical template content (AGENTS bodies + Resources/) from the **local Templates folder only**:
71
71
 
72
72
  1. **`--templates-path <path>`** if set — strict use of that exact location.
73
- 2. **Local Templates folder** at `~/Desktop/Zero2Webmaster/AI/Templates/`.
74
- 3. Otherwise, hard fail with a clear `--templates-path <path>` hint.
73
+ 2. **Local Templates folder** at `~/Desktop/Zero2Webmaster/AI/Cursor Projects/agent-framework/` (where it lives after the 2026-11 move).
74
+ 3. **The old location**, `~/Desktop/Zero2Webmaster/AI/Templates/`, kept as a fallback. The first folder that holds `Resources/` plus both AGENTS bodies wins, so an empty or half-copied new folder never hides a complete old one.
75
+ 4. Otherwise, hard fail with an error that names both locations and the `--templates-path <path>` hint.
75
76
 
76
77
  The CLI reads the folder fresh on every run (nothing is cached or embedded), so an upstream Templates edit is picked up the next time you run `init`.
77
78
 
@@ -83,7 +84,8 @@ The Claude Code skill at `~/.claude/skills/instantiate-z2w-project/SKILL.md` and
83
84
 
84
85
  ## Status
85
86
 
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.50.0 (current)** looks for the Templates folder at `~/Desktop/Zero2Webmaster/AI/Cursor Projects/agent-framework/` first and falls back to the old `~/Desktop/Zero2Webmaster/AI/Templates/`, so the folder can move without breaking project creation. If neither folder is usable, the error names both.
88
+ - **v0.49.0** 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
89
  - **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
90
  - **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.
89
91
  - **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.
@@ -149,4 +151,4 @@ Inquiries: kerry@zero2webmaster.com.
149
151
  ---
150
152
 
151
153
  *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.*
152
- *Version: 0.49.0 | Last Updated: 2026-10-31*
154
+ *Version: 0.50.0 | Last Updated: 2026-11-02*
package/dist/cli.js CHANGED
@@ -198,7 +198,7 @@ program
198
198
  .option("--show-contents", "in --dry-run mode, also print every file's full content")
199
199
  .option("--input <source>", "load ScaffoldInputs JSON from a file path, or '-' for stdin (bypasses brief/wizard)")
200
200
  .option("--target-path <path>", "absolute path to scaffold into (defaults to inputs.targetPath)")
201
- .option("--templates-path <path>", "absolute path to the Templates folder (default: ~/Desktop/Zero2Webmaster/AI/Templates)")
201
+ .option("--templates-path <path>", "absolute path to the Templates folder (default: ~/Desktop/Zero2Webmaster/AI/Cursor Projects/agent-framework, then ~/Desktop/Zero2Webmaster/AI/Templates)")
202
202
  .option("--promote-standards", "run the (a) inline / (b) promote-into-Templates dialog per applicable standard")
203
203
  .option("--allow-non-empty", "allow writes into a non-empty target directory (default: refuse)")
204
204
  .option("--no-color", "disable colored output (default: auto-detect TTY)")
@@ -68,6 +68,9 @@ const SPECS = {
68
68
  repo: "agent-framework",
69
69
  relPath: "Resources/CAPTURE_LEARNINGS_BLOCK.md",
70
70
  localCandidates: () => [
71
+ // New location first (the folder moves in 2026-11), legacy kept as a
72
+ // fallback so the byte-diff test does not quietly start skipping.
73
+ join(homedir(), "Desktop/Zero2Webmaster/AI/Cursor Projects/agent-framework/Resources/CAPTURE_LEARNINGS_BLOCK.md"),
71
74
  join(homedir(), "Desktop/Zero2Webmaster/AI/Templates/Resources/CAPTURE_LEARNINGS_BLOCK.md"),
72
75
  ],
73
76
  guards: "the emitted Capture Learnings block is byte-identical to the canonical source",
package/dist/index.d.ts CHANGED
@@ -344,7 +344,7 @@ export interface ScaffoldOptions {
344
344
  date?: string;
345
345
  /**
346
346
  * Override the canonical Templates folder location. Defaults to the standard
347
- * local resolution (`~/Desktop/Zero2Webmaster/AI/Templates/`). A server
347
+ * local resolution (`~/Desktop/Zero2Webmaster/AI/Cursor Projects/agent-framework/`, falling back to `AI/Templates/`). A server
348
348
  * consumer bundles/mounts Templates and points this at it — the folder is
349
349
  * read server-side and never delivered to the client.
350
350
  */
@@ -8,7 +8,7 @@
8
8
  // CLAUDE.md uses two marker comments for layering by later ROADMAP steps:
9
9
  // - `<!-- STANDARDS_BLOCK -->` is replaced by Step 5 (standards resolver).
10
10
  // - `<!-- AGENTS_BODY -->` is replaced by Step 6 (writer) with the
11
- // canonical AGENTS body read from `~/Desktop/Zero2Webmaster/AI/Templates/`.
11
+ // canonical AGENTS body read from the Templates folder (`AI/Cursor Projects/agent-framework/`, formerly `AI/Templates/`).
12
12
  // Step 4 scaffolders emit the markers verbatim so they're easy to grep and
13
13
  // trivially testable without a Templates dependency.
14
14
  import { getBrandSpec, renderBrandBlock } from "../brand.js";
@@ -79,7 +79,7 @@ export interface StandardsResolution {
79
79
  */
80
80
  export declare function fathomEnvVarFor(projectType: ProjectType): string;
81
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
+ export declare const CANONICAL_COORDINATION_BLOCK_VERSION = "v0.1.37";
83
83
  /**
84
84
  * The canonical **Capture Learnings** block, emitted VERBATIM into every
85
85
  * scaffolded `CLAUDE.md`.
package/dist/standards.js CHANGED
@@ -491,7 +491,7 @@ const NEON_CAREFUL_BODY = `### Neon-careful (Neon Postgres)
491
491
  // Two consecutive handoffs compared this constant against the DOCUMENT version
492
492
  // and reported a "15-version gap" that did not exist — the real gap was 4. Read
493
493
  // the `<!-- ... canonical-block vX.Y.Z -->` comment, never the `**Version:**` line.
494
- export const CANONICAL_COORDINATION_BLOCK_VERSION = "v0.1.36";
494
+ export const CANONICAL_COORDINATION_BLOCK_VERSION = "v0.1.37";
495
495
  /**
496
496
  * The canonical **Capture Learnings** block, emitted VERBATIM into every
497
497
  * scaffolded `CLAUDE.md`.
@@ -1,4 +1,9 @@
1
+ /** Where the Templates folder lives after the 2026-11 move (preferred). */
1
2
  export declare const DEFAULT_TEMPLATES_PATH: string;
3
+ /** Where the Templates folder lived before the move. Kept as a fallback. */
4
+ export declare const LEGACY_TEMPLATES_PATH: string;
5
+ /** The default locations, in the order they are tried. */
6
+ export declare const DEFAULT_TEMPLATES_CANDIDATES: readonly string[];
2
7
  export declare const REQUIRED_DIRECTORIES: readonly string[];
3
8
  /** Which canonical AGENTS body: the general framework vs the WordPress edition. */
4
9
  export type AgentsKind = "general" | "wp";
@@ -19,13 +24,20 @@ export declare class TemplatesError extends Error {
19
24
  /**
20
25
  * Resolves the Templates folder path and verifies required entries are present.
21
26
  *
27
+ * Without an override, the default locations are tried in order
28
+ * (`DEFAULT_TEMPLATES_CANDIDATES`: the new agent-framework folder, then the
29
+ * legacy AI/Templates folder) and the first COMPLETE one wins. A folder that
30
+ * exists but is incomplete never shadows a complete one further down the list.
31
+ *
22
32
  * @param override - optional explicit Templates path (e.g. from --templates-path).
23
33
  * Tildes are NOT expanded; pass an already-absolute path.
34
+ * An override always wins and is never silently replaced.
35
+ * @param defaults - the default candidates, in order (injectable for tests).
24
36
  * @returns the absolute, verified Templates path.
25
- * @throws TemplatesError when the folder is missing, not a directory, or is
26
- * missing any required file/subdirectory.
37
+ * @throws TemplatesError when no usable folder is found; the message names
38
+ * every location that was tried.
27
39
  */
28
- export declare function resolveTemplatesPath(override?: string): Promise<string>;
40
+ export declare function resolveTemplatesPath(override?: string, defaults?: readonly string[]): Promise<string>;
29
41
  /**
30
42
  * Reads a single template file fresh from disk. No caching.
31
43
  *
package/dist/templates.js CHANGED
@@ -10,8 +10,12 @@
10
10
  // picked up automatically.
11
11
  //
12
12
  // The CLI resolves Templates from the local folder ONLY — the default
13
- // location (~/Desktop/Zero2Webmaster/AI/Templates) or an explicit
14
- // --templates-path override. The v0.2.0 hosted-mirror fallback
13
+ // location or an explicit --templates-path override. The default is an
14
+ // ORDERED list (v0.50.0): the folder is moving from
15
+ // ~/Desktop/Zero2Webmaster/AI/Templates to
16
+ // ~/Desktop/Zero2Webmaster/AI/Cursor Projects/agent-framework (Kerry approved
17
+ // 2026-11-02), so the new path is tried first and the old one is kept as a
18
+ // fallback for at least one release after the move. The v0.2.0 hosted-mirror fallback
15
19
  // (templates.z2w.us + a 24h local cache) was RETIRED 2026-06-23 to protect
16
20
  // the framework IP: the public mirror was taken down, so when no local
17
21
  // Templates folder is present the CLI now hard-fails with a --templates-path
@@ -19,7 +23,15 @@
19
23
  import { promises as fs } from "node:fs";
20
24
  import * as path from "node:path";
21
25
  import * as os from "node:os";
22
- export const DEFAULT_TEMPLATES_PATH = path.join(os.homedir(), "Desktop", "Zero2Webmaster", "AI", "Templates");
26
+ /** Where the Templates folder lives after the 2026-11 move (preferred). */
27
+ export const DEFAULT_TEMPLATES_PATH = path.join(os.homedir(), "Desktop", "Zero2Webmaster", "AI", "Cursor Projects", "agent-framework");
28
+ /** Where the Templates folder lived before the move. Kept as a fallback. */
29
+ export const LEGACY_TEMPLATES_PATH = path.join(os.homedir(), "Desktop", "Zero2Webmaster", "AI", "Templates");
30
+ /** The default locations, in the order they are tried. */
31
+ export const DEFAULT_TEMPLATES_CANDIDATES = [
32
+ DEFAULT_TEMPLATES_PATH,
33
+ LEGACY_TEMPLATES_PATH,
34
+ ];
23
35
  export const REQUIRED_DIRECTORIES = ["Resources"];
24
36
  /**
25
37
  * Glob patterns for the two canonical AGENTS bodies in the Templates root.
@@ -51,28 +63,12 @@ async function isDirectory(p) {
51
63
  }
52
64
  }
53
65
  /**
54
- * Resolves the Templates folder path and verifies required entries are present.
55
- *
56
- * @param override - optional explicit Templates path (e.g. from --templates-path).
57
- * Tildes are NOT expanded; pass an already-absolute path.
58
- * @returns the absolute, verified Templates path.
59
- * @throws TemplatesError when the folder is missing, not a directory, or is
60
- * missing any required file/subdirectory.
66
+ * Returns the list of problems with a candidate Templates folder, or an empty
67
+ * list when it is complete. Never throws.
61
68
  */
62
- export async function resolveTemplatesPath(override) {
63
- const candidate = override ? path.resolve(override) : DEFAULT_TEMPLATES_PATH;
64
- if (!(await isDirectory(candidate))) {
65
- if (override) {
66
- throw new TemplatesError(`Templates folder not found at the supplied path: ${candidate}\n` +
67
- `Either the path does not exist, is not a directory, or is not readable. ` +
68
- `Pass an absolute path with --templates-path, or omit the flag to use the ` +
69
- `default location (${DEFAULT_TEMPLATES_PATH}).`);
70
- }
71
- throw new TemplatesError(`Default Templates folder not found at: ${candidate}\n` +
72
- `Templates is the canonical source for AGENTS bodies and Resources boilerplate. ` +
73
- `Either restore the Templates folder at the default location, or pass ` +
74
- `--templates-path <absolute-path> to point the CLI at an alternative location.`);
75
- }
69
+ async function templatesFolderProblems(candidate) {
70
+ if (!(await isDirectory(candidate)))
71
+ return ["(folder does not exist)"];
76
72
  const missing = [];
77
73
  for (const dir of REQUIRED_DIRECTORIES) {
78
74
  if (!(await isDirectory(path.join(candidate, dir)))) {
@@ -93,13 +89,61 @@ export async function resolveTemplatesPath(override) {
93
89
  missing.push(`${AGENTS_FILE_RE[kind].source} (no match)`);
94
90
  }
95
91
  }
96
- if (missing.length > 0) {
97
- throw new TemplatesError(`Templates folder at ${candidate} is incomplete. Missing required ` +
98
- `${missing.length === 1 ? "entry" : "entries"}: ${missing.join(", ")}.\n` +
99
- `Expected: a general AGENTS body (AGENTS_v*.md), a WordPress AGENTS body ` +
100
- `(AGENTS_WP_v*.md), and the ${REQUIRED_DIRECTORIES.map((d) => `${d}/`).join(", ")} directory.`);
92
+ return missing;
93
+ }
94
+ function incompleteError(candidate, missing) {
95
+ return new TemplatesError(`Templates folder at ${candidate} is incomplete. Missing required ` +
96
+ `${missing.length === 1 ? "entry" : "entries"}: ${missing.join(", ")}.\n` +
97
+ `Expected: a general AGENTS body (AGENTS_v*.md), a WordPress AGENTS body ` +
98
+ `(AGENTS_WP_v*.md), and the ${REQUIRED_DIRECTORIES.map((d) => `${d}/`).join(", ")} directory.`);
99
+ }
100
+ /**
101
+ * Resolves the Templates folder path and verifies required entries are present.
102
+ *
103
+ * Without an override, the default locations are tried in order
104
+ * (`DEFAULT_TEMPLATES_CANDIDATES`: the new agent-framework folder, then the
105
+ * legacy AI/Templates folder) and the first COMPLETE one wins. A folder that
106
+ * exists but is incomplete never shadows a complete one further down the list.
107
+ *
108
+ * @param override - optional explicit Templates path (e.g. from --templates-path).
109
+ * Tildes are NOT expanded; pass an already-absolute path.
110
+ * An override always wins and is never silently replaced.
111
+ * @param defaults - the default candidates, in order (injectable for tests).
112
+ * @returns the absolute, verified Templates path.
113
+ * @throws TemplatesError when no usable folder is found; the message names
114
+ * every location that was tried.
115
+ */
116
+ export async function resolveTemplatesPath(override, defaults = DEFAULT_TEMPLATES_CANDIDATES) {
117
+ if (override) {
118
+ const candidate = path.resolve(override);
119
+ if (!(await isDirectory(candidate))) {
120
+ throw new TemplatesError(`Templates folder not found at the supplied path: ${candidate}\n` +
121
+ `Either the path does not exist, is not a directory, or is not readable. ` +
122
+ `Pass an absolute path with --templates-path, or omit the flag to use the ` +
123
+ `default locations (${defaults.join(", then ")}).`);
124
+ }
125
+ const missing = await templatesFolderProblems(candidate);
126
+ if (missing.length > 0)
127
+ throw incompleteError(candidate, missing);
128
+ return candidate;
129
+ }
130
+ let firstIncomplete;
131
+ for (const candidate of defaults) {
132
+ if (!(await isDirectory(candidate)))
133
+ continue;
134
+ const missing = await templatesFolderProblems(candidate);
135
+ if (missing.length === 0)
136
+ return candidate;
137
+ firstIncomplete ??= { candidate, missing };
138
+ }
139
+ if (firstIncomplete) {
140
+ throw incompleteError(firstIncomplete.candidate, firstIncomplete.missing);
101
141
  }
102
- return candidate;
142
+ throw new TemplatesError(`Default Templates folder not found. Looked in:\n` +
143
+ defaults.map((d) => ` - ${d}`).join("\n") +
144
+ `\nTemplates is the canonical source for AGENTS bodies and Resources boilerplate. ` +
145
+ `Either put the Templates folder at one of those locations, or pass ` +
146
+ `--templates-path <absolute-path> to point the CLI at an alternative location.`);
103
147
  }
104
148
  /**
105
149
  * Reads a single template file fresh from disk. No caching.
package/dist/writer.js CHANGED
@@ -1,6 +1,6 @@
1
1
  // z2w-starter-kit writer — composes the Step 4 scaffolder output, the Step 5
2
2
  // standards resolver output, and the canonical AGENTS body read fresh from
3
- // `~/Desktop/Zero2Webmaster/AI/Templates/` into a final file list, then writes
3
+ // `~/Desktop/Zero2Webmaster/AI/Cursor Projects/agent-framework/` (formerly AI/Templates) into a final file list, then writes
4
4
  // the files atomically into the user's target path.
5
5
  //
6
6
  // Pipeline (in order):
@@ -108,7 +108,8 @@ function buildPromotionsFile(inputs, promotions, date) {
108
108
  `**Generated:** ${date}`,
109
109
  ``,
110
110
  `During scaffold the following standards were marked for promotion into`,
111
- `\`~/Desktop/Zero2Webmaster/AI/Templates/\` rather than inlined in CLAUDE.md.`,
111
+ `\`~/Desktop/Zero2Webmaster/AI/Cursor Projects/agent-framework/\` (the Templates`,
112
+ `folder) rather than inlined in CLAUDE.md.`,
112
113
  ``,
113
114
  `v0.1.x of \`@zero2webmaster/starter-kit\` captures the intent only — the`,
114
115
  `actual Templates write is a separate follow-up. For each entry below, copy`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zero2webmaster/starter-kit",
3
- "version": "0.49.0",
3
+ "version": "0.50.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",