Phase 5 part 3: build pages from a site's own sections

Sites → New pages: the AI composes a landing, product, alternative,
comparison or blog page as the site's own sections, from the profile and
optionally a product, competitor, buying signal or SEO brief. Code checks
every section type, warns on unknown fields and missing pages, tags a
signal's links with its campaign and finds experience claims. Pages are
edited here, pushed to their own branch with a preview, and opened as pull
requests after the claims are confirmed. Schema 22.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-22 14:12:57 -07:00
co-authored by Claude Opus 5.5
parent 233c6ac630
commit 11b80b6461
15 changed files with 1737 additions and 1 deletions
+23
View File
@@ -1280,6 +1280,29 @@ on it. The Dockerfile now builds Hugo v0.170.1 from source in a Go 1.27
stage (the standard edition: sites needing Sass won't build). Hugo's
errors now show the innermost cause, with paths cut to the repository's.
**Part 3 built (2026-11-22; schema 22, `site_pages`).** Sites → New pages
builds a page of a kind (landing, product, alternative, comparison, blog
post) from the profile, optionally a product, a competitor from the
Inventory, a buying signal and an SEO brief, plus the user's notes. It
reads the repository fresh, then the AI (new task "sites") gets the
company, the page's purpose, the site's pages with their section
sequences, and the section catalogue (README, fields in use, layout
fields, one real example per type; about 34,000 characters for
federated-website). It answers with the sections as a YAML string (strict
JSON schemas can't hold free-form sections). Code then checks it: every
type must exist with a layout (an error to fix otherwise); unknown fields
and links to pages the site doesn't have (in url fields and Markdown links)
are warnings; with a signal, links to the site get `utm_campaign=<signal>`
and `utm_medium=landing`; experience claims are found as for briefs. The
user edits title, description, address and the YAML, then can *Write it
again* (from their notes and edits), *Push and preview* (its own branch
`supermarket/site-page-<id>`, built, previewed, no pull request) or *Open a
pull request* (claims confirmed first; the body lists the claims, what to
add by hand and the build check). The address is fixed once the file is on
a branch. Pages show merged or closed from Gitea. Not yet tried against the
live AI or the real repository: a build is a paid AI call and pushes a
branch.
### Future enhancements
Not in any phase yet; picked up when the user asks.