A seed that sets master page content, a theme preset, mailing lists, posts, email templates or page SEO must declare a plugin_sdk constraint that refuses hosts before v0.3.11, so an older CMS rejects the artifact instead of applying half a site. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
49 lines
2.6 KiB
Markdown
49 lines
2.6 KiB
Markdown
# Seed content sections are validated and gated by SDK version
|
|
|
|
Status: accepted (WO-092, 2026-11-20)
|
|
|
|
The website factory compiles a site plugin whose seed must leave a complete
|
|
site with no AI pass: the theme's master page navbar and footer carry the
|
|
business, the chosen colour preset is active, every page has a meta title and
|
|
description, the blog has posts, the newsletter has its list and a contact form
|
|
sends its confirmation email. CMS ADR 0213 adds the seed sections that express
|
|
this: `master_pages`, `theme_preset`, `mailing_lists`, `posts`,
|
|
`email_templates`, and the page fields `seo` and `replace_existing`. Workflow
|
|
email steps gain `sender_name` and `reply_to` in `seed/workflows.json`.
|
|
|
|
A host that predates those sections parses `seed.json` without error and
|
|
ignores them, so it would apply half a site. The host already refuses an
|
|
artifact whose `compatibility.plugin_sdk` constraint its own plugin SDK version
|
|
does not satisfy (ADR 0005). That is the gate: hosts built with this release
|
|
apply the new sections, and an artifact that uses them must exclude every
|
|
older host.
|
|
|
|
Decision: `ValidateSeedDir` checks the new sections structurally. A master page
|
|
entry needs a template and blocks with a key and content; a theme preset needs
|
|
a template and a preset; mailing lists need unique slugs; posts need a unique
|
|
key and single-segment slug, a title, a body, `published` or `draft` status
|
|
and a `YYYY-MM-DD` date; email templates need a unique name, a subject and a
|
|
body, and a `table` must name a declared data table. When a seed uses any of
|
|
these, `plugin.mod` must declare a `plugin_sdk` constraint with a lower bound
|
|
at or above `SeedContentMinSDK` (`v0.3.11`), so the CMS loader of an older host
|
|
refuses the artifact with a message naming the constraint before anything is
|
|
applied. The CLI and the orchestrator inherit the check through
|
|
`BuildCodelessFS`.
|
|
|
|
Validating only in the CMS was rejected because an older CMS cannot run new
|
|
validation; the refusal has to come from data the old host already reads. A
|
|
separate seed schema version field was rejected for the same reason: an older
|
|
host would ignore it.
|
|
|
|
Consequences:
|
|
|
|
- `bnp/codeless.go`: `seedJSON` gains the sections, `validateSeedContent`,
|
|
`constraintExcludesBelow`, `SeedContentMinSDK`.
|
|
- Hosts must build with this SDK release or later to apply the sections.
|
|
- A seed that uses them with `plugin_sdk = ">=0.3.8 <0.4.0"` no longer builds.
|
|
|
|
Keywords: seed.json, ValidateSeedDir, master_pages, theme_preset,
|
|
mailing_lists, posts, email_templates, seo, replace_existing, sender_name,
|
|
reply_to, SeedContentMinSDK, constraintExcludesBelow, plugin_sdk,
|
|
compatibility, version gate, website factory, WO-092, codeless
|