create-ailk 0.7.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 +112 -10
- package/component-catalog.json +798 -49
- package/component-catalog.md +9 -6
- 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 +114 -28
- 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/extract-module-bundle.js +5 -1
- 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 +89 -0
- package/dist/lib/module-license-gate.js +171 -12
- package/dist/lib/module-tier.d.ts +45 -16
- package/dist/lib/module-tier.js +76 -0
- package/dist/lib/pro-callout.js +10 -2
- 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 +88 -10
- package/dist/parse-args.js +272 -21
- package/dist/programmatic.d.ts +66 -12
- package/dist/programmatic.js +361 -34
- 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 +149 -11
- package/dist/starter-grid.d.ts +232 -0
- package/dist/starter-grid.js +545 -0
- package/dist/surfaces.d.ts +41 -9
- package/dist/surfaces.js +268 -92
- package/dist/template-manifest.d.ts +65 -29
- package/dist/template-manifest.js +161 -382
- package/dist/template-names.d.ts +14 -12
- package/dist/template-names.js +13 -17
- package/package.json +5 -4
- package/site-templates/_base/content/en/Feature/feature-1.mdx +69 -0
- package/site-templates/_base/content/en/Feature/feature-2.mdx +69 -0
- package/site-templates/_base/content/en/Feature/feature-3.mdx +69 -0
- package/site-templates/_base/content/en/FeaturesList/features.mdx +91 -0
- package/site-templates/_base/content/en/GlossaryList/glossary.mdx +0 -1
- package/site-templates/_base/content/en/NewsletterSignup/newsletter.mdx +0 -1
- package/site-templates/_base/content/en/PortfolioItem/sample-four.mdx +105 -0
- package/site-templates/_base/content/en/PortfolioItem/sample-one.mdx +34 -0
- package/site-templates/_base/content/en/PortfolioItem/sample-three.mdx +94 -0
- package/site-templates/_base/content/en/PortfolioItem/sample-two.mdx +45 -0
- package/site-templates/_base/content/en/PortfolioList/portfolio.mdx +169 -0
- package/site-templates/_base/content/en/PrivacyPage/privacy.mdx +15 -0
- package/site-templates/_base/content/en/UseCase/persona-1.mdx +70 -0
- package/site-templates/_base/content/en/UseCase/persona-2.mdx +70 -0
- package/site-templates/_base/content/en/UseCase/persona-3.mdx +70 -0
- 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 +103 -6
- package/site-templates/marketing-site/DESIGN.md +103 -6
- package/site-templates/marketing-site/TEMPLATE-MANIFEST.json +144 -47
- package/site-templates/marketing-site/TEMPLATE-MANIFEST.md +82 -41
- package/site-templates/marketing-site-free/DESIGN.md +103 -6
- package/site-templates/marketing-site-free/TEMPLATE-MANIFEST.json +150 -48
- package/site-templates/marketing-site-free/TEMPLATE-MANIFEST.md +114 -67
- package/site-templates/marketing-site-free/ailk-template.json +1 -1
- package/site-templates/marketing-site-free/content/en/NewsletterSignup/newsletter.mdx +59 -0
- package/site-templates/marketing-site-free/content/en/Pricing/pricing.mdx +199 -0
- package/site-templates/saas-product/DESIGN.md +103 -6
- package/site-templates/saas-product/TEMPLATE-MANIFEST.md +9 -1
- package/site-templates/{simple-service → shapes/local-business-service}/TEMPLATE-MANIFEST.json +210 -81
- package/site-templates/shapes/local-business-service/TEMPLATE-MANIFEST.md +356 -0
- package/site-templates/shapes/local-business-service/ailk-template.json +10 -0
- package/site-templates/{simple-service → shapes/local-business-service}/content/en/AboutPage/about.mdx +4 -4
- package/site-templates/shapes/local-business-service/content/en/HomePage/home.mdx +70 -0
- package/site-templates/shapes/local-business-service/content/en/NewsletterSignup/newsletter.mdx +59 -0
- package/site-templates/shapes/local-business-service/content/en/PortfolioList/portfolio.mdx +171 -0
- package/site-templates/{minimalism-site → shapes/local-business-service}/content/en/PurchasePolicyPage/purchase-policy.mdx +7 -8
- package/site-templates/shapes/local-business-service/content/en/Service/first-job.mdx +39 -0
- package/site-templates/shapes/local-business-service/content/en/Service/second-job.mdx +39 -0
- package/site-templates/shapes/local-business-service/content/en/Service/third-job.mdx +39 -0
- package/site-templates/shapes/local-business-service/content/en/ServicesList/services.mdx +61 -0
- package/site-templates/shapes/local-business-service/provenance.json +4 -0
- package/site-templates/shapes/organization-service/TEMPLATE-MANIFEST.json +471 -0
- package/site-templates/shapes/organization-service/TEMPLATE-MANIFEST.md +354 -0
- package/site-templates/shapes/organization-service/ailk-template.json +10 -0
- package/site-templates/shapes/organization-service/content/en/AboutPage/about.mdx +38 -0
- package/site-templates/shapes/organization-service/content/en/HomePage/home.mdx +85 -0
- package/site-templates/shapes/organization-service/content/en/NewsletterSignup/newsletter.mdx +59 -0
- package/site-templates/shapes/organization-service/content/en/PortfolioList/portfolio.mdx +171 -0
- package/site-templates/shapes/organization-service/content/en/PurchasePolicyPage/purchase-policy.mdx +123 -0
- package/site-templates/{minimalism-site → shapes/organization-service}/content/en/ServicesList/services.mdx +3 -4
- package/site-templates/shapes/organization-service/provenance.json +4 -0
- package/site-templates/shapes/person-service/TEMPLATE-MANIFEST.json +478 -0
- package/site-templates/shapes/person-service/TEMPLATE-MANIFEST.md +353 -0
- package/site-templates/shapes/person-service/ailk-template.json +10 -0
- package/site-templates/shapes/person-service/content/_site.mdx +85 -0
- package/site-templates/shapes/person-service/content/en/AboutPage/about.mdx +39 -0
- package/site-templates/shapes/person-service/content/en/HomePage/home.mdx +97 -0
- package/site-templates/shapes/person-service/content/en/NewsletterSignup/newsletter.mdx +59 -0
- package/site-templates/shapes/person-service/content/en/PortfolioList/portfolio.mdx +171 -0
- package/site-templates/{simple-service → shapes/person-service}/content/en/PurchasePolicyPage/purchase-policy.mdx +10 -11
- package/site-templates/shapes/person-service/content/en/Service/first-engagement.mdx +38 -0
- package/site-templates/shapes/person-service/content/en/Service/second-engagement.mdx +38 -0
- package/site-templates/shapes/person-service/content/en/Service/third-engagement.mdx +38 -0
- package/site-templates/{simple-service → shapes/person-service}/content/en/ServicesList/services.mdx +16 -16
- package/site-templates/shapes/person-service/provenance.json +4 -0
- package/templates/.claude/rules/architecture.md +7 -0
- package/templates/.claude/skills/README.md +5 -3
- 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 -72
- 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-database/SKILL.md +156 -0
- package/templates/.claude/skills/setup-database/scripts/verify-inbox.ts +154 -0
- package/templates/.claude/skills/setup-deploy/SKILL.md +64 -32
- package/templates/.claude/skills/setup-deploy/references/env-vars-template.md +44 -36
- package/templates/.claude/skills/setup-deploy/references/runbook-template.md +58 -102
- 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 +103 -6
- package/templates/README.md +63 -43
- package/templates/apps/api/.env.example +2 -1
- package/templates/apps/api/CLAUDE.md +3 -2
- 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/config/__tests__/index.test.ts +115 -14
- package/templates/apps/api/src/config/index.ts +35 -16
- package/templates/apps/api/src/lib/__tests__/lead-capture-store.test.ts +30 -0
- package/templates/apps/api/src/lib/__tests__/lead-delivery.test.ts +96 -0
- package/templates/apps/api/src/lib/lead-capture-store.ts +12 -0
- package/templates/apps/api/src/lib/lead-delivery.ts +52 -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/openapi/spec.ts +63 -12
- 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/leads/__tests__/capture.test.ts +88 -0
- package/templates/apps/api/src/routes/leads/__tests__/index.test.ts +100 -0
- package/templates/apps/api/src/routes/leads/index.ts +46 -1
- 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 +35 -0
- package/templates/apps/api/src/services/__tests__/lead-routing.test.ts +194 -0
- package/templates/apps/api/src/services/__tests__/leads-inbox.test.ts +124 -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/lead-routing.ts +140 -30
- package/templates/apps/api/src/services/leads-inbox.ts +48 -11
- package/templates/apps/api/src/services/revalidation.ts +60 -15
- package/templates/apps/mcp/__tests__/parity.test.ts +5 -4
- package/templates/apps/mcp/__tests__/tools/create_project.test.ts +30 -24
- package/templates/apps/mcp/src/tools/create_project.ts +21 -6
- 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]/contact/ConversationalIntakeWrapper.tsx +14 -6
- package/templates/apps/web/app/[locale]/contact/__tests__/ConversationalIntakeWrapper.test.tsx +10 -9
- package/templates/apps/web/app/[locale]/contact/__tests__/contact-form-text.test.ts +32 -0
- package/templates/apps/web/app/[locale]/contact/__tests__/contact.actions.test.ts +129 -0
- package/templates/apps/web/app/[locale]/contact/__tests__/page-renderer-migration.test.tsx +227 -84
- package/templates/apps/web/app/[locale]/contact/contact-form-text.ts +50 -0
- package/templates/apps/web/app/[locale]/contact/contact.actions.ts +73 -20
- package/templates/apps/web/app/[locale]/contact/page.tsx +105 -15
- package/templates/apps/web/app/[locale]/contact/site-contact-email.ts +54 -0
- package/templates/apps/web/app/[locale]/features/[slug]/page.tsx +64 -0
- package/templates/apps/web/app/[locale]/features/page.tsx +52 -0
- package/templates/apps/web/app/[locale]/{use-cases → for}/[slug]/page.tsx +21 -5
- 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 +65 -17
- package/templates/apps/web/app/[locale]/newsletter/__tests__/newsletter.actions.test.ts +75 -0
- package/templates/apps/web/app/[locale]/newsletter/__tests__/page.test.tsx +163 -0
- package/templates/apps/web/app/[locale]/newsletter/newsletter.actions.ts +66 -0
- package/templates/apps/web/app/[locale]/newsletter/page.tsx +106 -14
- package/templates/apps/web/app/[locale]/portfolio/[slug]/page.tsx +59 -0
- package/templates/apps/web/app/[locale]/{book-a-call → portfolio}/page.tsx +12 -13
- 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 +50 -37
- package/templates/apps/web/lib/site-brand.tsx +13 -9
- package/templates/apps/web/lib/site-identity.ts +14 -0
- 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 +45 -5
- package/templates/apps/web/middleware.ts +28 -4
- package/templates/content/_site.mdx +4 -2
- package/templates/content/en/BlogList/blog.mdx +37 -16
- 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 +43 -34
- package/templates/content/en/HomePage/home.mdx +10 -22
- package/templates/content/en/LandingPage/meet.mdx +59 -0
- package/templates/content/en/PurchasePolicyPage/purchase-policy.mdx +0 -1
- package/templates/content/en/UseCasesList/{use-cases.mdx → for.mdx} +19 -18
- package/templates/database/CHANGELOG.md +14 -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 -53
- package/site-templates/_base/content/en/UseCase/first-use-case.mdx +0 -23
- package/site-templates/_base/content/en/UseCase/second-use-case.mdx +0 -23
- package/site-templates/_base/content/en/UseCase/third-use-case.mdx +0 -23
- package/site-templates/minimalism-site/DESIGN.md +0 -162
- package/site-templates/minimalism-site/TEMPLATE-MANIFEST.md +0 -470
- 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 -53
- 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/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/flows/referral.flow.json +0 -71
- package/site-templates/minimalism-site/provenance.json +0 -4
- package/site-templates/simple-service/DESIGN.md +0 -162
- package/site-templates/simple-service/TEMPLATE-MANIFEST.md +0 -333
- package/site-templates/simple-service/ailk-template.json +0 -11
- package/site-templates/simple-service/content/en/BookCall/book-call.mdx +0 -53
- package/site-templates/simple-service/content/en/ContactPage/contact.mdx +0 -32
- package/site-templates/simple-service/content/en/FAQPage/faq.mdx +0 -56
- package/site-templates/simple-service/content/en/HomePage/home.mdx +0 -85
- package/site-templates/simple-service/content/en/Service/landscape-design.mdx +0 -40
- package/site-templates/simple-service/content/en/Service/lawn-maintenance.mdx +0 -40
- package/site-templates/simple-service/content/en/Service/seasonal-cleanup.mdx +0 -40
- package/site-templates/simple-service/provenance.json +0 -4
- package/templates/.claude/skills/add-page/templates/route.tsx.tmpl +0 -28
- package/templates/apps/web/app/[locale]/contact/ContactForm.tsx +0 -211
- package/templates/apps/web/app/[locale]/contact/__tests__/ContactForm.test.tsx +0 -96
- package/templates/apps/web/app/[locale]/use-cases/__tests__/page-renderer-migration.test.tsx +0 -72
- package/templates/content/en/SoftwareProduct/product.mdx +0 -175
- /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
- /package/site-templates/{minimalism-site → shapes/organization-service}/content/en/Service/first-engagement.mdx +0 -0
- /package/site-templates/{minimalism-site → shapes/organization-service}/content/en/Service/second-engagement.mdx +0 -0
- /package/site-templates/{minimalism-site → shapes/organization-service}/content/en/Service/third-engagement.mdx +0 -0
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
# `RUNBOOK.md` Template
|
|
2
2
|
|
|
3
3
|
The `setup-deploy` skill emits this runbook at the consumer's
|
|
4
|
-
project root. It documents pre-deploy steps
|
|
5
|
-
leads
|
|
4
|
+
project root. It documents pre-deploy steps and where the site's
|
|
5
|
+
leads go — the two lead destinations, **Email (default)** and
|
|
6
|
+
**Lead inbox (setup-database)**.
|
|
6
7
|
|
|
7
|
-
The skill must verify
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
The skill must verify both lead-destination headings are present
|
|
9
|
+
after emit (per SKILL.md Step 6 validation). If either is missing,
|
|
10
|
+
the skill has a bug.
|
|
10
11
|
|
|
11
12
|
## Template
|
|
12
13
|
|
|
@@ -35,109 +36,65 @@ Before you click Deploy in Vercel:
|
|
|
35
36
|
set in Vercel before deploy.
|
|
36
37
|
- [ ] **Configure your custom domain** if you have one (Vercel
|
|
37
38
|
Project → Settings → Domains). Vercel handles TLS automatically.
|
|
38
|
-
- [ ] **Pick
|
|
39
|
-
|
|
40
|
-
your
|
|
41
|
-
|
|
39
|
+
- [ ] **Pick where leads go** — see "Leads — where messages go"
|
|
40
|
+
below. With neither an email key nor a database, your contact
|
|
41
|
+
page shows your contact email instead of the form in
|
|
42
|
+
production, and no messages are collected.
|
|
43
|
+
- [ ] **On a host other than Vercel**, set `NODE_ENV=production` on
|
|
44
|
+
the API process — that is how it knows it is in production.
|
|
42
45
|
- [ ] **Register production OAuth callbacks** if you used
|
|
43
46
|
`add-auth` and activated Google or GitHub. Each provider
|
|
44
47
|
needs the prod callback URL added to its OAuth app settings.
|
|
45
48
|
|
|
46
49
|
---
|
|
47
50
|
|
|
48
|
-
##
|
|
51
|
+
## Leads — where messages go
|
|
49
52
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
> file **does not persist** across cold starts. Leads captured
|
|
53
|
-
> during one container's lifetime are lost when that container
|
|
54
|
-
> shuts down.
|
|
53
|
+
Where a contact-form message goes depends only on what you set on
|
|
54
|
+
the **API** project:
|
|
55
55
|
|
|
56
|
-
You
|
|
57
|
-
|
|
58
|
-
your
|
|
56
|
+
| You set | A message… |
|
|
57
|
+
| ----------------------------------------- | -------------------------------------------- |
|
|
58
|
+
| `DATABASE_URL` | lands in your lead inbox at `/leads` |
|
|
59
|
+
| the three email variables, no database | is emailed to you |
|
|
60
|
+
| neither (production) | is not collected — `/contact` shows your contact email instead of the form |
|
|
61
|
+
| neither (`pnpm dev`) | is written to a local file, for testing |
|
|
59
62
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
+
A newsletter signup needs the database: without one, `/newsletter`
|
|
64
|
+
offers no signup form. A visitor is never told a message was sent
|
|
65
|
+
when it reached nobody.
|
|
63
66
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
## Persistence upgrade — Vercel KV
|
|
67
|
+
### Email (default)
|
|
67
68
|
|
|
68
|
-
**When to pick:** you want
|
|
69
|
-
|
|
70
|
-
storage, native to the Vercel dashboard.
|
|
69
|
+
**When to pick:** you want messages in your inbox with no database
|
|
70
|
+
to run. This is the default for a new site.
|
|
71
71
|
|
|
72
72
|
**Setup:**
|
|
73
73
|
|
|
74
|
-
1.
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
5. Redeploy.
|
|
74
|
+
1. Create an API key at <https://resend.com/api-keys> and verify the
|
|
75
|
+
domain you will send from (Resend Dashboard → Domains).
|
|
76
|
+
2. On the **API** project in Vercel (Settings → Environment
|
|
77
|
+
Variables), set:
|
|
78
|
+
- `RESEND_API_KEY` — the key.
|
|
79
|
+
- `AILK_LEAD_NOTIFICATION_TO` — the address messages go to (yours).
|
|
80
|
+
- `AILK_LEAD_NOTIFICATION_FROM` — a sender on your verified domain.
|
|
81
|
+
3. Redeploy the API.
|
|
83
82
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
---
|
|
83
|
+
All three are required: a key without both addresses sends nothing.
|
|
84
|
+
If Resend refuses a message, the visitor is told it could not be
|
|
85
|
+
sent, so they can try again or email you directly.
|
|
89
86
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
**When to pick:** you want one provider for database, auth, and
|
|
93
|
-
storage. You're not committed to NextAuth (Supabase has its own
|
|
94
|
-
auth), or you're fine running NextAuth + Supabase auth in parallel.
|
|
95
|
-
|
|
96
|
-
**Setup:**
|
|
87
|
+
### Lead inbox (setup-database)
|
|
97
88
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
3. Go to Settings → API. Copy:
|
|
101
|
-
- `Project URL` → `NEXT_PUBLIC_SUPABASE_URL`
|
|
102
|
-
- `anon public` key → `NEXT_PUBLIC_SUPABASE_ANON_KEY`
|
|
103
|
-
- `service_role` key → `SUPABASE_SERVICE_ROLE_KEY` (server-only)
|
|
104
|
-
4. Set those three env vars in Vercel project settings.
|
|
105
|
-
5. Run the AILK Supabase migration (see `@working-theory/database` Supabase
|
|
106
|
-
adapter README — the migration creates a `leads` table with the
|
|
107
|
-
AILK schema).
|
|
108
|
-
6. Switch the lead-capture writer to use the Supabase adapter.
|
|
109
|
-
7. Redeploy.
|
|
110
|
-
|
|
111
|
-
**Trade-offs:** Supabase is generous on free tier, scales well, and
|
|
112
|
-
its dashboard is excellent. The auth coexistence with NextAuth is
|
|
113
|
-
the only design wrinkle — most consumers either use NextAuth alone
|
|
114
|
-
(treating Supabase as just a Postgres host) or commit to Supabase
|
|
115
|
-
auth and remove NextAuth.
|
|
116
|
-
|
|
117
|
-
---
|
|
118
|
-
|
|
119
|
-
## Persistence upgrade — Postgres via `@working-theory/database`
|
|
120
|
-
|
|
121
|
-
**When to pick:** you already have Postgres somewhere — Neon,
|
|
122
|
-
Railway, RDS, self-hosted, anywhere. You don't need a new provider
|
|
123
|
-
relationship.
|
|
124
|
-
|
|
125
|
-
**Setup:**
|
|
89
|
+
**When to pick:** you want every message kept, searchable, in a
|
|
90
|
+
lead inbox you review signed in — and newsletter signups collected.
|
|
126
91
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
provider's equivalent).
|
|
134
|
-
5. The `@working-theory/database` package exposes a Prisma client tied to the
|
|
135
|
-
AILK schema; switch the lead-capture writer to use it.
|
|
136
|
-
6. Redeploy.
|
|
137
|
-
|
|
138
|
-
**Trade-offs:** most flexible, most setup. You manage the database
|
|
139
|
-
yourself (backups, connection pooling, scaling). For consumers who
|
|
140
|
-
already have Postgres in their stack, this is the natural fit.
|
|
92
|
+
**Setup:** run the `setup-database` skill ("set up the database"). It
|
|
93
|
+
walks you through provisioning Postgres, setting `DATABASE_URL`,
|
|
94
|
+
running migrations, pinning you as the owner
|
|
95
|
+
(`AILK_OPERATOR_EMAIL`), and sending one test message that must
|
|
96
|
+
appear in `/leads` before it reports done. If the email variables
|
|
97
|
+
are also set, you still get an email for each new lead.
|
|
141
98
|
|
|
142
99
|
---
|
|
143
100
|
|
|
@@ -204,9 +161,9 @@ You do **not** need to redeploy after:
|
|
|
204
161
|
|
|
205
162
|
## Troubleshooting
|
|
206
163
|
|
|
207
|
-
- **"My
|
|
208
|
-
|
|
209
|
-
|
|
164
|
+
- **"My contact page shows an email address instead of the form"**
|
|
165
|
+
→ the API has no lead destination. Set the three email variables,
|
|
166
|
+
or run `setup-database` (see "Leads — where messages go").
|
|
210
167
|
- **"OAuth login redirects to localhost in production"** → you
|
|
211
168
|
haven't added the production callback URL to the OAuth app
|
|
212
169
|
(see above).
|
|
@@ -219,15 +176,14 @@ You do **not** need to redeploy after:
|
|
|
219
176
|
|
|
220
177
|
## Section headings the validation must find
|
|
221
178
|
|
|
222
|
-
After emit, the skill must grep for these
|
|
223
|
-
match).
|
|
179
|
+
After emit, the skill must grep for these two headings (verbatim
|
|
180
|
+
match). Both must be present:
|
|
224
181
|
|
|
225
|
-
-
|
|
226
|
-
-
|
|
227
|
-
- `## Persistence upgrade — Postgres via `@working-theory/database\``
|
|
182
|
+
- `### Email (default)`
|
|
183
|
+
- `### Lead inbox (setup-database)`
|
|
228
184
|
|
|
229
|
-
If
|
|
230
|
-
contract. Surface the failure to the consumer (not silent).
|
|
185
|
+
If either is missing, the template was edited in a way that broke
|
|
186
|
+
the contract. Surface the failure to the consumer (not silent).
|
|
231
187
|
|
|
232
188
|
## Merge logic
|
|
233
189
|
|
|
@@ -235,8 +191,8 @@ If the consumer already has `RUNBOOK.md`, the skill (per SKILL.md
|
|
|
235
191
|
Step 3) offers merge / overwrite / skip. Merge logic:
|
|
236
192
|
|
|
237
193
|
1. Read the existing file.
|
|
238
|
-
2. Check whether
|
|
239
|
-
headings
|
|
194
|
+
2. Check whether the "Leads — where messages go" section and its two
|
|
195
|
+
lead-destination headings are already present.
|
|
240
196
|
3. Headings already present → not modified.
|
|
241
197
|
4. Headings missing → append at the end of the existing file under:
|
|
242
198
|
```
|
|
@@ -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.
|