Phase 7 part 5: add a section to an existing page

Sites → Sections and pages → Add a section, on any page built from
sections: choose one of the site's section types and where it goes; the
AI writes it from the page, its searches, the profile and the Inventory,
with the same rules as a new page. It's reviewed like a page (claims to
confirm, to-dos), and the pull request inserts it into the page's file as
text, so only that section is added; the build checks it. What to write
next suggests a FAQ for a section page found with questions, and a
comparison for one searched against something else.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-24 07:25:19 -07:00
co-authored by Claude Opus 5.5
parent 5705a9b58b
commit fdfbcd3d3d
15 changed files with 873 additions and 39 deletions
+24
View File
@@ -0,0 +1,24 @@
{{define "content"}}{{with .Data}}{{$d := .}}
<p><a href="/sites{{with .Current}}?site={{.Index}}{{end}}">← Sections and pages</a></p>
<h1>Add a section</h1>
<p class="lede">One more section on a page that's already on the site, of one of the site's own types: a FAQ for the questions people search, a comparison table, more features. The AI writes it from the page, your profile and the Inventory, with the same rules as a new page: nothing invented, claims of experience to confirm, a pull request that adds only that section.</p>
{{with .Page}}
<form method="post" action="/sites/pages/add?site={{$d.Current.Index}}" class="card" data-busy="Reading the page and writing…">
<input type="hidden" name="page" value="{{.Path}}">
<p>On <a href="{{$d.Current.Base}}{{.Path}}" target="_blank" rel="noopener noreferrer">{{.Path}}</a> <strong>{{.Title}}</strong>: {{join .Types " · "}}</p>
<div class="cols">
<label>Section type
<select name="type">{{range $d.Types}}{{if not .Missing}}<option value="{{.Name}}" {{if eq .Name $d.Type}}selected{{end}}>{{.Name}}{{if .Uses}} (used on {{len .Pages}} pages){{end}}</option>{{end}}{{end}}</select>
</label>
<label>Where
<select name="at">{{range $i, $t := .Types}}<option value="{{$i}}">Before section {{inc $i}} ({{$t}})</option>{{end}}<option value="{{len .Types}}" selected>At the end</option></select>
<span class="help">Before the page's closing call to action reads best, usually.</span>
</label>
</div>
<label>What it's for <span class="muted">(optional)</span>
<textarea name="notes" rows="3" placeholder="Answer the questions people search for this page; compare us with the big help desks.">{{$d.Notes}}</textarea></label>
<div class="actions"><button type="submit">Write the section</button></div>
<p class="small muted">It reads the site's repository first. Writing takes a minute.</p>
</form>
{{end}}
{{end}}{{end}}