create-ailk 0.34.0 → 0.35.1

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 (55) hide show
  1. package/component-catalog.json +25 -3
  2. package/component-catalog.md +9 -8
  3. package/dist/add-module.js +7 -2
  4. package/dist/derive-architecture.js +2 -0
  5. package/dist/index.d.ts +1 -1
  6. package/dist/index.js +1 -1
  7. package/dist/module-architecture.js +9 -0
  8. package/dist/programmatic.js +5 -2
  9. package/dist/site-listing-path.d.ts +8 -0
  10. package/dist/site-listing-path.js +8 -0
  11. package/dist/surfaces.d.ts +20 -0
  12. package/dist/surfaces.js +26 -0
  13. package/dist/template-record.js +2 -0
  14. package/dist/update.js +11 -0
  15. package/package.json +3 -3
  16. package/templates/apps/api/CLAUDE.md +6 -6
  17. package/templates/apps/mcp/CLAUDE.md +16 -7
  18. package/templates/apps/web/app/[locale]/(authed)/account/__tests__/item.test.tsx +43 -0
  19. package/templates/apps/web/app/[locale]/(authed)/account/__tests__/page.test.tsx +6 -5
  20. package/templates/apps/web/app/[locale]/(authed)/account/inbox/[kind]/[id]/page.tsx +6 -1
  21. package/templates/apps/web/app/[locale]/flows/[slug]/FlowStepperClient.tsx +43 -4
  22. package/templates/apps/web/app/[locale]/flows/[slug]/__tests__/FlowStepperClient.deliverable.test.tsx +23 -9
  23. package/templates/apps/web/app/[locale]/flows/[slug]/__tests__/FlowStepperClient.invite.test.tsx +15 -0
  24. package/templates/apps/web/app/[locale]/flows/[slug]/__tests__/FlowStepperClient.permalink.test.tsx +74 -0
  25. package/templates/apps/web/app/[locale]/flows/[slug]/__tests__/FlowStepperClient.test.tsx +34 -1
  26. package/templates/apps/web/app/[locale]/flows/[slug]/__tests__/magnet-page.test.tsx +257 -4
  27. package/templates/apps/web/app/[locale]/flows/[slug]/__tests__/save.actions.test.ts +72 -92
  28. package/templates/apps/web/app/[locale]/flows/[slug]/email-moment.ts +2 -2
  29. package/templates/apps/web/app/[locale]/flows/[slug]/magnet-page.tsx +164 -65
  30. package/templates/apps/web/app/[locale]/flows/[slug]/results/[payload]/LevelChart.tsx +100 -0
  31. package/templates/apps/web/app/[locale]/flows/[slug]/results/[payload]/ResultsCard.tsx +99 -0
  32. package/templates/apps/web/app/[locale]/flows/[slug]/results/[payload]/ResultsClient.tsx +415 -253
  33. package/templates/apps/web/app/[locale]/flows/[slug]/results/[payload]/ResultsEmailStep.tsx +113 -32
  34. package/templates/apps/web/app/[locale]/flows/[slug]/results/[payload]/__tests__/ResultsClient.no-commerce.test.tsx +16 -17
  35. package/templates/apps/web/app/[locale]/flows/[slug]/results/[payload]/__tests__/ResultsClient.report.test.tsx +284 -0
  36. package/templates/apps/web/app/[locale]/flows/[slug]/results/[payload]/__tests__/by-result.test.tsx +52 -19
  37. package/templates/apps/web/app/[locale]/flows/[slug]/results/[payload]/__tests__/cards.test.tsx +402 -0
  38. package/templates/apps/web/app/[locale]/flows/[slug]/results/[payload]/__tests__/page.test.tsx +100 -12
  39. package/templates/apps/web/app/[locale]/flows/[slug]/results/[payload]/__tests__/score.test.tsx +153 -101
  40. package/templates/apps/web/app/[locale]/flows/[slug]/results/[payload]/meeting-seam.ts +36 -0
  41. package/templates/apps/web/app/[locale]/flows/[slug]/results/[payload]/page.tsx +121 -33
  42. package/templates/apps/web/app/[locale]/flows/[slug]/save.actions.ts +27 -17
  43. package/templates/apps/web/app/[locale]/flows/[slug]/served-flow.ts +91 -0
  44. package/templates/apps/web/app/[locale]/layout.tsx +18 -1
  45. package/templates/apps/web/app/api/auth/hub/authorize/__tests__/route.test.ts +24 -0
  46. package/templates/apps/web/app/api/auth/hub/authorize/route.ts +5 -1
  47. package/templates/apps/web/app/llms.txt/__tests__/site-listing.test.ts +122 -0
  48. package/templates/apps/web/app/llms.txt/route.ts +14 -2
  49. package/templates/apps/web/app/sitemap.xml/__tests__/site-listing.test.ts +98 -0
  50. package/templates/apps/web/app/sitemap.xml/route.ts +13 -2
  51. package/templates/apps/web/lib/account-config.ts +24 -9
  52. package/templates/apps/web/lib/hub-children.tsx +15 -11
  53. package/templates/apps/web/lib/site-listing.ts +7 -0
  54. package/templates/apps/web/messages/en.json +13 -1
  55. package/versions.json +47 -47
@@ -17,7 +17,7 @@
17
17
  "importPath": "@working-theory/ui/blocks",
18
18
  "rootBarrel": "@working-theory/ui",
19
19
  "sourceRoot": "packages/ui/src/blocks",
20
- "count": 108
20
+ "count": 110
21
21
  },
22
22
  {
23
23
  "name": "chrome",
@@ -914,6 +914,17 @@
914
914
  "descriptionGrade": "strong",
915
915
  "sectionType": null
916
916
  },
917
+ {
918
+ "name": "BackLink",
919
+ "tier": "blocks",
920
+ "sourcePath": "packages/ui/src/blocks/BackLink.tsx",
921
+ "importPath": "@working-theory/ui/blocks",
922
+ "exported": true,
923
+ "description": "The one back link a detail page's header carries. Draws the doc page's chevron (the editor header's left chevron, the same path as lucide's ChevronLeft) in two forms: icon-only, named by `label` for screen readers, and labelled, with `label` as its visible text.",
924
+ "descriptionSource": "doc-comment",
925
+ "descriptionGrade": "strong",
926
+ "sectionType": null
927
+ },
917
928
  {
918
929
  "name": "BackgroundPattern",
919
930
  "tier": "blocks",
@@ -1409,6 +1420,17 @@
1409
1420
  "descriptionGrade": "strong",
1410
1421
  "sectionType": null
1411
1422
  },
1423
+ {
1424
+ "name": "MessageBubble",
1425
+ "tier": "blocks",
1426
+ "sourcePath": "packages/ui/src/blocks/MessageBubble.tsx",
1427
+ "importPath": "@working-theory/ui/blocks",
1428
+ "exported": true,
1429
+ "description": "The Record frame's chat body draws every message through it: the other party's turn on the start side, on the light secondary surface; our own turn on the end side, on the dark fill. A muted caption line sits above the bubble (who · how · when) and an optional note below it (a delivery state, an unverified-sender line).",
1430
+ "descriptionSource": "doc-comment",
1431
+ "descriptionGrade": "strong",
1432
+ "sectionType": null
1433
+ },
1412
1434
  {
1413
1435
  "name": "MetricComparisonTable",
1414
1436
  "tier": "blocks",
@@ -3087,9 +3109,9 @@
3087
3109
  "sourcePath": "packages/ui/src/panels/FlowFrame.tsx",
3088
3110
  "importPath": "@working-theory/ui/panels",
3089
3111
  "exported": true,
3090
- "description": "The // frame: a full-viewport ground on the site `bg` token, two 50/50 regions (a persistent side panel + an active region) that stack below `md:` (side panel first, in DOM and visual order), and a bottom bar pinned to the VISIBLE viewport (`position: fixed`, safe-area aware) carrying a single continuous accent progress line, `leading` / `label` (center) / `trailing` slots, and a prop-controlled \"Powered by Working Theory\" line.",
3112
+ "description": "The frame a multi-step walk lives in: a side region and an active region that sit side by side at `md:` and stack below it (side first), under an optional brand header (logomark, wordmark, title, one `Esc ×` exit) and above a bottom bar carrying a continuous accent progress line with `leading` / `label` / `trailing` slots.",
3091
3113
  "descriptionSource": "doc-comment",
3092
- "descriptionGrade": "weak",
3114
+ "descriptionGrade": "strong",
3093
3115
  "sectionType": null
3094
3116
  },
3095
3117
  {
@@ -15,13 +15,13 @@ The component inventory of `@working-theory/ui` and the shells of `@working-theo
15
15
  3. Check the Primitives, Panels and Shells tables too — a low-level control, a collapsible layout container, or a route-level frame lives there, not under Sections or Blocks.
16
16
  4. Only then build. If you do build, you are declaring the capability is genuinely absent.
17
17
 
18
- Inventory: **325 component files** across 16 tiers — 60 sections, 108 blocks, 19 chrome, 79 primitives, 6 panels, 8 shells, 5 docs-blog-blocks, 1 docs-blog-chrome, 2 docs-blog-shells, 2 scheduling-sections, 6 scheduling-blocks, 5 signal-collectors-sections, 9 signal-collectors-blocks, 2 commerce-sections, 12 commerce-blocks, 1 commerce-panels. 322 distinct names: `SchedulerEmbed`, `Separator`, `Tabs` exist in more than one tier as genuinely different components, listed once per tier with its own source path.
18
+ Inventory: **327 component files** across 16 tiers — 60 sections, 110 blocks, 19 chrome, 79 primitives, 6 panels, 8 shells, 5 docs-blog-blocks, 1 docs-blog-chrome, 2 docs-blog-shells, 2 scheduling-sections, 6 scheduling-blocks, 5 signal-collectors-sections, 9 signal-collectors-blocks, 2 commerce-sections, 12 commerce-blocks, 1 commerce-panels. 324 distinct names: `SchedulerEmbed`, `Separator`, `Tabs` exist in more than one tier as genuinely different components, listed once per tier with its own source path.
19
19
 
20
- Description coverage: **321/325** components carry a capability description derived from source — 45 from the section registry's hand-authored when-to-use text, 241 from the component's own doc-comment header, 35 from its tier barrel's roster line. **4** have none; they are listed under [Undescribed components](#undescribed-components) rather than given a sentence invented from their name.
20
+ Description coverage: **323/327** components carry a capability description derived from source — 45 from the section registry's hand-authored when-to-use text, 243 from the component's own doc-comment header, 35 from its tier barrel's roster line. **4** have none; they are listed under [Undescribed components](#undescribed-components) rather than given a sentence invented from their name.
21
21
 
22
- Of those, **287** are *strong* — a capability sentence you could match a requirement against — and **34** are *weak*: either one short clause, or a long one that spends itself on wiring (client boundaries, class names, which primitives it composes) instead of on what the thing is for. Weak rows are marked `(weak)` and listed in full under [Weak descriptions](#weak-descriptions). Coverage is 99%, but **findable-without-luck coverage is 88%**.
22
+ Of those, **290** are *strong* — a capability sentence you could match a requirement against — and **33** are *weak*: either one short clause, or a long one that spends itself on wiring (client boundaries, class names, which primitives it composes) instead of on what the thing is for. Weak rows are marked `(weak)` and listed in full under [Weak descriptions](#weak-descriptions). Coverage is 99%, but **findable-without-luck coverage is 89%**.
23
23
 
24
- Per tier, strong out of total: **Sections** 59/60 · **Blocks** 100/108 · **Chrome** 10/19 · **Primitives** 64/79 (4 undescribed) · **Panels** 5/6 · **Shells** 7/8 · **Docs + Blog Blocks** 5/5 · **Docs + Blog Chrome** 1/1 · **Docs + Blog Shells** 0/2 · **Scheduling Sections** 2/2 · **Scheduling Blocks** 6/6 · **Signal-Collectors Sections** 5/5 · **Signal-Collectors Blocks** 8/9 · **Commerce Sections** 2/2 · **Commerce Blocks** 12/12 · **Commerce Panels** 1/1. A tier low on this line is a tier where a capability search is most likely to come up empty on something that exists.
24
+ Per tier, strong out of total: **Sections** 59/60 · **Blocks** 102/110 · **Chrome** 10/19 · **Primitives** 64/79 (4 undescribed) · **Panels** 6/6 · **Shells** 7/8 · **Docs + Blog Blocks** 5/5 · **Docs + Blog Chrome** 1/1 · **Docs + Blog Shells** 0/2 · **Scheduling Sections** 2/2 · **Scheduling Blocks** 6/6 · **Signal-Collectors Sections** 5/5 · **Signal-Collectors Blocks** 8/9 · **Commerce Sections** 2/2 · **Commerce Blocks** 12/12 · **Commerce Panels** 1/1. A tier low on this line is a tier where a capability search is most likely to come up empty on something that exists.
25
25
 
26
26
  That grade is **mechanical**. It counts what it can measure — how much a description adds beyond the component's own name, how much of it is spent on wiring, whether the extraction came out damaged — and it cannot tell a fluent paragraph about the wrong subject from a useful one. A person reading these tables will find more rows unusable than the weak count admits. Treat it as a floor on the problem, not a measurement of it, and read the source before concluding a capability is absent.
27
27
 
@@ -124,7 +124,7 @@ Import: `import { X } from "@working-theory/ui/sections";` (or from the `@workin
124
124
 
125
125
  ---
126
126
 
127
- ## Blocks (108)
127
+ ## Blocks (110)
128
128
 
129
129
  Intermediate composition tiles — the pieces sections are built from. Compose primitives and panels; never import a section.
130
130
 
@@ -144,6 +144,7 @@ Import: `import { X } from "@working-theory/ui/blocks";` (or from the `@working-
144
144
  | `AuthCard` | Multi-flow auth card: sign-in, sign-up, invitation, forgot, reset and sent, from one skeleton. One self-contained card renders every auth surface a site needs: signing in, signing up, a closed sign-up that requires an invitation, requesting a password reset, choosing a new password, and the check-your-email state that follows a magic link or a reset request. | `import { AuthCard } from "@working-theory/ui/blocks"` |
145
145
  | `AwardBadgePlaceholder` | The labeled placeholder an Awards badge slot renders when no image has been supplied — mirrors MediaPlaceholder's role but in an award-chevron/ laurel badge silhouette rather than a generic photo frame, since an unfilled award slot should read as "an award badge goes here," not "a photo goes here." The shape (a laurel-flanked medallion over a chevron ribbon) is a hand-drawn SVG outline — never a copied G2/Capterra/Apollo asset. | internal — compose from `packages/ui/src/blocks/AwardBadgePlaceholder.tsx` |
146
146
  | `BackgroundPattern` | Decorative SVG dot-grid / line pattern for ContactForm section. Decorative block (generalized beyond its original single consumer). Renders an absolutely-positioned decoration behind a section's content. Originally the pattern anchored behind ContactForm's form column; SpotlightPanel composes it as a full-bleed section backdrop (dimmed + blurred, behind a centered card) — same block, a second placement. | `import { BackgroundPattern } from "@working-theory/ui/blocks"` |
147
+ | `BackLink` | The one back link a detail page's header carries. Draws the doc page's chevron (the editor header's left chevron, the same path as lucide's ChevronLeft) in two forms: icon-only, named by `label` for screen readers, and labelled, with `label` as its visible text. | `import { BackLink } from "@working-theory/ui/blocks"` |
147
148
  | `BadgeRow` | Horizontal cluster of static badge labels used by Hero and Feature section families for `data.badge` and tag-list patterns. | `import { BadgeRow } from "@working-theory/ui/blocks"` |
148
149
  | `BillingToggle` | Monthly / Annual billing period toggle for the Pricing section. Purely presentational — click handlers come from the parent (Pricing section). No "use client" needed at the block level; the parent Pricing section is "use client" and passes the callbacks down. | `import { BillingToggle } from "@working-theory/ui/blocks"` |
149
150
  | `BlogPostHeader` | Layout: the better-auth sticky left rail — eyebrow ← back-link · decorative title · author byline · date/reading-time meta · tags. Per the title here is DECORATIVE (aria-hidden): the semantic `<h1>` is rendered atop the right content column by `BlogPost` (bodyOnly), so the page keeps exactly one heading. | `import { BlogPostHeader } from "@working-theory/ui/blocks"` |
@@ -189,6 +190,7 @@ Import: `import { X } from "@working-theory/ui/blocks";` (or from the `@working-
189
190
  | `MediaFigure` | The reusable *frame* for the visual half of a split section: an `Image` constrained by an optional `AspectRatio`, with consistent rounding, an optional caption, an optional decorative frame, and an optional overlay slot + scrim for text/badges/play-buttons over media. | `import { MediaFigure } from "@working-theory/ui/blocks"` |
190
191
  | `MediaPlaceholder` | The single shared labeled placeholder a declared IMAGERY SLOT renders when no asset has been supplied yet — a chassis never silently ships an empty slot, and never renders an accidental image. Composed by `Hero`/`Feature`/`Gallery` (sections tier) whenever their `imagerySlot` data flag is `true` and the corresponding asset is absent. | `import { MediaPlaceholder } from "@working-theory/ui/blocks"` |
191
192
  | `MemberList` | Settings "People" member rows — reimplements the ploy.ai Team Members list capture (avatar + email + "(you)" + role Badge). Purely presentational and props-driven: no session/permission logic; the caller supplies the member list, role labels, and an optional per-row actions slot (e.g. a "Remove" menu). | `import { MemberList } from "@working-theory/ui/blocks"` |
193
+ | `MessageBubble` | The Record frame's chat body draws every message through it: the other party's turn on the start side, on the light secondary surface; our own turn on the end side, on the dark fill. A muted caption line sits above the bubble (who · how · when) and an optional note below it (a delivery state, an unverified-sender line). | `import { MessageBubble } from "@working-theory/ui/blocks"` |
192
194
  | `MetricComparisonTable` | A numeric comparison table over the Table primitive. The operator-dashboard comparison view's core surface: one column per waitlist (plus a "total" column) and one row per metric (raw, qualified, qualification rate, one row per tier). | `import { MetricComparisonTable } from "@working-theory/ui/blocks"` |
193
195
  | `NavActionList` | CTA action cluster block (one shared button chrome; variant = paint, size = box). Extracts the action-cluster variant routing that was duplicated verbatim between Nav (ActionCluster, Nav.tsx:240–342) and NavMobileMenu (action map, NavMobileMenu.tsx:344–435). This block is the vehicle for the later Nav + NavMobileMenu refactors — both will compose it. | `import { NavActionList } from "@working-theory/ui/blocks"` |
194
196
  | `NavFlyoutPanel` | Mega-menu body block (feature grid + action bar) for Nav flyouts. Renders the content of a flyout (mega-menu) panel opened by a NavigationMenu trigger in the Nav chrome component. | `import { NavFlyoutPanel } from "@working-theory/ui/blocks"` |
@@ -373,7 +375,7 @@ Import: `import { X } from "@working-theory/ui/panels";` (or from the `@working-
373
375
  | --- | --- | --- |
374
376
  | `CardGrid` | The shared owner of how card-grid cells are arranged and separated — columns, gap, and the inter-cell SEPARATION treatment. Seven sections (BentoGrid, Items, Pricing, SocialProof, Stats, Testimonials, Team) currently hand-roll `grid gap-grid grid-cols-*`; this panel is the foundation they compose instead, the direct analogue of how `SectionFrame` collapsed 23× frame duplication. | `import { CardGrid } from "@working-theory/ui/panels"` |
375
377
  | `FixedPanel` | Collapsible layout-container primitive (Tier 2 — Panels). A three-state panel: expanded ↔ rail ↔ hidden. Controlled only — callers manage state via `state` + `onStateChange`. | `import { FixedPanel } from "@working-theory/ui/panels"` |
376
- | `FlowFrame` | The // frame: a full-viewport ground on the site `bg` token, two 50/50 regions (a persistent side panel + an active region) that stack below `md:` (side panel first, in DOM and visual order), and a bottom bar pinned to the VISIBLE viewport (`position: fixed`, safe-area aware) carrying a single continuous accent progress line, `leading` / `label` (center) / `trailing` slots, and a prop-controlled "Powered by Working Theory" line. *(weak)* | `import { FlowFrame } from "@working-theory/ui/panels"` |
378
+ | `FlowFrame` | The frame a multi-step walk lives in: a side region and an active region that sit side by side at `md:` and stack below it (side first), under an optional brand header (logomark, wordmark, title, one `Esc ×` exit) and above a bottom bar carrying a continuous accent progress line with `leading` / `label` / `trailing` slots. | `import { FlowFrame } from "@working-theory/ui/panels"` |
377
379
  | `ResizablePanel` | Drag-resizable layout-container primitive (Panels tier, Tier 2). Provides a resizable side panel container for layout composition. The panel width is controlled by the parent via `width` + `onWidthChange`/`onWidthChangeEnd`. The panel itself manages the drag interaction; the parent persists the committed width (e.g. via localStorage or server state). | `import { ResizablePanel } from "@working-theory/ui/panels"` |
378
380
  | `SectionFrame` | The shared frame the section tier composes instead of hand-rolling the `SectionErrorBoundary` + `<section className="py-section bg-bg">` + `Container` plumbing (23× duplicated at time). | `import { SectionFrame } from "@working-theory/ui/panels"` |
379
381
  | `StickyColumn` | Makes one column of a two-column layout stick (`lg:sticky` with a top offset) while the sibling column scrolls — the HubSpot "left header sticks, right content scrolls" pattern. `lg`-only: below `lg` it is NOT sticky (normal flow, stacks). Consumed by SplitContentMedia; reusable by any two-column layout. | `import { StickyColumn } from "@working-theory/ui/panels"` |
@@ -556,7 +558,7 @@ Import: `import { X } from "@working-theory/ui-commerce";` (or from the `@workin
556
558
 
557
559
  ## Weak descriptions
558
560
 
559
- These 34 components have a description that is accurate but does not do the job well: too short to match against, or long but spent on implementation. A capability search reaches them only if the searcher's word happens to be in it, so they are the most likely place for this catalog to repeat the failure it was built to fix. Read the source before concluding the capability is absent — and if you own one of these components, its header is the fix.
561
+ These 33 components have a description that is accurate but does not do the job well: too short to match against, or long but spent on implementation. A capability search reaches them only if the searcher's word happens to be in it, so they are the most likely place for this catalog to repeat the failure it was built to fix. Read the source before concluding the capability is absent — and if you own one of these components, its header is the fix.
560
562
 
561
563
  | Component | Tier | What the source gives us |
562
564
  | --- | --- | --- |
@@ -589,7 +591,6 @@ These 34 components have a description that is accurate but does not do the job
589
591
  | `Toast` | primitives | Radix-backed transient notification system. |
590
592
  | `Toggle` | primitives | Toggle Primitive. |
591
593
  | `VisuallyHidden` | primitives | Renders its children so they are present in the DOM and the accessibility tree but visually hidden. Standardizes the ad-hoc `sr-only` className pattern previously hand-rolled across primitives (Dialog/Sheet/Toast close labels) and section headers. |
592
- | `FlowFrame` | panels | The // frame: a full-viewport ground on the site `bg` token, two 50/50 regions (a persistent side panel + an active region) that stack below `md:` (side panel first, in DOM and visual order), and a bottom bar pinned to the VISIBLE viewport (`position: fixed`, safe-area aware) carrying a single continuous accent progress line, `leading` / `label` (center) / `trailing` slots, and a prop-controlled "Powered by Working Theory" line. |
593
594
  | `MarketingShell` | shells | Public-facing marketing site **slot-frame**. Server Component (RSC default). A shell is a slot-defining frame: it carves out *where chrome goes* (top + bottom) and *where sections go* (the body), owning **geometry only**. Chrome (Nav/Footer) and sections **fill** the slots — nothing is baked into the component. See (first instance). |
594
595
  | `BlogShell` | docs-blog-shells | Blog reading **slot-frame** (DOCS-UI-8). Server Component (RSC default). A shell is a slot-defining frame: it carves out *where chrome goes* and *where content goes*, owning **geometry only**. Chrome (Nav/Footer) and content (the post meta rail + the reconciled BlogPost body) **fill** the slots — nothing is baked in. Peer to MarketingShell / DocsShell; see. |
595
596
  | `DocsShell` | docs-blog-shells | Documentation reading **slot-frame** (DOCS-UI-4). Server Component (RSC default). A shell is a slot-defining frame: it carves out *where chrome goes* and *where content goes*, owning **geometry only**. Chrome (DocsSidebar) and content (DocsArticleHeader + MDXContent + ArticlePager + DocsFeedback) **fill** the slots — nothing is baked in. Peer to MarketingShell; see. |
@@ -41,7 +41,7 @@ import { ParseError, parseModules } from "./parse-args.js";
41
41
  import { writeSpokeFlowsReadme } from "./seed-flows.js";
42
42
  import { SITE_ROSTER_PATH, moduleRosterRows, planRosterAppend, readSiteRoster, siteRosterProblems, } from "./site-roster.js";
43
43
  import { spokeCheckoutSite, spokeEnvRowOptions, writeSpokeCheckoutSlice, } from "./spoke-checkout.js";
44
- import { MODULE_SURFACES, NAV_CONFIG_PATH, isRemovedPublicRoutePath, isUnservedSurfaceContent, readNavConfigStamp, renderNavConfig, resolveSurfaces, } from "./surfaces.js";
44
+ import { MODULE_SURFACES, NAV_CONFIG_PATH, isRemovedPublicRoutePath, isUnservedSurfaceContent, isUnservedSurfaceRoute, readNavConfigStamp, renderNavConfig, resolveSurfaces, } from "./surfaces.js";
45
45
  import { syncRoutes } from "./sync-routes.js";
46
46
  import { TopologyError, isSpokeExcluded, readSiteTopology, readSpokeShape, spokeDestination, spokeModuleRefusal, } from "./topology.js";
47
47
  /**
@@ -159,12 +159,17 @@ export async function applyModuleToScaffold(opts) {
159
159
  // #8427 D4 — composed with the spoke filter: a module bundle never
160
160
  // writes a seed under a gateable surface this site's own
161
161
  // `architecture.yaml` header (resolved above, into `surfaces`) does
162
- // not enable.
162
+ // not enable — nor a file inside such a surface's route directory
163
+ // (#11085). Only the added module's bundle lands here, so a carried
164
+ // module's file skipped that way at scaffold time (scheduling's
165
+ // flows/[slug]/results/ pair) is not restored when the surface's owner
166
+ // is added later; scaffold the modules together to get it.
163
167
  // #10040 D10 — a site that dropped `marketing` carries no public route
164
168
  // tree, so a bundle's file inside one (commerce's dev/purchase launcher,
165
169
  // a flow checkout action) is not written either.
166
170
  skip: (destination) => (spoke !== undefined && isSpokeExcluded(destination, spoke)) ||
167
171
  isUnservedSurfaceContent(destination, surfaces) ||
172
+ isUnservedSurfaceRoute(destination, surfaces) ||
168
173
  (publicTreeRemoved(targetAbs) && isRemovedPublicRoutePath(destination)),
169
174
  ...(spoke !== undefined
170
175
  ? {
@@ -17,6 +17,7 @@ import { ARCHITECTURE_BASE, MODULE_SLICES, normalizeModules, } from "./module-ar
17
17
  import { MODULE_FLAGS_PATH, PAID_MCP_TOOLS_PATH, PAID_SECTIONS_PATH } from "./paid-sections.js";
18
18
  import { SITE_CHROME_PATH } from "./site-chrome.js";
19
19
  import { SITE_FONTS_PATH } from "./site-fonts.js";
20
+ import { SITE_LISTING_PATH } from "./site-listing-path.js";
20
21
  import { SPOKE_CHECKOUT_CONFIG_PATH, SPOKE_CHECKOUT_TEMPLATE_PATHS, } from "./spoke-checkout.js";
21
22
  import { CORE_SURFACE_PATHS, NAV_CONFIG_PATH, RECOGNIZED_SURFACES, resolveSurfaces, } from "./surfaces.js";
22
23
  import { SPOKE_SEAM_FILES } from "./topology.js";
@@ -354,6 +355,7 @@ export function deriveArchitecture(modules = ["marketing"], surfaces, options =
354
355
  ...SPOKE_SEAM_FILES,
355
356
  SPOKE_CHECKOUT_CONFIG_PATH,
356
357
  SPOKE_BILLING_ACTION_PATH,
358
+ SITE_LISTING_PATH,
357
359
  ];
358
360
  const modulePaths = [];
359
361
  for (const s of slices) {
package/dist/index.d.ts CHANGED
@@ -15,6 +15,6 @@ export type { HomeSeedOutcome } from "./design-home.js";
15
15
  export { SITE_ROSTER_PATH, readSiteRoster, siteRosterProblems, } from "./site-roster.js";
16
16
  export { SYNC_ROUTES_HELP, formatSyncRoutesReport, listTemplateRouteDirs, parseSyncRoutesArgs, syncRoutes, type RouteReport, type SyncRoutesOptions, type SyncRoutesResult, } from "./sync-routes.js";
17
17
  export { deriveArchitecture } from "./derive-architecture.js";
18
- export { CORE_ROUTE_DIRS, CORE_SURFACE_PATHS, NAV_CONFIG_PATH, GATEABLE_SURFACES, MODULE_SURFACES, RECOGNIZED_SURFACES, ROUTE_SINCE, SurfaceError, excludedContentPaths, excludedRoutePaths, isUnservedSurfaceContent, parseSurfaces, renderNavConfig, resolveSurfaces, surfaceForRouteDir, type Surface, } from "./surfaces.js";
18
+ export { CORE_ROUTE_DIRS, CORE_SURFACE_PATHS, NAV_CONFIG_PATH, GATEABLE_SURFACES, MODULE_SURFACES, RECOGNIZED_SURFACES, ROUTE_SINCE, SurfaceError, excludedContentPaths, excludedRoutePaths, isUnservedSurfaceContent, isUnservedSurfaceRoute, parseSurfaces, renderNavConfig, resolveSurfaces, surfaceForRouteDir, type Surface, } from "./surfaces.js";
19
19
  export { substituteMarkers, substituteWorkspaceVersions, type MarkerMap, type WorkspaceVersionMap, } from "./substitute.js";
20
20
  export { validateTarget, ValidationError } from "./validate.js";
package/dist/index.js CHANGED
@@ -33,6 +33,6 @@ export { deriveArchitecture } from "./derive-architecture.js";
33
33
  // The route-surface registry (#4154) — which public routes a scaffold carries.
34
34
  // Exported so tooling can answer "what surfaces does this site declare" without
35
35
  // re-parsing architecture.yaml.
36
- export { CORE_ROUTE_DIRS, CORE_SURFACE_PATHS, NAV_CONFIG_PATH, GATEABLE_SURFACES, MODULE_SURFACES, RECOGNIZED_SURFACES, ROUTE_SINCE, SurfaceError, excludedContentPaths, excludedRoutePaths, isUnservedSurfaceContent, parseSurfaces, renderNavConfig, resolveSurfaces, surfaceForRouteDir, } from "./surfaces.js";
36
+ export { CORE_ROUTE_DIRS, CORE_SURFACE_PATHS, NAV_CONFIG_PATH, GATEABLE_SURFACES, MODULE_SURFACES, RECOGNIZED_SURFACES, ROUTE_SINCE, SurfaceError, excludedContentPaths, excludedRoutePaths, isUnservedSurfaceContent, isUnservedSurfaceRoute, parseSurfaces, renderNavConfig, resolveSurfaces, surfaceForRouteDir, } from "./surfaces.js";
37
37
  export { substituteMarkers, substituteWorkspaceVersions, } from "./substitute.js";
38
38
  export { validateTarget, ValidationError } from "./validate.js";
@@ -1065,6 +1065,15 @@ export const MODULE_SLICES = {
1065
1065
  "apps/web/app/[locale]/private/page.tsx",
1066
1066
  "apps/web/app/[locale]/private/__tests__/page.test.tsx",
1067
1067
  "apps/web/app/[locale]/private/__tests__/sitemap.test.ts",
1068
+ // #11013 D-K — the results page's Meeting-card half: the scheduling
1069
+ // layout one segment above commerce's `results/[payload]/layout.tsx`,
1070
+ // its client provider and the layout's own suite, listed individually
1071
+ // (a co-located suite is not swept by `EXCLUDE_TEMPLATE_DIRS`). The
1072
+ // page reads the meeting through `results/[payload]/meeting-seam.ts`,
1073
+ // the base half, so no signal-collectors file imports `lib/meetings`.
1074
+ "apps/web/app/[locale]/flows/[slug]/results/layout.tsx",
1075
+ "apps/web/app/[locale]/flows/[slug]/results/ResultsMeetingsProvider.tsx",
1076
+ "apps/web/app/[locale]/flows/[slug]/results/__tests__/layout.test.tsx",
1068
1077
  // #6086 (brief H7) — the SITE's appointments page, the visible half of
1069
1078
  // the read above. The co-located suite is listed EXPLICITLY alongside
1070
1079
  // its page: `EXCLUDE_TEMPLATE_DIRS` below drops only the three
@@ -46,7 +46,7 @@ import { SITE_FONTS_PATH, renderSiteFonts } from "./site-fonts.js";
46
46
  import { planSiteManifest } from "./site-manifest.js";
47
47
  import { SITE_ROSTER_PATH, planHomeRecord, planSiteManifestDesign, readSiteRoster, withMeetPlaceholderSeeds, } from "./site-roster.js";
48
48
  import { SPOKE_CHECKOUT_TEMPLATE_PATHS, dropSpokeCheckoutDependency, spokeCheckoutSite, spokeEnvRowOptions, writeSpokeCheckoutSlice, } from "./spoke-checkout.js";
49
- import { GATEABLE_SURFACES, NAV_CONFIG_PATH, excludedRoutePaths, isUnservedSurfaceContent, renderNavConfig, resolveSurfaces, surfacesNamedByRoutes, } from "./surfaces.js";
49
+ import { GATEABLE_SURFACES, NAV_CONFIG_PATH, excludedRoutePaths, isUnservedSurfaceContent, isUnservedSurfaceRoute, renderNavConfig, resolveSurfaces, surfacesNamedByRoutes, } from "./surfaces.js";
50
50
  import { syncRoutes } from "./sync-routes.js";
51
51
  import { BASE_LAYER_DIR, SHAPE_STARTERS, isOwnTree, shippedManifestPath, TEMPLATE_MANIFESTS, TemplateError, mergeRoster, resolveTemplate, resolveTemplateLineage, rosterDeclares, templateDelivery, templateTreeDir, } from "./template-manifest.js";
52
52
  import { TEMPLATE_RECORD_PATH, isRecordable, planTemplateRecord, serializeTemplateRecord, sha256Hex, } from "./template-record.js";
@@ -613,9 +613,12 @@ export async function scaffold(opts) {
613
613
  // signal-collectors `projects`-surface seeds, on a scaffold whose
614
614
  // roster carries no /projects route). The spoke filter still drops
615
615
  // whatever it already drops; remapDestination is unchanged.
616
+ // #11085 — nor a file inside the route directory of one (scheduling's
617
+ // flows/[slug]/results/ files on a scaffold without `flows`).
616
618
  ...spokeSkip,
617
619
  skip: (destination) => spokeSkip.skip?.(destination) === true ||
618
- isUnservedSurfaceContent(destination, result.surfaces),
620
+ isUnservedSurfaceContent(destination, result.surfaces) ||
621
+ isUnservedSurfaceRoute(destination, result.surfaces),
619
622
  });
620
623
  }
621
624
  // The template lands LAST — after `scaffoldSync` and after every module
@@ -0,0 +1,8 @@
1
+ /**
2
+ * The site's own listing module (#10940 D5) — site-owned: never recorded,
3
+ * never overwritten by `update`, seeded by `update` only when absent.
4
+ * Import-free on purpose: `template-record.ts`, `update.ts` and
5
+ * `derive-architecture.ts` all read it, and `derive-architecture.ts` must not
6
+ * import `template-record.ts` (that would close an import cycle).
7
+ */
8
+ export declare const SITE_LISTING_PATH = "apps/web/lib/site-listing.ts";
@@ -0,0 +1,8 @@
1
+ /**
2
+ * The site's own listing module (#10940 D5) — site-owned: never recorded,
3
+ * never overwritten by `update`, seeded by `update` only when absent.
4
+ * Import-free on purpose: `template-record.ts`, `update.ts` and
5
+ * `derive-architecture.ts` all read it, and `derive-architecture.ts` must not
6
+ * import `template-record.ts` (that would close an import cycle).
7
+ */
8
+ export const SITE_LISTING_PATH = "apps/web/lib/site-listing.ts";
@@ -168,6 +168,26 @@ export declare function excludedContentPaths(enabled: string[]): string[];
168
168
  * seed under a gateable surface the scaffold does not enable.
169
169
  */
170
170
  export declare function isUnservedSurfaceContent(path: string, enabled: readonly string[]): boolean;
171
+ /**
172
+ * True when `path` (scaffold-relative, `/`-separated) lies inside the route
173
+ * directory of a MODULE-OWNED gateable surface `enabled` excludes (#11085) —
174
+ * the route twin of `isUnservedSurfaceContent`, over `excludedRoutePaths`.
175
+ *
176
+ * `copyTemplate` already skips an excluded surface's route tree; this keeps
177
+ * another module's bundle from writing into it afterwards (scheduling's
178
+ * `flows/[slug]/results/` files, #11062 D-K, on a scaffold without
179
+ * signal-collectors), landing a route whose imports the scaffold does not
180
+ * carry. Wired into the same `extractModuleBundle` `skip` (`programmatic.ts`,
181
+ * `add-module.ts`).
182
+ *
183
+ * Module-owned only: such a surface comes only with its module (#5365 FR5),
184
+ * so without it nothing can host a foreign file there. A module-less
185
+ * surface's segment hosts other modules' companion routes by design —
186
+ * signal-collectors' `projects/apply` and `careers/apply` walks
187
+ * (`NESTED_FOREIGN_MODULE_ENTRIES` in `sync-routes.ts`, #8840 D13) and
188
+ * commerce's `dev/purchase` — and those keep landing.
189
+ */
190
+ export declare function isUnservedSurfaceRoute(path: string, enabled: readonly string[]): boolean;
171
191
  /**
172
192
  * Route manifest (#4986): every template route directory, keyed relative to
173
193
  * ROUTE_ROOT (`apps/web/app/[locale]`), → the `@working-theory/*` fixed-group
package/dist/surfaces.js CHANGED
@@ -600,6 +600,32 @@ export function isUnservedSurfaceContent(path, enabled) {
600
600
  }
601
601
  return false;
602
602
  }
603
+ /**
604
+ * True when `path` (scaffold-relative, `/`-separated) lies inside the route
605
+ * directory of a MODULE-OWNED gateable surface `enabled` excludes (#11085) —
606
+ * the route twin of `isUnservedSurfaceContent`, over `excludedRoutePaths`.
607
+ *
608
+ * `copyTemplate` already skips an excluded surface's route tree; this keeps
609
+ * another module's bundle from writing into it afterwards (scheduling's
610
+ * `flows/[slug]/results/` files, #11062 D-K, on a scaffold without
611
+ * signal-collectors), landing a route whose imports the scaffold does not
612
+ * carry. Wired into the same `extractModuleBundle` `skip` (`programmatic.ts`,
613
+ * `add-module.ts`).
614
+ *
615
+ * Module-owned only: such a surface comes only with its module (#5365 FR5),
616
+ * so without it nothing can host a foreign file there. A module-less
617
+ * surface's segment hosts other modules' companion routes by design —
618
+ * signal-collectors' `projects/apply` and `careers/apply` walks
619
+ * (`NESTED_FOREIGN_MODULE_ENTRIES` in `sync-routes.ts`, #8840 D13) and
620
+ * commerce's `dev/purchase` — and those keep landing.
621
+ */
622
+ export function isUnservedSurfaceRoute(path, enabled) {
623
+ const on = new Set(enabled);
624
+ const moduleOwned = new Set(Object.values(MODULE_SURFACES).flat());
625
+ return GATEABLE_SURFACES.some((surface) => !on.has(surface.id) &&
626
+ moduleOwned.has(surface.id) &&
627
+ surface.routes.some((routeDir) => path.startsWith(`${routeDir}/`)));
628
+ }
603
629
  /**
604
630
  * Route manifest (#4986): every template route directory, keyed relative to
605
631
  * ROUTE_ROOT (`apps/web/app/[locale]`), → the `@working-theory/*` fixed-group
@@ -22,6 +22,7 @@ import { join } from "node:path";
22
22
  import { MODULE_FLAGS_PATH, PAID_MCP_TOOLS_PATH, PAID_SECTIONS_PATH } from "./paid-sections.js";
23
23
  import { SITE_CHROME_PATH } from "./site-chrome.js";
24
24
  import { SITE_FONTS_PATH } from "./site-fonts.js";
25
+ import { SITE_LISTING_PATH } from "./site-listing-path.js";
25
26
  import { SPOKE_CHECKOUT_CONFIG_PATH } from "./spoke-checkout.js";
26
27
  import { NAV_CONFIG_PATH } from "./surfaces.js";
27
28
  import { SPOKE_SEAM_FILES } from "./topology.js";
@@ -45,6 +46,7 @@ export const REGENERATED_APP_PATHS = [
45
46
  PAID_MCP_TOOLS_PATH,
46
47
  ...SPOKE_SEAM_FILES,
47
48
  SPOKE_CHECKOUT_CONFIG_PATH,
49
+ SITE_LISTING_PATH,
48
50
  ];
49
51
  const REGENERATED_SET = new Set(REGENERATED_APP_PATHS);
50
52
  const RECORDABLE_APP_ROOT = /^apps\/(web|api|mcp)\//;
package/dist/update.js CHANGED
@@ -62,6 +62,7 @@ import { escapeBareBraces, findBareBraces } from "./mdx-braces.js";
62
62
  import { MODULE_SLICES } from "./module-architecture.js";
63
63
  import { MODULE_FLAGS_PATH, PAID_MCP_TOOLS_PATH, writeModuleFlags, writePaidMcpTools, } from "./paid-sections.js";
64
64
  import { ParseError } from "./parse-args.js";
65
+ import { SITE_LISTING_PATH } from "./site-listing-path.js";
65
66
  import { SITE_ROSTER_PATH, planServedRoster, readRosterPageRoutes } from "./site-roster.js";
66
67
  import { SPOKE_CHECKOUT_TEMPLATE_PATHS } from "./spoke-checkout.js";
67
68
  import { GATEABLE_SURFACES, excludedRoutePaths, isRemovedPublicRoutePath, resolveSurfaces, surfacesNamedByRoutes, } from "./surfaces.js";
@@ -1539,6 +1540,16 @@ export async function updateSite(opts) {
1539
1540
  moved.added.push(MODULE_FLAGS_PATH);
1540
1541
  else if (flags === "updated")
1541
1542
  moved.updated.push(MODULE_FLAGS_PATH);
1543
+ // #10940 D5 — the site's listing is site-owned (REGENERATED_APP_PATHS):
1544
+ // written only when absent, so a site updated onto routes that import it
1545
+ // builds; a present one is never read or written.
1546
+ const listingAbs = join(targetDir, ...SITE_LISTING_PATH.split("/"));
1547
+ const listingBytes = runningRaw.get(SITE_LISTING_PATH);
1548
+ if (!existsSync(listingAbs) && listingBytes !== undefined) {
1549
+ mkdirSync(dirname(listingAbs), { recursive: true });
1550
+ writeFileSync(listingAbs, renderTemplateFile(listingBytes, SITE_LISTING_PATH, {}, markersForVersion(record.projectName, version)));
1551
+ moved.added.push(SITE_LISTING_PATH);
1552
+ }
1542
1553
  // #9567 — the MCP move's writes, then the paid MCP tool registry from the
1543
1554
  // site's own apps/mcp/package.json on every run (REGENERATED_APP_PATHS,
1544
1555
  // #9460 DD6) — after the move, so a pack the move declared is a row.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-ailk",
3
- "version": "0.34.0",
3
+ "version": "0.35.1",
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/schema": "0.57.0",
32
- "@working-theory/templates": "0.57.0"
31
+ "@working-theory/schema": "0.59.0",
32
+ "@working-theory/templates": "0.59.0"
33
33
  },
34
34
  "repository": {
35
35
  "type": "git",