Files
davidandClaude Opus 5.5 68c224f51b 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>
2026-11-22 08:18:49 -07:00

73 lines
5.1 KiB
HTML

{{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}}