@zero2webmaster/starter-kit 0.1.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.
Files changed (87) hide show
  1. package/LICENSE +38 -0
  2. package/README.md +89 -0
  3. package/dist/brand.d.ts +72 -0
  4. package/dist/brand.d.ts.map +1 -0
  5. package/dist/brand.js +198 -0
  6. package/dist/brand.js.map +1 -0
  7. package/dist/brief.d.ts +14 -0
  8. package/dist/brief.d.ts.map +1 -0
  9. package/dist/brief.js +47 -0
  10. package/dist/brief.js.map +1 -0
  11. package/dist/cli.d.ts +3 -0
  12. package/dist/cli.d.ts.map +1 -0
  13. package/dist/cli.js +82 -0
  14. package/dist/cli.js.map +1 -0
  15. package/dist/confirm.d.ts +45 -0
  16. package/dist/confirm.d.ts.map +1 -0
  17. package/dist/confirm.js +382 -0
  18. package/dist/confirm.js.map +1 -0
  19. package/dist/index.d.ts +32 -0
  20. package/dist/index.d.ts.map +1 -0
  21. package/dist/index.js +12 -0
  22. package/dist/index.js.map +1 -0
  23. package/dist/parse-brief.d.ts +32 -0
  24. package/dist/parse-brief.d.ts.map +1 -0
  25. package/dist/parse-brief.js +298 -0
  26. package/dist/parse-brief.js.map +1 -0
  27. package/dist/scaffolders/cf-pages.d.ts +9 -0
  28. package/dist/scaffolders/cf-pages.d.ts.map +1 -0
  29. package/dist/scaffolders/cf-pages.js +259 -0
  30. package/dist/scaffolders/cf-pages.js.map +1 -0
  31. package/dist/scaffolders/cf-worker.d.ts +4 -0
  32. package/dist/scaffolders/cf-worker.d.ts.map +1 -0
  33. package/dist/scaffolders/cf-worker.js +112 -0
  34. package/dist/scaffolders/cf-worker.js.map +1 -0
  35. package/dist/scaffolders/common.d.ts +39 -0
  36. package/dist/scaffolders/common.d.ts.map +1 -0
  37. package/dist/scaffolders/common.js +441 -0
  38. package/dist/scaffolders/common.js.map +1 -0
  39. package/dist/scaffolders/index.d.ts +18 -0
  40. package/dist/scaffolders/index.d.ts.map +1 -0
  41. package/dist/scaffolders/index.js +40 -0
  42. package/dist/scaffolders/index.js.map +1 -0
  43. package/dist/scaffolders/library.d.ts +4 -0
  44. package/dist/scaffolders/library.d.ts.map +1 -0
  45. package/dist/scaffolders/library.js +122 -0
  46. package/dist/scaffolders/library.js.map +1 -0
  47. package/dist/scaffolders/nextjs.d.ts +10 -0
  48. package/dist/scaffolders/nextjs.d.ts.map +1 -0
  49. package/dist/scaffolders/nextjs.js +395 -0
  50. package/dist/scaffolders/nextjs.js.map +1 -0
  51. package/dist/scaffolders/protocol-repo.d.ts +4 -0
  52. package/dist/scaffolders/protocol-repo.d.ts.map +1 -0
  53. package/dist/scaffolders/protocol-repo.js +162 -0
  54. package/dist/scaffolders/protocol-repo.js.map +1 -0
  55. package/dist/scaffolders/python-service.d.ts +4 -0
  56. package/dist/scaffolders/python-service.d.ts.map +1 -0
  57. package/dist/scaffolders/python-service.js +144 -0
  58. package/dist/scaffolders/python-service.js.map +1 -0
  59. package/dist/scaffolders/wp-plugin.d.ts +4 -0
  60. package/dist/scaffolders/wp-plugin.d.ts.map +1 -0
  61. package/dist/scaffolders/wp-plugin.js +268 -0
  62. package/dist/scaffolders/wp-plugin.js.map +1 -0
  63. package/dist/standards.d.ts +65 -0
  64. package/dist/standards.d.ts.map +1 -0
  65. package/dist/standards.js +335 -0
  66. package/dist/standards.js.map +1 -0
  67. package/dist/substitute.d.ts +37 -0
  68. package/dist/substitute.d.ts.map +1 -0
  69. package/dist/substitute.js +98 -0
  70. package/dist/substitute.js.map +1 -0
  71. package/dist/summary.d.ts +20 -0
  72. package/dist/summary.d.ts.map +1 -0
  73. package/dist/summary.js +191 -0
  74. package/dist/summary.js.map +1 -0
  75. package/dist/templates.d.ts +30 -0
  76. package/dist/templates.d.ts.map +1 -0
  77. package/dist/templates.js +123 -0
  78. package/dist/templates.js.map +1 -0
  79. package/dist/wizard.d.ts +12 -0
  80. package/dist/wizard.d.ts.map +1 -0
  81. package/dist/wizard.js +158 -0
  82. package/dist/wizard.js.map +1 -0
  83. package/dist/writer.d.ts +62 -0
  84. package/dist/writer.d.ts.map +1 -0
  85. package/dist/writer.js +367 -0
  86. package/dist/writer.js.map +1 -0
  87. package/package.json +72 -0
@@ -0,0 +1,191 @@
1
+ // z2w-starter-kit final summary renderer.
2
+ //
3
+ // Pure rendering layer that turns a {@link WriteScaffoldResult} (from the
4
+ // Step 6 writer) + the original {@link ScaffoldInputs} into the post-scaffold
5
+ // summary block the [[instantiate-z2w-project]] skill v1.1.0 Step 7 spec
6
+ // requires. Five sections, in order:
7
+ //
8
+ // 1. Scaffold-complete banner (slug + targetPath + file count; "Dry run" prefix in dry-run mode)
9
+ // 2. Standards inserted — from decisions where state === "inserted-inline"
10
+ // 3. Standards skipped — from decisions where state === "skipped-not-applicable"
11
+ // 4. Promotions — only when at least one promotion.choice === "promote"
12
+ // 5. Next actions checklist — conditional on inputs + decisions
13
+ //
14
+ // Coloring (per CLAUDE.md brand block + skill spec): Z2W green `#82C92B` for
15
+ // section headings, Z2W gold `#FFD700` for the next-actions checklist. Color
16
+ // is suppressed when `opts.noColor` is true, when the output stream is not a
17
+ // TTY (e.g., piped to `tee` / a file / a test stream), and when
18
+ // `opts.forceColor` is not set. Tests pin level=0 explicitly to assert ANSI
19
+ // escapes are absent.
20
+ import { Chalk } from "chalk";
21
+ import { fathomEnvVarFor } from "./standards.js";
22
+ const Z2W_GREEN = "#82C92B";
23
+ const Z2W_GOLD = "#FFD700";
24
+ const PROMOTIONS_FILE = "STANDARDS_PROMOTIONS.md";
25
+ function isStreamTTY(stream) {
26
+ return stream.isTTY === true;
27
+ }
28
+ function buildChalk(opts, output) {
29
+ if (opts.noColor === true)
30
+ return new Chalk({ level: 0 });
31
+ if (opts.forceColor === true)
32
+ return new Chalk({ level: 3 });
33
+ return new Chalk({ level: isStreamTTY(output) ? 3 : 0 });
34
+ }
35
+ /**
36
+ * Project-type-specific install/setup command surfaced as the first
37
+ * post-scaffold install step in the next-actions checklist. `null` means no
38
+ * install is needed (currently only `protocol-repo`).
39
+ */
40
+ function installCommandFor(projectType) {
41
+ switch (projectType) {
42
+ case "wp-plugin":
43
+ return "composer install # if the plugin uses Composer; otherwise skip";
44
+ case "cf-worker":
45
+ case "cf-pages":
46
+ case "nextjs":
47
+ case "library":
48
+ return "npm install";
49
+ case "python-service":
50
+ return "python -m venv .venv && source .venv/bin/activate && pip install -e .";
51
+ case "protocol-repo":
52
+ return null;
53
+ }
54
+ }
55
+ function isDecisionInserted(decisions, key) {
56
+ return decisions.some((d) => d.key === key && d.state === "inserted-inline");
57
+ }
58
+ function buildNextActions(inputs, result) {
59
+ const actions = [
60
+ { label: `cd ${result.targetPath}` },
61
+ {
62
+ label: `git init && git add . && git commit -m "v0.1.0 — Initial scaffold"`,
63
+ },
64
+ {
65
+ label: `gh repo create ${inputs.githubOrg}/${inputs.slug} --private`,
66
+ },
67
+ ];
68
+ const installCmd = installCommandFor(inputs.projectType);
69
+ if (installCmd !== null) {
70
+ actions.push({ label: installCmd });
71
+ }
72
+ if (inputs.participateInBulletin) {
73
+ actions.push({
74
+ label: `Bootstrap projects/${inputs.slug}.md in zero2webmaster/z2w-agent-coordination`,
75
+ note: "see [[instantiate-z2w-project]] SKILL.md Step 7 + AGENT_PROTOCOL.md §8.3 for the bulletin clone-location 3-step rule",
76
+ });
77
+ }
78
+ if (isDecisionInserted(result.decisions, "fathom")) {
79
+ const envVar = fathomEnvVarFor(inputs.projectType);
80
+ actions.push({
81
+ label: `Create the Fathom site, then set ${envVar} in the production environment`,
82
+ note: "see [[fathom-analytics]] for the single-tenant vs multi-tenant pattern",
83
+ });
84
+ }
85
+ if (isDecisionInserted(result.decisions, "neon-careful")) {
86
+ actions.push({
87
+ label: `Create the Neon project, then set DATABASE_URL in the production environment`,
88
+ note: "see [[neon-postgres]] — keep /health DB-free, pool size 1 in monitoring contexts",
89
+ });
90
+ }
91
+ if (isDecisionInserted(result.decisions, "uptime-kuma")) {
92
+ actions.push({
93
+ label: `After first deploy, add an HTTP(s)-Keyword monitor in Uptime Kuma pointing at /health`,
94
+ note: "see [[uptime-kuma-monitor]] — 60s heartbeat, 2 retries, 60s retry interval, 48s timeout, accepted 200-299",
95
+ });
96
+ }
97
+ if (inputs.projectType === "wp-plugin") {
98
+ actions.push({
99
+ label: `Symlink the plugin folder into Local by Flywheel (ln -s ...)`,
100
+ note: "see [[symlink-safety]] — NEVER delete the plugin via WP Admin; that follows the symlink and recursively deletes the source",
101
+ });
102
+ }
103
+ return actions;
104
+ }
105
+ function renderBanner(chalk, inputs, result) {
106
+ const heading = chalk.hex(Z2W_GREEN).bold;
107
+ const verb = result.dryRun ? "Dry run" : "Scaffold complete";
108
+ const writeVerb = result.dryRun ? "would be written" : "wrote";
109
+ const fileWord = result.filesWritten.length === 1 ? "file" : "files";
110
+ return [
111
+ heading(`✓ ${verb} — ${result.dryRun ? "" : "wrote "}${result.filesWritten.length} ${fileWord}${result.dryRun ? " " + writeVerb : ""} into ${result.targetPath}`),
112
+ heading(` Project: ${inputs.slug}`),
113
+ ].join("\n");
114
+ }
115
+ function renderInsertedSection(chalk, result) {
116
+ const heading = chalk.hex(Z2W_GREEN).bold;
117
+ const inserted = result.decisions.filter((d) => d.state === "inserted-inline");
118
+ const lines = [heading("Standards inserted:")];
119
+ if (inserted.length === 0) {
120
+ lines.push(" (none — no organization standards applied to this project)");
121
+ }
122
+ else {
123
+ for (const d of inserted) {
124
+ lines.push(` - ${d.title}`);
125
+ }
126
+ }
127
+ return lines.join("\n");
128
+ }
129
+ function renderSkippedSection(chalk, result) {
130
+ const heading = chalk.hex(Z2W_GREEN).bold;
131
+ const skipped = result.decisions.filter((d) => d.state === "skipped-not-applicable");
132
+ const lines = [heading("Standards skipped:")];
133
+ if (skipped.length === 0) {
134
+ lines.push(" (none — every applicable standard was inserted)");
135
+ }
136
+ else {
137
+ for (const d of skipped) {
138
+ lines.push(` - ${d.title} — ${d.reason}`);
139
+ }
140
+ }
141
+ return lines.join("\n");
142
+ }
143
+ function renderPromotionsSection(chalk, result) {
144
+ const promoted = result.promotions.filter((p) => p.choice === "promote");
145
+ if (promoted.length === 0)
146
+ return null;
147
+ const heading = chalk.hex(Z2W_GREEN).bold;
148
+ const word = promoted.length === 1 ? "standard" : "standards";
149
+ const lines = [heading("Promotions:")];
150
+ lines.push(` ${promoted.length} ${word} marked for promotion into Templates — see ${PROMOTIONS_FILE} alongside the scaffold for the follow-up list.`);
151
+ for (const p of promoted) {
152
+ lines.push(` - ${p.title}`);
153
+ }
154
+ return lines.join("\n");
155
+ }
156
+ function renderNextActionsSection(chalk, inputs, result) {
157
+ const heading = chalk.hex(Z2W_GREEN).bold;
158
+ const item = chalk.hex(Z2W_GOLD);
159
+ const actions = buildNextActions(inputs, result);
160
+ const lines = [heading("Next actions (NOT done by the CLI — your call):")];
161
+ for (const action of actions) {
162
+ lines.push(` ${item("□")} ${item(action.label)}`);
163
+ if (action.note !== undefined) {
164
+ lines.push(` ${action.note}`);
165
+ }
166
+ }
167
+ return lines.join("\n");
168
+ }
169
+ /**
170
+ * Render the post-scaffold summary block.
171
+ *
172
+ * Pure rendering — does not touch disk, does not mutate `inputs` or `result`.
173
+ * The full block is written to `opts.output` (defaults to `process.stdout`)
174
+ * via a single `.write()` call so consumers piping to `tee` get one chunk
175
+ * rather than interleaved partials.
176
+ */
177
+ export function renderSummary(inputs, result, opts = {}) {
178
+ const output = opts.output ?? process.stdout;
179
+ const chalk = buildChalk(opts, output);
180
+ const sections = [
181
+ renderBanner(chalk, inputs, result),
182
+ renderInsertedSection(chalk, result),
183
+ renderSkippedSection(chalk, result),
184
+ ];
185
+ const promotions = renderPromotionsSection(chalk, result);
186
+ if (promotions !== null)
187
+ sections.push(promotions);
188
+ sections.push(renderNextActionsSection(chalk, inputs, result));
189
+ output.write("\n" + sections.join("\n\n") + "\n");
190
+ }
191
+ //# sourceMappingURL=summary.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"summary.js","sourceRoot":"","sources":["../src/summary.ts"],"names":[],"mappings":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AC,wBAAwB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAE/D,MAAM,CAAC,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC;AACpD,CAAC"}
@@ -0,0 +1,30 @@
1
+ export declare const DEFAULT_TEMPLATES_PATH: string;
2
+ export declare const REQUIRED_FILES: readonly string[];
3
+ export declare const REQUIRED_DIRECTORIES: readonly string[];
4
+ export declare class TemplatesError extends Error {
5
+ constructor(message: string);
6
+ }
7
+ /**
8
+ * Resolves the Templates folder path and verifies required entries are present.
9
+ *
10
+ * @param override - optional explicit Templates path (e.g. from --templates-path).
11
+ * Tildes are NOT expanded; pass an already-absolute path.
12
+ * @returns the absolute, verified Templates path.
13
+ * @throws TemplatesError when the folder is missing, not a directory, or is
14
+ * missing any required file/subdirectory.
15
+ */
16
+ export declare function resolveTemplatesPath(override?: string): Promise<string>;
17
+ /**
18
+ * Reads a single template file fresh from disk. No caching.
19
+ *
20
+ * @param name - the template file name relative to the Templates root
21
+ * (e.g. "AGENTS_v2.13.0.md", "Resources/README.md").
22
+ * @param templatesPath - optional absolute path to the Templates root. When
23
+ * omitted, resolveTemplatesPath() is called with no
24
+ * override (i.e. the default location is used).
25
+ * @returns the file contents as a UTF-8 string.
26
+ * @throws TemplatesError when the file is missing, is a directory, escapes the
27
+ * Templates root, or otherwise cannot be read.
28
+ */
29
+ export declare function readTemplate(name: string, templatesPath?: string): Promise<string>;
30
+ //# sourceMappingURL=templates.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../src/templates.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,sBAAsB,QAMlC,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,SAAS,MAAM,EAG3C,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,SAAS,MAAM,EAAkB,CAAC;AAErE,qBAAa,cAAe,SAAQ,KAAK;gBAC3B,OAAO,EAAE,MAAM;CAI5B;AAoBD;;;;;;;;GAQG;AACH,wBAAsB,oBAAoB,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CA0C7E;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,YAAY,CAChC,IAAI,EAAE,MAAM,EACZ,aAAa,CAAC,EAAE,MAAM,GACrB,OAAO,CAAC,MAAM,CAAC,CAqCjB"}
@@ -0,0 +1,123 @@
1
+ // z2w-starter-kit Templates resolver.
2
+ //
3
+ // Locates Kerry's canonical Templates folder (or a user-supplied override),
4
+ // verifies the required files/directories are present, and reads individual
5
+ // template files fresh from disk on every call.
6
+ //
7
+ // Per CLAUDE.md Operating Principle #1: never cache or embed Templates
8
+ // content. Every readTemplate() call hits the disk so upstream Template
9
+ // version bumps (e.g. AGENTS_WP_v3.1.0 → v3.2.0) are picked up automatically.
10
+ import { promises as fs } from "node:fs";
11
+ import * as path from "node:path";
12
+ import * as os from "node:os";
13
+ export const DEFAULT_TEMPLATES_PATH = path.join(os.homedir(), "Desktop", "Zero2Webmaster", "AI", "Templates");
14
+ export const REQUIRED_FILES = [
15
+ "AGENTS_v2.13.0.md",
16
+ "AGENTS_WP_v3.1.0.md",
17
+ ];
18
+ export const REQUIRED_DIRECTORIES = ["Resources"];
19
+ export class TemplatesError extends Error {
20
+ constructor(message) {
21
+ super(message);
22
+ this.name = "TemplatesError";
23
+ }
24
+ }
25
+ async function isDirectory(p) {
26
+ try {
27
+ const stat = await fs.stat(p);
28
+ return stat.isDirectory();
29
+ }
30
+ catch {
31
+ return false;
32
+ }
33
+ }
34
+ async function isFile(p) {
35
+ try {
36
+ const stat = await fs.stat(p);
37
+ return stat.isFile();
38
+ }
39
+ catch {
40
+ return false;
41
+ }
42
+ }
43
+ /**
44
+ * Resolves the Templates folder path and verifies required entries are present.
45
+ *
46
+ * @param override - optional explicit Templates path (e.g. from --templates-path).
47
+ * Tildes are NOT expanded; pass an already-absolute path.
48
+ * @returns the absolute, verified Templates path.
49
+ * @throws TemplatesError when the folder is missing, not a directory, or is
50
+ * missing any required file/subdirectory.
51
+ */
52
+ export async function resolveTemplatesPath(override) {
53
+ const candidate = override ? path.resolve(override) : DEFAULT_TEMPLATES_PATH;
54
+ if (!(await isDirectory(candidate))) {
55
+ if (override) {
56
+ throw new TemplatesError(`Templates folder not found at the supplied path: ${candidate}\n` +
57
+ `Either the path does not exist, is not a directory, or is not readable. ` +
58
+ `Pass an absolute path with --templates-path, or omit the flag to use the ` +
59
+ `default location (${DEFAULT_TEMPLATES_PATH}).`);
60
+ }
61
+ throw new TemplatesError(`Default Templates folder not found at: ${candidate}\n` +
62
+ `Templates is the canonical source for AGENTS bodies and Resources boilerplate. ` +
63
+ `Either restore the Templates folder at the default location, or pass ` +
64
+ `--templates-path <absolute-path> to point the CLI at an alternative location.`);
65
+ }
66
+ const missing = [];
67
+ for (const file of REQUIRED_FILES) {
68
+ if (!(await isFile(path.join(candidate, file)))) {
69
+ missing.push(file);
70
+ }
71
+ }
72
+ for (const dir of REQUIRED_DIRECTORIES) {
73
+ if (!(await isDirectory(path.join(candidate, dir)))) {
74
+ missing.push(`${dir}/`);
75
+ }
76
+ }
77
+ if (missing.length > 0) {
78
+ throw new TemplatesError(`Templates folder at ${candidate} is incomplete. Missing required ` +
79
+ `${missing.length === 1 ? "entry" : "entries"}: ${missing.join(", ")}.\n` +
80
+ `Expected files: ${REQUIRED_FILES.join(", ")}.\n` +
81
+ `Expected directories: ${REQUIRED_DIRECTORIES.map((d) => `${d}/`).join(", ")}.`);
82
+ }
83
+ return candidate;
84
+ }
85
+ /**
86
+ * Reads a single template file fresh from disk. No caching.
87
+ *
88
+ * @param name - the template file name relative to the Templates root
89
+ * (e.g. "AGENTS_v2.13.0.md", "Resources/README.md").
90
+ * @param templatesPath - optional absolute path to the Templates root. When
91
+ * omitted, resolveTemplatesPath() is called with no
92
+ * override (i.e. the default location is used).
93
+ * @returns the file contents as a UTF-8 string.
94
+ * @throws TemplatesError when the file is missing, is a directory, escapes the
95
+ * Templates root, or otherwise cannot be read.
96
+ */
97
+ export async function readTemplate(name, templatesPath) {
98
+ if (typeof name !== "string" || name.length === 0) {
99
+ throw new TemplatesError(`readTemplate() requires a non-empty name; got ${JSON.stringify(name)}.`);
100
+ }
101
+ const root = templatesPath
102
+ ? path.resolve(templatesPath)
103
+ : await resolveTemplatesPath();
104
+ const fullPath = path.resolve(root, name);
105
+ const rootWithSep = root.endsWith(path.sep) ? root : root + path.sep;
106
+ if (fullPath !== root && !fullPath.startsWith(rootWithSep)) {
107
+ throw new TemplatesError(`Template name "${name}" resolves outside the Templates folder. Refusing to read.`);
108
+ }
109
+ try {
110
+ return await fs.readFile(fullPath, "utf8");
111
+ }
112
+ catch (err) {
113
+ const code = err.code;
114
+ if (code === "ENOENT") {
115
+ throw new TemplatesError(`Template file not found: ${name} (looked at ${fullPath}).`);
116
+ }
117
+ if (code === "EISDIR") {
118
+ throw new TemplatesError(`Template path is a directory, not a file: ${name}.`);
119
+ }
120
+ throw new TemplatesError(`Failed to read template "${name}": ${err.message}`);
121
+ }
122
+ }
123
+ //# sourceMappingURL=templates.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"templates.js","sourceRoot":"","sources":["../src/templates.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,EAAE;AACF,4EAA4E;AAC5E,4EAA4E;AAC5E,gDAAgD;AAChD,EAAE;AACF,uEAAuE;AACvE,wEAAwE;AACxE,8EAA8E;AAE9E,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAE9B,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,CAAC,IAAI,CAC7C,EAAE,CAAC,OAAO,EAAE,EACZ,SAAS,EACT,gBAAgB,EAChB,IAAI,EACJ,WAAW,CACZ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
@@ -0,0 +1,12 @@
1
+ import type { Prompter } from "./confirm.js";
2
+ import type { ScaffoldInputs } from "./index.js";
3
+ export interface WizardOptions {
4
+ prompter: Prompter;
5
+ output?: NodeJS.WritableStream;
6
+ skipFsChecks?: boolean;
7
+ }
8
+ /**
9
+ * Run the 8-question fallback wizard. Output shape matches brief-first flow.
10
+ */
11
+ export declare function runWizard(opts: WizardOptions): Promise<ScaffoldInputs>;
12
+ //# sourceMappingURL=wizard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wizard.d.ts","sourceRoot":"","sources":["../src/wizard.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAW7C,OAAO,KAAK,EAKV,cAAc,EACf,MAAM,YAAY,CAAC;AAEpB,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,QAAQ,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC,cAAc,CAAC;IAC/B,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AA4ID;;GAEG;AACH,wBAAsB,SAAS,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO,CAAC,cAAc,CAAC,CA+G5E"}
package/dist/wizard.js ADDED
@@ -0,0 +1,158 @@
1
+ // z2w-starter-kit fallback wizard.
2
+ //
3
+ // 8 sequential questions, for users without a brief (or who type `skip` at the
4
+ // brief prompt, or pass --wizard). The output is the same ScaffoldInputs shape
5
+ // the brief-first flow produces. Validation rules match confirm.ts so the two
6
+ // paths converge.
7
+ //
8
+ // Like confirm.ts, this module accepts a Prompter seam for testability.
9
+ import { BRANDS, DB_STRATEGIES, PROJECT_TYPES, parseSlug, } from "./confirm.js";
10
+ import { isHexColor } from "./brand.js";
11
+ import { githubOrgForBrand } from "./parse-brief.js";
12
+ import * as path from "node:path";
13
+ import { promises as fs } from "node:fs";
14
+ async function askValidated(prompter, message, parse, defaultValue, output) {
15
+ while (true) {
16
+ const raw = await prompter(message, defaultValue);
17
+ const result = parse(raw);
18
+ if (result.ok)
19
+ return result.value;
20
+ (output ?? process.stdout).write(`\n ✗ ${result.error}\n`);
21
+ }
22
+ }
23
+ function parseYesNo(raw) {
24
+ const t = raw.trim().toLowerCase();
25
+ if (["y", "yes", "true", "1"].includes(t))
26
+ return { ok: true, value: true };
27
+ if (["n", "no", "false", "0"].includes(t))
28
+ return { ok: true, value: false };
29
+ return { ok: false, error: `Expected yes or no. Got: "${raw}".` };
30
+ }
31
+ function parseEnumValue(options, label) {
32
+ return (raw) => {
33
+ const trimmed = raw.trim();
34
+ if (options.includes(trimmed)) {
35
+ return { ok: true, value: trimmed };
36
+ }
37
+ return {
38
+ ok: false,
39
+ error: `${label} must be one of: ${options.join(", ")}. Got: "${trimmed}".`,
40
+ };
41
+ };
42
+ }
43
+ function parseNonEmpty(label) {
44
+ return (raw) => {
45
+ const trimmed = raw.trim();
46
+ if (trimmed.length === 0) {
47
+ return { ok: false, error: `${label} cannot be empty.` };
48
+ }
49
+ return { ok: true, value: trimmed };
50
+ };
51
+ }
52
+ function parseHex(label) {
53
+ return (raw) => {
54
+ const trimmed = raw.trim();
55
+ if (isHexColor(trimmed)) {
56
+ return { ok: true, value: trimmed };
57
+ }
58
+ return {
59
+ ok: false,
60
+ error: `${label} must be a hex literal like #RGB or #RRGGBB. Got: "${trimmed}".`,
61
+ };
62
+ };
63
+ }
64
+ async function askCustomBrand(prompter, output) {
65
+ output.write("\nCustom brand follow-ups (4 fields):\n");
66
+ const brandName = await askValidated(prompter, " 4a. Brand name:", parseNonEmpty("Brand name"), undefined, output);
67
+ const brandNameRule = await askValidated(prompter, " 4b. Capitalization rule:", parseNonEmpty("Capitalization rule"), undefined, output);
68
+ const primaryColor = await askValidated(prompter, " 4c. Primary hex color (e.g. #82C92B):", parseHex("Primary color"), undefined, output);
69
+ const accentColor = await askValidated(prompter, " 4d. Accent hex color (e.g. #FFD700):", parseHex("Accent color"), undefined, output);
70
+ return { brandName, brandNameRule, primaryColor, accentColor };
71
+ }
72
+ function makeTargetPathParser(skipFsChecks) {
73
+ return async (raw) => {
74
+ const trimmed = raw.trim();
75
+ if (!path.isAbsolute(trimmed)) {
76
+ return {
77
+ ok: false,
78
+ error: `Target path must be absolute (start with /). Got: "${trimmed}".`,
79
+ };
80
+ }
81
+ if (skipFsChecks)
82
+ return { ok: true, value: trimmed };
83
+ try {
84
+ const stat = await fs.stat(trimmed);
85
+ if (!stat.isDirectory()) {
86
+ return {
87
+ ok: false,
88
+ error: `Target path exists and is not a directory: ${trimmed}`,
89
+ };
90
+ }
91
+ const entries = await fs.readdir(trimmed);
92
+ if (entries.length > 0) {
93
+ return {
94
+ ok: false,
95
+ error: `Target path exists and is not empty: ${trimmed}`,
96
+ };
97
+ }
98
+ }
99
+ catch (err) {
100
+ const code = err.code;
101
+ if (code !== "ENOENT") {
102
+ return {
103
+ ok: false,
104
+ error: `Cannot stat target path "${trimmed}": ${err.message}`,
105
+ };
106
+ }
107
+ }
108
+ return { ok: true, value: trimmed };
109
+ };
110
+ }
111
+ /**
112
+ * Run the 8-question fallback wizard. Output shape matches brief-first flow.
113
+ */
114
+ export async function runWizard(opts) {
115
+ const { prompter } = opts;
116
+ const out = opts.output ?? process.stdout;
117
+ const skipFs = opts.skipFsChecks ?? false;
118
+ out.write("\nWizard mode — 8 questions to scaffold a new project.\n");
119
+ const slug = await askValidated(prompter, "1. Project slug (e.g. my-awesome-tool):", parseSlug, undefined, out);
120
+ const description = await askValidated(prompter, "2. One-sentence description:", parseNonEmpty("Description"), undefined, out);
121
+ const projectType = await askValidated(prompter, `3. Project type (${PROJECT_TYPES.join(" / ")}):`, parseEnumValue(PROJECT_TYPES, "Project type"), undefined, out);
122
+ const brand = await askValidated(prompter, `4. Brand preset (${BRANDS.join(" / ")}):`, parseEnumValue(BRANDS, "Brand preset"), undefined, out);
123
+ const customBrand = brand === "custom" ? await askCustomBrand(prompter, out) : undefined;
124
+ const githubOrgDefault = githubOrgForBrand(brand) ?? "";
125
+ const githubOrg = await askValidated(prompter, "5. GitHub org:", parseNonEmpty("GitHub org"), githubOrgDefault, out);
126
+ const targetPathParser = makeTargetPathParser(skipFs);
127
+ let targetPath;
128
+ while (true) {
129
+ const raw = await prompter("6. Target path (absolute):");
130
+ const result = await targetPathParser(raw);
131
+ if (result.ok) {
132
+ targetPath = result.value;
133
+ break;
134
+ }
135
+ out.write(`\n ✗ ${result.error}\n`);
136
+ }
137
+ const dbStrategy = await askValidated(prompter, `7. Database strategy (${DB_STRATEGIES.join(" / ")}):`, parseEnumValue(DB_STRATEGIES, "Database strategy"), "none", out);
138
+ const hasWebUi = await askValidated(prompter, "8a. Has web UI (yes/no):", parseYesNo, undefined, out);
139
+ const hasCron = await askValidated(prompter, "8b. Has cron / scheduled jobs (yes/no):", parseYesNo, undefined, out);
140
+ const participateInBulletin = await askValidated(prompter, "8c. Participate in agent bulletin (yes/no):", parseYesNo, brand === "zero2webmaster" ? "yes" : "no", out);
141
+ const result = {
142
+ slug,
143
+ description,
144
+ projectType,
145
+ brand,
146
+ githubOrg,
147
+ targetPath,
148
+ dbStrategy,
149
+ hasWebUi,
150
+ hasCron,
151
+ participateInBulletin,
152
+ };
153
+ if (customBrand) {
154
+ result.customBrand = customBrand;
155
+ }
156
+ return result;
157
+ }
158
+ //# sourceMappingURL=wizard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wizard.js","sourceRoot":"","sources":["../src/wizard.ts"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,EAAE;AACF,+EAA+E;AAC/E,+EAA+E;AAC/E,8EAA8E;AAC9E,kBAAkB;AAClB,EAAE;AACF,wEAAwE;AAGxE,OAAO,EACL,MAAM,EACN,aAAa,EACb,aAAa,EACb,SAAS,GACV,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO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AG,MAAM,YAAY,CAChC,QAAQ,EACR,yCAAyC,EACzC,UAAU,EACV,SAAS,EACT,GAAG,CACJ,CAAC;IAEF,MAAM,qBAAqB,GAAG,MAAM,YAAY,CAC9C,QAAQ,EACR,6CAA6C,EAC7C,UAAU,EACV,KAAK,KAAK,gBAAgB,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,EACzC,GAAG,CACJ,CAAC;IAEF,MAAM,MAAM,GAAmB;QAC7B,IAAI;QACJ,WAAW;QACX,WAAW;QACX,KAAK;QACL,SAAS;QACT,UAAU;QACV,UAAU;QACV,QAAQ;QACR,OAAO;QACP,qBAAqB;KACtB,CAAC;IACF,IAAI,WAAW,EAAE,CAAC;QAChB,MAAM,CAAC,WAAW,GAAG,WAAW,CAAC;IACnC,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -0,0 +1,62 @@
1
+ import type { Prompter } from "./confirm.js";
2
+ import type { ScaffoldInputs } from "./index.js";
3
+ import type { ScaffoldFile } from "./scaffolders/common.js";
4
+ import { type StandardDecision, type StandardKey } from "./standards.js";
5
+ export interface WriteScaffoldOptions {
6
+ /** When true, print the file list + contents to stdout and skip disk writes. */
7
+ dryRun?: boolean;
8
+ /** When true (default), refuse to write into a non-empty target directory. */
9
+ refuseNonEmpty?: boolean;
10
+ /** Forwarded to {@link readTemplate}; tests pin this at a sandbox. */
11
+ templatesPath?: string;
12
+ /** When true, run the interactive (a) inline / (b) promote dialog per standard. */
13
+ promoteStandards?: boolean;
14
+ /** Forwarded to {@link resolveStandards} + {@link scaffoldByType}; date pin. */
15
+ date?: string;
16
+ /** Required when `promoteStandards: true`; ignored otherwise. */
17
+ prompter?: Prompter;
18
+ /** Where dry-run output + promotion-dialog narration are written. */
19
+ output?: NodeJS.WritableStream;
20
+ }
21
+ export type PromotionChoice = "inline" | "promote";
22
+ export interface PromotionDecision {
23
+ key: StandardKey;
24
+ title: string;
25
+ choice: PromotionChoice;
26
+ }
27
+ export interface WriteScaffoldResult {
28
+ /** The composed file list. In dry-run mode these are the files that WOULD have been written. */
29
+ filesWritten: ScaffoldFile[];
30
+ /** Decisions from the standards resolver. */
31
+ decisions: StandardDecision[];
32
+ /** Per-standard promote/inline choices from the dialog; empty when --promote-standards is off. */
33
+ promotions: PromotionDecision[];
34
+ /** Resolved absolute target path. */
35
+ targetPath: string;
36
+ /** Mirrors `opts.dryRun`. */
37
+ dryRun: boolean;
38
+ }
39
+ export declare class WriterError extends Error {
40
+ constructor(message: string);
41
+ }
42
+ /**
43
+ * Compose the Step 4 / Step 5 / Templates layers and write the result.
44
+ *
45
+ * Pure filesystem effects are concentrated here so the earlier steps stay
46
+ * testable in isolation. See module-level comment for the full pipeline.
47
+ */
48
+ export declare function writeScaffold(inputs: ScaffoldInputs, targetPath: string, opts?: WriteScaffoldOptions): Promise<WriteScaffoldResult>;
49
+ /**
50
+ * Parse a JSON string into a {@link ScaffoldInputs}. Lightweight validation —
51
+ * checks every required field is present with the right primitive type. The
52
+ * downstream layers (`scaffoldByType`, `resolveStandards`, `writeScaffold`)
53
+ * surface clearer errors for unknown enum values, so we don't re-validate
54
+ * those here.
55
+ */
56
+ export declare function parseScaffoldInputs(json: string): ScaffoldInputs;
57
+ /**
58
+ * Read the `--input <source>` value. `-` reads from stdin; anything else is a
59
+ * file path. Returns the parsed inputs.
60
+ */
61
+ export declare function loadScaffoldInputs(source: string, stdin?: NodeJS.ReadableStream): Promise<ScaffoldInputs>;
62
+ //# sourceMappingURL=writer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"writer.d.ts","sourceRoot":"","sources":["../src/writer.ts"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAM5D,OAAO,EAGL,KAAK,gBAAgB,EACrB,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