Phase 3 part 4: changes approved one at a time, as Gitea pull requests

Proposals (at most 3 waiting) for pages on page one without clicks and
for the audit's title and description issues: the AI writes the title
(without the site's suffix, within the pixel budget) and description
from the live page and its searches. A yes syncs a working copy of the
site's Gitea repository (token as a header only), finds the page's Hugo
content file, sets title and description in its front matter, builds
with Hugo to check the page comes out as proposed, pushes a branch and
opens a pull request; it never merges. Merged changes are checked on
the live site, then compared before and after from Search Console.
Hugo is in the image. Schema 15.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-22 08:04:01 -07:00
co-authored by Claude Opus 5.5
parent 43a7b42126
commit 438192faba
26 changed files with 2267 additions and 11 deletions
+29
View File
@@ -824,6 +824,35 @@ into `main`.
with IndexNow. Its page's clicks, impressions and position are then
compared over the weeks before and after (PLAN item "before/after
tracking"). The morning check notices when a yes changed something.
- **Built 2026-11-22** (schema 15: `seo_changes`). Hugo 0.147 extended
is in the image.
- **Proposing.** `seo.Candidates` takes the *Push* pages first, then
the audit's title and description issues on pages with traffic,
then the rest. It skips pages with a change in the last 90 days.
`Proposer` reads the live page and its 90-day searches, and the AI
(task "seo") writes the title without the site's suffix (found
from the audit or the company name) and a description. Titles
over the pixel budget get one request to shorten. At most 3 wait.
*Propose a fix* is also on audit rows and *Push* pages.
- **Applying.** A yes runs `Applier` in the background. It gets the
repository from Gitea (push rights needed) and syncs a working copy
in `/data/sites/owner__name`; the token goes in as an HTTP header,
never into `.git/config`. It finds the content file (`index.md`,
`_index.md`, `url`, `slug`, language folders), works out the front
matter title from how the theme builds titles (`titleValue`), and
sets `title` and `description` (YAML or TOML). It builds before and
after: if the site builds, the built page's title and description
must come out as proposed. It then pushes `supermarket/seo-<id>`
and opens a pull request with the numbers.
- **Following up.** `Refresh`, every 30 minutes, notes a merge or a
close, then marks the change live once the live page shows it.
`ImpactOf` compares the page over equal windows (up to 28 days a
side, from 3 days of final data).
- The Monday report's "Waiting for your yes" lists the proposals.
- Settings → Search engines has Gitea's address (the Core's by
default), the token and a test. The repository and branch per
website stay in the profile.
- IndexNow moves to part 7.
5. **The next keywords (job 2).**
- Candidates come from four places:
- Search Console queries with impressions and no page that answers