create-ailk 0.38.0 → 0.40.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 (304) hide show
  1. package/dist/add-route.js +16 -1
  2. package/dist/body-heading.d.ts +2 -1
  3. package/dist/body-heading.js +31 -3
  4. package/dist/derive-architecture.js +3 -1
  5. package/dist/module-architecture.js +0 -3
  6. package/dist/remove-module.js +27 -14
  7. package/dist/routes.d.ts +36 -2
  8. package/dist/routes.js +269 -23
  9. package/dist/site-manifest.js +6 -4
  10. package/dist/site-roster.d.ts +11 -3
  11. package/dist/site-roster.js +48 -22
  12. package/dist/surfaces.d.ts +13 -3
  13. package/dist/surfaces.js +128 -194
  14. package/dist/sync-routes.js +22 -5
  15. package/dist/template-record.js +3 -1
  16. package/dist/topology.d.ts +11 -0
  17. package/dist/topology.js +253 -3
  18. package/package.json +3 -3
  19. package/templates/apps/web/CLAUDE.md +32 -4
  20. package/templates/apps/web/__tests__/__mocks__/next-intl-server.ts +6 -1
  21. package/templates/apps/web/__tests__/__mocks__/next-intl.ts +6 -1
  22. package/templates/apps/web/__tests__/auth/seam.test.ts +34 -0
  23. package/templates/apps/web/account.config.tsx +2 -3
  24. package/templates/apps/web/app/[locale]/(authed)/account/connect/__tests__/page.test.tsx +1 -1
  25. package/templates/apps/web/app/[locale]/(authed)/account/connect/page.tsx +1 -1
  26. package/templates/apps/web/app/[locale]/(authed)/signed-out-gate.generated.tsx +1 -1
  27. package/templates/apps/web/app/[locale]/layout.tsx +2 -2
  28. package/templates/apps/web/auth.config.tsx +107 -0
  29. package/templates/apps/web/auth.ts +2 -1
  30. package/templates/apps/web/i18n/request.ts +13 -2
  31. package/templates/apps/web/jest.config.cjs +10 -0
  32. package/templates/apps/web/lib/__tests__/deck-page.test.ts +9 -0
  33. package/templates/apps/web/lib/__tests__/fixtures/site-topology.ts +3 -0
  34. package/templates/apps/web/lib/__tests__/in-page-magnet-self-request.test.ts +1 -1
  35. package/templates/apps/web/lib/__tests__/in-page-magnet.test.ts +2 -2
  36. package/templates/apps/web/lib/__tests__/pricing-page.test.ts +1 -1
  37. package/templates/apps/web/lib/__tests__/server-api.test.ts +1 -1
  38. package/templates/apps/web/lib/__tests__/structured-data.test.tsx +17 -4
  39. package/templates/apps/web/lib/in-page-magnet.ts +2 -2
  40. package/templates/apps/web/lib/pricing-page.ts +3 -3
  41. package/templates/apps/web/lib/server-api.ts +1 -1
  42. package/templates/apps/web/{app/[locale]/contact → lib}/site-contact-email.ts +1 -1
  43. package/templates/apps/web/{app/[locale]/contact → lib}/site-contact-lines.ts +1 -1
  44. package/templates/apps/web/lib/site-header.ts +1 -1
  45. package/templates/apps/web/lib/topology.generated.ts +5 -0
  46. package/templates/apps/web/messages/en.json +0 -271
  47. package/templates/apps/web/middleware.ts +12 -25
  48. package/templates/apps/web/next.config.mjs +15 -0
  49. package/templates/apps/web/package.json +2 -0
  50. package/templates/apps/web/site-pages.config.tsx +85 -0
  51. package/templates/apps/web/types/messages.d.ts +6 -1
  52. package/templates/tools/body-heading.ts +30 -3
  53. package/versions.json +50 -48
  54. package/templates/apps/web/app/[locale]/(auth)/__tests__/auth-pages.test.tsx +0 -322
  55. package/templates/apps/web/app/[locale]/(auth)/__tests__/password-reset.test.tsx +0 -554
  56. package/templates/apps/web/app/[locale]/(auth)/consent/__tests__/consent-actions.test.ts +0 -56
  57. package/templates/apps/web/app/[locale]/(auth)/consent/__tests__/page.test.tsx +0 -164
  58. package/templates/apps/web/app/[locale]/(auth)/consent/consent-form.tsx +0 -132
  59. package/templates/apps/web/app/[locale]/(auth)/consent/consent.actions.ts +0 -51
  60. package/templates/apps/web/app/[locale]/(auth)/consent/page.tsx +0 -144
  61. package/templates/apps/web/app/[locale]/(auth)/forgot-password/forgot-password-card.tsx +0 -101
  62. package/templates/apps/web/app/[locale]/(auth)/forgot-password/page.tsx +0 -111
  63. package/templates/apps/web/app/[locale]/(auth)/layout.tsx +0 -81
  64. package/templates/apps/web/app/[locale]/(auth)/legal-footnote.tsx +0 -35
  65. package/templates/apps/web/app/[locale]/(auth)/reset-password/__tests__/return.test.tsx +0 -179
  66. package/templates/apps/web/app/[locale]/(auth)/reset-password/page.tsx +0 -157
  67. package/templates/apps/web/app/[locale]/(auth)/reset-password/reset-password-card.tsx +0 -126
  68. package/templates/apps/web/app/[locale]/(auth)/sign-in/__tests__/next-path.test.ts +0 -54
  69. package/templates/apps/web/app/[locale]/(auth)/sign-in/__tests__/page.test.tsx +0 -628
  70. package/templates/apps/web/app/[locale]/(auth)/sign-in/__tests__/remembered-method.test.ts +0 -43
  71. package/templates/apps/web/app/[locale]/(auth)/sign-in/__tests__/sign-in-card.test.tsx +0 -266
  72. package/templates/apps/web/app/[locale]/(auth)/sign-in/next-path.ts +0 -20
  73. package/templates/apps/web/app/[locale]/(auth)/sign-in/page.tsx +0 -234
  74. package/templates/apps/web/app/[locale]/(auth)/sign-in/remembered-method.ts +0 -37
  75. package/templates/apps/web/app/[locale]/(auth)/sign-in/sign-in-card.tsx +0 -323
  76. package/templates/apps/web/app/[locale]/(auth)/sign-in/sign-in-text.ts +0 -93
  77. package/templates/apps/web/app/[locale]/(auth)/sign-up/__tests__/page.test.tsx +0 -301
  78. package/templates/apps/web/app/[locale]/(auth)/sign-up/__tests__/sign-up-card.test.tsx +0 -309
  79. package/templates/apps/web/app/[locale]/(auth)/sign-up/page.tsx +0 -201
  80. package/templates/apps/web/app/[locale]/(auth)/sign-up/sign-up-card.tsx +0 -366
  81. package/templates/apps/web/app/[locale]/(auth)/use-auth-card-flow.ts +0 -116
  82. package/templates/apps/web/app/[locale]/(auth)/verify-email/__tests__/actions.test.ts +0 -94
  83. package/templates/apps/web/app/[locale]/(auth)/verify-email/actions.ts +0 -77
  84. package/templates/apps/web/app/[locale]/(auth)/verify-email/page.tsx +0 -154
  85. package/templates/apps/web/app/[locale]/(authed)/account/appointments/[slug]/page.tsx +0 -3
  86. package/templates/apps/web/app/[locale]/(authed)/account/appointments/page.tsx +0 -3
  87. package/templates/apps/web/app/[locale]/(authed)/account/artifacts/[pieceId]/page.tsx +0 -3
  88. package/templates/apps/web/app/[locale]/(authed)/account/artifacts/[pieceId]/versions/[version]/file/route.ts +0 -2
  89. package/templates/apps/web/app/[locale]/(authed)/account/artifacts/page.tsx +0 -3
  90. package/templates/apps/web/app/[locale]/(authed)/account/billing/page.tsx +0 -12
  91. package/templates/apps/web/app/[locale]/(authed)/account/general/page.tsx +0 -12
  92. package/templates/apps/web/app/[locale]/(authed)/account/inbox/[kind]/[id]/page.tsx +0 -12
  93. package/templates/apps/web/app/[locale]/(authed)/account/inbox/message/[id]/file/route.ts +0 -2
  94. package/templates/apps/web/app/[locale]/(authed)/account/inbox/thread/page.tsx +0 -12
  95. package/templates/apps/web/app/[locale]/(authed)/account/invitations/[invitationId]/page.tsx +0 -3
  96. package/templates/apps/web/app/[locale]/(authed)/account/layout.tsx +0 -10
  97. package/templates/apps/web/app/[locale]/(authed)/account/notifications/page.tsx +0 -3
  98. package/templates/apps/web/app/[locale]/(authed)/account/onboarding/page.tsx +0 -3
  99. package/templates/apps/web/app/[locale]/(authed)/account/page.tsx +0 -12
  100. package/templates/apps/web/app/[locale]/(authed)/account/privacy/export/route.ts +0 -2
  101. package/templates/apps/web/app/[locale]/(authed)/account/privacy/page.tsx +0 -3
  102. package/templates/apps/web/app/[locale]/(authed)/account/security/page.tsx +0 -3
  103. package/templates/apps/web/app/[locale]/(authed)/account/settings/page.tsx +0 -2
  104. package/templates/apps/web/app/[locale]/(authed)/account/support/page.tsx +0 -3
  105. package/templates/apps/web/app/[locale]/(authed)/leads/__tests__/page.test.tsx +0 -205
  106. package/templates/apps/web/app/[locale]/(authed)/leads/components/LeadsTable.tsx +0 -137
  107. package/templates/apps/web/app/[locale]/(authed)/leads/page.tsx +0 -122
  108. package/templates/apps/web/app/[locale]/(authed)/waitlist/components/ForbiddenState.tsx +0 -24
  109. package/templates/apps/web/app/[locale]/(authed)/waitlist/format.ts +0 -111
  110. package/templates/apps/web/app/[locale]/[slug]/[detail]/__tests__/page.test.tsx +0 -402
  111. package/templates/apps/web/app/[locale]/[slug]/[detail]/page.tsx +0 -143
  112. package/templates/apps/web/app/[locale]/[slug]/__tests__/page.test.tsx +0 -148
  113. package/templates/apps/web/app/[locale]/[slug]/page.tsx +0 -109
  114. package/templates/apps/web/app/[locale]/about/[slug]/page.tsx +0 -46
  115. package/templates/apps/web/app/[locale]/about/__tests__/about-routes.test.tsx +0 -353
  116. package/templates/apps/web/app/[locale]/about/page.tsx +0 -122
  117. package/templates/apps/web/app/[locale]/alternatives/__tests__/page.test.tsx +0 -161
  118. package/templates/apps/web/app/[locale]/alternatives/page.tsx +0 -112
  119. package/templates/apps/web/app/[locale]/careers/[slug]/[action]/page.tsx +0 -244
  120. package/templates/apps/web/app/[locale]/careers/[slug]/apply.actions.ts +0 -325
  121. package/templates/apps/web/app/[locale]/careers/[slug]/job-application-form.ts +0 -120
  122. package/templates/apps/web/app/[locale]/careers/[slug]/page.tsx +0 -73
  123. package/templates/apps/web/app/[locale]/careers/__tests__/apply.actions.test.ts +0 -497
  124. package/templates/apps/web/app/[locale]/careers/__tests__/careers-hub.test.tsx +0 -172
  125. package/templates/apps/web/app/[locale]/careers/__tests__/careers-set.test.tsx +0 -153
  126. package/templates/apps/web/app/[locale]/careers/__tests__/job-application-form.test.ts +0 -141
  127. package/templates/apps/web/app/[locale]/careers/__tests__/job-apply-page.test.tsx +0 -546
  128. package/templates/apps/web/app/[locale]/careers/__tests__/page-renderer-migration.test.tsx +0 -189
  129. package/templates/apps/web/app/[locale]/careers/page.tsx +0 -165
  130. package/templates/apps/web/app/[locale]/case-studies/[slug]/page.tsx +0 -49
  131. package/templates/apps/web/app/[locale]/case-studies/__tests__/hub-children.test.tsx +0 -65
  132. package/templates/apps/web/app/[locale]/case-studies/__tests__/page-renderer-migration.test.tsx +0 -125
  133. package/templates/apps/web/app/[locale]/case-studies/page.tsx +0 -49
  134. package/templates/apps/web/app/[locale]/clients/__tests__/page-renderer-migration.test.tsx +0 -85
  135. package/templates/apps/web/app/[locale]/clients/page.tsx +0 -47
  136. package/templates/apps/web/app/[locale]/contact/ConversationalIntakeWrapper.tsx +0 -249
  137. package/templates/apps/web/app/[locale]/contact/__tests__/ConversationalIntakeWrapper.test.tsx +0 -400
  138. package/templates/apps/web/app/[locale]/contact/__tests__/contact-form-magnet.test.ts +0 -138
  139. package/templates/apps/web/app/[locale]/contact/__tests__/contact-form-text.test.ts +0 -49
  140. package/templates/apps/web/app/[locale]/contact/__tests__/contact-magnet-page.test.tsx +0 -494
  141. package/templates/apps/web/app/[locale]/contact/__tests__/contact.actions.test.ts +0 -1122
  142. package/templates/apps/web/app/[locale]/contact/__tests__/intake-analytics.test.ts +0 -51
  143. package/templates/apps/web/app/[locale]/contact/__tests__/page-renderer-migration.test.tsx +0 -319
  144. package/templates/apps/web/app/[locale]/contact/contact-form-magnet.ts +0 -77
  145. package/templates/apps/web/app/[locale]/contact/contact-form-text.ts +0 -52
  146. package/templates/apps/web/app/[locale]/contact/contact.actions.ts +0 -403
  147. package/templates/apps/web/app/[locale]/contact/intake-analytics.ts +0 -49
  148. package/templates/apps/web/app/[locale]/contact/intake-script.ts +0 -92
  149. package/templates/apps/web/app/[locale]/contact/page.tsx +0 -267
  150. package/templates/apps/web/app/[locale]/courses/[slug]/page.tsx +0 -50
  151. package/templates/apps/web/app/[locale]/courses/__tests__/hub-children.test.tsx +0 -32
  152. package/templates/apps/web/app/[locale]/courses/__tests__/page-renderer-migration.test.tsx +0 -123
  153. package/templates/apps/web/app/[locale]/courses/page.tsx +0 -49
  154. package/templates/apps/web/app/[locale]/events/[slug]/page.tsx +0 -57
  155. package/templates/apps/web/app/[locale]/events/__tests__/hub-children.test.tsx +0 -32
  156. package/templates/apps/web/app/[locale]/events/__tests__/page-renderer-migration.test.tsx +0 -164
  157. package/templates/apps/web/app/[locale]/events/__tests__/program-event.test.tsx +0 -120
  158. package/templates/apps/web/app/[locale]/events/page.tsx +0 -60
  159. package/templates/apps/web/app/[locale]/faq/page.tsx +0 -54
  160. package/templates/apps/web/app/[locale]/features/[slug]/page.tsx +0 -54
  161. package/templates/apps/web/app/[locale]/features/__tests__/hub-children.test.tsx +0 -32
  162. package/templates/apps/web/app/[locale]/features/page.tsx +0 -50
  163. package/templates/apps/web/app/[locale]/for/[slug]/page.tsx +0 -54
  164. package/templates/apps/web/app/[locale]/for/__tests__/hub-children.test.tsx +0 -32
  165. package/templates/apps/web/app/[locale]/for/__tests__/page-renderer-migration.test.tsx +0 -90
  166. package/templates/apps/web/app/[locale]/for/page.tsx +0 -51
  167. package/templates/apps/web/app/[locale]/glossary/page.tsx +0 -53
  168. package/templates/apps/web/app/[locale]/how-to/[slug]/page.tsx +0 -50
  169. package/templates/apps/web/app/[locale]/how-to/__tests__/page-renderer-migration.test.tsx +0 -78
  170. package/templates/apps/web/app/[locale]/how-to/page.tsx +0 -50
  171. package/templates/apps/web/app/[locale]/integrations/[slug]/page.tsx +0 -54
  172. package/templates/apps/web/app/[locale]/integrations/__tests__/hub-children.test.tsx +0 -38
  173. package/templates/apps/web/app/[locale]/integrations/__tests__/page-renderer-migration.test.tsx +0 -141
  174. package/templates/apps/web/app/[locale]/integrations/page.tsx +0 -49
  175. package/templates/apps/web/app/[locale]/launch-service/page.tsx +0 -44
  176. package/templates/apps/web/app/[locale]/newsletter/__tests__/page.test.tsx +0 -236
  177. package/templates/apps/web/app/[locale]/newsletter/page.tsx +0 -179
  178. package/templates/apps/web/app/[locale]/page.tsx +0 -147
  179. package/templates/apps/web/app/[locale]/partners/[slug]/page.tsx +0 -45
  180. package/templates/apps/web/app/[locale]/partners/__tests__/hub-children.test.tsx +0 -32
  181. package/templates/apps/web/app/[locale]/partners/__tests__/page-renderer-migration.test.tsx +0 -125
  182. package/templates/apps/web/app/[locale]/partners/page.tsx +0 -49
  183. package/templates/apps/web/app/[locale]/portfolio/[slug]/page.tsx +0 -46
  184. package/templates/apps/web/app/[locale]/portfolio/__tests__/hub-children.test.tsx +0 -38
  185. package/templates/apps/web/app/[locale]/portfolio/page.tsx +0 -50
  186. package/templates/apps/web/app/[locale]/pricing/[slug]/__tests__/page.test.tsx +0 -324
  187. package/templates/apps/web/app/[locale]/pricing/[slug]/page.tsx +0 -87
  188. package/templates/apps/web/app/[locale]/pricing/__tests__/__snapshots__/unconnected.test.tsx.snap +0 -7
  189. package/templates/apps/web/app/[locale]/pricing/__tests__/offerings.test.tsx +0 -605
  190. package/templates/apps/web/app/[locale]/pricing/__tests__/page.test.tsx +0 -219
  191. package/templates/apps/web/app/[locale]/pricing/__tests__/pricing-pages.test.tsx +0 -215
  192. package/templates/apps/web/app/[locale]/pricing/__tests__/unconnected.test.tsx +0 -282
  193. package/templates/apps/web/app/[locale]/pricing/page.tsx +0 -120
  194. package/templates/apps/web/app/[locale]/privacy/page.tsx +0 -40
  195. package/templates/apps/web/app/[locale]/products/[slug]/page.tsx +0 -50
  196. package/templates/apps/web/app/[locale]/products/__tests__/hub-children.test.tsx +0 -32
  197. package/templates/apps/web/app/[locale]/products/__tests__/page-renderer-migration.test.tsx +0 -141
  198. package/templates/apps/web/app/[locale]/products/page.tsx +0 -49
  199. package/templates/apps/web/app/[locale]/projects/[slug]/page.tsx +0 -37
  200. package/templates/apps/web/app/[locale]/projects/__tests__/hub-children.test.tsx +0 -32
  201. package/templates/apps/web/app/[locale]/projects/__tests__/page-renderer-migration.test.tsx +0 -157
  202. package/templates/apps/web/app/[locale]/projects/page.tsx +0 -49
  203. package/templates/apps/web/app/[locale]/purchase-policy/page.tsx +0 -49
  204. package/templates/apps/web/app/[locale]/resources/[slug]/page.tsx +0 -54
  205. package/templates/apps/web/app/[locale]/resources/__tests__/hub-children.test.tsx +0 -38
  206. package/templates/apps/web/app/[locale]/resources/__tests__/page-renderer-migration.test.tsx +0 -151
  207. package/templates/apps/web/app/[locale]/resources/page.tsx +0 -49
  208. package/templates/apps/web/app/[locale]/services/[slug]/[child]/page.tsx +0 -68
  209. package/templates/apps/web/app/[locale]/services/[slug]/page.tsx +0 -88
  210. package/templates/apps/web/app/[locale]/services/__tests__/hub-children.test.tsx +0 -158
  211. package/templates/apps/web/app/[locale]/services/__tests__/page-renderer-migration.test.tsx +0 -187
  212. package/templates/apps/web/app/[locale]/services/__tests__/service-detail-sections.test.tsx +0 -224
  213. package/templates/apps/web/app/[locale]/services/__tests__/service-families.test.tsx +0 -368
  214. package/templates/apps/web/app/[locale]/services/page.tsx +0 -71
  215. package/templates/apps/web/app/[locale]/software/[slug]/page.tsx +0 -49
  216. package/templates/apps/web/app/[locale]/software/__tests__/page-renderer-migration.test.tsx +0 -81
  217. package/templates/apps/web/app/[locale]/software/page.tsx +0 -49
  218. package/templates/apps/web/app/[locale]/team/[slug]/page.tsx +0 -45
  219. package/templates/apps/web/app/[locale]/team/__tests__/hub-children.test.tsx +0 -32
  220. package/templates/apps/web/app/[locale]/team/__tests__/team-routes.test.tsx +0 -161
  221. package/templates/apps/web/app/[locale]/team/page.tsx +0 -50
  222. package/templates/apps/web/app/[locale]/tech-articles/[slug]/page.tsx +0 -54
  223. package/templates/apps/web/app/[locale]/tech-articles/__tests__/page-renderer-migration.test.tsx +0 -82
  224. package/templates/apps/web/app/[locale]/tech-articles/page.tsx +0 -49
  225. package/templates/apps/web/app/[locale]/templates/[slug]/__tests__/page.test.tsx +0 -203
  226. package/templates/apps/web/app/[locale]/templates/[slug]/page.tsx +0 -81
  227. package/templates/apps/web/app/[locale]/templates/__tests__/page.test.tsx +0 -237
  228. package/templates/apps/web/app/[locale]/templates/page.tsx +0 -114
  229. package/templates/apps/web/app/[locale]/terms/page.tsx +0 -40
  230. package/templates/apps/web/app/[locale]/testimonials/__tests__/page-renderer-migration.test.tsx +0 -85
  231. package/templates/apps/web/app/[locale]/testimonials/page.tsx +0 -51
  232. package/templates/apps/web/app/[locale]/thanks/[slug]/__tests__/page.test.tsx +0 -136
  233. package/templates/apps/web/app/[locale]/thanks/[slug]/page.tsx +0 -39
  234. package/templates/apps/web/app/[locale]/unsubscribe/__tests__/unsubscribe-rsc-boundary.test.tsx +0 -226
  235. package/templates/apps/web/app/[locale]/unsubscribe/__tests__/unsubscribe.test.tsx +0 -217
  236. package/templates/apps/web/app/[locale]/unsubscribe/page.tsx +0 -106
  237. package/templates/apps/web/app/[locale]/unsubscribe/unsubscribe-button.tsx +0 -94
  238. package/templates/apps/web/app/[locale]/unsubscribe/unsubscribe.actions.ts +0 -55
  239. package/templates/apps/web/app/[locale]/vs/[slug]/__tests__/page.test.tsx +0 -100
  240. package/templates/apps/web/app/[locale]/vs/[slug]/page.tsx +0 -60
  241. package/templates/apps/web/app/[locale]/whitepapers/[slug]/page.tsx +0 -54
  242. package/templates/apps/web/app/[locale]/whitepapers/__tests__/page-renderer-migration.test.tsx +0 -82
  243. package/templates/apps/web/app/[locale]/whitepapers/page.tsx +0 -49
  244. package/templates/apps/web/app/[locale]/working-agreement/__tests__/page.test.tsx +0 -63
  245. package/templates/apps/web/app/[locale]/working-agreement/page.tsx +0 -41
  246. package/templates/apps/web/app/api/auth/[...all]/route.ts +0 -16
  247. package/templates/apps/web/app/api/auth/hub/__tests__/continuation.test.ts +0 -143
  248. package/templates/apps/web/app/api/auth/hub/__tests__/entry-routes.test.ts +0 -749
  249. package/templates/apps/web/app/api/auth/hub/authorize/__tests__/route.test.ts +0 -964
  250. package/templates/apps/web/app/api/auth/hub/authorize/route.ts +0 -390
  251. package/templates/apps/web/app/api/auth/hub/continuation.ts +0 -127
  252. package/templates/apps/web/app/api/auth/hub/continue/[ref]/__tests__/route.test.ts +0 -188
  253. package/templates/apps/web/app/api/auth/hub/continue/[ref]/route.ts +0 -53
  254. package/templates/apps/web/app/api/auth/hub/email/route.ts +0 -111
  255. package/templates/apps/web/app/api/auth/hub/entry-shared.ts +0 -163
  256. package/templates/apps/web/app/api/auth/hub/password/__tests__/return.test.ts +0 -86
  257. package/templates/apps/web/app/api/auth/hub/password/__tests__/route.test.ts +0 -368
  258. package/templates/apps/web/app/api/auth/hub/password/return.ts +0 -86
  259. package/templates/apps/web/app/api/auth/hub/password/route.ts +0 -171
  260. package/templates/apps/web/app/api/auth/hub/purchase/route.ts +0 -230
  261. package/templates/apps/web/app/api/auth/hub/purchase-link/route.ts +0 -174
  262. package/templates/apps/web/app/api/auth/hub/sign-up/route.ts +0 -60
  263. package/templates/apps/web/app/api/auth/hub/sign-up-evidence.ts +0 -97
  264. package/templates/apps/web/app/api/auth/mcp/__tests__/continuation.test.ts +0 -92
  265. package/templates/apps/web/app/api/auth/mcp/continuation.ts +0 -89
  266. package/templates/apps/web/app/api/auth/mcp/continue/[ref]/__tests__/route.test.ts +0 -59
  267. package/templates/apps/web/app/api/auth/mcp/continue/[ref]/route.ts +0 -41
  268. package/templates/apps/web/app/api/hub-session/__tests__/routes.test.ts +0 -1166
  269. package/templates/apps/web/app/api/hub-session/callback/route.ts +0 -134
  270. package/templates/apps/web/app/api/hub-session/email/route.ts +0 -125
  271. package/templates/apps/web/app/api/hub-session/one-tap/nonce/route.ts +0 -49
  272. package/templates/apps/web/app/api/hub-session/one-tap/route.ts +0 -106
  273. package/templates/apps/web/app/api/hub-session/open/route.ts +0 -111
  274. package/templates/apps/web/app/api/hub-session/password/return/route.ts +0 -69
  275. package/templates/apps/web/app/api/hub-session/password/route.ts +0 -106
  276. package/templates/apps/web/app/api/hub-session/sign-in/route.ts +0 -91
  277. package/templates/apps/web/app/api/hub-session/sign-out/route.ts +0 -54
  278. package/templates/apps/web/components/sign-out-trigger.tsx +0 -62
  279. package/templates/apps/web/lib/__tests__/auth-routes.test.ts +0 -140
  280. package/templates/apps/web/lib/__tests__/hub-children.fixtures.ts +0 -279
  281. package/templates/apps/web/lib/__tests__/route-family.test.ts +0 -57
  282. package/templates/apps/web/lib/__tests__/service-listing.test.ts +0 -111
  283. package/templates/apps/web/lib/__tests__/template-listing.test.ts +0 -158
  284. package/templates/apps/web/lib/auth-routes.ts +0 -125
  285. package/templates/apps/web/lib/hub-children.tsx +0 -351
  286. package/templates/apps/web/lib/hub-session/__tests__/hub-session.test.ts +0 -433
  287. package/templates/apps/web/lib/hub-session/__tests__/spoke-sign-in.test.tsx +0 -332
  288. package/templates/apps/web/lib/hub-session/config.ts +0 -110
  289. package/templates/apps/web/lib/hub-session/entry.ts +0 -238
  290. package/templates/apps/web/lib/hub-session/index.ts +0 -21
  291. package/templates/apps/web/lib/hub-session/one-tap.tsx +0 -148
  292. package/templates/apps/web/lib/hub-session/reseal.ts +0 -90
  293. package/templates/apps/web/lib/hub-session/seal.ts +0 -86
  294. package/templates/apps/web/lib/hub-session/session.ts +0 -298
  295. package/templates/apps/web/lib/hub-session/spoke-sign-in.tsx +0 -277
  296. package/templates/apps/web/lib/meet-placeholder.ts +0 -5
  297. package/templates/apps/web/lib/next-path.ts +0 -35
  298. package/templates/apps/web/lib/posting-title.ts +0 -39
  299. package/templates/apps/web/lib/route-family.ts +0 -69
  300. package/templates/apps/web/lib/service-listing.ts +0 -89
  301. package/templates/apps/web/lib/template-listing.ts +0 -169
  302. package/templates/apps/web/src/lib/__tests__/lead-write.test.ts +0 -187
  303. package/templates/apps/web/src/lib/lead-write.ts +0 -90
  304. /package/templates/apps/web/{app/[locale]/contact → lib}/__tests__/site-contact-lines.test.ts +0 -0
package/dist/add-route.js CHANGED
@@ -48,6 +48,7 @@ import { appendEnvRows } from "./lib/declared-env.js";
48
48
  import { ENV_CATALOG } from "./lib/env-catalog.js";
49
49
  import { diffTwoStrings, } from "./lib/extract-module-bundle.js";
50
50
  import { ParseError } from "./parse-args.js";
51
+ import { RoutesRefusedError, writeRoutes } from "./routes.js";
51
52
  import { substituteMarkers } from "./substitute.js";
52
53
  import { GATEABLE_SURFACES, MODULE_SURFACES, parseSurfaces, resolveSurfaces, } from "./surfaces.js";
53
54
  import { syncRoutes } from "./sync-routes.js";
@@ -138,6 +139,20 @@ export function addRouteToScaffold(opts) {
138
139
  if (spoke !== undefined) {
139
140
  appendEnvRows(targetAbs, { topology: "spoke", catalog: ENV_CATALOG });
140
141
  }
142
+ // #11259 D5 — a surface's pages may ship in a site-gated page package
143
+ // (`@working-theory/site-pages`), whose route files the generator writes
144
+ // once the header above declares the surface: as `add-module` does, write
145
+ // them now on a site that has the package installed (nothing otherwise —
146
+ // the site's `routes --write` lands them after the install). A refusal is
147
+ // the site's own `routes --check` to name.
148
+ try {
149
+ for (const path of writeRoutes(targetAbs).written)
150
+ report.push({ path, action: "written" });
151
+ }
152
+ catch (err) {
153
+ if (!(err instanceof RoutesRefusedError))
154
+ throw err;
155
+ }
141
156
  return { targetDir: targetAbs, route, surfaces, report, routes };
142
157
  }
143
158
  /** The site's `architecture.yaml`, after checking `targetAbs` is a scaffold. */
@@ -331,7 +346,7 @@ const MAGNET_PATH_RE = /^\/[a-z0-9]+(-[a-z0-9]+)*(\/[a-z0-9]+(-[a-z0-9]+)*){0,2}
331
346
  const RESERVED_LAST_SEGMENTS = new Set(["start", "apply"]);
332
347
  /**
333
348
  * First segments a pair may not take: the API and relay prefixes, the flows
334
- * routes, the account and Admin areas, and `apps/web/lib/auth-routes.ts`'s
349
+ * routes, the account and Admin areas, and `@working-theory/auth/edge`'s
335
350
  * `AUTH_SEGMENTS` (restated — create-ailk cannot import `apps/web`).
336
351
  */
337
352
  const RESERVED_FIRST_SEGMENTS = new Set([
@@ -5,7 +5,8 @@ export type MdxBodyRule = Map<string, "always" | "unless-sections">;
5
5
  * naming `bodyMode: "mdx-body"`. A call whose `bodyMode` sits in a conditional
6
6
  * spread is `"unless-sections"`, any other `"always"`; `"always"` wins when two
7
7
  * routes name one type. A content hub's `HubConfig` reads the same way, from
8
- * its `body`. A missing `apps/web/app` gives an empty map.
8
+ * its `body`. A generated route file reads as the package page it re-exports
9
+ * (`pageSource`). A missing `apps/web/app` gives an empty map.
9
10
  */
10
11
  export declare function mdxBodyRule(appsRoot: string): MdxBodyRule;
11
12
  /** The routes' own `composed` test: mdx-body unless `sections` is a non-empty array. */
@@ -25,7 +25,8 @@
25
25
  * file from source.
26
26
  */
27
27
  import { existsSync, lstatSync, readFileSync, readdirSync, writeFileSync } from "node:fs";
28
- import { join } from "node:path";
28
+ import { createRequire } from "node:module";
29
+ import { join, resolve } from "node:path";
29
30
  // The `renderPage({ … })` discovery regexes of `tools/lint-mdx-body-compiles.ts`.
30
31
  const RENDER_PAGE_CALL_RE = /renderPage\s*\(\s*\{[\s\S]*?\}\s*\)/g;
31
32
  const TYPE_RE = /type\s*:\s*["']([A-Za-z]+)["']/;
@@ -53,12 +54,39 @@ function pageFiles(dir, out = []) {
53
54
  }
54
55
  return out;
55
56
  }
57
+ // A route file `create-ailk routes` generated (#11259 D8): its header line
58
+ // (after an optional `// oss: false` marker) and the package page it re-exports.
59
+ const GENERATED_ROUTE_HEADER = "// Generated by create-ailk routes from ";
60
+ const OSS_FALSE_MARKER = "// oss: false";
61
+ const GENERATED_FROM_RE = /\bfrom\s+"(@working-theory\/[^"]+)"/;
62
+ /**
63
+ * A page file's own source. A generated route file is followed to the package
64
+ * page it re-exports, resolved from the site's `apps/web` as Next resolves it
65
+ * (#11259 D8: the base pages ship in `@working-theory/site-pages`); one whose
66
+ * package is not installed reads as itself.
67
+ */
68
+ function pageSource(file, webDir) {
69
+ const text = readFileSync(file, "utf8");
70
+ const [line1 = "", line2 = ""] = text.split("\n", 2);
71
+ if (!(line1 === OSS_FALSE_MARKER ? line2 : line1).startsWith(GENERATED_ROUTE_HEADER))
72
+ return text;
73
+ const specifier = GENERATED_FROM_RE.exec(text)?.[1];
74
+ if (specifier === undefined)
75
+ return text;
76
+ try {
77
+ return readFileSync(createRequire(resolve(webDir, "package.json")).resolve(specifier), "utf8");
78
+ }
79
+ catch {
80
+ return text;
81
+ }
82
+ }
56
83
  /**
57
84
  * Scan `<appsRoot>/apps/web/app/**\/page.{ts,tsx}` for `renderPage({…})` calls
58
85
  * naming `bodyMode: "mdx-body"`. A call whose `bodyMode` sits in a conditional
59
86
  * spread is `"unless-sections"`, any other `"always"`; `"always"` wins when two
60
87
  * routes name one type. A content hub's `HubConfig` reads the same way, from
61
- * its `body`. A missing `apps/web/app` gives an empty map.
88
+ * its `body`. A generated route file reads as the package page it re-exports
89
+ * (`pageSource`). A missing `apps/web/app` gives an empty map.
62
90
  */
63
91
  export function mdxBodyRule(appsRoot) {
64
92
  const rule = new Map();
@@ -66,7 +94,7 @@ export function mdxBodyRule(appsRoot) {
66
94
  if (!existsSync(appDir))
67
95
  return rule;
68
96
  for (const file of pageFiles(appDir)) {
69
- const source = readFileSync(file, "utf8");
97
+ const source = pageSource(file, join(appsRoot, "apps", "web"));
70
98
  if (HUB_INPUT_RE.test(source)) {
71
99
  const types = [...source.matchAll(HUB_LIST_TYPE_RE)];
72
100
  const bodies = [...source.matchAll(HUB_BODY_RE)];
@@ -20,7 +20,7 @@ import { SITE_FONTS_PATH } from "./site-fonts.js";
20
20
  import { SITE_LISTING_PATH } from "./site-listing-path.js";
21
21
  import { SPOKE_CHECKOUT_CONFIG_PATH } from "./spoke-checkout.js";
22
22
  import { CORE_SURFACE_PATHS, NAV_CONFIG_PATH, RECOGNIZED_SURFACES, resolveSurfaces, } from "./surfaces.js";
23
- import { SPOKE_SEAM_FILES } from "./topology.js";
23
+ import { AUTH_CONFIG_PATH, SPOKE_SEAM_FILES } from "./topology.js";
24
24
  /** The npm scope a site consumes and never forks (#9191). */
25
25
  const PACKAGE_SCOPE = "@working-theory/";
26
26
  /** Apps whose `package.json` name is not `@working-theory/<dir>`, because the published package took it (#9564, #9570). */
@@ -347,6 +347,8 @@ export function deriveArchitecture(modules = ["marketing"], surfaces, options =
347
347
  MODULE_FLAGS_PATH,
348
348
  PAID_MCP_TOOLS_PATH,
349
349
  ...SPOKE_SEAM_FILES,
350
+ // #11257 D4 — rewritten in its spoke shape on a spoke, as the seams are.
351
+ AUTH_CONFIG_PATH,
350
352
  SPOKE_CHECKOUT_CONFIG_PATH,
351
353
  SPOKE_BILLING_ACTION_PATH,
352
354
  SITE_LISTING_PATH,
@@ -1866,9 +1866,6 @@ export const EXCLUDE_TEMPLATE_DIRS = [
1866
1866
  "apps/mcp/__tests__/workspace-surface.test.ts",
1867
1867
  "apps/mcp/__tests__/parity.test.ts",
1868
1868
  "apps/mcp/__tests__/workspace-oauth.test.ts",
1869
- "apps/web/app/[locale]/pricing/__tests__/monorepo-only.test.tsx",
1870
- "apps/web/app/[locale]/pricing/__tests__/__snapshots__/monorepo-only.test.tsx.snap",
1871
- "apps/web/lib/__tests__/hub-children.test.tsx",
1872
1869
  // #11227 (ADR 0040 phase 1) — the member account area ships in
1873
1870
  // `@working-theory/account`, its own suites with it. These are THIS
1874
1871
  // monorepo's integration suites: each mounts the package's pages through
@@ -42,9 +42,9 @@ import { deriveArchitecture } from "./derive-architecture.js";
42
42
  import { MODULE_SLICES, normalizeModules } from "./module-architecture.js";
43
43
  import { MODULE_FLAGS_PATH, PAID_MCP_TOOLS_PATH, PAID_SECTIONS_PATH, writePaidSections, } from "./paid-sections.js";
44
44
  import { ParseError, parseModules } from "./parse-args.js";
45
- import { GENERATED_ROUTE_HEADER, isRecordedRoute, OSS_FALSE_MARKER } from "./routes.js";
46
- import { SITE_ROSTER_PATH, readSiteRoster } from "./site-roster.js";
47
- import { HUB_KEPT_ROUTE_DIRS, MODULE_SURFACES, ROUTE_ROOT, resolveSurfaces, } from "./surfaces.js";
45
+ import { isGenerated, isRecordedRoute, siteGate } from "./routes.js";
46
+ import { SITE_ROSTER_PATH, readSiteRoster, webDependencies } from "./site-roster.js";
47
+ import { HUB_KEPT_ROUTE_DIRS, MODULE_SURFACES, PAGE_PACKAGE_ROUTES, ROUTE_ROOT, resolveSurfaces, } from "./surfaces.js";
48
48
  import { BASE_LAYER_DIR, templateTreeDir } from "./template-manifest.js";
49
49
  import { TEMPLATE_RECORD_PATH, isRecordable, parseTemplateRecord, serializeTemplateRecord, sha256Hex, } from "./template-record.js";
50
50
  import { readSiteTopology } from "./topology.js";
@@ -191,15 +191,6 @@ export function removalSet(targetDir, moduleName) {
191
191
  // ── Edited-file classification (D5) ─────────────────────────────────────────
192
192
  /** The `request` a removed generated route's `customizations.yaml` entry names. */
193
193
  const REMOVED_ROUTE_REQUEST = "working-theory-labs/ai-launch-kit-internal#11251";
194
- /**
195
- * Whether a file opens with the `create-ailk routes --write` header — on
196
- * line 1, or on line 2 behind the `// oss: false` marker (#11252).
197
- */
198
- function isGeneratedRoute(bytes) {
199
- const text = Buffer.from(bytes).toString("utf8");
200
- const marker = `${OSS_FALSE_MARKER}\n`;
201
- return (text.startsWith(marker) ? text.slice(marker.length) : text).startsWith(GENERATED_ROUTE_HEADER);
202
- }
203
194
  /**
204
195
  * Append one `customizations.yaml` entry per removed generated route file
205
196
  * (#11251 D12): `id: removed-<route>`, its one path, the decision that the
@@ -285,7 +276,7 @@ function isEdited(layers, targetDir, path) {
285
276
  // #11251 D12 — a route file `create-ailk routes --write` generated is the
286
277
  // page package's code, never the site's edit (`routes --check` holds it to
287
278
  // the manifest).
288
- if (isGeneratedRoute(disk))
279
+ if (isGenerated(disk.toString("utf8")))
289
280
  return false;
290
281
  // A carried module's own sample seeds are placeholders by contract (the
291
282
  // starter-template contract R2); no shipped layer holds their bytes to
@@ -438,7 +429,7 @@ export function removeModuleFromScaffold(opts) {
438
429
  ].join("\n"));
439
430
  }
440
431
  // ── Delete, then prune the directories the deletions emptied ────────────
441
- const generatedRoutes = paths.filter((p) => isGeneratedRoute(readFileSync(join(targetDir, ...p.split("/")))));
432
+ const generatedRoutes = paths.filter((p) => isGenerated(readFileSync(join(targetDir, ...p.split("/")), "utf8")));
442
433
  for (const p of paths)
443
434
  rmSync(join(targetDir, ...p.split("/")));
444
435
  // #11251 D12 (ADR 0040 rule 2) — a deleted generated route is recorded as
@@ -511,6 +502,28 @@ export function removeModuleFromScaffold(opts) {
511
502
  keptSegments.add(dir);
512
503
  }
513
504
  }
505
+ // #11259 D6 — a carried page package's pages under a kept group are kept
506
+ // too: the snapshot holds none of its generated route files, so a site
507
+ // whose routes are not yet written has no `(auth)/sign-in` on disk. So
508
+ // is a kept legal dir's page (`privacy`, `terms`, `working-agreement`,
509
+ // from @working-theory/site-pages) the site's header still carries.
510
+ const carried = webDependencies(targetDir);
511
+ const gate = siteGate(targetDir);
512
+ for (const row of PAGE_PACKAGE_ROUTES) {
513
+ if (!carried.has(row.package))
514
+ continue;
515
+ for (const page of row.pages) {
516
+ if (row.siteGated && !gate(`${ROUTE_ROOT}/${page}/page.tsx`))
517
+ continue;
518
+ const [group = "", segment] = page.split("/");
519
+ if (!HUB_KEPT_ROUTE_DIRS.includes(group))
520
+ continue;
521
+ if (!group.startsWith("("))
522
+ keptSegments.add(group);
523
+ else if (segment !== undefined)
524
+ keptSegments.add(segment);
525
+ }
526
+ }
514
527
  const dropRoutes = moduleName === "marketing"
515
528
  ? (route) => !keptSegments.has(route.split("/")[1] ?? "")
516
529
  : (route) => (MODULE_SLICES[moduleName].pageContributions ?? []).some((c) => c.route === route);
package/dist/routes.d.ts CHANGED
@@ -1,5 +1,13 @@
1
1
  /** The app a page package's routes mount in, relative to the site root. */
2
2
  export declare const ROUTES_APP_DIR = "apps/web";
3
+ /**
4
+ * The site's own handler trees under `app/api/`, which no page package may
5
+ * declare as an app prefix (#11257 D10, SEC-11257-3): the Offerings buy route,
6
+ * the revalidate hook, the webhook routes and the legacy checkout.
7
+ */
8
+ export declare const SITE_HANDLER_PREFIXES: readonly string[];
9
+ /** The routing file names the generator writes (`ROUTING_FILES`), for the snapshot build (#11259 D6). */
10
+ export declare const ROUTING_FILE_NAMES: ReadonlySet<string>;
3
11
  export type RouteKind = "page" | "layout" | "route";
4
12
  export interface RouteEntry {
5
13
  /** The routing file under `app/[locale]/`, POSIX, e.g. `(authed)/account/general/page.tsx`. */
@@ -15,12 +23,25 @@ export interface RouteEntry {
15
23
  config: boolean;
16
24
  /** Whether `generateMetadata` takes it too (#11253) — only with `config` and a `generateMetadata` export. */
17
25
  metadataConfig: boolean;
26
+ /** Where `path` is relative to: `app/[locale]/` (the default) or `app/` (#11257 D10). */
27
+ mount: RouteMount;
28
+ /** An ADR 0020 inline waiver the generated handler carries after its header (#11257 D10). */
29
+ waiver: string | undefined;
18
30
  }
31
+ export type RouteMount = "locale" | "app";
19
32
  export interface RouteManifest {
20
33
  package: string;
21
34
  version: string;
22
35
  /** The package's route prefixes under `app/[locale]/` — the stray check's scope; a manifest's single string is wrapped. */
23
36
  prefix: string[];
37
+ /** Whether the package ships the locale-root `page.tsx` — the manifest's `"root": true` (#11259 D5). */
38
+ localeRoot: boolean;
39
+ /** Whether the site's surfaces and public tree gate the package's entries (#11259 D5). */
40
+ siteGated: boolean;
41
+ /** The package's prefixes under `app/` for its `app`-mounted entries — their stray check's scope (#11257 D10). */
42
+ appPrefixes: string[];
43
+ /** Whether the package reads the site through `<package>/site`, which the site must alias (#11257 D4). */
44
+ siteSeam: boolean;
24
45
  /** The site's config file at the app root, without extension (`account.config`). */
25
46
  config: string | undefined;
26
47
  /** Routing files under the prefix that stay the site's own pages, never generated. */
@@ -58,6 +79,8 @@ export declare const GENERATED_ROUTE_HEADER = "// Generated by create-ailk route
58
79
  export declare const OSS_FALSE_MARKER = "// oss: false";
59
80
  /** The generated file's text for one entry. Every statement is one line; the config wrapper is in prettier's shape. */
60
81
  export declare function renderRouteFile(manifest: RouteManifest, entry: RouteEntry): string;
82
+ /** Whether `text` is a file this generator wrote: its first line (after an `oss: false` marker) is the header. */
83
+ export declare function isGenerated(text: string): boolean;
61
84
  /** Whether `<siteDir>/customizations.yaml` records `sitePath` — any entry, any path form or glob (the generator's own reading). */
62
85
  export declare function isRecordedRoute(siteDir: string, sitePath: string): boolean;
63
86
  export interface RecordedRoute {
@@ -76,10 +99,19 @@ export interface RoutesDrift {
76
99
  siteKept: string[];
77
100
  /** Site message keys under a package's namespace that its catalog no longer has: `<file>: <key>`. */
78
101
  orphanedOverrides: string[];
102
+ /** A site file missing the alias line a `siteSeam` package needs: `<file>: <alias>` (#11257 D4). */
103
+ seamAliasMissing: string[];
79
104
  /** The manifest entries in force — recorded ones included, not-carried ones not. */
80
105
  generated: number;
81
106
  }
82
- /** The count check mode fails on: missing, stale and stray route files and orphaned overrides. */
107
+ /**
108
+ * Whether a `siteGated` manifest's entry at `sitePath` is a route of the site
109
+ * (#11259 D5): not inside the public tree on a site without `marketing`, and
110
+ * not under a gateable surface the site's `# Surfaces:` header leaves out. A
111
+ * site with no readable header carries every surface.
112
+ */
113
+ export declare function siteGate(siteDir: string): (sitePath: string) => boolean;
114
+ /** The count check mode fails on: missing, stale and stray route files, orphaned overrides and missing seam aliases. */
83
115
  export declare function routesFailing(drift: RoutesDrift): number;
84
116
  /** How the site's route files and message overrides differ from the installed page packages. `routesFailing` zero means in sync. */
85
117
  export declare function checkRoutes(siteDir: string): RoutesDrift;
@@ -87,6 +119,8 @@ export interface WriteRoutesResult {
87
119
  written: string[];
88
120
  current: string[];
89
121
  recorded: RecordedRoute[];
122
+ /** Routing files at an entry's path that the generator did not write — a site's own handler — left as they are (#11257 D10). */
123
+ kept: string[];
90
124
  }
91
125
  /** Write every generated file that is missing or stale; a recorded route is left exactly as it is. */
92
126
  export declare function writeRoutes(siteDir: string): WriteRoutesResult;
@@ -96,7 +130,7 @@ export interface RoutesArgs {
96
130
  check: boolean;
97
131
  help: boolean;
98
132
  }
99
- export declare const ROUTES_HELP = "create-ailk routes \u2014 generate the route files for the pages a site's packages ship.\n\nUsage:\n create-ailk routes --write [<target-dir>]\n create-ailk routes --check [<target-dir>]\n\nArguments:\n <target-dir> The site root (holds apps/web). Defaults to the\n current dir.\n\nOptions:\n --write Write one generated file per route the installed\n page packages declare, under apps/web/app/[locale]/.\n A file already current is left alone.\n --check Write nothing; exit 1 naming each generated file\n that is missing, stale (differs from what --write\n would write) or stray (a page.tsx, layout.tsx or\n route.ts under a package's route prefix that is\n neither generated, recorded, nor one the package\n leaves to the site). It also names each orphaned\n override: a key in apps/web/messages/<locale>.json\n under a namespace a package's catalog ships that\n the catalog no longer has.\n --help, -h Print this message.\n\nA page package is an installed @working-theory/* dependency of apps/web whose\npackage.json declares \"ailk\": { \"routes\": \"<manifest>\" }. A generated file\nre-exports the package's page and copies its route-segment config; when the\npage takes the site's config it imports the manifest's config file from the\napp root (apps/web/account.config.tsx, say) and passes it in. Replace or remove a shipped route by recording it in\ncustomizations.yaml (an entry whose paths match the route file): a recorded\nroute is reported as replaced or removed, never failed, and --write never\ntouches it. Run --write after `pnpm install` (the manifests are read from the\ninstalled packages); the scaffold's preflight runs --check as `pnpm routes:check`.\n";
133
+ export declare const ROUTES_HELP = "create-ailk routes \u2014 generate the route files for the pages a site's packages ship.\n\nUsage:\n create-ailk routes --write [<target-dir>]\n create-ailk routes --check [<target-dir>]\n\nArguments:\n <target-dir> The site root (holds apps/web). Defaults to the\n current dir.\n\nOptions:\n --write Write one generated file per route the installed\n page packages declare, under apps/web/app/[locale]/.\n A file already current is left alone.\n --check Write nothing; exit 1 naming each generated file\n that is missing, stale (differs from what --write\n would write) or stray (a page.tsx, layout.tsx or\n route.ts under a package's route prefix that is\n neither generated, recorded, nor one the package\n leaves to the site). It also names each orphaned\n override: a key in apps/web/messages/<locale>.json\n under a namespace a package's catalog ships that\n the catalog no longer has.\n --help, -h Print this message.\n\nA page package is an installed @working-theory/* dependency of apps/web whose\npackage.json declares \"ailk\": { \"routes\": \"<manifest>\" }. A generated file\nre-exports the package's page and copies its route-segment config; when the\npage takes the site's config it imports the manifest's config file from the\napp root (apps/web/account.config.tsx, say) and passes it in. Replace or remove a shipped route by recording it in\ncustomizations.yaml (an entry whose paths match the route file): a recorded\nroute is reported as replaced or removed, never failed, and --write never\ntouches it. A manifest may list several prefixes, and one manifest with\n\"root\": true may ship the locale-root page.tsx. A manifest with\n\"siteGated\": true ships only the routes the site selected: its public pages\nare not carried when .ailk-site-manifest.json lists no marketing module, and\nneither is any page under a surface the architecture.yaml \"# Surfaces:\" header\nleaves out. Run --write after `pnpm install` (the manifests are read from the\ninstalled packages); the scaffold's preflight runs --check as `pnpm routes:check`.\n";
100
134
  /** Parse the argv AFTER the `routes` word. Strict `node:util` parseArgs, like `parseSyncRoutesArgs`. */
101
135
  export declare function parseRoutesArgs(argv: string[]): RoutesArgs;
102
136
  /** The printed report: one line per file, grouped by state; the recorded routes last, under their decision. */