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.
- package/README.md +3 -3
- package/dist/cli.js +12 -1
- package/dist/lib/module-license-gate.d.ts +29 -23
- package/dist/lib/module-license-gate.js +98 -0
- package/dist/module-architecture.js +5 -4
- package/dist/programmatic.js +12 -4
- package/dist/starter-grid.d.ts +4 -67
- package/dist/starter-grid.js +6 -84
- package/dist/template-manifest.d.ts +1 -1
- package/dist/template-manifest.js +5 -5
- package/package.json +4 -2
- package/release-scope.json +25 -0
- package/site-templates/designs/minimalism/sample/README.md +2 -2
- package/site-templates/designs/minimalism/sample/content/en/HomePage/home.mdx +1 -1
- package/templates/.claude/agents/web.md +10 -8
- package/templates/.claude/rules/architecture.md +10 -7
- package/templates/.claude/skills/add-auth/SKILL.md +142 -90
- package/templates/.claude/skills/add-auth/references/env-vars.md +9 -1
- package/templates/.claude/skills/add-auth/references/oauth-app-setup.md +14 -6
- package/templates/.claude/skills/add-page/references/page-types.md +9 -10
- package/templates/.claude/skills/check-site/SKILL.md +28 -18
- package/templates/.claude/skills/check-site/references/common-errors.md +12 -9
- package/templates/.claude/skills/check-site/references/findings-glossary.md +4 -4
- package/templates/.claude/skills/check-site/references/severity-levels.md +3 -3
- package/templates/.claude/skills/setup-deploy/SKILL.md +75 -38
- package/templates/.claude/skills/update-page/SKILL.md +1 -1
- package/templates/.env.example +23 -2
- package/templates/CLAUDE.md +1 -1
- package/templates/package.json +2 -0
- package/dist/modules/commerce/0.6.0.tar.gz +0 -0
- package/dist/modules/commerce/0.6.1.tar.gz +0 -0
- package/dist/modules/docs-blog/0.6.0.tar.gz +0 -0
- package/dist/modules/docs-blog/0.6.1.tar.gz +0 -0
- package/dist/modules/marketing-site/0.6.1.tar.gz +0 -0
- package/dist/modules/minimalism-site/0.6.1.tar.gz +0 -0
- package/dist/modules/multi-tenant/0.6.0.tar.gz +0 -0
- package/dist/modules/multi-tenant/0.6.1.tar.gz +0 -0
- package/dist/modules/saas-product/0.6.1.tar.gz +0 -0
- package/dist/modules/scheduling/0.6.0.tar.gz +0 -0
- package/dist/modules/scheduling/0.6.1.tar.gz +0 -0
- package/dist/modules/signal-collectors/0.6.0.tar.gz +0 -0
- package/dist/modules/signal-collectors/0.6.1.tar.gz +0 -0
- package/dist/modules/simple-service/0.6.1.tar.gz +0 -0
- package/dist/modules/workspace/0.6.0.tar.gz +0 -0
- package/dist/modules/workspace/0.6.1.tar.gz +0 -0
- package/site-templates/aliases/minimalism-site.TEMPLATE-MANIFEST.json +0 -538
- package/templates/.claude/skills/setup-deploy/references/env-vars-template.md +0 -192
- package/templates/apps/api/.ailk/inbox/2026-09-20T14-57-31.552Z-fallback-1789916251590-037e9005.json +0 -8
- package/templates/apps/api/.ailk/inbox/2026-09-20T14-57-33.840Z-fallback-1789916253842-b52659e9.json +0 -12
- package/templates/apps/api/.ailk/inbox/2026-09-20T14-57-33.844Z-fallback-1789916253845-6b266f8c.json +0 -12
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: check-site
|
|
3
|
-
description: Run `ailk-audit --json` on the consumer's AILK site, parse the JSON report, and explain the score and findings in plain language. Use when the user asks "how is my site doing?", "audit my site", "what's my score?", "is my JSON-LD valid?", "do I have all the schema I need?", or otherwise wants a citation-readiness check on their AILK content. The skill never edits files — it reports and points at fix tools.
|
|
3
|
+
description: Run `ailk-audit --format json` on the consumer's AILK site, parse the JSON report, and explain the score and findings in plain language. Use when the user asks "how is my site doing?", "audit my site", "what's my score?", "is my JSON-LD valid?", "do I have all the schema I need?", or otherwise wants a citation-readiness check on their AILK content. The skill never edits files — it reports and points at fix tools.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# check-site
|
|
7
7
|
|
|
8
|
-
Shell out to `ailk-audit --json`, parse the JSON, and turn it into a
|
|
8
|
+
Shell out to `ailk-audit --format json`, parse the JSON, and turn it into a
|
|
9
9
|
conversational summary the consumer can act on. Pure explain-only —
|
|
10
10
|
the skill names fix tools (like the `schema:` frontmatter override)
|
|
11
11
|
but does not invoke them.
|
|
@@ -27,10 +27,10 @@ Skip this skill when:
|
|
|
27
27
|
tool (usually `add-page`'s `schema:` frontmatter override) and stop. This skill reports;
|
|
28
28
|
fix tools fix.
|
|
29
29
|
- The consumer is asking about deploy-time monitoring or continuous
|
|
30
|
-
audits — those are Pro features (
|
|
31
|
-
briefly and stop.
|
|
32
|
-
- The audit CLI isn't installed (`ailk-audit`
|
|
33
|
-
|
|
30
|
+
audits — those are Pro features (the `upgrade-plan` skill explains
|
|
31
|
+
the levels). Mention briefly and stop.
|
|
32
|
+
- The audit CLI isn't installed (`apps/api/node_modules/.bin/ailk-audit`
|
|
33
|
+
is missing) — translate the error per "Common errors" below.
|
|
34
34
|
|
|
35
35
|
## The mechanic
|
|
36
36
|
|
|
@@ -53,13 +53,20 @@ Step 7 suggests a page only of such a type.
|
|
|
53
53
|
|
|
54
54
|
### Step 1 — Invoke the CLI
|
|
55
55
|
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
The `ailk-audit` CLI ships in `@working-theory/aeo`, which the scaffold
|
|
57
|
+
installs as a dependency of `apps/api` — not of the site root — so pnpm
|
|
58
|
+
links its bin at `apps/api/node_modules/.bin/ailk-audit`. Run it **from
|
|
59
|
+
the site root**:
|
|
58
60
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
```bash
|
|
62
|
+
apps/api/node_modules/.bin/ailk-audit --format json
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
The site root matters: the CLI reads `content/` (its `--content-root`
|
|
66
|
+
default) and `project.yaml` relative to the directory it runs in. Do not
|
|
67
|
+
run it through `pnpm --filter ./apps/api exec`, which runs it inside
|
|
68
|
+
`apps/api` where neither exists. `--format json` is the flag that
|
|
69
|
+
selects JSON; the CLI rejects any flag it does not know and exits 2.
|
|
63
70
|
|
|
64
71
|
Capture both stdout (the JSON report) and stderr (errors). Do not
|
|
65
72
|
cache. Each invocation runs the CLI fresh.
|
|
@@ -78,7 +85,9 @@ Stop here on errors. Do not continue to Step 3.
|
|
|
78
85
|
|
|
79
86
|
### Step 3 — Parse the JSON report
|
|
80
87
|
|
|
81
|
-
The report
|
|
88
|
+
The report is the `AuditReport` type `@working-theory/aeo` exports
|
|
89
|
+
(its shipped `dist/types.d.ts`, under
|
|
90
|
+
`apps/api/node_modules/@working-theory/aeo/`):
|
|
82
91
|
|
|
83
92
|
```ts
|
|
84
93
|
interface AuditReport {
|
|
@@ -175,12 +184,12 @@ single-line mention tied to that finding:
|
|
|
175
184
|
mismatch or stale schema-type usage):
|
|
176
185
|
|
|
177
186
|
> "Pro auto-applies schema-pack updates as schema.org evolves —
|
|
178
|
-
>
|
|
187
|
+
> the `upgrade-plan` skill explains the levels."
|
|
179
188
|
|
|
180
189
|
- **Continuous-deploy audit** (the consumer is asking how to keep
|
|
181
190
|
the score from regressing, not about a specific finding):
|
|
182
191
|
> "Pro can run this audit on every deploy and gate releases on
|
|
183
|
-
> the score —
|
|
192
|
+
> the score — the `upgrade-plan` skill explains the levels."
|
|
184
193
|
|
|
185
194
|
Never produce a multi-line Pro recommendation, feature
|
|
186
195
|
comparison, or upgrade prompt. The mention is informational, not
|
|
@@ -228,8 +237,9 @@ Never recommend "weekly" / "monthly" / a date.
|
|
|
228
237
|
mechanism the skill points at. Never auto-invoked.
|
|
229
238
|
- **`add-page`** — new-page creation; not a fix-tool
|
|
230
239
|
for audit findings (audit reports on existing pages).
|
|
231
|
-
-
|
|
232
|
-
This skill depends only on the
|
|
233
|
-
|
|
240
|
+
- **`@working-theory/aeo`** — owner of the `ailk-audit` CLI and rule
|
|
241
|
+
set, installed under `apps/api`. This skill depends only on the
|
|
242
|
+
CLI's `--format json` output schema, not the package's internal
|
|
243
|
+
types. New rules added upstream surface
|
|
234
244
|
automatically as new findings; the glossary may lag and that's
|
|
235
245
|
acceptable (unrecognized rule IDs render as the raw ID).
|
|
@@ -73,21 +73,24 @@ mis-translate an unfamiliar error into a familiar fix path.
|
|
|
73
73
|
|
|
74
74
|
- `command not found: ailk-audit`
|
|
75
75
|
- `ailk-audit: command not found`
|
|
76
|
-
-
|
|
77
|
-
|
|
76
|
+
- `apps/api/node_modules/.bin/ailk-audit: No such file or directory`
|
|
77
|
+
- The skill itself can't find `apps/api/node_modules/.bin/ailk-audit`.
|
|
78
78
|
|
|
79
79
|
**Translation:**
|
|
80
80
|
|
|
81
81
|
> The `ailk-audit` CLI isn't installed in this project. It ships
|
|
82
|
-
> with `@working-theory/aeo`, which
|
|
83
|
-
>
|
|
82
|
+
> with `@working-theory/aeo`, which the AILK scaffold installs as a
|
|
83
|
+
> dependency of `apps/api` — its bin lives at
|
|
84
|
+
> `apps/api/node_modules/.bin/ailk-audit`, not at the site root.
|
|
84
85
|
>
|
|
85
|
-
>
|
|
86
|
-
>
|
|
87
|
-
> re-run
|
|
86
|
+
> If `apps/api/package.json` lists `@working-theory/aeo`, run
|
|
87
|
+
> `pnpm install` once from the site root to refresh
|
|
88
|
+
> `apps/api/node_modules/.bin`, then re-run the audit from the site
|
|
89
|
+
> root.
|
|
88
90
|
>
|
|
89
|
-
> If
|
|
90
|
-
>
|
|
91
|
+
> If it isn't listed, the scaffold's `apps/api` is incomplete — add
|
|
92
|
+
> it there with `pnpm --filter ./apps/api add @working-theory/aeo`,
|
|
93
|
+
> then re-run from the site root.
|
|
91
94
|
|
|
92
95
|
---
|
|
93
96
|
|
|
@@ -7,7 +7,7 @@ pointer).
|
|
|
7
7
|
|
|
8
8
|
The structure deliberately matches `perRule[].id` from the audit
|
|
9
9
|
JSON so the skill can grep this file for `## <rule-id>` to find the
|
|
10
|
-
explanation. New rules added to
|
|
10
|
+
explanation. New rules added to `@working-theory/aeo` will not appear here
|
|
11
11
|
until this file is updated; render unrecognized rule IDs as the raw
|
|
12
12
|
ID (no synthesis).
|
|
13
13
|
|
|
@@ -118,7 +118,7 @@ an _incentive_ in drill-down, not a finding to "fix."
|
|
|
118
118
|
## always-passes / always-fails
|
|
119
119
|
|
|
120
120
|
These are **test rules** that exist for the audit's own test suite
|
|
121
|
-
in
|
|
121
|
+
in `@working-theory/aeo`. They should not appear on a real consumer site
|
|
122
122
|
unless the rule list has been customized. If you see one of these
|
|
123
123
|
IDs in your audit output, the consumer's `ailk-audit` CLI may have
|
|
124
124
|
a non-standard rule list — that's a setup question, not a content
|
|
@@ -129,11 +129,11 @@ finding.
|
|
|
129
129
|
## Unrecognized rule IDs
|
|
130
130
|
|
|
131
131
|
If the audit JSON includes a rule ID not listed above, the rule is
|
|
132
|
-
new (added to
|
|
132
|
+
new (added to `@working-theory/aeo` after this glossary was last updated).
|
|
133
133
|
Render it as:
|
|
134
134
|
|
|
135
135
|
> Rule `<id>` — `<evidence text from the audit JSON>` — not in
|
|
136
|
-
> the local glossary; consult
|
|
136
|
+
> the local glossary; consult the `@working-theory/aeo` package docs.
|
|
137
137
|
|
|
138
138
|
Do not invent a plain-language explanation for an unrecognized
|
|
139
139
|
rule. The consumer can read the rule's `description` field from
|
|
@@ -20,7 +20,7 @@ The skill applies these rules in `SKILL.md` Step 5.
|
|
|
20
20
|
|
|
21
21
|
A rule with `pass: false` AND `weight: 0` is **not possible** today
|
|
22
22
|
(incentive rules are designed to never fail — see
|
|
23
|
-
`faq-howto-incentive` in
|
|
23
|
+
`faq-howto-incentive` in `@working-theory/aeo`). If one ever appears,
|
|
24
24
|
treat it as Info (the rule's own design says failures are neutral).
|
|
25
25
|
|
|
26
26
|
---
|
|
@@ -39,7 +39,7 @@ severity-based. Reasons:
|
|
|
39
39
|
The skill turns "weight 10 fail" into "Critical" because that's
|
|
40
40
|
the language consumers can act on.
|
|
41
41
|
- **Rule authors don't have to think about severity.** A new rule
|
|
42
|
-
added to
|
|
42
|
+
added to `@working-theory/aeo` gets a weight (its impact on the score)
|
|
43
43
|
and the skill maps that to a severity tier automatically. No
|
|
44
44
|
coupling between rule authoring and consumer-facing UX.
|
|
45
45
|
|
|
@@ -105,7 +105,7 @@ for drill-down.
|
|
|
105
105
|
|
|
106
106
|
## Future rules
|
|
107
107
|
|
|
108
|
-
When
|
|
108
|
+
When `@working-theory/aeo` adds a new rule, this glossary may not name
|
|
109
109
|
it. The severity mapping still works because it keys off `weight`
|
|
110
110
|
and `pass` only — both fields are guaranteed by the
|
|
111
111
|
`PerRuleResult` type. New critical-tier rules will surface as
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: setup-deploy
|
|
3
|
-
description: Emit deploy configuration for an AILK consumer site — `vercel.json
|
|
3
|
+
description: Emit deploy configuration for an AILK consumer site — `vercel.json` and `RUNBOOK.md`, plus an env checklist read from the scaffold's own `.env.example`. Vercel-only at v1; other platforms reject with a clear "not yet supported" message. Use when the user asks "set up Vercel", "provision deploy config", "what env vars do I need for production?", "I'm ready to ship to Vercel", or otherwise asks about pre-deploy file setup. Asks where leads should go — the email key (`RESEND_API_KEY` + the two notification addresses) or a database (`setup-database`) — and warns when neither is set. The RUNBOOK documents the two lead destinations: Email (default) and Lead inbox (setup-database).
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# setup-deploy
|
|
7
7
|
|
|
8
|
-
Emit `vercel.json
|
|
9
|
-
|
|
8
|
+
Emit `vercel.json` and `RUNBOOK.md` at the consumer's project root,
|
|
9
|
+
and bring the scaffold's own `.env.example` up to date with what the
|
|
10
|
+
site's code reads, ready for a Vercel deploy. Vercel is the only valid
|
|
10
11
|
`platform` value at v1. Other platforms (Netlify, Cloudflare, Render,
|
|
11
12
|
Fly, self-host) reject with an explicit "not yet supported" message
|
|
12
13
|
and emit nothing.
|
|
@@ -40,13 +41,16 @@ Skip this skill when:
|
|
|
40
41
|
the consumer's project root.
|
|
41
42
|
- For each artifact, ask the consumer how to handle conflicts
|
|
42
43
|
(merge / overwrite / skip) before writing.
|
|
43
|
-
- Emit
|
|
44
|
-
from templates in `references/`.
|
|
44
|
+
- Emit `vercel.json` and `RUNBOOK.md` at the consumer's project root,
|
|
45
|
+
derived from templates in `references/`.
|
|
46
|
+
- Read the env contract from the scaffold's own `.env.example` — the
|
|
47
|
+
file every scaffold ships at its root — plus a `process.env` scan
|
|
48
|
+
of the site's code, and turn it into the env checklist (Step 5).
|
|
45
49
|
- Ask where leads go (Step 5a) — the email key, or a database via
|
|
46
50
|
`setup-database` — and warn, verbatim, when neither is set.
|
|
47
51
|
- Validate the emitted output (parse `vercel.json` as JSON, check
|
|
48
|
-
`.env.example`
|
|
49
|
-
two lead-destination headings).
|
|
52
|
+
`.env.example` declares every variable the `process.env` scan
|
|
53
|
+
found, confirm `RUNBOOK.md` has the two lead-destination headings).
|
|
50
54
|
|
|
51
55
|
**Does not:**
|
|
52
56
|
|
|
@@ -84,23 +88,31 @@ consumer's project root. For each one, note:
|
|
|
84
88
|
- **Missing** — will emit fresh.
|
|
85
89
|
- **Present** — ask how to handle (Step 3).
|
|
86
90
|
|
|
91
|
+
`.env.example` is the exception: every scaffold ships one, and it is
|
|
92
|
+
the source this skill reads, not a file it writes from scratch. If
|
|
93
|
+
it is missing, tell the consumer to restore it from git history and
|
|
94
|
+
re-run — never write one from memory.
|
|
95
|
+
|
|
87
96
|
### Step 3 — Conflict handling per file
|
|
88
97
|
|
|
89
98
|
For each existing artifact, show the consumer:
|
|
90
99
|
|
|
91
100
|
1. The first ~10 lines of the existing file (preview).
|
|
92
101
|
2. A summary of what the skill would emit (template name + key
|
|
93
|
-
fields).
|
|
102
|
+
fields; for `.env.example`, the variables Step 5 would add).
|
|
94
103
|
3. Three options: **merge** (only for `RUNBOOK.md` and
|
|
95
104
|
`.env.example` — see merge logic below), **overwrite**
|
|
96
|
-
(replace contents
|
|
105
|
+
(replace contents; not offered for `.env.example`, which has no
|
|
106
|
+
other source), **skip** (leave existing file untouched).
|
|
97
107
|
|
|
98
108
|
Wait for the consumer's choice per file. Do not blindly overwrite.
|
|
99
109
|
|
|
100
|
-
**Merge logic — `.env.example`:** if a var
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
110
|
+
**Merge logic — `.env.example`:** if a var the Step 5 `process.env`
|
|
111
|
+
scan found is **missing** from every `.env.example` Step 5 reads —
|
|
112
|
+
neither set (`NAME=`) nor listed commented (`# NAME=`) — append it
|
|
113
|
+
(with comment) at the bottom of the root file
|
|
114
|
+
under a `# ── Added by setup-deploy ──` heading. Lines already in
|
|
115
|
+
the file are never modified; the consumer's comments and values win.
|
|
104
116
|
|
|
105
117
|
**Merge logic — `RUNBOOK.md`:** if the "Leads — where messages go"
|
|
106
118
|
section (with its two headings, `Email (default)` and
|
|
@@ -130,22 +142,43 @@ emitted file has these fields:
|
|
|
130
142
|
After write, parse the JSON. If parse fails, the skill has a bug —
|
|
131
143
|
report it to the consumer with the literal error.
|
|
132
144
|
|
|
133
|
-
### Step 5 —
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
145
|
+
### Step 5 — Build the env checklist from `.env.example`
|
|
146
|
+
|
|
147
|
+
The env contract is the scaffold's own `.env.example` at the project
|
|
148
|
+
root, plus the per-app `apps/*/.env.example` files it points to. Read
|
|
149
|
+
them; keep no second copy of them anywhere, including in this skill.
|
|
150
|
+
|
|
151
|
+
1. **Read the declared names.** In each of those files, every
|
|
152
|
+
uncommented `NAME=value` line is a variable the scaffold sets (for
|
|
153
|
+
example `CONTENT_ADAPTER=mdx`); every commented `# NAME=` line is
|
|
154
|
+
an opt-in variable. The `# ── <Section> ──` heading above a line
|
|
155
|
+
is its group, and the comment above an entry says what it does
|
|
156
|
+
and whether production needs it. A name counts as declared when
|
|
157
|
+
any of the files declares it.
|
|
158
|
+
2. **Scan the code.** Grep the site's source (`apps/`, `database/`,
|
|
159
|
+
and `packages/` if the scaffold has one) for `process.env.NAME`
|
|
160
|
+
and `process.env["NAME"]`. Skip `NODE_ENV`, variables the platform
|
|
161
|
+
sets itself (`VERCEL_*`, `CI`), and any name the files' comments
|
|
162
|
+
call deprecated — the code reads those only as a fallback, and the
|
|
163
|
+
checklist uses the name that replaced them.
|
|
164
|
+
3. **Add what is missing.** A name the scan found that `.env.example`
|
|
165
|
+
does not declare goes at the bottom under
|
|
166
|
+
`# ── Added by setup-deploy ──`, commented out with an empty
|
|
167
|
+
placeholder and a one-line comment naming the file that reads it.
|
|
168
|
+
Do this only when the consumer chose **merge** in Step 3; on
|
|
169
|
+
**skip**, list those names in the checklist instead. Either way,
|
|
170
|
+
never silently omit a var the consumer's site reads.
|
|
171
|
+
4. **Show the checklist.** List each section heading with its
|
|
172
|
+
variables, marking the ones the file sets, and quote the entry's
|
|
173
|
+
own comment for what production needs. Call out every value the
|
|
174
|
+
file sets that the consumer must change for their own site — for
|
|
175
|
+
example `AILK_PUBLIC_DOMAIN`, and `STEALTH`, which stays `true`
|
|
176
|
+
until launch. Use the names exactly as `.env.example` spells
|
|
177
|
+
them — do not restate a variable from memory.
|
|
139
178
|
|
|
140
179
|
The skill **does not** read live `.env` files. Placeholder values
|
|
141
180
|
only. No `sk_live_*`, no `pk_live_*`, no real Resend keys, no real
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
After write, count the declared vars and confirm the count matches
|
|
145
|
-
the template's expected count. If a var the consumer's site uses
|
|
146
|
-
(grep `process.env.X` from a quick scan) is missing from the
|
|
147
|
-
template, add it under "## Added by setup-deploy" — never silently
|
|
148
|
-
omit a var the consumer needs.
|
|
181
|
+
auth secrets.
|
|
149
182
|
|
|
150
183
|
### Step 5a — Lead delivery
|
|
151
184
|
|
|
@@ -160,10 +193,10 @@ two questions:
|
|
|
160
193
|
2. **What email should messages go to?** Ask for
|
|
161
194
|
`RESEND_API_KEY`, `AILK_LEAD_NOTIFICATION_TO` (their address) and
|
|
162
195
|
`AILK_LEAD_NOTIFICATION_FROM` (a sender on their Resend-verified
|
|
163
|
-
domain). All three are needed — a key alone sends nothing.
|
|
164
|
-
|
|
165
|
-
the real values in the **API** project's
|
|
166
|
-
key into a file.
|
|
196
|
+
domain). All three are needed — a key alone sends nothing.
|
|
197
|
+
`.env.example` already lists all three as commented entries; tell
|
|
198
|
+
the consumer to set the real values in the **API** project's
|
|
199
|
+
dashboard. Never write a key into a file.
|
|
167
200
|
|
|
168
201
|
If the consumer provides neither a database nor all three email
|
|
169
202
|
values, print this, verbatim:
|
|
@@ -229,7 +262,9 @@ message.
|
|
|
229
262
|
Before reporting "done":
|
|
230
263
|
|
|
231
264
|
- `vercel.json` parses as JSON ✓
|
|
232
|
-
-
|
|
265
|
+
- Every variable the `process.env` scan found is declared in an
|
|
266
|
+
`.env.example`, set or commented — or, when the consumer chose
|
|
267
|
+
**skip**, listed in the checklist ✓
|
|
233
268
|
- `RUNBOOK.md` contains both lead-destination headings
|
|
234
269
|
(`Email (default)`, `Lead inbox (setup-database)`) ✓
|
|
235
270
|
- Step 5a ran: the consumer chose a lead destination, or saw the
|
|
@@ -250,8 +285,9 @@ If any check fails, surface the failure to the consumer (not silent).
|
|
|
250
285
|
## References
|
|
251
286
|
|
|
252
287
|
- `references/vercel-json-template.md` — minimal viable `vercel.json`.
|
|
253
|
-
-
|
|
254
|
-
|
|
288
|
+
- The scaffold's own `.env.example` at the project root, and the
|
|
289
|
+
per-app `apps/*/.env.example` files — the env contract Step 5
|
|
290
|
+
reads. This skill keeps no copy of it.
|
|
255
291
|
- `references/runbook-template.md` — `RUNBOOK.md` with the two lead
|
|
256
292
|
destinations (Email (default), Lead inbox (setup-database)).
|
|
257
293
|
|
|
@@ -265,11 +301,12 @@ If any check fails, surface the failure to the consumer (not silent).
|
|
|
265
301
|
RUNBOOK adds production callback URLs and merges with any
|
|
266
302
|
existing runbook content (not blindly overwrites).
|
|
267
303
|
- **`@working-theory/env`** — at v1 a placeholder package, not yet a Zod
|
|
268
|
-
schema. This skill
|
|
269
|
-
from a runtime schema. When `@working-theory/env`
|
|
270
|
-
skill should be revised to read from it.
|
|
271
|
-
- **Stripe sandbox-only** — hard-floor enforced globally.
|
|
272
|
-
`.env.example`
|
|
304
|
+
schema. This skill reads the env contract from the scaffold's
|
|
305
|
+
`.env.example`, not from a runtime schema. When `@working-theory/env`
|
|
306
|
+
ships its schema, this skill should be revised to read from it.
|
|
307
|
+
- **Stripe sandbox-only** — hard-floor enforced globally. Nothing
|
|
308
|
+
this skill adds to `.env.example` carries a `sk_live_*` or
|
|
309
|
+
`pk_live_*` value.
|
|
273
310
|
- **Cloudflare deferred** — neither CF Pages (deploy target) nor
|
|
274
311
|
CF KV / D1 / R2 (data layer) is in v1. Will ship as a coherent
|
|
275
312
|
follow-up PR.
|
|
@@ -71,7 +71,7 @@ Run `pnpm build` from the site root. Then tell the user:
|
|
|
71
71
|
| Surface | What happens |
|
|
72
72
|
|---|---|
|
|
73
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
|
|
74
|
+
| The page's own route folder, when a folder under `apps/web/app` serves `/old` and is not a route the scaffold ships (a page the catch-all route serves has none) | Moved to the sibling folder `new/`; the `getPage("old")` literal inside becomes `getPage("new")` |
|
|
75
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
76
|
| `.ailk-site-manifest.json` | The one row whose `route` is `/old` now reads `/new`; no other byte changes |
|
|
77
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` |
|
package/templates/.env.example
CHANGED
|
@@ -40,6 +40,8 @@ CONTENT_ADAPTER=mdx
|
|
|
40
40
|
|
|
41
41
|
# ── Database (optional in standalone mode) ───────────────────────────────────
|
|
42
42
|
# DATABASE_URL=postgres://user:pass@host:5432/db
|
|
43
|
+
# Direct (non-pooled) URL that `prisma migrate` uses (database/prisma.config.ts).
|
|
44
|
+
# DATABASE_URL_NON_POOLED=
|
|
43
45
|
|
|
44
46
|
# ── Stripe (sandbox keys only — never sk_live_/pk_live_) ─────────────────────
|
|
45
47
|
# STRIPE_SECRET_KEY=sk_test_...
|
|
@@ -57,6 +59,23 @@ CONTENT_ADAPTER=mdx
|
|
|
57
59
|
# BETTER_AUTH_URL=http://localhost:3000
|
|
58
60
|
# BETTER_AUTH_SECRET=
|
|
59
61
|
|
|
62
|
+
# ── API origin checks + checkout gate (apps/api) ─────────────────────────────
|
|
63
|
+
# Unset in production, either one makes the API log a startup warning; the
|
|
64
|
+
# API keeps running.
|
|
65
|
+
# FRONTEND_URL is the site the browser loads (no trailing slash). Set it on the
|
|
66
|
+
# API project: unset in production, CORS, cookie origin checks and the
|
|
67
|
+
# billing-portal return URLs fall back to http://localhost:3000, and checkout
|
|
68
|
+
# answers 500 to a caller without X-Internal-Auth.
|
|
69
|
+
# FRONTEND_URL=https://your-domain.com
|
|
70
|
+
# OSS_API_INTERNAL_SECRET gates POST /v1/checkout/sessions. Unset, the route
|
|
71
|
+
# admits every caller. Set, it answers 401 to any caller that does not send it
|
|
72
|
+
# as X-Internal-Auth — including the MCP start_purchase tool and a browser
|
|
73
|
+
# calling the API directly — so set it only when every checkout caller is a
|
|
74
|
+
# server that sends the header. Use the same value on the API and on each such
|
|
75
|
+
# caller.
|
|
76
|
+
# Generate with: openssl rand -hex 32
|
|
77
|
+
# OSS_API_INTERNAL_SECRET=
|
|
78
|
+
|
|
60
79
|
# ── Single-tenant operator pin (apps/api) ────────────────────────────────────
|
|
61
80
|
# REQUIRED on a build WITHOUT the multi-tenant module — for the submissions
|
|
62
81
|
# review dashboard AND for the `workspace` module's settings surface.
|
|
@@ -351,8 +370,10 @@ CONTENT_ADAPTER=mdx
|
|
|
351
370
|
# AILK_TEST_AUTH_USER_ALLOWLIST=
|
|
352
371
|
|
|
353
372
|
# ── Lead capture file store ───────────────────────────────────────────────────
|
|
354
|
-
#
|
|
355
|
-
#
|
|
373
|
+
# Outside production, every successful submission appends one JSONL line here,
|
|
374
|
+
# whichever destination delivered it. In production the write is skipped unless
|
|
375
|
+
# LEAD_CAPTURE_FILE is set, and then it is a side copy, never the delivery.
|
|
376
|
+
# Default: apps/api/leads.jsonl (relative to process cwd).
|
|
356
377
|
# LEAD_CAPTURE_FILE=apps/api/leads.jsonl
|
|
357
378
|
# Set to "true" to disable file writes (leads go to DB only; requires DATABASE_URL).
|
|
358
379
|
# LEAD_CAPTURE_FILE_DISABLED=false
|
package/templates/CLAUDE.md
CHANGED
|
@@ -86,7 +86,7 @@ In `.claude/skills/`; Claude Code finds them at session start.
|
|
|
86
86
|
| `check-site` | You want the site's citation-readiness score and findings |
|
|
87
87
|
| `setup-database` | Leads should land in a database inbox at `/leads` |
|
|
88
88
|
| `setup-deploy` | You are ready to deploy to Vercel |
|
|
89
|
-
| `add-auth` | Visitors need to sign in (
|
|
89
|
+
| `add-auth` | Visitors need to sign in (email, Google, GitHub) |
|
|
90
90
|
| `upgrade-plan` | You are weighing Free against a paid level or the commerce add-on |
|
|
91
91
|
|
|
92
92
|
<!-- /ailk:template id="skills" -->
|
package/templates/package.json
CHANGED
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
"preflight": "pnpm architecture && pnpm claude-md:check && pnpm type-check && pnpm lint && pnpm build"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
+
"@arethetypeswrong/cli": "^0.18.5",
|
|
26
27
|
"@changesets/changelog-github": "^0.7.0",
|
|
27
28
|
"@changesets/cli": "^2.27.0",
|
|
28
29
|
"@eslint/js": "^10.0.1",
|
|
@@ -51,6 +52,7 @@
|
|
|
51
52
|
"jest": "^30.4.2",
|
|
52
53
|
"jiti": "^2.4.2",
|
|
53
54
|
"prettier": "^3.9.4",
|
|
55
|
+
"publint": "^0.3.24",
|
|
54
56
|
"ts-declaration-location": "^1.0.7",
|
|
55
57
|
"ts-jest": "^29.4.11",
|
|
56
58
|
"tsx": "^4.22.4",
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|