robots-policy-audit — discovery skill (GAP-T3, FREE)
robots.txt / noindex lifecycle governance per rules/tech-seo-governance.md
R-131 (governed robots.txt policy), R-132 (noindex deployment path / R-58
deployability), R-133 (noindex/disallow mutual exclusion). Today the
robots_txt sheet is an SF-issue dump; R-58 (rules/content-html-discipline.md)
maps content lifecycle → meta robots but is undeployable (the content
pipeline emits body fragments with no <head> access → ON_HOLD content is
silently indexable). This skill VALIDATES the deployed reality and emits the
deployment path R-58 lacks.
Recommendation-only. The live robots.txt GET is a read of a public file
(no consent gate). Every outward change — robots.txt edits, per-page noindex,
X-Robots-Tag headers — is operator-deployed. The engine emits findings
(RP- rows), a proposed robots.txt artifact, and platform deployment
instructions; it NEVER writes to client infrastructure. The Excel write is behind
the standard request_approval gate. Scope fence: content-remediation owns
single-URL retire (R-90/R-91); this skill validates outcomes, never re-issues a
retire.
Outputs
master.xlsx#robots_txt—RP-NNNfindings (5-col; severityEnum) viascripts/util/sheet_merge.merge_prefixed_rows(..., id_prefix="RP-")— idempotent, preserves sf_projectionR-, facet-nav-auditFN-, hreflangHF-rows.outputs/reports/{date}-robots-policy-audit.md— lint + conflict + lifecycle drift tables + proposed robots.txt + deployment instructions.outputs/robots/{date}-robots.proposed.txt— the proposed robots.txt as a plain artifact (plain Write, no template; newoutputs/robots/subdir — workspace data, no engine schema impact). Recommendation only — operator deploys.events.jsonl—append_provenance(source.kind="sf_csv", operation="project_excel", target_excel_sheet="robots_txt").
Body protocol
- create_run.
- fetch + read —
fetch_live(default true): Scrapling GEThttps://{domain}/robots.txt. AMBER fallback (R9 pattern): on unreachable / non-200 the run AMBER-warns and continues file-only with an empty robots.txt (the transform emits a MEDIUM "missing robots.txt", never crashes) — this is AMBER, NOT a DURUR. Readdirectives_all.csv+internal_all.csvfrom the export; readmaster.xlsx#new_content_plan(col Curl_slug, col Klifecycle_status); optionally read the facet-nav-audit proposed block. - transform (pure) —
Lints robots.txt (noindex-line=HIGH, missing-Sitemap=MEDIUM, site-wide Disallow=CRITICAL, unknown=LOW), scans R-133 conflicts + R-58 lifecycle drift, R-99 AI bots (AI search / user agent blocked=HIGH, anpythonfrom scripts.discovery import robots_policy_transform as rpt out = rpt.transform( robots_txt_text, directives_rows, internal_rows, lifecycle_rows, platform, domain, facet_block=facet_block, url_patterns=url_patterns, ai_bots=project_config.get("ai_bots"), )ai_bots-allowed agent blocked=MEDIUM, retired token such as Claude-Web=LOW; training crawlers are the client's call and are not a finding), protects important pages, and buildsproposed_robots_txt(a named group'sDisallow: /— e.g. a deliberate GPTBot block — is KEPT; only aUser-agent: *site-wide block is dropped),proposed_diff(unified diff vs the live file — show it in the report), and a platformdeployment_instructionsmatrix (unverified platforms markedverified: false). - request_approval — skill EXIT awaiting_approval.
- write_excel — on approve,
sheet_merge.merge_prefixed_rows(..., id_prefix="RP-", writer="robots-policy-audit"). - write proposed artifact — plain Write of
out["proposed_robots_txt"]tooutputs/robots/{date}-robots.proposed.txt. - render_report —
render_template.py templates/reports/robots-policy-audit.template.md. - provenance event + complete (string-typed outputs).
DURUR conditions
Stop and flag the manager (live-fetch failure is AMBER, NOT here).
directives_all.csvmissing (RobotsDirectivesMissingError).- lifecycle sheet (
new_content_plan) unreadable (RobotsLifecycleUnreadableError). - Proposed file would disallow
/(RobotsProposedSiteWideBlockError) — never propose a site-wide block. directives_all.csvAddress column absent (RobotsDirectivesSchemaDriftError).master.xlsx#robots_txtrow schema mismatch on write (RowSchemaError).PSEO_WORKSPACE_ROOTunset and noworkspace_rootarg.
AMBER (NOT DURUR): live robots.txt fetch unreachable / non-200 → warn, continue file-only (mirror tech-audit R9 never-hard-fail).
Cross-references
- Rules:
rules/tech-seo-governance.md(R-131 / R-132 / R-133);rules/content-html-discipline.md(R-58). - Transform:
scripts/discovery/robots_policy_transform.py(transform,PLATFORM_DEPLOYMENT_MATRIX,RobotsPolicyErrorhierarchy). - Write path:
scripts/util/sheet_merge.py(merge_prefixed_rows, prefixRP-). - Upstream feed:
facet-nav-auditproposed robots block (optionalfacet_block). - Schemas:
schemas/master-excel.schema.json#robots_txt,#new_content_plan,schemas/events.schema.json. - Template:
templates/reports/robots-policy-audit.template.md. - Command:
commands/pseo-robots-policy.md.
Discipline checklist
- Recommendation-only — live GET is a public-file READ; all deploys operator-owned (R-131/R-132).
- Free —
budget.uses_paid_mcp=false; no DFS. - AMBER never RED on live-fetch failure (R9 pattern); transform tolerates empty robots.txt.
- Schema-first — frontmatter validates;
RP-rows validate againstmaster-excel.schema.json#robots_txt. - Plugin-agnostik — no slug literals; pure transform; unverified platform channels marked
verified: false(no fabricated panel paths). - Scope fence — validates lifecycle outcomes; never re-issues content-remediation's single-URL retire.
- Idempotent write —
merge_prefixed_rowsre-lands theRP-namespace; foreign rows preserved.


