create-ailk 0.8.0 → 0.9.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.
- package/README.md +68 -0
- package/component-catalog.json +279 -45
- package/dist/add-module.d.ts +20 -0
- package/dist/add-module.js +43 -7
- package/dist/add-route.d.ts +56 -0
- package/dist/add-route.js +286 -0
- package/dist/apply-design-md.d.ts +7 -0
- package/dist/apply-design-md.js +50 -0
- package/dist/apply-design.d.ts +64 -0
- package/dist/apply-design.js +273 -0
- package/dist/claude-md.d.ts +111 -0
- package/dist/claude-md.js +334 -0
- package/dist/cli.js +92 -4
- package/dist/derive-architecture.js +41 -36
- package/dist/design-compile.d.ts +71 -0
- package/dist/design-compile.js +98 -0
- package/dist/design-package.d.ts +83 -0
- package/dist/design-package.js +468 -0
- package/dist/design-presets.d.ts +86 -0
- package/dist/design-presets.js +642 -0
- package/dist/design-scaffold.d.ts +76 -0
- package/dist/design-scaffold.js +220 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +4 -1
- package/dist/legacy-nav-renderers.d.ts +45 -0
- package/dist/legacy-nav-renderers.js +545 -0
- package/dist/lib/auth-secret-file.d.ts +19 -0
- package/dist/lib/auth-secret-file.js +112 -0
- package/dist/lib/design-checks.d.ts +78 -0
- package/dist/lib/design-checks.js +174 -0
- package/dist/lib/license-key-files.d.ts +9 -0
- package/dist/lib/license-key-files.js +2 -2
- package/dist/lib/module-license-gate.d.ts +19 -9
- package/dist/lib/module-license-gate.js +19 -8
- package/dist/lib/render-verdict.d.ts +52 -0
- package/dist/lib/render-verdict.js +77 -0
- package/dist/lib/scaffold-render-sweep.d.ts +105 -0
- package/dist/lib/scaffold-render-sweep.js +236 -0
- package/dist/module-architecture.d.ts +19 -16
- package/dist/module-architecture.js +64 -21
- package/dist/parse-args.d.ts +12 -2
- package/dist/parse-args.js +74 -13
- package/dist/programmatic.d.ts +30 -6
- package/dist/programmatic.js +206 -17
- package/dist/site-chrome.d.ts +19 -9
- package/dist/site-chrome.js +23 -13
- package/dist/site-manifest.d.ts +25 -0
- package/dist/site-manifest.js +254 -0
- package/dist/site-roster.d.ts +41 -0
- package/dist/site-roster.js +141 -8
- package/dist/starter-grid.d.ts +32 -16
- package/dist/starter-grid.js +129 -33
- package/dist/surfaces.d.ts +41 -9
- package/dist/surfaces.js +200 -83
- package/dist/template-manifest.d.ts +30 -13
- package/dist/template-manifest.js +49 -24
- package/package.json +5 -4
- package/site-templates/_base/content/en/UseCase/persona-1.mdx +7 -6
- package/site-templates/_base/content/en/UseCase/persona-2.mdx +7 -6
- package/site-templates/_base/content/en/UseCase/persona-3.mdx +7 -6
- package/site-templates/{minimalism-site/TEMPLATE-MANIFEST.json → aliases/minimalism-site.TEMPLATE-MANIFEST.json} +72 -40
- package/site-templates/designs/minimalism/DESIGN.md +98 -6
- package/site-templates/designs/minimalism/sample/README.md +48 -0
- package/site-templates/designs/standard/DESIGN.md +98 -6
- package/site-templates/marketing-site/DESIGN.md +98 -6
- package/site-templates/marketing-site/TEMPLATE-MANIFEST.json +60 -27
- package/site-templates/marketing-site/TEMPLATE-MANIFEST.md +50 -30
- package/site-templates/marketing-site-free/DESIGN.md +98 -6
- package/site-templates/marketing-site-free/TEMPLATE-MANIFEST.json +60 -24
- package/site-templates/marketing-site-free/TEMPLATE-MANIFEST.md +44 -27
- package/site-templates/marketing-site-free/ailk-template.json +1 -1
- package/site-templates/saas-product/DESIGN.md +98 -6
- package/site-templates/shapes/local-business-service/TEMPLATE-MANIFEST.json +127 -18
- package/site-templates/shapes/local-business-service/TEMPLATE-MANIFEST.md +74 -20
- package/site-templates/shapes/local-business-service/ailk-template.json +1 -1
- package/site-templates/shapes/organization-service/TEMPLATE-MANIFEST.json +127 -18
- package/site-templates/shapes/organization-service/TEMPLATE-MANIFEST.md +74 -20
- package/site-templates/shapes/organization-service/ailk-template.json +1 -1
- package/site-templates/shapes/person-service/TEMPLATE-MANIFEST.json +127 -18
- package/site-templates/shapes/person-service/TEMPLATE-MANIFEST.md +75 -21
- package/site-templates/shapes/person-service/ailk-template.json +1 -1
- package/site-templates/shapes/person-service/content/en/AboutPage/about.mdx +1 -1
- package/site-templates/shapes/person-service/content/en/HomePage/home.mdx +2 -2
- package/site-templates/shapes/person-service/content/en/PortfolioList/portfolio.mdx +4 -2
- package/site-templates/shapes/person-service/content/en/ServicesList/services.mdx +1 -1
- package/templates/.claude/rules/architecture.md +7 -0
- package/templates/.claude/skills/README.md +3 -2
- package/templates/.claude/skills/add-auth/references/env-vars.md +22 -15
- package/templates/.claude/skills/add-auth/references/oauth-app-setup.md +3 -2
- package/templates/.claude/skills/add-page/SKILL.md +241 -238
- package/templates/.claude/skills/add-page/references/page-types.md +85 -76
- package/templates/.claude/skills/add-page/scripts/site-pages.mjs +87 -0
- package/templates/.claude/skills/add-page/templates/comparison-page.mdx.tmpl +99 -0
- package/templates/.claude/skills/add-page/templates/content.mdx.tmpl +8 -18
- package/templates/.claude/skills/add-page/templates/flow-landing-page.mdx.tmpl +43 -0
- package/templates/.claude/skills/add-page/templates/report-page.mdx.tmpl +52 -0
- package/templates/.claude/skills/add-page/templates/reports-list.mdx.tmpl +38 -0
- package/templates/.claude/skills/check-site/SKILL.md +23 -0
- package/templates/.claude/skills/fill-page/SKILL.md +26 -7
- package/templates/.claude/skills/fill-page/profiles/plumbing.yaml +1 -1
- package/templates/.claude/skills/setup-deploy/references/env-vars-template.md +28 -11
- package/templates/.claude/skills/update-page/SKILL.md +117 -0
- package/templates/.claude/skills/update-page/scripts/update-page.ts +640 -0
- package/templates/.claude/skills/update-page/templates/redirects.mjs.tmpl +31 -0
- package/templates/.claude/skills/upgrade-plan/SKILL.md +12 -8
- package/templates/.github/workflows/ci.yml +4 -0
- package/templates/.prettierignore +1 -0
- package/templates/CLAUDE.md +146 -103
- package/templates/DESIGN.md +98 -6
- package/templates/README.md +50 -38
- package/templates/apps/api/.env.example +2 -1
- package/templates/apps/api/src/__tests__/commerce-claim-registration.test.ts +2 -0
- package/templates/apps/api/src/__tests__/server.test.ts +116 -0
- package/templates/apps/api/src/lib/stripe.ts +9 -0
- package/templates/apps/api/src/middleware/__tests__/auth.optional-cookie.test.ts +140 -0
- package/templates/apps/api/src/middleware/auth.ts +54 -0
- package/templates/apps/api/src/routes/checkout/__tests__/session.test.ts +5 -2
- package/templates/apps/api/src/routes/checkout/__tests__/sessions.test.ts +628 -0
- package/templates/apps/api/src/routes/checkout/sessions.ts +222 -24
- package/templates/apps/api/src/routes/webhooks/__tests__/stripe-flow-checkout.test.ts +1 -1
- package/templates/apps/api/src/routes/webhooks/__tests__/stripe-org-billing.test.ts +5 -1
- package/templates/apps/api/src/routes/webhooks/__tests__/stripe.test.ts +521 -20
- package/templates/apps/api/src/routes/webhooks/stripe.ts +124 -32
- package/templates/apps/api/src/server.ts +28 -0
- package/templates/apps/api/src/services/__tests__/revalidation.test.ts +90 -15
- package/templates/apps/api/src/services/checkout-buyer.ts +72 -0
- package/templates/apps/api/src/services/revalidation.ts +60 -15
- package/templates/apps/mcp/__tests__/tools/create_project.test.ts +30 -24
- package/templates/apps/mcp/src/tools/purchase.ts +4 -2
- package/templates/apps/web/.env.example +13 -0
- package/templates/apps/web/CLAUDE.md +22 -28
- package/templates/apps/web/app/[locale]/(auth)/layout.tsx +1 -1
- package/templates/apps/web/app/[locale]/(authed)/leads/__tests__/page.test.tsx +24 -0
- package/templates/apps/web/app/[locale]/(authed)/leads/page.tsx +17 -6
- package/templates/apps/web/app/[locale]/[slug]/[detail]/__tests__/page.test.tsx +110 -0
- package/templates/apps/web/app/[locale]/[slug]/[detail]/page.tsx +60 -0
- package/templates/apps/web/app/[locale]/[slug]/page.tsx +1 -1
- package/templates/apps/web/app/[locale]/alternatives/__tests__/page.test.tsx +161 -0
- package/templates/apps/web/app/[locale]/alternatives/page.tsx +104 -0
- package/templates/apps/web/app/[locale]/{use-cases → for}/[slug]/page.tsx +4 -3
- package/templates/apps/web/app/[locale]/for/__tests__/page-renderer-migration.test.tsx +73 -0
- package/templates/apps/web/app/[locale]/{use-cases → for}/page.tsx +8 -7
- package/templates/apps/web/app/[locale]/glossary/page.tsx +1 -1
- package/templates/apps/web/app/[locale]/layout.tsx +35 -19
- package/templates/apps/web/app/[locale]/newsletter/page.tsx +1 -1
- package/templates/apps/web/app/[locale]/portfolio/[slug]/page.tsx +1 -1
- package/templates/apps/web/app/[locale]/portfolio/page.tsx +1 -1
- package/templates/apps/web/app/[locale]/vs/[slug]/__tests__/page.test.tsx +112 -0
- package/templates/apps/web/app/[locale]/vs/[slug]/page.tsx +70 -0
- package/templates/apps/web/app/api/revalidate/__tests__/route.test.ts +236 -44
- package/templates/apps/web/app/api/revalidate/route.ts +78 -36
- package/templates/apps/web/lib/__tests__/site-brand.test.ts +79 -0
- package/templates/apps/web/lib/__tests__/site-theme.test.ts +104 -11
- package/templates/apps/web/lib/__tests__/structured-data.test.tsx +21 -4
- package/templates/apps/web/lib/locale-guard.ts +18 -0
- package/templates/apps/web/lib/meet-placeholder.ts +5 -0
- package/templates/apps/web/lib/nav-config.ts +14 -13
- package/templates/apps/web/lib/site-brand.tsx +13 -9
- package/templates/apps/web/lib/site-logo.tsx +36 -0
- package/templates/apps/web/lib/site-theme.ts +46 -26
- package/templates/apps/web/messages/en.json +23 -9
- package/templates/apps/web/middleware.ts +28 -4
- package/templates/content/en/BookCall/book-a-call.mdx +80 -0
- package/templates/content/en/BookCall/onsite-estimate.mdx +56 -0
- package/templates/content/en/BookCall/onsite-service.mdx +56 -0
- package/templates/content/en/BookCall/start-project.mdx +56 -0
- package/templates/content/en/ContactPage/contact.mdx +40 -1
- package/templates/content/en/HomePage/home.mdx +2 -6
- package/templates/content/en/LandingPage/meet.mdx +59 -0
- package/templates/content/en/UseCasesList/{use-cases.mdx → for.mdx} +19 -18
- package/templates/database/CHANGELOG.md +7 -0
- package/templates/database/package.json +1 -1
- package/templates/package.json +2 -1
- package/templates/tools/check-claude-md.ts +128 -0
- package/versions.json +33 -33
- package/site-templates/_base/content/en/BookCall/book-call.mdx +0 -52
- package/site-templates/minimalism-site/DESIGN.md +0 -162
- package/site-templates/minimalism-site/TEMPLATE-MANIFEST.md +0 -458
- package/site-templates/minimalism-site/ailk-template.json +0 -23
- package/site-templates/minimalism-site/content/en/AboutPage/about.mdx +0 -110
- package/site-templates/minimalism-site/content/en/BookCall/book-call.mdx +0 -52
- package/site-templates/minimalism-site/content/en/ContactPage/contact.mdx +0 -34
- package/site-templates/minimalism-site/content/en/FAQPage/faq.mdx +0 -57
- package/site-templates/minimalism-site/content/en/LandingPage/referral.mdx +0 -77
- package/site-templates/minimalism-site/content/en/LandingPage/reports.mdx +0 -73
- package/site-templates/minimalism-site/content/en/PurchasePolicyPage/purchase-policy.mdx +0 -123
- package/site-templates/minimalism-site/content/en/ReportPage/annual-letter-2024.mdx +0 -52
- package/site-templates/minimalism-site/content/en/ReportPage/field-notes-2023.mdx +0 -52
- package/site-templates/minimalism-site/content/en/ReportPage/platform-shift-2025.mdx +0 -52
- package/site-templates/minimalism-site/content/en/ReportPage/state-of-the-market-2026.mdx +0 -52
- package/site-templates/minimalism-site/content/en/Service/first-engagement.mdx +0 -38
- package/site-templates/minimalism-site/content/en/Service/second-engagement.mdx +0 -38
- package/site-templates/minimalism-site/content/en/Service/third-engagement.mdx +0 -38
- package/site-templates/minimalism-site/content/en/ServicesList/services.mdx +0 -73
- package/site-templates/minimalism-site/flows/referral.flow.json +0 -71
- package/site-templates/minimalism-site/provenance.json +0 -4
- package/templates/.claude/skills/add-page/templates/route.tsx.tmpl +0 -28
- package/templates/apps/web/app/[locale]/book-a-call/page.tsx +0 -50
- package/templates/apps/web/app/[locale]/use-cases/__tests__/page-renderer-migration.test.tsx +0 -72
- /package/site-templates/{minimalism-site → designs/minimalism/sample}/content/en/HomePage/home.mdx +0 -0
- /package/site-templates/{minimalism-site/assets → designs/minimalism/sample/public}/avatar-placeholder-1.svg +0 -0
- /package/site-templates/{minimalism-site/assets → designs/minimalism/sample/public}/avatar-placeholder-2.svg +0 -0
- /package/site-templates/{minimalism-site/assets → designs/minimalism/sample/public}/avatar-placeholder-3.svg +0 -0
- /package/site-templates/{minimalism-site/assets → designs/minimalism/sample/public}/avatar-placeholder-4.svg +0 -0
- /package/site-templates/{minimalism-site/assets → designs/minimalism/sample/public}/avatar-placeholder-5.svg +0 -0
- /package/site-templates/{minimalism-site/assets → designs/minimalism/sample/public}/avatar-placeholder-6.svg +0 -0
- /package/site-templates/{minimalism-site/assets → designs/minimalism/sample/public}/hero-backdrop.svg +0 -0
- /package/site-templates/{minimalism-site/assets → designs/minimalism/sample/public}/logo-placeholder-1.svg +0 -0
- /package/site-templates/{minimalism-site/assets → designs/minimalism/sample/public}/logo-placeholder-2.svg +0 -0
- /package/site-templates/{minimalism-site/assets → designs/minimalism/sample/public}/logo-placeholder-3.svg +0 -0
- /package/site-templates/{minimalism-site/assets → designs/minimalism/sample/public}/wordmark-placeholder.svg +0 -0
|
@@ -46,21 +46,37 @@ CONTENT_BACKEND=mdx
|
|
|
46
46
|
# With neither, /contact shows your contact email (content/_site.mdx
|
|
47
47
|
# `contactEmail`) instead of the form in production.
|
|
48
48
|
|
|
49
|
+
# ── API origin checks + checkout gate (apps/api) ─────────────────
|
|
50
|
+
# Set both on the API project. Unset in production, the API logs a
|
|
51
|
+
# startup warning for each and keeps running, but:
|
|
52
|
+
# - without FRONTEND_URL, CORS and cookie origin checks are pinned to
|
|
53
|
+
# http://localhost:3000 and checkout answers 500 to a caller admitted
|
|
54
|
+
# without X-Internal-Auth;
|
|
55
|
+
# - without OSS_API_INTERNAL_SECRET, the checkout route admits callers
|
|
56
|
+
# without the X-Internal-Auth header.
|
|
57
|
+
# FRONTEND_URL is the site the browser loads (no trailing slash).
|
|
58
|
+
# FRONTEND_URL=https://your-domain.com
|
|
59
|
+
# Shared secret: the same value on the API and web projects.
|
|
60
|
+
# Generate with: openssl rand -hex 32
|
|
61
|
+
# OSS_API_INTERNAL_SECRET=
|
|
62
|
+
|
|
49
63
|
# ── Auth — required env vars ─────────────────────────────────────
|
|
50
64
|
# Set to "1" to require sign-in for protected routes; default is
|
|
51
65
|
# auth-disabled / public.
|
|
52
66
|
# AILK_AUTH_REQUIRED=1
|
|
53
67
|
#
|
|
54
|
-
#
|
|
68
|
+
# Better Auth secret — signs session cookies. REQUIRED in production:
|
|
69
|
+
# apps/web/auth.ts throws in production without it. Generate with:
|
|
55
70
|
# openssl rand -base64 32
|
|
56
|
-
# Local dev (next dev)
|
|
57
|
-
#
|
|
71
|
+
# Local dev (next dev) uses a development fallback.
|
|
72
|
+
# BETTER_AUTH_SECRET=
|
|
58
73
|
#
|
|
59
|
-
#
|
|
60
|
-
#
|
|
61
|
-
#
|
|
74
|
+
# The site's public origin — Better Auth builds OAuth callback URLs on
|
|
75
|
+
# it and trusts only it. Set it in production; local dev can leave it
|
|
76
|
+
# unset.
|
|
77
|
+
# BETTER_AUTH_URL=https://your-domain.com
|
|
62
78
|
|
|
63
|
-
# ── Auth —
|
|
79
|
+
# ── Auth — email sign-in (Resend) ────────────────────────────────
|
|
64
80
|
# Activated when both AUTH_EMAIL_SERVER and AUTH_EMAIL_FROM are set.
|
|
65
81
|
# Get a Resend API key at https://resend.com/api-keys.
|
|
66
82
|
# AUTH_EMAIL_SERVER=smtp://resend:re_yourkeyhere@smtp.resend.com:465
|
|
@@ -116,7 +132,7 @@ CONTENT_BACKEND=mdx
|
|
|
116
132
|
|
|
117
133
|
## Categories the skill emits
|
|
118
134
|
|
|
119
|
-
The template above groups vars into
|
|
135
|
+
The template above groups vars into seven categories. Every emitted
|
|
120
136
|
`.env.example` should hit each category at least with its header
|
|
121
137
|
comment, even if the consumer hasn't activated any vars in that
|
|
122
138
|
category — the comment block tells future-them what's available.
|
|
@@ -126,9 +142,10 @@ Categories:
|
|
|
126
142
|
1. Marketing / canonical domain
|
|
127
143
|
2. Content backend
|
|
128
144
|
3. Lead delivery (database or email)
|
|
129
|
-
4.
|
|
130
|
-
5.
|
|
131
|
-
6.
|
|
145
|
+
4. API origin checks + checkout gate
|
|
146
|
+
5. Auth — required + per-provider
|
|
147
|
+
6. Stripe (sandbox-only)
|
|
148
|
+
7. Analytics
|
|
132
149
|
|
|
133
150
|
## What the skill never includes
|
|
134
151
|
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: update-page
|
|
3
|
+
description: Rename a page on this AI Launch Kit site — change its URL (/meet to /schedule, /team to /people) and/or its title — safely, in one plan-then-confirm pass. Use this whenever the user wants to move, rename, re-slug or re-title an existing page, even if they don't say "rename" — "make /meet be /schedule", "the booking page should live at /book", "call the team page People", "I don't like this URL". It moves the content file(s), the page's own route folder if it has one, every exact internal link, the site-manifest row, and adds a permanent redirect from the old URL. It refuses pages whose URL is fixed by their type or shipped by the scaffold. Not for adding a page (add-page) or rewriting its words (fill-page).
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# update-page
|
|
7
|
+
|
|
8
|
+
Move a page from `/old` to `/new` (and optionally give it a new title) without
|
|
9
|
+
leaving a dead link, a stale manifest row, or a broken inbound URL behind. A
|
|
10
|
+
bundled helper computes the whole change as a plan; you show the plan, the user
|
|
11
|
+
confirms once, and only then does anything get written.
|
|
12
|
+
|
|
13
|
+
## The one rule
|
|
14
|
+
|
|
15
|
+
**Never run `apply` before the user has seen the plan and confirmed it.** The
|
|
16
|
+
helper enforces this mechanically — `apply` requires the hash the plan printed,
|
|
17
|
+
and refuses any other — but the order is yours to keep:
|
|
18
|
+
plan → show the file list → wait for confirmation → apply with the plan hash.
|
|
19
|
+
|
|
20
|
+
## Step 1 — Plan
|
|
21
|
+
|
|
22
|
+
From the site root:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
pnpm exec tsx .claude/skills/update-page/scripts/update-page.ts plan --from /meet --to /schedule
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Add `--name "Book a time"` to also change the page's title (the `title:` in its
|
|
29
|
+
content file; it sets the English file only and reports other languages as
|
|
30
|
+
"title left as translated").
|
|
31
|
+
|
|
32
|
+
The helper prints:
|
|
33
|
+
|
|
34
|
+
- every file it would touch, tagged `move`, `modify`, `create` or `delete`;
|
|
35
|
+
- `note:` lines a reader should know about (see below);
|
|
36
|
+
- `hash: <sha256>` — the plan's fingerprint.
|
|
37
|
+
|
|
38
|
+
It writes nothing. If it prints `refused: …` and exits 3, stop there and tell
|
|
39
|
+
the user why (the reasons are below). Don't work around a refusal by hand.
|
|
40
|
+
|
|
41
|
+
## Step 2 — Show the plan and wait
|
|
42
|
+
|
|
43
|
+
Show the user the file list and the notes as printed. If they want to see the
|
|
44
|
+
new contents, `plan --json` prints every change with its full new content.
|
|
45
|
+
Then wait for one confirmation. A "yes" to the summary is enough; you don't
|
|
46
|
+
need per-file approval.
|
|
47
|
+
|
|
48
|
+
## Step 3 — Apply
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
pnpm exec tsx .claude/skills/update-page/scripts/update-page.ts apply --from /meet --to /schedule --confirm <hash>
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Pass the same `--from`, `--to` and `--name` as the plan. The helper re-plans
|
|
55
|
+
and compares hashes: if anything changed in between (a file was edited, a
|
|
56
|
+
different rename was planned), it exits 1 and writes nothing — run `plan` again
|
|
57
|
+
and confirm the new hash.
|
|
58
|
+
|
|
59
|
+
## Step 4 — Check and report
|
|
60
|
+
|
|
61
|
+
Run `pnpm build` from the site root. Then tell the user:
|
|
62
|
+
|
|
63
|
+
- the new URL (with the locale, e.g. `/en/schedule`), and that `/meet` now
|
|
64
|
+
answers with a permanent redirect (HTTP 308) to it;
|
|
65
|
+
- any `note:` lines that need their attention (below);
|
|
66
|
+
- that the nav label text lives in `apps/web/messages/<locale>.json` if they
|
|
67
|
+
also want the menu wording changed — this skill only re-points the link.
|
|
68
|
+
|
|
69
|
+
## What the plan changes
|
|
70
|
+
|
|
71
|
+
| Surface | What happens |
|
|
72
|
+
|---|---|
|
|
73
|
+
| `content/<locale>/<Type>/old.mdx` (every locale) | Renamed to `new.mdx`; its `slug:` updated; `title:` updated when `--name` is given |
|
|
74
|
+
| The page's own route folder (only an `add-page`-created route has one) | Moved to the sibling folder `new/`; the `getPage("old")` literal inside becomes `getPage("new")` |
|
|
75
|
+
| Exact links to `/old` in `content/**` and `apps/web/lib/nav-config.ts` | Rewritten to `/new`. Exact means the whole path: `/meet` is rewritten, `/meet/book-a-call` and `/meeting` are not |
|
|
76
|
+
| `.ailk-site-manifest.json` | The one row whose `route` is `/old` now reads `/new`; no other byte changes |
|
|
77
|
+
| `apps/web/next.config.mjs` `redirects()` | Gains a managed block (`ailk:page-renames`) with `{ from: "/old", to: "/new" }`. Locale-prefixed forms are added for every non-default locale. A second rename collapses chains: renaming `/schedule` to `/book` later re-points the `/meet` row straight to `/book` |
|
|
78
|
+
|
|
79
|
+
Links to `/old` in code files (`apps/web/app`, `lib`, `components`) are
|
|
80
|
+
reported, not rewritten — the redirect covers them, and code edits are the
|
|
81
|
+
owner's call.
|
|
82
|
+
|
|
83
|
+
## The notes, and what to say about them
|
|
84
|
+
|
|
85
|
+
- **"…belongs to the `<module>` module's routes…"** — the old or new URL is a
|
|
86
|
+
route a paid module (scheduling, docs-blog, …) would install if the site
|
|
87
|
+
adds it later. Tell the user: if they add that module, the redirect (for the
|
|
88
|
+
old URL) or the module's folder (for the new URL) will take over, and the
|
|
89
|
+
note says what to remove or rename first.
|
|
90
|
+
- **"add-module `<module>` will keep these edited placeholder files…"** — the
|
|
91
|
+
rename edited seed pages that a module would normally replace; the module
|
|
92
|
+
will now list them for review instead. Nothing is lost.
|
|
93
|
+
- **"add-module will no longer regenerate the nav…"** — the nav is now a
|
|
94
|
+
hand-edited file; later module installs report the nav change they wanted
|
|
95
|
+
rather than applying it.
|
|
96
|
+
- **"the pages under /old … keep their URLs"** — detail pages like
|
|
97
|
+
`/meet/book-a-call` are fixed by their type and stay where they are.
|
|
98
|
+
|
|
99
|
+
## When the helper refuses (exit 3)
|
|
100
|
+
|
|
101
|
+
| Reason | What it means | What to offer instead |
|
|
102
|
+
|---|---|---|
|
|
103
|
+
| `routes must be one lowercase segment` | Only a top-level page moves (`/meet`, not `/meet/book-a-call`) | Detail pages are fixed by their type |
|
|
104
|
+
| `no page at /old` | Nothing on the site is served there | Check the URL; `add-page` adds a page |
|
|
105
|
+
| `/old is a code route with no page content to move` | A route folder exists but no content page backs it | A code change, not a rename |
|
|
106
|
+
| `a <Type> page's URL is fixed by its type` | About, Contact, a Service, a booking page — their URL comes from the page type | Explain that these can't move; the title can still change in the content file |
|
|
107
|
+
| `/old is served by a route the scaffold ships` | The route folder came with the scaffold (e.g. `/pricing`) | Same as above |
|
|
108
|
+
| `/new already exists: …` | A route folder, another page, or a content locale directory owns `/new` | Pick another route |
|
|
109
|
+
| `redirects() has been edited` | Someone hand-edited `redirects()` in `next.config.mjs`, so the helper won't touch it | Add the redirect line the message gives, by hand, or restore the generated method |
|
|
110
|
+
|
|
111
|
+
## What this skill does not do
|
|
112
|
+
|
|
113
|
+
- Add a page (`add-page`) or rewrite its words (`fill-page`).
|
|
114
|
+
- Change the menu label text in `apps/web/messages/*.json` (it re-points the
|
|
115
|
+
link and reports the label key).
|
|
116
|
+
- Edit route literals in code, or anything in `apps/api` / `apps/mcp`.
|
|
117
|
+
- Move detail pages, hubs, or any page whose URL is fixed by its type.
|