Chapter 5 of 14

Fixing the Page

Knowing what is wrong is half the job. This chapter is the other half — done twice, once without spending anything and once with an agent editing your repository — and then the part nobody does: measuring again.

The problem

Between a finding and a fix there is a translation step that eats afternoons. “Title is 78 characters, over the 60-character threshold” is clear enough. But which title? The one in the Blade layout, the one in the front matter, or the one the CMS injects? And what should it say instead — something shorter, yes, but shorter how, keeping which words?

Multiply by thirty findings and the audit becomes a backlog nobody burns down. This is why so many sites have a beautiful report from eighteen months ago and the same score today.

First: the fix-prompt builder (free)

Select the findings you want to address and Sjá composes a single prompt containing the page context, each issue, the actual value it found and what good looks like. Copy it into whatever assistant you already pay for — Elyra, Claude, ChatGPT, the agent in your editor.

This costs nothing and needs no key, and it is worth understanding why it is more than a convenience. The prompt carries the measured values. An assistant told “improve this page's SEO” will invent plausible work. The same assistant told “the title is exactly this, it is 78 characters, the target is under 60, the page's main term is this” has no room to invent. Precision in, precision out.

Then: fixes applied to your files

With an AI provider key and the project's code path from chapter 2, Sjá can do the translation itself. The agent gets sandboxed file tools — read, write, list — restricted to the project directory, and it works the way a careful colleague would: find the file that produces this page, read it, propose the edit, wait.

A run on Freddy's landing page looks like this:

read   resources/views/pages/home.blade.php
read   resources/views/layouts/app.blade.php
write  resources/views/pages/home.blade.php   [approve?]

  - <title>Freddy - the notes app for people who
    like plain text files and owning their data</title>
  + <title>Freddy: plain-text notes you own</title>

Approval is on by default and you should leave it on. Not because the agent is reckless, but because an edit to a template is an edit to every page that uses it, and the blast radius of a template change is invisible from inside a single page's report. Reading a diff takes four seconds. Discovering next month that every page now shares one title takes considerably longer.

What the sandbox actually enforces. Paths are vetted by where they resolve, not how they are spelled, so a symlink pointing out of the project is refused rather than followed. Writes are atomic. And the agent cannot overwrite a file it has not read in the same run — which is what stops a confident rewrite of something it never saw.

The part nobody does

Run the analysis again on the same URL with the same objective. Then open History and compare the two runs.

Three things happen when you make this a habit, and all three are worth more than the individual fix:

  • You catch fixes that did not land. You edited the template; the page is served from a cache. The score did not move, and now you know — today, not in a month.
  • You catch fixes that broke something else. The shorter title is excellent and the Open Graph title, which inherited from it, is now seventeen characters. Comparison shows both.
  • You build a record. Every run is stored. In chapter 12 that record becomes a trend line and in chapter 14 it becomes the thing you show somebody who asks what changed.

Freddy's landing page: 61 → 84. Meta from 55 to 100, Structure from 70 to 92, GEO from 48 to 71. The GEO number is the interesting one — it moved because the first paragraph is now quotable, but it did not move further, and the reason is in chapters 6 and 7: access and identity, neither of which is on the page itself.

What you learned

  • The gap between finding and fix is where audits die. Close it the same day or it does not close.
  • Fix prompts carry measured values, which is what stops an assistant inventing plausible work.
  • Keep approval on. A template edit changes every page that uses it, and that is invisible from one page's report.
  • Always re-run. It catches fixes that never landed and fixes that broke a neighbour.
  • A score that stops improving is telling you the rest is not on the page.
Next: in Chapter 6 you find out whether the answer engines are allowed to fetch your page at all — the most common cause of total invisibility, and the one nobody checks.