create-ailk 0.9.0 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/README.md +3 -3
  2. package/dist/cli.js +12 -1
  3. package/dist/lib/module-license-gate.d.ts +29 -23
  4. package/dist/lib/module-license-gate.js +98 -0
  5. package/dist/module-architecture.js +5 -4
  6. package/dist/programmatic.js +12 -4
  7. package/dist/starter-grid.d.ts +4 -67
  8. package/dist/starter-grid.js +6 -84
  9. package/dist/template-manifest.d.ts +1 -1
  10. package/dist/template-manifest.js +5 -5
  11. package/package.json +4 -2
  12. package/release-scope.json +25 -0
  13. package/site-templates/designs/minimalism/sample/README.md +2 -2
  14. package/site-templates/designs/minimalism/sample/content/en/HomePage/home.mdx +1 -1
  15. package/templates/.claude/agents/web.md +10 -8
  16. package/templates/.claude/rules/architecture.md +10 -7
  17. package/templates/.claude/skills/add-auth/SKILL.md +142 -90
  18. package/templates/.claude/skills/add-auth/references/env-vars.md +9 -1
  19. package/templates/.claude/skills/add-auth/references/oauth-app-setup.md +14 -6
  20. package/templates/.claude/skills/add-page/references/page-types.md +9 -10
  21. package/templates/.claude/skills/check-site/SKILL.md +28 -18
  22. package/templates/.claude/skills/check-site/references/common-errors.md +12 -9
  23. package/templates/.claude/skills/check-site/references/findings-glossary.md +4 -4
  24. package/templates/.claude/skills/check-site/references/severity-levels.md +3 -3
  25. package/templates/.claude/skills/setup-deploy/SKILL.md +75 -38
  26. package/templates/.claude/skills/update-page/SKILL.md +1 -1
  27. package/templates/.env.example +23 -2
  28. package/templates/CLAUDE.md +1 -1
  29. package/templates/package.json +2 -0
  30. package/dist/modules/commerce/0.6.0.tar.gz +0 -0
  31. package/dist/modules/commerce/0.6.1.tar.gz +0 -0
  32. package/dist/modules/docs-blog/0.6.0.tar.gz +0 -0
  33. package/dist/modules/docs-blog/0.6.1.tar.gz +0 -0
  34. package/dist/modules/marketing-site/0.6.1.tar.gz +0 -0
  35. package/dist/modules/minimalism-site/0.6.1.tar.gz +0 -0
  36. package/dist/modules/multi-tenant/0.6.0.tar.gz +0 -0
  37. package/dist/modules/multi-tenant/0.6.1.tar.gz +0 -0
  38. package/dist/modules/saas-product/0.6.1.tar.gz +0 -0
  39. package/dist/modules/scheduling/0.6.0.tar.gz +0 -0
  40. package/dist/modules/scheduling/0.6.1.tar.gz +0 -0
  41. package/dist/modules/signal-collectors/0.6.0.tar.gz +0 -0
  42. package/dist/modules/signal-collectors/0.6.1.tar.gz +0 -0
  43. package/dist/modules/simple-service/0.6.1.tar.gz +0 -0
  44. package/dist/modules/workspace/0.6.0.tar.gz +0 -0
  45. package/dist/modules/workspace/0.6.1.tar.gz +0 -0
  46. package/site-templates/aliases/minimalism-site.TEMPLATE-MANIFEST.json +0 -538
  47. package/templates/.claude/skills/setup-deploy/references/env-vars-template.md +0 -192
  48. package/templates/apps/api/.ailk/inbox/2026-09-20T14-57-31.552Z-fallback-1789916251590-037e9005.json +0 -8
  49. package/templates/apps/api/.ailk/inbox/2026-09-20T14-57-33.840Z-fallback-1789916253842-b52659e9.json +0 -12
  50. package/templates/apps/api/.ailk/inbox/2026-09-20T14-57-33.844Z-fallback-1789916253845-6b266f8c.json +0 -12
@@ -1,192 +0,0 @@
1
- # `.env.example` Template
2
-
3
- The structure the `setup-deploy` skill emits at the consumer's
4
- project root. Placeholder values only — the skill never echoes a
5
- real secret.
6
-
7
- When `@working-theory/env` ships a Zod schema (currently a placeholder
8
- package), this template should be revised to derive from that
9
- schema instead. Until then, this file is the source of truth for
10
- what env vars an AILK consumer site reads.
11
-
12
- ## Template
13
-
14
- ```bash
15
- # AI Launch Kit — environment template
16
- # Copy this file to `.env.local` (gitignored) and fill in values.
17
- # Production values live in your deploy platform's dashboard
18
- # (Vercel project settings → Environment Variables).
19
-
20
- # ── Marketing / canonical domain ─────────────────────────────────
21
- # Your site's canonical public domain (no protocol).
22
- AILK_PUBLIC_DOMAIN=your-domain.com
23
-
24
- # ── Content backend ──────────────────────────────────────────────
25
- # AILK's MDX adapter is the default. Other adapters ship as
26
- # additive PRs later.
27
- CONTENT_BACKEND=mdx
28
- # Override the content directory. Default is <repo-root>/content.
29
- # AILK_CONTENT_ROOT=
30
-
31
- # ── Lead delivery ────────────────────────────────────────────────
32
- # Where contact-form messages go (RUNBOOK.md § "Leads — where
33
- # messages go"). Set these on the API project.
34
- #
35
- # Lead inbox — set by the `setup-database` skill. With it, messages
36
- # land in /leads and newsletter signups are collected.
37
- # DATABASE_URL=postgres://user:pass@host:5432/db
38
- # DATABASE_URL_NON_POOLED=postgres://user:pass@host:5432/db
39
- #
40
- # Email (default) — with no database, each message is emailed to you.
41
- # All three are required; a key alone sends nothing.
42
- # RESEND_API_KEY=
43
- # AILK_LEAD_NOTIFICATION_TO=you@your-domain.com
44
- # AILK_LEAD_NOTIFICATION_FROM=leads@your-domain.com
45
- #
46
- # With neither, /contact shows your contact email (content/_site.mdx
47
- # `contactEmail`) instead of the form in production.
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
-
63
- # ── Auth — required env vars ─────────────────────────────────────
64
- # Set to "1" to require sign-in for protected routes; default is
65
- # auth-disabled / public.
66
- # AILK_AUTH_REQUIRED=1
67
- #
68
- # Better Auth secret — signs session cookies. REQUIRED in production:
69
- # apps/web/auth.ts throws in production without it. Generate with:
70
- # openssl rand -base64 32
71
- # Local dev (next dev) uses a development fallback.
72
- # BETTER_AUTH_SECRET=
73
- #
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
78
-
79
- # ── Auth — email sign-in (Resend) ────────────────────────────────
80
- # Activated when both AUTH_EMAIL_SERVER and AUTH_EMAIL_FROM are set.
81
- # Get a Resend API key at https://resend.com/api-keys.
82
- # AUTH_EMAIL_SERVER=smtp://resend:re_yourkeyhere@smtp.resend.com:465
83
- # AUTH_EMAIL_FROM=onboarding@resend.dev
84
-
85
- # ── Auth — Google OAuth ──────────────────────────────────────────
86
- # Activated when both GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET set.
87
- # Set up at https://console.cloud.google.com/apis/credentials.
88
- # Production callback: https://your-domain.com/api/auth/callback/google
89
- # GOOGLE_CLIENT_ID=
90
- # GOOGLE_CLIENT_SECRET=
91
-
92
- # ── Auth — GitHub OAuth ──────────────────────────────────────────
93
- # Activated when both GITHUB_CLIENT_ID and GITHUB_CLIENT_SECRET set.
94
- # Set up at https://github.com/settings/developers.
95
- # Production callback: https://your-domain.com/api/auth/callback/github
96
- # GITHUB_CLIENT_ID=
97
- # GITHUB_CLIENT_SECRET=
98
-
99
- # ── Stripe (sandbox keys only — sk_test_* / pk_test_*) ───────────
100
- # AILK is sandbox-only at v1. Live keys (sk_live_*, pk_live_*) are
101
- # hook-blocked from appearing in source.
102
- # Get test keys at https://dashboard.stripe.com/test/apikeys.
103
- # STRIPE_SECRET_KEY=sk_test_...
104
- # NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_...
105
- # Webhook signing secret — see Stripe Dashboard → Developers →
106
- # Webhooks → <endpoint> → Signing secret. Format: whsec_*.
107
- # STRIPE_WEBHOOK_SECRET=
108
-
109
- # ── Analytics — all off by default ───────────────────────────────
110
- # Each provider is independent. Set the env var(s) to enable.
111
- #
112
- # Vercel Analytics — built-in dashboard for Vercel deploys.
113
- # Requires Vercel hosting. Set to "true" to enable. Requires redeploy
114
- # after change (NEXT_PUBLIC_* values bake at build time).
115
- # NEXT_PUBLIC_VERCEL_ANALYTICS_ENABLED=
116
- #
117
- # Google Analytics 4 — gtag.js measurement. Requires consent in EU/UK/CA.
118
- # Get the measurement ID from analytics.google.com → Admin → Data Streams.
119
- # Format: G-XXXXXXXXXX. Requires redeploy after change.
120
- # NEXT_PUBLIC_GA_MEASUREMENT_ID=
121
- #
122
- # GA4 Measurement Protocol — server-side analytics secret.
123
- # Required alongside NEXT_PUBLIC_GA_MEASUREMENT_ID for server-side
124
- # lead/purchase events.
125
- # GA_API_SECRET=
126
- #
127
- # Google Search Console — verification meta tag. No script, no consent.
128
- # Get the token from search.google.com/search-console → Settings →
129
- # Ownership verification → HTML tag. Paste only the content="..." value.
130
- # GOOGLE_SITE_VERIFICATION=
131
- ```
132
-
133
- ## Categories the skill emits
134
-
135
- The template above groups vars into seven categories. Every emitted
136
- `.env.example` should hit each category at least with its header
137
- comment, even if the consumer hasn't activated any vars in that
138
- category — the comment block tells future-them what's available.
139
-
140
- Categories:
141
-
142
- 1. Marketing / canonical domain
143
- 2. Content backend
144
- 3. Lead delivery (database or email)
145
- 4. API origin checks + checkout gate
146
- 5. Auth — required + per-provider
147
- 6. Stripe (sandbox-only)
148
- 7. Analytics
149
-
150
- ## What the skill never includes
151
-
152
- - Real secret values. All values are placeholders or commented
153
- examples.
154
- - Live Stripe keys. Sandbox-only at AILK v1.
155
- - Live Vercel deploy tokens. The Vercel CLI handles deploy auth via
156
- `vercel login`.
157
- - Database connection strings with embedded passwords. Comments
158
- show shape only.
159
-
160
- ## Counting vars for validation
161
-
162
- The skill's Step 5 validation counts the declared (uncommented) vars
163
- the template emits and confirms the count is non-zero. Empty
164
- `.env.example` is a bug. Currently declared vars in the template:
165
-
166
- - `AILK_PUBLIC_DOMAIN`
167
- - `CONTENT_BACKEND`
168
-
169
- (All other entries are commented optional vars.) The skill should
170
- not require the consumer to set every commented var — they're
171
- opt-in. The two declared entries are the minimum the AILK scaffold
172
- needs to boot, even on a static-content-only site.
173
-
174
- ## Merge logic
175
-
176
- If the consumer already has `.env.example`, the skill (per SKILL.md
177
- Step 3) offers merge / overwrite / skip. Merge logic:
178
-
179
- 1. Read the existing file.
180
- 2. For each line in this template that's not a comment-only line,
181
- check whether the var name already appears anywhere in the
182
- existing file (commented or uncommented).
183
- 3. Vars **already present** are not modified — the consumer's
184
- existing comments and value choices win.
185
- 4. Vars **missing** are appended at the end of the existing file
186
- under a new section:
187
- ```
188
- # ── Added by setup-deploy ────────────────────────────────
189
- ```
190
-
191
- This avoids duplicating vars while still surfacing additions the
192
- template gained since the consumer's last run.
@@ -1,8 +0,0 @@
1
- {
2
- "id": "fallback-1789916251590-037e9005",
3
- "siteId": "site_1",
4
- "source": "callback",
5
- "email": "",
6
- "payload": {},
7
- "createdAt": "2026-09-20T14:57:31.552Z"
8
- }
@@ -1,12 +0,0 @@
1
- {
2
- "id": "fallback-1789916253842-b52659e9",
3
- "siteId": "wksp_00000000-0000-7000-8000-000000000001",
4
- "source": "flow:get-a-quote",
5
- "email": "abandoner@example.com",
6
- "payload": {
7
- "email": "abandoner@example.com",
8
- "flowSlug": "get-a-quote",
9
- "locale": "en"
10
- },
11
- "createdAt": "2026-09-20T14:57:33.840Z"
12
- }
@@ -1,12 +0,0 @@
1
- {
2
- "id": "fallback-1789916253845-6b266f8c",
3
- "siteId": "default",
4
- "source": "flow:get-a-quote",
5
- "email": "abandoner@example.com",
6
- "payload": {
7
- "email": "abandoner@example.com",
8
- "flowSlug": "get-a-quote",
9
- "locale": "en"
10
- },
11
- "createdAt": "2026-09-20T14:57:33.844Z"
12
- }