@zero2webmaster/starter-kit 0.54.1 → 0.56.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 +2 -2
- package/dist/cli.js +1 -1
- package/dist/drift-sources.js +4 -7
- package/dist/index.d.ts +1 -1
- package/dist/portfolio.js +1 -0
- package/dist/scaffolders/common.d.ts +2 -0
- package/dist/scaffolders/common.js +40 -0
- package/dist/standard.js +4 -0
- package/dist/standards.d.ts +2 -2
- package/dist/standards.js +99 -1
- package/dist/templates.d.ts +5 -10
- package/dist/templates.js +8 -13
- package/package.json +1 -1
- package/scripts/rollup-integrations.mjs +0 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# z2w-starter-kit
|
|
2
2
|
|
|
3
|
-
**Version:** 0.
|
|
3
|
+
**Version:** 0.56.0 | **Framework:** 2.19.0
|
|
4
4
|
|
|
5
5
|
> Node CLI to scaffold new Z2W projects from canonical Templates + AGENTS.md.
|
|
6
6
|
|
|
@@ -154,4 +154,4 @@ Inquiries: kerry@zero2webmaster.com.
|
|
|
154
154
|
---
|
|
155
155
|
|
|
156
156
|
*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.*
|
|
157
|
-
*Version: 0.
|
|
157
|
+
*Version: 0.56.0 | Last Updated: 2026-11-15*
|
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/Projects/agent-framework
|
|
201
|
+
.option("--templates-path <path>", "absolute path to the Templates folder (default: ~/Desktop/Zero2Webmaster/AI/Projects/agent-framework)")
|
|
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)")
|
package/dist/drift-sources.js
CHANGED
|
@@ -57,10 +57,9 @@ const SPECS = {
|
|
|
57
57
|
relPath: "AGENT_PROTOCOL.md",
|
|
58
58
|
localCandidates: () => [
|
|
59
59
|
// Since 2026-08-29 these are ONE clone (the Desktop path is a symlink),
|
|
60
|
-
// but
|
|
61
|
-
// AI/Projects
|
|
60
|
+
// but both spellings are kept so a machine that predates that still works.
|
|
61
|
+
// The `AI/Cursor Projects` spelling was dropped in v0.55.0 (Step 59 part 6).
|
|
62
62
|
join(homedir(), "Desktop/Zero2Webmaster/AI/Projects/z2w-agent-coordination/AGENT_PROTOCOL.md"),
|
|
63
|
-
join(homedir(), "Desktop/Zero2Webmaster/AI/Cursor Projects/z2w-agent-coordination/AGENT_PROTOCOL.md"),
|
|
64
63
|
join(homedir(), ".cache/z2w-coordination/AGENT_PROTOCOL.md"),
|
|
65
64
|
],
|
|
66
65
|
guards: "the emitted Agent Coordination pointer is upstream's steps 1 + 1b VERBATIM, " +
|
|
@@ -70,11 +69,9 @@ const SPECS = {
|
|
|
70
69
|
repo: "agent-framework",
|
|
71
70
|
relPath: "Resources/CAPTURE_LEARNINGS_BLOCK.md",
|
|
72
71
|
localCandidates: () => [
|
|
73
|
-
//
|
|
74
|
-
//
|
|
72
|
+
// AI/Projects since ROADMAP Step 59; the older two spellings were dropped
|
|
73
|
+
// in v0.55.0 (one is a symlink to this path, the other no longer exists).
|
|
75
74
|
join(homedir(), "Desktop/Zero2Webmaster/AI/Projects/agent-framework/Resources/CAPTURE_LEARNINGS_BLOCK.md"),
|
|
76
|
-
join(homedir(), "Desktop/Zero2Webmaster/AI/Cursor Projects/agent-framework/Resources/CAPTURE_LEARNINGS_BLOCK.md"),
|
|
77
|
-
join(homedir(), "Desktop/Zero2Webmaster/AI/Templates/Resources/CAPTURE_LEARNINGS_BLOCK.md"),
|
|
78
75
|
],
|
|
79
76
|
guards: "the emitted Capture Learnings block is byte-identical to the canonical source",
|
|
80
77
|
},
|
package/dist/index.d.ts
CHANGED
|
@@ -357,7 +357,7 @@ export interface ScaffoldOptions {
|
|
|
357
357
|
date?: string;
|
|
358
358
|
/**
|
|
359
359
|
* Override the canonical Templates folder location. Defaults to the standard
|
|
360
|
-
* local resolution (`~/Desktop/Zero2Webmaster/AI/Projects/agent-framework
|
|
360
|
+
* local resolution (`~/Desktop/Zero2Webmaster/AI/Projects/agent-framework/`). A server
|
|
361
361
|
* consumer bundles/mounts Templates and points this at it — the folder is
|
|
362
362
|
* read server-side and never delivered to the client.
|
|
363
363
|
*/
|
package/dist/portfolio.js
CHANGED
|
@@ -45,6 +45,7 @@ export function portfolioRoots(env = process.env) {
|
|
|
45
45
|
*/
|
|
46
46
|
export function zero2webmasterRoots(desktop) {
|
|
47
47
|
const renamed = join(desktop, "Zero2Webmaster", "AI", "Projects");
|
|
48
|
+
// old-folder-ok: existence-checked; gives the right roots before and after the symlink goes.
|
|
48
49
|
const preRename = join(desktop, "Zero2Webmaster", "AI", "Cursor Projects");
|
|
49
50
|
const roots = [];
|
|
50
51
|
if (isDir(renamed))
|
|
@@ -86,6 +86,7 @@ export declare const COORDINATION_ONBOARDING_TEMPLATE = "# Coordination Onboardi
|
|
|
86
86
|
export declare function commonCoordinationOnboarding(inputs: ScaffoldInputs, opts: ScaffolderOptions | undefined, spec: BrandPresetSpec): ScaffoldFile | null;
|
|
87
87
|
export declare function commonTroubleshooting(inputs: ScaffoldInputs, opts: ScaffolderOptions | undefined, spec: BrandPresetSpec): ScaffoldFile;
|
|
88
88
|
export declare function commonChangelog(inputs: ScaffoldInputs, opts: ScaffolderOptions | undefined, spec: BrandPresetSpec): ScaffoldFile;
|
|
89
|
+
export declare function commonCapabilities(inputs: ScaffoldInputs, opts: ScaffolderOptions | undefined, spec: BrandPresetSpec): ScaffoldFile;
|
|
89
90
|
export declare function commonMarketing(inputs: ScaffoldInputs, opts: ScaffolderOptions | undefined, spec: BrandPresetSpec): ScaffoldFile;
|
|
90
91
|
export declare function commonBackups(inputs: ScaffoldInputs, opts: ScaffolderOptions | undefined, spec: BrandPresetSpec): ScaffoldFile;
|
|
91
92
|
export declare function commonVersion(): ScaffoldFile;
|
|
@@ -117,6 +118,7 @@ export declare function localEnvFrom(exampleContent: string, filename: string, s
|
|
|
117
118
|
/**
|
|
118
119
|
* Common base files every scaffolded project gets — CLAUDE.md, README.md,
|
|
119
120
|
* ROADMAP.md, STATUS.md, HANDOFF.md, TROUBLESHOOTING.md, CHANGELOG.md,
|
|
121
|
+
* docs/CAPABILITIES.md,
|
|
120
122
|
* VERSION, .cursorignore, .gitignore, directives/system-architecture.md.
|
|
121
123
|
*
|
|
122
124
|
* Callers pass in the per-type CLAUDE.md narrative chunk; everything else is
|
|
@@ -293,6 +293,38 @@ Living document for {{slug}}. Add an entry whenever a problem takes >15 minutes
|
|
|
293
293
|
|
|
294
294
|
*(none yet)*
|
|
295
295
|
`;
|
|
296
|
+
// Emitted for EVERY project type (the `capability-list` standard). Every repo
|
|
297
|
+
// keeps one with no exemptions (Kerry, 2026-11-05); audit-engine counted 0 of
|
|
298
|
+
// the 7 projects scaffolded 2026-10-27 → 2026-11-13 with one, because nothing
|
|
299
|
+
// created the file (filed 2026-11-13). Line 1 is the marker the weekly drift
|
|
300
|
+
// run greps for, so it must stay byte-exact. Wording is neutral on purpose: an
|
|
301
|
+
// outside customer's scaffold gets the same file.
|
|
302
|
+
const CAPABILITIES_TEMPLATE = `<!-- capabilities-inventory v1 -->
|
|
303
|
+
# What {{slug}} does: the capability inventory
|
|
304
|
+
|
|
305
|
+
**Checked against:** v{{version}} · {{date}}
|
|
306
|
+
|
|
307
|
+
**Why this file exists.** One plain-English list of everything {{slug}} does, so that a plan to move or replace it cannot forget a feature, an audit can check each one, and a marketing plan can name every selling point.
|
|
308
|
+
|
|
309
|
+
**How it is kept current.** A capability gets its entry in the same commit that ships it, and the **Checked against** line moves to that version. Status words: **live** (in use on production), **built, off** (finished, but switched off on purpose), **built, waiting** (finished, but needs a setting, another app or a decision first), **planned** (on the roadmap, not started). Never present anything below "live" as available today.
|
|
310
|
+
|
|
311
|
+
Each entry: **Name.** What it does. Status. [code]
|
|
312
|
+
→ *Who it helps:* the benefit in their words. *Proof:* a number or a link, only when one exists in this repo.
|
|
313
|
+
|
|
314
|
+
---
|
|
315
|
+
|
|
316
|
+
## 1. For the people who use it
|
|
317
|
+
|
|
318
|
+
*(Nothing yet. The first feature that ships adds its entry here.)*
|
|
319
|
+
|
|
320
|
+
## 2. For staff and admins
|
|
321
|
+
|
|
322
|
+
*(Nothing yet.)*
|
|
323
|
+
|
|
324
|
+
## 3. For other apps
|
|
325
|
+
|
|
326
|
+
*(Nothing yet. APIs, webhooks and data that other apps read go here.)*
|
|
327
|
+
`;
|
|
296
328
|
const CHANGELOG_TEMPLATE = `# Changelog
|
|
297
329
|
|
|
298
330
|
All notable changes to {{slug}}.
|
|
@@ -902,6 +934,12 @@ export function commonChangelog(inputs, opts, spec) {
|
|
|
902
934
|
content: sub(CHANGELOG_TEMPLATE, inputs, opts, spec),
|
|
903
935
|
};
|
|
904
936
|
}
|
|
937
|
+
export function commonCapabilities(inputs, opts, spec) {
|
|
938
|
+
return {
|
|
939
|
+
path: "docs/CAPABILITIES.md",
|
|
940
|
+
content: sub(CAPABILITIES_TEMPLATE, inputs, opts, spec),
|
|
941
|
+
};
|
|
942
|
+
}
|
|
905
943
|
export function commonMarketing(inputs, opts, spec) {
|
|
906
944
|
return {
|
|
907
945
|
path: "marketing.md",
|
|
@@ -1190,6 +1228,7 @@ export function localEnvFrom(exampleContent, filename, slug) {
|
|
|
1190
1228
|
/**
|
|
1191
1229
|
* Common base files every scaffolded project gets — CLAUDE.md, README.md,
|
|
1192
1230
|
* ROADMAP.md, STATUS.md, HANDOFF.md, TROUBLESHOOTING.md, CHANGELOG.md,
|
|
1231
|
+
* docs/CAPABILITIES.md,
|
|
1193
1232
|
* VERSION, .cursorignore, .gitignore, directives/system-architecture.md.
|
|
1194
1233
|
*
|
|
1195
1234
|
* Callers pass in the per-type CLAUDE.md narrative chunk; everything else is
|
|
@@ -1206,6 +1245,7 @@ export function commonBaseFiles(inputs, opts, perTypeNarrative) {
|
|
|
1206
1245
|
commonHandoff(inputs, opts, spec),
|
|
1207
1246
|
commonTroubleshooting(inputs, opts, spec),
|
|
1208
1247
|
commonChangelog(inputs, opts, spec),
|
|
1248
|
+
commonCapabilities(inputs, opts, spec),
|
|
1209
1249
|
commonMarketing(inputs, opts, spec),
|
|
1210
1250
|
commonBackups(inputs, opts, spec),
|
|
1211
1251
|
commonVersion(),
|
package/dist/standard.js
CHANGED
|
@@ -35,6 +35,10 @@ export const DELIVERY_CLASS = {
|
|
|
35
35
|
"HANDOFF.md": "birth-only",
|
|
36
36
|
"CHANGELOG.md": "birth-only",
|
|
37
37
|
"VERSION": "birth-only",
|
|
38
|
+
// Its stub says "Checked against v0.1.0" and "Nothing yet", false in a repo
|
|
39
|
+
// with history. Existing repos backfill their list once from CHANGELOG (the
|
|
40
|
+
// coordination protocol says so), which only the repo's own agent can do.
|
|
41
|
+
"docs/CAPABILITIES.md": "birth-only",
|
|
38
42
|
// Type-specific, and a repo that lacks it needs a MERGE, not a file.
|
|
39
43
|
".gitignore": "birth-only",
|
|
40
44
|
"z2w-project.json": "own-tool", // scripts/check-descriptor.mjs --write
|
package/dist/standards.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ProjectType, ScaffoldInputs } from "./index.js";
|
|
2
2
|
import { type SubstitutionOptions } from "./substitute.js";
|
|
3
|
-
export type StandardKey = "skill-vault" | "portable-stack" | "fathom" | "uptime-kuma" | "sentry" | "service-hosting" | "neon-careful" | "temp-files" | "agent-coordination" | "seo-baseline" | "email-service" | "moderation" | "card-path-bot-protection" | "text-size" | "language" | "test-count";
|
|
3
|
+
export type StandardKey = "skill-vault" | "portable-stack" | "fathom" | "uptime-kuma" | "sentry" | "service-hosting" | "neon-careful" | "temp-files" | "agent-coordination" | "seo-baseline" | "email-service" | "moderation" | "card-path-bot-protection" | "payments-and-refunds" | "developer-access" | "text-size" | "language" | "test-count" | "capability-list";
|
|
4
4
|
export type StandardDecisionState = "inserted-inline" | "skipped-not-applicable"
|
|
5
5
|
/**
|
|
6
6
|
* Applicable, rendered — and then removed again, because the audience gate
|
|
@@ -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.
|
|
82
|
+
export declare const CANONICAL_COORDINATION_BLOCK_VERSION = "v0.1.40";
|
|
83
83
|
/**
|
|
84
84
|
* The canonical **Capture Learnings** block, emitted VERBATIM into every
|
|
85
85
|
* scaffolded `CLAUDE.md`.
|
package/dist/standards.js
CHANGED
|
@@ -61,9 +61,12 @@ const STANDARD_ORDER = [
|
|
|
61
61
|
"email-service",
|
|
62
62
|
"moderation",
|
|
63
63
|
"card-path-bot-protection",
|
|
64
|
+
"payments-and-refunds",
|
|
65
|
+
"developer-access",
|
|
64
66
|
"text-size",
|
|
65
67
|
"language",
|
|
66
68
|
"test-count",
|
|
69
|
+
"capability-list",
|
|
67
70
|
];
|
|
68
71
|
const TITLES = {
|
|
69
72
|
"skill-vault": "Skill Vault awareness",
|
|
@@ -82,6 +85,9 @@ const TITLES = {
|
|
|
82
85
|
"text-size": "Text size (readability)",
|
|
83
86
|
language: "Language (en-US)",
|
|
84
87
|
"test-count": "Test-count reporting (session end)",
|
|
88
|
+
"payments-and-refunds": "Payments and refunds (takes money)",
|
|
89
|
+
"developer-access": "Developer access (tenant-granted, off by default)",
|
|
90
|
+
"capability-list": "Capability list (docs/CAPABILITIES.md)",
|
|
85
91
|
};
|
|
86
92
|
const DEPLOY_TARGETS = [
|
|
87
93
|
"cf-worker",
|
|
@@ -309,6 +315,69 @@ function checkCardPathBotProtection(inputs) {
|
|
|
309
315
|
reason: `acceptsCards=true on ${inputs.projectType} — bot check + own rate limit on every card path per [[stripe-elements-confirm-path]] §8`,
|
|
310
316
|
};
|
|
311
317
|
}
|
|
318
|
+
/**
|
|
319
|
+
* Payments and refunds applies on the same signal as card-path bot protection
|
|
320
|
+
* (`acceptsCards`) and to the same types, for the same reason: a WordPress
|
|
321
|
+
* gateway or a Worker takes money too, and the prose is the standard.
|
|
322
|
+
*
|
|
323
|
+
* Kerry, 2026-11-09 (via `z2w-crowdcommerce`): "should be hard-wired to be
|
|
324
|
+
* required for any app we create that takes money... so that in case of stripe
|
|
325
|
+
* disputes it is clear what our stance is." Reference: `z2w-crowdcommerce`
|
|
326
|
+
* v0.63.0; full wording in [[app-terms-and-privacy]] §3.8.
|
|
327
|
+
*
|
|
328
|
+
* No code is emitted: the scaffold has no checkout yet, and a `/refunds` link
|
|
329
|
+
* in the emitted terms would point at a page that does not exist. The standard
|
|
330
|
+
* says to build all three parts with the first pay button.
|
|
331
|
+
*/
|
|
332
|
+
function checkPaymentsAndRefunds(inputs) {
|
|
333
|
+
if (!inputs.acceptsCards) {
|
|
334
|
+
return { applies: false, reason: "acceptsCards=false — the project takes no money" };
|
|
335
|
+
}
|
|
336
|
+
if (NO_CARD_PATH_TYPES.includes(inputs.projectType)) {
|
|
337
|
+
return {
|
|
338
|
+
applies: false,
|
|
339
|
+
reason: `${inputs.projectType} has no runtime request surface — it cannot take money`,
|
|
340
|
+
};
|
|
341
|
+
}
|
|
342
|
+
return {
|
|
343
|
+
applies: true,
|
|
344
|
+
reason: `acceptsCards=true on ${inputs.projectType} — terms section, pay-button line and refund form per [[app-terms-and-privacy]] §3.8`,
|
|
345
|
+
};
|
|
346
|
+
}
|
|
347
|
+
/**
|
|
348
|
+
* Developer access applies wherever there are accounts or tenants: `hasLogin`
|
|
349
|
+
* (a login means somebody's data sits behind it) or `hostRoutedTenancy`.
|
|
350
|
+
*
|
|
351
|
+
* Kerry, 2026-11-11 dispatch: newly built apps should know from instantiation
|
|
352
|
+
* to have "a default off developer access switch in a tenant owner's admin
|
|
353
|
+
* settings so that the platform operator can access their account should they
|
|
354
|
+
* switch it on". The rule itself is his 2026-10-02 ruling ("only when
|
|
355
|
+
* invited"), written up as [[tenant-granted-developer-access]].
|
|
356
|
+
*/
|
|
357
|
+
function checkDeveloperAccess(inputs) {
|
|
358
|
+
if (inputs.hasLogin !== true && inputs.hostRoutedTenancy !== true) {
|
|
359
|
+
return {
|
|
360
|
+
applies: false,
|
|
361
|
+
reason: "no login and no tenancy — there is no one else's data for a developer to enter",
|
|
362
|
+
};
|
|
363
|
+
}
|
|
364
|
+
const why = inputs.hasLogin === true ? "hasLogin=true" : "hostRoutedTenancy=true";
|
|
365
|
+
return {
|
|
366
|
+
applies: true,
|
|
367
|
+
reason: `${why} — each tenant decides whether its developer may sign in, per [[tenant-granted-developer-access]]`,
|
|
368
|
+
};
|
|
369
|
+
}
|
|
370
|
+
/**
|
|
371
|
+
* Always-on, like `test-count`: every repo keeps a capability list, with no
|
|
372
|
+
* exemptions (Kerry, 2026-11-05; coordination block v0.1.39). The scaffold
|
|
373
|
+
* emits the `docs/CAPABILITIES.md` stub this standard names, for every type.
|
|
374
|
+
*/
|
|
375
|
+
function checkCapabilityList() {
|
|
376
|
+
return {
|
|
377
|
+
applies: true,
|
|
378
|
+
reason: "standing org rule (2026-11-05) — every repo keeps docs/CAPABILITIES.md current",
|
|
379
|
+
};
|
|
380
|
+
}
|
|
312
381
|
function checkTextSize() {
|
|
313
382
|
return { applies: true, reason: "Z2W standing org rule — applies to every project" };
|
|
314
383
|
}
|
|
@@ -491,7 +560,7 @@ const NEON_CAREFUL_BODY = `### Neon-careful (Neon Postgres)
|
|
|
491
560
|
// Two consecutive handoffs compared this constant against the DOCUMENT version
|
|
492
561
|
// and reported a "15-version gap" that did not exist — the real gap was 4. Read
|
|
493
562
|
// the `<!-- ... canonical-block vX.Y.Z -->` comment, never the `**Version:**` line.
|
|
494
|
-
export const CANONICAL_COORDINATION_BLOCK_VERSION = "v0.1.
|
|
563
|
+
export const CANONICAL_COORDINATION_BLOCK_VERSION = "v0.1.40";
|
|
495
564
|
/**
|
|
496
565
|
* The canonical **Capture Learnings** block, emitted VERBATIM into every
|
|
497
566
|
* scaffolded `CLAUDE.md`.
|
|
@@ -734,6 +803,29 @@ const TEST_COUNT_BODY = `### Test-count reporting (always — at session end)
|
|
|
734
803
|
> 3. **Always include the literal \`Tests:\` token, even on a multi-suite line.** Write \`Tests: 156 pytest / 289 Vitest / build clean\`, not \`156 pytest / 289 Vitest\`. Dropping the token makes the tally fall back to an older entry, so a project reporting MORE work gets counted for LESS — the worst-shaped failure of the three, because nothing looks wrong.
|
|
735
804
|
>
|
|
736
805
|
> **Optional: say what KINDS of test those are** (agreed with \`z2w-agent-command-center\` 2026-09-24, so its \`/tests\` page can show types). Add a bracketed breakdown after \`passing\`, using only these words: \`unit\`, \`integration\`, \`e2e\`, \`canary\`, \`contract\`. Example: \`Tests: 1152 passing (unit 1140 · canary 12)\`. The parts must add up to the total. Leave out lint, typecheck and build: they pass or fail as a whole and have no count, so write them in prose after the bracket (\`… (unit 1140 · canary 12), build clean\`). If you leave the bracket out, or it does not add up, the leading number is still read exactly as before.`;
|
|
806
|
+
const PAYMENTS_AND_REFUNDS_BODY = `### Payments and refunds (takes money)
|
|
807
|
+
|
|
808
|
+
> **This project takes money, so its terms, its pay buttons and a refund form must say the same thing from the first payment.** Card disputes are judged on whether the refund policy was stated AND shown at the purchase. A flat "non-refundable" with no way to fix a mistake reads worse to a dispute reviewer than a stated route. Build all three parts with the first pay button, never after it:
|
|
809
|
+
>
|
|
810
|
+
> 1. **A "Payments and refunds" section in the terms,** with \`id="payments-and-refunds"\` so checkout can link straight to it. It says who processes payments (for example Stripe) and that the app never sees or stores card numbers; who receives the money; the refund rule, its window counted from the charge, and ONE way to ask (the form in part 3; requests sent any other way are not accepted); for recurring charges, how to pause or cancel; and for disputes: *"please use the refund request form before contacting your card issuer; if a charge is disputed, we will answer with our record of it."* Adding this to live terms is a new terms version, and everyone agrees again.
|
|
811
|
+
> 2. **One line beside every pay button:** *"By paying you agree to our Terms, including our refund policy"*, linking \`/terms\` and \`/terms#payments-and-refunds\` in a new tab so the card step survives. Link the policy from the purchase confirmation email too.
|
|
812
|
+
> 3. **A refund request form at a stable address** (\`/refunds\`), linked from the terms, the pay-button line, the footer and emails. It asks for the email used and what went wrong (never the charge date), looks the charges up itself, and sends staff the request with each charge marked inside or outside the window, with Reply-To set to the payer. It refunds nothing on its own, and it is rate-limited like any public form.
|
|
813
|
+
>
|
|
814
|
+
> **Pin it with tests:** a render test for the terms section (heading, window, form link) and a source test for the pay-button line. Full wording and the refund windows: [[app-terms-and-privacy]] §3.8. One door for refund requests: [[offering-refunds]].`;
|
|
815
|
+
const DEVELOPER_ACCESS_BODY = `### Developer access (tenant-granted, off by default)
|
|
816
|
+
|
|
817
|
+
> **The people who build and support {{slug}} do not get to read a customer's data just because they built it.** Each tenant (an organization, or the person whose account it is) decides, with a checkbox on its own settings page that only its admins see:
|
|
818
|
+
>
|
|
819
|
+
> - ☐ **Allow my web developer to sign in.** Unticked by default. Ticking it creates the grant, and nothing else does: never add the developer to a new tenant's members at setup "for convenience".
|
|
820
|
+
> - **Developer's email:** prefilled from config (\`DEVELOPER_ACCESS_DEFAULT_EMAIL\`), not a string in the code, so a licensee's developer can be someone else.
|
|
821
|
+
> - **Last signed in:** a date or "never", read from the newest developer grant *including revoked ones*, so it does not reset the moment the box is unticked.
|
|
822
|
+
>
|
|
823
|
+
> **Build it with the tenant's first settings page.** The rules that matter: a developer grant is a row in the same membership table (a \`kind\` column, \`member\` or \`developer\`), never a second way past the sign-in gate. Unticking takes effect on the developer's next request, so check the grant on every request rather than carrying it in a long-lived session token. A developer grant never counts toward "last admin", and can never change developer access or appoint members. While a developer is inside, every page shows a bar naming who granted access and when, and each grant, revoke and first use per day writes an audit row. Without a grant, the platform account may only create a tenant, name its first admin, and reset a locked-out admin (audited, with the tenant's admins emailed). Full pattern and a reference implementation: [[tenant-granted-developer-access]].`;
|
|
824
|
+
const CAPABILITY_LIST_BODY = `### Capability list (always — \`docs/CAPABILITIES.md\`)
|
|
825
|
+
|
|
826
|
+
> **Keep \`docs/CAPABILITIES.md\` current, in the SAME commit as the feature.** It is the plain-English list of everything {{slug}} does, so a plan to move or replace it, an audit, or a marketing plan cannot miss a feature. Before ending a session, ask: *did I build, change or remove anything a user, staff member or another app would notice that the list does not name?* If yes, update it now, and move its **Checked against** line to the version you are shipping.
|
|
827
|
+
>
|
|
828
|
+
> Each entry: **Name.** What it does. Status. [code], then who it helps and, only when this repo holds one, a proof (a number or a link). Status words: **live**, **built, off**, **built, waiting**, **planned**. Never present anything below "live" as available today. The scaffold created the file with empty sections. A project that does little keeps a short list, never no list.`;
|
|
737
829
|
const BODIES = {
|
|
738
830
|
"skill-vault": SKILL_VAULT_BODY,
|
|
739
831
|
"portable-stack": PORTABLE_STACK_BODY,
|
|
@@ -751,6 +843,9 @@ const BODIES = {
|
|
|
751
843
|
"text-size": TEXT_SIZE_BODY,
|
|
752
844
|
language: LANGUAGE_BODY,
|
|
753
845
|
"test-count": TEST_COUNT_BODY,
|
|
846
|
+
"payments-and-refunds": PAYMENTS_AND_REFUNDS_BODY,
|
|
847
|
+
"developer-access": DEVELOPER_ACCESS_BODY,
|
|
848
|
+
"capability-list": CAPABILITY_LIST_BODY,
|
|
754
849
|
};
|
|
755
850
|
const APPLICABILITY = {
|
|
756
851
|
"skill-vault": checkSkillVault,
|
|
@@ -769,6 +864,9 @@ const APPLICABILITY = {
|
|
|
769
864
|
"text-size": checkTextSize,
|
|
770
865
|
language: checkLanguage,
|
|
771
866
|
"test-count": checkTestCount,
|
|
867
|
+
"payments-and-refunds": checkPaymentsAndRefunds,
|
|
868
|
+
"developer-access": checkDeveloperAccess,
|
|
869
|
+
"capability-list": checkCapabilityList,
|
|
772
870
|
};
|
|
773
871
|
/**
|
|
774
872
|
* The literal markdown heading each standard renders, keyed by `StandardKey`.
|
package/dist/templates.d.ts
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
/** Where the Templates folder lives
|
|
1
|
+
/** Where the Templates folder lives (`AI/Projects/agent-framework`, since ROADMAP Step 59). */
|
|
2
2
|
export declare const DEFAULT_TEMPLATES_PATH: string;
|
|
3
|
-
/** Where the Templates folder lived from the 2026-11-02 move until the portfolio-folder rename. */
|
|
4
|
-
export declare const PRE_RENAME_TEMPLATES_PATH: string;
|
|
5
|
-
/** Where the Templates folder lived before 2026-11-02. Kept as a fallback. */
|
|
6
|
-
export declare const LEGACY_TEMPLATES_PATH: string;
|
|
7
3
|
/** The default locations, in the order they are tried. */
|
|
8
4
|
export declare const DEFAULT_TEMPLATES_CANDIDATES: readonly string[];
|
|
9
5
|
export declare const REQUIRED_DIRECTORIES: readonly string[];
|
|
@@ -27,11 +23,10 @@ export declare class TemplatesError extends Error {
|
|
|
27
23
|
* Resolves the Templates folder path and verifies required entries are present.
|
|
28
24
|
*
|
|
29
25
|
* Without an override, the default locations are tried in order
|
|
30
|
-
* (`DEFAULT_TEMPLATES_CANDIDATES
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
* exists but is incomplete never shadows a complete one further down the list.
|
|
26
|
+
* (`DEFAULT_TEMPLATES_CANDIDATES`, today just `AI/Projects/agent-framework`)
|
|
27
|
+
* and the first COMPLETE one wins. It stays a list so a future move can add a
|
|
28
|
+
* fallback the way Steps 58 and 59 did. A folder that exists but is incomplete
|
|
29
|
+
* never shadows a complete one further down the list.
|
|
35
30
|
*
|
|
36
31
|
* @param override - optional explicit Templates path (e.g. from --templates-path).
|
|
37
32
|
* Tildes are NOT expanded; pass an already-absolute path.
|
package/dist/templates.js
CHANGED
|
@@ -17,7 +17,9 @@
|
|
|
17
17
|
// 2026-11-02). v0.51.0: the portfolio folder itself is being renamed from
|
|
18
18
|
// `AI/Cursor Projects` to `AI/Projects` (Kerry confirmed the name 2026-11-02,
|
|
19
19
|
// ROADMAP Step 59), so the newest path is tried first and each older one is
|
|
20
|
-
// kept as a fallback for at least one release after its move.
|
|
20
|
+
// kept as a fallback for at least one release after its move. v0.55.0 (Step 59
|
|
21
|
+
// part 6) dropped both older paths: `AI/Templates` no longer exists and
|
|
22
|
+
// `AI/Cursor Projects` is only a symlink to `AI/Projects`. The v0.2.0 hosted-mirror fallback
|
|
21
23
|
// (templates.z2w.us + a 24h local cache) was RETIRED 2026-06-23 to protect
|
|
22
24
|
// the framework IP: the public mirror was taken down, so when no local
|
|
23
25
|
// Templates folder is present the CLI now hard-fails with a --templates-path
|
|
@@ -25,17 +27,11 @@
|
|
|
25
27
|
import { promises as fs } from "node:fs";
|
|
26
28
|
import * as path from "node:path";
|
|
27
29
|
import * as os from "node:os";
|
|
28
|
-
/** Where the Templates folder lives
|
|
30
|
+
/** Where the Templates folder lives (`AI/Projects/agent-framework`, since ROADMAP Step 59). */
|
|
29
31
|
export const DEFAULT_TEMPLATES_PATH = path.join(os.homedir(), "Desktop", "Zero2Webmaster", "AI", "Projects", "agent-framework");
|
|
30
|
-
/** Where the Templates folder lived from the 2026-11-02 move until the portfolio-folder rename. */
|
|
31
|
-
export const PRE_RENAME_TEMPLATES_PATH = path.join(os.homedir(), "Desktop", "Zero2Webmaster", "AI", "Cursor Projects", "agent-framework");
|
|
32
|
-
/** Where the Templates folder lived before 2026-11-02. Kept as a fallback. */
|
|
33
|
-
export const LEGACY_TEMPLATES_PATH = path.join(os.homedir(), "Desktop", "Zero2Webmaster", "AI", "Templates");
|
|
34
32
|
/** The default locations, in the order they are tried. */
|
|
35
33
|
export const DEFAULT_TEMPLATES_CANDIDATES = [
|
|
36
34
|
DEFAULT_TEMPLATES_PATH,
|
|
37
|
-
PRE_RENAME_TEMPLATES_PATH,
|
|
38
|
-
LEGACY_TEMPLATES_PATH,
|
|
39
35
|
];
|
|
40
36
|
export const REQUIRED_DIRECTORIES = ["Resources"];
|
|
41
37
|
/**
|
|
@@ -106,11 +102,10 @@ function incompleteError(candidate, missing) {
|
|
|
106
102
|
* Resolves the Templates folder path and verifies required entries are present.
|
|
107
103
|
*
|
|
108
104
|
* Without an override, the default locations are tried in order
|
|
109
|
-
* (`DEFAULT_TEMPLATES_CANDIDATES
|
|
110
|
-
*
|
|
111
|
-
*
|
|
112
|
-
*
|
|
113
|
-
* exists but is incomplete never shadows a complete one further down the list.
|
|
105
|
+
* (`DEFAULT_TEMPLATES_CANDIDATES`, today just `AI/Projects/agent-framework`)
|
|
106
|
+
* and the first COMPLETE one wins. It stays a list so a future move can add a
|
|
107
|
+
* fallback the way Steps 58 and 59 did. A folder that exists but is incomplete
|
|
108
|
+
* never shadows a complete one further down the list.
|
|
114
109
|
*
|
|
115
110
|
* @param override - optional explicit Templates path (e.g. from --templates-path).
|
|
116
111
|
* Tildes are NOT expanded; pass an already-absolute path.
|
package/package.json
CHANGED
|
@@ -111,7 +111,6 @@ const VALID_STATUS = new Set(["Planning", "Scaffolded", "Live", "Dormant", "Reti
|
|
|
111
111
|
|
|
112
112
|
const DEFAULT_BULLETIN_DIRS = [
|
|
113
113
|
join(process.env.HOME ?? "", "Desktop/Zero2Webmaster/AI/Projects/z2w-agent-coordination"),
|
|
114
|
-
join(process.env.HOME ?? "", "Desktop/Zero2Webmaster/AI/Cursor Projects/z2w-agent-coordination"),
|
|
115
114
|
join(process.env.HOME ?? "", ".cache/z2w-coordination"),
|
|
116
115
|
];
|
|
117
116
|
|