/** * NeverEncodeFilter — pure, total, DROP-only runtime never-encode belt * (spec-20260717-seo-improver-builder, Sprint 2; ADR-3). Third belt after * parse-time drop (`parser.ts:111`, `policyClassRaw === "never-encode"`) and * the skill-content lint (`skills-content.test.ts:26-33`). This belt catches * an LLM-*synthesized* banned tactic at runtime — one that was never in a * skill file, so belts 1/2 never see it — even when it carries a * well-formed `citationUrl` that would otherwise sail through * `SeoCitationGate` (`citation-gate.ts:66-90`). * * Pure and total, mirroring `SeoCitationGate.apply` exactly: imports ONLY * `./types.js`. No LLM, no egress, no filesystem, no clock, no * `Math.random`. Identical input always yields identical output; never * throws. DROP-only (ADR-3 option table, nonGoal #1): unlike the citation * gate, this filter does NOT compute a `blocked`/exit-2 flag — a single * hallucinated phrase must not brick an otherwise-clean run. */ import type { SeoFinding } from "./types.js"; export type NeverEncodeResult = { /** Findings whose recommendation/evidence matches NO banned tactic — the ONLY findings passed downstream. */ kept: SeoFinding[]; /** Findings whose recommendation/evidence matches a banned never-encode tactic. */ dropped: SeoFinding[]; }; /** * Single exported const so the parser floor (`retriever.ts:34-37`), the * benchmark's test-local mirror (`benchmark/harness.ts:79-86`), and this * filter share intent (generatorNotes). Case-insensitive, `\b`-anchored to * avoid over-matching clean recommendations ("Fix duplicate title tags...", * "Add a self-referencing canonical tag."). Covers all 8 sc-2-2 classes: * parasite SEO, expired-domain, paid/bought links, PBN/link schemes, mass AI * pages, cloaking, doorway pages, AI-recommendation poisoning. The first 6 * are the existing set (`skills-content.test.ts:26-33`); PBN/cloaking/ * doorway are new for this sprint. */ export declare const NEVER_ENCODE_PATTERNS: readonly RegExp[]; export declare class NeverEncodeFilter { /** * Partitions `findings` into `kept`/`dropped` by banned-tactic text * matching. Pure and total: identical input always yields identical * output. DROP-only — never computes a block/exit-code signal (ADR-3). */ apply(findings: SeoFinding[]): NeverEncodeResult; } //# sourceMappingURL=never-encode-filter.d.ts.map