@brandlab-digital/conformance 3.14.0 → 3.15.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 (108) hide show
  1. package/README.md +60 -3
  2. package/dist/current-release.js +5 -5
  3. package/dist/current-release.js.map +1 -1
  4. package/dist/engineering.d.ts.map +1 -1
  5. package/dist/engineering.js +18 -2
  6. package/dist/engineering.js.map +1 -1
  7. package/dist/estate-snapshot.d.ts +54 -0
  8. package/dist/estate-snapshot.d.ts.map +1 -0
  9. package/dist/estate-snapshot.js +164 -0
  10. package/dist/estate-snapshot.js.map +1 -0
  11. package/dist/estate.d.ts +10 -0
  12. package/dist/estate.d.ts.map +1 -1
  13. package/dist/estate.js +36 -16
  14. package/dist/estate.js.map +1 -1
  15. package/dist/media-snapshot.d.ts +53 -0
  16. package/dist/media-snapshot.d.ts.map +1 -0
  17. package/dist/media-snapshot.js +66 -0
  18. package/dist/media-snapshot.js.map +1 -0
  19. package/dist/site-system/checks.d.ts +2 -2
  20. package/dist/site-system/checks.js +2 -2
  21. package/dist/site-system/checks.js.map +1 -1
  22. package/dist/site-system/config.d.ts +13 -0
  23. package/dist/site-system/config.d.ts.map +1 -1
  24. package/dist/site-system/config.js +30 -1
  25. package/dist/site-system/config.js.map +1 -1
  26. package/dist/site-system/index.d.ts +1 -1
  27. package/dist/site-system/index.d.ts.map +1 -1
  28. package/dist/site-system/index.js +1 -1
  29. package/dist/site-system/index.js.map +1 -1
  30. package/dist/site-system/journeys/conversion.d.ts.map +1 -1
  31. package/dist/site-system/journeys/conversion.js +15 -2
  32. package/dist/site-system/journeys/conversion.js.map +1 -1
  33. package/dist/site-system/journeys/menu.d.ts.map +1 -1
  34. package/dist/site-system/journeys/menu.js +24 -1
  35. package/dist/site-system/journeys/menu.js.map +1 -1
  36. package/dist/site-system/journeys/page-helpers.d.ts.map +1 -1
  37. package/dist/site-system/journeys/page-helpers.js +1 -1
  38. package/dist/site-system/journeys/page-helpers.js.map +1 -1
  39. package/dist/site-system/journeys/plan.d.ts +13 -3
  40. package/dist/site-system/journeys/plan.d.ts.map +1 -1
  41. package/dist/site-system/journeys/plan.js +12 -2
  42. package/dist/site-system/journeys/plan.js.map +1 -1
  43. package/dist/site-system/journeys/shell.d.ts +1 -1
  44. package/dist/site-system/journeys/shell.js +2 -2
  45. package/dist/site-system/journeys/shell.js.map +1 -1
  46. package/dist/site-system/report.d.ts.map +1 -1
  47. package/dist/site-system/report.js +24 -4
  48. package/dist/site-system/report.js.map +1 -1
  49. package/dist/site-system/rules/form/c7-thank-you.d.ts +7 -1
  50. package/dist/site-system/rules/form/c7-thank-you.d.ts.map +1 -1
  51. package/dist/site-system/rules/form/c7-thank-you.js +26 -3
  52. package/dist/site-system/rules/form/c7-thank-you.js.map +1 -1
  53. package/dist/site-system/rules/form/index.d.ts.map +1 -1
  54. package/dist/site-system/rules/form/index.js +11 -1
  55. package/dist/site-system/rules/form/index.js.map +1 -1
  56. package/dist/site-system/rules/full/common.d.ts +2 -0
  57. package/dist/site-system/rules/full/common.d.ts.map +1 -1
  58. package/dist/site-system/rules/full/common.js.map +1 -1
  59. package/dist/site-system/rules/full/estate.d.ts +10 -2
  60. package/dist/site-system/rules/full/estate.d.ts.map +1 -1
  61. package/dist/site-system/rules/full/estate.js +35 -5
  62. package/dist/site-system/rules/full/estate.js.map +1 -1
  63. package/dist/site-system/rules/full/geography.d.ts +7 -0
  64. package/dist/site-system/rules/full/geography.d.ts.map +1 -1
  65. package/dist/site-system/rules/full/geography.js +9 -0
  66. package/dist/site-system/rules/full/geography.js.map +1 -1
  67. package/dist/site-system/rules/full/index.d.ts +2 -1
  68. package/dist/site-system/rules/full/index.d.ts.map +1 -1
  69. package/dist/site-system/rules/full/index.js +5 -1
  70. package/dist/site-system/rules/full/index.js.map +1 -1
  71. package/dist/site-system/rules/full/l10-location-copy.d.ts +1 -1
  72. package/dist/site-system/rules/full/l10-location-copy.d.ts.map +1 -1
  73. package/dist/site-system/rules/full/l10-location-copy.js +5 -2
  74. package/dist/site-system/rules/full/l10-location-copy.js.map +1 -1
  75. package/dist/site-system/rules/full/l3-neighbours.d.ts +3 -2
  76. package/dist/site-system/rules/full/l3-neighbours.d.ts.map +1 -1
  77. package/dist/site-system/rules/full/l3-neighbours.js +4 -1
  78. package/dist/site-system/rules/full/l3-neighbours.js.map +1 -1
  79. package/dist/site-system/rules/full/l4-local-copy.d.ts +2 -1
  80. package/dist/site-system/rules/full/l4-local-copy.d.ts.map +1 -1
  81. package/dist/site-system/rules/full/l4-local-copy.js +8 -3
  82. package/dist/site-system/rules/full/l4-local-copy.js.map +1 -1
  83. package/dist/site-system/rules/full/l9-data-contract.js +2 -2
  84. package/dist/site-system/rules/full/l9-data-contract.js.map +1 -1
  85. package/dist/site-system/rules/full/links.d.ts +3 -1
  86. package/dist/site-system/rules/full/links.d.ts.map +1 -1
  87. package/dist/site-system/rules/full/links.js +15 -5
  88. package/dist/site-system/rules/full/links.js.map +1 -1
  89. package/dist/site-system/rules/full/route-kinds.d.ts +15 -0
  90. package/dist/site-system/rules/full/route-kinds.d.ts.map +1 -0
  91. package/dist/site-system/rules/full/route-kinds.js +52 -0
  92. package/dist/site-system/rules/full/route-kinds.js.map +1 -0
  93. package/dist/site-system/rules/full/strategy.d.ts +2 -0
  94. package/dist/site-system/rules/full/strategy.d.ts.map +1 -1
  95. package/dist/site-system/rules/full/strategy.js +86 -14
  96. package/dist/site-system/rules/full/strategy.js.map +1 -1
  97. package/dist/site-system/rules/sections/k2-skin-coverage.d.ts +2 -2
  98. package/dist/site-system/rules/sections/k2-skin-coverage.d.ts.map +1 -1
  99. package/dist/site-system/rules/sections/k2-skin-coverage.js +9 -2
  100. package/dist/site-system/rules/sections/k2-skin-coverage.js.map +1 -1
  101. package/dist/site-system/rules/sections/t6-media-entries.d.ts.map +1 -1
  102. package/dist/site-system/rules/sections/t6-media-entries.js +69 -5
  103. package/dist/site-system/rules/sections/t6-media-entries.js.map +1 -1
  104. package/dist/site-system-e2e.d.ts +1 -1
  105. package/dist/site-system-e2e.d.ts.map +1 -1
  106. package/dist/site-system-e2e.js +17 -4
  107. package/dist/site-system-e2e.js.map +1 -1
  108. package/package.json +10 -2
package/README.md CHANGED
@@ -22,8 +22,28 @@ A site adopts Site System v2 by declaring `siteSystem: { tier: 'shell' | 'enquir
22
22
  `brandlab.config.ts` (`newBuild: true` for new builds and redesigns; `samples` adds pages to check; `labels`,
23
23
  `freeQuotes`, `thirdParties` and `phones` record the quote labels, free-quote offer, third-party hosts and extra
24
24
  `tel:` links the shell rules accept; `refreshExceptions` lists estate families allowed to refresh more often than
25
- every 7 days, each `{ family, revalidateSeconds, reason, decisionId }`, for W3 from 3.13.0). Without it, nothing in
26
- the gate blocks.
25
+ every 7 days, each `{ family, revalidateSeconds, reason, decisionId }`, for W3 from 3.13.0; `replyTime` records a
26
+ decision to promise no reply time on the thank-you page, for C7 from 3.15.0, below). Without it, nothing in the gate
27
+ blocks.
28
+
29
+ **C7, the thank-you page** (enquiry tier): every sampled thank-you page (a `/thank-you`-style path or the library's
30
+ `ThankYou` block) is `noindex, follow`, has a `tel:` link in the block (or `<main>`) and says in its reply slot
31
+ (`data-slot="reply"`) when the business will reply, as a specific time ("within the hour", "within one to two business
32
+ days"; `C7_REPLY_TIME`). Vague words such as "shortly" or "as soon as we can" fail. When the owner decides to promise
33
+ no time, the site records it (3.15.0):
34
+
35
+ ```ts
36
+ siteSystem: {
37
+ tier: 'enquiry',
38
+ replyTime: { promise: false, wording: 'We will call you back as soon as possible.', decidedBy: 'owner', decidedOn: '2026-10-24' },
39
+ },
40
+ ```
41
+
42
+ C7 then accepts that wording in the reply slot instead of a time (compared ignoring case, spacing and punctuation),
43
+ fails a page without it or one that still promises a time, and names the recorded decision in its pass message. The
44
+ wording may not contain a time itself (digits, minutes, hours, "same day", "next day", a business or working day,
45
+ "today", "tomorrow"); `decidedBy` is `owner` or `romie` (for the owner) and `decidedOn` a real date. `{ promise: true }`
46
+ or no record keeps the specific-time rule. Noindex, the call link and everything else C7 checks are unchanged.
27
47
 
28
48
  - `brandlab-ready` (after `next build` and the site-system journeys) writes `docs/ready/ready-report.md` and
29
49
  `.json`: every check with its tier, whether it blocks for this site, its status (pass, fail, not run, excepted,
@@ -37,6 +57,28 @@ the gate blocks.
37
57
  `--base-url`, merges `--findings <file>` results for K10 and X1 (the lenient harness) and the brandlab-verify
38
58
  search, contact and analytics families, and honours the project's `exceptions` (`ruleId` is the check id;
39
59
  expired exceptions do not count).
60
+ - The journeys come from `tests/e2e/site-system.spec.ts`, run with the JSON reporter into
61
+ `test-results/site-system.json`:
62
+
63
+ ```ts
64
+ import { defineBrandlabSiteSystemTests } from '@brandlab-digital/conformance/site-system-e2e'
65
+
66
+ defineBrandlabSiteSystemTests({
67
+ tier: 'full', // the tier brandlab.config.ts declares
68
+ pages: {
69
+ home: '/',
70
+ money: ['/services/blocked-drains'], // C1, from the enquiry tier: service pages with the enquiry form
71
+ contact: '/contact',
72
+ families: ['/locations/ryde', '/blog/blocked-drain-cost-sydney'], // W9, full tier: one built page per dynamic route family
73
+ },
74
+ })
75
+ ```
76
+
77
+ A journey registers from the release that brings it (W2 and W9 from 3.13.0). The release is the site's installed
78
+ Brandlab release, read from package.json as `brandlab-ready` reads it, a canary included (3.15.0: before it the
79
+ journeys used the conformance package's last published release, so a canary ran none of its newer journeys while
80
+ the gate blocked on them). Leave `release` out; set it only to preview a later release's journeys. When the report
81
+ has journey results but none for a blocking journey check, the gate says which tier, pages and release it needs.
40
82
  - `brandlab-ready record <id> --evidence <where the proof is> [--note <text>]` records a launch-day step (T2,
41
83
  T3-R, C6, X3 to X10) or a recorded check (K10, X1) in `docs/ready/launch.json`, or a human step (truth-pass,
42
84
  trust-carry-over, usefulness-read, codex-second-opinion, launch-proof, look-pick) in `docs/ready/human.json`.
@@ -72,11 +114,26 @@ the gate blocks.
72
114
  `SECTION_TRADE_PROFILES`, for the trade `defineSectionOrder` names): for trees, the council permit note in
73
115
  `LocalFacts` on suburb and service-in-suburb pages and the qualifications and insurance lines on the about page. The
74
116
  section carries `data-bl-slot="<slot>"`, or lists `<slot>:no-…` in `data-bl-slot-skip` (a warning, so the record is
75
- re-checked). **E1-pattern** (rendered, full, from 3.14.0): every location page outside `docs/recorded-titles.json`
117
+ re-checked). The skip is read only from the top-level section element (the outermost `data-bl-section`): a site
118
+ element that wraps `LocalFacts` in its own section hides the skip, and the page fails as if no reason were given.
119
+ Render `LocalFacts` itself as the `SectionSequence` candidate, not inside a wrapper. **E1-pattern** (rendered, full, from 3.14.0): every location page outside `docs/recorded-titles.json`
76
120
  has the H1 "{Service} {Place}" (no "in", no "the") and a title that starts with it, at most 60 characters
77
121
  (site-core `locationHeadingProblem`). **LOC-INDEX** also reads `estate` in strategy.ts (3.14.0): every location page
78
122
  is indexed now or in a wave, a `return` wave's pages are in the build already, and a region page at a suburb's slug
79
123
  sends the suburb to "{slug}-suburb"; renamed slugs are read as their registry places.
124
+ - **Estate plan snapshot** (3.15.0): the gate reads `waves` and `estate` from strategy.ts without running it. A site
125
+ that computes them (from its location catalogue, as AA does) records them with `writeEstatePlanSnapshot(siteStrategy,
126
+ { projectRoot, sources? })` from `@brandlab-digital/conformance/estate-snapshot`, called from a site test so `npm run
127
+ verify` keeps `src/data/estate-plan.generated.json` current (fail that test in CI when it reports `changed`; commit
128
+ the file). The file is deterministic: waves in date order, every list sorted, no timestamp, and a hash of the files
129
+ under `sources` (default `src/data`; tests and `*.generated.json` left out). LOC-INDEX (and L3, L6, L8, which read
130
+ the same plan) use the snapshot when it is present, and LOC-INDEX fails it when it is stale: the hashed files changed
131
+ since it was written, or the record is plain data and says something else. A literal record needs no snapshot.
132
+ - **Media snapshot** (3.15.0): T6 reads `src/data/media.ts` the same way. A computed manifest (gallery entries
133
+ spread in) is recorded with `writeMediaSnapshot(media, { projectRoot, sources? })` from
134
+ `@brandlab-digital/conformance/media-snapshot` into `src/data/media.generated.json`, kept current from a site test in
135
+ the same way; T6 reads it, and fails it when stale. A computed manifest without a snapshot fails T6 with that
136
+ instruction (before 3.15.0 it reported nothing, so the gate showed "No result").
80
137
  - `brandlab-edge-probe [--json] <url>...` (run locally as `npm run probe:edge`, at most 25 URLs) logs
81
138
  `x-vercel-cache`, `age`, `x-vercel-id` (edge and function region) and time to first byte for each page, its RSC
82
139
  payload and its `_tree` prefetch, and a GET to each origin's `/api/contact` (expected 405). It is the measuring
@@ -23,19 +23,19 @@ export const BRANDLAB_CURRENT_RUNTIME_RELEASE = Object.freeze({
23
23
  "kind": "brandlab-runtime-release-contract",
24
24
  "packages": {
25
25
  "@brandlab-digital/conformance": {
26
- "version": "3.14.0"
26
+ "version": "3.15.0"
27
27
  },
28
28
  "@brandlab-digital/eslint-plugin": {
29
- "version": "3.14.0"
29
+ "version": "3.15.0"
30
30
  },
31
31
  "@brandlab-digital/site-core": {
32
- "version": "3.14.0"
32
+ "version": "3.15.0"
33
33
  },
34
34
  "@brandlab-digital/site-next": {
35
- "version": "3.14.0"
35
+ "version": "3.15.0"
36
36
  }
37
37
  },
38
- "releaseVersion": "3.14.0",
38
+ "releaseVersion": "3.15.0",
39
39
  "runtime": {
40
40
  "bundler": "turbopack",
41
41
  "cacheComponents": false,
@@ -1 +1 @@
1
- {"version":3,"file":"current-release.js","sourceRoot":"","sources":["../src/current-release.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,wEAAwE;AACxE,OAAO,EAEL,sCAAsC,GACvC,MAAM,uBAAuB,CAAC;AAE/B,MAAM,CAAC,MAAM,gCAAgC,GAAG,MAAM,CAAC,MAAM,CAC7D;IACE,cAAc,EAAE;QACd,uCAAuC;QACvC,8BAA8B;QAC9B,yBAAyB;QACzB,6BAA6B;QAC7B,0BAA0B;QAC1B,4BAA4B;QAC5B,kCAAkC;QAClC,wCAAwC;QACxC,yBAAyB;KAC1B;IACD,WAAW,EAAE;QACX,WAAW,EAAE,cAAc;QAC3B,cAAc,EAAE,iBAAiB;QACjC,eAAe,EAAE,mBAAmB;QACpC,SAAS,EAAE,YAAY;QACvB,KAAK,EAAE,QAAQ;KAChB;IACD,MAAM,EAAE,mCAAmC;IAC3C,UAAU,EAAE;QACV,+BAA+B,EAAE;YAC/B,SAAS,EAAE,QAAQ;SACpB;QACD,iCAAiC,EAAE;YACjC,SAAS,EAAE,QAAQ;SACpB;QACD,6BAA6B,EAAE;YAC7B,SAAS,EAAE,QAAQ;SACpB;QACD,6BAA6B,EAAE;YAC7B,SAAS,EAAE,QAAQ;SACpB;KACF;IACD,gBAAgB,EAAE,QAAQ;IAC1B,SAAS,EAAE;QACT,SAAS,EAAE,WAAW;QACtB,iBAAiB,EAAE,KAAK;QACxB,MAAM,EAAE,QAAQ;QAChB,mBAAmB,EAAE,OAAO;QAC5B,MAAM,EAAE,MAAM;QACd,gBAAgB,EAAE,aAAa;QAC/B,OAAO,EAAE,QAAQ;QACjB,UAAU,EAAE,QAAQ;QACpB,QAAQ,EAAE,KAAK;QACf,OAAO,EAAE,QAAQ;QACjB,YAAY,EAAE,OAAO;KACtB;IACD,eAAe,EAAE,sCAAsC;CACxD,CAC6C,CAAC;AAE/C,sCAAsC,CAAC,gCAAgC,CAAC,CAAC","sourcesContent":["// Generated by standards/scripts/generate-conformance-current-release.mjs.\n// Each exact package release verifies its own current runtime contract.\nimport {\n type BrandlabRuntimeReleaseContract,\n validateBrandlabRuntimeReleaseContract,\n} from \"./release-manifest.js\";\n\nexport const BRANDLAB_CURRENT_RUNTIME_RELEASE = Object.freeze(\n{\n \"capabilities\": [\n \"typed-project-business-and-route-data\",\n \"essential-search-foundations\",\n \"shared-contact-delivery\",\n \"privacy-safe-lead-analytics\",\n \"security-patched-runtime\",\n \"live-google-review-summary\",\n \"high-signal-project-verification\",\n \"packed-positive-and-negative-consumers\",\n \"changesets-oidc-release\"\n ],\n \"contracts\": {\n \"analytics\": \"analytics-v4\",\n \"architecture\": \"architecture-v7\",\n \"configuration\": \"project-config-v7\",\n \"contact\": \"contact-v4\",\n \"seo\": \"seo-v4\"\n },\n \"kind\": \"brandlab-runtime-release-contract\",\n \"packages\": {\n \"@brandlab-digital/conformance\": {\n \"version\": \"3.14.0\"\n },\n \"@brandlab-digital/eslint-plugin\": {\n \"version\": \"3.14.0\"\n },\n \"@brandlab-digital/site-core\": {\n \"version\": \"3.14.0\"\n },\n \"@brandlab-digital/site-next\": {\n \"version\": \"3.14.0\"\n }\n },\n \"releaseVersion\": \"3.14.0\",\n \"runtime\": {\n \"bundler\": \"turbopack\",\n \"cacheComponents\": false,\n \"next\": \"16.4.2\",\n \"nextVersionPolicy\": \"exact\",\n \"node\": \"24.x\",\n \"packageManager\": \"npm@11.14.1\",\n \"react\": \"19.2.8\",\n \"reactDom\": \"19.2.8\",\n \"router\": \"app\",\n \"sharp\": \"0.35.5\",\n \"typescript\": \"6.0.3\"\n },\n \"schemaVersion\": \"brandlab.runtime-release-contract.v1\"\n},\n) as unknown as BrandlabRuntimeReleaseContract;\n\nvalidateBrandlabRuntimeReleaseContract(BRANDLAB_CURRENT_RUNTIME_RELEASE);\n"]}
1
+ {"version":3,"file":"current-release.js","sourceRoot":"","sources":["../src/current-release.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,wEAAwE;AACxE,OAAO,EAEL,sCAAsC,GACvC,MAAM,uBAAuB,CAAC;AAE/B,MAAM,CAAC,MAAM,gCAAgC,GAAG,MAAM,CAAC,MAAM,CAC7D;IACE,cAAc,EAAE;QACd,uCAAuC;QACvC,8BAA8B;QAC9B,yBAAyB;QACzB,6BAA6B;QAC7B,0BAA0B;QAC1B,4BAA4B;QAC5B,kCAAkC;QAClC,wCAAwC;QACxC,yBAAyB;KAC1B;IACD,WAAW,EAAE;QACX,WAAW,EAAE,cAAc;QAC3B,cAAc,EAAE,iBAAiB;QACjC,eAAe,EAAE,mBAAmB;QACpC,SAAS,EAAE,YAAY;QACvB,KAAK,EAAE,QAAQ;KAChB;IACD,MAAM,EAAE,mCAAmC;IAC3C,UAAU,EAAE;QACV,+BAA+B,EAAE;YAC/B,SAAS,EAAE,QAAQ;SACpB;QACD,iCAAiC,EAAE;YACjC,SAAS,EAAE,QAAQ;SACpB;QACD,6BAA6B,EAAE;YAC7B,SAAS,EAAE,QAAQ;SACpB;QACD,6BAA6B,EAAE;YAC7B,SAAS,EAAE,QAAQ;SACpB;KACF;IACD,gBAAgB,EAAE,QAAQ;IAC1B,SAAS,EAAE;QACT,SAAS,EAAE,WAAW;QACtB,iBAAiB,EAAE,KAAK;QACxB,MAAM,EAAE,QAAQ;QAChB,mBAAmB,EAAE,OAAO;QAC5B,MAAM,EAAE,MAAM;QACd,gBAAgB,EAAE,aAAa;QAC/B,OAAO,EAAE,QAAQ;QACjB,UAAU,EAAE,QAAQ;QACpB,QAAQ,EAAE,KAAK;QACf,OAAO,EAAE,QAAQ;QACjB,YAAY,EAAE,OAAO;KACtB;IACD,eAAe,EAAE,sCAAsC;CACxD,CAC6C,CAAC;AAE/C,sCAAsC,CAAC,gCAAgC,CAAC,CAAC","sourcesContent":["// Generated by standards/scripts/generate-conformance-current-release.mjs.\n// Each exact package release verifies its own current runtime contract.\nimport {\n type BrandlabRuntimeReleaseContract,\n validateBrandlabRuntimeReleaseContract,\n} from \"./release-manifest.js\";\n\nexport const BRANDLAB_CURRENT_RUNTIME_RELEASE = Object.freeze(\n{\n \"capabilities\": [\n \"typed-project-business-and-route-data\",\n \"essential-search-foundations\",\n \"shared-contact-delivery\",\n \"privacy-safe-lead-analytics\",\n \"security-patched-runtime\",\n \"live-google-review-summary\",\n \"high-signal-project-verification\",\n \"packed-positive-and-negative-consumers\",\n \"changesets-oidc-release\"\n ],\n \"contracts\": {\n \"analytics\": \"analytics-v4\",\n \"architecture\": \"architecture-v7\",\n \"configuration\": \"project-config-v7\",\n \"contact\": \"contact-v4\",\n \"seo\": \"seo-v4\"\n },\n \"kind\": \"brandlab-runtime-release-contract\",\n \"packages\": {\n \"@brandlab-digital/conformance\": {\n \"version\": \"3.15.0\"\n },\n \"@brandlab-digital/eslint-plugin\": {\n \"version\": \"3.15.0\"\n },\n \"@brandlab-digital/site-core\": {\n \"version\": \"3.15.0\"\n },\n \"@brandlab-digital/site-next\": {\n \"version\": \"3.15.0\"\n }\n },\n \"releaseVersion\": \"3.15.0\",\n \"runtime\": {\n \"bundler\": \"turbopack\",\n \"cacheComponents\": false,\n \"next\": \"16.4.2\",\n \"nextVersionPolicy\": \"exact\",\n \"node\": \"24.x\",\n \"packageManager\": \"npm@11.14.1\",\n \"react\": \"19.2.8\",\n \"reactDom\": \"19.2.8\",\n \"router\": \"app\",\n \"sharp\": \"0.35.5\",\n \"typescript\": \"6.0.3\"\n },\n \"schemaVersion\": \"brandlab.runtime-release-contract.v1\"\n},\n) as unknown as BrandlabRuntimeReleaseContract;\n\nvalidateBrandlabRuntimeReleaseContract(BRANDLAB_CURRENT_RUNTIME_RELEASE);\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"engineering.d.ts","sourceRoot":"","sources":["../src/engineering.ts"],"names":[],"mappings":"AAqBA,eAAO,MAAM,yBAAyB,sGAAuG,CAAC;AAE9I,oFAAoF;AACpF,eAAO,MAAM,+BAA+B,4IAC+F,CAAC;AAE5I,iFAAiF;AACjF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CASrE,CAAC;AAEH,MAAM,MAAM,0BAA0B,GAAG,SAAS,GAAG,MAAM,CAAC;AAC5D,MAAM,WAAW,kBAAkB;IAAG,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,0BAA0B,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE;AACxI,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,QAAQ,EAAE,kBAAkB,EAAE,CAAC;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,mBAAmB,EAAE,SAAS,MAAM,EAA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wB,SAAS,CAAC;AAC/C;;;;;GAKG;AACH,eAAO,MAAM,8BAA8B,iOAC6K,CAAC;AAqBzN,iGAAiG;AACjG,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,MAAM,GAAG,gBAAgB,CAyBxE;AAwCD,uDAAuD;AACvD,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CAE3D;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GAAG,MAAM,EAAE,GAAG,IAAI,CA2B5G"}
@@ -20,7 +20,14 @@ export const BRANDLAB_EXPECTED_SCRIPTS = Object.freeze({
20
20
  'check:unused:production': 'knip --production',
21
21
  'check:standards': 'brandlab-verify --mode ci --engineering',
22
22
  });
23
- const SRC_DIRECTORIES = new Set(['app', 'config', 'data', 'content', 'lib', 'components', 'types']);
23
+ const SRC_DIRECTORIES = new Set(['app', 'config', 'data', 'content', 'lib', 'components', 'types', 'site']);
24
+ /**
25
+ * The Site System v2 skin folder (3.15.0; ui-kit README "How a site uses it"): the site's tokens, skin, thin wrappers
26
+ * and bound quote form keep their documented names, and its own sections live in `signature/` and `decoration/`.
27
+ * Any other file in it follows the usual naming rules.
28
+ */
29
+ const SITE_SKIN_FILES = new Set(['tokens.css', 'skin.ts', 'skin.css', 'ui.tsx', 'quote-form.tsx', 'copy.ts', 'icons.ts', 'shell.ts']);
30
+ const SITE_SKIN_DIRECTORIES = new Set(['signature', 'decoration']);
24
31
  const SRC_ROOT_FILES = /^(?:instrumentation(?:-client)?|proxy|mdx-components)\.(?:ts|tsx)$/;
25
32
  const COMPONENT_ROLES = new Set(['layout', 'ui', 'sections', 'features', 'page-families']);
26
33
  const TEST_DIRECTORIES = new Set(['config', 'data', 'lib', 'components', 'e2e', 'support']);
@@ -248,7 +255,14 @@ function inspectLayout(root, capabilities, add) {
248
255
  }
249
256
  if (entry.isFile() && SRC_ROOT_FILES.test(entry.name))
250
257
  continue;
251
- add(path, 'standard-layout', `${path} is outside the standard layout (src/{app,config,data,content,lib,components}).`);
258
+ add(path, 'standard-layout', `${path} is outside the standard layout (src/{app,config,data,content,lib,components,site}).`);
259
+ }
260
+ }
261
+ if (isDirectory(join(root, 'src/site'))) {
262
+ for (const entry of readdirSync(join(root, 'src/site'), { withFileTypes: true })) {
263
+ if (entry.isDirectory() && !entry.name.startsWith('.') && !SITE_SKIN_DIRECTORIES.has(entry.name)) {
264
+ add(`src/site/${entry.name}`, 'standard-layout', 'src/site holds the skin files and the signature/ and decoration/ folders only.');
265
+ }
252
266
  }
253
267
  }
254
268
  if (isDirectory(join(root, 'src/components'))) {
@@ -268,6 +282,8 @@ function inspectFileName(root, path, add) {
268
282
  const directory = posix.dirname(path);
269
283
  if (directory === 'src' && SRC_ROOT_FILES.test(name))
270
284
  return;
285
+ if (directory === 'src/site' && SITE_SKIN_FILES.has(name))
286
+ return;
271
287
  if (name.endsWith('.module.css')) {
272
288
  const component = name.replace(/\.module\.css$/, '');
273
289
  // Exact names from the directory listing: existsSync is case-insensitive on macOS but not on the Linux CI
@@ -1 +1 @@
1
- {"version":3,"file":"engineering.js","sourceRoot":"","sources":["../src/engineering.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC1E,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EACL,qBAAqB,EACrB,4BAA4B,EAC5B,iBAAiB,EACjB,WAAW,EACX,UAAU,EACV,oBAAoB,EACpB,mBAAmB,EACnB,uBAAuB,EACvB,gBAAgB,GAGjB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,oBAA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AC,OAAO,EAAE,CAAC;QACb,IAAI,CAAC;YAAC,OAAO,GAAG,IAAI,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC;QAAC,CAAC;QAAC,MAAM,CAAC;YAAC,OAAO,GAAG,IAAI,GAAG,EAAE,CAAC;QAAC,CAAC;QAC5E,iBAAiB,CAAC,GAAG,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACvC,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,SAAS,YAAY,CAAC,IAAY;IAChC,OAAO,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AAC9D,CAAC","sourcesContent":["import { existsSync, readdirSync, readFileSync, statSync } from 'node:fs';\nimport { join, posix } from 'node:path';\nimport ts from 'typescript';\nimport { globMatch } from './glob.js';\nimport {\n collectBrandlabSource,\n createBrandlabModuleResolver,\n findImportedCalls,\n isDirectory,\n lineOfNode,\n listModuleReferences,\n objectPropertyValue,\n parseBrandlabSourceFile,\n walkProjectFiles,\n type BrandlabSourceFile,\n type BrandlabSourceIndex,\n} from './source-files.js';\nimport { describeCapabilities } from './static-rules.js';\nimport { originRegionProblems } from './origin-region.js';\nimport { parseProjectHosting } from './site-system/config.js';\n\nexport const ENGINEERING_FAST_COMMANDS = ['typecheck', 'lint', 'test', 'check:unused', 'check:unused:production', 'check:standards'] as const;\n\n/** The exact fast verification command from the Brandlab 3.0 target (section 6). */\nexport const BRANDLAB_EXPECTED_VERIFY_SCRIPT =\n 'npm run check:standards && npm run typecheck && npm run lint && npm run test && npm run check:unused && npm run check:unused:production';\n\n/** Scripts whose exact values the 3.0 target fixes; dev and start must exist. */\nexport const BRANDLAB_EXPECTED_SCRIPTS: Readonly<Record<string, string>> = Object.freeze({\n build: 'next build',\n typecheck: 'next typegen && tsc --noEmit',\n lint: 'eslint .',\n test: 'vitest run',\n 'test:e2e': 'playwright test',\n 'check:unused': 'knip',\n 'check:unused:production': 'knip --production',\n 'check:standards': 'brandlab-verify --mode ci --engineering',\n});\n\nexport type EngineeringFindingSeverity = 'blocker' | 'info';\nexport interface EngineeringFinding { path: string; rule: string; message: string; severity: EngineeringFindingSeverity; line?: number }\nexport interface EngineeringCheck {\n status: 'pass' | 'blocked';\n findings: EngineeringFinding[];\n coverage: string;\n outstandingEvidence: readonly string[];\n}\n\ninterface PackageManifest {\n type?: string;\n scripts?: Record<string, string>;\n dependencies?: Record<string, string>;\n devDependencies?: Record<string, string>;\n}\n\nconst SRC_DIRECTORIES = new Set(['app', 'config', 'data', 'content', 'lib', 'components', 'types']);\nconst SRC_ROOT_FILES = /^(?:instrumentation(?:-client)?|proxy|mdx-components)\\.(?:ts|tsx)$/;\nconst COMPONENT_ROLES = new Set(['layout', 'ui', 'sections', 'features', 'page-families']);\nconst TEST_DIRECTORIES = new Set(['config', 'data', 'lib', 'components', 'e2e', 'support']);\nconst RETIRED_ROOT_DIRECTORIES = ['app', 'components', 'data', 'lib', 'config', 'content', 'hooks', 'context', 'utils', 'src/components/templates'];\nconst DEV_TOOLING = ['eslint', 'vitest', '@playwright/test', 'knip'];\nconst NEXT_SPECIAL_FILE = /^(?:page|layout|template|loading|error|global-error|not-found|global-not-found|forbidden|unauthorized|default|route|opengraph-image|twitter-image|icon|apple-icon|sitemap|robots|manifest)\\.(?:ts|tsx|js|jsx|mdx)$/;\nconst CODE_OR_STYLE = /\\.(?:[cm]?[jt]sx?|mdx|css)$/;\nconst PASCAL_COMPONENT = /^[A-Z][A-Za-z0-9]*\\.tsx$/;\nconst CAMEL_MODULE = /^[a-z][A-Za-z0-9]*(?:\\.d)?\\.ts$/;\nconst SEMVER = /^\\d+\\.\\d+\\.\\d+(?:-[0-9A-Za-z.-]+)?$/;\n\n/**\n * The default Vercel function region (3.2.1): Sydney. From 3.13.0 a site may record another in brandlab.config.ts\n * (`hosting.originRegion`) with an origin-region-v1 decision; `vercel.json` regions must equal the recorded value.\n */\nexport const BRANDLAB_FUNCTION_REGION = 'syd1';\n/**\n * The Vercel ignored build step of every Brandlab site (3.3.3). Exit 0 skips a deployment, anything else builds it:\n * a production deployment is skipped only when git shows every change since the last successful production\n * deployment is in .github/, docs/ or a root Markdown file. Previews, a redeploy of the same commit, a missing or\n * unknown previous commit and any git error all build. brandlab-migrate S10 writes the same command.\n */\nexport const BRANDLAB_VERCEL_IGNORE_COMMAND =\n `[ \"$VERCEL_ENV\" = production ] && [ \"$VERCEL_GIT_PREVIOUS_SHA\" != \"$VERCEL_GIT_COMMIT_SHA\" ] && git diff --quiet \"$VERCEL_GIT_PREVIOUS_SHA\" HEAD -- . ':!.github' ':!docs' ':(exclude,glob)*.md' && exit 0 || exit 1`;\n/** The contact route's delivery options (labels, email style, attachment policy): server-only (3.2.1). */\nconst CONTACT_RUNTIME = 'src/config/contactRuntime.ts';\n/** The business facts' evidence (defineBrandlabBusiness): server-only (3.2.1). */\nconst BUSINESS_EVIDENCE = 'src/data/businessEvidence.ts';\nconst BUSINESS_VALUES = 'src/data/business.ts';\nconst SITE_IDENTITY = 'src/config/site.ts';\nconst BUSINESS_FACT_CALLS = /\\b(?:defineBrandlabBusiness|verifiedFact|unknownFact|notApplicableFact)\\s*\\(/;\nconst GEOGRAPHY_ENTRY = '@brandlab-digital/site-core/geography';\n/**\n * Package entries a browser bundle cannot resolve from 3.3.3 (their exports map `browser` to null): the geography\n * registries and website-location policies, which the location estate reads, and the server halves of contact and reviews\n * (3.5.0 adds the Business Profile reviews feed client).\n */\nconst SERVER_PACKAGE_ENTRIES: ReadonlyMap<string, string> = new Map([\n [GEOGRAPHY_ENTRY, 'The Brandlab geography registry and website-location policy (server data, about 190 KB)'],\n ['@brandlab-digital/site-next/contact/server', 'The contact route runtime'],\n ['@brandlab-digital/site-next/google-reviews/server', 'The Google reviews route runtime'],\n ['@brandlab-digital/site-next/google-business-reviews/server', 'The Business Profile reviews feed client (it reads the feed token)'],\n]);\n\n/** Opt-in structural check. Static success must never masquerade as whole-project acceptance. */\nexport function checkEngineeringStructure(root: string): EngineeringCheck {\n directoryListings.clear();\n const findings: EngineeringFinding[] = [];\n const add = (path: string, rule: string, message: string, extra: { severity?: EngineeringFindingSeverity; line?: number } = {}) =>\n findings.push({ path, rule, message, severity: extra.severity ?? 'blocker', ...(extra.line ? { line: extra.line } : {}) });\n let pkg: PackageManifest = {};\n try { pkg = JSON.parse(readFileSync(join(root, 'package.json'), 'utf8')); }\n catch { add('package.json', 'package-readable', 'A readable package.json is required.'); }\n const config = existsSync(join(root, 'brandlab.config.ts')) ? readFileSync(join(root, 'brandlab.config.ts'), 'utf8') : null;\n const capabilities = describeCapabilities(root, config);\n\n const source = collectBrandlabSource(root);\n\n inspectCommands(pkg, add);\n inspectDependencies(pkg, add);\n inspectLayout(root, capabilities, add);\n inspectSourceModules(root, source, add);\n inspectServerBoundaries(root, capabilities, source, add);\n inspectTests(root, capabilities, add);\n inspectToolPresets(root, add);\n inspectDelivery(root, add, config);\n\n return { status: findings.some(finding => finding.severity === 'blocker') ? 'blocked' : 'pass', findings,\n coverage: 'Static layout, naming, command, dependency-pin, tool-preset, CI, deployment and documentation structure only. This is not engineering-standard completion.',\n outstandingEvidence: ['Usage and deletion review including assets, configuration and dynamic references', 'Business data and component/style ownership review', 'Clean install, fast checks and production build', 'Full discovered technical URL estate', 'All distinct page families and important browser journeys', 'Exact-source protected Preview', 'Reporting/Ads provider cutover and authorised production verification'] };\n}\n\ntype Add = (path: string, rule: string, message: string, extra?: { severity?: EngineeringFindingSeverity; line?: number }) => void;\n\n// --- commands (section 6) ----------------------------------------------------\n\nfunction inspectCommands(pkg: PackageManifest, add: Add) {\n const scripts = pkg.scripts ?? {};\n for (const command of ['dev', 'start', ...ENGINEERING_FAST_COMMANDS, 'verify', 'build', 'test:e2e']) {\n if (!scripts[command]?.trim()) add('package.json', 'command-contract', `Missing ${command} command.`);\n }\n for (const [name, expected] of Object.entries(BRANDLAB_EXPECTED_SCRIPTS)) {\n const actual = scripts[name]?.trim();\n if (actual && actual.replace(/\\s+/g, ' ') !== expected) {\n add('package.json', 'script-contract', `${name} must be exactly \"${expected}\" (found \"${actual}\").`);\n }\n }\n const verify = scripts.verify?.trim();\n if (verify) {\n const unrecognised = splitCommandChain(verify).filter(segment => scriptReferences(segment, scripts) === null);\n if (unrecognised.length > 0) {\n add('package.json', 'verification-command-form',\n `verify may only chain package scripts (npm run <script>, npm test, run-s, run-p); \"${unrecognised.join('\", \"')}\" is not recognised. Expected \"${BRANDLAB_EXPECTED_VERIFY_SCRIPT}\".`);\n }\n }\n const reachable = new Set<string>();\n const visit = (name: string) => {\n if (reachable.has(name)) return;\n reachable.add(name);\n for (const segment of splitCommandChain(scripts[name] ?? '')) {\n for (const reference of scriptReferences(segment, scripts) ?? []) visit(reference);\n }\n };\n visit('verify');\n for (const command of ENGINEERING_FAST_COMMANDS) {\n if (!reachable.has(command)) add('package.json', 'verification-wiring', `verify must execute ${command}. Expected \"${BRANDLAB_EXPECTED_VERIFY_SCRIPT}\".`);\n }\n if (reachable.has('build')) add('package.json', 'single-build', 'Keep the production build separate from fast verify; run it once for the final candidate.');\n}\n\n/** Split a shell command on its chaining operators. */\nexport function splitCommandChain(command: string): string[] {\n return command.split(/&&|\\|\\||[;|&]/).map(segment => segment.trim()).filter(Boolean);\n}\n\n/**\n * The package scripts one command segment runs, or null when the segment is\n * not a recognised script invocation (npm run, npm test, run-s, run-p, npm-run-all).\n */\nexport function scriptReferences(segment: string, scripts: Readonly<Record<string, string>>): string[] | null {\n const words = segment.split(/\\s+/).filter(Boolean);\n while (words[0] && /^[A-Z_][A-Z0-9_]*=/.test(words[0])) words.shift();\n const [tool, ...rest] = words;\n if (tool === 'npm') {\n const [subcommand, ...args] = rest;\n if (subcommand === 'test' || subcommand === 't') return ['test'];\n if (subcommand === 'start' || subcommand === 'stop' || subcommand === 'restart') return [subcommand];\n if (subcommand === 'run' || subcommand === 'run-script') {\n const name = args.find(arg => !arg.startsWith('-'));\n return name ? [name] : null;\n }\n return null;\n }\n if (tool === 'run-s' || tool === 'run-p' || tool === 'npm-run-all') {\n const patterns: string[] = [];\n for (const word of rest) {\n if (word === '--') break;\n if (!word.startsWith('-')) patterns.push(word.replace(/^['\"]|['\"]$/g, ''));\n }\n if (patterns.length === 0) return null;\n // npm-run-all globs: `*` stays within one `:` segment; a whole `**` segment spans several.\n return patterns.flatMap(pattern => pattern.includes('*') || pattern.includes('?') || pattern.includes('[')\n ? Object.keys(scripts).filter(name => globMatch(pattern, name, { separator: ':', globstar: true }))\n : [pattern]);\n }\n return null;\n}\n\n// --- dependencies (section 1) ------------------------------------------------\n\nfunction inspectDependencies(pkg: PackageManifest, add: Add) {\n if (pkg.type !== 'module') add('package.json', 'module-type', 'Declare \"type\": \"module\".');\n const dependencies = { ...pkg.dependencies, ...pkg.devDependencies };\n for (const tool of DEV_TOOLING) {\n const spec = pkg.devDependencies?.[tool];\n if (!spec || !SEMVER.test(spec)) add('package.json', 'dev-tooling', `Pin ${tool} exactly as a development dependency.`);\n }\n // Packed preflight binds the four Brandlab packages to local file: archives; the evaluator verifies those.\n const ranges = Object.entries(dependencies)\n .filter(([name, spec]) => !SEMVER.test(spec) && !(name.startsWith('@brandlab-digital/') && spec.startsWith('file:')))\n .map(([name, spec]) => `${name}@${spec}`);\n if (ranges.length > 0) add('package.json', 'exact-pins', `Pin every dependency to the exact locked version: ${ranges.sort().join(', ')}.`);\n const next = dependencies.next;\n for (const companion of ['eslint-config-next', '@next/mdx']) {\n const spec = dependencies[companion];\n if (spec && spec !== next) add('package.json', 'framework-companion-pin', `${companion} must equal the next version (${next ?? 'missing'}); found ${spec}.`);\n }\n if (!dependencies['eslint-config-next']) add('package.json', 'framework-companion-pin', 'Declare eslint-config-next at the exact next version for brandlab.configs.next.');\n if (pkg.dependencies?.sharp || pkg.devDependencies?.sharp) add('package.json', 'sharp-override-only', 'Remove the direct sharp dependency; the release-owned overrides.sharp pin is the only declaration.');\n}\n\n// --- layout and naming (section 2) --------------------------------------------\n\nfunction inspectLayout(root: string, capabilities: ReturnType<typeof describeCapabilities>, add: Add) {\n for (const path of ['src/app', 'src/config', 'src/data', 'src/lib', 'src/components', 'tests']) {\n if (!isDirectory(join(root, path))) add(path, 'source-organisation', `Place the corresponding implementation under ${path}.`);\n }\n for (const path of RETIRED_ROOT_DIRECTORIES) {\n if (existsSync(join(root, path))) add(path, 'retired-source-layout', 'Migrate consumers to the current src responsibilities and remove the superseded directory.');\n }\n const required = [\n 'src/config/site.ts', 'src/config/analytics.ts', 'src/data/business.ts', 'src/data/routes.ts', 'src/data/redirects.ts',\n 'src/lib/seo/metadata.ts', 'src/instrumentation-client.ts', 'src/app/layout.tsx', 'src/app/robots.ts', 'src/app/sitemap.xml/route.ts',\n 'src/data/businessEvidence.ts',\n ...(capabilities.contactEnabled ? ['src/config/contact.ts', CONTACT_RUNTIME, 'src/app/api/contact/route.ts'] : []),\n ...(capabilities.reviewsEnabled ? ['src/config/reviews.ts'] : []),\n ...(capabilities.locationsDeclared ? ['src/data/locations/estate.ts'] : []),\n ];\n for (const path of required) {\n if (!existsSync(join(root, path))) add(path, 'owner-file', `The 3.0 layout places this owner at ${path}.`);\n }\n for (const [path, message] of [\n ['src/config/env.ts', 'Remove the local environment parser; site configuration is a source constant.'],\n ['src/lib/analytics', 'Remove the local analytics layer; installBrandlabInstrumentation owns it.'],\n ['src/lib/contact/definition.ts', 'Remove the local contact definition; the contract lives in src/config/contact.ts.'],\n ['src/lib/contact/constants.ts', 'Remove the local contact constants; the contract lives in src/config/contact.ts.'],\n ['src/lib/contact/runtime.ts', 'Remove the local contact runtime; POST uses createBrandlabContactRouteHandler.'],\n ['src/components/analytics/GoogleTag.tsx', 'Render BrandlabGoogleTag directly in src/app/layout.tsx.'],\n ['src/components/analytics/CoreWebVitalsReporter.tsx', 'Remove the web-vitals reporter.'],\n ['src/lib/seo/sitemaps', 'Remove the local sitemap builders; the sitemap route uses createBrandlabSitemapRoute.'],\n ['src/lib/seo/sitemaps.ts', 'Remove the local sitemap builders; the sitemap route uses createBrandlabSitemapRoute.'],\n ['src/lib/seo/schema/sanitize.ts', 'Remove the local schema sanitiser; the packages own sanitising.'],\n ['src/lib/seo/schema/SchemaScript.tsx', 'Import SchemaScript from @brandlab-digital/site-next/schema.'],\n ['src/lib/seo/index.ts', 'Remove the SEO barrel and import each module directly.'],\n ] as const) {\n if (existsSync(join(root, path))) add(path, 'retired-file', message);\n }\n\n if (isDirectory(join(root, 'src'))) {\n for (const entry of readdirSync(join(root, 'src'), { withFileTypes: true })) {\n if (entry.name.startsWith('.')) continue;\n const path = `src/${entry.name}`;\n if (entry.isDirectory() && SRC_DIRECTORIES.has(entry.name)) {\n if (entry.name === 'types' && walkProjectFiles(root, path).some(file => !file.endsWith('.d.ts'))) {\n add(path, 'standard-layout', 'src/types may hold only ambient .d.ts declarations.');\n }\n continue;\n }\n if (entry.isFile() && SRC_ROOT_FILES.test(entry.name)) continue;\n add(path, 'standard-layout', `${path} is outside the standard layout (src/{app,config,data,content,lib,components}).`);\n }\n }\n if (isDirectory(join(root, 'src/components'))) {\n for (const entry of readdirSync(join(root, 'src/components'), { withFileTypes: true })) {\n if (entry.name.startsWith('.') || entry.name === 'templates') continue;\n if (!entry.isDirectory() || !COMPONENT_ROLES.has(entry.name)) {\n add(`src/components/${entry.name}`, 'component-role', 'Components belong to one role: layout, ui, sections, features or page-families.');\n }\n }\n }\n for (const path of walkProjectFiles(root, 'src')) inspectFileName(root, path, add);\n}\n\nfunction inspectFileName(root: string, path: string, add: Add) {\n const name = posix.basename(path);\n const directory = posix.dirname(path);\n if (directory === 'src' && SRC_ROOT_FILES.test(name)) return;\n if (name.endsWith('.module.css')) {\n const component = name.replace(/\\.module\\.css$/, '');\n // Exact names from the directory listing: existsSync is case-insensitive on macOS but not on the Linux CI\n // (a button.module.css beside Button.tsx passed locally and failed in CI).\n const siblings = directoryEntries(join(root, directory));\n if (!['tsx', 'ts', 'jsx'].some(extension => siblings.has(`${component}.${extension}`))) {\n add(path, 'file-naming', `Keep ${name} beside the ${component} component it styles (the file names must match exactly, including case).`);\n }\n return;\n }\n if (path.startsWith('src/app/')) {\n // Images, fonts and metadata assets are framework-consumed; only code and styles are placed.\n if (!CODE_OR_STYLE.test(name)) return;\n const segments = path.split('/');\n const privateFolder = segments.slice(2, -1).find(segment => segment.startsWith('_') && segment !== '_components');\n if (privateFolder) {\n add(path, 'route-local-code', `Route-local code belongs in src/app/<route>/_components/, not ${privateFolder}/.`);\n return;\n }\n if (!segments.includes('_components')) {\n if (NEXT_SPECIAL_FILE.test(name) || path === 'src/app/globals.css') return;\n add(path, 'route-local-code', 'Route-local code belongs in src/app/<route>/_components/; framework files keep their reserved names.');\n return;\n }\n }\n if (!/\\.(?:ts|tsx)$/.test(name) || path.startsWith('src/content/')) return;\n if (name.endsWith('.tsx') && !PASCAL_COMPONENT.test(name)) {\n add(path, 'file-naming', 'Components use PascalCase .tsx file names.');\n } else if (name.endsWith('.ts') && !CAMEL_MODULE.test(name)) {\n add(path, 'file-naming', 'Data and helper modules use camelCase .ts file names.');\n }\n if (path.startsWith('src/components/page-families/') && name.endsWith('.tsx') && !/^[A-Z][A-Za-z0-9]*Page\\.tsx$/.test(name)) {\n add(path, 'file-naming', 'Page families are named <RouteKind>Page.tsx.');\n }\n}\n\n// --- module structure: barrels, ui data imports, estate ----------------------\n\nfunction inspectSourceModules(root: string, source: BrandlabSourceIndex, add: Add) {\n const resolver = createBrandlabModuleResolver(root, new Set(source.byPath.keys()));\n for (const file of source.files.filter(candidate => candidate.path.startsWith('src/'))) {\n const references = listModuleReferences(file);\n const forwarding = forwardingExports(file);\n if (isBarrel(file)) {\n add(file.path, 'no-barrels', 'This module only re-exports other modules; import each owner directly.');\n } else {\n for (const line of forwarding) {\n add(file.path, 'no-forwarding-exports', 'This export forwards another module; import the owner directly.', { line });\n }\n }\n if (file.path.startsWith('src/components/ui/')) {\n for (const reference of references.filter(candidate => candidate.kind !== 'export')) {\n const resolved = resolver(file.path, reference.specifier);\n if (resolved?.startsWith('src/data/') || /^@\\/data(?:\\/|$)/.test(reference.specifier)) {\n add(file.path, 'ui-imports-data', 'UI primitives never import data modules; pass prepared props from a section or route.', { line: reference.line });\n }\n }\n }\n inspectRegistryDerivedEstate(file, add);\n }\n const estate = source.byPath.get('src/data/locations/estate.ts');\n if (estate) {\n inspectRetainedExclusions(estate, add);\n inspectSiteOwnedLocations(estate, add);\n }\n}\n\n// --- server-only boundaries (3.2.1) ------------------------------------------\n\n/**\n * What a browser bundle must never carry. The contact route's delivery options and\n * the business evidence live in server-only modules, alias hosts in next.config, and\n * no module a client component reaches imports a server-only module or holds an\n * evidence record. (Next's build also refuses a client import of `server-only`; this\n * names the chain before a build is needed.) From 3.3.3 no module a client component\n * reaches imports the geography registry (site-core/geography, which the location\n * estate reads) or a package server entry: a browser bundle cannot resolve them.\n */\nfunction inspectServerBoundaries(\n root: string,\n capabilities: ReturnType<typeof describeCapabilities>,\n source: BrandlabSourceIndex,\n add: Add,\n) {\n const contact = source.byPath.get('src/config/contact.ts');\n const runtime = source.byPath.get(CONTACT_RUNTIME);\n if (capabilities.contactEnabled && runtime) {\n if (!importsServerOnly(runtime)) {\n add(CONTACT_RUNTIME, 'server-only-module', `${CONTACT_RUNTIME} imports 'server-only', so no client component can bundle the delivery options.`);\n }\n if (!declaresName(runtime, 'contactRuntime')) {\n add(CONTACT_RUNTIME, 'contact-runtime', `${CONTACT_RUNTIME} exports contactRuntime (the labels, email style and attachment policy createBrandlabContactRouteHandler takes).`);\n }\n }\n const moved = contact ? declaresName(contact, 'contactRuntime') : undefined;\n if (contact && moved) {\n add('src/config/contact.ts', 'contact-runtime', `contactRuntime belongs in ${CONTACT_RUNTIME}: the contact form imports src/config/contact.ts, so everything contactRuntime reads (the site identity, business data) reaches the browser.`, { line: moved });\n }\n\n const evidence = source.byPath.get(BUSINESS_EVIDENCE);\n if (evidence) {\n if (!importsServerOnly(evidence)) {\n add(BUSINESS_EVIDENCE, 'server-only-module', `${BUSINESS_EVIDENCE} imports 'server-only', so no client component can bundle the evidence records.`);\n }\n if (findImportedCalls(evidence, /^@brandlab-digital\\/site-core\\/business$/, 'defineBrandlabBusiness').length === 0) {\n add(BUSINESS_EVIDENCE, 'business-evidence', `${BUSINESS_EVIDENCE} declares the business facts with defineBrandlabBusiness, each with its evidence.`);\n }\n }\n const values = source.byPath.get(BUSINESS_VALUES);\n if (values) {\n const call = BUSINESS_FACT_CALLS.exec(values.executable);\n const record = evidenceRecordLines(values)[0];\n if (call || record) {\n add(BUSINESS_VALUES, 'business-evidence', `${BUSINESS_VALUES} holds the display values only (businessFacts); defineBrandlabBusiness and the evidence belong in ${BUSINESS_EVIDENCE}, which stays on the server.`,\n { line: record ?? lineAtIndex(values.text, call!.index) });\n }\n }\n\n const site = source.byPath.get(SITE_IDENTITY);\n const aliasHosts = site ? declaredAliasHosts(site) : undefined;\n if (aliasHosts) {\n add(SITE_IDENTITY, 'alias-hosts', 'Declare the alias hosts in next.config.ts with defineBrandlabNextConfig({ aliasHosts }): client components import the site identity, so its alias hosts reach the browser.', { line: aliasHosts });\n }\n\n const resolver = createBrandlabModuleResolver(root, new Set(source.byPath.keys()));\n const reached = new Map<string, string | null>();\n const queue = source.files.filter(file => file.path.startsWith('src/') && (isClientModule(file) || /^src\\/instrumentation-client\\.[cm]?[jt]sx?$/.test(file.path)));\n for (const file of queue) reached.set(file.path, null);\n while (queue.length > 0) {\n const file = queue.shift()!;\n for (const reference of listModuleReferences(file)) {\n if (reference.typeOnly) continue;\n const target = resolver(file.path, reference.specifier);\n if (!target || reached.has(target)) continue;\n reached.set(target, file.path);\n const next = source.byPath.get(target);\n if (next) queue.push(next);\n }\n }\n const chain = (path: string) => {\n const steps: string[] = [];\n for (let at: string | null | undefined = path; at; at = reached.get(at)) steps.unshift(at);\n return steps.join(' → ');\n };\n for (const path of [...reached.keys()].sort()) {\n const file = source.byPath.get(path);\n if (!file) continue;\n if (importsServerOnly(file)) {\n add(path, 'client-bundle-boundary', `A client component imports this server-only module (${chain(path)}); pass what it needs as props from a server component.`);\n continue;\n }\n const serverEntry = listModuleReferences(file).find(reference => !reference.typeOnly && SERVER_PACKAGE_ENTRIES.has(reference.specifier));\n if (serverEntry) {\n add(path, 'client-bundle-boundary', `${SERVER_PACKAGE_ENTRIES.get(serverEntry.specifier)} reaches the browser (${chain(path)} → ${serverEntry.specifier}), and from 3.3.3 a browser bundle cannot resolve it, so the build fails. ${serverEntry.specifier === GEOGRAPHY_ENTRY ? 'Build the location lists a client component shows (navigation, service areas) in a server component and pass them as plain props; keep error pages and the analytics binding free of location data.' : 'Keep it in server components and route handlers.'}`, { line: serverEntry.line });\n continue;\n }\n const record = evidenceRecordLines(file)[0];\n if (record) {\n add(path, 'client-bundle-boundary', `An evidence record (sourceKind, verifiedAt) reaches the browser (${chain(path)}); keep evidence in ${BUSINESS_EVIDENCE}.`, { line: record });\n }\n }\n}\n\n/** A module whose directive prologue says 'use client'. */\nfunction isClientModule(file: BrandlabSourceFile): boolean {\n for (const statement of parseBrandlabSourceFile(file).statements) {\n if (!ts.isExpressionStatement(statement) || !ts.isStringLiteral(statement.expression)) return false;\n if (statement.expression.text === 'use client') return true;\n }\n return false;\n}\n\n/** `import 'server-only'` at the top level. */\nfunction importsServerOnly(file: BrandlabSourceFile): boolean {\n return parseBrandlabSourceFile(file).statements.some(statement =>\n ts.isImportDeclaration(statement) && !statement.importClause &&\n ts.isStringLiteral(statement.moduleSpecifier) && statement.moduleSpecifier.text === 'server-only');\n}\n\n/** The line of a top-level declaration of `name`, if the module declares it. */\nfunction declaresName(file: BrandlabSourceFile, name: string): number | undefined {\n for (const statement of parseBrandlabSourceFile(file).statements) {\n if (ts.isVariableStatement(statement)) {\n for (const declaration of statement.declarationList.declarations) {\n if (ts.isIdentifier(declaration.name) && declaration.name.text === name) return lineOfNode(file, statement);\n }\n } else if ((ts.isFunctionDeclaration(statement) || ts.isClassDeclaration(statement)) && statement.name?.text === name) {\n return lineOfNode(file, statement);\n }\n }\n return undefined;\n}\n\n/** Lines of object literals that are evidence records: they name both sourceKind and verifiedAt. */\nfunction evidenceRecordLines(file: BrandlabSourceFile): number[] {\n const lines: number[] = [];\n const visit = (node: ts.Node) => {\n if (ts.isObjectLiteralExpression(node)) {\n const names = new Set(node.properties.map(property => property.name && (ts.isIdentifier(property.name) || ts.isStringLiteral(property.name)) ? property.name.text : ''));\n if (names.has('sourceKind') && names.has('verifiedAt')) lines.push(lineOfNode(file, node));\n }\n ts.forEachChild(node, visit);\n };\n visit(parseBrandlabSourceFile(file));\n return lines;\n}\n\n/** The line of a non-empty `aliasHosts` in the defineBrandlabSite call. */\nfunction declaredAliasHosts(file: BrandlabSourceFile): number | undefined {\n for (const call of findImportedCalls(file, /^@brandlab-digital\\/site-core\\/site$/, 'defineBrandlabSite')) {\n let definition: ts.Expression | undefined = call.arguments[0];\n while (definition && (ts.isAsExpression(definition) || ts.isSatisfiesExpression(definition) || ts.isParenthesizedExpression(definition))) {\n definition = definition.expression;\n }\n if (!definition || !ts.isObjectLiteralExpression(definition)) continue;\n const property = definition.properties.find(candidate =>\n (ts.isPropertyAssignment(candidate) || ts.isShorthandPropertyAssignment(candidate)) &&\n (ts.isIdentifier(candidate.name) || ts.isStringLiteral(candidate.name)) && candidate.name.text === 'aliasHosts');\n if (!property) continue;\n const array = ts.isPropertyAssignment(property)\n ? arrayLiteral(file, property.initializer)\n : ts.isShorthandPropertyAssignment(property) ? arrayLiteral(file, property.name) : undefined;\n if (array && array.elements.length === 0) continue;\n return lineOfNode(file, property);\n }\n return undefined;\n}\n\n/** Lines of `export ... from` statements and exports of names this module only imported. */\nfunction forwardingExports(file: BrandlabSourceFile): number[] {\n const source = parseBrandlabSourceFile(file);\n const imported = new Set(listModuleReferences(file).filter(reference => reference.kind === 'import').flatMap(reference => reference.bindings.map(binding => binding.local)));\n const lines: number[] = [];\n for (const statement of source.statements) {\n const forwards =\n (ts.isExportDeclaration(statement) && (statement.moduleSpecifier !== undefined ||\n (statement.exportClause !== undefined && ts.isNamedExports(statement.exportClause) &&\n statement.exportClause.elements.some(element => imported.has((element.propertyName ?? element.name).text))))) ||\n (ts.isExportAssignment(statement) && ts.isIdentifier(statement.expression) && imported.has(statement.expression.text));\n if (forwards) lines.push(lineOfNode(file, statement));\n }\n return lines;\n}\n\n/** A module with no declarations or statements of its own besides imports and exports. */\nfunction isBarrel(file: BrandlabSourceFile): boolean {\n const statements = parseBrandlabSourceFile(file).statements;\n return statements.length > 0 && forwardingExports(file).length > 0 &&\n statements.every(statement => ts.isImportDeclaration(statement) || ts.isExportDeclaration(statement) || ts.isExportAssignment(statement));\n}\n\nfunction inspectRegistryDerivedEstate(file: BrandlabSourceFile, add: Add) {\n const derived = listModuleReferences(file)\n .filter(reference => reference.kind === 'import' && /^@brandlab-digital\\/site-core\\//.test(reference.specifier))\n .flatMap(reference => reference.bindings.filter(binding => /WebsiteSuburbs$/.test(binding.imported)).map(binding => ({ ...binding, line: reference.line })));\n const namespaceUse = file.executable.match(/\\.\\s*([a-z][A-Za-z]*WebsiteSuburbs)\\b/);\n const first = derived[0] ?? (namespaceUse ? { imported: namespaceUse[1]!, line: lineAtIndex(file.text, namespaceUse.index ?? 0) } : null);\n if (!first) return;\n add(file.path, 'estate-registry-derived',\n `${first.imported} is a registry candidate list; the published estate in src/data/locations/estate.ts must be literal data, never derived from it.`, { line: first.line });\n}\n\nfunction inspectRetainedExclusions(file: BrandlabSourceFile, add: Add) {\n for (const call of findImportedCalls(file, /^@brandlab-digital\\/site-core\\/locations$/, 'defineLocationEstate')) {\n const retained = objectPropertyValue(call.arguments[0], 'retainedExclusions');\n if (!retained || !ts.isArrayLiteralExpression(retained) || retained.elements.length === 0) continue;\n const slugs = retained.elements.map(element => {\n if (ts.isStringLiteralLike(element)) return element.text;\n const slug = objectPropertyValue(element, 'slug');\n return slug && ts.isStringLiteralLike(slug) ? slug.text : null;\n }).filter((slug): slug is string => Boolean(slug));\n add(file.path, 'estate-retained-exclusions',\n `${retained.elements.length} policy-excluded location(s) stay published for a later SEO decision${slugs.length ? `: ${slugs.join(', ')}` : ''}.`,\n { severity: 'info', line: lineOfNode(file, retained) });\n }\n}\n\n/** An array literal, directly or through a top-level `const name = [...]` (optionally `as const`) in the same file. */\nfunction arrayLiteral(file: BrandlabSourceFile, node: ts.Expression | undefined): ts.ArrayLiteralExpression | undefined {\n const unwrap = (expression: ts.Expression | undefined): ts.Expression | undefined => {\n let current = expression;\n while (current && (ts.isAsExpression(current) || ts.isSatisfiesExpression(current) || ts.isParenthesizedExpression(current))) {\n current = current.expression;\n }\n return current;\n };\n const value = unwrap(node);\n if (value && ts.isArrayLiteralExpression(value)) return value;\n if (!value || !ts.isIdentifier(value)) return undefined;\n for (const statement of parseBrandlabSourceFile(file).statements) {\n if (!ts.isVariableStatement(statement)) continue;\n for (const declaration of statement.declarationList.declarations) {\n if (ts.isIdentifier(declaration.name) && declaration.name.text === value.text) {\n const initializer = unwrap(declaration.initializer);\n return initializer && ts.isArrayLiteralExpression(initializer) ? initializer : undefined;\n }\n }\n }\n return undefined;\n}\n\n/** Report the locations the site publishes outside the shared registry, with each group's reason. */\nfunction inspectSiteOwnedLocations(file: BrandlabSourceFile, add: Add) {\n for (const call of findImportedCalls(file, /^@brandlab-digital\\/site-core\\/locations$/, 'defineLocationEstate')) {\n const declared = objectPropertyValue(call.arguments[0], 'siteOwned');\n if (!declared) continue;\n const groups = arrayLiteral(file, declared);\n if (!groups) {\n add(file.path, 'estate-site-owned',\n 'siteOwned must be literal data in src/data/locations/estate.ts: [{ reason, slugs }], never derived.', { line: lineOfNode(file, declared) });\n continue;\n }\n if (groups.elements.length === 0) continue;\n let total = 0;\n const summaries = groups.elements.map(element => {\n const reason = objectPropertyValue(element, 'reason');\n const slugs = arrayLiteral(file, objectPropertyValue(element, 'slugs'));\n const count = slugs?.elements.length;\n total += count ?? 0;\n const label = reason && ts.isStringLiteralLike(reason) ? reason.text : 'a reason that is not a string literal';\n return `${count ?? 'an unknown number of'} for \"${label}\"`;\n });\n add(file.path, 'estate-site-owned',\n `${total} location(s) are published outside the shared geography registry, declared site-owned: ${summaries.join('; ')}.`,\n { severity: 'info', line: lineOfNode(file, groups) });\n }\n}\n\nfunction lineAtIndex(text: string, index: number): number {\n return text.slice(0, index).split('\\n').length;\n}\n\n// --- tests (sections 2 and 6) -------------------------------------------------\n\nfunction inspectTests(root: string, capabilities: ReturnType<typeof describeCapabilities>, add: Add) {\n if (!isDirectory(join(root, 'tests'))) return;\n for (const entry of readdirSync(join(root, 'tests'), { withFileTypes: true })) {\n if (entry.name.startsWith('.')) continue;\n if (!entry.isDirectory() || !TEST_DIRECTORIES.has(entry.name)) {\n add(`tests/${entry.name}`, 'test-layout', 'Tests live in tests/{config,data,lib,components,e2e,support}.');\n }\n }\n const required = [\n 'tests/data/routes.test.ts', 'tests/config/analytics.test.ts',\n 'tests/e2e/estate.spec.ts', 'tests/e2e/analytics.spec.ts', 'tests/e2e/families.spec.ts',\n ...(capabilities.contactEnabled ? ['tests/config/contact.test.ts', 'tests/e2e/contact.spec.ts'] : []),\n ];\n for (const path of required) {\n if (!existsSync(join(root, path))) add(path, 'shared-tests', `The shared 3.0 test set includes ${path}.`);\n }\n for (const path of walkProjectFiles(root, 'tests')) {\n if (/-darwin\\.png$/.test(path)) add(path, 'committed-snapshots', 'Delete committed darwin snapshots; rendered checks run against the CI build.');\n }\n}\n\n// --- dev presets (section 4) -------------------------------------------------\n\n/** The two accepted default exports: the plain preset, or the preset plus the Site System rules (same identifier twice). */\nconst ESLINT_PRESET_EXPORT = /export\\s+default\\s+(?:([A-Za-z_$][\\w$]*)\\.configs\\.next|\\[\\s*\\.\\.\\.\\s*([A-Za-z_$][\\w$]*)\\.configs\\.next\\s*,\\s*\\2\\.configs\\[\\s*(['\"])site-system\\3\\s*\\]\\s*,?\\s*\\])\\s*;?\\s*$/;\n\nfunction inspectToolPresets(root: string, add: Add) {\n const eslint = readOptional(join(root, 'eslint.config.mjs'));\n if (eslint === null) add('eslint.config.mjs', 'tool-preset', 'Add eslint.config.mjs: export default brandlab.configs.next.');\n else if (!/@brandlab-digital\\/eslint-plugin/.test(eslint) || !ESLINT_PRESET_EXPORT.test(eslint.trim())) {\n add('eslint.config.mjs', 'tool-preset', \"eslint.config.mjs is exactly `export default brandlab.configs.next`, or, for a site that declares a siteSystem tier, `export default [...brandlab.configs.next, brandlab.configs['site-system']]` (imported from @brandlab-digital/eslint-plugin).\");\n }\n const knip = readOptional(join(root, 'knip.ts'));\n if (knip === null) add('knip.ts', 'tool-preset', 'Add knip.ts: export default brandlabKnip({ mdx?, entry? }).');\n else if (!/@brandlab-digital\\/conformance\\/knip/.test(knip) || !/export\\s+default\\s+brandlabKnip\\s*\\(/.test(knip)) {\n add('knip.ts', 'tool-preset', 'knip.ts exports brandlabKnip({ mdx?, entry? }) from @brandlab-digital/conformance/knip.');\n }\n if (!['playwright.config.ts', 'playwright.config.mts'].some(name => existsSync(join(root, name)))) {\n add('playwright.config.ts', 'tool-preset', 'Add the Playwright configuration for the shared e2e specs.');\n }\n if (!['vitest.config.ts', 'vitest.config.mts'].some(name => existsSync(join(root, name)))) {\n add('vitest.config.ts', 'tool-preset', 'Add the Vitest configuration for the binding tests.');\n }\n}\n\n// --- CI, dependencies, Vercel and docs (section 6) ---------------------------\n\n/** A day before any decision, so a recorded decision's reviewBy never counts as passed. */\nconst ORIGIN_DECISION_NEVER_LAPSED = '0000-01-01';\n\nfunction inspectDelivery(root: string, add: Add, config: string | null) {\n const workflowDirectory = join(root, '.github/workflows');\n const workflows = isDirectory(workflowDirectory) ? readdirSync(workflowDirectory).filter(name => /\\.ya?ml$/.test(name)).sort() : [];\n // CI v2 (verify-next-v2.yml, 3.13.0) is the same verifier with draft, ready-for-review and merge depths.\n const callers = workflows.filter(name => /uses\\s*:\\s*['\"]?RomieDandan\\/brandlab\\/\\.github\\/workflows\\/verify-next(?:-v2)?\\.yml@/.test(readFileSync(join(workflowDirectory, name), 'utf8')));\n if (callers.length !== 1 || callers[0] !== 'verify.yml') {\n add('.github/workflows/verify.yml', 'ci-workflow', `Exactly one .github/workflows/verify.yml calls RomieDandan/brandlab/.github/workflows/verify-next.yml (or verify-next-v2.yml) at the fleet SHA (found ${callers.length ? callers.join(', ') : 'none'}).`);\n }\n for (const path of ['.github/dependabot.yml', '.github/dependabot.yaml', 'renovate.json', 'renovate.json5', '.github/renovate.json', '.renovaterc', '.renovaterc.json']) {\n if (existsSync(join(root, path))) add(path, 'dependency-bots', 'Exact pins move with Brandlab releases; remove Dependabot/Renovate version updates.');\n }\n const vercel = readOptional(join(root, 'vercel.json'));\n let installCommand: unknown;\n try { installCommand = vercel === null ? undefined : JSON.parse(vercel).installCommand; } catch { installCommand = undefined; }\n if (installCommand !== 'npm ci') add('vercel.json', 'vercel-install', 'vercel.json sets installCommand to \"npm ci\".');\n // W5 (3.13.0): the regions equal the recorded origin region, Sydney unless an origin-region-v1 decision says otherwise.\n // This check runs inside every site's `npm run verify`, so it never judges the date: a lapsed reviewBy must not stop\n // a build, a fix or a rollback. The lapse fails only the ready gate's W5 (as site-core's config validation does).\n const hosting = config === null ? undefined : parseProjectHosting(config);\n for (const problem of originRegionProblems({ hosting, vercelJson: vercel, today: ORIGIN_DECISION_NEVER_LAPSED })) {\n add(problem.startsWith('vercel.json') ? 'vercel.json' : 'brandlab.config.ts', 'vercel-region', problem);\n }\n let ignoreCommand: unknown;\n try { ignoreCommand = vercel === null ? undefined : JSON.parse(vercel).ignoreCommand; } catch { ignoreCommand = undefined; }\n if (ignoreCommand !== BRANDLAB_VERCEL_IGNORE_COMMAND) {\n add('vercel.json', 'vercel-ignore-build', `vercel.json skips a production build only when a push changes nothing but .github/, docs/ or root Markdown files: \"ignoreCommand\": ${JSON.stringify(BRANDLAB_VERCEL_IGNORE_COMMAND)} (found ${ignoreCommand === undefined ? 'none' : JSON.stringify(ignoreCommand)}). A CI-only change otherwise rebuilds production and empties its CDN cache; previews and anything git cannot compare still build.`);\n }\n\n if (!existsSync(join(root, 'README.md'))) add('README.md', 'project-docs', 'Add the generated README.md (commands, architecture, environment names, deployment and rollback).');\n const agents = join(root, 'AGENTS.md');\n if (!existsSync(agents)) add('AGENTS.md', 'project-docs', 'Add AGENTS.md with the fixed sources of truth and guardrails.');\n else if (statSync(agents).size > 3_584) add('AGENTS.md', 'project-docs', `AGENTS.md is ${statSync(agents).size} bytes; keep it to about 3 KB and archive history to the control repo.`);\n const claude = readOptional(join(root, 'CLAUDE.md'));\n if (claude === null || claude.trim() !== '@AGENTS.md') add('CLAUDE.md', 'project-docs', 'CLAUDE.md is the single line @AGENTS.md.');\n}\n\nconst directoryListings = new Map<string, ReadonlySet<string>>();\n\n/** The exact file names in a directory (cached per check run). */\nfunction directoryEntries(path: string): ReadonlySet<string> {\n let entries = directoryListings.get(path);\n if (!entries) {\n try { entries = new Set(readdirSync(path)); } catch { entries = new Set(); }\n directoryListings.set(path, entries);\n }\n return entries;\n}\n\nfunction readOptional(path: string): string | null {\n return existsSync(path) ? readFileSync(path, 'utf8') : null;\n}\n"]}
1
+ {"version":3,"file":"engineering.js","sourceRoot":"","sources":["../src/engineering.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC1E,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EACL,qBAAqB,EACrB,4BAA4B,EAC5B,iBAAiB,EACjB,WAAW,EACX,UAAU,EACV,oBAAoB,EACpB,mBAAmB,EACnB,uBAAuB,EACvB,gBAAgB,GAGjB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,M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readdirSync, readFileSync, statSync } from 'node:fs';\nimport { join, posix } from 'node:path';\nimport ts from 'typescript';\nimport { globMatch } from './glob.js';\nimport {\n collectBrandlabSource,\n createBrandlabModuleResolver,\n findImportedCalls,\n isDirectory,\n lineOfNode,\n listModuleReferences,\n objectPropertyValue,\n parseBrandlabSourceFile,\n walkProjectFiles,\n type BrandlabSourceFile,\n type BrandlabSourceIndex,\n} from './source-files.js';\nimport { describeCapabilities } from './static-rules.js';\nimport { originRegionProblems } from './origin-region.js';\nimport { parseProjectHosting } from './site-system/config.js';\n\nexport const ENGINEERING_FAST_COMMANDS = ['typecheck', 'lint', 'test', 'check:unused', 'check:unused:production', 'check:standards'] as const;\n\n/** The exact fast verification command from the Brandlab 3.0 target (section 6). */\nexport const BRANDLAB_EXPECTED_VERIFY_SCRIPT =\n 'npm run check:standards && npm run typecheck && npm run lint && npm run test && npm run check:unused && npm run check:unused:production';\n\n/** Scripts whose exact values the 3.0 target fixes; dev and start must exist. */\nexport const BRANDLAB_EXPECTED_SCRIPTS: Readonly<Record<string, string>> = Object.freeze({\n build: 'next build',\n typecheck: 'next typegen && tsc --noEmit',\n lint: 'eslint .',\n test: 'vitest run',\n 'test:e2e': 'playwright test',\n 'check:unused': 'knip',\n 'check:unused:production': 'knip --production',\n 'check:standards': 'brandlab-verify --mode ci --engineering',\n});\n\nexport type EngineeringFindingSeverity = 'blocker' | 'info';\nexport interface EngineeringFinding { path: string; rule: string; message: string; severity: EngineeringFindingSeverity; line?: number }\nexport interface EngineeringCheck {\n status: 'pass' | 'blocked';\n findings: EngineeringFinding[];\n coverage: string;\n outstandingEvidence: readonly string[];\n}\n\ninterface PackageManifest {\n type?: string;\n scripts?: Record<string, string>;\n dependencies?: Record<string, string>;\n devDependencies?: Record<string, string>;\n}\n\nconst SRC_DIRECTORIES = new Set(['app', 'config', 'data', 'content', 'lib', 'components', 'types', 'site']);\n/**\n * The Site System v2 skin folder (3.15.0; ui-kit README \"How a site uses it\"): the site's tokens, skin, thin wrappers\n * and bound quote form keep their documented names, and its own sections live in `signature/` and `decoration/`.\n * Any other file in it follows the usual naming rules.\n */\nconst SITE_SKIN_FILES = new Set(['tokens.css', 'skin.ts', 'skin.css', 'ui.tsx', 'quote-form.tsx', 'copy.ts', 'icons.ts', 'shell.ts']);\nconst SITE_SKIN_DIRECTORIES = new Set(['signature', 'decoration']);\nconst SRC_ROOT_FILES = /^(?:instrumentation(?:-client)?|proxy|mdx-components)\\.(?:ts|tsx)$/;\nconst COMPONENT_ROLES = new Set(['layout', 'ui', 'sections', 'features', 'page-families']);\nconst TEST_DIRECTORIES = new Set(['config', 'data', 'lib', 'components', 'e2e', 'support']);\nconst RETIRED_ROOT_DIRECTORIES = ['app', 'components', 'data', 'lib', 'config', 'content', 'hooks', 'context', 'utils', 'src/components/templates'];\nconst DEV_TOOLING = ['eslint', 'vitest', '@playwright/test', 'knip'];\nconst NEXT_SPECIAL_FILE = /^(?:page|layout|template|loading|error|global-error|not-found|global-not-found|forbidden|unauthorized|default|route|opengraph-image|twitter-image|icon|apple-icon|sitemap|robots|manifest)\\.(?:ts|tsx|js|jsx|mdx)$/;\nconst CODE_OR_STYLE = /\\.(?:[cm]?[jt]sx?|mdx|css)$/;\nconst PASCAL_COMPONENT = /^[A-Z][A-Za-z0-9]*\\.tsx$/;\nconst CAMEL_MODULE = /^[a-z][A-Za-z0-9]*(?:\\.d)?\\.ts$/;\nconst SEMVER = /^\\d+\\.\\d+\\.\\d+(?:-[0-9A-Za-z.-]+)?$/;\n\n/**\n * The default Vercel function region (3.2.1): Sydney. From 3.13.0 a site may record another in brandlab.config.ts\n * (`hosting.originRegion`) with an origin-region-v1 decision; `vercel.json` regions must equal the recorded value.\n */\nexport const BRANDLAB_FUNCTION_REGION = 'syd1';\n/**\n * The Vercel ignored build step of every Brandlab site (3.3.3). Exit 0 skips a deployment, anything else builds it:\n * a production deployment is skipped only when git shows every change since the last successful production\n * deployment is in .github/, docs/ or a root Markdown file. Previews, a redeploy of the same commit, a missing or\n * unknown previous commit and any git error all build. brandlab-migrate S10 writes the same command.\n */\nexport const BRANDLAB_VERCEL_IGNORE_COMMAND =\n `[ \"$VERCEL_ENV\" = production ] && [ \"$VERCEL_GIT_PREVIOUS_SHA\" != \"$VERCEL_GIT_COMMIT_SHA\" ] && git diff --quiet \"$VERCEL_GIT_PREVIOUS_SHA\" HEAD -- . ':!.github' ':!docs' ':(exclude,glob)*.md' && exit 0 || exit 1`;\n/** The contact route's delivery options (labels, email style, attachment policy): server-only (3.2.1). */\nconst CONTACT_RUNTIME = 'src/config/contactRuntime.ts';\n/** The business facts' evidence (defineBrandlabBusiness): server-only (3.2.1). */\nconst BUSINESS_EVIDENCE = 'src/data/businessEvidence.ts';\nconst BUSINESS_VALUES = 'src/data/business.ts';\nconst SITE_IDENTITY = 'src/config/site.ts';\nconst BUSINESS_FACT_CALLS = /\\b(?:defineBrandlabBusiness|verifiedFact|unknownFact|notApplicableFact)\\s*\\(/;\nconst GEOGRAPHY_ENTRY = '@brandlab-digital/site-core/geography';\n/**\n * Package entries a browser bundle cannot resolve from 3.3.3 (their exports map `browser` to null): the geography\n * registries and website-location policies, which the location estate reads, and the server halves of contact and reviews\n * (3.5.0 adds the Business Profile reviews feed client).\n */\nconst SERVER_PACKAGE_ENTRIES: ReadonlyMap<string, string> = new Map([\n [GEOGRAPHY_ENTRY, 'The Brandlab geography registry and website-location policy (server data, about 190 KB)'],\n ['@brandlab-digital/site-next/contact/server', 'The contact route runtime'],\n ['@brandlab-digital/site-next/google-reviews/server', 'The Google reviews route runtime'],\n ['@brandlab-digital/site-next/google-business-reviews/server', 'The Business Profile reviews feed client (it reads the feed token)'],\n]);\n\n/** Opt-in structural check. Static success must never masquerade as whole-project acceptance. */\nexport function checkEngineeringStructure(root: string): EngineeringCheck {\n directoryListings.clear();\n const findings: EngineeringFinding[] = [];\n const add = (path: string, rule: string, message: string, extra: { severity?: EngineeringFindingSeverity; line?: number } = {}) =>\n findings.push({ path, rule, message, severity: extra.severity ?? 'blocker', ...(extra.line ? { line: extra.line } : {}) });\n let pkg: PackageManifest = {};\n try { pkg = JSON.parse(readFileSync(join(root, 'package.json'), 'utf8')); }\n catch { add('package.json', 'package-readable', 'A readable package.json is required.'); }\n const config = existsSync(join(root, 'brandlab.config.ts')) ? readFileSync(join(root, 'brandlab.config.ts'), 'utf8') : null;\n const capabilities = describeCapabilities(root, config);\n\n const source = collectBrandlabSource(root);\n\n inspectCommands(pkg, add);\n inspectDependencies(pkg, add);\n inspectLayout(root, capabilities, add);\n inspectSourceModules(root, source, add);\n inspectServerBoundaries(root, capabilities, source, add);\n inspectTests(root, capabilities, add);\n inspectToolPresets(root, add);\n inspectDelivery(root, add, config);\n\n return { status: findings.some(finding => finding.severity === 'blocker') ? 'blocked' : 'pass', findings,\n coverage: 'Static layout, naming, command, dependency-pin, tool-preset, CI, deployment and documentation structure only. This is not engineering-standard completion.',\n outstandingEvidence: ['Usage and deletion review including assets, configuration and dynamic references', 'Business data and component/style ownership review', 'Clean install, fast checks and production build', 'Full discovered technical URL estate', 'All distinct page families and important browser journeys', 'Exact-source protected Preview', 'Reporting/Ads provider cutover and authorised production verification'] };\n}\n\ntype Add = (path: string, rule: string, message: string, extra?: { severity?: EngineeringFindingSeverity; line?: number }) => void;\n\n// --- commands (section 6) ----------------------------------------------------\n\nfunction inspectCommands(pkg: PackageManifest, add: Add) {\n const scripts = pkg.scripts ?? {};\n for (const command of ['dev', 'start', ...ENGINEERING_FAST_COMMANDS, 'verify', 'build', 'test:e2e']) {\n if (!scripts[command]?.trim()) add('package.json', 'command-contract', `Missing ${command} command.`);\n }\n for (const [name, expected] of Object.entries(BRANDLAB_EXPECTED_SCRIPTS)) {\n const actual = scripts[name]?.trim();\n if (actual && actual.replace(/\\s+/g, ' ') !== expected) {\n add('package.json', 'script-contract', `${name} must be exactly \"${expected}\" (found \"${actual}\").`);\n }\n }\n const verify = scripts.verify?.trim();\n if (verify) {\n const unrecognised = splitCommandChain(verify).filter(segment => scriptReferences(segment, scripts) === null);\n if (unrecognised.length > 0) {\n add('package.json', 'verification-command-form',\n `verify may only chain package scripts (npm run <script>, npm test, run-s, run-p); \"${unrecognised.join('\", \"')}\" is not recognised. Expected \"${BRANDLAB_EXPECTED_VERIFY_SCRIPT}\".`);\n }\n }\n const reachable = new Set<string>();\n const visit = (name: string) => {\n if (reachable.has(name)) return;\n reachable.add(name);\n for (const segment of splitCommandChain(scripts[name] ?? '')) {\n for (const reference of scriptReferences(segment, scripts) ?? []) visit(reference);\n }\n };\n visit('verify');\n for (const command of ENGINEERING_FAST_COMMANDS) {\n if (!reachable.has(command)) add('package.json', 'verification-wiring', `verify must execute ${command}. Expected \"${BRANDLAB_EXPECTED_VERIFY_SCRIPT}\".`);\n }\n if (reachable.has('build')) add('package.json', 'single-build', 'Keep the production build separate from fast verify; run it once for the final candidate.');\n}\n\n/** Split a shell command on its chaining operators. */\nexport function splitCommandChain(command: string): string[] {\n return command.split(/&&|\\|\\||[;|&]/).map(segment => segment.trim()).filter(Boolean);\n}\n\n/**\n * The package scripts one command segment runs, or null when the segment is\n * not a recognised script invocation (npm run, npm test, run-s, run-p, npm-run-all).\n */\nexport function scriptReferences(segment: string, scripts: Readonly<Record<string, string>>): string[] | null {\n const words = segment.split(/\\s+/).filter(Boolean);\n while (words[0] && /^[A-Z_][A-Z0-9_]*=/.test(words[0])) words.shift();\n const [tool, ...rest] = words;\n if (tool === 'npm') {\n const [subcommand, ...args] = rest;\n if (subcommand === 'test' || subcommand === 't') return ['test'];\n if (subcommand === 'start' || subcommand === 'stop' || subcommand === 'restart') return [subcommand];\n if (subcommand === 'run' || subcommand === 'run-script') {\n const name = args.find(arg => !arg.startsWith('-'));\n return name ? [name] : null;\n }\n return null;\n }\n if (tool === 'run-s' || tool === 'run-p' || tool === 'npm-run-all') {\n const patterns: string[] = [];\n for (const word of rest) {\n if (word === '--') break;\n if (!word.startsWith('-')) patterns.push(word.replace(/^['\"]|['\"]$/g, ''));\n }\n if (patterns.length === 0) return null;\n // npm-run-all globs: `*` stays within one `:` segment; a whole `**` segment spans several.\n return patterns.flatMap(pattern => pattern.includes('*') || pattern.includes('?') || pattern.includes('[')\n ? Object.keys(scripts).filter(name => globMatch(pattern, name, { separator: ':', globstar: true }))\n : [pattern]);\n }\n return null;\n}\n\n// --- dependencies (section 1) ------------------------------------------------\n\nfunction inspectDependencies(pkg: PackageManifest, add: Add) {\n if (pkg.type !== 'module') add('package.json', 'module-type', 'Declare \"type\": \"module\".');\n const dependencies = { ...pkg.dependencies, ...pkg.devDependencies };\n for (const tool of DEV_TOOLING) {\n const spec = pkg.devDependencies?.[tool];\n if (!spec || !SEMVER.test(spec)) add('package.json', 'dev-tooling', `Pin ${tool} exactly as a development dependency.`);\n }\n // Packed preflight binds the four Brandlab packages to local file: archives; the evaluator verifies those.\n const ranges = Object.entries(dependencies)\n .filter(([name, spec]) => !SEMVER.test(spec) && !(name.startsWith('@brandlab-digital/') && spec.startsWith('file:')))\n .map(([name, spec]) => `${name}@${spec}`);\n if (ranges.length > 0) add('package.json', 'exact-pins', `Pin every dependency to the exact locked version: ${ranges.sort().join(', ')}.`);\n const next = dependencies.next;\n for (const companion of ['eslint-config-next', '@next/mdx']) {\n const spec = dependencies[companion];\n if (spec && spec !== next) add('package.json', 'framework-companion-pin', `${companion} must equal the next version (${next ?? 'missing'}); found ${spec}.`);\n }\n if (!dependencies['eslint-config-next']) add('package.json', 'framework-companion-pin', 'Declare eslint-config-next at the exact next version for brandlab.configs.next.');\n if (pkg.dependencies?.sharp || pkg.devDependencies?.sharp) add('package.json', 'sharp-override-only', 'Remove the direct sharp dependency; the release-owned overrides.sharp pin is the only declaration.');\n}\n\n// --- layout and naming (section 2) --------------------------------------------\n\nfunction inspectLayout(root: string, capabilities: ReturnType<typeof describeCapabilities>, add: Add) {\n for (const path of ['src/app', 'src/config', 'src/data', 'src/lib', 'src/components', 'tests']) {\n if (!isDirectory(join(root, path))) add(path, 'source-organisation', `Place the corresponding implementation under ${path}.`);\n }\n for (const path of RETIRED_ROOT_DIRECTORIES) {\n if (existsSync(join(root, path))) add(path, 'retired-source-layout', 'Migrate consumers to the current src responsibilities and remove the superseded directory.');\n }\n const required = [\n 'src/config/site.ts', 'src/config/analytics.ts', 'src/data/business.ts', 'src/data/routes.ts', 'src/data/redirects.ts',\n 'src/lib/seo/metadata.ts', 'src/instrumentation-client.ts', 'src/app/layout.tsx', 'src/app/robots.ts', 'src/app/sitemap.xml/route.ts',\n 'src/data/businessEvidence.ts',\n ...(capabilities.contactEnabled ? ['src/config/contact.ts', CONTACT_RUNTIME, 'src/app/api/contact/route.ts'] : []),\n ...(capabilities.reviewsEnabled ? ['src/config/reviews.ts'] : []),\n ...(capabilities.locationsDeclared ? ['src/data/locations/estate.ts'] : []),\n ];\n for (const path of required) {\n if (!existsSync(join(root, path))) add(path, 'owner-file', `The 3.0 layout places this owner at ${path}.`);\n }\n for (const [path, message] of [\n ['src/config/env.ts', 'Remove the local environment parser; site configuration is a source constant.'],\n ['src/lib/analytics', 'Remove the local analytics layer; installBrandlabInstrumentation owns it.'],\n ['src/lib/contact/definition.ts', 'Remove the local contact definition; the contract lives in src/config/contact.ts.'],\n ['src/lib/contact/constants.ts', 'Remove the local contact constants; the contract lives in src/config/contact.ts.'],\n ['src/lib/contact/runtime.ts', 'Remove the local contact runtime; POST uses createBrandlabContactRouteHandler.'],\n ['src/components/analytics/GoogleTag.tsx', 'Render BrandlabGoogleTag directly in src/app/layout.tsx.'],\n ['src/components/analytics/CoreWebVitalsReporter.tsx', 'Remove the web-vitals reporter.'],\n ['src/lib/seo/sitemaps', 'Remove the local sitemap builders; the sitemap route uses createBrandlabSitemapRoute.'],\n ['src/lib/seo/sitemaps.ts', 'Remove the local sitemap builders; the sitemap route uses createBrandlabSitemapRoute.'],\n ['src/lib/seo/schema/sanitize.ts', 'Remove the local schema sanitiser; the packages own sanitising.'],\n ['src/lib/seo/schema/SchemaScript.tsx', 'Import SchemaScript from @brandlab-digital/site-next/schema.'],\n ['src/lib/seo/index.ts', 'Remove the SEO barrel and import each module directly.'],\n ] as const) {\n if (existsSync(join(root, path))) add(path, 'retired-file', message);\n }\n\n if (isDirectory(join(root, 'src'))) {\n for (const entry of readdirSync(join(root, 'src'), { withFileTypes: true })) {\n if (entry.name.startsWith('.')) continue;\n const path = `src/${entry.name}`;\n if (entry.isDirectory() && SRC_DIRECTORIES.has(entry.name)) {\n if (entry.name === 'types' && walkProjectFiles(root, path).some(file => !file.endsWith('.d.ts'))) {\n add(path, 'standard-layout', 'src/types may hold only ambient .d.ts declarations.');\n }\n continue;\n }\n if (entry.isFile() && SRC_ROOT_FILES.test(entry.name)) continue;\n add(path, 'standard-layout', `${path} is outside the standard layout (src/{app,config,data,content,lib,components,site}).`);\n }\n }\n if (isDirectory(join(root, 'src/site'))) {\n for (const entry of readdirSync(join(root, 'src/site'), { withFileTypes: true })) {\n if (entry.isDirectory() && !entry.name.startsWith('.') && !SITE_SKIN_DIRECTORIES.has(entry.name)) {\n add(`src/site/${entry.name}`, 'standard-layout', 'src/site holds the skin files and the signature/ and decoration/ folders only.');\n }\n }\n }\n if (isDirectory(join(root, 'src/components'))) {\n for (const entry of readdirSync(join(root, 'src/components'), { withFileTypes: true })) {\n if (entry.name.startsWith('.') || entry.name === 'templates') continue;\n if (!entry.isDirectory() || !COMPONENT_ROLES.has(entry.name)) {\n add(`src/components/${entry.name}`, 'component-role', 'Components belong to one role: layout, ui, sections, features or page-families.');\n }\n }\n }\n for (const path of walkProjectFiles(root, 'src')) inspectFileName(root, path, add);\n}\n\nfunction inspectFileName(root: string, path: string, add: Add) {\n const name = posix.basename(path);\n const directory = posix.dirname(path);\n if (directory === 'src' && SRC_ROOT_FILES.test(name)) return;\n if (directory === 'src/site' && SITE_SKIN_FILES.has(name)) return;\n if (name.endsWith('.module.css')) {\n const component = name.replace(/\\.module\\.css$/, '');\n // Exact names from the directory listing: existsSync is case-insensitive on macOS but not on the Linux CI\n // (a button.module.css beside Button.tsx passed locally and failed in CI).\n const siblings = directoryEntries(join(root, directory));\n if (!['tsx', 'ts', 'jsx'].some(extension => siblings.has(`${component}.${extension}`))) {\n add(path, 'file-naming', `Keep ${name} beside the ${component} component it styles (the file names must match exactly, including case).`);\n }\n return;\n }\n if (path.startsWith('src/app/')) {\n // Images, fonts and metadata assets are framework-consumed; only code and styles are placed.\n if (!CODE_OR_STYLE.test(name)) return;\n const segments = path.split('/');\n const privateFolder = segments.slice(2, -1).find(segment => segment.startsWith('_') && segment !== '_components');\n if (privateFolder) {\n add(path, 'route-local-code', `Route-local code belongs in src/app/<route>/_components/, not ${privateFolder}/.`);\n return;\n }\n if (!segments.includes('_components')) {\n if (NEXT_SPECIAL_FILE.test(name) || path === 'src/app/globals.css') return;\n add(path, 'route-local-code', 'Route-local code belongs in src/app/<route>/_components/; framework files keep their reserved names.');\n return;\n }\n }\n if (!/\\.(?:ts|tsx)$/.test(name) || path.startsWith('src/content/')) return;\n if (name.endsWith('.tsx') && !PASCAL_COMPONENT.test(name)) {\n add(path, 'file-naming', 'Components use PascalCase .tsx file names.');\n } else if (name.endsWith('.ts') && !CAMEL_MODULE.test(name)) {\n add(path, 'file-naming', 'Data and helper modules use camelCase .ts file names.');\n }\n if (path.startsWith('src/components/page-families/') && name.endsWith('.tsx') && !/^[A-Z][A-Za-z0-9]*Page\\.tsx$/.test(name)) {\n add(path, 'file-naming', 'Page families are named <RouteKind>Page.tsx.');\n }\n}\n\n// --- module structure: barrels, ui data imports, estate ----------------------\n\nfunction inspectSourceModules(root: string, source: BrandlabSourceIndex, add: Add) {\n const resolver = createBrandlabModuleResolver(root, new Set(source.byPath.keys()));\n for (const file of source.files.filter(candidate => candidate.path.startsWith('src/'))) {\n const references = listModuleReferences(file);\n const forwarding = forwardingExports(file);\n if (isBarrel(file)) {\n add(file.path, 'no-barrels', 'This module only re-exports other modules; import each owner directly.');\n } else {\n for (const line of forwarding) {\n add(file.path, 'no-forwarding-exports', 'This export forwards another module; import the owner directly.', { line });\n }\n }\n if (file.path.startsWith('src/components/ui/')) {\n for (const reference of references.filter(candidate => candidate.kind !== 'export')) {\n const resolved = resolver(file.path, reference.specifier);\n if (resolved?.startsWith('src/data/') || /^@\\/data(?:\\/|$)/.test(reference.specifier)) {\n add(file.path, 'ui-imports-data', 'UI primitives never import data modules; pass prepared props from a section or route.', { line: reference.line });\n }\n }\n }\n inspectRegistryDerivedEstate(file, add);\n }\n const estate = source.byPath.get('src/data/locations/estate.ts');\n if (estate) {\n inspectRetainedExclusions(estate, add);\n inspectSiteOwnedLocations(estate, add);\n }\n}\n\n// --- server-only boundaries (3.2.1) ------------------------------------------\n\n/**\n * What a browser bundle must never carry. The contact route's delivery options and\n * the business evidence live in server-only modules, alias hosts in next.config, and\n * no module a client component reaches imports a server-only module or holds an\n * evidence record. (Next's build also refuses a client import of `server-only`; this\n * names the chain before a build is needed.) From 3.3.3 no module a client component\n * reaches imports the geography registry (site-core/geography, which the location\n * estate reads) or a package server entry: a browser bundle cannot resolve them.\n */\nfunction inspectServerBoundaries(\n root: string,\n capabilities: ReturnType<typeof describeCapabilities>,\n source: BrandlabSourceIndex,\n add: Add,\n) {\n const contact = source.byPath.get('src/config/contact.ts');\n const runtime = source.byPath.get(CONTACT_RUNTIME);\n if (capabilities.contactEnabled && runtime) {\n if (!importsServerOnly(runtime)) {\n add(CONTACT_RUNTIME, 'server-only-module', `${CONTACT_RUNTIME} imports 'server-only', so no client component can bundle the delivery options.`);\n }\n if (!declaresName(runtime, 'contactRuntime')) {\n add(CONTACT_RUNTIME, 'contact-runtime', `${CONTACT_RUNTIME} exports contactRuntime (the labels, email style and attachment policy createBrandlabContactRouteHandler takes).`);\n }\n }\n const moved = contact ? declaresName(contact, 'contactRuntime') : undefined;\n if (contact && moved) {\n add('src/config/contact.ts', 'contact-runtime', `contactRuntime belongs in ${CONTACT_RUNTIME}: the contact form imports src/config/contact.ts, so everything contactRuntime reads (the site identity, business data) reaches the browser.`, { line: moved });\n }\n\n const evidence = source.byPath.get(BUSINESS_EVIDENCE);\n if (evidence) {\n if (!importsServerOnly(evidence)) {\n add(BUSINESS_EVIDENCE, 'server-only-module', `${BUSINESS_EVIDENCE} imports 'server-only', so no client component can bundle the evidence records.`);\n }\n if (findImportedCalls(evidence, /^@brandlab-digital\\/site-core\\/business$/, 'defineBrandlabBusiness').length === 0) {\n add(BUSINESS_EVIDENCE, 'business-evidence', `${BUSINESS_EVIDENCE} declares the business facts with defineBrandlabBusiness, each with its evidence.`);\n }\n }\n const values = source.byPath.get(BUSINESS_VALUES);\n if (values) {\n const call = BUSINESS_FACT_CALLS.exec(values.executable);\n const record = evidenceRecordLines(values)[0];\n if (call || record) {\n add(BUSINESS_VALUES, 'business-evidence', `${BUSINESS_VALUES} holds the display values only (businessFacts); defineBrandlabBusiness and the evidence belong in ${BUSINESS_EVIDENCE}, which stays on the server.`,\n { line: record ?? lineAtIndex(values.text, call!.index) });\n }\n }\n\n const site = source.byPath.get(SITE_IDENTITY);\n const aliasHosts = site ? declaredAliasHosts(site) : undefined;\n if (aliasHosts) {\n add(SITE_IDENTITY, 'alias-hosts', 'Declare the alias hosts in next.config.ts with defineBrandlabNextConfig({ aliasHosts }): client components import the site identity, so its alias hosts reach the browser.', { line: aliasHosts });\n }\n\n const resolver = createBrandlabModuleResolver(root, new Set(source.byPath.keys()));\n const reached = new Map<string, string | null>();\n const queue = source.files.filter(file => file.path.startsWith('src/') && (isClientModule(file) || /^src\\/instrumentation-client\\.[cm]?[jt]sx?$/.test(file.path)));\n for (const file of queue) reached.set(file.path, null);\n while (queue.length > 0) {\n const file = queue.shift()!;\n for (const reference of listModuleReferences(file)) {\n if (reference.typeOnly) continue;\n const target = resolver(file.path, reference.specifier);\n if (!target || reached.has(target)) continue;\n reached.set(target, file.path);\n const next = source.byPath.get(target);\n if (next) queue.push(next);\n }\n }\n const chain = (path: string) => {\n const steps: string[] = [];\n for (let at: string | null | undefined = path; at; at = reached.get(at)) steps.unshift(at);\n return steps.join(' → ');\n };\n for (const path of [...reached.keys()].sort()) {\n const file = source.byPath.get(path);\n if (!file) continue;\n if (importsServerOnly(file)) {\n add(path, 'client-bundle-boundary', `A client component imports this server-only module (${chain(path)}); pass what it needs as props from a server component.`);\n continue;\n }\n const serverEntry = listModuleReferences(file).find(reference => !reference.typeOnly && SERVER_PACKAGE_ENTRIES.has(reference.specifier));\n if (serverEntry) {\n add(path, 'client-bundle-boundary', `${SERVER_PACKAGE_ENTRIES.get(serverEntry.specifier)} reaches the browser (${chain(path)} → ${serverEntry.specifier}), and from 3.3.3 a browser bundle cannot resolve it, so the build fails. ${serverEntry.specifier === GEOGRAPHY_ENTRY ? 'Build the location lists a client component shows (navigation, service areas) in a server component and pass them as plain props; keep error pages and the analytics binding free of location data.' : 'Keep it in server components and route handlers.'}`, { line: serverEntry.line });\n continue;\n }\n const record = evidenceRecordLines(file)[0];\n if (record) {\n add(path, 'client-bundle-boundary', `An evidence record (sourceKind, verifiedAt) reaches the browser (${chain(path)}); keep evidence in ${BUSINESS_EVIDENCE}.`, { line: record });\n }\n }\n}\n\n/** A module whose directive prologue says 'use client'. */\nfunction isClientModule(file: BrandlabSourceFile): boolean {\n for (const statement of parseBrandlabSourceFile(file).statements) {\n if (!ts.isExpressionStatement(statement) || !ts.isStringLiteral(statement.expression)) return false;\n if (statement.expression.text === 'use client') return true;\n }\n return false;\n}\n\n/** `import 'server-only'` at the top level. */\nfunction importsServerOnly(file: BrandlabSourceFile): boolean {\n return parseBrandlabSourceFile(file).statements.some(statement =>\n ts.isImportDeclaration(statement) && !statement.importClause &&\n ts.isStringLiteral(statement.moduleSpecifier) && statement.moduleSpecifier.text === 'server-only');\n}\n\n/** The line of a top-level declaration of `name`, if the module declares it. */\nfunction declaresName(file: BrandlabSourceFile, name: string): number | undefined {\n for (const statement of parseBrandlabSourceFile(file).statements) {\n if (ts.isVariableStatement(statement)) {\n for (const declaration of statement.declarationList.declarations) {\n if (ts.isIdentifier(declaration.name) && declaration.name.text === name) return lineOfNode(file, statement);\n }\n } else if ((ts.isFunctionDeclaration(statement) || ts.isClassDeclaration(statement)) && statement.name?.text === name) {\n return lineOfNode(file, statement);\n }\n }\n return undefined;\n}\n\n/** Lines of object literals that are evidence records: they name both sourceKind and verifiedAt. */\nfunction evidenceRecordLines(file: BrandlabSourceFile): number[] {\n const lines: number[] = [];\n const visit = (node: ts.Node) => {\n if (ts.isObjectLiteralExpression(node)) {\n const names = new Set(node.properties.map(property => property.name && (ts.isIdentifier(property.name) || ts.isStringLiteral(property.name)) ? property.name.text : ''));\n if (names.has('sourceKind') && names.has('verifiedAt')) lines.push(lineOfNode(file, node));\n }\n ts.forEachChild(node, visit);\n };\n visit(parseBrandlabSourceFile(file));\n return lines;\n}\n\n/** The line of a non-empty `aliasHosts` in the defineBrandlabSite call. */\nfunction declaredAliasHosts(file: BrandlabSourceFile): number | undefined {\n for (const call of findImportedCalls(file, /^@brandlab-digital\\/site-core\\/site$/, 'defineBrandlabSite')) {\n let definition: ts.Expression | undefined = call.arguments[0];\n while (definition && (ts.isAsExpression(definition) || ts.isSatisfiesExpression(definition) || ts.isParenthesizedExpression(definition))) {\n definition = definition.expression;\n }\n if (!definition || !ts.isObjectLiteralExpression(definition)) continue;\n const property = definition.properties.find(candidate =>\n (ts.isPropertyAssignment(candidate) || ts.isShorthandPropertyAssignment(candidate)) &&\n (ts.isIdentifier(candidate.name) || ts.isStringLiteral(candidate.name)) && candidate.name.text === 'aliasHosts');\n if (!property) continue;\n const array = ts.isPropertyAssignment(property)\n ? arrayLiteral(file, property.initializer)\n : ts.isShorthandPropertyAssignment(property) ? arrayLiteral(file, property.name) : undefined;\n if (array && array.elements.length === 0) continue;\n return lineOfNode(file, property);\n }\n return undefined;\n}\n\n/** Lines of `export ... from` statements and exports of names this module only imported. */\nfunction forwardingExports(file: BrandlabSourceFile): number[] {\n const source = parseBrandlabSourceFile(file);\n const imported = new Set(listModuleReferences(file).filter(reference => reference.kind === 'import').flatMap(reference => reference.bindings.map(binding => binding.local)));\n const lines: number[] = [];\n for (const statement of source.statements) {\n const forwards =\n (ts.isExportDeclaration(statement) && (statement.moduleSpecifier !== undefined ||\n (statement.exportClause !== undefined && ts.isNamedExports(statement.exportClause) &&\n statement.exportClause.elements.some(element => imported.has((element.propertyName ?? element.name).text))))) ||\n (ts.isExportAssignment(statement) && ts.isIdentifier(statement.expression) && imported.has(statement.expression.text));\n if (forwards) lines.push(lineOfNode(file, statement));\n }\n return lines;\n}\n\n/** A module with no declarations or statements of its own besides imports and exports. */\nfunction isBarrel(file: BrandlabSourceFile): boolean {\n const statements = parseBrandlabSourceFile(file).statements;\n return statements.length > 0 && forwardingExports(file).length > 0 &&\n statements.every(statement => ts.isImportDeclaration(statement) || ts.isExportDeclaration(statement) || ts.isExportAssignment(statement));\n}\n\nfunction inspectRegistryDerivedEstate(file: BrandlabSourceFile, add: Add) {\n const derived = listModuleReferences(file)\n .filter(reference => reference.kind === 'import' && /^@brandlab-digital\\/site-core\\//.test(reference.specifier))\n .flatMap(reference => reference.bindings.filter(binding => /WebsiteSuburbs$/.test(binding.imported)).map(binding => ({ ...binding, line: reference.line })));\n const namespaceUse = file.executable.match(/\\.\\s*([a-z][A-Za-z]*WebsiteSuburbs)\\b/);\n const first = derived[0] ?? (namespaceUse ? { imported: namespaceUse[1]!, line: lineAtIndex(file.text, namespaceUse.index ?? 0) } : null);\n if (!first) return;\n add(file.path, 'estate-registry-derived',\n `${first.imported} is a registry candidate list; the published estate in src/data/locations/estate.ts must be literal data, never derived from it.`, { line: first.line });\n}\n\nfunction inspectRetainedExclusions(file: BrandlabSourceFile, add: Add) {\n for (const call of findImportedCalls(file, /^@brandlab-digital\\/site-core\\/locations$/, 'defineLocationEstate')) {\n const retained = objectPropertyValue(call.arguments[0], 'retainedExclusions');\n if (!retained || !ts.isArrayLiteralExpression(retained) || retained.elements.length === 0) continue;\n const slugs = retained.elements.map(element => {\n if (ts.isStringLiteralLike(element)) return element.text;\n const slug = objectPropertyValue(element, 'slug');\n return slug && ts.isStringLiteralLike(slug) ? slug.text : null;\n }).filter((slug): slug is string => Boolean(slug));\n add(file.path, 'estate-retained-exclusions',\n `${retained.elements.length} policy-excluded location(s) stay published for a later SEO decision${slugs.length ? `: ${slugs.join(', ')}` : ''}.`,\n { severity: 'info', line: lineOfNode(file, retained) });\n }\n}\n\n/** An array literal, directly or through a top-level `const name = [...]` (optionally `as const`) in the same file. */\nfunction arrayLiteral(file: BrandlabSourceFile, node: ts.Expression | undefined): ts.ArrayLiteralExpression | undefined {\n const unwrap = (expression: ts.Expression | undefined): ts.Expression | undefined => {\n let current = expression;\n while (current && (ts.isAsExpression(current) || ts.isSatisfiesExpression(current) || ts.isParenthesizedExpression(current))) {\n current = current.expression;\n }\n return current;\n };\n const value = unwrap(node);\n if (value && ts.isArrayLiteralExpression(value)) return value;\n if (!value || !ts.isIdentifier(value)) return undefined;\n for (const statement of parseBrandlabSourceFile(file).statements) {\n if (!ts.isVariableStatement(statement)) continue;\n for (const declaration of statement.declarationList.declarations) {\n if (ts.isIdentifier(declaration.name) && declaration.name.text === value.text) {\n const initializer = unwrap(declaration.initializer);\n return initializer && ts.isArrayLiteralExpression(initializer) ? initializer : undefined;\n }\n }\n }\n return undefined;\n}\n\n/** Report the locations the site publishes outside the shared registry, with each group's reason. */\nfunction inspectSiteOwnedLocations(file: BrandlabSourceFile, add: Add) {\n for (const call of findImportedCalls(file, /^@brandlab-digital\\/site-core\\/locations$/, 'defineLocationEstate')) {\n const declared = objectPropertyValue(call.arguments[0], 'siteOwned');\n if (!declared) continue;\n const groups = arrayLiteral(file, declared);\n if (!groups) {\n add(file.path, 'estate-site-owned',\n 'siteOwned must be literal data in src/data/locations/estate.ts: [{ reason, slugs }], never derived.', { line: lineOfNode(file, declared) });\n continue;\n }\n if (groups.elements.length === 0) continue;\n let total = 0;\n const summaries = groups.elements.map(element => {\n const reason = objectPropertyValue(element, 'reason');\n const slugs = arrayLiteral(file, objectPropertyValue(element, 'slugs'));\n const count = slugs?.elements.length;\n total += count ?? 0;\n const label = reason && ts.isStringLiteralLike(reason) ? reason.text : 'a reason that is not a string literal';\n return `${count ?? 'an unknown number of'} for \"${label}\"`;\n });\n add(file.path, 'estate-site-owned',\n `${total} location(s) are published outside the shared geography registry, declared site-owned: ${summaries.join('; ')}.`,\n { severity: 'info', line: lineOfNode(file, groups) });\n }\n}\n\nfunction lineAtIndex(text: string, index: number): number {\n return text.slice(0, index).split('\\n').length;\n}\n\n// --- tests (sections 2 and 6) -------------------------------------------------\n\nfunction inspectTests(root: string, capabilities: ReturnType<typeof describeCapabilities>, add: Add) {\n if (!isDirectory(join(root, 'tests'))) return;\n for (const entry of readdirSync(join(root, 'tests'), { withFileTypes: true })) {\n if (entry.name.startsWith('.')) continue;\n if (!entry.isDirectory() || !TEST_DIRECTORIES.has(entry.name)) {\n add(`tests/${entry.name}`, 'test-layout', 'Tests live in tests/{config,data,lib,components,e2e,support}.');\n }\n }\n const required = [\n 'tests/data/routes.test.ts', 'tests/config/analytics.test.ts',\n 'tests/e2e/estate.spec.ts', 'tests/e2e/analytics.spec.ts', 'tests/e2e/families.spec.ts',\n ...(capabilities.contactEnabled ? ['tests/config/contact.test.ts', 'tests/e2e/contact.spec.ts'] : []),\n ];\n for (const path of required) {\n if (!existsSync(join(root, path))) add(path, 'shared-tests', `The shared 3.0 test set includes ${path}.`);\n }\n for (const path of walkProjectFiles(root, 'tests')) {\n if (/-darwin\\.png$/.test(path)) add(path, 'committed-snapshots', 'Delete committed darwin snapshots; rendered checks run against the CI build.');\n }\n}\n\n// --- dev presets (section 4) -------------------------------------------------\n\n/** The two accepted default exports: the plain preset, or the preset plus the Site System rules (same identifier twice). */\nconst ESLINT_PRESET_EXPORT = /export\\s+default\\s+(?:([A-Za-z_$][\\w$]*)\\.configs\\.next|\\[\\s*\\.\\.\\.\\s*([A-Za-z_$][\\w$]*)\\.configs\\.next\\s*,\\s*\\2\\.configs\\[\\s*(['\"])site-system\\3\\s*\\]\\s*,?\\s*\\])\\s*;?\\s*$/;\n\nfunction inspectToolPresets(root: string, add: Add) {\n const eslint = readOptional(join(root, 'eslint.config.mjs'));\n if (eslint === null) add('eslint.config.mjs', 'tool-preset', 'Add eslint.config.mjs: export default brandlab.configs.next.');\n else if (!/@brandlab-digital\\/eslint-plugin/.test(eslint) || !ESLINT_PRESET_EXPORT.test(eslint.trim())) {\n add('eslint.config.mjs', 'tool-preset', \"eslint.config.mjs is exactly `export default brandlab.configs.next`, or, for a site that declares a siteSystem tier, `export default [...brandlab.configs.next, brandlab.configs['site-system']]` (imported from @brandlab-digital/eslint-plugin).\");\n }\n const knip = readOptional(join(root, 'knip.ts'));\n if (knip === null) add('knip.ts', 'tool-preset', 'Add knip.ts: export default brandlabKnip({ mdx?, entry? }).');\n else if (!/@brandlab-digital\\/conformance\\/knip/.test(knip) || !/export\\s+default\\s+brandlabKnip\\s*\\(/.test(knip)) {\n add('knip.ts', 'tool-preset', 'knip.ts exports brandlabKnip({ mdx?, entry? }) from @brandlab-digital/conformance/knip.');\n }\n if (!['playwright.config.ts', 'playwright.config.mts'].some(name => existsSync(join(root, name)))) {\n add('playwright.config.ts', 'tool-preset', 'Add the Playwright configuration for the shared e2e specs.');\n }\n if (!['vitest.config.ts', 'vitest.config.mts'].some(name => existsSync(join(root, name)))) {\n add('vitest.config.ts', 'tool-preset', 'Add the Vitest configuration for the binding tests.');\n }\n}\n\n// --- CI, dependencies, Vercel and docs (section 6) ---------------------------\n\n/** A day before any decision, so a recorded decision's reviewBy never counts as passed. */\nconst ORIGIN_DECISION_NEVER_LAPSED = '0000-01-01';\n\nfunction inspectDelivery(root: string, add: Add, config: string | null) {\n const workflowDirectory = join(root, '.github/workflows');\n const workflows = isDirectory(workflowDirectory) ? readdirSync(workflowDirectory).filter(name => /\\.ya?ml$/.test(name)).sort() : [];\n // CI v2 (verify-next-v2.yml, 3.13.0) is the same verifier with draft, ready-for-review and merge depths.\n const callers = workflows.filter(name => /uses\\s*:\\s*['\"]?RomieDandan\\/brandlab\\/\\.github\\/workflows\\/verify-next(?:-v2)?\\.yml@/.test(readFileSync(join(workflowDirectory, name), 'utf8')));\n if (callers.length !== 1 || callers[0] !== 'verify.yml') {\n add('.github/workflows/verify.yml', 'ci-workflow', `Exactly one .github/workflows/verify.yml calls RomieDandan/brandlab/.github/workflows/verify-next.yml (or verify-next-v2.yml) at the fleet SHA (found ${callers.length ? callers.join(', ') : 'none'}).`);\n }\n for (const path of ['.github/dependabot.yml', '.github/dependabot.yaml', 'renovate.json', 'renovate.json5', '.github/renovate.json', '.renovaterc', '.renovaterc.json']) {\n if (existsSync(join(root, path))) add(path, 'dependency-bots', 'Exact pins move with Brandlab releases; remove Dependabot/Renovate version updates.');\n }\n const vercel = readOptional(join(root, 'vercel.json'));\n let installCommand: unknown;\n try { installCommand = vercel === null ? undefined : JSON.parse(vercel).installCommand; } catch { installCommand = undefined; }\n if (installCommand !== 'npm ci') add('vercel.json', 'vercel-install', 'vercel.json sets installCommand to \"npm ci\".');\n // W5 (3.13.0): the regions equal the recorded origin region, Sydney unless an origin-region-v1 decision says otherwise.\n // This check runs inside every site's `npm run verify`, so it never judges the date: a lapsed reviewBy must not stop\n // a build, a fix or a rollback. The lapse fails only the ready gate's W5 (as site-core's config validation does).\n const hosting = config === null ? undefined : parseProjectHosting(config);\n for (const problem of originRegionProblems({ hosting, vercelJson: vercel, today: ORIGIN_DECISION_NEVER_LAPSED })) {\n add(problem.startsWith('vercel.json') ? 'vercel.json' : 'brandlab.config.ts', 'vercel-region', problem);\n }\n let ignoreCommand: unknown;\n try { ignoreCommand = vercel === null ? undefined : JSON.parse(vercel).ignoreCommand; } catch { ignoreCommand = undefined; }\n if (ignoreCommand !== BRANDLAB_VERCEL_IGNORE_COMMAND) {\n add('vercel.json', 'vercel-ignore-build', `vercel.json skips a production build only when a push changes nothing but .github/, docs/ or root Markdown files: \"ignoreCommand\": ${JSON.stringify(BRANDLAB_VERCEL_IGNORE_COMMAND)} (found ${ignoreCommand === undefined ? 'none' : JSON.stringify(ignoreCommand)}). A CI-only change otherwise rebuilds production and empties its CDN cache; previews and anything git cannot compare still build.`);\n }\n\n if (!existsSync(join(root, 'README.md'))) add('README.md', 'project-docs', 'Add the generated README.md (commands, architecture, environment names, deployment and rollback).');\n const agents = join(root, 'AGENTS.md');\n if (!existsSync(agents)) add('AGENTS.md', 'project-docs', 'Add AGENTS.md with the fixed sources of truth and guardrails.');\n else if (statSync(agents).size > 3_584) add('AGENTS.md', 'project-docs', `AGENTS.md is ${statSync(agents).size} bytes; keep it to about 3 KB and archive history to the control repo.`);\n const claude = readOptional(join(root, 'CLAUDE.md'));\n if (claude === null || claude.trim() !== '@AGENTS.md') add('CLAUDE.md', 'project-docs', 'CLAUDE.md is the single line @AGENTS.md.');\n}\n\nconst directoryListings = new Map<string, ReadonlySet<string>>();\n\n/** The exact file names in a directory (cached per check run). */\nfunction directoryEntries(path: string): ReadonlySet<string> {\n let entries = directoryListings.get(path);\n if (!entries) {\n try { entries = new Set(readdirSync(path)); } catch { entries = new Set(); }\n directoryListings.set(path, entries);\n }\n return entries;\n}\n\nfunction readOptional(path: string): string | null {\n return existsSync(path) ? readFileSync(path, 'utf8') : null;\n}\n"]}