forked from bchanot/claude
feat(agents): W5 seo/geo 3-mode pipelines — collect sonnet / judge opus pin / template sonnet (BDR-077)
seo-analyzer + geo-analyzer gain MODE: collect|judge|template around the dispatcher (mode-based, zero body-text moves — seo-data fetch-wiring locks survive; opus pin kept = fail-safe direction, a forgotten override over-tiers but never downgrades judgment). Run-scoped gitignored signals handoff (.audit/*-signals-<RUNID>.md + COLLECTION COMPLETE sentinel), judge fails closed on absent/mismatched/unsealed signals. /seo rewired to 3 phases (domains parallel per phase) + DISPATCHER ERROR CONTRACT (mute/ERROR judge never carried into templating; retry once, escalate); /geo same single-domain; legacy no-MODE single-shot kept on the opus pin for /harden narrow-scope + /onboard report-only. Dropped /geo's 'ask and I relay' fiction (dispatched agents cannot ask). In-wave smokes PASSED disk-verified: collect signals+sentinel; judge ERROR-verdict on wrong RUNID; real judge = honest N/A + deterministic engine + full scoring grammar; template = complete envelope + verbatim sentinel + zero re-derivation. Census §18 (125 pass — one vacuous line-wrapped lock caught by the census itself and fixed), make test exit 0.
This commit is contained in:
@@ -24,6 +24,38 @@ $ARGUMENTS
|
||||
|
||||
---
|
||||
|
||||
## MODE DETECTION (BDR-077 — pipeline modes around the dispatcher)
|
||||
|
||||
The dispatcher (/seo) runs this agent as a 3-stage pipeline; /harden and
|
||||
/onboard may still run it single-shot. Parse the MODE line in the prompt:
|
||||
|
||||
- **`MODE: collect`** — dispatched `model: "sonnet"` (mechanical/standard
|
||||
collection; the call-site override takes precedence over the opus pin).
|
||||
Runs STEP 0-5 ONLY, writes every gathered signal (tech context, tool
|
||||
availability, live-audit raw results, on-page inventory + sampling
|
||||
frame) to the run-scoped, gitignored `.audit/seo-signals-<RUNID>.md`,
|
||||
terminated by the line `COLLECTION COMPLETE — RUNID: <RUNID>`, then
|
||||
emits a short `COLLECT REPORT` (`STATUS: DONE | BLOCKED`, RUNID,
|
||||
COVERAGE counts) and STOPS. No scoring, no findings, no bundle.
|
||||
- **`MODE: judge`** — runs on the opus frontmatter pin (audit judgment).
|
||||
FIRST loads `.audit/seo-signals-<RUNID>.md`: absent, RUNID mismatch, or
|
||||
missing `COLLECTION COMPLETE` sentinel → emit
|
||||
`SEO JUDGE — VERDICT: ERROR(<reason>)` and STOP (fail closed — NEVER
|
||||
score stale or partial signals). Then runs STEP 6-11 on the signals +
|
||||
the dispatcher-fed context and emits the scoring blocks + findings +
|
||||
action plan + triage batches as its report. No bundle, no SEO.md.
|
||||
- **`MODE: template`** — dispatched `model: "sonnet"`. INPUT: the
|
||||
dispatcher-fed context + the judge's report VERBATIM (never re-derive a
|
||||
score or re-judge a finding). Runs STEP 12-14: FIX BUNDLE + sentinel,
|
||||
report file, envelope.
|
||||
- **No MODE line** — legacy single-shot: all steps in sequence on the
|
||||
opus pin (used by /harden narrow-scope and /onboard report-only).
|
||||
|
||||
Every mode receives the full dispatcher CONTEXT block (LRN-126 — the
|
||||
STEP 1-2 business/tech context is consumed by all later steps).
|
||||
|
||||
---
|
||||
|
||||
## STEP 0 — AUDIT DEPTH
|
||||
|
||||
**First action.** If a parent skill (`/seo` dispatcher) passed depth
|
||||
@@ -744,6 +776,10 @@ Validate:
|
||||
|
||||
---
|
||||
|
||||
> **MODE BOUNDARY — `MODE: collect` ends at STEP 5**: write the signals
|
||||
> file + `COLLECTION COMPLETE — RUNID: <RUNID>` terminal line, emit the
|
||||
> COLLECT REPORT, stop. STEP 6-11 below are `MODE: judge` territory.
|
||||
|
||||
## STEP 6 — EXTERNAL PRESENCE AUDIT `[FULL only, local business only]`
|
||||
|
||||
**Skip if not a local business** (pure SaaS, content-only → jump to STEP 7).
|
||||
@@ -1182,6 +1218,10 @@ Do not proceed to STEP 12 until this plan is printed.
|
||||
|
||||
---
|
||||
|
||||
> **MODE BOUNDARY — `MODE: judge` ends at STEP 11** (scoring + findings +
|
||||
> plan + batches reported, nothing serialized). STEP 12-14 below are
|
||||
> `MODE: template` territory, operating on the judge report verbatim.
|
||||
|
||||
## STEP 12 — EMIT FIX BUNDLE `[both]`
|
||||
|
||||
**You do NOT apply fixes and you do NOT dispatch any sub-agent.** Same
|
||||
|
||||
Reference in New Issue
Block a user