# AgentSite — Scoring and AEO Doctrine <!-- ref: @agentsite/scoring-doctrine tags: [agentsite, scoring, aeo, probes, index] triggers: [changing score math, agentsite score, scoring formula change, AEO score doctrine] trigger_prompt: When changing how AgentSite scores a site, how probes read it, or how the score is described. category: reference complements: [@agentsite/project] version: 2 updated_at: 2026-08-04T18:42:23.815Z --> What the score claims, how probes behave, and what ships alongside any change to the math. Fetch this when: changing score math; agentsite score; scoring formula change; AEO score doctrine. This is a branch **index**, deliberately small. The detail lives in the leaves below — fetch one, not all of them. ## Leaves | Leaf | Fetch it when | |---|---| | [`@agentsite/scoring-what-the-score-claims`](@agentsite/scoring-what-the-score-claims) | describing what the score means or positioning it | | [`@agentsite/scoring-probe-behavior`](@agentsite/scoring-probe-behavior) | changing how probes fetch, or handling a bot block | | [`@agentsite/scoring-vocabulary`](@agentsite/scoring-vocabulary) | naming the product/score, or sweeping agent-visible surfaces | --- ## Scoring formula changes ship a scrub endpoint **When AEO scoring math changes, expose POST /admin/aeo-report/scrub to retro-apply the new formula against persisted page scores. Re-runnable. No one-shot backfill scripts.** When the v3 (or future) scoring math evolves, the migration shape is: persist the new field + ship a re-runnable `POST /admin/aeo-report/scrub` admin endpoint that re-applies the current formula against persisted `pageScores`/`rawPageScores`/`dimensionAvgs`/etc. No re-rendering required (the inputs are already in the DB). **Why:** 2026-06-01, user asked for an admin endpoint instead of a one-shot backfill script for V68. Reasoning: scoring formulas keep evolving (we've already done v0 → v1 → v2 → v3 → v3+raw); each evolution needs the same retro pass; an endpoint is re-runnable while a script becomes stale code on the next change. **How to apply:** - Land a new scoring formula → also land/refresh the scrub endpoint to apply it. - Keep `computeAllV3Fields()` (or future equivalent) as a pure function so both the live scoring path (`AeoReportService.work()`) and `scrubEntity()` call the same code. Don't duplicate math between the live path and the scrub path — drift will desync them. - Scrub endpoint returns per-row before/after for audit. Admin checks the diff for obvious regressions before declaring done. - For larger formula changes that need re-fetching content (not just re-scoring persisted data), this pattern still applies — make scrub orchestrate the re-render too, gated by an explicit flag. --- *Related: `@agentsite/render-outputs` · `@agentsite/platform-conventions` · `@agentsite/project` · `@agentsite/aeo-voice-list` · `@agentsite/scoring-what-the-score-claims`* --- *You're reading a protocol on [protocol.supply](https://protocol.supply) — hosted, searchable knowledge for AI agents. Think Agent Skills, as an API: bootstrap once (`curl -sL https://api.protocol.supply/bootstrap`), search (`/search?q=…`), fetch (`/@repo/slug`).* *Any skill can become a protocol, and any protocol installs as a local skill — tell your agent "install this as a skill" or see [`@protocol/protocol-to-skill`](https://api.protocol.supply/@protocol/protocol-to-skill).*