Phase 3 part 6: briefs and pages

A brief for a search (a new page) or a page (a rewrite) starts from what
Search Console shows the page for, reads the live top 5 with Claude's web
search (unread results marked, never guessed), and gives the title,
description, H1, angle, sections, questions, internal links to pages we
have, and the questions only the owner can answer. The page is drafted
around those answers, with no invented tests, prices or customers; every
sentence claiming an experience must be confirmed before a pull request
adds or rewrites the page, checked with a Hugo build. Merged pages are
followed to the live site. Schema 17.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-22 08:18:49 -07:00
co-authored by Claude Opus 5.5
parent c0a5ddf77f
commit 68c224f51b
19 changed files with 1440 additions and 22 deletions
+1
View File
@@ -45,6 +45,7 @@
<a href="/seo" {{if eq $nav "seo/ranks"}}aria-current="page"{{end}}>What ranks</a>
<a href="/seo/changes" {{if eq $nav "seo/changes"}}aria-current="page"{{end}}>Changes</a>
<a href="/seo/keywords" {{if eq $nav "seo/keywords"}}aria-current="page"{{end}}>Next keywords</a>
<a href="/seo/briefs" {{if eq $nav "seo/briefs"}}aria-current="page"{{end}}>Briefs and pages</a>
<a href="/seo/audit" {{if eq $nav "seo/audit"}}aria-current="page"{{end}}>Audit</a>
</div>
{{end}}
+72
View File
@@ -0,0 +1,72 @@
{{define "content"}}{{with .Data}}{{$b := .B}}{{$d := .}}
<div class="heading">
<h1>{{$b.Keyword}}</h1>
<div class="buttons"><a class="button secondary" href="/seo/briefs?site={{.Site.Index}}">All briefs</a></div>
</div>
<p class="lede">{{if $b.Page}}Rewrite of <a href="{{$b.Page}}" target="_blank" rel="noopener noreferrer">{{pagePath $b.Page}}</a>{{else}}A new page{{end}} · {{template "brief-status" $b}}{{if $b.Searches}} · {{$b.Searches}} web searches{{end}}{{with $b.Error}} · <span class="error-text">{{.}}</span>{{end}}</p>
{{with $b.Plan.Finding}}<section class="card"><h2>What the data shows first</h2><p>{{.}}</p></section>{{end}}
{{if $b.ShownFor}}
<h2>What Google shows it for</h2>
<table class="list">
<thead><tr><th>Search</th><th class="num">Impressions</th><th class="num">Clicks</th><th class="num">Position</th></tr></thead>
<tbody>{{range $b.ShownFor}}<tr><td>{{.Query}}</td><td class="num">{{num .Impressions}}</td><td class="num">{{num .Clicks}}</td><td class="num">{{dec1 .Position}}</td></tr>{{end}}</tbody>
</table>
{{end}}
<h2>The live top results</h2>
<ol class="items">{{range $b.Top}}<li class="item"><a href="{{.URL}}" target="_blank" rel="noopener noreferrer">{{or .Title .URL}}</a>
{{if not .Read}}<span class="badge failed">couldn't be read</span>{{end}}
<div class="small">{{with .Promises}}Promises: {{.}}. {{end}}{{with .Lacks}}{{.}}{{end}}</div></li>{{else}}<li class="item muted">None found.</li>{{end}}</ol>
<form method="post" action="/seo/briefs/{{$b.ID}}/save">
<section class="card">
<h2>The brief</h2>
<label>Title <input name="title" value="{{$b.Plan.Title}}"></label>
<label>Meta description <textarea name="description" rows="2">{{$b.Plan.Description}}</textarea></label>
<label>H1 <input name="h1" value="{{$b.Plan.H1}}"></label>
<label>The angle <textarea name="angle" rows="2">{{$b.Plan.Angle}}</textarea></label>
<label>Sections, in order <span class="muted small">one per line</span><textarea name="sections" rows="6">{{.Sections}}</textarea></label>
<label>Questions the page must answer <span class="muted small">one per line</span><textarea name="questions" rows="4">{{.Questions}}</textarea></label>
{{if $b.Plan.Links}}<p class="small"><strong>Internal links:</strong> {{range $i, $l := $b.Plan.Links}}{{if $i}} · {{end}}<a href="{{$l.URL}}" target="_blank" rel="noopener noreferrer">{{pagePath $l.URL}}</a> <span class="muted">({{$l.Why}})</span>{{end}}</p>{{end}}
{{if $b.Plan.Needs}}<p class="small"><strong>Beyond the text, it needs:</strong> {{range $i, $n := $b.Plan.Needs}}{{if $i}}; {{end}}{{$n}}{{end}}</p>{{end}}
{{if not $b.Page}}<label>Address of the new page <input name="path" value="{{$b.Path}}"></label>{{end}}
</section>
<section class="card">
<h2>Only you can answer</h2>
<p class="help">The page is written around these answers, and claims nothing else. If you didn't test something, say “not tested”: the page will say so.</p>
{{range .Asks}}<label>{{.Q}} <textarea name="answer" rows="2">{{.A}}</textarea></label>{{end}}
<div class="actions">
<button type="submit" formaction="/seo/briefs/{{$b.ID}}/write" data-busy="Writing the page…">{{if $b.Draft}}Write the page again{{else}}Write the page{{end}}</button>
<button type="submit" class="secondary">Save</button>
</div>
</section>
</form>
{{if $b.Draft}}
<form method="post" action="/seo/briefs/{{$b.ID}}/draft">
<section class="card">
<h2>The page</h2>
<textarea name="draft" rows="24" class="mono">{{$b.Draft}}</textarea>
{{if $b.Claims}}
<h3>Sentences that claim an experience</h3>
<p class="help">Each one must be true. Tick it if it is; if it isn't, edit or delete it in the page above and save.</p>
{{range $b.Claims}}<label class="check"><input type="checkbox" name="claim" value="{{.}}"> {{.}}</label>{{end}}
{{else}}<p class="help">No sentence claims an experience.</p>{{end}}
<div class="actions">
<button type="submit" class="secondary">Save the page</button>
{{if or (eq $b.Status "page") (eq $b.Status "failed")}}<button type="submit" formaction="/seo/briefs/{{$b.ID}}/pr" data-busy="Opening…" {{if not $d.Gitea}}disabled title="Save a Gitea token first"{{end}}>Open a pull request</button>{{end}}
</div>
{{with $b.Note}}<p class="small muted">{{.}}</p>{{end}}
</section>
</form>
{{end}}
{{if or (eq $b.Status "brief") (eq $b.Status "page") (eq $b.Status "failed")}}
<form method="post" action="/seo/briefs/{{$b.ID}}/drop" data-confirm="Set this brief aside?" class="danger-zone"><button type="submit" class="secondary small">Set it aside</button></form>
{{end}}
{{end}}{{end}}
{{define "brief-status"}}{{if eq .Status "brief"}}<span class="badge draft">brief: your answers</span>{{else if eq .Status "page"}}<span class="badge draft">page drafted: check it</span>{{else if eq .Status "applying"}}<span class="badge scheduled">making the pull request…</span>{{else if eq .Status "pr"}}<a class="badge" href="{{.PRURL}}" target="_blank" rel="noopener noreferrer">pull request #{{.PRNumber}} ↗</a>{{else if eq .Status "merged"}}<span class="badge">merged</span>{{else if eq .Status "live"}}<span class="badge published">live</span>{{else if eq .Status "failed"}}<span class="badge failed">failed</span>{{end}}{{end}}
+35
View File
@@ -0,0 +1,35 @@
{{define "content"}}{{with .Data}}{{$d := .}}
<div class="heading"><h1>Briefs and pages</h1></div>
<p class="lede">A brief is the page before the page. It starts from what Google really shows the page for, then reads the live top 5 for the search, then says what the page must promise and cover, in what order, and what only you can answer. You answer; the AI writes the page around your answers; you confirm every sentence that claims an experience; a pull request carries it to the site.</p>
{{if not .Sites}}
<section class="card empty"><p>Add your websites to the <a href="/settings/profile">profile</a> first.</p></section>
{{else}}
{{if gt (len .Sites) 1}}<nav class="tabs">{{range .Sites}}<a href="/seo/briefs?site={{.Index}}" {{if eq .Index $d.Current.Index}}aria-current="page"{{end}}>{{.URL}}</a>{{end}}</nav>{{end}}
<form method="post" action="/seo/briefs?site={{.Current.Index}}" class="card" data-busy="Writing the brief… (a minute or two)">
<h2>Write a brief</h2>
<div class="cols">
<label>For a new page, the search {{if .Picked}}<span class="small muted">(your picks: {{range $i, $k := .Picked}}{{if $i}}, {{end}}{{$k.Keyword}}{{end}})</span>{{end}}
<input name="keyword" list="picked" placeholder="e.g. google workspace alternative">
<datalist id="picked">{{range .Picked}}<option value="{{.Keyword}}">{{end}}</datalist></label>
<label>Or, to rewrite a page, its address <input name="page" placeholder="{{.Current.URL}}/pricing/"></label>
</div>
<p class="help">It uses up to 5 web searches to read the live top results. For a rewrite, the search defaults to the one the page is shown for most.</p>
<div class="actions"><button type="submit">Write the brief</button></div>
</form>
{{if .Briefs}}
<table class="list">
<thead><tr><th>Search</th><th>Page</th><th>Status</th></tr></thead>
<tbody>{{range .Briefs}}<tr>
<td><a href="/seo/briefs/{{.ID}}">{{.Keyword}}</a></td>
<td class="small">{{if .Page}}<a href="{{.Page}}" target="_blank" rel="noopener noreferrer">{{pagePath .Page}}</a>{{else}}new: {{.Path}}{{end}}</td>
<td>{{template "brief-status" .}}</td>
</tr>{{end}}</tbody>
</table>
{{end}}
{{end}}
{{end}}{{end}}
{{define "brief-status"}}{{if eq .Status "brief"}}<span class="badge draft">brief: your answers</span>{{else if eq .Status "page"}}<span class="badge draft">page drafted: check it</span>{{else if eq .Status "applying"}}<span class="badge scheduled">making the pull request…</span>{{else if eq .Status "pr"}}<a class="badge" href="{{.PRURL}}" target="_blank" rel="noopener noreferrer">pull request #{{.PRNumber}} ↗</a>{{else if eq .Status "merged"}}<span class="badge">merged</span>{{else if eq .Status "live"}}<span class="badge published">live</span>{{else if eq .Status "failed"}}<span class="badge failed">failed</span>{{end}}{{end}}
+2 -1
View File
@@ -39,7 +39,8 @@
Volume and difficulty: not available.</p>
</div>
<div class="row-actions">
{{if ne .Status "picked"}}<form method="post" action="/seo/keywords/{{.ID}}/pick"><button type="submit" class="small">Pick this one</button></form>{{end}}
{{if ne .Status "picked"}}<form method="post" action="/seo/keywords/{{.ID}}/pick"><button type="submit" class="small">Pick this one</button></form>
{{else}}<form method="post" action="/seo/briefs" data-busy="Writing the brief…"><input type="hidden" name="site_url" value="{{.Site}}"><input type="hidden" name="keyword" value="{{.Keyword}}"><button type="submit" class="small">Write the brief</button></form>{{end}}
{{if eq .Status "dismissed"}}<form method="post" action="/seo/keywords/{{.ID}}/restore"><button type="submit" class="secondary small">Bring back</button></form>
{{else}}<form method="post" action="/seo/keywords/{{.ID}}/dismiss"><button type="submit" class="secondary small">Dismiss</button></form>{{end}}
</div>
+2 -1
View File
@@ -31,7 +31,8 @@
<h2>Push</h2>
<p class="help">On page one, shown a lot, hardly clicked: Google did the hard part, and the page loses at the click. Compare its main query with its title first.</p>
{{range .Push}}<p><a href="{{.Page}}" target="_blank" rel="noopener noreferrer">{{pagePath .Page}}</a><br><span class="small">{{.Why}}</span>
<form method="post" action="/seo/changes/page?site={{$d.Current.Index}}" class="inline" data-busy="Writing…"><input type="hidden" name="page" value="{{.Page}}"><input type="hidden" name="why" value="{{.Why}}"><button type="submit" class="link small">Propose a new title and description</button></form></p>{{else}}<p class="help">No page sits on page one with few clicks. Good, or too little data.</p>{{end}}
<form method="post" action="/seo/changes/page?site={{$d.Current.Index}}" class="inline" data-busy="Writing…"><input type="hidden" name="page" value="{{.Page}}"><input type="hidden" name="why" value="{{.Why}}"><button type="submit" class="link small">Propose a new title and description</button></form>
· <form method="post" action="/seo/briefs?site={{$d.Current.Index}}" class="inline" data-busy="Writing the brief…"><input type="hidden" name="page" value="{{.Page}}"><button type="submit" class="link small">Write a brief to rewrite it</button></form></p>{{else}}<p class="help">No page sits on page one with few clicks. Good, or too little data.</p>{{end}}
</section>
</div>