@domandigital/craft 0.22.0 → 0.23.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 (33) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/CHARACTER.md +138 -5
  3. package/COPY.md +35 -9
  4. package/PRINCIPLES.md +9 -0
  5. package/README.md +6 -0
  6. package/design-review.schema.json +156 -0
  7. package/dist/{audit-LQ2TDISV.js → audit-CRTC7JSF.js} +3 -3
  8. package/dist/audit.cjs +365 -15
  9. package/dist/audit.js +365 -15
  10. package/dist/{chunk-DE2ZAV4G.js → chunk-3LCBLDAO.js} +171 -3
  11. package/dist/{chunk-6PZG4MJS.js → chunk-3LHIKF5L.js} +5 -5
  12. package/dist/{chunk-G47ZCBD5.js → chunk-4NON4PVK.js} +2 -2
  13. package/dist/{chunk-6DRBFDWT.js → chunk-A7KUKNX6.js} +1 -1
  14. package/dist/{chunk-OVWVKMPS.js → chunk-KGEJ2TGT.js} +14 -14
  15. package/dist/{chunk-ONA73THJ.js → chunk-KIBDFRHT.js} +195 -13
  16. package/dist/{chunk-ZS7PQNJU.js → chunk-OTQQTXXK.js} +4 -4
  17. package/dist/{chunk-RBQCGDQQ.js → chunk-Y2LGYHJ5.js} +5 -5
  18. package/dist/{cli-R2HBESHI.js → cli-E2CFVIGZ.js} +5 -5
  19. package/dist/{cli-SZ4SZLUN.js → cli-HWGSNSDD.js} +4 -4
  20. package/dist/{cli-7DL4BKA7.js → cli-IYRJZWMN.js} +6 -6
  21. package/dist/{cli-YNIJOEJK.js → cli-RHU3MAZY.js} +3 -3
  22. package/dist/{cli-AM4FLXGM.js → cli-ROVZDHVR.js} +5 -5
  23. package/dist/{cli-T7A3BU5J.js → cli-TPV2EIIN.js} +9 -9
  24. package/dist/{cli-WZA5IXSR.js → cli-X3RZE4GM.js} +6 -6
  25. package/dist/{cli-7QL26YPR.js → cli-YRRBBU27.js} +1 -1
  26. package/dist/cli.js +3 -3
  27. package/dist/index.cjs +368 -15
  28. package/dist/index.d.cts +49 -3
  29. package/dist/index.d.ts +49 -3
  30. package/dist/index.js +367 -15
  31. package/dist/{viewports-cli-F7KJIVZL.js → viewports-cli-EAUVLHFJ.js} +3 -3
  32. package/package.json +1 -1
  33. package/word-lists.json +11 -2
package/dist/audit.cjs CHANGED
@@ -228,7 +228,17 @@ var REVIEW_PHRASES = [
228
228
  "by far the most",
229
229
  "hands down the",
230
230
  "arguably the best",
231
- "bar none"
231
+ "bar none",
232
+ // "plain" as a self-description, the way "clear" is: say what the reader gets.
233
+ "plain answer",
234
+ "plain answers",
235
+ "plain recommendation",
236
+ "plain explanation",
237
+ "plain explanations",
238
+ "plain advice",
239
+ "plain guidance",
240
+ "plain-speaking",
241
+ "plain speaking"
232
242
  ];
233
243
  var SALES_TAGLINES = [
234
244
  /\bwhere it (?:really |truly )?(?:counts|matters)(?: most)?\b/i,
@@ -284,6 +294,34 @@ var CLIPPED = [
284
294
  // "Alright Carlo, built you a proper site": the "I" left out
285
295
  /(?<=^|[\n>"“]|[.!?—–-]\s*|,\s+)(?:[Bb]uilt|[Mm]ade|[Pp]ut together|[Kk]nocked up)\s+(?:you|your\s+\w+|the\s+\w+)\s+an?\b/
286
296
  ];
297
+ var PLAIN_FAMILY = [
298
+ /\b(?:plain english|explained plainly|plainly explained)\b/i,
299
+ /\bplainly\b(?!\s+marked\b)/i,
300
+ /\bin\s+plain\s+(?:terms|language|words|speak)\b/i
301
+ ];
302
+ var CONFESSION = [
303
+ // "What this is and is not:", "what we are and aren't"
304
+ /\bwhat\s+(?:this|it|we|our\s+\w+)\s+(?:is|are)\s+and\s+(?:is\s+not|isn['’]t|are\s+not|aren['’]t)\b/i,
305
+ // "What we are not", a label on its own; not "what we are not responsible for"
306
+ /(?<!\band\s)\bwhat\s+we(?:\s+are|['’]re)\s+not\b(?!\s+(?:responsible|liable|able|allowed|sure)\b)/i,
307
+ /\bwhat\s+we\s+(?:don['’]t|do\s+not)\s+do\b/i,
308
+ // "We have not yet built and run", "we haven't yet worked with"
309
+ /\bwe(?:\s+have|['’]ve)\s+not\s+yet\s+(?:built|run|done|worked|delivered|shipped|launched)\b/i,
310
+ /\bwe\s+haven['’]t\s+(?:yet\s+)?(?:built|run|done|worked\s+with|delivered)\b/i,
311
+ /\bwhat\s+we\s+have\s+and\s+(?:haven['’]t|have\s+not)\s+(?:done|built|run)\b/i,
312
+ // "Our clinic experience so far is one practice"
313
+ /\bour\s+(?:[\w-]+\s+){0,3}experience\s+so\s+far\s+(?:is|has\s+been|covers)\b/i,
314
+ /\bso\s+far\s+(?:is|has\s+been)\s+(?:one|a\s+single|just\s+one)\b/i,
315
+ /\bwhere\s+our\s+experience\s+(?:applies|ends|stops|runs\s+out)\b/i,
316
+ /\bwhat\s+we\s+(?:would|['’]d|will|still)\s+need\s+to\s+learn\b/i,
317
+ // "what we would and wouldn't take on", "what we won't take on"
318
+ /\b(?:would|will)\s+and\s+(?:wouldn['’]t|would\s+not|won['’]t|will\s+not)\s+take\s+on\b/i,
319
+ /\bwhat\s+we\s+(?:won['’]t|wouldn['’]t|would\s+not|will\s+not)\s+take\s+on\b/i,
320
+ // "Who we don't work with", "who this is not for", "we're not for everyone"
321
+ /\bwho\s+we\s+(?:don['’]t|do\s+not|won['’]t|will\s+not)\s+(?:work\s+with|serve|help|take\s+on)\b/i,
322
+ /\bwho\s+(?:this|it|we)\s+(?:is|are|['’]re)\s+not\s+for\b|\bwho\s+(?:this|it)\s+isn['’]t\s+for\b/i,
323
+ /\b(?:we|this)\s+(?:are|is|['’]re|['’]s)\s+not\s+(?:for\s+everyone|the\s+right\s+fit\s+for)\b/i
324
+ ];
287
325
  var NEGATION = [
288
326
  // "It's not just a haircut, it's an experience."
289
327
  /\b(?:it['’]?s|it is|this is|this isn['’]t|we['’]re|we are|they['’]re)\s+(?:not|more than)\s+(?:just|only|merely|simply)?\s*[^.!?\n]{1,60}?[,;.—-]\s*(?:it['’]?s|it is|this is|we['’]re|we are|they['’]re)\b/i,
@@ -297,8 +335,33 @@ var NEGATION = [
297
335
  /\b(?:is|are|was|were)(?:n’t|n't)\b[^.;]{2,60},\s*(?:it|they|that|this)(?:’s|'s|’re|'re)\b/i,
298
336
  /\bless\s+about\b[^.;]{2,50}\bmore\s+about\b/i,
299
337
  // parallel participle, no repeated subject: "dispatched from here, not shipped in from Seoul"
300
- /\b\w{3,}ed\b[^,.;:]{0,40},\s*not\s+\w{3,}ed\b/i
338
+ /\b\w{3,}ed\b[^,.;:]{0,40},\s*not\s+\w{3,}ed\b/i,
339
+ // parallel gerund: "renting Microsoft's services, not running servers". The
340
+ // -thing pronouns and the -ing prepositions are not verbs.
341
+ /\b(?!(?:some|no|any|every)thing\b)\w{3,}ing\b[^,.;:]{0,40},\s*not\s+(?!(?:some|no|any|every)thing\b|(?:during|according|including|regarding|morning|evening)\b)\w{3,}ing\b/i
342
+ ];
343
+ var SOFT_CONTRAST = [
344
+ // ", not registration." closing the sentence. Not when "not" negates what follows.
345
+ /,\s*not\s+(?!(?:yet|least|only|just|merely|simply|to|all|always|even|ever|necessarily|really|quite|exactly|enough|sure|that|because|so|much|many|once|often|every|including|counting|unlike|until|if|when|unless|though|although|or|and|but)\b)(?:(?:a|an|the|your|our|their|its|his|her|my|any)\s+)?[\w'’-]+(?:\s+[\w'’-]+){0,3}(?=\s*(?:[.!?)"”]|$))/im,
346
+ // "the league's own threshold, not a legal one"
347
+ /,\s*not\s+(?:a|an|the)\s+(?:[\w'’-]+\s+)?one\b/i,
348
+ // "renting computing over the internet instead of owning it"
349
+ /\b(?!(?:some|no|any|every)thing\b)\w{3,}ing\b[^.;:!?]{0,60}?\binstead\s+of\s+(?!(?:some|no|any|every)thing\b)\w{3,}ing\b/i
301
350
  ];
351
+ var PAIR_TOKEN = String.raw`(?:[£$€]?\d[\d,.]*%?|[\w'’£$€-]+)`;
352
+ var PAIR_NUMBER = String.raw`(?:one|two|three|four|five|six|seven|eight|nine|ten|eleven|twelve|\d[\d,]*)`;
353
+ var PARALLEL_PAIR = [
354
+ // anaphora: "same site, same £8,000", "per user, per month". "No X, no Y" is no-x-no-y's.
355
+ new RegExp(String.raw`\b(?!no\b)(\w+)[ \t]+${PAIR_TOKEN},[ \t]+\1[ \t]+${PAIR_TOKEN}(?=[ \t]*(?:[.!?]|$))`, "im"),
356
+ // isocolon on its own line: "One form, seven workflows"
357
+ new RegExp(String.raw`^[ \t]*(?:#{1,6}[ \t]+)?${PAIR_NUMBER}[ \t]+[\w'’-]+,[ \t]+${PAIR_NUMBER}[ \t]+[\w'’-]+[.!]?[ \t]*$`, "im"),
358
+ // a verbless list as a tagline: "Service account, match-day reminders, analytics."
359
+ /^[ \t]*(?:#{1,6}[ \t]+)?[A-Z][\w'’-]*(?:[ \t]+(?!(?:and|or)\b)[\w'’-]+){0,2}(?:,[ \t]+(?!(?:and|or)\b)[\w'’-]+(?:[ \t]+(?!(?:and|or)\b)[\w'’-]+){0,2}){2,3}\.[ \t]*$/m
360
+ ];
361
+ var alreadyBlocked = (block, match, index) => {
362
+ const sentence = block.text.slice(Math.max(0, index - 80), index + match.length);
363
+ return NEGATION.some((pattern) => pattern.test(sentence));
364
+ };
302
365
  var DATA_ABSENCE = /\b(?:yet|found|available|configured|selected|assigned|scheduled|recorded|on file|to show|to display|results|match|matches|matching|data|in this period)\b/i;
303
366
  var SIGNED_IN = /(?:^|\/)(?:admin|portal|dashboard|embedded)\//;
304
367
  function lineAround(text, index) {
@@ -413,12 +476,25 @@ var COPY_TELLS = [
413
476
  generation: 2,
414
477
  severity: "warn",
415
478
  surface: "copy",
416
- why: "Told to avoid jargon, a model announces that it is avoiding jargon. 'Explained plainly' swaps a synonym and keeps the tell.",
417
- fix: "Use the house replacement, 'properly explained', or drop the claim and let the copy show it.",
418
- detect: phrases([/\b(?:plain english|explained plainly|plainly explained)\b/i], quoted),
479
+ why: "Told to avoid jargon, a model announces that it is avoiding jargon: 'in plain English', 'stated plainly', 'we'll tell you plainly', 'in plain terms'. The founder bans the whole family (20 October 2026); a reader takes it as filler.",
480
+ fix: "Drop the adverb and say the thing: 'Our prices, stated plainly' becomes 'Our prices'. Where the claim matters, the house replacement for 'plain English' is 'properly explained'.",
481
+ detect: phrases(PLAIN_FAMILY, quoted),
419
482
  fixtures: {
420
- flag: [f("content/home.md", "Your options, in plain English.")],
421
- pass: [f("content/home.md", "Your options, properly explained.")]
483
+ flag: [
484
+ f("content/home.md", "Your options, in plain English."),
485
+ // Eunice Ordor's draft lines, Pastel 986559 #12 and #13 (her diagnosis taken, her wording not).
486
+ f("content/clinics.md", "Tell us what's happening and we'll say plainly what we would take on."),
487
+ f("content/pricing.md", "DD's payment terms, plainly stated."),
488
+ f("content/clinics.md", "We explain our findings in plain terms."),
489
+ f("content/clinics.md", "We share findings in plain language.")
490
+ ],
491
+ pass: [
492
+ f("content/home.md", "Your options, properly explained."),
493
+ f("content/pricing.md", "Our payment terms: 30% when you sign, the rest at launch."),
494
+ // The Apache and zlib licence wording, copied into a repo as it is.
495
+ f("LICENSE.txt", "Altered source versions must be plainly marked as such."),
496
+ f("content/menu.md", "Plain or seeded bagels, and plain-language allergen notes.")
497
+ ]
422
498
  }
423
499
  },
424
500
  {
@@ -469,11 +545,11 @@ var COPY_TELLS = [
469
545
  generation: 1,
470
546
  severity: "warn",
471
547
  surface: "copy",
472
- why: "Truly, genuinely, clear, ultimately, 'the single most', 'bar none': normal English once, and a tell when they stack. The house rules keep them for review, never blocking.",
548
+ why: "Truly, genuinely, clear, ultimately, 'a plain recommendation', 'the single most', 'bar none': normal English once, and a tell when they stack. The house rules keep them for review, never blocking.",
473
549
  fix: "Keep the one that lands hardest and cut the rest. 'What is genuinely excellent' reads better as 'what is excellent'.",
474
550
  detect: phrases([new RegExp(`(?:^|\\b)(?:${[...REVIEW_PHRASES].sort((a, b) => b.length - a.length).map((p) => escape(p).replace(/^(\w)/, "\\b$1").replace(/(\w)$/, "$1\\b")).join("|")})`, "i")], quoted),
475
551
  fixtures: {
476
- flag: [f("content/home.md", "We are truly proud of it."), f("content/home.md", "You leave with a clear next step.")],
552
+ flag: [f("content/home.md", "We are truly proud of it."), f("content/home.md", "You leave with a clear next step."), f("content/process.md", "You get a plain recommendation and someone who knows your systems.")],
477
553
  pass: [f("content/home.md", "We have fitted 400 boilers since 2009."), f("content/home.md", "Keep a safe clearance around the meter.")]
478
554
  }
479
555
  },
@@ -554,6 +630,40 @@ var COPY_TELLS = [
554
630
  ]
555
631
  }
556
632
  },
633
+ {
634
+ id: "confession-line",
635
+ name: "Confession line",
636
+ generation: 2,
637
+ severity: "warn",
638
+ surface: "copy",
639
+ why: "'What this is and is not', 'we have not yet built', 'our experience so far is one practice', 'what we would and wouldn't take on': a model scopes a business by confessing its limits. It reads as small print, and it turns a buyer away before they make contact.",
640
+ fix: "Scope by being precise about what is true, and leave the door open: 'Built and run by us for Sensphere, a practice whose clinicians work across several sites.' Keep contractual facts (eligibility, who runs what) and say them as what the buyer gets.",
641
+ detect: phrases(CONFESSION, quoted),
642
+ fixtures: {
643
+ flag: [
644
+ // Each one from the DD site, as Eunice Ordor flagged it (Pastel 986559 #8, #12, #13).
645
+ f("content/clinics.md", "What this is and is not: a practice portal we built and run for one practice."),
646
+ f("content/clinics.md", "We have not yet built and run the digital systems of a practice with several clinicians."),
647
+ f("content/home.md", "Including the client portal we run for Sensphere. Our clinic experience so far is one practice."),
648
+ f("content/clinics.md", "Tell us what's happening and we'll say what we would and wouldn't take on."),
649
+ f("content/clinics.md", "We will say what carries over from this work and what we would need to learn first."),
650
+ f("content/clinics.md", "We will tell you where our experience applies directly and where it is close."),
651
+ f("content/about.md", "What we are not"),
652
+ f("content/about.md", "Who we don't work with: anyone who needs a site this week."),
653
+ f("content/mobile.md", "Mobile is our newest line, so we tell you what we have and haven't done.")
654
+ ],
655
+ pass: [
656
+ f("content/clinics.md", "Built and run by us for Sensphere, a growing practice whose clinicians work remotely."),
657
+ f("content/home.md", "The client portal we run for Sensphere."),
658
+ // Contractual facts, said as they are.
659
+ f("content/pricing.md", "Pay monthly is open to UK residents aged 18 and over, subject to status."),
660
+ f("content/pricing.md", "Your monthly payments do not buy the site; the buy-out price does."),
661
+ f("content/terms.md", "What we are responsible for, and what we are not responsible for, is in clause 4."),
662
+ f("content/insurance.md", "Ask what your policy does and does not cover."),
663
+ f("emails/deposit.md", "We have not yet received your deposit, so the date is still open.")
664
+ ]
665
+ }
666
+ },
557
667
  {
558
668
  id: "hollow-imperative",
559
669
  name: "Hollow imperative",
@@ -632,7 +742,7 @@ var COPY_TELLS = [
632
742
  generation: 2,
633
743
  severity: "warn",
634
744
  surface: "copy",
635
- why: "'It's not just a haircut, it's an experience', 'dispatched from here, not shipped in': the contrast-and-reveal template is the most recognisable construction in generated copy.",
745
+ why: "'It's not just a haircut, it's an experience', 'dispatched from here, not shipped in': the contrast-and-reveal template (correctio, antithesis: see COPY.md) is the most recognisable construction in generated copy.",
636
746
  fix: "Say the positive claim and drop the contrast.",
637
747
  detect: phrases(NEGATION, quoted, allText),
638
748
  fixtures: {
@@ -643,12 +753,54 @@ var COPY_TELLS = [
643
753
  f("content/home.md", "Hairdressing isn't a job, it's art."),
644
754
  f("content/home.md", "It is less about the tools and more about the eye."),
645
755
  f("content/home.md", "Order today and it's dispatched from here, not shipped in from Seoul."),
646
- f("app/offer.tsx", `export const outcome = "The whole path, not just the ads.";`)
756
+ f("app/offer.tsx", `export const outcome = "The whole path, not just the ads.";`),
757
+ // From a 92EL report that passed the gate, October 2026.
758
+ f("content/report.md", "These are reported, not assumed to pass."),
759
+ f("content/report.md", "The deletion is proposed, not automated."),
760
+ f("content/report.md", "For 92EL, that means renting Microsoft's services, not running servers."),
761
+ f("content/home.md", "Your team should spend time delivering services, not managing bookings.")
647
762
  ],
648
763
  pass: [
649
764
  f("content/home.md", "A haircut, a hot towel and a straight-razor finish."),
650
765
  f("content/home.md", "They are cosmetics, not medicines."),
651
- f("content/home.md", "The box arrived red, not led astray by a dented corner.")
766
+ f("content/home.md", "The box arrived red, not led astray by a dented corner."),
767
+ f("content/home.md", "We fix boilers in the morning, not in the evening."),
768
+ f("content/report.md", "Players never open the lists."),
769
+ f("content/report.md", "It is not tested at national scale."),
770
+ f("content/report.md", "Do not invent anything."),
771
+ f("content/report.md", "Nothing is copied by hand."),
772
+ f("content/report.md", "Results are checked by a person and not yet automated.")
773
+ ]
774
+ }
775
+ },
776
+ {
777
+ id: "trailing-contrast",
778
+ name: "Trailing contrast",
779
+ generation: 2,
780
+ severity: "warn",
781
+ surface: "copy",
782
+ why: "'Edge matters for game servers, not registration', 'the league's own threshold, not a legal one', 'renting computing instead of owning it': the contrast template (correctio, antithesis: see COPY.md) in its softer forms. A genuine disclaimer has the same shape, so a person decides.",
783
+ fix: "Say the positive claim on its own: 'Edge matters for game servers.' Keep the contrast only where the reader would otherwise assume the other thing, such as a legal disclaimer.",
784
+ detect: phrases(SOFT_CONTRAST, quoted, allText, alreadyBlocked),
785
+ fixtures: {
786
+ flag: [
787
+ // From a 92EL report that passed the gate, October 2026.
788
+ f("content/report.md", "Edge matters for game servers, not registration."),
789
+ f("content/report.md", "Age 18 is the league's own threshold, not a legal one."),
790
+ f("content/report.md", "Cloud computing means renting computing over the internet instead of owning it."),
791
+ f("content/home.md", "Real Square data, not a vanity metric.")
792
+ ],
793
+ pass: [
794
+ f("content/home.md", "Rewire, retile and replumb a bathroom in five days."),
795
+ f("content/report.md", "Players never open the lists."),
796
+ f("content/report.md", "It is not tested at national scale."),
797
+ f("content/report.md", "Do not invent anything."),
798
+ f("content/report.md", "Nothing is copied by hand."),
799
+ f("content/report.md", "Results are checked by a person and not yet automated."),
800
+ f("content/home.md", "Pay by card, not to mention Apple Pay."),
801
+ f("content/home.md", "Card instead of cash is fine."),
802
+ // The blocking rule reports this one; it is not reported twice.
803
+ f("content/report.md", "The deletion is proposed, not automated.")
652
804
  ]
653
805
  }
654
806
  },
@@ -698,7 +850,7 @@ var COPY_TELLS = [
698
850
  generation: 2,
699
851
  severity: "warn",
700
852
  surface: "copy",
701
- why: "Three fragments in a row ('Fast. Friendly. Local.' or 'No fuss. No jargon. Just results.') is the second wave's favourite rhythm.",
853
+ why: "Three fragments in a row ('Fast. Friendly. Local.' or 'No fuss. No jargon. Just results.') (a tricolon in asyndeton: see COPY.md) is the second wave's favourite rhythm.",
702
854
  fix: "Write one sentence that says which of the three is true, and how you know.",
703
855
  // The fragments share one paragraph: "You don't. Again.", a blank line, then "It's frustrating." is two beats, not three.
704
856
  detect: phrases([/(?:\b[A-Z][\w'’-]*(?:[ \t]+[\w'’-]+){0,2}[.!](?:[ \t]+|[ \t]*\n(?![ \t]*\n)[ \t]*)){2}[A-Z][\w'’-]*(?:[ \t]+[\w'’-]+){0,2}[.!](?=\s|$)/], quoted),
@@ -710,6 +862,36 @@ var COPY_TELLS = [
710
862
  ]
711
863
  }
712
864
  },
865
+ {
866
+ id: "parallel-pair",
867
+ name: "Verbless parallel pair",
868
+ generation: 2,
869
+ severity: "warn",
870
+ surface: "copy",
871
+ why: "'One form, seven workflows', 'Same site, same \xA38,000': two matched fragments with no verb (isocolon, often with anaphora or asyndeton: see COPY.md), the staccato triplet's two-part cousin. It sounds decided and says less than a sentence would.",
872
+ fix: "Write the sentence the pair stands for: 'One form and seven workflows replace the spreadsheets.' A short label on a slide can stay if a person reads it and it earns its place.",
873
+ detect: phrases(PARALLEL_PAIR, quoted),
874
+ fixtures: {
875
+ flag: [
876
+ // From 92EL deliverables, October 2026.
877
+ f("content/deck.md", "# One form, seven workflows"),
878
+ f("content/deck.md", "One form, seven workflows."),
879
+ f("content/deck.md", "Same site, same \xA38,000."),
880
+ f("content/deck.md", "Pay per user, per month"),
881
+ f("content/deck.md", "Service account, match-day reminders, analytics.")
882
+ ],
883
+ pass: [
884
+ f("content/deck.md", "Forms, SharePoint, Outlook and Teams"),
885
+ f("content/deck.md", "One form and seven workflows replace 92EL's spreadsheets and email chains."),
886
+ f("content/deck.md", "PulseCloud Technologies, for 92EL senior management"),
887
+ f("content/deck.md", "41 of 50 passed, 12 after a fix."),
888
+ f("content/deck.md", "Pay monthly for each user"),
889
+ f("content/home.md", "We fix boilers the same day, and we tell you the price before we start."),
890
+ // The blocking no-x-no-y reports this one.
891
+ f("content/home.md", "We reply within a day. No obligation, no spam.")
892
+ ]
893
+ }
894
+ },
713
895
  {
714
896
  id: "where-x-meets-y",
715
897
  name: "'Where X meets Y'",
@@ -1955,6 +2137,69 @@ function eyebrowChipHits(ctx) {
1955
2137
  }
1956
2138
  return hits;
1957
2139
  }
2140
+ var HERO_OPEN = /<(section|header|div|main|article|Section|Container)\b[^>]*?\b(?:class|className|id)\s*=\s*(?:"|'|\{\s*[`"']?)[^"'`>]*?(?<![a-z])hero(?![a-z])[^>]*>/gi;
2141
+ function closeOf(text, tag, from) {
2142
+ const re = new RegExp(`<(/?)${tag}\\b[^>]*?(/?)>`, "g");
2143
+ re.lastIndex = from;
2144
+ let depth = 0;
2145
+ for (let m = re.exec(text); m; m = re.exec(text)) {
2146
+ if (m[2] === "/") continue;
2147
+ depth += m[1] === "/" ? -1 : 1;
2148
+ if (depth === 0) return m.index + m[0].length;
2149
+ if (m.index - from > 8e3) break;
2150
+ }
2151
+ return Math.min(text.length, from + 4e3);
2152
+ }
2153
+ function heroSpans(path, text) {
2154
+ if (/(?:^|[\\/])[\w-]*hero[\w-]*\.(?:astro|tsx|jsx|vue|svelte)$/i.test(path)) return [[0, text.length]];
2155
+ const spans = [];
2156
+ for (const m of text.matchAll(HERO_OPEN)) {
2157
+ const at = m.index ?? 0;
2158
+ if (spans.some(([a, b]) => at >= a && at < b)) continue;
2159
+ spans.push([at, closeOf(text, m[1], at)]);
2160
+ }
2161
+ if (spans.length > 0) return spans;
2162
+ const h1 = text.search(/<h1\b/);
2163
+ if (h1 === -1) return [];
2164
+ const rest = text.slice(h1);
2165
+ const end = rest.search(/<\/(?:section|header)>|<section\b/);
2166
+ return [[h1, h1 + Math.min(end === -1 ? rest.length : end, 1500)]];
2167
+ }
2168
+ var CONTROL = /<(a|button|Button|ButtonLink|LinkButton|Link|Cta|CTA|CallToAction)\b([^>]*)>([\s\S]{0,300}?)<\/\1>/g;
2169
+ var BUTTON_COMPONENT = /^(?:Button|ButtonLink|LinkButton|Cta|CTA|CallToAction)$/;
2170
+ var BUTTON_CLASS = /(?<![a-z])(?:btn|button|cta)(?![a-z])/i;
2171
+ var TOGGLE = /\baria-(?:expanded|controls|haspopup)\b|\btype\s*=\s*["']submit["']/;
2172
+ var NOT_A_LANDING = /(?:^|[\\/])(?:error|global-error|not-found|404|500)\.\w+$|[\\/](?:admin|portal|dashboard|account|\(qa\)|\(app\)|qa)[\\/]/i;
2173
+ function buttonLabel(attrs, inner) {
2174
+ const text = inner.replace(/<[^>]*>/g, " ").replace(/\{[^}]*\}/g, " ").replace(/\s+/g, " ").trim();
2175
+ if (text && !/[{}()=]/.test(text)) return text.slice(0, 40);
2176
+ return attrs.match(/\bhref\s*=\s*["'{`$]*\{?([^"'}`\s]+)/)?.[1] ?? "a button";
2177
+ }
2178
+ function heroCtaPairHits(ctx) {
2179
+ const hits = [];
2180
+ for (const file of ctx.files) {
2181
+ if (file.kind !== "markup" || NOT_A_LANDING.test(file.path)) continue;
2182
+ const text = file.text.replace(/\\"/g, ' "');
2183
+ for (const [start, end] of heroSpans(file.path, text)) {
2184
+ const span = text.slice(start, end).replace(/<(nav|form)\b[\s\S]*?<\/\1>/gi, (s) => " ".repeat(s.length));
2185
+ const buttons = [];
2186
+ for (const m of span.matchAll(CONTROL)) {
2187
+ const [, tag, attrs, inner] = m;
2188
+ if (TOGGLE.test(attrs)) continue;
2189
+ const cls = attrs.match(/\b(?:class|className|variant)\s*=\s*(?:"([^"]*)"|'([^']*)'|\{([^}]*)\})/g)?.join(" ") ?? "";
2190
+ const tw = /\bpx-\d/.test(cls) && /\bpy-\d/.test(cls) && /\b(?:bg-|border\b|border-|rounded)/.test(cls);
2191
+ if (BUTTON_COMPONENT.test(tag) || BUTTON_CLASS.test(cls) || tw || /\brole\s*=\s*["']button["']/.test(attrs)) {
2192
+ buttons.push({ label: buttonLabel(attrs, inner), offset: start + (m.index ?? 0) });
2193
+ }
2194
+ }
2195
+ if (buttons.length >= 2) {
2196
+ const names = buttons.slice(0, 3).map((b) => `"${b.label}"`).join(", ");
2197
+ hits.push({ path: file.path, offset: buttons[1].offset, message: `${buttons.length} buttons side by side in the hero: ${names}` });
2198
+ }
2199
+ }
2200
+ }
2201
+ return hits;
2202
+ }
1958
2203
  function iconTiles(file) {
1959
2204
  return file.classUnits.filter((unit) => {
1960
2205
  const sized = has(unit, /^size-(?:8|9|10|11|12|14)$/) || (find(unit, /^h-(?:8|9|10|11|12|14)$/) ?? "x").slice(2) === (find(unit, /^w-(?:8|9|10|11|12|14)$/) ?? "y").slice(2);
@@ -2405,6 +2650,75 @@ const inter = Inter({ subsets: ["latin"] });`),
2405
2650
  <span className="inline-flex rounded-full border px-3 py-1 text-xs">Tag</span>`)]
2406
2651
  }
2407
2652
  },
2653
+ {
2654
+ id: "hero-cta-pair",
2655
+ name: "Two buttons in the hero",
2656
+ generation: 1,
2657
+ severity: "warn",
2658
+ surface: "source",
2659
+ why: "A filled button beside an outline or ghost one ('Get a free quote' / 'See our plans') is in 140 of 140 heroes Claude builds for a brief. Two equal asks make the visitor choose before they know anything, and say nobody decided what the page is for.",
2660
+ fix: "Keep one button, the ask the page exists for. Put the second route in the copy as a text link ('or see the work first'), or lower down where it answers a question.",
2661
+ detect: heroCtaPairHits,
2662
+ fixtures: {
2663
+ flag: [
2664
+ // Eunice Ordor's #5 and #36 (Pastel 986559): the DD site's own hero and process close.
2665
+ f3(
2666
+ "src/components/Hero.astro",
2667
+ `<section class="hero">
2668
+ <h1>We run the systems behind your website</h1>
2669
+ <a href="/contact" class="btn btn-primary">Get in touch</a>
2670
+ <a href="/work" class="btn btn-ghost">See our work</a>
2671
+ </section>`
2672
+ ),
2673
+ // The null build's hero, verbatim in shape (calibration/null/rmp/pages/05.html).
2674
+ f3(
2675
+ "index.html",
2676
+ `<nav><a class="btn" href="#contact">Quote</a></nav>
2677
+ <section id="hero" class="hero">
2678
+ <h1>Electricians in Uxbridge</h1>
2679
+ <a href="#contact" class="btn btn-primary">Book a Free Quote</a>
2680
+ <a href="tel:+441895555210" class="btn btn-outline">Call 01895 555 210</a>
2681
+ </section>`
2682
+ ),
2683
+ f3(
2684
+ "app/page.tsx",
2685
+ `<section className="relative py-24">
2686
+ <h1 className="text-5xl">Nails in Brackley</h1>
2687
+ <div className="flex gap-4">
2688
+ <Button asChild><a href="/book">Book now</a></Button>
2689
+ <Button variant="outline">View treatments</Button>
2690
+ </div>
2691
+ </section>`
2692
+ )
2693
+ ],
2694
+ pass: [
2695
+ // One button, and the second route as a text link in the sentence.
2696
+ f3(
2697
+ "src/components/Hero.astro",
2698
+ `<section class="hero">
2699
+ <h1>We run the systems behind your website</h1>
2700
+ <p>Tell us what's going on, or <a href="/work">see the work first</a>.</p>
2701
+ <a href="/contact" class="btn btn-primary">Get in touch</a>
2702
+ </section>`
2703
+ ),
2704
+ // A button in the nav and a search form are not the hero's ask.
2705
+ f3(
2706
+ "index.html",
2707
+ `<header class="hero">
2708
+ <nav><a class="btn" href="/book">Book</a></nav>
2709
+ <h1>Barbers in Manchester</h1>
2710
+ <a class="btn" href="/book">Book a cut</a>
2711
+ <form><button class="btn" type="submit">Search</button></form>
2712
+ </header>`
2713
+ ),
2714
+ f3("app/page.tsx", `<section className="py-24">
2715
+ <h1 className="text-5xl">Nails in Brackley</h1>
2716
+ <a className="rounded bg-ink px-5 py-3" href="/book">Book now</a>
2717
+ </section>
2718
+ <section><a className="rounded bg-ink px-5 py-3" href="/prices">Prices</a></section>`)
2719
+ ]
2720
+ }
2721
+ },
2408
2722
  {
2409
2723
  id: "icon-tile-stack",
2410
2724
  name: "Icon in a tinted tile",
@@ -3158,7 +3472,9 @@ var HOUSE = {
3158
3472
  "no-x-badge": { tier: "block", label: 'standalone "No X" badge. Reads as a slapped-on kicker, and worse when reused across pieces' },
3159
3473
  "ai-phrase": { tier: "block", label: "AI tell" },
3160
3474
  "plainer-word": { tier: "block", label: "a plainer word exists. Name the mechanism instead" },
3161
- "plain-english": { tier: "block", label: 'use "properly explained"' },
3475
+ // Widened 2026-10-20 (founder) to bare "plainly" and "in plain terms/language/words";
3476
+ // estate hits read first (DOM-1058), nearly all the stock "stated plainly".
3477
+ "plain-english": { tier: "block", label: 'the plain-English family. Drop the adverb and say the thing, or use "properly explained"' },
3162
3478
  buzzword: { tier: "block", label: "forbidden phrase" },
3163
3479
  "negative-reassurance": { tier: "block", label: "negative reassurance, say what they get" },
3164
3480
  // Evidence of a pasted chat reply, not a matter of style. Moved from review
@@ -3172,6 +3488,13 @@ var HOUSE = {
3172
3488
  "stock-email-line": { tier: "review", label: "stock email line, start with the reason for writing and end with the next step" },
3173
3489
  // New 2026-10-19 (founder): review first, like every new tell, until estate hits are read.
3174
3490
  "matey-register": { tier: "review", label: "matey register, write plain and complete British English" },
3491
+ // New 2026-10-20 (founder, from Eunice Ordor's review): review first, like every new tell.
3492
+ "confession-line": { tier: "review", label: "confession line, scope the work by saying precisely what is true" },
3493
+ // New 2026-10-23 (a 92EL report passed the gate with three): review, because a
3494
+ // genuine disclaimer has the same shape. The gerund pair joined not-just-but.
3495
+ // New 2026-10-23 (founder, from 92EL deliverables): review, since a short slide label is often fine.
3496
+ "parallel-pair": { tier: "review", label: "verbless parallel pair, write the sentence it stands for" },
3497
+ "trailing-contrast": { tier: "review", label: "trailing contrast. Say the positive claim, unless it is a disclaimer the reader needs" },
3175
3498
  "ai-vocabulary": { tier: "review", label: "AI vocabulary" },
3176
3499
  "stock-phrase": { tier: "review", label: "stock phrase" },
3177
3500
  "hollow-imperative": { tier: "review", label: "hollow imperative" },
@@ -3397,6 +3720,33 @@ var RENDERED_PATHS = {
3397
3720
  detect: (s) => s.effects.eyebrowChip ? [hit(s, "a small bordered pill sits above the headline")] : [],
3398
3721
  fixtures: { flag: [makeSnapshot({ effects: { eyebrowChip: true } })], pass: [makeSnapshot()] }
3399
3722
  },
3723
+ "hero-cta-pair": {
3724
+ // Version 2 geometry counts buttons and button-styled links per section. A
3725
+ // header painted inside the hero's box adds its own button, which the
3726
+ // source path can tell apart and this one cannot; a ghost button with no
3727
+ // fill or border is not counted, so this path under-reports.
3728
+ detect: (s) => {
3729
+ const first = s.sections[0];
3730
+ const controls = first?.geometry?.controls ?? 0;
3731
+ return first && (first.role ?? first.kind) === "hero" && controls >= 2 ? [hit(s, `${controls} buttons in the hero`, first.label)] : [];
3732
+ },
3733
+ fixtures: {
3734
+ flag: [
3735
+ {
3736
+ ...makeSnapshot(),
3737
+ sections: makeSnapshot().sections.map((x, i) => i === 0 ? { ...x, role: "hero", geometry: { centredShare: 0.2, mirrorSymmetry: 0.6, whitespaceRatio: 0.6, contentWidthRatio: 0.8, background: "rgb(255, 255, 255)", controls: 2 } } : x)
3738
+ }
3739
+ ],
3740
+ pass: [
3741
+ makeSnapshot(),
3742
+ // One button, with the second route as a text link: one control.
3743
+ {
3744
+ ...makeSnapshot(),
3745
+ sections: makeSnapshot().sections.map((x, i) => i === 0 ? { ...x, role: "hero", geometry: { centredShare: 0.2, mirrorSymmetry: 0.6, whitespaceRatio: 0.6, contentWidthRatio: 0.8, background: "rgb(255, 255, 255)", controls: 1 } } : x)
3746
+ }
3747
+ ]
3748
+ }
3749
+ },
3400
3750
  "icon-tile-grid": {
3401
3751
  detect: (s) => s.sections.filter((x) => x.cards >= 3 && x.iconCards >= 3).map((x) => hit(s, `${x.iconCards} icon cards in a row`, x.label)),
3402
3752
  fixtures: {
@@ -3913,7 +4263,7 @@ var IMAGERY_TELLS = [
3913
4263
  ];
3914
4264
 
3915
4265
  // src/character/check.ts
3916
- var CATALOGUE_VERSION = "2026.10.4";
4266
+ var CATALOGUE_VERSION = "2026.10.7";
3917
4267
  var CATALOGUE = [
3918
4268
  ...[...SOURCE_TELLS, ...COPY_TELLS, ...RESEARCH_TELLS, ...DENSITY_TELLS].map((t) => RENDERED_PATHS[t.id] ? { ...t, rendered: RENDERED_PATHS[t.id] } : t),
3919
4269
  ...SPECIFICITY_COPY_TELLS,