@tritard/waterbrother 0.8.25 → 0.8.27
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/package.json +1 -1
- package/src/cli.js +8 -0
- package/src/frontend.js +15 -3
package/package.json
CHANGED
package/src/cli.js
CHANGED
|
@@ -1760,6 +1760,14 @@ function extractExplicitWriteRoots(line, cwd) {
|
|
|
1760
1760
|
roots.push(path.join(home, "Desktop", relative));
|
|
1761
1761
|
}
|
|
1762
1762
|
}
|
|
1763
|
+
const desktopFolderMatch = text.match(/\b(?:a\s+)?new\s+([a-z0-9._-]+)\s+(?:folder|directory)\s+on\s+desktop\b/i);
|
|
1764
|
+
if (desktopFolderMatch) {
|
|
1765
|
+
const home = process.env.HOME || process.env.USERPROFILE || "";
|
|
1766
|
+
const relative = String(desktopFolderMatch[1] || "").trim();
|
|
1767
|
+
if (home && relative) {
|
|
1768
|
+
roots.push(path.join(home, "Desktop", relative));
|
|
1769
|
+
}
|
|
1770
|
+
}
|
|
1763
1771
|
return [...new Set(roots)];
|
|
1764
1772
|
}
|
|
1765
1773
|
|
package/src/frontend.js
CHANGED
|
@@ -67,7 +67,9 @@ const BENCHMARK_FRONTEND_REMINDERS = [
|
|
|
67
67
|
|
|
68
68
|
const BENCHMARK_SITE_TYPE_RULES = {
|
|
69
69
|
blog: [
|
|
70
|
-
"Benchmark blog mode: use neutral structural placeholders or concrete subject matter instead of publication worldbuilding or reflective-editorial atmosphere prose."
|
|
70
|
+
"Benchmark blog mode: use neutral structural placeholders or concrete subject matter instead of publication worldbuilding or reflective-editorial atmosphere prose.",
|
|
71
|
+
"Benchmark blog mode: do not wrap the page in a generic publication shell like Journal, Featured Essay, Latest Dispatches, Print Edition, Submit Work, or similar magazine-site framing.",
|
|
72
|
+
"Benchmark blog mode: avoid the default editorial scaffold of hero, story list, archive rail, topics grid, and publication footer unless the user explicitly asked for a magazine-style site."
|
|
71
73
|
],
|
|
72
74
|
store: [
|
|
73
75
|
"Benchmark ecommerce mode: prioritize conversion architecture over editorial styling. The page should sell, not just look clean.",
|
|
@@ -222,8 +224,13 @@ const LAYOUT_STARTERS = {
|
|
|
222
224
|
|
|
223
225
|
const GENERIC_EDITORIAL_LAYOUT_PATTERNS = [
|
|
224
226
|
/\bsticky\s+nav\b/i,
|
|
227
|
+
/\bsticky\b/i,
|
|
225
228
|
/\bcentered\s+hero\b/i,
|
|
226
229
|
/\bfeatured\s+(?:essay|story)\b/i,
|
|
230
|
+
/\blatest\s+dispatches\b/i,
|
|
231
|
+
/\bexplore\s+by\s+subject\b/i,
|
|
232
|
+
/\btopics\b/i,
|
|
233
|
+
/\barchive\b/i,
|
|
227
234
|
/\bnewsletter\b/i,
|
|
228
235
|
/\bfooter\b/i
|
|
229
236
|
];
|
|
@@ -449,11 +456,15 @@ export function detectFrontendSlop({ promptText = "", assistantText = "", receip
|
|
|
449
456
|
flags.push("fictional publication identity replacing structural placeholder content");
|
|
450
457
|
score += 3;
|
|
451
458
|
}
|
|
459
|
+
if (siteType === "blog" && benchmarkMode && /\b(?:Journal|Featured Essay|Latest Dispatches|The Print Edition|Submit Work|Explore by Subject|A publication|published quarterly|all stories)\b/i.test(haystack)) {
|
|
460
|
+
flags.push("benchmark blog used generic publication-shell framing");
|
|
461
|
+
score += 3;
|
|
462
|
+
}
|
|
452
463
|
if (/\b(?:command palette would open here|metaKey && e\.key === ['"]k['"]|keyboard accessibility)\b/i.test(haystack)) {
|
|
453
464
|
flags.push("fake keyboard or command-palette gimmick");
|
|
454
465
|
score += 3;
|
|
455
466
|
}
|
|
456
|
-
if (siteType === "blog" && benchmarkMode && /\b(?:measure of time in ordinary things|quiet rituals|architecture of memory|cult of productivity|considered writing|the slow accumulation of days|craft of attention|in defense of silence|meditation on permanence and ephemerality|stillness and the act of looking|deliberate observation)\b/i.test(haystack)) {
|
|
467
|
+
if (siteType === "blog" && benchmarkMode && /\b(?:measure of time in ordinary things|quiet rituals|architecture of memory|cult of productivity|considered writing|the slow accumulation of days|craft of attention|in defense of silence|meditation on permanence and ephemerality|stillness and the act of looking|deliberate observation|architecture of attention|the deliberate life|slow fashion endures|designing for stillness|spaces we inhabit shape the quality of our thinking)\b/i.test(haystack)) {
|
|
457
468
|
flags.push("benchmark blog fell back to reflective-editorial atmosphere copy");
|
|
458
469
|
score += 3;
|
|
459
470
|
}
|
|
@@ -467,7 +478,7 @@ export function detectFrontendSlop({ promptText = "", assistantText = "", receip
|
|
|
467
478
|
return {
|
|
468
479
|
score,
|
|
469
480
|
flags,
|
|
470
|
-
hardBlock: flags.some((flag) => /fictional publication identity|fake keyboard|reflective-editorial atmosphere|primary merchandising surface as a placeholder|Tailwind CDN starter theming|placeholder product imagery/.test(flag)),
|
|
481
|
+
hardBlock: flags.some((flag) => /fictional publication identity|generic publication-shell framing|fake keyboard|reflective-editorial atmosphere|primary merchandising surface as a placeholder|Tailwind CDN starter theming|placeholder product imagery/.test(flag)),
|
|
471
482
|
severe: score >= 5,
|
|
472
483
|
summary: flags.length > 0 ? `frontend slop flags: ${flags.join(", ")}` : "no deterministic frontend slop flags"
|
|
473
484
|
};
|
|
@@ -508,6 +519,7 @@ export function buildFrontendRevisionPrompt({
|
|
|
508
519
|
"Remove fake keyboard shortcuts, fake command palettes, and demo-only interaction flourishes that do not help the page.",
|
|
509
520
|
"Cut reflective-editorial filler copy and replace it with either concrete language or neutral structural placeholders.",
|
|
510
521
|
"For benchmark blog tasks, default to neutral structural placeholder content instead of invented publication framing, issue metadata, or named contributors.",
|
|
522
|
+
"For benchmark blog tasks, do not use generic publication-shell labels like Journal, Featured Essay, Latest Dispatches, Print Edition, Submit Work, or publication-footer framing.",
|
|
511
523
|
"For benchmark store tasks, do not leave the product image area as a labeled placeholder. Use product-shaped merchandising composition, proof, and objection-handling blocks instead.",
|
|
512
524
|
"For benchmark store tasks, do not use Tailwind CDN starter theming, picsum-style placeholder imagery, or fake command-palette behavior.",
|
|
513
525
|
"Reduce section count if needed and push one stronger asymmetrical composition instead of a sequence of balanced blocks.",
|