@zero2webmaster/starter-kit 0.47.0 → 0.47.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -3
- package/dist/parse-brief.js +53 -14
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# z2w-starter-kit
|
|
2
2
|
|
|
3
|
-
**Version:** 0.47.
|
|
3
|
+
**Version:** 0.47.1 | **Framework:** 2.19.0
|
|
4
4
|
|
|
5
5
|
> Node CLI to scaffold new Z2W projects from canonical Templates + AGENTS.md.
|
|
6
6
|
|
|
@@ -83,7 +83,9 @@ The Claude Code skill at `~/.claude/skills/instantiate-z2w-project/SKILL.md` and
|
|
|
83
83
|
|
|
84
84
|
## Status
|
|
85
85
|
|
|
86
|
-
- **v0.47.
|
|
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.
|
|
87
|
+
|
|
88
|
+
- **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.
|
|
87
89
|
|
|
88
90
|
- **v0.46.0** gets `nextjs` scaffolds ready for phones. Installed to a home screen, the app now draws edge to edge (`viewport-fit=cover`), and the page is padded by the phone's safe areas so the notch and home indicator never cover content; CSS variables (`--safe-top`, `--safe-bottom` and so on) let a fixed bar pad itself. A `prefers-reduced-motion` rule turns any animation or transition into an instant change for people who switch on Reduce Motion. Verified on a real build in Chromium: no change at all on an ordinary screen.
|
|
89
91
|
|
|
@@ -143,4 +145,4 @@ Inquiries: kerry@zero2webmaster.com.
|
|
|
143
145
|
---
|
|
144
146
|
|
|
145
147
|
*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.*
|
|
146
|
-
*Version: 0.47.
|
|
148
|
+
*Version: 0.47.1 | Last Updated: 2026-10-27*
|
package/dist/parse-brief.js
CHANGED
|
@@ -151,6 +151,13 @@ function inferSlug(brief) {
|
|
|
151
151
|
if (isValidSlug(candidate))
|
|
152
152
|
return candidate;
|
|
153
153
|
}
|
|
154
|
+
// The house brief shape opens `# booking — Project Brief`. Taken only when
|
|
155
|
+
// the first word is ALREADY a lowercase slug, so a display title such as
|
|
156
|
+
// `# Z2W CrowdCommerce — ...` is never kebab-cased into one. Before
|
|
157
|
+
// 2026-10-27 this was missing and every recent brief returned no slug.
|
|
158
|
+
const title = /^#\s+`?([a-z][a-z0-9-]*)`?\s+[—–-]/m.exec(brief);
|
|
159
|
+
if (title && isValidSlug(title[1]))
|
|
160
|
+
return title[1];
|
|
154
161
|
const purpose = extractSection(brief, "purpose");
|
|
155
162
|
if (purpose) {
|
|
156
163
|
const firstSentence = purpose.split(/[.\n]/)[0] ?? "";
|
|
@@ -267,15 +274,32 @@ function inferBrand(brief) {
|
|
|
267
274
|
if (value === "custom")
|
|
268
275
|
return "custom";
|
|
269
276
|
}
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
277
|
+
// Paths and URLs say where files live, not who the app is for: nearly every
|
|
278
|
+
// brief carries `~/Desktop/Zero2Webmaster/...` or `zero2webmaster/<repo>`.
|
|
279
|
+
const text = brief.toLowerCase().replace(/\S*\/\S*/g, " ");
|
|
280
|
+
// A multi-tenant product is a Zero2Webmaster product, whichever
|
|
281
|
+
// organizations it names as tenants (Kerry, 2026-10-07: "all of these
|
|
282
|
+
// should be multi-tenant as we will license them for a fee"). Until
|
|
283
|
+
// 2026-10-27 the first rule below won instead, and 25 of 43 real briefs read
|
|
284
|
+
// as SAVE THE FROGS! — `booking` among them — while every one of those
|
|
285
|
+
// repos lives under the `zero2webmaster` org.
|
|
286
|
+
if (/\bmulti-?tenant\b|\blicensed?\s+(to\s+outside|for\s+a\s+fee)/.test(text)) {
|
|
287
|
+
return "zero2webmaster";
|
|
288
|
+
}
|
|
289
|
+
const named = [
|
|
290
|
+
["save-the-frogs", /\bsave\s*the\s*frogs\b|\bstf\b/],
|
|
291
|
+
["bansuri-bliss", /\bbansuri\s*bliss\b/],
|
|
292
|
+
["videomigrator", /\bvideo\s*migrator\b/],
|
|
293
|
+
["loominus", /\bloom\s*in\s*us\b/],
|
|
294
|
+
]
|
|
295
|
+
.filter(([, pattern]) => pattern.test(text))
|
|
296
|
+
.map(([preset]) => preset);
|
|
297
|
+
if (named.length === 1)
|
|
298
|
+
return named[0];
|
|
299
|
+
// Two organizations named and no explicit Brand: field is a guess either
|
|
300
|
+
// way, so leave it unset and let the confirm screen ask.
|
|
301
|
+
if (named.length > 1)
|
|
302
|
+
return null;
|
|
279
303
|
if (/\bzero2webmaster\b|\bz2w\b/.test(text))
|
|
280
304
|
return "zero2webmaster";
|
|
281
305
|
return null;
|
|
@@ -579,7 +603,7 @@ function inferHasPublicSurface(brief, projectType) {
|
|
|
579
603
|
* a card path is a payment processor, a checkout/donation surface, or a
|
|
580
604
|
* subscription. A human still confirms on line 14.
|
|
581
605
|
*/
|
|
582
|
-
function inferAcceptsCards(brief) {
|
|
606
|
+
function inferAcceptsCards(brief, ownSlug) {
|
|
583
607
|
const explicit = explicitBoolean(brief, [
|
|
584
608
|
"accepts credit cards",
|
|
585
609
|
"accept credit cards",
|
|
@@ -589,8 +613,22 @@ function inferAcceptsCards(brief) {
|
|
|
589
613
|
]);
|
|
590
614
|
if (explicit !== null)
|
|
591
615
|
return explicit;
|
|
592
|
-
|
|
593
|
-
|
|
616
|
+
// Judged per sentence, because a sentence that names another engine is
|
|
617
|
+
// describing THAT app: `booking`'s brief read as card-taking from "cart and
|
|
618
|
+
// checkout" in a list of what `commerce-engine` owns. Bare "donate" is out
|
|
619
|
+
// for the same reason (it is usually a button that links elsewhere);
|
|
620
|
+
// "donation" still counts.
|
|
621
|
+
const paymentTerms = /\bstripe\b|\bpayment\s?intent|\bsetup\s?intent|\bcheckout\b|\bcredit\s?cards?\b|\bdonation|\bsubscription billing\b|\brecurring (payments?|billing|giving)\b|\bpaypal\b|\bpayment (gateway|processor|element)\b/;
|
|
622
|
+
const otherApps = /\b[a-z0-9]+(?:-[a-z0-9]+)*-engine\b|\b(?:z2w-)?crowdcommerce\b/g;
|
|
623
|
+
// ...unless the sentence also names this project, which makes it the
|
|
624
|
+
// subject ("event-engine creates a Stripe checkout; financial-engine
|
|
625
|
+
// records it").
|
|
626
|
+
const namesAnotherApp = (sentence) => !(ownSlug !== null && new RegExp(`\\b${ownSlug}\\b`).test(sentence)) &&
|
|
627
|
+
(sentence.match(otherApps) ?? []).some((name) => name !== ownSlug);
|
|
628
|
+
return brief
|
|
629
|
+
.toLowerCase()
|
|
630
|
+
.split(/(?<=[.!?])\s+|\n+/)
|
|
631
|
+
.some((sentence) => paymentTerms.test(sentence) && !namesAnotherApp(sentence));
|
|
594
632
|
}
|
|
595
633
|
function inferParticipateInBulletin(brief, brand) {
|
|
596
634
|
const text = brief.toLowerCase();
|
|
@@ -725,8 +763,9 @@ export function parseBrief(brief) {
|
|
|
725
763
|
const brand = inferBrand(trimmed);
|
|
726
764
|
const projectType = inferProjectType(trimmed);
|
|
727
765
|
const hasWebUi = inferHasWebUi(trimmed, projectType);
|
|
766
|
+
const slug = inferSlug(trimmed);
|
|
728
767
|
return {
|
|
729
|
-
slug
|
|
768
|
+
slug,
|
|
730
769
|
description: inferDescription(trimmed),
|
|
731
770
|
projectType,
|
|
732
771
|
brand,
|
|
@@ -739,7 +778,7 @@ export function parseBrief(brief) {
|
|
|
739
778
|
sendsEmail: inferSendsEmail(trimmed),
|
|
740
779
|
hasUserContent: inferHasUserContent(trimmed),
|
|
741
780
|
hasObservability: inferHasObservability(trimmed, projectType, hasWebUi),
|
|
742
|
-
acceptsCards: inferAcceptsCards(trimmed),
|
|
781
|
+
acceptsCards: inferAcceptsCards(trimmed, slug),
|
|
743
782
|
hasPublicSurface: inferHasPublicSurface(trimmed, projectType),
|
|
744
783
|
briefSections: extractBriefSections(trimmed),
|
|
745
784
|
raw: brief,
|