create-ailk 0.37.1 → 0.39.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 (318) hide show
  1. package/README.md +129 -0
  2. package/component-catalog.json +44 -6
  3. package/component-catalog.md +6 -5
  4. package/dist/add-module.js +16 -1
  5. package/dist/add-route.d.ts +2 -2
  6. package/dist/add-route.js +19 -12
  7. package/dist/cli.js +52 -0
  8. package/dist/declined-routes.d.ts +13 -0
  9. package/dist/declined-routes.js +74 -0
  10. package/dist/derive-architecture.d.ts +0 -6
  11. package/dist/derive-architecture.js +12 -16
  12. package/dist/index.d.ts +1 -0
  13. package/dist/index.js +3 -0
  14. package/dist/language-import.d.ts +93 -0
  15. package/dist/language-import.js +270 -43
  16. package/dist/lib/import-mdx.js +1 -1
  17. package/dist/lib/scaffold-render-sweep.d.ts +6 -3
  18. package/dist/lib/scaffold-render-sweep.js +8 -4
  19. package/dist/migrate-content.d.ts +6 -2
  20. package/dist/migrate-content.js +62 -5
  21. package/dist/module-architecture.js +139 -103
  22. package/dist/paid-sections.d.ts +13 -0
  23. package/dist/paid-sections.js +35 -5
  24. package/dist/programmatic.js +6 -16
  25. package/dist/remove-module.js +73 -2
  26. package/dist/routes.d.ts +130 -0
  27. package/dist/routes.js +954 -0
  28. package/dist/site-manifest.js +6 -4
  29. package/dist/site-roster.d.ts +11 -2
  30. package/dist/site-roster.js +63 -21
  31. package/dist/spoke-checkout.d.ts +28 -27
  32. package/dist/spoke-checkout.js +71 -102
  33. package/dist/surfaces.d.ts +26 -0
  34. package/dist/surfaces.js +105 -293
  35. package/dist/sync-routes.d.ts +14 -1
  36. package/dist/sync-routes.js +108 -10
  37. package/dist/template-record.js +3 -1
  38. package/dist/topology.d.ts +26 -1
  39. package/dist/topology.js +273 -7
  40. package/dist/update.d.ts +17 -2
  41. package/dist/update.js +480 -77
  42. package/package.json +3 -3
  43. package/templates/README.md +1 -1
  44. package/templates/apps/mcp/CLAUDE.md +5 -3
  45. package/templates/apps/web/CLAUDE.md +87 -23
  46. package/templates/apps/web/__tests__/__mocks__/next-intl-server.ts +5 -1
  47. package/templates/apps/web/__tests__/__mocks__/next-intl.ts +5 -1
  48. package/templates/apps/web/__tests__/auth/seam.test.ts +34 -0
  49. package/templates/apps/web/account.config.tsx +100 -0
  50. package/templates/apps/web/app/[locale]/(authed)/account/connect/__tests__/page.test.tsx +1 -1
  51. package/templates/apps/web/app/[locale]/(authed)/account/connect/page.tsx +2 -2
  52. package/templates/apps/web/app/[locale]/(authed)/signed-out-gate.generated.tsx +1 -1
  53. package/templates/apps/web/app/[locale]/layout.tsx +46 -29
  54. package/templates/apps/web/app/apple-icon.tsx +72 -0
  55. package/templates/apps/web/app/llms.txt/__tests__/site-listing.test.ts +22 -12
  56. package/templates/apps/web/app/og/__tests__/__snapshots__/card.test.tsx.snap +3 -0
  57. package/templates/apps/web/app/og/__tests__/card.test.tsx +129 -0
  58. package/templates/apps/web/app/og/__tests__/route.test.ts +3 -4
  59. package/templates/apps/web/app/og/route.tsx +155 -72
  60. package/templates/apps/web/app/sitemap.xml/__tests__/site-listing.test.ts +12 -0
  61. package/templates/apps/web/auth.config.tsx +107 -0
  62. package/templates/apps/web/auth.ts +2 -1
  63. package/templates/apps/web/i18n/request.ts +51 -1
  64. package/templates/apps/web/jest.config.cjs +17 -1
  65. package/templates/apps/web/lib/__tests__/auth-phone.test.ts +11 -0
  66. package/templates/apps/web/lib/__tests__/fixtures/site-topology.ts +73 -0
  67. package/templates/apps/web/lib/__tests__/nav-label-keys.test.ts +14 -0
  68. package/templates/apps/web/lib/__tests__/profile-back-link.test.ts +148 -61
  69. package/templates/apps/web/lib/__tests__/served-pages.test.ts +77 -0
  70. package/templates/apps/web/lib/__tests__/server-api.test.ts +37 -5
  71. package/templates/apps/web/lib/__tests__/structured-data.test.tsx +26 -13
  72. package/templates/apps/web/lib/listings.tsx +2 -2
  73. package/templates/apps/web/lib/nav-label-keys.ts +16 -2
  74. package/templates/apps/web/lib/paid-section-contracts.ts +35 -6
  75. package/templates/apps/web/lib/paid-sections.generated.ts +8 -0
  76. package/templates/apps/web/lib/profile-back-link.ts +105 -32
  77. package/templates/apps/web/lib/served-pages.ts +95 -0
  78. package/templates/apps/web/lib/server-api.ts +1 -1
  79. package/templates/apps/web/lib/site-brand.tsx +3 -5
  80. package/templates/apps/web/lib/topology.generated.ts +5 -0
  81. package/templates/apps/web/messages/en.json +8 -836
  82. package/templates/apps/web/middleware.ts +15 -26
  83. package/templates/apps/web/next.config.mjs +35 -0
  84. package/templates/apps/web/package.json +2 -0
  85. package/templates/apps/web/types/messages.d.ts +6 -1
  86. package/templates/customizations.yaml +9 -0
  87. package/templates/package.json +3 -1
  88. package/templates/tools/lint-architecture.ts +164 -11
  89. package/versions.json +49 -47
  90. package/templates/apps/web/app/[locale]/(auth)/__tests__/auth-pages.test.tsx +0 -322
  91. package/templates/apps/web/app/[locale]/(auth)/__tests__/password-reset.test.tsx +0 -554
  92. package/templates/apps/web/app/[locale]/(auth)/consent/__tests__/consent-actions.test.ts +0 -56
  93. package/templates/apps/web/app/[locale]/(auth)/consent/__tests__/page.test.tsx +0 -164
  94. package/templates/apps/web/app/[locale]/(auth)/consent/consent-form.tsx +0 -132
  95. package/templates/apps/web/app/[locale]/(auth)/consent/consent.actions.ts +0 -51
  96. package/templates/apps/web/app/[locale]/(auth)/consent/page.tsx +0 -144
  97. package/templates/apps/web/app/[locale]/(auth)/forgot-password/forgot-password-card.tsx +0 -101
  98. package/templates/apps/web/app/[locale]/(auth)/forgot-password/page.tsx +0 -111
  99. package/templates/apps/web/app/[locale]/(auth)/layout.tsx +0 -81
  100. package/templates/apps/web/app/[locale]/(auth)/legal-footnote.tsx +0 -35
  101. package/templates/apps/web/app/[locale]/(auth)/reset-password/__tests__/return.test.tsx +0 -179
  102. package/templates/apps/web/app/[locale]/(auth)/reset-password/page.tsx +0 -157
  103. package/templates/apps/web/app/[locale]/(auth)/reset-password/reset-password-card.tsx +0 -126
  104. package/templates/apps/web/app/[locale]/(auth)/sign-in/__tests__/next-path.test.ts +0 -54
  105. package/templates/apps/web/app/[locale]/(auth)/sign-in/__tests__/page.test.tsx +0 -628
  106. package/templates/apps/web/app/[locale]/(auth)/sign-in/__tests__/remembered-method.test.ts +0 -43
  107. package/templates/apps/web/app/[locale]/(auth)/sign-in/__tests__/sign-in-card.test.tsx +0 -266
  108. package/templates/apps/web/app/[locale]/(auth)/sign-in/next-path.ts +0 -20
  109. package/templates/apps/web/app/[locale]/(auth)/sign-in/page.tsx +0 -234
  110. package/templates/apps/web/app/[locale]/(auth)/sign-in/remembered-method.ts +0 -37
  111. package/templates/apps/web/app/[locale]/(auth)/sign-in/sign-in-card.tsx +0 -323
  112. package/templates/apps/web/app/[locale]/(auth)/sign-in/sign-in-text.ts +0 -93
  113. package/templates/apps/web/app/[locale]/(auth)/sign-up/__tests__/page.test.tsx +0 -301
  114. package/templates/apps/web/app/[locale]/(auth)/sign-up/__tests__/sign-up-card.test.tsx +0 -309
  115. package/templates/apps/web/app/[locale]/(auth)/sign-up/page.tsx +0 -201
  116. package/templates/apps/web/app/[locale]/(auth)/sign-up/sign-up-card.tsx +0 -366
  117. package/templates/apps/web/app/[locale]/(auth)/use-auth-card-flow.ts +0 -116
  118. package/templates/apps/web/app/[locale]/(auth)/verify-email/__tests__/actions.test.ts +0 -94
  119. package/templates/apps/web/app/[locale]/(auth)/verify-email/actions.ts +0 -77
  120. package/templates/apps/web/app/[locale]/(auth)/verify-email/page.tsx +0 -154
  121. package/templates/apps/web/app/[locale]/(authed)/account/__tests__/account-frame-sign-out.test.tsx +0 -175
  122. package/templates/apps/web/app/[locale]/(authed)/account/__tests__/agreements-prompt.test.tsx +0 -301
  123. package/templates/apps/web/app/[locale]/(authed)/account/__tests__/billing.test.tsx +0 -515
  124. package/templates/apps/web/app/[locale]/(authed)/account/__tests__/general.test.tsx +0 -883
  125. package/templates/apps/web/app/[locale]/(authed)/account/__tests__/hub-mode.test.tsx +0 -758
  126. package/templates/apps/web/app/[locale]/(authed)/account/__tests__/item.test.tsx +0 -264
  127. package/templates/apps/web/app/[locale]/(authed)/account/__tests__/layout-sign-out.test.tsx +0 -167
  128. package/templates/apps/web/app/[locale]/(authed)/account/__tests__/layout.test.tsx +0 -730
  129. package/templates/apps/web/app/[locale]/(authed)/account/__tests__/new-menu.test.tsx +0 -355
  130. package/templates/apps/web/app/[locale]/(authed)/account/__tests__/new-popups.test.tsx +0 -97
  131. package/templates/apps/web/app/[locale]/(authed)/account/__tests__/notifications.test.tsx +0 -375
  132. package/templates/apps/web/app/[locale]/(authed)/account/__tests__/onboarding.test.tsx +0 -323
  133. package/templates/apps/web/app/[locale]/(authed)/account/__tests__/page.test.tsx +0 -1208
  134. package/templates/apps/web/app/[locale]/(authed)/account/__tests__/popups.test.tsx +0 -418
  135. package/templates/apps/web/app/[locale]/(authed)/account/__tests__/privacy.test.tsx +0 -462
  136. package/templates/apps/web/app/[locale]/(authed)/account/__tests__/rich-translator.ts +0 -63
  137. package/templates/apps/web/app/[locale]/(authed)/account/__tests__/security.test.tsx +0 -406
  138. package/templates/apps/web/app/[locale]/(authed)/account/__tests__/settings.test.tsx +0 -93
  139. package/templates/apps/web/app/[locale]/(authed)/account/__tests__/support.test.tsx +0 -208
  140. package/templates/apps/web/app/[locale]/(authed)/account/__tests__/thread.test.tsx +0 -340
  141. package/templates/apps/web/app/[locale]/(authed)/account/account-data.ts +0 -182
  142. package/templates/apps/web/app/[locale]/(authed)/account/account-frame.tsx +0 -353
  143. package/templates/apps/web/app/[locale]/(authed)/account/actions.ts +0 -57
  144. package/templates/apps/web/app/[locale]/(authed)/account/agreements-actions.ts +0 -58
  145. package/templates/apps/web/app/[locale]/(authed)/account/agreements-gate.ts +0 -61
  146. package/templates/apps/web/app/[locale]/(authed)/account/agreements-prompt.tsx +0 -184
  147. package/templates/apps/web/app/[locale]/(authed)/account/appointments/[slug]/page.tsx +0 -161
  148. package/templates/apps/web/app/[locale]/(authed)/account/appointments/__tests__/page.test.tsx +0 -426
  149. package/templates/apps/web/app/[locale]/(authed)/account/appointments/appointments-data.ts +0 -76
  150. package/templates/apps/web/app/[locale]/(authed)/account/appointments/page.tsx +0 -139
  151. package/templates/apps/web/app/[locale]/(authed)/account/artifacts/[pieceId]/page.tsx +0 -406
  152. package/templates/apps/web/app/[locale]/(authed)/account/artifacts/[pieceId]/pay-form.tsx +0 -65
  153. package/templates/apps/web/app/[locale]/(authed)/account/artifacts/[pieceId]/review-form.tsx +0 -172
  154. package/templates/apps/web/app/[locale]/(authed)/account/artifacts/[pieceId]/versions/[version]/file/route.ts +0 -190
  155. package/templates/apps/web/app/[locale]/(authed)/account/artifacts/__tests__/file-route.test.ts +0 -333
  156. package/templates/apps/web/app/[locale]/(authed)/account/artifacts/__tests__/page.test.tsx +0 -936
  157. package/templates/apps/web/app/[locale]/(authed)/account/artifacts/__tests__/pay.test.tsx +0 -193
  158. package/templates/apps/web/app/[locale]/(authed)/account/artifacts/__tests__/review.test.tsx +0 -476
  159. package/templates/apps/web/app/[locale]/(authed)/account/artifacts/artifact-actions.ts +0 -184
  160. package/templates/apps/web/app/[locale]/(authed)/account/artifacts/artifact-data.ts +0 -197
  161. package/templates/apps/web/app/[locale]/(authed)/account/artifacts/page.tsx +0 -182
  162. package/templates/apps/web/app/[locale]/(authed)/account/billing/__tests__/offerings.test.ts +0 -99
  163. package/templates/apps/web/app/[locale]/(authed)/account/billing/offerings.ts +0 -123
  164. package/templates/apps/web/app/[locale]/(authed)/account/billing/page.tsx +0 -424
  165. package/templates/apps/web/app/[locale]/(authed)/account/billing-source.ts +0 -303
  166. package/templates/apps/web/app/[locale]/(authed)/account/components/request-quote.tsx +0 -274
  167. package/templates/apps/web/app/[locale]/(authed)/account/error-row.tsx +0 -35
  168. package/templates/apps/web/app/[locale]/(authed)/account/for-you-labels.ts +0 -36
  169. package/templates/apps/web/app/[locale]/(authed)/account/general/__tests__/phone-verification.test.tsx +0 -215
  170. package/templates/apps/web/app/[locale]/(authed)/account/general/__tests__/seam-imports.test.ts +0 -65
  171. package/templates/apps/web/app/[locale]/(authed)/account/general/account-name.ts +0 -36
  172. package/templates/apps/web/app/[locale]/(authed)/account/general/billing-anchor.tsx +0 -27
  173. package/templates/apps/web/app/[locale]/(authed)/account/general/contact-actions.ts +0 -149
  174. package/templates/apps/web/app/[locale]/(authed)/account/general/contact-details.tsx +0 -42
  175. package/templates/apps/web/app/[locale]/(authed)/account/general/deletion-request.tsx +0 -132
  176. package/templates/apps/web/app/[locale]/(authed)/account/general/page.tsx +0 -218
  177. package/templates/apps/web/app/[locale]/(authed)/account/general/phone-actions.ts +0 -122
  178. package/templates/apps/web/app/[locale]/(authed)/account/general/phone-verification.tsx +0 -215
  179. package/templates/apps/web/app/[locale]/(authed)/account/general/photo-actions.ts +0 -73
  180. package/templates/apps/web/app/[locale]/(authed)/account/general/profile-form.tsx +0 -107
  181. package/templates/apps/web/app/[locale]/(authed)/account/general/profile-source.ts +0 -87
  182. package/templates/apps/web/app/[locale]/(authed)/account/inbox/[kind]/[id]/page.tsx +0 -119
  183. package/templates/apps/web/app/[locale]/(authed)/account/inbox/message/[id]/file/__tests__/route.test.ts +0 -215
  184. package/templates/apps/web/app/[locale]/(authed)/account/inbox/message/[id]/file/route.ts +0 -80
  185. package/templates/apps/web/app/[locale]/(authed)/account/inbox/thread/member-thread-composer.tsx +0 -43
  186. package/templates/apps/web/app/[locale]/(authed)/account/inbox/thread/page.tsx +0 -125
  187. package/templates/apps/web/app/[locale]/(authed)/account/inbox/thread/thread-data.ts +0 -88
  188. package/templates/apps/web/app/[locale]/(authed)/account/inbox/thread/thread-write.ts +0 -31
  189. package/templates/apps/web/app/[locale]/(authed)/account/invitations/[invitationId]/__tests__/invitation-id.test.ts +0 -35
  190. package/templates/apps/web/app/[locale]/(authed)/account/invitations/[invitationId]/__tests__/page.test.tsx +0 -266
  191. package/templates/apps/web/app/[locale]/(authed)/account/invitations/[invitationId]/actions.ts +0 -116
  192. package/templates/apps/web/app/[locale]/(authed)/account/invitations/[invitationId]/invitation-id.ts +0 -12
  193. package/templates/apps/web/app/[locale]/(authed)/account/invitations/[invitationId]/page.tsx +0 -154
  194. package/templates/apps/web/app/[locale]/(authed)/account/layout.tsx +0 -152
  195. package/templates/apps/web/app/[locale]/(authed)/account/new-actions.ts +0 -219
  196. package/templates/apps/web/app/[locale]/(authed)/account/new-menu.tsx +0 -365
  197. package/templates/apps/web/app/[locale]/(authed)/account/new-popups.tsx +0 -86
  198. package/templates/apps/web/app/[locale]/(authed)/account/notifications/page.tsx +0 -143
  199. package/templates/apps/web/app/[locale]/(authed)/account/onboarding/actions.ts +0 -120
  200. package/templates/apps/web/app/[locale]/(authed)/account/onboarding/onboarding-form.tsx +0 -322
  201. package/templates/apps/web/app/[locale]/(authed)/account/onboarding/page.tsx +0 -126
  202. package/templates/apps/web/app/[locale]/(authed)/account/page.tsx +0 -306
  203. package/templates/apps/web/app/[locale]/(authed)/account/privacy/__tests__/export-route.test.ts +0 -173
  204. package/templates/apps/web/app/[locale]/(authed)/account/privacy/actions.ts +0 -103
  205. package/templates/apps/web/app/[locale]/(authed)/account/privacy/export/route.ts +0 -102
  206. package/templates/apps/web/app/[locale]/(authed)/account/privacy/page.tsx +0 -240
  207. package/templates/apps/web/app/[locale]/(authed)/account/profile-actions.ts +0 -116
  208. package/templates/apps/web/app/[locale]/(authed)/account/retry-button.tsx +0 -27
  209. package/templates/apps/web/app/[locale]/(authed)/account/security/__tests__/hub-variant.test.tsx +0 -258
  210. package/templates/apps/web/app/[locale]/(authed)/account/security/page.tsx +0 -131
  211. package/templates/apps/web/app/[locale]/(authed)/account/security/security-panel.tsx +0 -130
  212. package/templates/apps/web/app/[locale]/(authed)/account/security/security-source.ts +0 -92
  213. package/templates/apps/web/app/[locale]/(authed)/account/settings/page.tsx +0 -24
  214. package/templates/apps/web/app/[locale]/(authed)/account/settings-frame.tsx +0 -121
  215. package/templates/apps/web/app/[locale]/(authed)/account/sign-in-method.ts +0 -37
  216. package/templates/apps/web/app/[locale]/(authed)/account/support/page.tsx +0 -60
  217. package/templates/apps/web/app/[locale]/(authed)/account/support/support-form.tsx +0 -98
  218. package/templates/apps/web/app/[locale]/(authed)/account/support-actions.ts +0 -100
  219. package/templates/apps/web/app/[locale]/checkout/__tests__/pages.test.tsx +0 -139
  220. package/templates/apps/web/app/[locale]/checkout/__tests__/thank-you-account.test.tsx +0 -146
  221. package/templates/apps/web/app/[locale]/checkout/thank-you/page.tsx +0 -114
  222. package/templates/apps/web/app/[locale]/checkout/unavailable/page.tsx +0 -51
  223. package/templates/apps/web/app/[locale]/flows/[slug]/FlowStepperClient.tsx +0 -614
  224. package/templates/apps/web/app/[locale]/flows/[slug]/__tests__/FlowStepperClient.count.test.tsx +0 -43
  225. package/templates/apps/web/app/[locale]/flows/[slug]/__tests__/FlowStepperClient.deliverable.test.tsx +0 -214
  226. package/templates/apps/web/app/[locale]/flows/[slug]/__tests__/FlowStepperClient.ending.test.tsx +0 -197
  227. package/templates/apps/web/app/[locale]/flows/[slug]/__tests__/FlowStepperClient.invite.test.tsx +0 -286
  228. package/templates/apps/web/app/[locale]/flows/[slug]/__tests__/FlowStepperClient.permalink.test.tsx +0 -520
  229. package/templates/apps/web/app/[locale]/flows/[slug]/__tests__/FlowStepperClient.test.tsx +0 -376
  230. package/templates/apps/web/app/[locale]/flows/[slug]/__tests__/FlowStepperClient.thanks-by-tier.test.tsx +0 -306
  231. package/templates/apps/web/app/[locale]/flows/[slug]/__tests__/account-invite.actions.test.ts +0 -69
  232. package/templates/apps/web/app/[locale]/flows/[slug]/__tests__/flow.actions.test.ts +0 -398
  233. package/templates/apps/web/app/[locale]/flows/[slug]/__tests__/magnet-page.test.tsx +0 -704
  234. package/templates/apps/web/app/[locale]/flows/[slug]/__tests__/save.actions.test.ts +0 -173
  235. package/templates/apps/web/app/[locale]/flows/[slug]/__tests__/two-route-tool.test.tsx +0 -141
  236. package/templates/apps/web/app/[locale]/flows/[slug]/__tests__/verify.test.tsx +0 -249
  237. package/templates/apps/web/app/[locale]/flows/[slug]/account-invite.actions.ts +0 -35
  238. package/templates/apps/web/app/[locale]/flows/[slug]/email-moment.ts +0 -92
  239. package/templates/apps/web/app/[locale]/flows/[slug]/flow.actions.ts +0 -177
  240. package/templates/apps/web/app/[locale]/flows/[slug]/magnet-page.tsx +0 -472
  241. package/templates/apps/web/app/[locale]/flows/[slug]/page.tsx +0 -48
  242. package/templates/apps/web/app/[locale]/flows/[slug]/results/[payload]/LevelChart.tsx +0 -100
  243. package/templates/apps/web/app/[locale]/flows/[slug]/results/[payload]/ResultsCard.tsx +0 -99
  244. package/templates/apps/web/app/[locale]/flows/[slug]/results/[payload]/ResultsClient.tsx +0 -820
  245. package/templates/apps/web/app/[locale]/flows/[slug]/results/[payload]/ResultsEmailStep.tsx +0 -203
  246. package/templates/apps/web/app/[locale]/flows/[slug]/results/[payload]/__tests__/ResultsClient.no-commerce.test.tsx +0 -194
  247. package/templates/apps/web/app/[locale]/flows/[slug]/results/[payload]/__tests__/ResultsClient.report.test.tsx +0 -284
  248. package/templates/apps/web/app/[locale]/flows/[slug]/results/[payload]/__tests__/by-result.test.tsx +0 -302
  249. package/templates/apps/web/app/[locale]/flows/[slug]/results/[payload]/__tests__/cards.test.tsx +0 -402
  250. package/templates/apps/web/app/[locale]/flows/[slug]/results/[payload]/__tests__/landing.test.tsx +0 -293
  251. package/templates/apps/web/app/[locale]/flows/[slug]/results/[payload]/__tests__/page.test.tsx +0 -485
  252. package/templates/apps/web/app/[locale]/flows/[slug]/results/[payload]/__tests__/score.test.tsx +0 -231
  253. package/templates/apps/web/app/[locale]/flows/[slug]/results/[payload]/checkout-seam.ts +0 -74
  254. package/templates/apps/web/app/[locale]/flows/[slug]/results/[payload]/meeting-seam.ts +0 -36
  255. package/templates/apps/web/app/[locale]/flows/[slug]/results/[payload]/page.tsx +0 -420
  256. package/templates/apps/web/app/[locale]/flows/[slug]/save.actions.ts +0 -85
  257. package/templates/apps/web/app/[locale]/flows/[slug]/served-flow.ts +0 -91
  258. package/templates/apps/web/app/[locale]/flows/[slug]/start/page.tsx +0 -32
  259. package/templates/apps/web/app/[locale]/flows/[slug]/verify/page.tsx +0 -153
  260. package/templates/apps/web/app/[locale]/flows/[slug]/verify.actions.ts +0 -151
  261. package/templates/apps/web/app/[locale]/meet/confirmed/BookingHandOff.tsx +0 -128
  262. package/templates/apps/web/app/[locale]/meet/confirmed/__tests__/BookingHandOff.test.tsx +0 -126
  263. package/templates/apps/web/app/[locale]/purchase/__tests__/cancel.test.tsx +0 -162
  264. package/templates/apps/web/app/[locale]/purchase/__tests__/module-scope.test.ts +0 -68
  265. package/templates/apps/web/app/[locale]/purchase/__tests__/success.test.tsx +0 -411
  266. package/templates/apps/web/app/[locale]/purchase/cancel/page.tsx +0 -115
  267. package/templates/apps/web/app/[locale]/purchase/success/page.tsx +0 -348
  268. package/templates/apps/web/app/api/auth/[...all]/route.ts +0 -16
  269. package/templates/apps/web/app/api/auth/hub/__tests__/continuation.test.ts +0 -143
  270. package/templates/apps/web/app/api/auth/hub/__tests__/entry-routes.test.ts +0 -749
  271. package/templates/apps/web/app/api/auth/hub/authorize/__tests__/route.test.ts +0 -964
  272. package/templates/apps/web/app/api/auth/hub/authorize/route.ts +0 -390
  273. package/templates/apps/web/app/api/auth/hub/continuation.ts +0 -127
  274. package/templates/apps/web/app/api/auth/hub/continue/[ref]/__tests__/route.test.ts +0 -188
  275. package/templates/apps/web/app/api/auth/hub/continue/[ref]/route.ts +0 -53
  276. package/templates/apps/web/app/api/auth/hub/email/route.ts +0 -111
  277. package/templates/apps/web/app/api/auth/hub/entry-shared.ts +0 -163
  278. package/templates/apps/web/app/api/auth/hub/password/__tests__/return.test.ts +0 -86
  279. package/templates/apps/web/app/api/auth/hub/password/__tests__/route.test.ts +0 -368
  280. package/templates/apps/web/app/api/auth/hub/password/return.ts +0 -86
  281. package/templates/apps/web/app/api/auth/hub/password/route.ts +0 -171
  282. package/templates/apps/web/app/api/auth/hub/purchase/route.ts +0 -230
  283. package/templates/apps/web/app/api/auth/hub/purchase-link/route.ts +0 -174
  284. package/templates/apps/web/app/api/auth/hub/sign-up/route.ts +0 -60
  285. package/templates/apps/web/app/api/auth/hub/sign-up-evidence.ts +0 -97
  286. package/templates/apps/web/app/api/auth/mcp/__tests__/continuation.test.ts +0 -92
  287. package/templates/apps/web/app/api/auth/mcp/continuation.ts +0 -89
  288. package/templates/apps/web/app/api/auth/mcp/continue/[ref]/__tests__/route.test.ts +0 -59
  289. package/templates/apps/web/app/api/auth/mcp/continue/[ref]/route.ts +0 -41
  290. package/templates/apps/web/app/api/hub-session/__tests__/routes.test.ts +0 -1166
  291. package/templates/apps/web/app/api/hub-session/callback/route.ts +0 -134
  292. package/templates/apps/web/app/api/hub-session/email/route.ts +0 -125
  293. package/templates/apps/web/app/api/hub-session/one-tap/nonce/route.ts +0 -49
  294. package/templates/apps/web/app/api/hub-session/one-tap/route.ts +0 -106
  295. package/templates/apps/web/app/api/hub-session/open/route.ts +0 -111
  296. package/templates/apps/web/app/api/hub-session/password/return/route.ts +0 -69
  297. package/templates/apps/web/app/api/hub-session/password/route.ts +0 -106
  298. package/templates/apps/web/app/api/hub-session/sign-in/route.ts +0 -91
  299. package/templates/apps/web/app/api/hub-session/sign-out/route.ts +0 -54
  300. package/templates/apps/web/components/sign-out-trigger.tsx +0 -62
  301. package/templates/apps/web/lib/__tests__/account-config.test.ts +0 -704
  302. package/templates/apps/web/lib/__tests__/auth-routes.test.ts +0 -140
  303. package/templates/apps/web/lib/account-config.ts +0 -678
  304. package/templates/apps/web/lib/auth-routes.ts +0 -125
  305. package/templates/apps/web/lib/checkout-config.ts +0 -16
  306. package/templates/apps/web/lib/hub-session/__tests__/hub-session.test.ts +0 -433
  307. package/templates/apps/web/lib/hub-session/__tests__/spoke-sign-in.test.tsx +0 -332
  308. package/templates/apps/web/lib/hub-session/config.ts +0 -110
  309. package/templates/apps/web/lib/hub-session/entry.ts +0 -238
  310. package/templates/apps/web/lib/hub-session/index.ts +0 -21
  311. package/templates/apps/web/lib/hub-session/one-tap.tsx +0 -148
  312. package/templates/apps/web/lib/hub-session/reseal.ts +0 -90
  313. package/templates/apps/web/lib/hub-session/seal.ts +0 -86
  314. package/templates/apps/web/lib/hub-session/session.ts +0 -298
  315. package/templates/apps/web/lib/hub-session/spoke-sign-in.tsx +0 -277
  316. package/templates/apps/web/lib/next-path.ts +0 -35
  317. package/templates/apps/web/src/lib/__tests__/commerce-sections.test.ts +0 -57
  318. package/templates/apps/web/src/lib/commerce-sections.ts +0 -55
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-ailk",
3
- "version": "0.37.1",
3
+ "version": "0.39.0",
4
4
  "description": "Scaffolder for AI Launch Kit — `pnpm create ailk@latest <dir>` produces a starter repo consuming @working-theory/* from npm (per ADR 0007).",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -28,8 +28,8 @@
28
28
  "tar": "^7.5.21"
29
29
  },
30
30
  "devDependencies": {
31
- "@working-theory/templates": "0.61.0",
32
- "@working-theory/schema": "0.61.0"
31
+ "@working-theory/schema": "0.63.0",
32
+ "@working-theory/templates": "0.63.0"
33
33
  },
34
34
  "repository": {
35
35
  "type": "git",
@@ -139,7 +139,7 @@ You need Postgres once you turn on one of these:
139
139
  | -------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
140
140
  | **Auth** — `/sign-in`, `/sign-up`, `/account` | users, sessions, accounts |
141
141
  | **Lead inbox** — `/leads` | submitted leads, for you to review signed in, and newsletter signups. Without a database, lead capture emails each contact-form message to you instead (`RESEND_API_KEY` + `AILK_LEAD_NOTIFICATION_TO` + `AILK_LEAD_NOTIFICATION_FROM` on the API); with neither in production, `/contact` shows your `_site.mdx` `contactEmail` instead of the form. `/ailk:growth-ops database` walks you from no database to a working inbox. |
142
- | **Checkout returns** — `/purchase/success`, `/purchase/cancel` | the paid checkouts the Stripe webhook records. These pages serve only on a site licensed for commerce. |
142
+ | **Checkout returns** — `/purchase/success`, `/purchase/cancel` | the paid checkouts the Stripe webhook records. These pages serve only on a site carrying the commerce module and licensed for it. |
143
143
  | **`CONTENT_ADAPTER=database`** | pages authored in the Artifact store rather than in `content/*.mdx` |
144
144
 
145
145
  ### One command to get one
@@ -137,7 +137,7 @@ Every tool maps 1:1 to an `apps/api` endpoint. When you change a tool, change th
137
137
 
138
138
  - **22 in the `TOOLS` array / parity test**: the `TOOLS` array in
139
139
  `packages/metadata/src/mcp-tool-catalog.ts` defines 22 anonymous tools; the
140
- parity test counts that full array. It also holds the fifty-eight signed-in
140
+ parity test counts that full array. It also holds the sixty signed-in
141
141
  workspace tools (#3591; the content-suggestion pair `draft_page_suggestions`
142
142
  and `decide_page_suggestion` since #10218; the draft pair `save_draft` and
143
143
  `read_report` since #10336; the knowledge-base pair `read_knowledge` and
@@ -187,7 +187,7 @@ here. Spec: `docs/specs/3591-tenant-scoped-agent-auth-secure-spec.md` D13–D16.
187
187
  - **apps/mcp checks only the key's shape.** The key is attached as the SDK's `req.auth` for that
188
188
  request alone and reaches a tool as `extra.authInfo.token`. apps/api is the one place it is
189
189
  checked, and its tenant guard and the caller's clamped role decide every answer.
190
- - **Fifty-eight tools (fifty-five plus three deprecated aliases), each a `twin`.** The catalog rows carry `surface: "workspace"`, `tier: "pro"`
190
+ - **Sixty tools (fifty-seven plus three deprecated aliases), each a `twin`.** The catalog rows carry `surface: "workspace"`, `tier: "pro"`
191
191
  and `modulesAnyOf` (the modules any one of which registers the tool — its twin route's gate):
192
192
  `get_agent_context`, (#9683) `get_workspace_knowledge` — twin of `GET
193
193
  /v1/workspaces/:workspaceId/knowledge`: the business's shown offerings, live magnets, listed
@@ -314,7 +314,9 @@ Example (lead routing):
314
314
  - Don't add a tool without the matching `apps/api` endpoint.
315
315
  - Don't put business logic in tool handlers — they're adapters.
316
316
 
317
- Last updated: 2026-11-08 — #11122 (D4, D5, D12): `list_meeting_types` loses `include` and its rows carry `visibility`, `providerEventTypeId`, `createdAt` and (manage view) `providerEditUrl`; `save_meeting_types`' two lists are exclusive; `list_appointments` takes `eventTypeId` — verified against `packages/metadata/src/mcp-tool-catalog.ts` and `tests/parity/api-parity/fixtures/site-wire.ts`.
317
+ Last updated: 2026-11-09 — #11275 unit E: `set_doc_class` and `write_memory` (`mcp-workspace`'s `knowledge_base.ts`, `content-edit` grant) twin `PUT …/knowledge-base/class` and `POST …/knowledge-base/memory` — set a doc's or a File's context class, and write a dated Memory entry or mark one stale; each takes its route's params and one flat `@working-theory/validation` body — the signed-in workspace surface is sixty tools — verified against `packages/metadata/src/mcp-tool-catalog.ts`, `packages-paid/mcp-workspace/src/index.ts` and `tests/parity/api-parity/kinds/site.ts`.
318
+
319
+ Prior: 2026-11-08 — #11122 (D4, D5, D12): `list_meeting_types` loses `include` and its rows carry `visibility`, `providerEventTypeId`, `createdAt` and (manage view) `providerEditUrl`; `save_meeting_types`' two lists are exclusive; `list_appointments` takes `eventTypeId` — verified against `packages/metadata/src/mcp-tool-catalog.ts` and `tests/parity/api-parity/fixtures/site-wire.ts`.
318
320
 
319
321
  Prior: 2026-11-06 — #10952 (D1–D6): `delete_language_item` (`mcp-workspace`'s `language.ts`) twins `DELETE …/language/:kind/:slug`, whose blanket agent refusal becomes the Live switch's `content-publish` gate — the signed-in workspace surface gains one tool — verified against `packages/metadata/src/mcp-tool-catalog.ts`, `packages-paid/mcp-workspace/src/index.ts`, `packages-paid/api-workspace/src/routes/workspaces/language.ts` and `tests/parity/api-parity/kinds/site.ts`.
320
322
 
@@ -68,6 +68,26 @@ Don't ship a page after one render. The expected per-page loop:
68
68
 
69
69
  ## The `(auth)` route group — which predicate an affordance keys on
70
70
 
71
+ **Where it lives (#11257, ADR 0040 phase 2).** The `(auth)` pages and their
72
+ actions, the spoke's hub-session client, the hub's `/api/auth` routes and the
73
+ spoke's `/api/hub-session` routes ship in `@working-theory/auth`
74
+ (`packages/auth/src/{pages,hub-session,api}/`), with their tests. This app's
75
+ `app/[locale]/(auth)/`, `app/api/auth/` and `app/api/hub-session/` hold only
76
+ the 25 route files `create-ailk routes --write` generates from the package's
77
+ `routes.json` — never hand-edited, pinned by `routes --check`. The package
78
+ reads the site through one typed file, `auth.config.tsx`: `defineAuthConfig({})`
79
+ (no extension point yet) and its `site` export, which answers the
80
+ `@working-theory/auth/site` seam (`next.config.mjs` and `jest.config.cjs`
81
+ alias it to that file). Better Auth reaches the package only through the
82
+ topology seam's `loadAuth()` — `auth.config.tsx` never imports `auth.ts` —
83
+ and an `/api/auth` route whose load is `null` answers 404 with no body.
84
+ `middleware.ts` keeps its header maps and calls `@working-theory/auth/edge`
85
+ for the auth half and the path predicates; that entry imports nothing. The
86
+ `auth`, `signIn`, `mcpConsent` and `spokeSignIn` strings ship in the package
87
+ (`authMessages`, merged by `i18n/request.ts`); a key in `messages/en.json` is
88
+ an override. The paths below name the package's files by their old
89
+ `lib/`/`app/` place; `lib/auth-env.ts` itself stays the site's.
90
+
71
91
  `lib/auth-env.ts` exports two reset predicates, and they are not
72
92
  interchangeable. Picking the wrong one is how this surface has broken twice
73
93
  (#6018, then #6061 — the follow-up #6068 documents the rule here so there is
@@ -171,7 +191,7 @@ both telemetry scrub lists.
171
191
 
172
192
  **A spoke's sign-in entry is the spoke's own form (#11096).** On a spoke
173
193
  that signs in through its hub, the gate seam renders
174
- `lib/hub-session/spoke-sign-in.tsx` (`SpokeSignIn`) for every signed-out
194
+ `@working-theory/auth/hub-session`'s `SpokeSignIn` for every signed-out
175
195
  `(authed)` path: one email field, the hub's sign-up agreements under "New
176
196
  here?" (read from the hub web's `GET /api/auth/hub/sign-up`, shared 60 s, each
177
197
  policy link the hub's) and Continue with Google — a native form, no password
@@ -219,7 +239,7 @@ server to server as the spoke's client: the hub API's
219
239
  a live grant of THIS client, and the hub web mints Better Auth's own
220
240
  `reset-password:<token>` row and mails the link through the signed relay, its
221
241
  `callbackURL` the hub's `/reset-password` carrying a sealed `?ref=` of the
222
- client's REGISTERED origin plus the Security path (`app/api/auth/hub/password/return.ts`).
242
+ client's REGISTERED origin plus the Security path (the package's `api/auth/hub/password/return.ts`).
223
243
  `resetSendConfigured()` is checked before that API call, which charges the
224
244
  send budgets. A completed reset ends every spoke credential
225
245
  (`onPasswordReset`), so the hub's page returns the person to the spoke's
@@ -412,7 +432,23 @@ The scheduling module's booking pages (#8843) read every meeting fact from
412
432
  the workspace — no content file, env var or deploy sits between a Meetings or
413
433
  Cal.com edit and the page.
414
434
 
415
- - **One builder.** `lib/meetings.tsx` reads `GET /v1/schedule/meetings`
435
+ - **Where they live (#11252, ADR 0040).** The pages, their index frame and
436
+ their builder ship in `@working-theory/ui-scheduling`
437
+ (`packages-paid/ui-scheduling/src/pages/`, `src/meetings.tsx`), with their
438
+ tests. This app's `app/[locale]/meet/` and `app/[locale]/private/` hold
439
+ only the four route files `create-ailk routes --write` generates from the
440
+ package's `routes.json` — each `// oss: false`, never hand-edited, pinned by
441
+ `routes --check` (the private index's `sitemap.test.ts` is this app's own
442
+ suite). The pages read the site through one typed file,
443
+ `scheduling.config.tsx` (`defineSchedulingConfig({ site })`: the locale
444
+ guard, the contact email, the site identity and the brand — the host seam,
445
+ no extension point), which the generated `/meet`, `/meet/<slug>` and
446
+ `/private` files pass in as `config`. The `schedule` strings ship in the
447
+ package (`schedulingMessages`), merged under this app's catalog by
448
+ `i18n/request.ts` through `lib/paid-sections.generated.ts`'s
449
+ `loadUiScheduling()`; `messages/en.json` keeps `schedule.bookLength` (the
450
+ flows results layout's key) and a site key there is an override.
451
+ - **One builder.** `meetings.tsx` reads `GET /v1/schedule/meetings`
416
452
  through `schedule.meetings()`, re-parses the body with `MeetingListSchema`
417
453
  and shares the result per server instance for 15 seconds (concurrent and
418
454
  failed reads too, the contact page's #8731 shape). Any failure is
@@ -422,9 +458,7 @@ Cal.com edit and the page.
422
458
  meeting page's booker (`meetingPageSections`: `scheduler-embed`, provider
423
459
  `cal`, month view). Every visible string is a `schedule` message.
424
460
  - **`/meet` and `/private`** both return `MeetingIndex`
425
- (`app/[locale]/meet/meeting-index.tsx` — beside the route, because it
426
- renders the paid `BookingProfileHeader`, which `architecture.yaml` admits
427
- only there): the back link alone (`Nav` `bar="bare"` `bareMark={false}`),
461
+ (`pages/meet/meeting-index.tsx` in the package): the back link alone (`Nav` `bar="bare"` `bareMark={false}`),
428
462
  the header's avatar and one H1, then the cards of that visibility. One
429
463
  meeting redirects to `/meet/<slug>`; none, or a failed read, shows the
430
464
  site's contact email — never a 404 or a 500. `/private` is
@@ -438,7 +472,7 @@ Cal.com edit and the page.
438
472
  fallback title — its sections are never rendered here.
439
473
  - **Chrome.** `lib/modules.generated.ts`'s `SCHEDULING_PAGES` (written by
440
474
  create-ailk from `apps/web/package.json`, never copied by `update`) and
441
- `lib/auth-routes.ts`'s `isBookingPath` make the locale layout drop the
475
+ `@working-theory/auth/edge`'s `isBookingPath` make the locale layout drop the
442
476
  marketing shell on `/meet`, `/meet/<slug>` and `/private`; `/meet/confirmed`
443
477
  and a site without the module keep it. The consent banner stays.
444
478
  - **The CSP (D12).** `security-headers.config.ts` exports `SCHEDULING_CSP`
@@ -617,25 +651,47 @@ the generated checkout e2e workflow — is retired (#9142). `create-ailk
617
651
  sync-routes --apply` removes them from an existing spoke when they are still
618
652
  the copies create-ailk wrote, and names any it leaves.
619
653
 
620
- What a spoke that carries `commerce` still gets (#8748), kept current by
621
- `create-ailk update`; a hub, or a spoke without `commerce`, never gets them:
622
-
623
- - **The two return pages.** `app/[locale]/checkout/thank-you/page.tsx` and
624
- `app/[locale]/checkout/unavailable/page.tsx`. Both call `notFound()` unless
625
- `lib/topology.generated.ts`'s `TOPOLOGY` is `"spoke"`, so this monorepo's
626
- hub-shaped `apps/web` serves neither.
654
+ What a site that carries `commerce` gets (#8748, #11253); a site without
655
+ `commerce` gets none of it:
656
+
657
+ - **The four return pages, from the package.** `/checkout/thank-you`,
658
+ `/checkout/unavailable`, `/purchase/success` and `/purchase/cancel` ship in
659
+ `@working-theory/ui-commerce` (`packages-paid/ui-commerce/src/pages/`, with
660
+ their tests, ADR 0040). This app's `app/[locale]/checkout/` and
661
+ `app/[locale]/purchase/` hold only the four route files `create-ailk routes
662
+ --write` generates from the package's `routes.json` — each `// oss: false`,
663
+ never hand-edited, pinned by `routes --check`. The two checkout pages call
664
+ `notFound()` — in the page and in `generateMetadata` — unless the site's
665
+ topology is `"spoke"`, so this monorepo's hub-shaped `apps/web` serves
666
+ neither; the two purchase pages serve only while the licence holds the
667
+ `commerce` claim, read per request and fail-closed. A site holding the claim
668
+ without the module has no purchase pages (reversing #6084 D12): it adds them
669
+ with `create-ailk add-module commerce`, then the install and `routes --write`.
670
+ - **One typed config.** The pages read this site through
671
+ `commerce.config.tsx` (`defineCommerceConfig({ site })`: the topology, the
672
+ checkout stamp, `accountInviteHref`, `resolveCommerceClaim` and the
673
+ per-visitor limiter — the host seam, no extension point), which every
674
+ generated route passes in as `config` (the checkout pair's
675
+ `generateMetadata` too). The `checkoutThankYou`, `checkoutUnavailable` and
676
+ `purchase` strings ship in the package (`commerceMessages`), merged under
677
+ this app's catalog by `i18n/request.ts` through `loadUiCommerce()`; a key in
678
+ `messages/en.json` is an override.
627
679
  - **One data file.** `lib/checkout-config.ts` is the site's stamp,
628
- `checkoutConfig.site`, and nothing else: no import and no code.
629
- `create-ailk update` never rewrites it.
630
- - **One package reader.** The thank-you page may import
680
+ `checkoutConfig.site`, and nothing else: no import and no code. The commerce
681
+ bundle delivers it with the placeholder `example-site`, and on a spoke
682
+ create-ailk stamps that one line in place (a valid site value is kept, an
683
+ invalid one refused); `create-ailk update` never rewrites it. A hub carries
684
+ it unread.
685
+ - **One package reader.** The package's thank-you page may import
631
686
  `@working-theory/spoke-checkout` for `readPaidCheckoutEmail` alone
632
- (`architecture.yaml`, #8757 D13): it reads `session_id`, and for a paid
687
+ (`architecture.yaml` names `packages-paid/ui-commerce/src/pages/checkout/thank-you/page.tsx`,
688
+ #8757 D13); no file in this app may. It reads `session_id`, and for a paid
633
689
  session of this site under 24 hours old shows "Open your account" with the
634
690
  buyer's email (`accountInviteHref`), else the same link with no email. Each
635
- visitor gets 10 reads per 10 minutes (`src/lib/rate-limit.ts`); the page
636
- sends no referrer, renders dynamically and never touches a cookie. The read
637
- admits the spoke's `STRIPE_SECRET_KEY` from `process.env`; that key never
638
- sells.
691
+ visitor gets 10 reads per 10 minutes (`src/lib/rate-limit.ts`, through the
692
+ config); the page sends no referrer, renders dynamically and never touches a
693
+ cookie. The read admits the spoke's `STRIPE_SECRET_KEY` from `process.env`;
694
+ that key never sells.
639
695
  - **The billing action (a spoke that signs in through its hub).** create-ailk
640
696
  renders `app/[locale]/(authed)/account/billing/spoke-billing.action.ts`,
641
697
  which builds the package's billing reads from `checkoutConfig.site` and
@@ -660,6 +716,8 @@ A visitor's browser never calls the hub. Lead capture, newsletter signup, callba
660
716
 
661
717
  A site serves its docs at `/docs` unless `content/_site.mdx` sets a top-level `docsPath` (one to four lowercase kebab segments, leading slash, no trailing slash — e.g. `docsPath: /working-theory/docs`, #10041). The route never moves: it stays at `app/[locale]/docs/`, and every surface reads the one value through `lib/docs-path.ts` (`DOCS_PATH`, `toPublicDocsHref`).
662
718
 
719
+ - **Where the pages live (#11254, ADR 0040).** The `/docs` and `/blog` catch-alls ship in `@working-theory/ui-docs-blog` (`packages-paid/ui-docs-blog/src/pages/`), with their loaders — the runtime source and the two blog route adapters — and their tests. This app's `app/[locale]/docs/` and `app/[locale]/blog/` hold only the two route files `create-ailk routes --write` generates from the package's `routes.json` — each `// oss: false`, never hand-edited, pinned by `routes --check`. The site keeps what is built from its own content — `source.config.ts`, `lib/source.ts` (which hands the package's runtime source `DOCS_PATH`) and the codegen stub — and passes it in through one typed file, `docs-blog.config.tsx` (`defineDocsBlogConfig({ site })`: the two source resolvers, `DOCS_PATH`, `toPublicDocsHref` and `getOgImageUrl` — the host seam, no extension point), which both generated files pass to the page and to `generateMetadata` as `config`. The `docs` and `blog` strings ship in the package (`docsBlogMessages`), merged under this app's catalog by `i18n/request.ts` through `loadUiDocsBlog()`; a key in `messages/en.json` is an override.
720
+
663
721
  - **Build.** `next.config.mjs` reads `docsPath`, bakes it into `NEXT_PUBLIC_AILK_DOCS_PATH`, and fails the build naming the value when it breaks the pattern, starts with `api`, `og`, `v1` or an enabled locale, sits under `/docs`, shadows a `ROUTES` page (a `:param` segment matches any segment, so `/products/docs` is refused) or sits under a catch-all (`/blog/...`), or when this site's `lib/source.ts` does not set `baseUrl: DOCS_PATH` — a site with no docs-blog module, or one whose docs-blog files predate the setting. Links inside a doc's body are re-pointed only on a site that sets `docsPath`; there they render through `Link`, which forwards a fixed prop set, so a body anchor's `title` / `target` / `rel` are not kept.
664
722
  - **Request.** `middleware.ts` hands next-intl the internal `/docs/...` path for a request at or under `docsPath` (bare or locale-prefixed), so the browser keeps the public URL, and maps a redirect's `Location` and each hreflang `Link` entry back onto it. `/docs` and `/docs/...` answer with the site's 404 — rewritten to `/_ailk-docs-unmounted`, whose first segment is no locale, so the locale layout calls `notFound()`.
665
723
  - **Surfaces.** The docs sidebar, index and search index (both sources' `baseUrl`), the doc's breadcrumb, links inside a doc's body, every nav and footer entry at `/docs` (mapped at render in the locale layout; `nav-config.ts` is never edited), and the docs entries in `/sitemap.xml` and `/llms.txt` (`lib/docs-index.ts`, default locale only) all follow it. A site with no `docsPath` serves every URL exactly as before.
@@ -709,7 +767,13 @@ A list page whose frontmatter sets `navOnly: true` (valid on a registry list typ
709
767
  - Don't reach into `apps/api` or `apps/mcp` from `apps/web`. They're peer apps — talk via HTTP/MCP.
710
768
  - Don't commit images to `screenshots/` — only the `.gitkeep` is tracked.
711
769
 
712
- Last updated: 2026-11-08 — § The `(auth)` route group: a spoke's Security tab hosts the Password row and the hub does the sending — the spoke's `POST /api/hub-session/password` and `GET /api/hub-session/password/return`, the hub's `POST /api/auth/hub/password` and its sealed return ref (#11162, #11190) — verified against `app/api/hub-session/password/{route.ts,return/route.ts}`, `app/api/auth/hub/password/{route.ts,return.ts}` and `app/[locale]/(authed)/account/security/{page.tsx,security-source.ts}`.
770
+ Last updated: 2026-11-10 — § The `(auth)` route group: sign-in, the hub session and the auth routes ship in `@working-theory/auth`, this app holds their 25 generated route files and `auth.config.tsx`, Better Auth reaches the package through `loadAuth()`, and the middleware's auth half is the package's edge entry (#11257) — verified against `packages/auth/{routes.json,src/site.ts,src/edge.ts}`, `auth.config.tsx`, `middleware.ts`, `lib/topology.generated.ts` and `i18n/request.ts`.
771
+
772
+ Prior: 2026-11-10 — § Where the docs live: the docs and blog pages and their loaders ship in `@working-theory/ui-docs-blog`, this app holds their two generated route files and `docs-blog.config.tsx`, and the `docs` and `blog` strings ship in the package (#11254) — verified against `packages-paid/ui-docs-blog/{routes.json,src/config.ts,src/pages/}`, `docs-blog.config.tsx`, `lib/source.ts` and `i18n/request.ts`.
773
+
774
+ Prior: 2026-11-10 — § Spoke checkout: the checkout and purchase return pages ship in `@working-theory/ui-commerce`, this app holds their generated route files and `commerce.config.tsx`, the strings ship in the package, the stamp is bundle-delivered and stamped in place on a spoke, and the purchase pair is module-carried (#11253) — verified against `packages-paid/ui-commerce/{routes.json,src/config.ts,src/pages/}`, `commerce.config.tsx`, `i18n/request.ts` and create-ailk's `spoke-checkout.ts`.
775
+
776
+ Prior: 2026-11-08 — § The `(auth)` route group: a spoke's Security tab hosts the Password row and the hub does the sending — the spoke's `POST /api/hub-session/password` and `GET /api/hub-session/password/return`, the hub's `POST /api/auth/hub/password` and its sealed return ref (#11162, #11190) — verified against `app/api/hub-session/password/{route.ts,return/route.ts}`, `app/api/auth/hub/password/{route.ts,return.ts}` and `app/[locale]/(authed)/account/security/{page.tsx,security-source.ts}`.
713
777
 
714
778
  Prior: 2026-11-07 — § The `(auth)` route group: a spoke's sign-in entry is the spoke's own form — the email route, Google's `provider_hint`, the purchase link's "Open my account", the billing Purchases list and One Tap with its CSP (#11096) — verified against `lib/hub-session/{spoke-sign-in.tsx,entry.ts,one-tap.tsx,session.ts}`, `app/api/hub-session/{email,open,one-tap}/` and `middleware.ts`.
715
779
 
@@ -15,9 +15,13 @@
15
15
  // `next-intl/server`, in any copy, lands here. Per-test `jest.mock(
16
16
  // "next-intl/server", …)` overrides still work — jest resolves the specifier
17
17
  // through the mapper first, so the override and the consumer agree.
18
+ import authMsgs from "@working-theory/auth/messages/en";
19
+
18
20
  import msgs from "../../messages/en.json";
19
21
 
20
- const catalog = msgs as unknown as Record<string, Record<string, string>>;
22
+ // The sign-in package's catalog is merged under this site's, as
23
+ // `i18n/request.ts` merges it (#11257 D12).
24
+ const catalog = { ...authMsgs, ...msgs } as unknown as Record<string, Record<string, string>>;
21
25
 
22
26
  // Handles both call forms used in apps/web routes:
23
27
  // getTranslations("namespace") — pre-migration routes
@@ -1,9 +1,13 @@
1
1
  // Canonical `next-intl` stand-in for this workspace's Jest runs.
2
2
  // Mapped rather than only `jest.mock()`d for the same reason as
3
3
  // ./next-intl-server.ts — see that file's header.
4
+ import authMsgs from "@working-theory/auth/messages/en";
5
+
4
6
  import msgs from "../../messages/en.json";
5
7
 
6
- const catalog = msgs as unknown as Record<string, Record<string, string>>;
8
+ // The sign-in package's catalog is merged under this site's, as
9
+ // `i18n/request.ts` merges it (#11257 D12).
10
+ const catalog = { ...authMsgs, ...msgs } as unknown as Record<string, Record<string, string>>;
7
11
 
8
12
  export const useTranslations =
9
13
  (namespace: string) =>
@@ -0,0 +1,34 @@
1
+ /**
2
+ * @jest-environment node
3
+ *
4
+ * The sign-in package's seam resolves to this site's `auth.config.tsx`, not
5
+ * to the package's stub (#11257 D4, SEC-11257-1, AC-5). A build or a suite
6
+ * that lost the alias would bind the stub, whose every read throws; this
7
+ * suite is the check that runs before any request, as
8
+ * `create-ailk routes --check` is for `next.config.mjs`. A template file:
9
+ * every site carries it, hub or spoke.
10
+ */
11
+ import { isSeamStub } from "@working-theory/auth";
12
+ import { site } from "@working-theory/auth/site";
13
+
14
+ import authConfig from "../../auth.config";
15
+
16
+ describe("@working-theory/auth/site is this site's auth.config.tsx (#11257 AC-5)", () => {
17
+ it("is not the package's stub", () => {
18
+ expect(isSeamStub(site)).toBe(false);
19
+ });
20
+
21
+ it("carries the site's Better Auth loader and its sign-in configuration", () => {
22
+ expect(typeof site.loadAuth).toBe("function");
23
+ expect(typeof site.env.resetSendConfigured).toBe("function");
24
+ });
25
+
26
+ it("binds the hub-only services exactly on a hub", () => {
27
+ expect(["hub", "spoke"]).toContain(site.topology);
28
+ expect(site.hub === null).toBe(site.topology === "spoke");
29
+ });
30
+
31
+ it("the default export is defineAuthConfig({})", () => {
32
+ expect(authConfig).toEqual({});
33
+ });
34
+ });
@@ -0,0 +1,100 @@
1
+ /**
2
+ * account.config.tsx — this site's account configuration (ADR 0040 rule 4;
3
+ * #11219, #11227), the ONE typed file through which the site customizes the
4
+ * pages `@working-theory/account` ships. The route files `create-ailk routes`
5
+ * generates under `app/[locale]/(authed)/account/` import this default export
6
+ * and pass it to each page and layout that takes it as its `config` prop.
7
+ *
8
+ * The default export carries exactly the six extension points (rule 8). The
9
+ * base area's own contributions come from the package; a module appends its
10
+ * entries to the lists below, and this site appends its own Billing sections
11
+ * from `lib/site-contributions.ts` (#9401 D7). A misspelled key here fails
12
+ * `tsc` — `defineAccountConfig` is typed to its argument.
13
+ *
14
+ * `experimentKeys` lists the `experimentKey`s of the diagnostics this site
15
+ * runs (none in the template); the base `result` Inbox kind reads the same
16
+ * list, so it is declared once and passed to both.
17
+ *
18
+ * The named export `site` is the host's runtime-services seam (conductor
19
+ * ruling on #11219, option (a)): `next.config.mjs` aliases
20
+ * `@working-theory/account/site` to this file (and `jest.config.cjs` maps
21
+ * it), so the package's pages AND its `"use server"` actions — which no prop
22
+ * can reach — read the session, the request init, the sign-in setup, the
23
+ * brand and the Offerings reads from here. It is not a customization slot:
24
+ * its shape is `AccountSite`, fixed by the package, and a missing member
25
+ * fails `tsc`. It imports only `lib/` files every topology carries; the
26
+ * hub-only services reach `auth.ts` through the generated topology seam.
27
+ */
28
+ import { type AccountSite, defineAccountConfig } from "@working-theory/account";
29
+ import { baseForYouSources, baseInboxKinds, baseNewActions } from "@working-theory/account/contributions";
30
+ import { hubSessionHubOrigin, resealHubSession } from "@working-theory/auth/hub-session";
31
+ import { cookies } from "next/headers";
32
+
33
+ import { getActiveProviderIds, resetSendConfigured } from "./lib/auth-env";
34
+ import { consentPoliciesFor } from "./lib/consent-policies";
35
+ import { consentVisitorHeader, readConsentVisitor } from "./lib/consent-visitor";
36
+ import { formatMinorUnits, offeringsCheckoutHref } from "./lib/offerings-pricing";
37
+ import { readShownOfferings } from "./lib/pricing-page";
38
+ import { forwardedCookieInit } from "./lib/server-api";
39
+ import { SITE_NAME } from "./lib/site-brand";
40
+ import { siteBillingSections } from "./lib/site-contributions";
41
+ import { siteLogo } from "./lib/site-logo";
42
+ import {
43
+ loadPhoneApi,
44
+ loadSpokeBilling,
45
+ readOwnAccounts,
46
+ readPhoneStep,
47
+ readSession,
48
+ SIGN_IN_PATH,
49
+ SIGN_IN_PROVIDER,
50
+ SIGN_OUT_ENDPOINT,
51
+ TOPOLOGY,
52
+ } from "./lib/topology.generated";
53
+
54
+ const experimentKeys: readonly string[] = [];
55
+
56
+ export default defineAccountConfig({
57
+ experimentKeys,
58
+ inboxKinds: baseInboxKinds(experimentKeys),
59
+ settingsSections: [],
60
+ newActions: baseNewActions,
61
+ billingSections: siteBillingSections,
62
+ forYouSources: baseForYouSources,
63
+ });
64
+
65
+ // The topology constants are read through on every access, never copied at
66
+ // load, so the seam always answers what the generated file answers.
67
+ export const site = {
68
+ get topology() {
69
+ return TOPOLOGY;
70
+ },
71
+ get signInProvider() {
72
+ return SIGN_IN_PROVIDER;
73
+ },
74
+ get signInPath() {
75
+ return SIGN_IN_PATH;
76
+ },
77
+ get signOutEndpoint() {
78
+ return SIGN_OUT_ENDPOINT;
79
+ },
80
+ siteName: SITE_NAME,
81
+ siteLogo,
82
+ readSession,
83
+ readOwnAccounts,
84
+ readPhoneStep,
85
+ loadPhoneApi,
86
+ loadSpokeBilling,
87
+ forwardedCookieInit,
88
+ resealHubSession,
89
+ activeProviderIds: getActiveProviderIds,
90
+ hubOrigin: () => hubSessionHubOrigin(),
91
+ resetSendConfigured,
92
+ consentPoliciesFor,
93
+ async consentVisitorHeaders() {
94
+ const visitorId = readConsentVisitor(await cookies());
95
+ return visitorId ? consentVisitorHeader(visitorId) : {};
96
+ },
97
+ readShownOfferings,
98
+ formatMinorUnits,
99
+ offeringsCheckoutHref,
100
+ } satisfies AccountSite;
@@ -82,7 +82,7 @@ jest.mock("../../../../../../lib/topology.generated", () => {
82
82
  };
83
83
  });
84
84
 
85
- import { mintContinuation } from "../../../../../api/auth/hub/continuation";
85
+ import { mintContinuation } from "@working-theory/auth/testing";
86
86
  import Page, { generateMetadata } from "../page";
87
87
 
88
88
  const SPOKE_ORIGIN = "https://spoke.example.com";
@@ -19,7 +19,9 @@
19
19
  * Referer while the browser still sends the real `Origin` on Continue.
20
20
  */
21
21
 
22
+ import { accountSession } from "@working-theory/account/account-data";
22
23
  import { hubSignIn } from "@working-theory/api-client";
24
+ import { openContinuation } from "@working-theory/auth/hub-continuation";
23
25
  import { localeHref } from "@working-theory/ui";
24
26
  import { Button, Heading, Input, Link, Text } from "@working-theory/ui/primitives";
25
27
  import { hubAuthorizeQuerySchema, type HubAuthorizeQuery } from "@working-theory/validation";
@@ -30,8 +32,6 @@ import type { ReactElement } from "react";
30
32
 
31
33
  import { resolveSecret } from "../../../../../auth";
32
34
  import { TOPOLOGY } from "../../../../../lib/topology.generated";
33
- import { openContinuation } from "../../../../api/auth/hub/continuation";
34
- import { accountSession } from "../account-data";
35
35
 
36
36
  /** The authorize route's POST — the one request that says yes. */
37
37
  const AUTHORIZE_PATH = "/api/auth/hub/authorize";
@@ -5,6 +5,7 @@
5
5
  // /sign-in (an account path with no sign-in method on says so in place); a
6
6
  // spoke that signs in through its hub (`--hub-sign-in`) redirects to its
7
7
  // hub-session sign-in route.
8
+ import { isAccountPath } from "@working-theory/auth/edge";
8
9
  import { localeHref } from "@working-theory/ui";
9
10
  import { Button, Heading, Link, Text } from "@working-theory/ui/primitives";
10
11
  import { readLocales } from "@working-theory/web-i18n";
@@ -13,7 +14,6 @@ import { getTranslations } from "next-intl/server";
13
14
  import type { ReactElement } from "react";
14
15
 
15
16
  import { getActiveProviderIds } from "../../../lib/auth-env";
16
- import { isAccountPath } from "../../../lib/auth-routes";
17
17
 
18
18
  /** The methods a member signs in with on /sign-in's card. */
19
19
  const MEMBER_METHODS: readonly string[] = ["google", "github", "magic-link"];
@@ -29,6 +29,7 @@ import { readFileSync } from "node:fs";
29
29
  import { join } from "node:path";
30
30
 
31
31
  import { Telemetry, VerificationMeta } from "@working-theory/analytics";
32
+ import { isAccountPath, isAuthPath, isBookingPath } from "@working-theory/auth/edge";
32
33
  import { slugFormTarget } from "@working-theory/page-renderer";
33
34
  import {
34
35
  SiteConsentSchema,
@@ -66,7 +67,6 @@ import type { ReactElement, ReactNode } from "react";
66
67
  import { parse as parseYaml } from "yaml";
67
68
 
68
69
  import { GoogleAnalytics } from "../../components/google-analytics";
69
- import { isAccountPath, isAuthPath, isBookingPath } from "../../lib/auth-routes";
70
70
  import { BOT_CLIENT_PROTECT, botCheckOn } from "../../lib/bot-check";
71
71
  import { isClosingFooterPath } from "../../lib/closing-footer-path";
72
72
  import { pageOptsIntoDeck } from "../../lib/deck-page";
@@ -98,7 +98,13 @@ import {
98
98
  resolvePageChrome,
99
99
  routeFamilyOf,
100
100
  } from "../../lib/page-chrome";
101
- import { backLinkHref } from "../../lib/profile-back-link";
101
+ import {
102
+ backLinkName,
103
+ navLabelsByPath,
104
+ parentHref,
105
+ servedParent,
106
+ } from "../../lib/profile-back-link";
107
+ import { servedPages } from "../../lib/served-pages";
102
108
  import {
103
109
  withPublicServicesColumns,
104
110
  withPublicServicesPaths,
@@ -273,19 +279,23 @@ const FLASH_PREVENTION_SCRIPT = `(function(){
273
279
  // ── Metadata ─────────────────────────────────────────────────────────────────
274
280
 
275
281
  export async function generateMetadata(): Promise<Metadata> {
276
- const ogImageUrl = getOgImageUrl({ title: SITE_NAME, schemaType: "WebSite" });
277
-
278
282
  const headerStore = await headers();
279
283
  const pathname = headerStore.get("x-pathname") ?? "/";
280
284
 
281
285
  const locales = readLocales();
282
286
  const baseUrl = resolveBaseUrl();
287
+ // #11244 — absolute: no layout sets `metadataBase`, so a relative og:image
288
+ // reached crawlers as a path they could not fetch.
289
+ const ogImageUrl = `${baseUrl.replace(/\/+$/, "")}${getOgImageUrl({ title: SITE_NAME, schemaType: "WebSite" })}`;
283
290
  const languages = buildHreflangAlternates(
284
291
  pathname,
285
292
  locales,
286
293
  DEFAULT_LOCALE,
287
294
  baseUrl,
288
295
  );
296
+ // #11239 — the last-resort preview and canonical for a route that returns
297
+ // none of its own: the request's own URL, never the home page's.
298
+ const requestUrl = pathname === "/" ? baseUrl : `${baseUrl}${pathname}`;
289
299
 
290
300
  return {
291
301
  title: SITE_NAME,
@@ -294,7 +304,7 @@ export async function generateMetadata(): Promise<Metadata> {
294
304
  title: SITE_NAME,
295
305
  description: SITE_DESCRIPTION,
296
306
  type: "website",
297
- url: baseUrl,
307
+ url: requestUrl,
298
308
  images: [ogImageUrl],
299
309
  },
300
310
  twitter: {
@@ -305,7 +315,7 @@ export async function generateMetadata(): Promise<Metadata> {
305
315
  },
306
316
  ...getStealthRobots(),
307
317
  alternates: {
308
- canonical: baseUrl,
318
+ canonical: requestUrl,
309
319
  languages,
310
320
  },
311
321
  };
@@ -706,6 +716,29 @@ export default async function LocaleLayout({
706
716
  items: col.items.map((item) => ({ ...item, label: labelFor(item.labelKey) })),
707
717
  }));
708
718
 
719
+ // The bare header's back arrow (operator handoff 2026-11-09): the page's
720
+ // served parent — a content page, a code-rendered route or a nav entry —
721
+ // named in its label; home when no ancestor is served. Read only where
722
+ // the arrow renders. A slide-left arrival is rewritten client-side by
723
+ // NavBackLink (#8644).
724
+ // `returnLabel` names the deck home for a slide return, so the accessible
725
+ // name follows the href NavBackLink resolves to.
726
+ let bareBackLink: { href: string; label: string; returnLabel: string } | undefined;
727
+ if (!isHome && pageChrome.header === "bare") {
728
+ const titles = await servedPages(locale);
729
+ const navPathLabels = navLabelsByPath([publicNavItems, footerColumnDefs], labelFor);
730
+ const served = (path: string): boolean => titles.has(path) || navPathLabels.has(path);
731
+ const parent = servedParent({ pathname, locales: enabledLocales, served });
732
+ bareBackLink = {
733
+ href: parentHref(parent, homePath),
734
+ label:
735
+ parent === null
736
+ ? tNav("home")
737
+ : tNav("backTo", { name: backLinkName(parent, { navLabels: navPathLabels, titles }) }),
738
+ returnLabel: tNav("home"),
739
+ };
740
+ }
741
+
709
742
  // The site's own name (#6942) — `SITE_NAME` resolves from `_site.mdx`'s
710
743
  // `siteName:`, so a customer's footer never carries the kit vendor's name.
711
744
  // The holder is `siteIdentity.legalName` when declared (#7796), else the name.
@@ -792,11 +825,8 @@ export default async function LocaleLayout({
792
825
  href="/favicon-16x16.png"
793
826
  />
794
827
  <link rel="shortcut icon" href="/favicon.ico" />
795
- <link
796
- rel="apple-touch-icon"
797
- sizes="180x180"
798
- href="/apple-touch-icon.png"
799
- />
828
+ {/* #11244 — the apple-touch-icon is `app/apple-icon.tsx`, drawn from
829
+ the site's brand mark; Next.js emits its link on every page. */}
800
830
  <link rel="manifest" href="/site.webmanifest" />
801
831
  <GoogleAnalytics />
802
832
  <VerificationMeta />
@@ -916,26 +946,13 @@ export default async function LocaleLayout({
916
946
  // #7721 D4 — a bare inner page's header: the back arrow home
917
947
  // and the mark. It carries no actions, so it is always the
918
948
  // server Nav (nothing callable crosses the RSC boundary).
919
- // #7744 D7 — on a deck home a team profile's arrow returns
920
- // to the people slide (`/#slide-people`) instead.
949
+ // 2026-11-09 — the arrow goes to the page's served parent
950
+ // (`bareBackLink` above), superseding #7744 D7's
951
+ // people-slide rule.
921
952
  // #10049 D1 — `none` renders no header; a site-set `full`
922
953
  // header shows the menus even on a `mark-only` design.
923
- pageChrome.header === "none" ? undefined : !isHome &&
924
- pageChrome.header === "bare" ? (
925
- <Nav
926
- {...navProps}
927
- navItems={[]}
928
- bar="bare"
929
- backLink={{
930
- href: backLinkHref({
931
- pathname,
932
- homePath,
933
- home: homeLayout,
934
- locales: enabledLocales,
935
- }),
936
- label: tNav("home"),
937
- }}
938
- />
954
+ pageChrome.header === "none" ? undefined : bareBackLink ? (
955
+ <Nav {...navProps} navItems={[]} bar="bare" backLink={bareBackLink} />
939
956
  ) : (
940
957
  <Nav
941
958
  {...navProps}