{"id":"8104735e-653a-4111-935e-973c29a97f11","entityType":"agent","slug":"clawhub-athola-nm-scribe-slop-detector","name":"slop-detector","canonicalUrl":"https://www.xpersona.co/agent/clawhub-athola-nm-scribe-slop-detector","canonicalPath":"/agent/clawhub-athola-nm-scribe-slop-detector","generatedAt":"2026-10-10T10:56:42.102Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"editorial-content","verified":true,"confidence":"high","updatedAt":"2026-10-10T07:28:33.045Z","emptyReason":null},"description":"Detects AI-generated writing patterns in prose Skill: slop-detector Owner: athola Summary: Detects AI-generated writing patterns in prose Tags: latest:1.9.19 Version history: v1.9.19 | 2026-08-26T13:22:04.989Z | user Release v1.9.19 v1.9.17 | 2026-07-30T05:42:01.025Z | user Release v1.9.17 v1.9.16 | 2026-07-14T19:58:50.789Z | user Release v1.9.16 v1.9.14 | 2026-06-30T18:06:29.352Z | user Release v1.9.14 v1.9.13 | 2026-06-27T16:24:12.634Z | user Release v1.9.13 v1","descriptionLabel":"Technical summary","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 1.6K downloads reported by the source. Last updated 10/10/2026.","installCommand":"clawhub skill install s17emme0e2m3cpf7k2jvp3a84984b8z9:nm-scribe-slop-detector","sourceUrl":"https://clawhub.ai/athola/nm-scribe-slop-detector","homepage":"https://clawhub.ai/athola/skills/nm-scribe-slop-detector","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/athola/nm-scribe-slop-detector","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/athola/skills/nm-scribe-slop-detector","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":64,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"Detects AI-generated writing patterns in prose Skill: slop-detector Owner: athola Summary: Detects AI-generated writing patterns in prose Tags: latest:1.9.19 Ve"},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-10T07:28:33.045Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[],"verifiedCount":0,"selfDeclaredCount":1,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile"}},"adoption":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-10T07:28:33.045Z","emptyReason":null},"stars":null,"forks":null,"downloads":1591,"packageName":null,"latestVersion":"1.9.19","tractionLabel":"1.6K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-10T07:28:33.045Z","emptyReason":null},"lastUpdatedAt":"2026-10-10T07:28:33.045Z","lastCrawledAt":"2026-10-10T07:28:33.045Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-11T07:28:33.045Z","lastVerifiedAt":null,"highlights":[{"version":"1.9.19","createdAt":"2026-08-26T13:22:04.989Z","changelog":"Release v1.9.19","fileCount":20,"zipByteSize":73273},{"version":"1.9.17","createdAt":"2026-07-30T05:42:01.025Z","changelog":"Release v1.9.17","fileCount":20,"zipByteSize":73153},{"version":"1.9.16","createdAt":"2026-07-14T19:58:50.789Z","changelog":"Release v1.9.16","fileCount":20,"zipByteSize":73298},{"version":"1.9.14","createdAt":"2026-06-30T18:06:29.352Z","changelog":"Release v1.9.14","fileCount":20,"zipByteSize":73206},{"version":"1.9.13","createdAt":"2026-06-27T16:24:12.634Z","changelog":"Release v1.9.13","fileCount":20,"zipByteSize":73053},{"version":"1.9.12","createdAt":"2026-06-19T03:19:55.253Z","changelog":"Release v1.9.12","fileCount":20,"zipByteSize":73112},{"version":"1.0.2","createdAt":"2026-05-09T02:20:27.193Z","changelog":"Release v1.9.5","fileCount":13,"zipByteSize":26733},{"version":"1.0.1","createdAt":"2026-05-06T14:21:56.791Z","changelog":"Release v1.9.4","fileCount":12,"zipByteSize":25485}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s17emme0e2m3cpf7k2jvp3a84984b8z9:nm-scribe-slop-detector","setupComplexity":"low","setupSteps":["Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.","Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-athola-nm-scribe-slop-detector/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-athola-nm-scribe-slop-detector/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-athola-nm-scribe-slop-detector/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-athola-nm-scribe-slop-detector/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-athola-nm-scribe-slop-detector/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-athola-nm-scribe-slop-detector/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-10T10:56:42.093Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-athola-nm-scribe-slop-detector/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-athola-nm-scribe-slop-detector/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-athola-nm-scribe-slop-detector/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-athola-nm-scribe-slop-detector/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"high","updatedAt":"2026-10-10T07:28:33.045Z","emptyReason":null},"readme":"Skill: slop-detector\n\nOwner: athola\n\nSummary: Detects AI-generated writing patterns in prose\n\nTags: latest:1.9.19\n\nVersion history:\n\nv1.9.19 | 2026-08-26T13:22:04.989Z | user\n\nRelease v1.9.19\n\nv1.9.17 | 2026-07-30T05:42:01.025Z | user\n\nRelease v1.9.17\n\nv1.9.16 | 2026-07-14T19:58:50.789Z | user\n\nRelease v1.9.16\n\nv1.9.14 | 2026-06-30T18:06:29.352Z | user\n\nRelease v1.9.14\n\nv1.9.13 | 2026-06-27T16:24:12.634Z | user\n\nRelease v1.9.13\n\nv1.9.12 | 2026-06-19T03:19:55.253Z | user\n\nRelease v1.9.12\n\nv1.0.2 | 2026-05-09T02:20:27.193Z | user\n\nRelease v1.9.5\n\nv1.0.1 | 2026-05-06T14:21:56.791Z | user\n\nRelease v1.9.4\n\nv1.0.0 | 2026-04-20T14:01:56.796Z | auto\n\n- Initial release of the slop-detector skill for identifying AI-generated content markers in documentation and prose.\n- Detects vocabulary, phrase, structural, and sycophantic patterns commonly associated with generated text.\n- Calculates a slop density score based on detected markers and provides actionable remediation recommendations.\n- Supports language detection and cultural calibration with language-specific patterns.\n- Outputs a detailed markdown report highlighting high-confidence markers, structural issues, and suggestions for improvement.\n\nArchive index:\n\nArchive v1.9.19: 20 files, 73273 bytes\n\nFiles: modules/anti-goals.md (8997b), modules/ci-integration.md (2887b), modules/cleanup-workflow.md (9184b), modules/config-file.md (3524b), modules/document-economy.md (6561b), modules/empirical-baseline.md (8768b), modules/evidence-backed-claims.md (7198b), modules/fiction-patterns.md (4570b), modules/hallucination-detection.md (6973b), modules/identity-and-voice-leaks.md (7619b), modules/language-handling.md (5275b), modules/remediation-strategies.md (9473b), modules/reporting.md (4733b), modules/structural-patterns.md (15723b), modules/structured-finding-output.md (8231b), modules/stub-and-deferral.md (5617b), modules/vocabulary-patterns.md (17805b), skill-card.md (2659b), SKILL.md (17899b), _meta.json (143b)\n\nFile v1.9.19:SKILL.md\n\n---\nname: slop-detector\ndescription: Detects AI-generated writing patterns in prose\nversion: 1.9.8\ntriggers:\n  - ai-detection\n  - slop\n  - writing\n  - cleanup\n  - documentation\n  - quality\n  - reviewing docs for slop\n  - vague language\n  - or identity leaks before publishing\nmetadata: {\"openclaw\": {\"homepage\": \"https://github.com/athola/claude-night-market/tree/master/plugins/scribe\", \"emoji\": \"\\u270d\\ufe0f\", \"requires\": {\"config\": [\"night-market.scribe:shared\"]}}}\nsource: claude-night-market\nsource_plugin: scribe\n---\n\n> **Night Market Skill** — ported from [claude-night-market/scribe](https://github.com/athola/claude-night-market/tree/master/plugins/scribe). For the full experience with agents, hooks, and commands, install the Claude Code plugin.\n\n\n# AI Slop Detection\n\n**Slop is a density problem, not a word problem.**\n\nA single \"delve\" is fine. Five \"delves\" near a \"tapestry\"\nand an \"embark\" is generated text. This skill scores\ndensity per 100 words, marker clustering, and whether\nthe overall register fits the document type. It does not\nban words; it flags concentrations.\n\n## Execution Workflow\n\nIdentify target files and classify them as technical docs,\nnarrative prose, or code comments. Classification feeds\ncontext-aware scoring: tier-1 markers in marketing copy\nscore lower than the same markers in API reference.\n\n### Language Detection\n\n- Auto-detect language from text content using function word frequency\n- Override with explicit `--lang` parameter (en, de, fr, es)\n- Load language-specific patterns from `data/languages/{lang}.yaml`\n- Fall back to English if detection confidence is low\n- See `modules/language-handling.md` for cultural calibration and concrete pattern sets\n\n### Vocabulary and Phrase Detection\n\nLoad: `@modules/vocabulary-patterns.md`\n\nMarkers fall into three confidence tiers. Tier 1 words\n(\"delve\", \"multifaceted\", \"leverage\") appear far more often\nin AI text than human text. Tier 2 covers context-dependent\ntransitions (\"moreover\", \"subsequently\"). Tier 3 covers\nvapid phrases (\"In today's fast-paced world\", \"cannot be\noverstated\").\n\n| Word | Context | Human Alternative |\n|------|---------|-------------------|\n| delve | \"delve into\" | explore, examine, look at |\n| tapestry | \"rich tapestry\" | mix, combination, variety |\n| realm | \"in the realm of\" | in, within, regarding |\n| embark | \"embark on a journey\" | start, begin |\n| beacon | \"a beacon of\" | example, model |\n| spearheaded | formal attribution | led, started |\n| multifaceted | describing complexity | complex, varied |\n| comprehensive | describing scope | thorough, complete |\n| pivotal | importance marker | key, important |\n| nuanced | sophistication signal | subtle, detailed |\n| meticulous/meticulously | care marker | careful, detailed |\n| intricate | complexity marker | detailed, complex |\n| showcasing | display verb | showing, displaying |\n| leveraging | business jargon | using |\n| streamline | optimization verb | simplify, improve |\n\n### Tier 2: Medium-Confidence Markers (Score: 2 each)\n\nCommon but context-dependent:\n\n| Category | Words |\n|----------|-------|\n| Transition overuse | moreover, furthermore, indeed, notably, subsequently |\n| Intensity clustering | significantly, substantially, fundamentally, profoundly |\n| Hedging stacks | potentially, typically, often, might, perhaps |\n| Action inflation | revolutionize, transform, unlock, unleash, elevate |\n| Empty emphasis | crucial, vital, essential, paramount |\n\n### Tier 3: Phrase Patterns (Score: 2-4 each)\n\n| Phrase | Score | Issue |\n|--------|-------|-------|\n| \"In today's fast-paced world\" | 4 | Vapid opener |\n| \"It's worth noting that\" | 3 | Filler |\n| \"At its core\" | 2 | Positional crutch |\n| \"Cannot be overstated\" | 3 | Empty emphasis |\n| \"A testament to\" | 3 | Attribution cliche |\n| \"Navigate the complexities\" | 4 | Business speak |\n| \"Unlock the potential\" | 4 | Marketing speak |\n| \"Treasure trove of\" | 3 | Overused metaphor |\n| \"Game changer\" | 3 | Buzzword |\n| \"Look no further\" | 4 | Sales pitch |\n| \"Nestled in the heart of\" | 4 | Travel writing cliche |\n| \"Embark on a journey\" | 4 | Melodrama |\n| \"Ever-evolving landscape\" | 4 | Tech cliche |\n| \"Hustle and bustle\" | 3 | Filler |\n\n## Step 3: Structural Pattern Detection\n\nLoad: `@modules/structural-patterns.md`\n\n### Em Dash Overuse\n\nThe single most-cited 2026 AI tell across Wikipedia, the Field\nGuide, and the Algorithmic Bridge. Detection runs in two modes:\n\n**Audit mode** (forensic, applied to unknown prose):\n- **0-1 per 1000 words**: Normal human range\n- **2-4**: Elevated, review usage\n- **5+**: Strong AI signal\n\n**Prevention mode** (applied to docs the agent just generated):\n- **Target zero**. Every em-dash is a finding.\n- Replace with commas (asides), parentheses (tangents), colons\n  (definitions), or periods (separate thoughts). See\n  `modules/structural-patterns.md` § Em Dash Analysis for the\n  full replacement table.\n\n```bash\n# Count em dashes in file\ngrep -o '—' file.md | wc -l\n```\n\n### Tricolon Detection\n\nAI loves groups of three with alliteration:\n- \"fast, efficient, and reliable\"\n- \"clear, concise, and compelling\"\n- \"robust, reliable, and resilient\"\n\nPattern: `adjective, adjective, and adjective` with similar sounds.\n\n### List-to-Prose Ratio\n\nCount bullet points vs paragraph sentences:\n- **>60% bullets**: AI tendency\n- **Emoji-led bullets**: Strong AI signal in technical docs\n\n### Sentence Length Uniformity\n\nMeasure standard deviation of sentence lengths:\n- **Low variance** (SD < 5 words): AI monotony\n- **High variance** (SD > 10 words): Human variation\n\n### Paragraph Symmetry\n\nAI produces \"blocky\" text with uniform paragraph lengths.\nCheck whether paragraphs cluster around the same word count.\n\n## Step 4: Identity & Voice Leak Sweep (P0)\n\nLoad: `@modules/identity-and-voice-leaks.md`\n\n**Some patterns are not slop: they are direct evidence\nthat AI generated text leaked into a published artifact.**\nA single match in this class fails review independently\nof any other score.\n\nScan for:\n\n1. **Identity leaks** (\"As a large language model\",\n   \"as of my training cutoff\", \"I cannot provide\") —\n   severity: critical, no exceptions.\n2. **Conversational voice leaks** (\"Hope this helps!\",\n   \"Great question!\", \"Sure!\") outside transcript blocks.\n3. **Self-narration of structure** (\"In this section, we\n   will cover...\", \"Let's dive into...\", \"By the end of\n   this guide...\").\n4. **Hedging seesaw** (\"While X has its merits, it's not\n   without its challenges\").\n5. **Parallel \"not just\" / \"not only\"** as paragraph\n   openers.\n\nSee the module for the full pattern catalogue and false-\npositive guidance.\n\n## Step 4.5: Sycophantic Pattern Detection\n\nEspecially relevant for conversational or instructional content\n(complements Class 2 of the identity-and-voice-leaks module):\n\n| Phrase | Issue |\n|--------|-------|\n| \"I'd be happy to\" | Servile opener |\n| \"Great question!\" | Empty validation |\n| \"Absolutely!\" | Over-agreement |\n| \"That's a wonderful point\" | Flattery |\n| \"I'm glad you asked\" | Filler |\n| \"You're absolutely right\" | Sycophancy |\n\nThese phrases add no information and signal generated content.\n\n## Step 4.6: Tier 5 / 2026 Patterns (Prevention-Strict)\n\nThe 2026 cross-source consensus (Wikipedia *Signs of AI\nwriting*, Algorithmic Bridge *10 Signs*, Ignorance.ai *Field\nGuide*, Stop-Slop Claude skill, George Kao, ContentBeta,\nOliviaCal) identifies a handful of shapes that dominate\npost-GPT-5 / post-Claude-4.5 prose. Each is detailed in\n`@modules/vocabulary-patterns.md` (lexical form) and\n`@modules/structural-patterns.md` (structural form).\n\n| Pattern | Form | Why it matters |\n|---------|------|----------------|\n| Em-dash overuse | — used as rhetorical pause | Most-cited single tell of 2026 |\n| Plus-sign for \"and\" | \"hooks and skills\" in prose | Strong: humans have \"and\" |\n| Spatial copula | \"lives in\", \"sits at\", \"stands as\", \"boasts\" | Inanimate subject with animate verb |\n| Negative parallelism | \"Not X but Y\", \"No X. No Y. Just Z.\", \"No X, no Y, no Z\", \"It's not X, it's Y\", \"Y, not X\" | Rhetorical scaffold with no argument |\n| Throat-clearing openers | \"Here's the thing,\", \"Look,\", \"Let that sink in.\" | Discourse markers signaling nothing |\n| Three-fragment burst | \"Focused. Aligned. Measurable.\" | Rhythm without information |\n| Significance cluster | \"stands as a testament to\", \"marks a turning point\" | Asserts importance without showing it |\n| Smart quotes in technical prose | `\"text\"` / `\"text\"` instead of `\"text\"` | Word-processor paste signature |\n| Loop/cascade vocab | \"unpack\", \"surface\" (verb), \"a quiet shift\" | 2026 systems-theory affectation |\n\n**Prevention rule**: when the slop-detector runs on docs the\nagent itself just generated (auto-invoked by `/doc-generate`,\n`/doc-polish`, `/update-readme`, `/update-docs`, etc.), every\nmatch in this table is a hard failure. Fix before write. See\n`modules/remediation-strategies.md` § Tier 5 / 2026 for the\nsubstitution tables.\n\n## Step 5: Calculate Slop Density Score\n\n```\nslop_score = (tier1_count * 3 + tier2_count * 2 + phrase_count * avg_phrase_score) / word_count * 100\n```\n\n| Score | Rating | Action |\n|-------|--------|--------|\n| 0-1.0 | Clean | No action needed |\n| 1.0-2.5 | Light | Spot remediation |\n| 2.5-5.0 | Moderate | Section rewrite recommended |\n| 5.0+ | Heavy | Full document review |\n\n## Step 6: Document Economy Check\n\nLoad: `@modules/document-economy.md`\n\n**Sentence cleanliness is necessary, not sufficient.** A document\ncan score 0 on slop density and still waste reader time by being\ntoo long, lacking a thesis, or repeating everything except the\none message that matters.\n\nScore the document on three checks (0-2 each):\n\n1. **Thesis-first**: does the lead state the single takeaway?\n2. **Sentence weight**: does every sentence carry, instance,\n   bound, or repeat the thesis?\n3. **Repetition rule**: is the thesis echoed (good) while\n   ambient repetition is cut (good)?\n\nCombine sentence-level slop score with document-economy score.\nBoth must pass. See `modules/document-economy.md` for the full\nrubric, the reader-time budget table, and a worked example.\n\n## Step 7: Hallucination & Stub Sweep\n\nLoad: `@modules/hallucination-detection.md` and\n`@modules/stub-and-deferral.md`.\n\n**Hallucination is not slop: it is wrongness with\nconfident phrasing. Always P0.**\n\nScan for:\n\n1. **Phantom code references**: every backticked\n   identifier, function name, or file path in prose must\n   exist in the codebase.\n2. **Phantom dependencies**: every recommended `pip\n   install` / `cargo install` / `npm install` must\n   resolve on the relevant registry (slopsquatting\n   defense).\n3. **Dead URLs**: every cited URL should return 200.\n4. **Made-up config keys**: every config key in docs must\n   be read by the code.\n5. **Bare TODO/FIXME**: requires either a tracked-issue\n   link or deletion.\n6. **Hedging language** (\"for now\", \"should work\",\n   \"placeholder\", \"dummy\"): each one is deferred work.\n7. **Stub constructs** (`todo!()`, `unimplemented!()`,\n   `NotImplementedError`): defects in any path reachable\n   from a public API.\n\nSee modules for detection commands and severity matrix.\n\n## Step 8: Evidence-Backed Claims (READMEs and public docs)\n\nLoad: `@modules/evidence-backed-claims.md`\n\n**Every quality claim must point to evidence in the same\nrepository. No evidence, delete the claim.**\n\nFor each claim of \"production-ready\", \"fast\", \"memory-\nsafe\", \"scalable\", etc., verify the corresponding\nevidence (CI workflow, benchmark directory, audit\nmarkers, etc.) actually exists. The module contains the\nfull claim → required-evidence table and language-\nspecific detection commands.\n\nThis step is highest-leverage for crate/library/project\nREADMEs, where feature-list buzzword soup is the most\ncommon AI-generated failure mode.\n\n## Step 9: Apply Anti-Goals (safety check)\n\nLoad: `@modules/anti-goals.md`\n\n**Aggressive de-slopping has its own failure modes.**\n\nBefore applying any fix surfaced by the prior steps,\nverify it does not violate the anti-goals:\n\n1. Do not strip safety comments (`// SAFETY:`,\n   `// INVARIANT:`, etc.) on `unsafe`, locked, or\n   contract-bearing code.\n2. Do not collapse public error variants without an\n   explicit major-version-bump decision.\n3. Do not \"simplify\" typed errors to boxed/dynamic\n   errors.\n4. Do not inline a function that has a domain-specific\n   name even if it is short.\n5. Do not touch generated code, vendored code, or\n   historical changelog entries.\n6. Do not auto-apply `confidence: low` findings —\n   surface them for human decision.\n\nWhen in doubt: leave the match flagged, do not delete.\n\n## The full multi-pass cleanup workflow\n\nFor systematic project-wide cleanup, run the multi-pass\nworkflow in order. See `@modules/cleanup-workflow.md` for\nthe full ten-pass methodology and the rationale for the\nordering. Summary:\n\n| Pass | Focus |\n|---|---|\n| 0 | Pre-slop sweep: secrets, agent configs |\n| 1 | Surface lint floor (formatter and linter) |\n| 2 | Hallucination & stubs (modules: hallucination, stub-and-deferral) |\n| 3 | Identity & voice leaks |\n| 4 | Comment slop (translation, marketing, banner, deferral) |\n| 5 | Prose slop (vocabulary, structural, document-economy, and evidence-backed-claims) |\n| 6 | Code idiom (delegate to language-specific plugins) |\n| 7 | Architecture (judgment-heavy; see anti-goals) |\n| 8 | Tests (tautology, mocks, snapshots) |\n| 9 | README & public docs |\n| 10 | Establish guardrails (CI, lints, constitution) |\n\n**Cardinal rules**: one pass per commit; deletion beats\nrewriting; do not silently apply low-confidence fixes;\nstop when a pass finds nothing.\n\n## Empirical baseline (cite when justifying severity)\n\nLoad: `@modules/empirical-baseline.md` for the 2025-Q1\n2026 research baseline that justifies the severity\nweighting. Headline numbers:\n\n- AI PRs ship 1.7x more total issues, 1.75x more\n  logic/correctness issues, 2.74x more XSS, ~8x more\n  excessive I/O than human-only PRs (CodeRabbit, Dec 2025).\n- 92-96% of detected AI-code issues are maintainability\n  (\"code smell\"), not correctness (Sonar, Q4 2025).\n- Model-specific patterns: GPT fabricates; Claude omits.\n  Calibrate the audit accordingly.\n\nWhen a finding's severity is challenged in review, cite\nfrom this module rather than asserting from authority.\n\n## Step 10: Generate Report\n\nFor per-finding output that reviewers can accept or reject\nindependently, use the canonical structured format defined\nin `@modules/structured-finding-output.md`. Each finding\ncarries `file`, `line`, `category`, `severity`,\n`confidence`, `evidence`, `rationale`, `fix`, and (for\nhigh-confidence) `diff`. Auto-apply policy is set by\nconfidence; never auto-apply `confidence: low`.\n\nSummary report format (human-readable):\n\n```markdown\n## Slop Detection Report: [filename]\n\n**Overall Score**: X.X / 10 (Rating)\n**Word Count**: N words\n**Markers Found**: N total\n\n### CRITICAL (P0, must resolve before merge)\n- Line 8: \"As a large language model\". IDENTITY LEAK\n- Line 47: References `Client.connect_with_timeout(...)` —\n  HALLUCINATION (method does not exist; closest match is\n  `Client.connect`)\n- Line 102: \"production-ready\" claim with no CI workflow\n . UNVERIFIED CLAIM\n\n### High-Confidence Markers (vocabulary)\n- Line 23: \"delve into\" -> consider: \"explore\"\n- Line 45: \"rich tapestry\" -> consider: \"variety\"\n\n### Structural Issues\n- Em dash density: 8/1000 words (HIGH)\n- Bullet ratio: 72% (ELEVATED)\n- Sentence length SD: 3.2 words (LOW VARIANCE)\n\n### Phrase Patterns\n- Line 12: \"In today's fast-paced world\" (vapid opener)\n- Line 89: \"cannot be overstated\" (empty emphasis)\n- Line 134: \"Let's dive into\" (self-narration of structure)\n\n### Tier 5 / 2026 Patterns\n- Line 19: \"The skill lives in `plugins/scribe/`\" → \"is in\"\n  (spatial copula, inanimate subject)\n- Line 27: \"hooks + skills\" → \"hooks and skills\" (plus-sign\n  conjunction in prose)\n- Line 34: \"It's not a tool, it's a transformation\" →\n  rewrite positively (negative parallelism)\n- Line 56: \"Here's the thing,\" → delete (throat-clearing\n  opener)\n- Line 78: \"Focused. Aligned. Measurable.\" → \"Focused,\n  aligned, and measurable.\" (three-fragment burst)\n- Line 91: 3 smart quotes outside code blocks (Word-processor\n  paste signature)\n\n### Stub & Deferral\n- Line 56: bare `// TODO: handle expired tokens` (no\n  tracked issue link)\n- Line 71: \"for now, we recommend\" (deferral language)\n\n### Document Economy Score: X / 6\n- Thesis-first: 1/2 (thesis present but buried in para 3)\n- Sentence weight: 1/2 (~65% of sentences earn weight)\n- Repetition: 2/2 (thesis echoed; ambient repetition cut)\n\n### Recommendations\n1. **CRITICAL**: delete line 8 identity leak before merge\n2. **CRITICAL**: replace `Client.connect_with_timeout`\n   with `Client.connect(opts)` and update example\n3. **CRITICAL**: either add CI + version >= 1.0 to back\n   \"production-ready\", or delete the claim\n4. Replace [specific word] with [alternative]\n5. Convert bullet list at line 34-56 to prose\n6. Hoist the thesis (line 47) into the lead paragraph\n7. Link bare TODOs to tracked issues or delete code path\n\n### Confidence-low findings (require human decision)\n- Line 89: bullet count of 8 may be appropriate for this\n  enumeration; do not auto-flatten\n- Line 156: `Manager` suffix may be domain-meaningful;\n  verify before renaming\n```\n\nPer `anti-goals.md`: surface `confidence: low` findings\nin a separate section. Do not silently apply them.\n\n## Module Reference\n\n- See `modules/fiction-patterns.md` for narrative-specific slop markers\n- See `modules/remediation-strategies.md` for fix recommendations\n\n## Integration with Remediation\n\nAfter detection, invoke `Skill(scribe:doc-generator)` with\nthe `--remediate` flag to apply fixes, or manually edit using\nthe report as a guide.\n\n## Exit Criteria\n\n- All target files scanned\n- Density scores calculated\n- Report generated with specific, line-anchored fixes\n- High-severity items flagged for immediate attention\n\nFile v1.9.19:_meta.json\n\n{\n  \"ownerId\": \"kn7d107jg9jv602h9ytsegydq184a42s\",\n  \"slug\": \"nm-scribe-slop-detector\",\n  \"version\": \"1.9.19\",\n  \"publishedAt\": 1787750524989\n}\n\nFile v1.9.19:modules/anti-goals.md\n\n---\nmodule: anti-goals\ncategory: safety\ndependencies: [Read]\nestimated_tokens: 500\n---\n\n# Anti-Goals: What NOT to Clean Up\n\n**Aggressive de-slopping has its own failure modes.**\n\nThis module is the safety rail. Every other module in the\nslop-detector tells you what to flag and remove; this one\ntells you what to *leave alone* even when it pattern-\nmatches. The bar for deletion is higher than the bar for\nflagging.\n\nWhen in doubt: leave it alone, surface it as a finding,\nand let a human decide.\n\n## Class 1: Comments that earn their bytes\n\nThese look like slop on density alone but carry meaning\nthe code does not:\n\n### Why-comments (always keep)\n\nA comment that explains *why* a non-obvious decision was\nmade is the highest-value comment class. The code is the\n\"what\"; comments earn their place by carrying the \"why\".\n\n```rust\n// We sleep 200ms specifically because the upstream\n// rate-limiter buckets at 5/s; faster retries return\n// 429 and waste a slot:\nthread::sleep(Duration::from_millis(200));\n```\n\nThis pattern-matches as a \"magic constant with comment\"\nwhich §3.2 flags as marketing slop, but it is the\n*opposite* of slop: the comment names the constraint that\nmakes the constant correct.\n\n**Rule**: a comment that names a constraint, references an\nupstream contract, or explains a counter-intuitive choice\nis information the code cannot carry. Keep it.\n\n### Safety comments on `unsafe` blocks (always keep)\n\n```rust\n// SAFETY: the caller has already validated that `idx`\n// is within `slice.len()`; see the bounds check in\n// `Buffer::insert` two frames up:\nunsafe { *slice.as_ptr().add(idx) }\n```\n\nThese are *required* by `clippy::undocumented_unsafe_blocks`\nand are part of the contract the code makes with reviewers.\nStripping them removes the only proof the unsafe block is\ncorrect.\n\n### Structured-meaning comment prefixes (always keep)\n\nMany codebases adopt structured prefixes for specific\ncomment classes. Examples:\n\n```\n// SAFETY: ...\n// INVARIANT: ...\n// LOCK ORDER: ...\n// BLOCKING: ...\n// PERFORMANCE: ...\n// SECURITY: ...\n// THREAD: ...\n```\n\nThese are project-specific contracts. They are not slop\neven if they look formulaic: the formula *is* the\ncontract. Audit before stripping; do not strip on pattern\nmatch alone.\n\n### Regression-pinning tests (always keep)\n\nA test that looks trivial (`assert!(parse(\"\").is_err())`)\nmay be pinning a regression. Deleting it because it \"looks\nslop\" is exactly how the regression returns.\n\n**Rule**: tests with bug-tracker references in their name\nor comment (`test_regression_1234`, `// repro for #1234`)\nmust not be removed without an explicit decision that the\nregression class is no longer relevant.\n\n## Class 2: Code that should not be flattened\n\n### `thiserror`-style error variants (do not collapse)\n\n```rust\n#[derive(Error)]\npub enum Error {\n    #[error(\"connection refused\")]\n    ConnectionRefused,\n    #[error(\"timeout after {0}s\")]\n    Timeout(u64),\n    #[error(\"invalid response: {0}\")]\n    InvalidResponse(String),\n    // ... 9 more variants, several rare ...\n}\n```\n\nThe \"12 variants, of which 3 are ever constructed\ninternally\" pattern from §6 looks like inflation, but\n*public error enums are part of the API*. Removing\nvariants:\n- Breaks downstream pattern-match exhaustiveness checks.\n- Removes information that helps users handle specific\n  failures.\n- Cannot be reversed without a major-version bump.\n\n**Rule**: never collapse public error variants without an\nexplicit major-version-bump decision.\n\n### Small named helpers (do not inline)\n\n```rust\nfn is_ascii_alphabetic_or_underscore(c: char) -> bool {\n    c.is_ascii_alphabetic() || c == '_'\n}\n```\n\nThis is two lines and looks like inflation, but the *name*\nmakes the calling code readable:\n\n```rust\nif is_ascii_alphabetic_or_underscore(c) { ... }\n```\n\nvs. the inlined version:\n\n```rust\nif c.is_ascii_alphabetic() || c == '_' { ... }\n```\n\nThe inline reads as \"checking ascii alpha or underscore\";\nthe named version reads as \"checking the leading-char\nrule\". The function carries domain meaning.\n\n**Rule**: a one-line helper with a domain-specific name is\nnot slop. Inline only when the name adds no clarity over\nthe inline expression.\n\n### `Result<T, MyError>` (do not \"simplify\" to `Box<dyn Error>`)\n\nThe \"simplify the error type\" instinct is *backward*\ndirection. Typed errors at API boundaries are correct;\nboxed dynamic errors are tutorial code.\n\n**Rule**: never replace a typed error with `Box<dyn Error>`\nor `anyhow::Error` in a public library API as part of a\nslop sweep. That is an API-design decision, not a cleanup.\n\n## Class 3: Files that must not be touched\n\n### Generated code\n\n```\nbuild.rs output\nprost/tonic generated modules\nbindgen output\nserde_derive/serde_json schemas\nGraphQL codegen\nOpenAPI/Swagger codegen\nprotoc output\n```\n\nGenerated code follows the conventions of its generator.\nIt often looks bloated by human-written-code standards\nbecause the generator is conservative. Editing it is\npointless: the next regeneration overwrites the changes.\n\n**Rule**: detect generated code by header comment (\"DO NOT\nEDIT\", \"AUTOMATICALLY GENERATED\", or generator-specific\nmarkers) or by directory convention (`target/`,\n`generated/`, `gen/`, `__generated__/`). Exclude from\nall slop scans.\n\n### Vendored / third-party code\n\nCode copied from another project (with attribution)\nfollows the upstream's conventions. Reformatting it to\nmatch local style breaks the ability to diff against\nupstream for security updates.\n\n**Rule**: directories named `vendor/`, `third_party/`,\n`thirdparty/`, or `external/` are excluded from style\nsweeps.\n\n### Historical changelog entries\n\n```\n## [1.2.0] - 2024-03-15\n\n- Added `parse_json` function with `comprehensive` error\n  reporting.   <-- \"comprehensive\" is slop in new prose,\n                   but this is a historical artifact.\n```\n\nPast releases are immutable. Editing changelog entries\nrewrites history readers may have relied on (vendor\nSBOMs, audit trails, blog-post backreferences).\n\n**Rule**: anything before the `## [Unreleased]` header\nin a CHANGELOG file is read-only.\n\n### Migration scripts and historical fixtures\n\nA test fixture that contains slop *because the original\ninput was sloppy* is correct as-is. The test exists to\nprove the parser handles real-world slop, and \"fixing\"\nthe fixture removes the very thing under test.\n\n**Rule**: directories named `fixtures/`, `golden/`,\n`testdata/`, `examples/` (when used as test inputs) are\nexcluded from prose sweeps.\n\n## Class 4: Patterns that look generated but are not\n\n### Section headings that follow a template\n\n```\n## Installation\n## Usage\n## Configuration\n## API Reference\n## Contributing\n## License\n```\n\nThese look formulaic because every README has them. They\nare not slop: they are the convention. Removing them\nbecause they are predictable would make the README harder\nto navigate, not easier.\n\n**Rule**: structural conventions (canonical README\nsections, standard rustdoc sections like `# Examples` /\n`# Errors` / `# Panics`, conventional commit prefixes) are\nnot slop. Flag only when content *inside* the section\nviolates a rule.\n\n### Em-dash density in narrative writing\n\n§2.3 flags em-dash density >3 per 500 words as a signal.\nThis is a *heuristic*, not a rule. A novelist or essayist\nwho uses em dashes deliberately for rhythm is not\ngenerating AI text.\n\n**Rule**: em-dash density flags require human review\nbefore edits. In narrative or literary genres, leave the\nem dashes alone unless other signals also fire.\n\n## Class 5: When a finding is \"low confidence\"\n\nThe slop-detector should never auto-apply low-confidence\nfixes. From the structured-finding format in §10:\n\n> The agent should **not** silently apply low-confidence\n> fixes; surface them as findings with `confidence: low`\n> and let a human decide.\n\nCategories that default to `confidence: low`:\n\n- Premature abstraction (§4.9): impossible to prove an\n  abstraction is wrong without knowing future use.\n- Generic name slop (§4.10): \"Manager\" is wrong in some\n  domains and exactly right in others.\n- Bullet-list-bloat: the right number of bullets depends\n  on whether the content is actually enumerable.\n- Em-dash density in narrative.\n- Anything in `examples/` or under a `// AI-generated:\n  do not delete` marker.\n\n## Override mechanism\n\nFor unavoidable false positives, projects should support\ninline ignore markers:\n\n```html\n<!-- slop-detector:ignore-next-line vocabulary -->\nThe comprehensive integration tests cover ...\n\n<!-- slop-detector:ignore-block start -->\n[block of intentionally-formulaic content]\n<!-- slop-detector:ignore-block end -->\n```\n\n```rust\n// slop-detector:allow(needless_clone)\nlet owned = borrowed.clone();\n```\n\nThese are escape hatches, not silencers. Each ignore\nmarker should explain *why* in a trailing comment:\n\n```html\n<!-- slop-detector:ignore-next-line vocabulary\n     reason: \"comprehensive\" is the documented test-suite\n     name; renaming it breaks external references -->\n```\n\nWithout the rationale, the ignore is itself a defect.\n\nFile v1.9.19:modules/ci-integration.md\n\n---\nmodule: ci-integration\ncategory: automation\ndependencies: [Bash]\nestimated_tokens: 500\n---\n\n# CI Integration\n\nUse the `--ci` flag to produce machine-readable output and exit with a non-zero code when\nslop density exceeds a threshold. Intended for use in GitHub Actions and pre-commit hooks.\n\n## Flags\n\n| Flag | Default | Description |\n|------|---------|-------------|\n| `--ci` | off | Emit JSON output instead of the markdown report |\n| `--threshold <float>` | `3.0` | Score above which the run fails (exit code 1) |\n\n## JSON Output Schema\n\nWhen `--ci` is set, write a single JSON object to stdout:\n\n```json\n{\n  \"files\": [\n    {\n      \"path\": \"docs/guide.md\",\n      \"score\": 2.4,\n      \"rating\": \"Light\",\n      \"markers\": 7\n    }\n  ],\n  \"summary\": {\n    \"total_files\": 1,\n    \"avg_score\": 2.4,\n    \"max_score\": 2.4,\n    \"pass\": true\n  }\n}\n```\n\n### Field Definitions\n\n| Field | Type | Description |\n|-------|------|-------------|\n| `files[].path` | str | Path to the scanned file (relative to repo root) |\n| `files[].score` | float | Slop density score (0–10+) |\n| `files[].rating` | str | One of: Clean, Light, Moderate, Heavy |\n| `files[].markers` | int | Total marker count in the file |\n| `summary.total_files` | int | Number of files scanned |\n| `summary.avg_score` | float | Mean score across all files |\n| `summary.max_score` | float | Highest score across all files |\n| `summary.pass` | bool | True when max_score <= threshold |\n\n## Exit Codes\n\n| Code | Meaning |\n|------|---------|\n| 0 | All files pass (max_score <= threshold) |\n| 1 | One or more files exceed the threshold |\n| 2 | Execution error (file not found, parse failure, etc.) |\n\n## Instructions for Claude\n\nWhen `--ci` appears in the invocation:\n\n1. Run the full detection workflow as normal.\n2. Collect per-file results: path, score, rating, marker count.\n3. Compute summary fields: total_files, avg_score (round to 2 decimal places), max_score.\n4. Set `pass` to `true` when `max_score <= threshold`, `false` otherwise.\n5. Write the JSON object to stdout. Do not write the markdown report.\n6. Report exit code 1 if `pass` is false, 0 if true, 2 on any error.\n\nDo not mix prose with the JSON output. The JSON must be the only content on stdout so\nit can be parsed by downstream tools.\n\n## GitHub Actions Example\n\n```yaml\n- name: Slop check\n  run: |\n    result=$(claude -p \"Skill(scribe:slop-detector) --ci --threshold 3.0 docs/\")\n    echo \"$result\" | jq .\n    pass=$(echo \"$result\" | jq -r '.summary.pass')\n    if [ \"$pass\" != \"true\" ]; then\n      echo \"Slop threshold exceeded\" >&2\n      exit 1\n    fi\n```\n\n## Pre-commit Hook Example\n\n```yaml\n# .pre-commit-config.yaml\n- repo: local\n  hooks:\n    - id: slop-check\n      name: Slop density check\n      language: system\n      entry: bash -c 'claude -p \"Skill(scribe:slop-detector) --ci --threshold 3.0\" \"$@\"'\n      types: [markdown]\n      pass_filenames: true\n```\n\nFile v1.9.19:modules/cleanup-workflow.md\n\n---\nmodule: cleanup-workflow\ncategory: methodology\ndependencies: [Read, Grep, Bash]\nestimated_tokens: 700\n---\n\n# Cleanup Workflow\n\n**Run passes in order. Each pass is independent. Commit\nbetween passes. Prefer deletion over rewriting.**\n\nThis module gives the multi-pass cleanup methodology. The\norder matters: each pass assumes the prior passes have\nlanded. Mixing concerns within a pass produces diffs that\nno reviewer can audit.\n\n## The cardinal rules\n\n1. **One pass per commit.** A commit titled \"cleanup\"\n   that touches comments, prose, error handling, and\n   tests is not reviewable. Split.\n2. **Deletion beats rewriting.** When in doubt, remove\n   the material. AI slop is additive; the cheapest\n   correct fix is almost always to take material away.\n3. **Cleanup decisions on a compromised baseline are\n   themselves compromised.** Run Pass 0 first.\n4. **Do not silently apply low-confidence fixes.** Surface\n   them as findings, let a human decide (see\n   `anti-goals.md`).\n5. **Stop when a pass finds nothing.** Do not invent work\n   to fill the pass.\n\n## Pass 0: Pre-slop sweep (always first)\n\nBefore any cleanup, audit for things that should not be\nin the repo at all:\n\n- Committed agent-config files (`CLAUDE.md`, `.cursorrules`,\n  `AGENTS.md`, `.codex/config.toml`, `.aider.conf.yml`,\n  etc.) with secrets or broad capability grants.\n- Committed credentials (run `gitleaks` / `trufflehog`).\n- Untrusted MCP server entries.\n- Hooks that auto-execute on session start.\n\nCommit any redactions or revocations *before* any other\ncleanup, since later passes assume an uncompromised\nbaseline.\n\n```bash\n# Pre-slop sweep checklist\ngitleaks detect --no-banner\nls -la | grep -E '^.*(CLAUDE|cursor|codex|aider|kiro)'\nfind . -name '.mcp' -o -name 'mcp.json' -type f\n```\n\n## Pass 1: Surface lint sweep\n\nRun the cheap automated detectors. Fix or delete what\nthey flag. This is the floor, not the ceiling.\n\n```bash\n# Linter floor\n[language-specific formatter] --check\n[language-specific linter] --strict\n\n# Dependency hygiene\n[unused-dep detector]\n[vulnerability scanner]\n```\n\nCommit. If your linter supports an \"no escape hatches\"\nrule (e.g. `allow_attributes = \"deny\"` in Rust clippy),\nenable it. it prevents the most common AI-agent dodge:\nsilencing a lint with `#[allow(...)]` instead of fixing\nthe underlying code.\n\n## Pass 2: Hallucination sweep\n\nRun `Skill(scribe:slop-detector)` module\n`hallucination-detection.md`:\n\n- Every quoted identifier in prose: does it exist?\n- Every backticked file path: does it exist?\n- Every cited URL: does it 200?\n- Every recommended package install: does it resolve on\n  the relevant registry?\n- Every config key in docs: does the code read it?\n\nThen run module `stub-and-deferral.md`:\n\n- Every TODO/FIXME/XXX/HACK: is there a tracked issue\n  link, or is the surrounding code path defunct?\n- Every `// for now`, `// placeholder`, `// dummy`: same\n  question.\n- Every `todo!()` / `unimplemented!()` /\n  `NotImplementedError`: is this reachable from a public\n  API?\n\nResolve, link, or delete. Commit per category.\n\n## Pass 3: Identity & voice leaks\n\nRun module `identity-and-voice-leaks.md`:\n\n- **P0. identity leaks**: any \"as a large language model\",\n  \"as of my training cutoff\", etc.; delete on sight.\n- **Conversational voice leaks**: \"Hope this helps!\",\n  \"Great question!\", \"Sure!\" outside transcript blocks;\n  delete the phrase, keep substance.\n- **Self-narration of structure**: \"In this section, we\n  will cover...\"; strip framing, start at content.\n\nThis pass is small but high-priority. Identity leaks in\nparticular fail review independent of any other score.\n\n## Pass 4: Comment slop\n\nWalk every code comment and doc comment. For each, ask:\n*does this convey information not present in the code,\nnames, or signatures?* If no, delete.\n\nFor doc comments specifically (docstrings, `///`, `//!`,\nJSDoc, etc.), enforce the docstring/implementation ratio:\n\n| Ratio (doc lines / impl lines) | Action |\n|---|---|\n| >= 2.0 | CRITICAL: almost certainly slop; trim or rewrite |\n| >= 1.0 | warning; investigate |\n| ~ 0.5 | acceptable for public API |\n| < 0.5 | balanced or code-heavy; usually fine |\n\nTrivial helpers should often have *no* doc comment at all\n— the function name and signature is the spec. See\n`anti-goals.md` Class 1 for what to keep.\n\nCommit.\n\n## Pass 5: Prose slop in markdown & docstrings\n\nWalk every `*.md` and every multi-line doc-comment block.\nApply:\n\n- `vocabulary-patterns.md`. tier-1 banned words and\n  phrases.\n- `structural-patterns.md`. em dashes, bullet ratio,\n  paragraph blockiness.\n- `document-economy.md`. thesis-first, sentence weight,\n  repetition rule, reader-time budget.\n- `evidence-backed-claims.md`. every quality claim\n  points to repo evidence.\n\nStrike banned vocabulary, verify quality claims, remove\nemoji from headers, flatten over-deep heading trees.\nCommit per category.\n\n## Pass 6: Code idiom sweep\n\nApply the language-specific anti-pattern modules. For\nRust, see `pensive:rust-review` (this scribe skill\ndelegates code idiom checks to that plugin). For Python,\nsee `parseltongue:python-pro`. For shell, see\n`pensive:shell-review`.\n\nCalibrate by model: per the 2025-26 cross-evaluation\nresearch, GPT-family-generated code has more concurrency\nmistakes; Claude-family-generated code has more\nomissions. Weight your audit accordingly.\n\nCommit per category, not per file.\n\n## Pass 7: Architecture slop\n\nThis is the highest-judgment pass and the most prone to\nover-correction. See `anti-goals.md` Class 2 for what\n*not* to flatten.\n\nLook for:\n- Traits with one implementor, not used as `dyn`, not\n  used for mocking, not exported.\n- \"Manager\" / \"Handler\" / \"Service\" structs that own one\n  method.\n- Builder patterns for structs with two fields.\n- Layered structures where each layer just delegates one\n  method to the next.\n- An error enum with 12 variants, three of which are ever\n  constructed (but see anti-goals: do not collapse public\n  variants).\n\nPrefer to leave a borderline abstraction in place rather\nthan delete one that turns out to be load-bearing. Commit.\n\n## Pass 8: Test slop\n\nApply `tests/` audit:\n\n- Tautological tests (`assert!(s.is_some())` after\n  `Foo::new() -> Foo`).\n- Tests that re-implement the function under test in the\n  assertion.\n- Mock-everything tests that prove only that orchestration\n  calls the orchestrator.\n- Snapshot tests on data with no semantic meaning.\n- `#[ignore]` tests with no comment.\n- One giant `test_everything()` asserting 30 unrelated\n  things.\n\nWhere pure functions are under-covered, prefer property-\nbased tests (`hypothesis`/`proptest`/`quickcheck`) and\ngolden-file tests for serializers. Both resist the \"test\nmirrors implementation\" failure mode.\n\nRun mutation testing if available: it is the cheapest\nway to expose tests that pattern-match correctly but\ncatch nothing.\n\nCommit.\n\n## Pass 9: README and public docs\n\nApply `evidence-backed-claims.md` strictly. The README\nshould open with:\n\n1. One sentence: what it is.\n2. Minimal working example (5-15 lines, runnable).\n3. Install instruction.\n\nThen features, configuration, contributing, etc. Move\ndeep API documentation to docs.rs / readthedocs / wiki.\nStrip emoji from headers. Verify badges resolve and are\ngreen.\n\nCommit.\n\n## Pass 10: Establish guardrails\n\nThe cleanup is incomplete without preventing the slop\nfrom coming back. Add:\n\n- A `CONSTITUTION.md` (or equivalent project rules file)\n  with immutable rules the AI and contributors must\n  respect (see `evidence-backed-claims.md` for the\n  pattern).\n- Strict linter configuration in the build config\n  (e.g. `[lints.clippy]` block in `Cargo.toml`).\n- A CI step running the slop-detector on changed prose\n  files.\n- Pre-commit hooks running the cheap detectors locally.\n\nCommit. This is what prevents the slop you just removed\nfrom coming back next sprint.\n\n## Order rationale\n\nWhy this order specifically:\n\n1. Pass 0 (pre-slop sweep) before everything because\n   cleanup decisions on compromised baselines are\n   themselves compromised.\n2. Pass 1 (surface lint) before anything semantic because\n   the linter is the cheapest signal and clears the\n   trivial finds.\n3. Pass 2 (hallucination & stubs) before prose work\n   because polishing text that is wrong about the world\n   is wasted polish.\n4. Pass 3 (identity leaks) early because it is small,\n   high-severity, and pattern-matchable.\n5. Passes 4-5 (comments and prose) before code idiom\n   because comment removal often makes code idiom issues\n   visible.\n6. Pass 6 (code idiom) before architecture because\n   localized fixes inform whether structural patterns\n   are real.\n7. Pass 7 (architecture) before tests because architecture\n   churn changes which tests matter.\n8. Pass 8 (tests) before README because final test\n   coverage informs what claims the README can make.\n9. Pass 9 (README) last among content passes because it\n   is downstream of everything else.\n10. Pass 10 (guardrails) closes the loop.\n\n## Stopping rule\n\nStop when a pass finds nothing. Do not invent work to\nfill the pass. The slop sweep is a *removal* operation;\n\"nothing to remove\" is success, not failure.\n\nIf consecutive passes find nothing, the cleanup is done.\nCommit, push, and let it land.\n\nFile v1.9.19:modules/config-file.md\n\n---\nmodule: config-file\ncategory: configuration\ndependencies: [Read]\nestimated_tokens: 600\n---\n\n# Config File Support\n\nLoad a `.slop-config.yaml` file to adjust detection behavior for the current project.\n\n## Discovery\n\nWalk up the directory tree from the target file toward the repo root. Stop at the first `.slop-config.yaml` found. If none exists, use built-in defaults.\n\n```\ntarget file: /project/docs/guide.md\ncheck:       /project/docs/.slop-config.yaml\ncheck:       /project/.slop-config.yaml      <- found, use this\ncheck:       /.slop-config.yaml              (would stop here at repo root)\n```\n\nTo find the repo root, check for a `.git` directory while walking up.\n\n## YAML Schema\n\n```yaml\n# .slop-config.yaml\n\n# Extra words treated as tier-1 markers (score: 3 each)\ncustom_words:\n  tier1:\n    - synergize\n    - ideate\n  tier2:\n    - impactful\n    - learnings\n\n# Words to skip during detection (exact match, case-insensitive)\nallowlist:\n  - robust      # used correctly in our engineering specs\n  - leverage    # used correctly in our physics docs\n\n# Score thresholds (warn < error required)\nthresholds:\n  warn: 2.0     # flag for review\n  error: 5.0    # fail CI check\n\n# Glob patterns for files to skip entirely\nexclude_patterns:\n  - \"vendor/**\"\n  - \"**/*.generated.md\"\n  - \"CHANGELOG.md\"\n\n# Inherit from a base config, then apply overrides above\nextends: \"../../.slop-config.yaml\"\n```\n\n### Field Reference\n\n| Field | Type | Default | Description |\n|-------|------|---------|-------------|\n| `custom_words.tier1` | list[str] | `[]` | Additional tier-1 words (score 3 each) |\n| `custom_words.tier2` | list[str] | `[]` | Additional tier-2 words (score 2 each) |\n| `allowlist` | list[str] | `[]` | Words to ignore during detection |\n| `thresholds.warn` | float | `2.0` | Score at which to warn |\n| `thresholds.error` | float | `5.0` | Score at which to fail |\n| `exclude_patterns` | list[str] | `[]` | Glob patterns for files to skip |\n| `extends` | str | none | Path to a base config to inherit from |\n\n## Loading Procedure\n\n1. Walk directories from target file up to repo root, collecting any `.slop-config.yaml` files found.\n2. If `extends` is set in a config, load that base config first.\n3. Merge: base config values are the defaults; the child config overrides them.\n4. For list fields (`custom_words.tier1`, `allowlist`, etc.), merge lists rather than replace.\n5. Validate that `thresholds.warn < thresholds.error`. If not, warn and use built-in defaults.\n\n## Merging Custom Words with Built-in Patterns\n\nAfter loading the config:\n\n- Append `custom_words.tier1` to the built-in TIER1 word list before scanning.\n- Append `custom_words.tier2` to the built-in TIER2 word list before scanning.\n- After each match, check if the matched word appears in the `allowlist`. If so, discard the match.\n\nThe allowlist check is case-insensitive and applied per-match, not per-word-list.\n\n## Exclude Pattern Matching\n\nBefore scanning a file, check its path against each pattern in `exclude_patterns` using `fnmatch`. If any pattern matches, skip the file and report it as excluded.\n\n```python\nimport fnmatch\n\ndef is_excluded(file_path: str, patterns: list) -> bool:\n    for pattern in patterns:\n        if fnmatch.fnmatch(file_path, pattern):\n            return True\n    return False\n```\n\n## Reporting\n\nWhen a config file is active, include it in the report header:\n\n```\nConfig: /project/.slop-config.yaml\nAllowlist: robust, leverage (2 words)\nCustom tier-1: synergize, ideate (2 words)\nThresholds: warn=2.0, error=5.0\n```\n\nFile v1.9.19:modules/document-economy.md\n\n---\nmodule: document-economy\ncategory: detection\ndependencies: [Read, Grep]\nestimated_tokens: 600\n---\n\n# Document Economy\n\n**A document costs the sum of its readers' time. Earn that\ncost or cut.**\n\nThis module adds **document-level** checks to the slop\ndetector. The other modules score sentences and words; this\none scores whether the document earns its existence at all.\n\n## When to apply\n\nRun this check on any document that will be read more than\nonce or by more than one person. Skip it for ephemeral\n1:1 messages where a brain dump is fine.\n\nThe principle is invariant: writing time should scale with\ntotal reader time. A 1:1 note absorbs no one else's hours,\nso optimize for your throughput. A skill file loaded 50×\nper day absorbs hours of reader-time per week, so optimize\nfor theirs.\n\n## The three checks\n\n### Check 1: Thesis-first\n\nThe first paragraph (or, for SKILL files, the activation\ncue plus the first paragraph after the H1) must state the\nsingle message you want the reader to walk away with.\n\nA thesis is not a topic.\n\n| Topic (weak) | Thesis (strong) |\n|---|---|\n| \"This skill detects slop.\" | \"Slop is a density problem, not a word problem.\" |\n| \"How to write tutorials.\" | \"A tutorial moves a reader from cannot to can. Everything else is decoration.\" |\n| \"Code review checklist.\" | \"Review for the bug you would ship, not the style you would prefer.\" |\n\n**Failure modes:**\n\n- \"This document covers X, Y, and Z.\" That is a table of\n  contents. It tells the reader what is in the document,\n  not what to take from it.\n- Burying the takeaway after 200 lines of context.\n- Three competing theses fighting for the lead. Pick one.\n\n**Fix:** rewrite the lead until you can highlight one\nsentence and say \"if the reader only reads this, the\ndocument succeeded.\"\n\n### Check 2: Sentence weight\n\nEvery sentence must do one of:\n\n1. State the thesis.\n2. Instance the thesis (a concrete example of it).\n3. Bound the thesis (when it does not apply).\n4. Repeat the thesis (allowed, see Check 3).\n\nSentences that do none of those four are bloat. Cut them.\n\n**Common bloat patterns:**\n\n- \"It's also worth noting that...\" — if it is worth\n  noting, note it. Drop the throat-clear.\n- \"As mentioned above...\" — if you must remind the\n  reader, your structure is wrong.\n- Restating the heading in the body. The heading\n  already said it.\n- Transitional connective tissue (\"Now that we have\n  covered X, let us turn to Y\"). Just turn to Y.\n- \"In summary\" sections that re-list bullets the reader\n  just read.\n\n### Check 3: The repetition rule\n\n**Repeat the thesis. Cut everything else that repeats.**\n\nThe thesis is the message you want internalized. People\nskim. They remember what they see three times. Echo the\nthesis in the intro, in the middle, and at the close.\nVary the surface; hold the meaning.\n\nEverything else that repeats is bloat:\n\n- Restated headers.\n- Multiple examples making the same sub-point. One is\n  proof. Two is emphasis. Three is filler.\n- \"TL;DR\" boxes that duplicate the conclusion.\n- Section summaries that just re-list the section.\n\n## The reader-time budget\n\nEstimate before you write. Then check after.\n\n| Audience | Reads | Time per read | Total budget |\n|---|---|---|---|\n| 1 person, 1:1 | 1 | 2 min | 2 min |\n| 5-person team | 1 | 5 min | 25 min |\n| 50-person org doc | 1 | 5 min | ~4 hours |\n| 50-person skill, loaded daily | ~250/yr | 30 sec | ~10 hours/year |\n| Public skill, 1000 users | varies | 30 sec | days/year |\n\nThe author's writing time should match the budget. If the\nbudget is 10 hours and you spent 30 minutes, you owe more\npolish, more cuts, or both. If the budget is 5 minutes and\nyou spent a week, you over-built; ship and move on.\n\nThis is asymmetric on purpose. Cheap to write, expensive\nto read is the failure mode worth catching.\n\n## Scoring rubric\n\nFor each check, score 0-2:\n\n| Score | Thesis-first | Sentence weight | Repetition |\n|---|---|---|---|\n| 0 | No identifiable thesis | <50% sentences earn weight | No thesis repetition; ambient repetition |\n| 1 | Thesis present but buried or diluted | 50-80% earn weight | Some thesis repetition; some ambient |\n| 2 | Thesis stated in lead, single and clear | >80% earn weight | Thesis repeated 3+ times; ambient cut |\n\n**Document economy score: sum / 6.**\n\n| Score | Action |\n|---|---|\n| 5-6 | Ship |\n| 3-4 | Revise: identify the cuts |\n| 0-2 | Restart from the thesis |\n\nA document can have a clean sentence-level slop score\n(0-1.0) and still score 0/6 here. Sentence cleanliness\nis necessary, not sufficient.\n\n## Worked example\n\n**Before** (score: 1/6):\n\n> # Logging Configuration Guide\n>\n> This document covers the various aspects of configuring\n> logging in our system. Logging is an important part of\n> any production application. There are many ways to\n> configure logging and this guide will walk you through\n> them. We will look at log levels, log destinations, log\n> formatting, and log rotation. By the end of this guide\n> you will understand how to configure logging.\n>\n> ## Log Levels\n>\n> Log levels are used to indicate the severity of a log\n> message. There are several log levels you can use. The\n> log levels are DEBUG, INFO, WARN, ERROR, and FATAL.\n> [...]\n\nProblems:\n- No thesis, only a topic (\"covers various aspects\").\n- \"Logging is important\" carries no information.\n- The \"we will look at\" sentence is a TOC.\n- \"By the end of this guide\" is filler.\n- The Log Levels section restates the heading.\n\n**After** (score: 5/6):\n\n> # Logging Configuration\n>\n> **Log what you would page someone for. Drop the rest.**\n>\n> Most logging configuration time is spent suppressing\n> noise from libraries you do not own. The defaults below\n> bias toward silence; raise the volume only for the code\n> you would actually wake up to debug.\n>\n> ## Log levels\n>\n> Use INFO for events you would mention in a postmortem.\n> Use WARN for events that should not happen but did not\n> break anything. Use ERROR for events that broke something\n> a user could see. DEBUG and FATAL are mostly traps:\n> DEBUG ships verbose noise to production, FATAL implies\n> the process should die but rarely does.\n> [...]\n\nThe thesis (\"log what you would page someone for\") shows\nup in the lead, frames the level explanations, and would\nrecur in destinations and rotation sections.\n\n## Integration\n\nThe full slop-detector pipeline now runs:\n\n1. Sentence-level scoring (vocabulary, structure, sycophancy)\n2. **Document-economy scoring (this module)**\n3. Combined report\n\nA document passes only when both layers pass. Sentence\nslop is necessary; document economy is sufficient.\n\nFile v1.9.19:modules/empirical-baseline.md\n\n---\nmodule: empirical-baseline\ncategory: reference\ndependencies: [Read]\nestimated_tokens: 600\n---\n\n# Empirical Baseline (2025-Q1 2026)\n\n**Treat AI-generated artifacts as unreviewed contractor\nwork, not as junior-developer work.** The cross-study\nrecord is unambiguous about which defect classes occur at\nwhich rates; calibrate the cleanup priorities accordingly.\n\nThis module is reference material. Cite from it when a\nfinding's severity needs justification. Re-validate the\nnumbers every six months: the empirical landscape moves\nfast.\n\n## Headline ratios (CodeRabbit, December 2025)\n\nAnalysis of 470 GitHub PRs (320 AI-co-authored, 150\nhuman-only), normalized to issues per 100 PRs with\nPoisson rate ratios.\n\n| Defect class | AI vs. human multiplier |\n|---|---|\n| Total issues | ~1.7x |\n| Critical issues | ~1.4x |\n| Logic / correctness | 1.75x |\n| Algorithm and business logic errors | >2x |\n| Error handling gaps | ~2x |\n| Code readability | >3x |\n| Naming inconsistency | ~2x |\n| Improper password handling | ~2x |\n| Insecure object references | ~2x |\n| Cross-site scripting (XSS) | 2.74x |\n| Insecure deserialization | ~1.8x |\n| Excessive I/O operations | ~8x |\n\n**Cleanup priority implication:** weight logic/correctness,\nerror-handling gaps, readability/naming, and excessive I/O\nchecks more heavily than the average linter would. These\nare the categories where AI-amplified rates are highest.\n\n## Quality and maintainability data\n\nFrom GitClear's analysis of 211M changed lines, 2020-2024:\n\n- **Code duplication**: 5+-line duplicated blocks grew\n  ~8x. In 2024, copy-pasted lines exceeded refactored\n  (moved) lines for the first time on record.\n- **Code churn**: code reverted or rewritten within two\n  weeks rose from a 3.1-3.3% baseline (2021) to 5.7-7.9%\n  (2024-2025).\n- **Refactoring rate**: cleanup-of-existing-code as a\n  share of changed lines collapsed from ~25% (2021) to\n  <10% (2024). AI accelerates \"add new\" while suppressing\n  \"improve existing.\"\n\nFrom METR's July 2025 randomized controlled trial on 16\nexperienced OSS contributors:\n\n- Developers expected a 24% speedup.\n- Developers reported feeling 20% faster.\n- Developers were measurably **19% slower**.\n\n**Cleanup-phase implication**: when an AI agent (or a\nhuman and AI) reports that a module has been cleaned up, do\nnot trust the felt-productivity report. Verify with\nexternal metrics: lint counts, defect counts, test pass\nrates, mutation kill rates.\n\n## Maintainability dominates correctness\n\nFrom Sonar's December 2025 leaderboard analysis across\nGPT-5.2 High, GPT-5.1 High, Gemini 3 Pro, Opus 4.5\nThinking, and Claude Sonnet 4.5:\n\n- 92-96% of detected issues across all models are \"code\n  smells\" (maintainability), not correctness.\n\n**Implication**: the cleanup payoff is heaviest in\nreadability, structure, and dead-code removal: not in\ncorrectness fixes. Optimize the slop-detector for those\ncategories.\n\n## Model-specific failure patterns\n\nFrom Sonar's evaluation work, also Q4 2025:\n\n| Model | Distinctive failure mode |\n|---|---|\n| GPT-5.2 High | ~470 concurrency issues per MLOC (2x next-closest, 6x Gemini 3 Pro). Expect Send/Sync mistakes, MutexGuard-across-await, broken channel patterns. |\n| Claude Sonnet 4.5 | ~195 resource-management leaks per MLOC (~4x GPT-5.1). 198 blocker-severity vulns per MLOC (vs 44 for Opus 4.5 Thinking). Expect file/socket lifetime mistakes, missed Drop ordering, path-traversal-class flaws. |\n| Gemini 3 Pro | ~200 control-flow mistakes per MLOC, ~4x Opus 4.5 Thinking. Expect incorrect match arms, off-by-one loops, missed early returns. |\n| Opus 4.5 Thinking | Best on security (44 blocker vulns/MLOC) but tends toward verbose, abstraction-heavy code. |\n\n**General correlation Sonar identified**: as models reason\nharder (\"Thinking\" / \"High\"), outputs grow more verbose\nand more cyclomatically complex. The cleanup burden\nscales with reasoning depth, not just code volume.\n\n## Hallucination patterns by model family\n\nFrom cross-evaluation work (Anthropic and DEV.to community\nbenchmarks, Q1 2026):\n\n| Family | Tendency |\n|---|---|\n| GPT-5.x | **Fabricates**: invents function names, library methods, config keys, API endpoints that look plausible but do not exist. Verify every `use`/`import`, every dep, every method, every config flag. |\n| Claude 4.x | **Omits**: silently skips edge cases, drops a match arm, leaves None-paths unhandled. Errors of omission are easier to find in review than confident fabrications, but more likely to slip through tests that mirror the implementation. |\n| Both | Produce plausible doc comments that paraphrase the function name without adding information. |\n\n**Implication for the slop-detector audit**:\n\n- For Claude-generated code: weight toward incomplete\n  match arms, missing error paths, skipped edge cases.\n- For GPT-generated code: weight toward fabricated\n  identifiers, made-up clippy/lint names, hallucinated\n  crate/package names, and concurrency mistakes.\n\nIf you cannot tell which model generated a region, run\nthe full audit. It is never wrong, just sometimes\nredundant.\n\n## Security baseline\n\nFrom Veracode's 2025 GenAI Code Security Report,\nre-tested March 2026:\n\n- **45%** of AI-generated code samples on\n  security-sensitive tasks fail OWASP Top 10 tests.\n- **86%** failed XSS-defense tasks.\n- **88%** failed log-injection defense.\n- The pass rate has not improved across multiple testing\n  cycles.\n\nFrom Apiiro's Fortune-50 enterprise study (Dec 2024 -\nJun 2025):\n\n- AI-assisted developers commit code at **3-4x** their\n  non-AI peer rate.\n- Their monthly *security findings* rose **~10x**.\n- A **153% increase** in design-level security flaws\n  specifically (auth bypasses, IDOR, missing\n  trust-boundary validation, broken session management)\n flaws line-level patches cannot fix.\n\nFrom Trend Micro's TrendAI report (March 2026):\n\n- AI-related CVEs reached **4.42% of all CVEs in 2025**\n  (up 34.6% YoY).\n- 2,130 AI CVEs disclosed in 2025 alone.\n- 26.2% of scored AI CVEs are high-severity.\n- Includes the **slopsquatting** attack class: adversaries\n  registering hallucinated package names that AI tools\n  recommend.\n\n**Implication**: the slop-detector should treat unverified\npackage recommendations as critical findings (see\n`hallucination-detection.md` Class 2).\n\n## What this baseline does *not* mean\n\nThese are important so the data does not produce its own\nbad cleanup decisions:\n\n1. **It does not mean AI code is always worse than human\n   code.** GitClear's January 2026 follow-up using direct\n   API integration found a substantial productivity\n   multiplier for \"Power Users\" of AI tools. The\n   defect/duplication problem is real *and* the\n   productivity gain is real; both can be true.\n2. **It does not mean ban AI tooling.** It means: spend\n   the saved time on review, not on accepting more PRs.\n3. **It does not validate prose-level \"AI tells\" as proof\n   of authorship.** Em-dash density, vocabulary\n   clustering, and similar surface signals are *triage\n   hints*, not evidence. Do not gate human work on them.\n   Do not accuse contributors based on them.\n4. **It does not justify aggressive over-cleanup.** See\n   `anti-goals.md`. The slop-detector is a tool for\n   reviewers, not a hammer for autonomous agents.\n\n## Currency note\n\nModel behavior changes faster than these notes can. The\nspecific multipliers above will be wrong in 12 months.\nThe *pattern*. AI artifacts have predictable defect\nprofiles that differ by family and by reasoning depth —\nwill persist.\n\nRe-validate the model-specific numbers every six months\nagainst:\n\n- Sonar's live LLM leaderboard\n- The latest CodeRabbit / Apiiro / Veracode quarterly\n  reports\n- Your own internal defect data, if you track it\n\nThe goal of this module is not to memorize numbers. It is\nto give the slop-detector and its users a defensible\nposture: *informed skepticism*, calibrated to data, not\nperformative caution.\n\n## Sources for citation\n\nWhen a slop-detector finding needs justification, cite\nfrom:\n\n- **CodeRabbit, *State of AI vs Human Code Generation***\n  (Dec 17, 2025): ratios.\n- **GitClear, *AI Copilot Code Quality: 2025 Data*** (2025):\n  duplication, churn, refactoring rate.\n- **METR**, arXiv:2507.09089 (July 2025): productivity\n  perception vs. reality.\n- **Sonar LLM leaderboard** (live, Q4 2025+): model-specific\n  failure modes.\n- **Apiiro, *4× Velocity, 10× Vulnerabilities*** (June 2025):\n  security findings rate.\n- **Veracode, *2025 GenAI Code Security Report*** (Aug 2025,\n  March 2026 update): OWASP fail rates.\n- **Trend Micro, *TrendAI 2025*** (March 2026): CVE share,\n  slopsquatting.\n- **AI Code in the Wild**, arXiv:2512.18567 (Dec 2025):\n  repository-scale empirical study.\n- **Antislop**, arXiv:2510.15061 (Oct 2025, ICLR 2026): most\n  rigorous current paper on prose slop.\n\nFile v1.9.19:modules/evidence-backed-claims.md\n\n---\nmodule: evidence-backed-claims\ncategory: detection\ndependencies: [Grep, Read, Bash]\nestimated_tokens: 600\n---\n\n# Evidence-Backed Claims\n\n**Every quality claim must point to evidence in the same\nrepository. No evidence, delete the claim.**\n\nThis module operationalizes the §2.4 README rule from the\nAI slop playbook. It is the highest-leverage prose check\nfor crate/library/project READMEs, because feature-list\nbuzzword soup is the most common AI-generated README\nfailure mode.\n\n## The rule\n\nFor each quality claim, the repository must contain the\nevidence that backs it. If the evidence does not exist,\nthe claim is marketing slop and must be deleted.\n\n## Required-evidence table\n\n| Claim | Required evidence |\n|-------|-------------------|\n| \"Production-ready\" | CI workflow, release process doc, version >= 1.0, named adopters |\n| \"Fast\" / \"Blazing fast\" / \"High-performance\" | `benches/` directory with reproducible benchmark and numbers |\n| \"Memory-safe\" / \"Safe\" | `#![forbid(unsafe_code)]`, audited unsafe blocks, or fuzz harness |\n| \"Zero-cost\" | benchmark vs. equivalent unabstracted code |\n| \"Type-safe\" | named the type system property, or strict mode enabled |\n| \"Fault-tolerant\" | tests covering the failure modes named |\n| \"Resilient\" | retry logic and tests of failure paths |\n| \"Scalable\" | load tests, capacity numbers, or deployment story |\n| \"Battle-tested\" | named adopters, version history, issue-resolution track |\n| \"Robust\" | replace with concrete error-handling guarantees and test coverage |\n| \"Idiomatic\" | replace with \"passes [linter] -- -D warnings\" |\n| \"Secure\" | threat model, audit reference, or `cargo audit`/equivalent in CI |\n| \"Easy to use\" | three-line \"minimal example\" that actually runs |\n| \"Well-tested\" | coverage % from a real run, or test count |\n| \"Well-documented\" | docs.rs / readthedocs link with non-trivial content |\n| \"Cross-platform\" | named platforms with CI matrix |\n| \"Lightweight\" | binary size, dep count, or LOC number |\n| \"No dependencies\" | empty `[dependencies]` or named exceptions |\n\n## Detection\n\nFor each claim word/phrase in the README and other\npublic-facing docs, check whether the corresponding\nevidence exists.\n\n### Pattern 1: simple grep and file existence\n\n```bash\n# Does the README claim \"production-ready\"?\ngrep -i 'production[- ]ready' README.md\n\n# Then verify the evidence:\n[ -d \".github/workflows\" ] && echo \"CI exists\" || echo \"MISSING: CI\"\n[ -f \"RELEASE.md\" ] || [ -f \"RELEASING.md\" ] && echo \"release doc exists\" || echo \"MISSING: release process\"\ngrep -E '^version = \"[1-9]' Cargo.toml *.toml 2>/dev/null || echo \"MISSING: version >= 1.0\"\n```\n\n### Pattern 2: claim → benchmark cross-reference\n\n```bash\n# Does the README claim \"fast\"?\ngrep -iE '\\b(fast|blazing|high[- ]performance)\\b' README.md\n\n# Then verify benchmarks exist with results:\n[ -d \"benches/\" ] || [ -d \"benchmarks/\" ] || echo \"MISSING: benches dir\"\nls benches/ 2>/dev/null | grep -E '\\.(rs|py|js|ts)$' || echo \"MISSING: benchmark sources\"\n\n# And ideally that BENCHMARKS.md exists with numbers:\n[ -f \"BENCHMARKS.md\" ] && echo \"results documented\" || echo \"WARN: no published results\"\n```\n\n### Pattern 3: safety claims vs. unsafe usage\n\n```bash\n# Does the README claim \"safe\" or \"memory-safe\"?\ngrep -iE 'memory[- ]safe|\"safe\"' README.md\n\n# Then verify the project enforces it:\ngrep -r '#!\\[forbid(unsafe_code)\\]' src/ && echo \"unsafe forbidden\"\n\n# Or that any unsafe blocks have SAFETY comments:\nunsafe_count=$(rg -c 'unsafe\\s*\\{' src/ | awk -F: '{s+=$2} END {print s}')\nsafety_count=$(rg -c '// SAFETY:' src/ | awk -F: '{s+=$2} END {print s}')\n[ \"$unsafe_count\" -gt 0 ] && [ \"$safety_count\" -lt \"$unsafe_count\" ] && \\\n  echo \"FAIL: $unsafe_count unsafe blocks, only $safety_count SAFETY comments\"\n```\n\n## README-specific anti-patterns\n\nBeyond claim verification, the playbook §2.4 lists\nstructural anti-patterns common in AI-generated READMEs:\n\n### Pattern A: Features-list-as-first-section\n\nA good README opens with:\n1. One sentence: what it is.\n2. Minimal working example (5-15 lines, runnable).\n3. Install instruction.\n\nThen features, configuration, contributing, etc.\n\nDetection: if the first section after the title is a\nbullet list of features, flag for restructuring.\n\n### Pattern B: TOC in a short README\n\nA 200-line README does not need a table of contents.\nGitHub auto-generates one. Detection:\n\n```bash\nlines=$(wc -l < README.md)\nhas_toc=$(grep -c '## Table of Contents\\|## Contents' README.md)\n[ \"$lines\" -lt 300 ] && [ \"$has_toc\" -gt 0 ] && \\\n  echo \"FAIL: README is short enough that TOC is noise\"\n```\n\n### Pattern C: Emoji-prefixed feature bullets\n\nLines like:\n\n```\n- 🚀 Fast\n- 🔒 Safe\n- 🎯 Easy\n```\n\nStrip the emoji; if the bullet still says something, keep\nthe bullet. If the bullet only had value because of the\nemoji, delete it.\n\nDetection:\n\n```bash\ngrep -E '^- (\\\\xF0\\\\x9F|🚀|🔒|🎯|✨|⚡)' README.md\n```\n\n### Pattern D: \"Why X?\" section that doesn't compare\n\nA \"Why our crate?\" section that recites generic benefits\n(\"safe, fast, easy\") without naming specific alternatives\nor making falsifiable claims is slop. Either:\n- Rewrite to compare against named alternatives with\n  specifics.\n- Delete the section.\n\n### Pattern E: Status badges that don't match reality\n\nA green CI badge for a workflow that no longer exists is\nworse than no badge.\n\nDetection:\n\n```bash\n# Extract badge URLs\ngrep -oE 'https://img.shields.io/[^)]+|https://github.com/[^/]+/[^/]+/actions/[^)]+' README.md\n\n# Verify each linked workflow exists and is green\n# (manual check, or use gh-actions API)\n```\n\n### Pattern F: `-rs` / `-rust` suffix in crate name\n\nPer Rust API Guidelines: redundant. Detection in\n`Cargo.toml`:\n\n```bash\ngrep -E '^name = \".*-(rs|rust)\"' Cargo.toml && echo \"REDUNDANT suffix\"\n```\n\n(Same applies to `-py`/`-python`, `-js`/`-javascript`,\n`-go`/`-golang` in their respective ecosystems, flag\nthe redundancy.)\n\n## Output format\n\n```\n[FINDING N]\nfile:        README.md\nline:        12\ncategory:    evidence-backed-claims/unverified-claim\nseverity:    medium\nconfidence:  high\nevidence:    > A blazing-fast, production-ready, memory-safe\n             > library for parsing JSON:\nrationale:   Three claims in one sentence, none backed:\n             - \"blazing-fast\": no benches/ directory\n             - \"production-ready\": no CI, version 0.1.2\n             - \"memory-safe\": no #![forbid(unsafe_code)]\n                and 14 unsafe blocks in src/, only 3 with\n                SAFETY comments\nfix:         Either:\n             1. Add the evidence (benches, CI, audit unsafe)\n                and keep the claims.\n             2. Replace with: \"A library for parsing JSON.\n                Pre-1.0; benchmarks in progress.\"\n             Default to option 2 unless option 1 is on\n             the actual roadmap.\n```\n\n## Anti-goal\n\nThis module is *not* a vibe check. It does not flag claims\nthat are *imprecise*: only claims that are *unevidenced*.\n\"Fast\" is fine if `benches/` exists. \"Safe\" is fine if\nunsafe blocks are documented. The bar is evidence, not\nmodesty.\n\nWhen in doubt: flag for human review. The cost of a false\npositive (a real claim deleted) is higher than the cost of\na false negative (a false claim left in).\n\nFile v1.9.19:modules/fiction-patterns.md\n\n---\nmodule: fiction-patterns\ncategory: detection\ndependencies: [Grep, Read]\nestimated_tokens: 700\n---\n\n# Fiction-Specific AI Pattern Detection\n\nCreative writing has distinct AI tells beyond technical documentation markers.\n\n## Physical/Emotional Cliche Beats\n\nAI defaults to formulaic body language and emotional descriptions.\n\n### Breath Cliches (Score: 3 each)\n```\n\"breath he didn't know he was holding\"\n\"let out a breath\"\n\"released a breath\"\n\"exhaled a breath he'd been holding\"\n\"breath caught in [his/her] throat\"\n```\n\n### Body Protest Metaphors (Score: 2 each)\n```\n\"[body part] protested\"\n\"his shoulder protests\"\n\"muscles screamed in protest\"\n\"[body part] screamed\"\n```\n\n### Emotion Washing (Score: 3 each)\n```\n\"relief washed over\"\n\"[emotion] washed over\"\n\"a sense of [emotion] washed\"\n\"dread pooled in [his/her] stomach\"\n\"heart clenched\"\n```\n\n### Vague Depth Markers (Score: 3 each)\n```\n\"something in [his/her] expression\"\n\"something in [his/her] eyes\"\n\"something shifted\"\n\"something precious\"\n\"something soft in\"\n\"something [adjective] in [his/her] voice\"\n```\n\n### Decision/Reaction Avoidance (Score: 2 each)\n```\n\"doesn't know what to do with that\"\n\"didn't know what to do with\"\n\"couldn't process\"\n\"brain short-circuited\"\n```\n\n## Narrative Structure Cliches\n\n### Simile Abuse (Score: 2-4 each)\n```\n\"like it's the most natural thing in the world\" (4)\n\"like a vow\" (3)\n\"like a promise\" (3)\n\"like coming home\" (3)\n\"like a blade wrapped in silk\" (4)\n\"stone in still water\" (4)\n```\n\n### Rhetorical Emphasis (Score: 3 each)\n```\n\"He x—really x—\" pattern\n\"He looked at her—really looked\"\n\"He listened—really listened\"\n\"Not x but y\" / \"Not x, just y\"\n\"didn't [verb] but [verb]\"\n```\n\n### Sentence Fragment Overuse\n\nAI uses stylistic fragments excessively for \"punch\":\n```\n\"Tosses it somewhere behind him.\"\n\"Gone.\"\n\"Just like that.\"\n\"Nothing more.\"\n```\n\nOne or two per scene is stylistic; five or more signals generation.\n\n## Word-Level Fiction Tells\n\n### Overused Descriptors\n```\ncataloguing, measured, clocked, flickering,\nperhaps, maybe, just, that, something,\nkind of, sort of\n```\n\n### Action Inflation\n```\nscreaming (metaphorical: \"hip screaming\")\nprotesting (body parts)\ndancing (non-dance contexts: \"fingers dancing\")\nsinging (objects: \"the blade sang\")\n```\n\n### Adverb Clustering\n\nAI repeats the same adverbs within short spans:\n- \"softly\" appearing 3+ times in a scene\n- \"quietly\" used with multiple actions\n- \"slowly\" describing everything\n\nCheck adverb variety: count unique adverbs vs total adverb uses.\n\n## Dialogue Patterns\n\n### Sycophantic Character Speech\n```\n\"That's a great idea\"\n\"You're absolutely right\"\n\"I never thought of it that way\"\n```\n\n### Overly Clean Attribution\nAI avoids \"said\" excessively:\n```\nhe murmured, she whispered, he breathed,\nshe exhaled, he muttered, she remarked\n```\n\nNatural dialogue uses \"said\" frequently without variation.\n\n## Chapter/Scene Structure\n\n### Upbeat Endings\n\nAI ends scenes with false resolution:\n- Characters reaching understanding\n- Hopeful forward-looking statements\n- Emotional catharsis without buildup\n\n### Character Name Patterns\n\nAI defaults to certain names with suspicious frequency:\n- Sarah Chen (extremely common in AI fiction)\n- Emma, Liam, Maya, Marcus\n- Asian names with Western first names\n\n## Detection Regex\n\n```python\nFICTION_PATTERNS = [\n    r\"breath \\w+ didn't know\",\n    r\"let out a breath\",\n    r\"\\w+ protested?(?:\\s|$)\",\n    r\"(?:relief|fear|dread|panic) washed over\",\n    r\"something (?:in|about) (?:his|her)\",\n    r\"like (?:it's|it was) the most natural\",\n    r\"—really \\w+—\",\n    r\"(?:didn't|doesn't) know what to do with\",\n]\n```\n\n## Scoring for Fiction\n\n```python\ndef fiction_slop_score(text):\n    patterns_found = []\n    for pattern, score in FICTION_PATTERNS:\n        matches = re.findall(pattern, text, re.IGNORECASE)\n        patterns_found.extend([(m, score) for m in matches])\n\n    # Weight by scene length (per 500 words)\n    word_count = len(text.split())\n    raw_score = sum(score for _, score in patterns_found)\n    normalized = (raw_score / word_count) * 500\n\n    return {\n        'score': min(10, normalized),\n        'patterns': patterns_found,\n        'density': len(patterns_found) / (word_count / 500)\n    }\n```\n\n## Remediation Notes\n\nFiction slop requires rewriting, not just word replacement. The underlying issue is reliance on familiar emotional beats rather than character-specific reactions.\n\nRecommend:\n1. What would THIS character actually do/feel?\n2. What sensory details are specific to this scene?\n3. What's the subtext beneath the surface emotion?\n\nFile v1.9.19:modules/hallucination-detection.md\n\n---\nmodule: hallucination-detection\ncategory: detection\ndependencies: [Grep, Read, Bash]\nestimated_tokens: 700\n---\n\n# Hallucination Detection\n\n**Hallucination is not slop: it is wrongness with confident\nphrasing. Always P0.**\n\nThis module covers the class of AI defects where the\ngenerated text *refers to something that does not exist*:\na function never defined, a library never published, a\nconfig key never read, a cited URL that 404s. Slop\ndetectors that only score word density miss these\nentirely, because each individual word is fine.\n\nThe 2025-26 cross-evaluation work (see `empirical-baseline.md`)\nis unambiguous: GPT-5.x family fabricates more (invented identifiers,\nmade-up library APIs); Claude 4.x family omits more\n(skipped match arms, missed error paths). Both produce\nplausible-but-fake doc references. Calibrate the audit\nweighting to the model that produced the artifact, but\nalways run the full check.\n\n## Class 1: Phantom code references\n\nComments and docs that reference code that does not exist\nin the repository.\n\n### Patterns to scan\n\n```\n\"see also `module_name::function`\"\n\"as defined in `path/to/file.rs`\"\n\"this calls into `helper_fn()`\"\n\"the `FooConfig` struct\"\n\"flag this with `--enable-bar`\"\n```\n\n### Detection rule\n\nFor each backtick-quoted identifier or path in prose,\nverify it actually exists:\n\n```bash\n# Identifiers\nrg -c \"\\bfunction_name\\b\" --type-add 'src:*.{py,rs,ts,js,go}' --type src\n\n# File paths\n[ -f \"path/to/file.rs\" ] && echo \"exists\" || echo \"MISSING\"\n\n# Module paths (language-dependent)\nrg \"^(pub )?(mod|fn|struct|enum) function_name\" --type src\n```\n\nFindings format:\n- `confidence: high` if the identifier appears in prose\n  but `rg` finds zero matches in source.\n- `confidence: medium` if the identifier exists but in a\n  surprising location (suggests rename without doc update).\n\n### Common phantom-reference patterns\n\n- \"deprecated in favor of `new_api`\": verify `new_api`\n  exists and is not itself deprecated.\n- \"see `tests/test_foo.py`\": verify file exists.\n- \"the `--strict` flag\": verify the CLI parses that flag.\n- \"the `MAX_RETRIES` constant\": verify the constant is\n  defined and exported.\n\n## Class 2: Phantom external dependencies\n\nLibrary imports and config keys that AI invented because\nthey sounded plausible.\n\n### Patterns to scan\n\nFor Rust/Python/JS, every import or `use` statement should\nresolve to a real published crate/package.\n\n```bash\n# Python: every import in source\nrg \"^(?:from|import)\\s+\\w+\" --type py | sort -u\n\n# Rust: every use statement\nrg \"^use\\s+[a-z][a-z0-9_]+::\" --type rust | sort -u\n\n# Cross-reference with declared dependencies\ndiff <(extract-imports) <(extract-deps)\n```\n\n### \"Slopsquatting\": the security flank\n\nTrend Micro's 2024-25 research documented adversaries\nregistering hallucinated package names that AI agents\nsuggested. A doc that recommends installing a non-existent\npackage is a vector for supply-chain attack the next time\nthat name *does* get registered.\n\nDetection:\n- Cross-reference every `pip install`, `cargo install`,\n  `npm install`, `gem install` recommendation in docs\n  against the relevant registry.\n- Flag any package that does not currently resolve.\n- Especially flag packages with names suspiciously close\n  to popular ones (e.g. `requesst` for `requests`).\n\n### Made-up identifiers (model-specific weighting)\n\nPer 2025-26 research:\n\n- **GPT-family-generated text**: weight toward verifying\n  every method name, attribute name, lint name, config\n  key actually exists.\n- **Claude-family-generated text**: weight toward verifying\n  every match arm and error variant is reachable, every\n  edge case is handled.\n\nA simple cross-reference grep catches most of these.\n\n## Class 3: Dead URLs and broken citations\n\nAI confidently cites docs URLs that 404 or arXiv papers\nthat do not exist.\n\n### Detection\n\n```bash\n# Extract all URLs from docs\nrg -o 'https?://[^\\s\\)]+' docs/ *.md\n\n# Verify each (rate-limited, batch)\nwhile read url; do\n  status=$(curl -sI -o /dev/null -w '%{http_code}' \"$url\" --max-time 5)\n  [ \"$status\" != \"200\" ] && echo \"DEAD: $status $url\"\ndone < urls.txt\n```\n\n### Special cases\n\n- **arXiv citations**: verify the arXiv ID exists.\n  `https://arxiv.org/abs/{ID}` should return 200.\n- **GitHub references**: `github.com/user/repo` should\n  resolve. `github.com/user/repo/blob/main/path` should\n  also resolve at the named branch.\n- **Internal docs**: relative links should point to files\n  that exist at that path in the repo.\n\n## Class 4: Phantom test/file references\n\nComments that reference test files, fixtures, or modules\nthat do not exist.\n\n```python\n# SLOP: references file that doesn't exist\n# See tests/integration/test_full_flow.py for end-to-end coverage\n```\n\nIf `tests/integration/test_full_flow.py` does not exist,\nthe comment is hallucinated. Either:\n1. The test was removed and the comment was not updated.\n2. The test was never written and the comment is invention.\n\nEither way, the comment is a defect: it tells future\nmaintainers that coverage exists where it does not.\n\n### Detection\n\n```bash\n# Pull every file path from comments\nrg -o '(?:tests?/|src/|docs?/)[\\w/.-]+\\.\\w+' --no-filename .\n\n# Verify each path exists\nwhile read path; do\n  [ ! -e \"$path\" ] && echo \"MISSING: $path\"\ndone < referenced-paths.txt\n```\n\n## Class 5: Made-up configuration\n\nConfig keys, environment variables, or feature flags that\nappear in docs but are never read by the code.\n\n### Detection\n\nFor every config key mentioned in docs, verify the code\nactually reads it:\n\n```bash\n# Pull config keys from docs (tune the regex per config format)\nrg -o '`[A-Z][A-Z0-9_]+`' --no-filename docs/ *.md | sort -u > docs-keys.txt\n\n# Pull keys actually read in code\nrg -o 'env::var\\(\"([A-Z_]+)\"' src/ | sort -u > code-keys.txt\nrg -o 'os.environ\\[\"([A-Z_]+)\"\\]' src/ | sort -u >> code-keys.txt\n\n# Diff\ncomm -23 docs-keys.txt code-keys.txt\n# Lines in docs but not in code = phantom config keys\n```\n\n## Output format\n\nHallucination findings should follow the structured-finding\nformat with `severity: critical` (since the documentation\nis actively wrong, not just bloated):\n\n```\n[FINDING N]\nfile:        docs/api.md\nline:        47\ncategory:    hallucination/phantom-identifier\nseverity:    critical\nconfidence:  high\nevidence:    >    Use `Client.connect_with_timeout(...)` to ...\nrationale:   `Client.connect_with_timeout` does not exist\n             anywhere in the codebase. `Client.connect`\n             accepts a timeout via the `Options` struct:\nfix:         Replace with `Client.connect(opts)` and update\n             the surrounding example accordingly.\n```\n\n## Integration\n\nHallucination detection runs *before* the cleanup workflow\n(see `cleanup-workflow.md` Pass 2). Cleaning up text that\nreferences phantoms means polishing prose that is wrong\nabout the world: fix the wrongness first, then polish.\n\nA document with any critical-severity hallucination\nfinding must not pass review until the finding is resolved\nor explicitly waived with rationale.\n\nFile v1.9.19:modules/identity-and-voice-leaks.md\n\n---\nmodule: identity-and-voice-leaks\ncategory: detection\ndependencies: [Grep, Read]\nestimated_tokens: 700\n---\n\n# Identity & Voice Leaks\n\n**Some patterns are not \"slop\": they are direct evidence\nthat AI generated text leaked into a published artifact.\nThese are P0 fails: detect, alert, and require remediation\nbefore merge.**\n\nThis module covers three distinct classes that the\nvocabulary and structural detectors miss because they are\nabout *register* and *self-reference*, not word density:\n\n1. **Identity leaks**: the model talking about itself.\n2. **Conversational artifacts**: chat-register openers\n   and closers that escaped into a document.\n3. **Self-narration of structure**: the model describing\n   what it is about to write rather than writing it.\n\nAll three are absolute, not probabilistic. A single\nidentity leak in a published doc is enough to fail review.\n\n## Class 1: Identity leaks (P0, always fail)\n\nThese phrases reveal that the text was generated by an LLM\nthat did not realize it was being asked to write *as the\nproject*. Found in any published artifact, they must be\ndeleted on sight.\n\n### Direct identity claims\n\n```\nAs a large language model\nAs an AI assistant\nAs an AI language model\nI am an AI\nI am Claude\nI am ChatGPT\nI'm an AI\n```\n\n### Capability/limitation disclaimers\n\n```\nI cannot provide\nI do not have access to\nI do not have the ability to\nI am not able to\nmy knowledge is limited to\nmy training data does not include\n```\n\n### Temporal disclaimers\n\n```\nas of my last update\nas of my training cutoff\nas of my knowledge cutoff\nas of [date], I do not know\nbased on information available to me\n```\n\n### Self-reference in technical text\n\n```\nin my response\nin this response\nthe following response\nlet me [verb]   (as opener; \"let me explain\", \"let me clarify\")\n```\n\nThese last patterns are softer signals. \"let me\" is normal\nin some genres, but in technical documentation, README\nfiles, or commit messages, they are voice leaks worth\nflagging.\n\n### Detection rule\n\n**Any match in the identity-leaks list = severity: critical,\nconfidence: high, action: remove before merge.**\n\nThere is no tuning here. Identity leaks are categorical.\n\n## Class 2: Conversational voice leaks\n\nChat-register pleasantries that escaped from a turn-of-\nconversation into a published document. The signal is the\nexclamation point and the social warmth: both are\nappropriate in chat, neither is appropriate in a README.\n\n### Servile openers (Score: 4 each, strong signal)\n\n```\n\"Sure!\"\n\"Sure thing!\"\n\"Certainly!\"\n\"Absolutely!\"\n\"Of course!\"\n\"I'd be happy to\"\n\"I'd love to help\"\n\"I'm happy to\"\n\"Great question!\"\n\"Great point!\"\n\"Excellent question!\"\n\"That's a wonderful question\"\n```\n\n### Servile closers (Score: 4 each, strong signal)\n\n```\n\"Hope this helps!\"\n\"Hope that helps!\"\n\"Let me know if you have any questions\"\n\"Feel free to ask if anything is unclear\"\n\"Happy coding!\"\n\"Happy to help with anything else\"\n\"Best of luck!\"\n\"Good luck!\"\n```\n\n### Validation phrases (Score: 3 each, sycophancy signal)\n\n```\n\"You're absolutely right\"\n\"That's a great point\"\n\"You raise a valid concern\"\n\"That's a really good question\"\n\"I see what you mean\"\n\"That makes total sense\"\n```\n\n### Detection rule\n\nThese belong in conversation, not in artifacts. Found in\nREADME, docs, code comments, commit messages, or PR\ndescriptions: delete the phrase, keep the substance.\n\nSpecial case: an `assistant:` block in a saved transcript\nis fine: it is supposed to sound like chat. Flag only\nwhen these phrases appear *outside* explicit transcript\nblocks.\n\n## Class 3: Self-narration of structure\n\nThe model telling the reader what it is about to write,\nor what the reader is about to read. The structure-\nnarration steals reader attention from the actual content.\n\n### \"We will\" / \"Let's\" openers (Score: 3 each)\n\n```\n\"In this article, we will explore\"\n\"In this guide, we will cover\"\n\"In this section, we will discuss\"\n\"In this post, we will look at\"\n\"This article explores\"\n\"This guide covers\"\n\"Let's dive into\"\n\"Let's break this down\"\n\"Let's take a closer look\"\n\"Let's explore\"\n\"Let's examine\"\n\"We'll cover\"\n\"We'll explore\"\n\"We'll discuss\"\n\"By the end of this guide / article / section\"\n```\n\n### \"First, second, third\" scaffolding (Score: 2)\n\n```\n\"First, we will [verb]\"\n\"Next, we will [verb]\"\n\"Finally, we will [verb]\"\n\"To begin with\"\n\"Moving on\"\n\"Wrapping up\"\n```\n\n### Empty conclusions (Score: 3 each)\n\n```\n\"In conclusion,\"\n\"In summary,\"\n\"To summarize,\"\n\"All in all,\"\n\"It is clear that\"\n\"Overall,\"   (as paragraph opener)\n\"Ultimately,\"   (as conclusion opener)\n```\n\n### Detection rule\n\nStrip the framing; start the sentence at the substantive\ncontent. \"In this section, we will discuss authentication\"\nbecomes \"Authentication uses...\" or simply the first\nsubstantive sentence of the actual discussion.\n\nIf a doc cannot survive removing all of these phrases, the\ndoc is mostly scaffolding and needs to be rewritten or\ndeleted, not patched.\n\n## Class 4: Hedging seesaw and parallel \"not just\"\n\nTwo more patterns that the Wikipedia *Signs of AI Writing*\nresearch identifies as primary AI markers.\n\n### Hedging seesaw (Score: 3)\n\nThe \"while X has its merits, it also has its challenges\"\nconstruction. AI defaults to balanced two-sided framing\neven when one side is clearly stronger.\n\n```\n\"While [X] has its merits, [Y] is not without its challenges\"\n\"While [X] is powerful, it can also be [negative]\"\n\"On one hand [X], on the other hand [Y]\"\n\"Despite [X], it is important to consider [Y]\"\n\"That said, [X]\"   (as reflexive softener)\n```\n\nThe fix is to take a position. If the analysis genuinely\nwarrants a hedge, name *which* trade-off and *why*:\nthe seesaw form just performs balance without earning it.\n\n### Parallel \"not just\" / \"not only\" (Score: 3)\n\nWikipedia's *Signs of AI Writing* lists this as a primary\nmarker. The construction creates artificial parallelism\nthat human writers rarely use as a paragraph opener.\n\n```\n\"Not only [X], but also [Y]\"\n\"Not just [X], but [Y]\"\n\"It's not only [X]: it's also [Y]\"\n```\n\nEspecially as a paragraph opener. As a single sentence\ninside a longer argument it can be fine; as a structural\nreflex it is generated.\n\n### Detection rule\n\nBoth patterns are pattern-matchable but contextual. Flag\non match; require human review before deletion since each\nhas legitimate uses. The diagnostic question: *is this the\nshortest way the author could have said the thing?* If no,\ncut.\n\n## Combined scoring\n\nIdentity leaks (Class 1) are always severity: critical\nregardless of count. Classes 2-4 contribute to the\nsentence-level slop score per the standard formula.\n\n```python\ndef has_identity_leak(text: str) -> list[str]:\n    \"\"\"Return list of identity-leak matches found in text.\n    Any non-empty result = critical-severity finding.\"\"\"\n    leaks = []\n    for pattern in IDENTITY_LEAK_PATTERNS:\n        if re.search(pattern, text, re.IGNORECASE):\n            leaks.append(pattern)\n    return leaks\n```\n\nA document with even one identity leak fails review until\nthe leak is removed, regardless of its other scores.\n\n## False positives\n\nA few legitimate uses of these patterns:\n\n- A blog post *about* AI writing that quotes an LLM\n  saying \"As a large language model\": fine in a quote\n  block or fenced code block.\n- A test fixture that intentionally contains a sycophantic\n  opener to test the slop detector: should live under\n  `tests/` and be excluded by path.\n- A glossary that defines what an \"identity leak\" is and\n  shows examples: mark with `<!-- slop-detector:ignore -->`\n  or equivalent project-specific marker.\n\nWhen in doubt: leave the match flagged, surface it to a\nhuman reviewer, do not auto-delete.\n\nArchive v1.9.17: 20 files, 73153 bytes\n\nFiles: modules/anti-goals.md (8997b), modules/ci-integration.md (2887b), modules/cleanup-workflow.md (9184b), modules/config-file.md (3524b), modules/document-economy.md (6561b), modules/empirical-baseline.md (8768b), modules/evidence-backed-claims.md (7198b), modules/fiction-patterns.md (4570b), modules/hallucination-detection.md (6973b), modules/identity-and-voice-leaks.md (7619b), modules/language-handling.md (5275b), modules/remediation-strategies.md (9473b), modules/reporting.md (4733b), modules/structural-patterns.md (15723b), modules/structured-finding-output.md (8231b), modules/stub-and-deferral.md (5617b), modules/vocabulary-patterns.md (17805b), skill-card.md (2515b), SKILL.md (17899b), _meta.json (143b)\n\nFile v1.9.17:SKILL.md\n\n---\nname: slop-detector\ndescription: Detects AI-generated writing patterns in prose\nversion: 1.9.8\ntriggers:\n  - ai-detection\n  - slop\n  - writing\n  - cleanup\n  - documentation\n  - quality\n  - reviewing docs for slop\n  - vague language\n  - or identity leaks before publishing\nmetadata: {\"openclaw\": {\"homepage\": \"https://github.com/athola/claude-night-market/tree/master/plugins/scribe\", \"emoji\": \"\\u270d\\ufe0f\", \"requires\": {\"config\": [\"night-market.scribe:shared\"]}}}\nsource: claude-night-market\nsource_plugin: scribe\n---\n\n> **Night Market Skill** — ported from [claude-night-market/scribe](https://github.com/athola/claude-night-market/tree/master/plugins/scribe). For the full experience with agents, hooks, and commands, install the Claude Code plugin.\n\n\n# AI Slop Detection\n\n**Slop is a density problem, not a word problem.**\n\nA single \"delve\" is fine. Five \"delves\" near a \"tapestry\"\nand an \"embark\" is generated text. This skill scores\ndensity per 100 words, marker clustering, and whether\nthe overall register fits the document type. It does not\nban words; it flags concentrations.\n\n## Execution Workflow\n\nIdentify target files and classify them as technical docs,\nnarrative prose, or code comments. Classification feeds\ncontext-aware scoring: tier-1 markers in marketing copy\nscore lower than the same markers in API reference.\n\n### Language Detection\n\n- Auto-detect language from text content using function word frequency\n- Override with explicit `--lang` parameter (en, de, fr, es)\n- Load language-specific patterns from `data/languages/{lang}.yaml`\n- Fall back to English if detection confidence is low\n- See `modules/language-handling.md` for cultural calibration and concrete pattern sets\n\n### Vocabulary and Phrase Detection\n\nLoad: `@modules/vocabulary-patterns.md`\n\nMarkers fall into three confidence tiers. Tier 1 words\n(\"delve\", \"multifaceted\", \"leverage\") appear far more often\nin AI text than human text. Tier 2 covers context-dependent\ntransitions (\"moreover\", \"subsequently\"). Tier 3 covers\nvapid phrases (\"In today's fast-paced world\", \"cannot be\noverstated\").\n\n| Word | Context | Human Alternative |\n|------|---------|-------------------|\n| delve | \"delve into\" | explore, examine, look at |\n| tapestry | \"rich tapestry\" | mix, combination, variety |\n| realm | \"in the realm of\" | in, within, regarding |\n| embark | \"embark on a journey\" | start, begin |\n| beacon | \"a beacon of\" | example, model |\n| spearheaded | formal attribution | led, started |\n| multifaceted | describing complexity | complex, varied |\n| comprehensive | describing scope | thorough, complete |\n| pivotal | importance marker | key, important |\n| nuanced | sophistication signal | subtle, detailed |\n| meticulous/meticulously | care marker | careful, detailed |\n| intricate | complexity marker | detailed, complex |\n| showcasing | display verb | showing, displaying |\n| leveraging | business jargon | using |\n| streamline | optimization verb | simplify, improve |\n\n### Tier 2: Medium-Confidence Markers (Score: 2 each)\n\nCommon but context-dependent:\n\n| Category | Words |\n|----------|-------|\n| Transition overuse | moreover, furthermore, indeed, notably, subsequently |\n| Intensity clustering | significantly, substantially, fundamentally, profoundly |\n| Hedging stacks | potentially, typically, often, might, perhaps |\n| Action inflation | revolutionize, transform, unlock, unleash, elevate |\n| Empty emphasis | crucial, vital, essential, paramount |\n\n### Tier 3: Phrase Patterns (Score: 2-4 each)\n\n| Phrase | Score | Issue |\n|--------|-------|-------|\n| \"In today's fast-paced world\" | 4 | Vapid opener |\n| \"It's worth noting that\" | 3 | Filler |\n| \"At its core\" | 2 | Positional crutch |\n| \"Cannot be overstated\" | 3 | Empty emphasis |\n| \"A testament to\" | 3 | Attribution cliche |\n| \"Navigate the complexities\" | 4 | Business speak |\n| \"Unlock the potential\" | 4 | Marketing speak |\n| \"Treasure trove of\" | 3 | Overused metaphor |\n| \"Game changer\" | 3 | Buzzword |\n| \"Look no further\" | 4 | Sales pitch |\n| \"Nestled in the heart of\" | 4 | Travel writing cliche |\n| \"Embark on a journey\" | 4 | Melodrama |\n| \"Ever-evolving landscape\" | 4 | Tech cliche |\n| \"Hustle and bustle\" | 3 | Filler |\n\n## Step 3: Structural Pattern Detection\n\nLoad: `@modules/structural-patterns.md`\n\n### Em Dash Overuse\n\nThe single most-cited 2026 AI tell across Wikipedia, the Field\nGuide, and the Algorithmic Bridge. Detection runs in two modes:\n\n**Audit mode** (forensic, applied to unknown prose):\n- **0-1 per 1000 words**: Normal human range\n- **2-4**: Elevated, review usage\n- **5+**: Strong AI signal\n\n**Prevention mode** (applied to docs the agent just generated):\n- **Target zero**. Every em-dash is a finding.\n- Replace with commas (asides), parentheses (tangents), colons\n  (definitions), or periods (separate thoughts). See\n  `modules/structural-patterns.md` § Em Dash Analysis for the\n  full replacement table.\n\n```bash\n# Count em dashes in file\ngrep -o '—' file.md | wc -l\n```\n\n### Tricolon Detection\n\nAI loves groups of three with alliteration:\n- \"fast, efficient, and reliable\"\n- \"clear, concise, and compelling\"\n- \"robust, reliable, and resilient\"\n\nPattern: `adjective, adjective, and adjective` with similar sounds.\n\n### List-to-Prose Ratio\n\nCount bullet points vs paragraph sentences:\n- **>60% bullets**: AI tendency\n- **Emoji-led bullets**: Strong AI signal in technical docs\n\n### Sentence Length Uniformity\n\nMeasure standard deviation of sentence lengths:\n- **Low variance** (SD < 5 words): AI monotony\n- **High variance** (SD > 10 words): Human variation\n\n### Paragraph Symmetry\n\nAI produces \"blocky\" text with uniform paragraph lengths.\nCheck whether paragraphs cluster around the same word count.\n\n## Step 4: Identity & Voice Leak Sweep (P0)\n\nLoad: `@modules/identity-and-voice-leaks.md`\n\n**Some patterns are not slop: they are direct evidence\nthat AI generated text leaked into a published artifact.**\nA single match in this class fails review independently\nof any other score.\n\nScan for:\n\n1. **Identity leaks** (\"As a large language model\",\n   \"as of my training cutoff\", \"I cannot provide\") —\n   severity: critical, no exceptions.\n2. **Conversational voice leaks** (\"Hope this helps!\",\n   \"Great question!\", \"Sure!\") outside transcript blocks.\n3. **Self-narration of structure** (\"In this section, we\n   will cover...\", \"Let's dive into...\", \"By the end of\n   this guide...\").\n4. **Hedging seesaw** (\"While X has its merits, it's not\n   without its challenges\").\n5. **Parallel \"not just\" / \"not only\"** as paragraph\n   openers.\n\nSee the module for the full pattern catalogue and false-\npositive guidance.\n\n## Step 4.5: Sycophantic Pattern Detection\n\nEspecially relevant for conversational or instructional content\n(complements Class 2 of the identity-and-voice-leaks module):\n\n| Phrase | Issue |\n|--------|-------|\n| \"I'd be happy to\" | Servile opener |\n| \"Great question!\" | Empty validation |\n| \"Absolutely!\" | Over-agreement |\n| \"That's a wonderful point\" | Flattery |\n| \"I'm glad you asked\" | Filler |\n| \"You're absolutely right\" | Sycophancy |\n\nThese phrases add no information and signal generated content.\n\n## Step 4.6: Tier 5 / 2026 Patterns (Prevention-Strict)\n\nThe 2026 cross-source consensus (Wikipedia *Signs of AI\nwriting*, Algorithmic Bridge *10 Signs*, Ignorance.ai *Field\nGuide*, Stop-Slop Claude skill, George Kao, ContentBeta,\nOliviaCal) identifies a handful of shapes that dominate\npost-GPT-5 / post-Claude-4.5 prose. Each is detailed in\n`@modules/vocabulary-patterns.md` (lexical form) and\n`@modules/structural-patterns.md` (structural form).\n\n| Pattern | Form | Why it matters |\n|---------|------|----------------|\n| Em-dash overuse | — used as rhetorical pause | Most-cited single tell of 2026 |\n| Plus-sign for \"and\" | \"hooks and skills\" in prose | Strong: humans have \"and\" |\n| Spatial copula | \"lives in\", \"sits at\", \"stands as\", \"boasts\" | Inanimate subject with animate verb |\n| Negative parallelism | \"Not X but Y\", \"No X. No Y. Just Z.\", \"No X, no Y, no Z\", \"It's not X, it's Y\", \"Y, not X\" | Rhetorical scaffold with no argument |\n| Throat-clearing openers | \"Here's the thing,\", \"Look,\", \"Let that sink in.\" | Discourse markers signaling nothing |\n| Three-fragment burst | \"Focused. Aligned. Measurable.\" | Rhythm without information |\n| Significance cluster | \"stands as a testament to\", \"marks a turning point\" | Asserts importance without showing it |\n| Smart quotes in technical prose | `\"text\"` / `\"text\"` instead of `\"text\"` | Word-processor paste signature |\n| Loop/cascade vocab | \"unpack\", \"surface\" (verb), \"a quiet shift\" | 2026 systems-theory affectation |\n\n**Prevention rule**: when the slop-detector runs on docs the\nagent itself just generated (auto-invoked by `/doc-generate`,\n`/doc-polish`, `/update-readme`, `/update-docs`, etc.), every\nmatch in this table is a hard failure. Fix before write. See\n`modules/remediation-strategies.md` § Tier 5 / 2026 for the\nsubstitution tables.\n\n## Step 5: Calculate Slop Density Score\n\n```\nslop_score = (tier1_count * 3 + tier2_count * 2 + phrase_count * avg_phrase_score) / word_count * 100\n```\n\n| Score | Rating | Action |\n|-------|--------|--------|\n| 0-1.0 | Clean | No action needed |\n| 1.0-2.5 | Light | Spot remediation |\n| 2.5-5.0 | Moderate | Section rewrite recommended |\n| 5.0+ | Heavy | Full document review |\n\n## Step 6: Document Economy Check\n\nLoad: `@modules/document-economy.md`\n\n**Sentence cleanliness is necessary, not sufficient.** A document\ncan score 0 on slop density and still waste reader time by being\ntoo long, lacking a thesis, or repeating everything except the\none message that matters.\n\nScore the document on three checks (0-2 each):\n\n1. **Thesis-first**: does the lead state the single takeaway?\n2. **Sentence weight**: does every sentence carry, instance,\n   bound, or repeat the thesis?\n3. **Repetition rule**: is the thesis echoed (good) while\n   ambient repetition is cut (good)?\n\nCombine sentence-level slop score with document-economy score.\nBoth must pass. See `modules/document-economy.md` for the full\nrubric, the reader-time budget table, and a worked example.\n\n## Step 7: Hallucination & Stub Sweep\n\nLoad: `@modules/hallucination-detection.md` and\n`@modules/stub-and-deferral.md`.\n\n**Hallucination is not slop: it is wrongness with\nconfident phrasing. Always P0.**\n\nScan for:\n\n1. **Phantom code references**: every backticked\n   identifier, function name, or file path in prose must\n   exist in the codebase.\n2. **Phantom dependencies**: every recommended `pip\n   install` / `cargo install` / `npm install` must\n   resolve on the relevant registry (slopsquatting\n   defense).\n3. **Dead URLs**: every cited URL should return 200.\n4. **Made-up config keys**: every config key in docs must\n   be read by the code.\n5. **Bare TODO/FIXME**: requires either a tracked-issue\n   link or deletion.\n6. **Hedging language** (\"for now\", \"should work\",\n   \"placeholder\", \"dummy\"): each one is deferred work.\n7. **Stub constructs** (`todo!()`, `unimplemented!()`,\n   `NotImplementedError`): defects in any path reachable\n   from a public API.\n\nSee modules for detection commands and severity matrix.\n\n## Step 8: Evidence-Backed Claims (READMEs and public docs)\n\nLoad: `@modules/evidence-backed-claims.md`\n\n**Every quality claim must point to evidence in the same\nrepository. No evidence, delete the claim.**\n\nFor each claim of \"production-ready\", \"fast\", \"memory-\nsafe\", \"scalable\", etc., verify the corresponding\nevidence (CI workflow, benchmark directory, audit\nmarkers, etc.) actually exists. The module contains the\nfull claim → required-evidence table and language-\nspecific detection commands.\n\nThis step is highest-leverage for crate/library/project\nREADMEs, where feature-list buzzword soup is the most\ncommon AI-generated failure mode.\n\n## Step 9: Apply Anti-Goals (safety check)\n\nLoad: `@modules/anti-goals.md`\n\n**Aggressive de-slopping has its own failure modes.**\n\nBefore applying any fix surfaced by the prior steps,\nverify it does not violate the anti-goals:\n\n1. Do not strip safety comments (`// SAFETY:`,\n   `// INVARIANT:`, etc.) on `unsafe`, locked, or\n   contract-bearing code.\n2. Do not collapse public error variants without an\n   explicit major-version-bump decision.\n3. Do not \"simplify\" typed errors to boxed/dynamic\n   errors.\n4. Do not inline a function that has a domain-specific\n   name even if it is short.\n5. Do not touch generated code, vendored code, or\n   historical changelog entries.\n6. Do not auto-apply `confidence: low` findings —\n   surface them for human decision.\n\nWhen in doubt: leave the match flagged, do not delete.\n\n## The full multi-pass cleanup workflow\n\nFor systematic project-wide cleanup, run the multi-pass\nworkflow in order. See `@modules/cleanup-workflow.md` for\nthe full ten-pass methodology and the rationale for the\nordering. Summary:\n\n| Pass | Focus |\n|---|---|\n| 0 | Pre-slop sweep: secrets, agent configs |\n| 1 | Surface lint floor (formatter and linter) |\n| 2 | Hallucination & stubs (modules: hallucination, stub-and-deferral) |\n| 3 | Identity & voice leaks |\n| 4 | Comment slop (translation, marketing, banner, deferral) |\n| 5 | Prose slop (vocabulary, structural, document-economy, and evidence-backed-claims) |\n| 6 | Code idiom (delegate to language-specific plugins) |\n| 7 | Architecture (judgment-heavy; see anti-goals) |\n| 8 | Tests (tautology, mocks, snapshots) |\n| 9 | README & public docs |\n| 10 | Establish guardrails (CI, lints, constitution) |\n\n**Cardinal rules**: one pass per commit; deletion beats\nrewriting; do not silently apply low-confidence fixes;\nstop when a pass finds nothing.\n\n## Empirical baseline (cite when justifying severity)\n\nLoad: `@modules/empirical-baseline.md` for the 2025-Q1\n2026 research baseline that justifies the severity\nweighting. Headline numbers:\n\n- AI PRs ship 1.7x more total issues, 1.75x more\n  logic/correctness issues, 2.74x more XSS, ~8x more\n  excessive I/O than human-only PRs (CodeRabbit, Dec 2025).\n- 92-96% of detected AI-code issues are maintainability\n  (\"code smell\"), not correctness (Sonar, Q4 2025).\n- Model-specific patterns: GPT fabricates; Claude omits.\n  Calibrate the audit accordingly.\n\nWhen a finding's severity is challenged in review, cite\nfrom this module rather than asserting from authority.\n\n## Step 10: Generate Report\n\nFor per-finding output that reviewers can accept or reject\nindependently, use the canonical structured format defined\nin `@modules/structured-finding-output.md`. Each finding\ncarries `file`, `line`, `category`, `severity`,\n`confidence`, `evidence`, `rationale`, `fix`, and (for\nhigh-confidence) `diff`. Auto-apply policy is set by\nconfidence; never auto-apply `confidence: low`.\n\nSummary report format (human-readable):\n\n```markdown\n## Slop Detection Report: [filename]\n\n**Overall Score**: X.X / 10 (Rating)\n**Word Count**: N words\n**Markers Found**: N total\n\n### CRITICAL (P0, must resolve before merge)\n- Line 8: \"As a large language model\". IDENTITY LEAK\n- Line 47: References `Client.connect_with_timeout(...)` —\n  HALLUCINATION (method does not exist; closest match is\n  `Client.connect`)\n- Line 102: \"production-ready\" claim with no CI workflow\n . UNVERIFIED CLAIM\n\n### High-Confidence Markers (vocabulary)\n- Line 23: \"delve into\" -> consider: \"explore\"\n- Line 45: \"rich tapestry\" -> consider: \"variety\"\n\n### Structural Issues\n- Em dash density: 8/1000 words (HIGH)\n- Bullet ratio: 72% (ELEVATED)\n- Sentence length SD: 3.2 words (LOW VARIANCE)\n\n### Phrase Patterns\n- Line 12: \"In today's fast-paced world\" (vapid opener)\n- Line 89: \"cannot be overstated\" (empty emphasis)\n- Line 134: \"Let's dive into\" (self-narration of structure)\n\n### Tier 5 / 2026 Patterns\n- Line 19: \"The skill lives in `plugins/scribe/`\" → \"is in\"\n  (spatial copula, inanimate subject)\n- Line 27: \"hooks + skills\" → \"hooks and skills\" (plus-sign\n  conjunction in prose)\n- Line 34: \"It's not a tool, it's a transformation\" →\n  rewrite positively (negative parallelism)\n- Line 56: \"Here's the thing,\" → delete (throat-clearing\n  opener)\n- Line 78: \"Focused. Aligned. Measurable.\" → \"Focused,\n  aligned, and measurable.\" (three-fragment burst)\n- Line 91: 3 smart quotes outside code blocks (Word-processor\n  paste signature)\n\n### Stub & Deferral\n- Line 56: bare `// TODO: handle expired tokens` (no\n  tracked issue link)\n- Line 71: \"for now, we recommend\" (deferral language)\n\n### Document Economy Score: X / 6\n- Thesis-first: 1/2 (thesis present but buried in para 3)\n- Sentence weight: 1/2 (~65% of sentences earn weight)\n- Repetition: 2/2 (thesis echoed; ambient repetition cut)\n\n### Recommendations\n1. **CRITICAL**: delete line 8 identity leak before merge\n2. **CRITICAL**: replace `Client.connect_with_timeout`\n   with `Client.connect(opts)` and update example\n3. **CRITICAL**: either add CI + version >= 1.0 to back\n   \"production-ready\", or delete the claim\n4. Replace [specific word] with [alternative]\n5. Convert bullet list at line 34-56 to prose\n6. Hoist the thesis (line 47) into the lead paragraph\n7. Link bare TODOs to tracked issues or delete code path\n\n### Confidence-low findings (require human decision)\n- Line 89: bullet count of 8 may be appropriate for this\n  enumeration; do not auto-flatten\n- Line 156: `Manager` suffix may be domain-meaningful;\n  verify before renaming\n```\n\nPer `anti-goals.md`: surface `confidence: low` findings\nin a separate section. Do not silently apply them.\n\n## Module Reference\n\n- See `modules/fiction-patterns.md` for narrative-specific slop markers\n- See `modules/remediation-strategies.md` for fix recommendations\n\n## Integration with Remediation\n\nAfter detection, invoke `Skill(scribe:doc-generator)` with\nthe `--remediate` flag to apply fixes, or manually edit using\nthe report as a guide.\n\n## Exit Criteria\n\n- All target files scanned\n- Density scores calculated\n- Report generated with specific, line-anchored fixes\n- High-severity items flagged for immediate attention\n\nFile v1.9.17:_meta.json\n\n{\n  \"ownerId\": \"kn7d107jg9jv602h9ytsegydq184a42s\",\n  \"slug\": \"nm-scribe-slop-detector\",\n  \"version\": \"1.9.17\",\n  \"publishedAt\": 1785390121025\n}\n\nFile v1.9.17:modules/anti-goals.md\n\n---\nmodule: anti-goals\ncategory: safety\ndependencies: [Read]\nestimated_tokens: 500\n---\n\n# Anti-Goals: What NOT to Clean Up\n\n**Aggressive de-slopping has its own failure modes.**\n\nThis module is the safety rail. Every other module in the\nslop-detector tells you what to flag and remove; this one\ntells you what to *leave alone* even when it pattern-\nmatches. The bar for deletion is higher than the bar for\nflagging.\n\nWhen in doubt: leave it alone, surface it as a finding,\nand let a human decide.\n\n## Class 1: Comments that earn their bytes\n\nThese look like slop on density alone but carry meaning\nthe code does not:\n\n### Why-comments (always keep)\n\nA comment that explains *why* a non-obvious decision was\nmade is the highest-value comment class. The code is the\n\"what\"; comments earn their place by carrying the \"why\".\n\n```rust\n// We sleep 200ms specifically because the upstream\n// rate-limiter buckets at 5/s; faster retries return\n// 429 and waste a slot:\nthread::sleep(Duration::from_millis(200));\n```\n\nThis pattern-matches as a \"magic constant with comment\"\nwhich §3.2 flags as marketing slop, but it is the\n*opposite* of slop: the comment names the constraint that\nmakes the constant correct.\n\n**Rule**: a comment that names a constraint, references an\nupstream contract, or explains a counter-intuitive choice\nis information the code cannot carry. Keep it.\n\n### Safety comments on `unsafe` blocks (always keep)\n\n```rust\n// SAFETY: the caller has already validated that `idx`\n// is within `slice.len()`; see the bounds check in\n// `Buffer::insert` two frames up:\nunsafe { *slice.as_ptr().add(idx) }\n```\n\nThese are *required* by `clippy::undocumented_unsafe_blocks`\nand are part of the contract the code makes with reviewers.\nStripping them removes the only proof the unsafe block is\ncorrect.\n\n### Structured-meaning comment prefixes (always keep)\n\nMany codebases adopt structured prefixes for specific\ncomment classes. Examples:\n\n```\n// SAFETY: ...\n// INVARIANT: ...\n// LOCK ORDER: ...\n// BLOCKING: ...\n// PERFORMANCE: ...\n// SECURITY: ...\n// THREAD: ...\n```\n\nThese are project-specific contracts. They are not slop\neven if they look formulaic: the formula *is* the\ncontract. Audit before stripping; do not strip on pattern\nmatch alone.\n\n### Regression-pinning tests (always keep)\n\nA test that looks trivial (`assert!(parse(\"\").is_err())`)\nmay be pinning a regression. Deleting it because it \"looks\nslop\" is exactly how the regression returns.\n\n**Rule**: tests with bug-tracker references in their name\nor comment (`test_regression_1234`, `// repro for #1234`)\nmust not be removed without an explicit decision that the\nregression class is no longer relevant.\n\n## Class 2: Code that should not be flattened\n\n### `thiserror`-style error variants (do not collapse)\n\n```rust\n#[derive(Error)]\npub enum Error {\n    #[error(\"connection refused\")]\n    ConnectionRefused,\n    #[error(\"timeout after {0}s\")]\n    Timeout(u64),\n    #[error(\"invalid response: {0}\")]\n    InvalidResponse(String),\n    // ... 9 more variants, several rare ...\n}\n```\n\nThe \"12 variants, of which 3 are ever constructed\ninternally\" pattern from §6 looks like inflation, but\n*public error enums are part of the API*. Removing\nvariants:\n- Breaks downstream pattern-match exhaustiveness checks.\n- Removes information that helps users handle specific\n  failures.\n- Cannot be reversed without a major-version bump.\n\n**Rule**: never collapse public error variants without an\nexplicit major-version-bump decision.\n\n### Small named helpers (do not inline)\n\n```rust\nfn is_ascii_alphabetic_or_underscore(c: char) -> bool {\n    c.is_ascii_alphabetic() || c == '_'\n}\n```\n\nThis is two lines and looks like inflation, but the *name*\nmakes the calling code readable:\n\n```rust\nif is_ascii_alphabetic_or_underscore(c) { ... }\n```\n\nvs. the inlined version:\n\n```rust\nif c.is_ascii_alphabetic() || c == '_' { ... }\n```\n\nThe inline reads as \"checking ascii alpha or underscore\";\nthe named version reads as \"checking the leading-char\nrule\". The function carries domain meaning.\n\n**Rule**: a one-line helper with a domain-specific name is\nnot slop. Inline only when the name adds no clarity over\nthe inline expression.\n\n### `Result<T, MyError>` (do not \"simplify\" to `Box<dyn Error>`)\n\nThe \"simplify the error type\" instinct is *backward*\ndirection. Typed errors at API boundaries are correct;\nboxed dynamic errors are tutorial code.\n\n**Rule**: never replace a typed error with `Box<dyn Error>`\nor `anyhow::Error` in a public library API as part of a\nslop sweep. That is an API-design decision, not a cleanup.\n\n## Class 3: Files that must not be touched\n\n### Generated code\n\n```\nbuild.rs output\nprost/tonic generated modules\nbindgen output\nserde_derive/serde_json schemas\nGraphQL codegen\nOpenAPI/Swagger codegen\nprotoc output\n```\n\nGenerated code follows the conventions of its generator.\nIt often looks bloated by human-written-code standards\nbecause the generator is conservative. Editing it is\npointless: the next regeneration overwrites the changes.\n\n**Rule**: detect generated code by header comment (\"DO NOT\nEDIT\", \"AUTOMATICALLY GENERATED\", or generator-specific\nmarkers) or by directory convention (`target/`,\n`generated/`, `gen/`, `__generated__/`). Exclude from\nall slop scans.\n\n### Vendored / third-party code\n\nCode copied from another project (with attribution)\nfollows the upstream's conventions. Reformatting it to\nmatch local style breaks the ability to diff against\nupstream for security updates.\n\n**Rule**: directories named `vendor/`, `third_party/`,\n`thirdparty/`, or `external/` are excluded from style\nsweeps.\n\n### Historical changelog entries\n\n```\n## [1.2.0] - 2024-03-15\n\n- Added `parse_json` function with `comprehensive` error\n  reporting.   <-- \"comprehensive\" is slop in new prose,\n                   but this is a historical artifact.\n```\n\nPast releases are immutable. Editing changelog entries\nrewrites history readers may have relied on (vendor\nSBOMs, audit trails, blog-post backreferences).\n\n**Rule**: anything before the `## [Unreleased]` header\nin a CHANGELOG file is read-only.\n\n### Migration scripts and historical fixtures\n\nA test fixture that contains slop *because the original\ninput was sloppy* is correct as-is. The test exists to\nprove the parser handles real-world slop, and \"fixing\"\nthe fixture removes the very thing under test.\n\n**Rule**: directories named `fixtures/`, `golden/`,\n`testdata/`, `examples/` (when used as test inputs) are\nexcluded from prose sweeps.\n\n## Class 4: Patterns that look generated but are not\n\n### Section headings that follow a template\n\n```\n## Installation\n## Usage\n## Configuration\n## API Reference\n## Contributing\n## License\n```\n\nThese look formulaic because every README has them. They\nare not slop: they are the convention. Removing them\nbecause they are predictable would make the README harder\nto navigate, not easier.\n\n**Rule**: structural conventions (canonical README\nsections, standard rustdoc sections like `# Examples` /\n`# Errors` / `# Panics`, conventional commit prefixes) are\nnot slop. Flag only when content *inside* the section\nviolates a rule.\n\n### Em-dash density in narrative writing\n\n§2.3 flags em-dash density >3 per 500 words as a signal.\nThis is a *heuristic*, not a rule. A novelist or essayist\nwho uses em dashes deliberately for rhythm is not\ngenerating AI text.\n\n**Rule**: em-dash density flags require human review\nbefore edits. In narrative or literary genres, leave the\nem dashes alone unless other signals also fire.\n\n## Class 5: When a finding is \"low confidence\"\n\nThe slop-detector should never auto-apply low-confidence\nfixes. From the structured-finding format in §10:\n\n> The agent should **not** silently apply low-confidence\n> fixes; surface them as findings with `confidence: low`\n> and let a human decide.\n\nCategories that default to `confidence: low`:\n\n- Premature abstraction (§4.9): impossible to prove an\n  abstraction is wrong without knowing future use.\n- Generic name slop (§4.10): \"Manager\" is wrong in some\n  domains and exactly right in others.\n- Bullet-list-bloat: the right number of bullets depends\n  on whether the content is actually enumerable.\n- Em-dash density in narrative.\n- Anything in `examples/` or under a `// AI-generated:\n  do not delete` marker.\n\n## Override mechanism\n\nFor unavoidable false positives, projects should support\ninline ignore markers:\n\n```html\n<!-- slop-detector:ignore-next-line vocabulary -->\nThe comprehensive integration tests cover ...\n\n<!-- slop-detector:ignore-block start -->\n[block of intentionally-formulaic content]\n<!-- slop-detector:ignore-block end -->\n```\n\n```rust\n// slop-detector:allow(needless_clone)\nlet owned = borrowed.clone();\n```\n\nThese are escape hatches, not silencers. Each ignore\nmarker should explain *why* in a trailing comment:\n\n```html\n<!-- slop-detector:ignore-next-line vocabulary\n     reason: \"comprehensive\" is the documented test-suite\n     name; renaming it breaks external references -->\n```\n\nWithout the rationale, the ignore is itself a defect.\n\nFile v1.9.17:modules/ci-integration.md\n\n---\nmodule: ci-integration\ncategory: automation\ndependencies: [Bash]\nestimated_tokens: 500\n---\n\n# CI Integration\n\nUse the `--ci` flag to produce machine-readable output and exit with a non-zero code when\nslop density exceeds a threshold. Intended for use in GitHub Actions and pre-commit hooks.\n\n## Flags\n\n| Flag | Default | Description |\n|------|---------|-------------|\n| `--ci` | off | Emit JSON output instead of the markdown report |\n| `--threshold <float>` | `3.0` | Score above which the run fails (exit code 1) |\n\n## JSON Output Schema\n\nWhen `--ci` is set, write a single JSON object to stdout:\n\n```json\n{\n  \"files\": [\n    {\n      \"path\": \"docs/guide.md\",\n      \"score\": 2.4,\n      \"rating\": \"Light\",\n      \"markers\": 7\n    }\n  ],\n  \"summary\": {\n    \"total_files\": 1,\n    \"avg_score\": 2.4,\n    \"max_score\": 2.4,\n    \"pass\": true\n  }\n}\n```\n\n### Field Definitions\n\n| Field | Type | Description |\n|-------|------|-------------|\n| `files[].path` | str | Path to the scanned file (relative to repo root) |\n| `files[].score` | float | Slop density score (0–10+) |\n| `files[].rating` | str | One of: Clean, Light, Moderate, Heavy |\n| `files[].markers` | int | Total marker count in the file |\n| `summary.total_files` | int | Number of files scanned |\n| `summary.avg_score` | float | Mean score across all files |\n| `summary.max_score` | float | Highest score across all files |\n| `summary.pass` | bool | True when max_score <= threshold |\n\n## Exit Codes\n\n| Code | Meaning |\n|------|---------|\n| 0 | All files pass (max_score <= threshold) |\n| 1 | One or more files exceed the threshold |\n| 2 | Execution error (file not found, parse failure, etc.) |\n\n## Instructions for Claude\n\nWhen `--ci` appears in the invocation:\n\n1. Run the full detection workflow as normal.\n2. Collect per-file results: path, score, rating, marker count.\n3. Compute summary fields: total_files, avg_score (round to 2 decimal places), max_score.\n4. Set `pass` to `true` when `max_score <= threshold`, `false` otherwise.\n5. Write the JSON object to stdout. Do not write the markdown report.\n6. Report exit code 1 if `pass` is false, 0 if true, 2 on any error.\n\nDo not mix prose with the JSON output. The JSON must be the only content on stdout so\nit can be parsed by downstream tools.\n\n## GitHub Actions Example\n\n```yaml\n- name: Slop check\n  run: |\n    result=$(claude -p \"Skill(scribe:slop-detector) --ci --threshold 3.0 docs/\")\n    echo \"$result\" | jq .\n    pass=$(echo \"$result\" | jq -r '.summary.pass')\n    if [ \"$pass\" != \"true\" ]; then\n      echo \"Slop threshold exceeded\" >&2\n      exit 1\n    fi\n```\n\n## Pre-commit Hook Example\n\n```yaml\n# .pre-commit-config.yaml\n- repo: local\n  hooks:\n    - id: slop-check\n      name: Slop density check\n      language: system\n      entry: bash -c 'claude -p \"Skill(scribe:slop-detector) --ci --threshold 3.0\" \"$@\"'\n      types: [markdown]\n      pass_filenames: true\n```\n\nFile v1.9.17:modules/cleanup-workflow.md\n\n---\nmodule: cleanup-workflow\ncategory: methodology\ndependencies: [Read, Grep, Bash]\nestimated_tokens: 700\n---\n\n# Cleanup Workflow\n\n**Run passes in order. Each pass is independent. Commit\nbetween passes. Prefer deletion over rewriting.**\n\nThis module gives the multi-pass cleanup methodology. The\norder matters: each pass assumes the prior passes have\nlanded. Mixing concerns within a pass produces diffs that\nno reviewer can audit.\n\n## The cardinal rules\n\n1. **One pass per commit.** A commit titled \"cleanup\"\n   that touches comments, prose, error handling, and\n   tests is not reviewable. Split.\n2. **Deletion beats rewriting.** When in doubt, remove\n   the material. AI slop is additive; the cheapest\n   correct fix is almost always to take material away.\n3. **Cleanup decisions on a compromised baseline are\n   themselves compromised.** Run Pass 0 first.\n4. **Do not silently apply low-confidence fixes.** Surface\n   them as findings, let a human decide (see\n   `anti-goals.md`).\n5. **Stop when a pass finds nothing.** Do not invent work\n   to fill the pass.\n\n## Pass 0: Pre-slop sweep (always first)\n\nBefore any cleanup, audit for things that should not be\nin the repo at all:\n\n- Committed agent-config files (`CLAUDE.md`, `.cursorrules`,\n  `AGENTS.md`, `.codex/config.toml`, `.aider.conf.yml`,\n  etc.) with secrets or broad capability grants.\n- Committed credentials (run `gitleaks` / `trufflehog`).\n- Untrusted MCP server entries.\n- Hooks that auto-execute on session start.\n\nCommit any redactions or revocations *before* any other\ncleanup, since later passes assume an uncompromised\nbaseline.\n\n```bash\n# Pre-slop sweep checklist\ngitleaks detect --no-banner\nls -la | grep -E '^.*(CLAUDE|cursor|codex|aider|kiro)'\nfind . -name '.mcp' -o -name 'mcp.json' -type f\n```\n\n## Pass 1: Surface lint sweep\n\nRun the cheap automated detectors. Fix or delete what\nthey flag. This is the floor, not the ceiling.\n\n```bash\n# Linter floor\n[language-specific formatter] --check\n[language-specific linter] --strict\n\n# Dependency hygiene\n[unused-dep detector]\n[vulnerability scanner]\n```\n\nCommit. If your linter supports an \"no escape hatches\"\nrule (e.g. `allow_attributes = \"deny\"` in Rust clippy),\nenable it. it prevents the most common AI-agent dodge:\nsilencing a lint with `#[allow(...)]` instead of fixing\nthe underlying code.\n\n## Pass 2: Hallucination sweep\n\nRun `Skill(scribe:slop-detector)` module\n`hallucination-detection.md`:\n\n- Every quoted identifier in prose: does it exist?\n- Every backticked file path: does it exist?\n- Every cited URL: does it 200?\n- Every recommended package install: does it resolve on\n  the relevant registry?\n- Every config key in docs: does the code read it?\n\nThen run module `stub-and-deferral.md`:\n\n- Every TODO/FIXME/XXX/HACK: is there a tracked issue\n  link, or is the surrounding code path defunct?\n- Every `// for now`, `// placeholder`, `// dummy`: same\n  question.\n- Every `todo!()` / `unimplemented!()` /\n  `NotImplementedError`: is this reachable from a public\n  API?\n\nResolve, link, or delete. Commit per category.\n\n## Pass 3: Identity & voice leaks\n\nRun module `identity-and-voice-leaks.md`:\n\n- **P0. identity leaks**: any \"as a large language model\",\n  \"as of my training cutoff\", etc.; delete on sight.\n- **Conversational voice leaks**: \"Hope this helps!\",\n  \"Great question!\", \"Sure!\" outside transcript blocks;\n  delete the phrase, keep substance.\n- **Self-narration of structure**: \"In this section, we\n  will cover...\"; strip framing, start at content.\n\nThis pass is small but high-priority. Identity leaks in\nparticular fail review independent of any other score.\n\n## Pass 4: Comment slop\n\nWalk every code comment and doc comment. For each, ask:\n*does this convey information not present in the code,\nnames, or signatures?* If no, delete.\n\nFor doc comments specifically (docstrings, `///`, `//!`,\nJSDoc, etc.), enforce the docstring/implementation ratio:\n\n| Ratio (doc lines / impl lines) | Action |\n|---|---|\n| >= 2.0 | CRITICAL: almost certainly slop; trim or rewrite |\n| >= 1.0 | warning; investigate |\n| ~ 0.5 | acceptable for public API |\n| < 0.5 | balanced or code-heavy; usually fine |\n\nTrivial helpers should often have *no* doc comment at all\n— the function name and signature is the spec. See\n`anti-goals.md` Class 1 for what to keep.\n\nCommit.\n\n## Pass 5: Prose slop in markdown & docstrings\n\nWalk every `*.md` and every multi-line doc-comment block.\nApply:\n\n- `vocabulary-patterns.md`. tier-1 banned words and\n  phrases.\n- `structural-patterns.md`. em dashes, bullet ratio,\n  paragraph blockiness.\n- `document-economy.md`. thesis-first, sentence weight,\n  repetition rule, reader-time budget.\n- `evidence-backed-claims.md`. every quality claim\n  points to repo evidence.\n\nStrike banned vocabulary, verify quality claims, remove\nemoji from headers, flatten over-deep heading trees.\nCommit per category.\n\n## Pass 6: Code idiom sweep\n\nApply the language-specific anti-pattern modules. For\nRust, see `pensive:rust-review` (this scribe skill\ndelegates code idiom checks to that plugin). For Python,\nsee `parseltongue:python-pro`. For shell, see\n`pensive:shell-review`.\n\nCalibrate by model: per the 2025-26 cross-evaluation\nresearch, GPT-family-generated code has more concurrency\nmistakes; Claude-family-generated code has more\nomissions. Weight your audit accordingly.\n\nCommit per category, not per file.\n\n## Pass 7: Architecture slop\n\nThis is the highest-judgment pass and the most prone to\nover-correction. See `anti-goals.md` Class 2 for what\n*not* to flatten.\n\nLook for:\n- Traits with one implementor, not used as `dyn`, not\n  used for mocking, not exported.\n- \"Manager\" / \"Handler\" / \"Service\" structs that own one\n  method.\n- Builder patterns for structs with two fields.\n- Layered structures where each layer just delegates one\n  method to the next.\n- An error enum with 12 variants, three of which are ever\n  constructed (but see anti-goals: do not collapse public\n  variants).\n\nPrefer to leave a borderline abstraction in place rather\nthan delete one that turns out to be load-bearing. Commit.\n\n## Pass 8: Test slop\n\nApply `tests/` audit:\n\n- Tautological tests (`assert!(s.is_some())` after\n  `Foo::new() -> Foo`).\n- Tests that re-implement the function under test in the\n  assertion.\n- Mock-everything tests that prove only that orchestration\n  calls the orchestrator.\n- Snapshot tests on data with no semantic meaning.\n- `#[ignore]` tests with no comment.\n- One giant `test_everything()` asserting 30 unrelated\n  things.\n\nWhere pure functions are under-covered, prefer property-\nbased tests (`hypothesis`/`proptest`/`quickcheck`) and\ngolden-file tests for serializers. Both resist the \"test\nmirrors implementation\" failure mode.\n\nRun mutation testing if available: it is the cheapest\nway to expose tests that pattern-match correctly but\ncatch nothing.\n\nCommit.\n\n## Pass 9: README and public docs\n\nApply `evidence-backed-claims.md` strictly. The README\nshould open with:\n\n1. One sentence: what it is.\n2. Minimal working example (5-15 lines, runnable).\n3. Install instruction.\n\nThen features, configuration, contributing, etc. Move\ndeep API documentation to docs.rs / readthedocs / wiki.\nStrip emoji from headers. Verify badges resolve and are\ngreen.\n\nCommit.\n\n## Pass 10: Establish guardrails\n\nThe cleanup is incomplete without preventing the slop\nfrom coming back. Add:\n\n- A `CONSTITUTION.md` (or equivalent project rules file)\n  with immutable rules the AI and contributors must\n  respect (see `evidence-backed-claims.md` for the\n  pattern).\n- Strict linter configuration in the build config\n  (e.g. `[lints.clippy]` block in `Cargo.toml`).\n- A CI step running the slop-detector on changed prose\n  files.\n- Pre-commit hooks running the cheap detectors locally.\n\nCommit. This is what prevents the slop you just removed\nfrom coming back next sprint.\n\n## Order rationale\n\nWhy this order specifically:\n\n1. Pass 0 (pre-slop sweep) before everything because\n   cleanup decisions on compromised baselines are\n   themselves compromised.\n2. Pass 1 (surface lint) before anything semantic because\n   the linter is the cheapest signal and clears the\n   trivial finds.\n3. Pass 2 (hallucination & stubs) before prose work\n   because polishing text that is wrong about the world\n   is wasted polish.\n4. Pass 3 (identity leaks) early because it is small,\n   high-severity, and pattern-matchable.\n5. Passes 4-5 (comments and prose) before code idiom\n   because comment removal often makes code idiom issues\n   visible.\n6. Pass 6 (code idiom) before architecture because\n   localized fixes inform whether structural patterns\n   are real.\n7. Pass 7 (architecture) before tests because architecture\n   churn changes which tests matter.\n8. Pass 8 (tests) before README because final test\n   coverage informs what claims the README can make.\n9. Pass 9 (README) last among content passes because it\n   is downstream of everything else.\n10. Pass 10 (guardrails) closes the loop.\n\n## Stopping rule\n\nStop when a pass finds nothing. Do not invent work to\nfill the pass. The slop sweep is a *removal* operation;\n\"nothing to remove\" is success, not failure.\n\nIf consecutive passes find nothing, the cleanup is done.\nCommit, push, and let it land.\n\nFile v1.9.17:modules/config-file.md\n\n---\nmodule: config-file\ncategory: configuration\ndependencies: [Read]\nestimated_tokens: 600\n---\n\n# Config File Support\n\nLoad a `.slop-config.yaml` file to adjust detection behavior for the current project.\n\n## Discovery\n\nWalk up the directory tree from the target file toward the repo root. Stop at the first `.slop-config.yaml` found. If none exists, use built-in defaults.\n\n```\ntarget file: /project/docs/guide.md\ncheck:       /project/docs/.slop-config.yaml\ncheck:       /project/.slop-config.yaml      <- found, use this\ncheck:       /.slop-config.yaml              (would stop here at repo root)\n```\n\nTo find the repo root, check for a `.git` directory while walking up.\n\n## YAML Schema\n\n```yaml\n# .slop-config.yaml\n\n# Extra words treated as tier-1 markers (score: 3 each)\ncustom_words:\n  tier1:\n    - synergize\n    - ideate\n  tier2:\n    - impactful\n    - learnings\n\n# Words to skip during detection (exact match, case-insensitive)\nallowlist:\n  - robust      # used correctly in our engineering specs\n  - leverage    # used correctly in our physics docs\n\n# Score thresholds (warn < error required)\nthresholds:\n  warn: 2.0     # flag for review\n  error: 5.0    # fail CI check\n\n# Glob patterns for files to skip entirely\nexclude_patterns:\n  - \"vendor/**\"\n  - \"**/*.generated.md\"\n  - \"CHANGELOG.md\"\n\n# Inherit from a base config, then apply overrides above\nextends: \"../../.slop-config.yaml\"\n```\n\n### Field Reference\n\n| Field | Type | Default | Description |\n|-------|------|---------|-------------|\n| `custom_words.tier1` | list[str] | `[]` | Additional tier-1 words (score 3 each) |\n| `custom_words.tier2` | list[str] | `[]` | Additional tier-2 words (score 2 each) |\n| `allowlist` | list[str] | `[]` | Words to ignore during detection |\n| `thresholds.warn` | float | `2.0` | Score at which to warn |\n| `thresholds.error` | float | `5.0` | Score at which to fail |\n| `exclude_patterns` | list[str] | `[]` | Glob patterns for files to skip |\n| `extends` | str | none | Path to a base config to inherit from |\n\n## Loading Procedure\n\n1. Walk directories from target file up to repo root, collecting any `.slop-config.yaml` files found.\n2. If `extends` is set in a config, load that base config first.\n3. Merge: base config values are the defaults; the child config overrides them.\n4. For list fields (`custom_words.tier1`, `allowlist`, etc.), merge lists rather than replace.\n5. Validate that `thresholds.warn < thresholds.error`. If not, warn and use built-in defaults.\n\n## Merging Custom Words with Built-in Patterns\n\nAfter loading the config:\n\n- Append `custom_words.tier1` to the built-in TIER1 word list before scanning.\n- Append `custom_words.tier2` to the built-in TIER2 word list before scanning.\n- After each match, check if the matched word appears in the `allowlist`. If so, discard the match.\n\nThe allowlist check is case-insensitive and applied per-match, not per-word-list.\n\n## Exclude Pattern Matching\n\nBefore scanning a file, check its path against each pattern in `exclude_patterns` using `fnmatch`. If any pattern matches, skip the file and report it as excluded.\n\n```python\nimport fnmatch\n\ndef is_excluded(file_path: str, patterns: list) -> bool:\n    for pattern in patterns:\n        if fnmatch.fnmatch(file_path, pattern):\n            return True\n    return False\n```\n\n## Reporting\n\nWhen a config file is active, include it in the report header:\n\n```\nConfig: /project/.slop-config.yaml\nAllowlist: robust, leverage (2 words)\nCustom tier-1: synergize, ideate (2 words)\nThresholds: warn=2.0, error=5.0\n```\n\nFile v1.9.17:modules/document-economy.md\n\n---\nmodule: document-economy\ncategory: detection\ndependencies: [Read, Grep]\nestimated_tokens: 600\n---\n\n# Document Economy\n\n**A document costs the sum of its readers' time. Earn that\ncost or cut.**\n\nThis module adds **document-level** checks to the slop\ndetector. The other modules score sentences and words; this\none scores whether the document earns its existence at all.\n\n## When to apply\n\nRun this check on any document that will be read more than\nonce or by more than one person. Skip it for ephemeral\n1:1 messages where a brain dump is fine.\n\nThe principle is invariant: writing time should scale with\ntotal reader time. A 1:1 note absorbs no one else's hours,\nso optimize for your throughput. A skill file loaded 50×\nper day absorbs hours of reader-time per week, so optimize\nfor theirs.\n\n## The three checks\n\n### Check 1: Thesis-first\n\nThe first paragraph (or, for SKILL files, the activation\ncue plus the first paragraph after the H1) must state the\nsingle message you want the reader to walk away with.\n\nA thesis is not a topic.\n\n| Topic (weak) | Thesis (strong) |\n|---|---|\n| \"This skill detects slop.\" | \"Slop is a density problem, not a word problem.\" |\n| \"How to write tutorials.\" | \"A tutorial moves a reader from cannot to can. Everything else is decoration.\" |\n| \"Code review checklist.\" | \"Review for the bug you would ship, not the style you would prefer.\" |\n\n**Failure modes:**\n\n- \"This document covers X, Y, and Z.\" That is a table of\n  contents. It tells the reader what is in the document,\n  not what to take from it.\n- Burying the takeaway after 200 lines of context.\n- Three competing theses fighting for the lead. Pick one.\n\n**Fix:** rewrite the lead until you can highlight one\nsentence and say \"if the reader only reads this, the\ndocument succeeded.\"\n\n### Check 2: Sentence weight\n\nEvery sentence must do one of:\n\n1. State the thesis.\n2. Instance the thesis (a concrete example of it).\n3. Bound the thesis (when it does not apply).\n4. Repeat the thesis (allowed, see Check 3).\n\nSentences that do none of those four are bloat. Cut them.\n\n**Common bloat patterns:**\n\n- \"It's also worth noting that...\" — if it is worth\n  noting, note it. Drop the throat-clear.\n- \"As mentioned above...\" — if you must remind the\n  reader, your structure is wrong.\n- Restating the heading in the body. The heading\n  already said it.\n- Transitional connective tissue (\"Now that we have\n  covered X, let us turn to Y\"). Just turn to Y.\n- \"In summary\" sections that re-list bullets the reader\n  just read.\n\n### Check 3: The repetition rule\n\n**Repeat the thesis. Cut everything else that repeats.**\n\nThe thesis is the message you want internalized. People\nskim. They remember what they see three times. Echo the\nthesis in the intro, in the middle, and at the close.\nVary the surface; hold the meaning.\n\nEverything else that repeats is bloat:\n\n- Restated headers.\n- Multiple examples making the same sub-point. One is\n  proof. Two is emphasis. Three is filler.\n- \"TL;DR\" boxes that duplicate the conclusion.\n- Section summaries that just re-list the section.\n\n## The reader-time budget\n\nEstimate before you write. Then check after.\n\n| Audience | Reads | Time per read | Total budget |\n|---|---|---|---|\n| 1 person, 1:1 | 1 | 2 min | 2 min |\n| 5-person team | 1 | 5 min | 25 min |\n| 50-person org doc | 1 | 5 min | ~4 hours |\n| 50-person skill, loaded daily | ~250/yr | 30 sec | ~10 hours/year |\n| Public skill, 1000 users | varies | 30 sec | days/year |\n\nThe author's writing time should match the budget. If the\nbudget is 10 hours and you spent 30 minutes, you owe more\npolish, more cuts, or both. If the budget is 5 minutes and\nyou spent a week, you over-built; ship and move on.\n\nThis is asymmetric on purpose. Cheap to write, expensive\nto read is the failure mode worth catching.\n\n## Scoring rubric\n\nFor each check, score 0-2:\n\n| Score | Thesis-first | Sentence weight | Repetition |\n|---|---|---|---|\n| 0 | No identifiable thesis | <50% sentences earn weight | No thesis repetition; ambient repetition |\n| 1 | Thesis present but buried or diluted | 50-80% earn weight | Some thesis repetition; some ambient |\n| 2 | Thesis stated in lead, single and clear | >80% earn weight | Thesis repeated 3+ times; ambient cut |\n\n**Document economy score: sum / 6.**\n\n| Score | Action |\n|---|---|\n| 5-6 | Ship |\n| 3-4 | Revise: identify the cuts |\n| 0-2 | Restart from the thesis |\n\nA document can have a clean sentence-level slop score\n(0-1.0) and still score 0/6 here. Sentence cleanliness\nis necessary, not sufficient.\n\n## Worked example\n\n**Before** (score: 1/6):\n\n> # Logging Configuration Guide\n>\n> This document covers the various aspects of configuring\n> logging in our system. Logging is an important part of\n> any production application. There are many ways to\n> configure logging and this guide will walk you through\n> them. We will look at log levels, log destinations, log\n> formatting, and log rotation. By the end of this guide\n> you will understand how to configure logging.\n>\n> ## Log Levels\n>\n> Log levels are used to indicate the severity of a log\n> message. There are several log levels you can use. The\n> log levels are DEBUG, INFO, WARN, ERROR, and FATAL.\n> [...]\n\nProblems:\n- No thesis, only a topic (\"covers various aspects\").\n- \"Logging is important\" carries no information.\n- The \"we will look at\" sentence is a TOC.\n- \"By the end of this guide\" is filler.\n- The Log Levels section restates the heading.\n\n**After** (score: 5/6):\n\n> # Logging Configuration\n>\n> **Log what you would page someone for. Drop the rest.**\n>\n> Most logging configuration time is spent suppressing\n> noise from libraries you do not own. The defaults below\n> bias toward silence; raise the volume only for the code\n> you would actually wake up to debug.\n>\n> ## Log levels\n>\n> Use INFO for events you would mention in a postmortem.\n> Use WARN for events that should not happen but did not\n> break anything. Use ERROR for events that broke something\n> a user could see. DEBUG and FATAL are mostly traps:\n> DEBUG ships verbose noise to production, FATAL implies\n> the process should die but rarely does.\n> [...]\n\nThe thesis (\"log what you would page someone for\") shows\nup in the lead, frames the level explanations, and would\nrecur in destinations and rotation sections.\n\n## Integration\n\nThe full slop-detector pipeline now runs:\n\n1. Sentence-level scoring (vocabulary, structure, sycophancy)\n2. **Document-economy scoring (this module)**\n3. Combined report\n\nA document passes only when both layers pass. Sentence\nslop is necessary; document economy is sufficient.\n\nFile v1.9.17:modules/empirical-baseline.md\n\n---\nmodule: empirical-baseline\ncategory: reference\ndependencies: [Read]\nestimated_tokens: 600\n---\n\n# Empirical Baseline (2025-Q1 2026)\n\n**Treat AI-generated artifacts as unreviewed contractor\nwork, not as junior-developer work.** The cross-study\nrecord is unambiguous about which defect classes occur at\nwhich rates; calibrate the cleanup priorities accordingly.\n\nThis module is reference material. Cite from it when a\nfinding's severity needs justification. Re-validate the\nnumbers every six months: the empirical landscape moves\nfast.\n\n## Headline ratios (CodeRabbit, December 2025)\n\nAnalysis of 470 GitHub PRs (320 AI-co-authored, 150\nhuman-only), normalized to issues per 100 PRs with\nPoisson rate ratios.\n\n| Defect class | AI vs. human multiplier |\n|---|---|\n| Total issues | ~1.7x |\n| Critical issues | ~1.4x |\n| Logic / correctness | 1.75x |\n| Algorithm and business logic errors | >2x |\n| Error handling gaps | ~2x |\n| Code readability | >3x |\n| Naming inconsistency | ~2x |\n| Improper password handling | ~2x |\n| Insecure object references | ~2x |\n| Cross-site scripting (XSS) | 2.74x |\n| Insecure deserialization | ~1.8x |\n| Excessive I/O operations | ~8x |\n\n**Cleanup priority implication:** weight logic/correctness,\nerror-handling gaps, readability/naming, and excessive I/O\nchecks more heavily than the average linter would. These\nare the categories where AI-amplified rates are highest.\n\n## Quality and maintainability data\n\nFrom GitClear's analysis of 211M changed lines, 2020-2024:\n\n- **Code duplication**: 5+-line duplicated blocks grew\n  ~8x. In 2024, copy-pasted lines exceeded refactored\n  (moved) lines for the first time on record.\n- **Code churn**: code reverted or rewritten within two\n  weeks rose from a 3.1-3.3% baseline (2021) to 5.7-7.9%\n  (2024-2025).\n- **Refactoring rate**: cleanup-of-existing-code as a\n  share of changed lines collapsed from ~25% (2021) to\n  <10% (2024). AI accelerates \"add new\" while suppressing\n  \"improve existing.\"\n\nFrom METR's July 2025 randomized controlled trial on 16\nexperienced OSS contributors:\n\n- Developers expected a 24% speedup.\n- Developers reported feeling 20% faster.\n- Developers were measurably **19% slower**.\n\n**Cleanup-phase implication**: when an AI agent (or a\nhuman and AI) reports that a module has been cleaned up, do\nnot trust the felt-productivity report. Verify with\nexternal metrics: lint counts, defect counts, test pass\nrates, mutation kill rates.\n\n## Maintainability dominates correctness\n\nFrom Sonar's December 2025 leaderboard analysis across\nGPT-5.2 High, GPT-5.1 High, Gemini 3 Pro, Opus 4.5\nThinking, and Claude Sonnet 4.5:\n\n- 92-96% of detected issues across all models are \"code\n  smells\" (maintainability), not correctness.\n\n**Implication**: the cleanup payoff is heaviest in\nreadability, structure, and dead-code removal: not in\ncorrectness fixes. Optimize the slop-detector for those\ncategories.\n\n## Model-specific failure patterns\n\nFrom Sonar's evaluation work, also Q4 2025:\n\n| Model | Distinctive failure mode |\n|---|---|\n| GPT-5.2 High | ~470 concurrency issues per MLOC (2x next-closest, 6x Gemini 3 Pro). Expect Send/Sync mistakes, MutexGuard-across-await, broken channel patterns. |\n| Claude Sonnet 4.5 | ~195 resource-management leaks per MLOC (~4x GPT-5.1). 198 blocker-severity vulns per MLOC (vs 44 for Opus 4.5 Thinking). Expect file/socket lifetime mistakes, missed Drop ordering, path-traversal-class flaws. |\n| Gemini 3 Pro | ~200 control-flow mistakes per MLOC, ~4x Opus 4.5 Thinking. Expect incorrect match arms, off-by-one loops, missed early returns. |\n| Opus 4.5 Thinking | Best on security (44 blocker vulns/MLOC) but tends toward verbose, abstraction-heavy code. |\n\n**General correlation Sonar identified**: as models reason\nharder (\"Thinking\" / \"High\"), outputs grow more verbose\nand more cyclomatically complex. The cleanup burden\nscales with reasoning depth, not just code volume.\n\n## Hallucination patterns by model family\n\nFrom cross-evaluation work (Anthropic and DEV.to community\nbenchmarks, Q1 2026):\n\n| Family | Tendency |\n|---|---|\n| GPT-5.x | **Fabricates**: invents function names, library methods, config keys, API endpoints that look plausible but do not exist. Verify every `use`/`import`, every dep, every method, every config flag. |\n| Claude 4.x | **Omits**: silently skips edge cases, drops a match arm, leaves None-paths unhandled. Errors of omission are easier to find in review than confident fabrications, but more likely to slip through tests that mirror the implementation. |\n| Both | Produce plausible doc comments that paraphrase the function name without adding information. |\n\n**Implication for the slop-detector audit**:\n\n- For Claude-generated code: weight toward incomplete\n  match arms, missing error paths, skipped edge cases.\n- For GPT-generated code: weight toward fabricated\n  identifiers, made-up clippy/lint names, hallucinated\n  crate/package names, and concurrency mistakes.\n\nIf you cannot tell which model generated a region, run\nthe full audit. It is never wrong, just sometimes\nredundant.\n\n## Security baseline\n\nFrom Veracode's 2025 GenAI Code Security Report,\nre-tested March 2026:\n\n- **45%** of AI-generated code samples on\n  security-sensitive tasks fail OWASP Top 10 tests.\n- **86%** failed XSS-defense tasks.\n- **88%** failed log-injection defense.\n- The pass rate has not improved across multiple testing\n  cycles.\n\nFrom Apiiro's Fortune-50 enterprise study (Dec 2024 -\nJun 2025):\n\n- AI-assisted developers commit code at **3-4x** their\n  non-AI peer rate.\n- Their monthly *security findings* rose **~10x**.\n- A **153% increase** in design-level security flaws\n  specifically (auth bypasses, IDOR, missing\n  trust-boundary validation, broken session management)\n flaws line-level patches cannot fix.\n\nFrom Trend Micro's TrendAI report (March 2026):\n\n- AI-related CVEs reached **4.42% of all CVEs in 2025**\n  (up 34.6% YoY).\n- 2,130 AI CVEs disclosed in 2025 alone.\n- 26.2% of scored AI CVEs are high-severity.\n- Includes the **slopsquatting** attack class: adversaries\n  registering hallucinated package names that AI tools\n  recommend.\n\n**Implication**: the slop-detector should treat unverified\npackage recommendations as critical findings (see\n`hallucination-detection.md` Class 2).\n\n## What this baseline does *not* mean\n\nThese are important so the data does not produce its own\nbad cleanup decisions:\n\n1. **It does not mean AI code is always worse than human\n   code.** GitClear's January 2026 follow-up using direct\n   API integration found a substantial productivity\n   multiplier for \"Power Users\" of AI tools. The\n   defect/duplication pr\n\nArchive v1.9.16: 20 files, 73298 bytes\n\nFiles: modules/anti-goals.md (8997b), modules/ci-integration.md (2887b), modules/cleanup-workflow.md (9184b), modules/config-file.md (3524b), modules/document-economy.md (6561b), modules/empirical-baseline.md (8768b), modules/evidence-backed-claims.md (7198b), modules/fiction-patterns.md (4570b), modules/hallucination-detection.md (6973b), modules/identity-and-voice-leaks.md (7619b), modules/language-handling.md (5275b), modules/remediation-strategies.md (9473b), modules/reporting.md (4733b), modules/structural-patterns.md (15723b), modules/structured-finding-output.md (8231b), modules/stub-and-deferral.md (5617b), modules/vocabulary-patterns.md (17805b), skill-card.md (2824b), SKILL.md (17899b), _meta.json (143b)\n\nArchive v1.9.14: 20 files, 73206 bytes\n\nFiles: modules/anti-goals.md (8997b), modules/ci-integration.md (2887b), modules/cleanup-workflow.md (9184b), modules/config-file.md (3524b), modules/document-economy.md (6561b), modules/empirical-baseline.md (8768b), modules/evidence-backed-claims.md (7198b), modules/fiction-patterns.md (4570b), modules/hallucination-detection.md (6973b), modules/identity-and-voice-leaks.md (7619b), modules/language-handling.md (5275b), modules/remediation-strategies.md (9473b), modules/reporting.md (4733b), modules/structural-patterns.md (15723b), modules/structured-finding-output.md (8231b), modules/stub-and-deferral.md (5617b), modules/vocabulary-patterns.md (17805b), skill-card.md (2663b), SKILL.md (17899b), _meta.json (143b)\n\nArchive v1.9.13: 20 files, 73053 bytes\n\nFiles: modules/anti-goals.md (8997b), modules/ci-integration.md (2887b), modules/cleanup-workflow.md (9184b), modules/config-file.md (3524b), modules/document-economy.md (6561b), modules/empirical-baseline.md (8768b), modules/evidence-backed-claims.md (7198b), modules/fiction-patterns.md (4570b), modules/hallucination-detection.md (6973b), modules/identity-and-voice-leaks.md (7619b), modules/language-handling.md (5275b), modules/remediation-strategies.md (9473b), modules/reporting.md (4733b), modules/structural-patterns.md (15723b), modules/structured-finding-output.md (8231b), modules/stub-and-deferral.md (5617b), modules/vocabulary-patterns.md (17805b), skill-card.md (2350b), SKILL.md (17899b), _meta.json (143b)\n\nArchive v1.9.12: 20 files, 73112 bytes\n\nFiles: modules/anti-goals.md (8997b), modules/ci-integration.md (2887b), modules/cleanup-workflow.md (9184b), modules/config-file.md (3524b), modules/document-economy.md (6561b), modules/empirical-baseline.md (8768b), modules/evidence-backed-claims.md (7198b), modules/fiction-patterns.md (4570b), modules/hallucination-detection.md (6973b), modules/identity-and-voice-leaks.md (7619b), modules/language-handling.md (5275b), modules/remediation-strategies.md (9473b), modules/reporting.md (4733b), modules/structural-patterns.md (15723b), modules/structured-finding-output.md (8231b), modules/stub-and-deferral.md (5617b), modules/vocabulary-patterns.md (17805b), skill-card.md (2428b), SKILL.md (17899b), _meta.json (143b)\n\nArchive v1.0.2: 13 files, 26733 bytes\n\nFiles: modules/ci-integration.md (2887b), modules/config-file.md (3524b), modules/fiction-patterns.md (4570b), modules/i18n-patterns.md (2940b), modules/language-support.md (2286b), modules/metrics.md (2357b), modules/progress-indicators.md (2101b), modules/remediation-strategies.md (5202b), modules/structural-patterns.md (8210b), modules/vocabulary-patterns.md (9670b), skill-card.md (2262b), SKILL.md (7218b), _meta.json (142b)\n\nArchive v1.0.1: 12 files, 25485 bytes\n\nFiles: modules/ci-integration.md (2887b), modules/config-file.md (3524b), modules/fiction-patterns.md (4570b), modules/i18n-patterns.md (2940b), modules/language-support.md (2286b), modules/metrics.md (2357b), modules/progress-indicators.md (2101b), modules/remediation-strategies.md (5202b), modules/structural-patterns.md (8210b), modules/vocabulary-patterns.md (9670b), SKILL.md (7218b), _meta.json (142b)\n\nArchive v1.0.0: 12 files, 25485 bytes\n\nFiles: modules/ci-integration.md (2887b), modules/config-file.md (3524b), modules/fiction-patterns.md (4570b), modules/i18n-patterns.md (2940b), modules/language-support.md (2286b), modules/metrics.md (2357b), modules/progress-indicators.md (2101b), modules/remediation-strategies.md (5202b), modules/structural-patterns.md (8210b), modules/vocabulary-patterns.md (9670b), SKILL.md (7218b), _meta.json (142b)","readmeExcerpt":"Skill: slop-detector Owner: athola Summary: Detects AI-generated writing patterns in prose Tags: latest:1.9.19 Version history: v1.9.19 | 2026-08-26T13:22:04.989Z | user Release v1.9.19 v1.9.17 | 2026-07-30T05:42:01.025Z | user Release v1.9.17 v1.9.16 | 2026-07-14T19:58:50.789Z | user Release v1.9.16 v1.9.14 | 2026-06-30T18:06:29.352Z | user Release v1.9.14 v1.9.13 | 2026-06-27T16:24:12.634Z | user Release v1.9.13 v1","codeSnippets":[],"executableExamples":[{"language":"bash","snippet":"# Count em dashes in file\ngrep -o '—' file.md | wc -l"},{"language":"text","snippet":"slop_score = (tier1_count * 3 + tier2_count * 2 + phrase_count * avg_phrase_score) / word_count * 100"},{"language":"markdown","snippet":"## Slop Detection Report: [filename]\n\n**Overall Score**: X.X / 10 (Rating)\n**Word Count**: N words\n**Markers Found**: N total\n\n### CRITICAL (P0, must resolve before merge)\n- Line 8: \"As a large language model\". IDENTITY LEAK\n- Line 47: References `Client.connect_with_timeout(...)` —\n  HALLUCINATION (method does not exist; closest match is\n  `Client.connect`)\n- Line 102: \"production-ready\" claim with no CI workflow\n . UNVERIFIED CLAIM\n\n### High-Confidence Markers (vocabulary)\n- Line 23: \"delve into\" -> consider: \"explore\"\n- Line 45: \"rich tapestry\" -> consider: \"variety\"\n\n### Structural Issues\n- Em dash density: 8/1000 words (HIGH)\n- Bullet ratio: 72% (ELEVATED)\n- Sentence length SD: 3.2 words (LOW VARIANCE)\n\n### Phrase Patterns\n- Line 12: \"In today's fast-paced world\" (vapid opener)\n- Line 89: \"cannot be overstated\" (empty emphasis)\n- Line 134: \"Let's dive into\" (self-narration of structure)\n\n### Tier 5 / 2026 Patterns\n- Line 19: \"The skill lives in `plugins/scribe/`\" → \"is in\"\n  (spatial copula, inanimate subject)\n- Line 27: \"hooks + skills\" → \"hooks and skills\" (plus-sign\n  conjunction in prose)\n- Line 34: \"It's not a tool, it's a transformation\" →\n  rewrite positively (negative parallelism)\n- Line 56: \"Here's the thing,\" → delete (throat-clearing\n  opener)\n- Line 78: \"Focused. Aligned. Measurable.\" → \"Focused,\n  aligned, and measurable.\" (three-fragment burst)\n- Line 91: 3 smart quotes outside code blocks (Word-processor\n  paste signature)\n\n### Stub & Deferral\n- Line 56: bare `// TODO: handle expired tokens` (no\n  tracked issue link)\n- Line 71: \"for now, we recommend\" (deferral language)\n\n### Document Economy Score: X / 6\n- Thesis-first: 1/2 (thesis present but buried in para 3)\n- Sentence weight: 1/2 (~65% of sentences earn weight)\n- Repetition: 2/2 (thesis echoed; ambient repetition cut)\n\n### Recommendations\n1. **CRITICAL**: delete line 8 identity leak before merge\n2. **CRITICAL**: replace `Client.connect_with_timeout`\n   with `Client.connect(opts)` and update "},{"language":"rust","snippet":"// We sleep 200ms specifically because the upstream\n// rate-limiter buckets at 5/s; faster retries return\n// 429 and waste a slot:\nthread::sleep(Duration::from_millis(200));"},{"language":"rust","snippet":"// SAFETY: the caller has already validated that `idx`\n// is within `slice.len()`; see the bounds check in\n// `Buffer::insert` two frames up:\nunsafe { *slice.as_ptr().add(idx) }"},{"language":"text","snippet":"// SAFETY: ...\n// INVARIANT: ...\n// LOCK ORDER: ...\n// BLOCKING: ...\n// PERFORMANCE: ...\n// SECURITY: ...\n// THREAD: ..."}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: slop-detector\ndescription: Detects AI-generated writing patterns in prose\nversion: 1.9.8\ntriggers:\n  - ai-detection\n  - slop\n  - writing\n  - cleanup\n  - documentation\n  - quality\n  - reviewing docs for slop\n  - vague language\n  - or identity leaks before publishing\nmetadata: {\"openclaw\": {\"homepage\": \"https://github.com/athola/claude-night-market/tree/master/plugins/scribe\", \"emoji\": \"\\u270d\\ufe0f\", \"requires\": {\"config\": [\"night-market.scribe:shared\"]}}}\nsource: claude-night-market\nsource_plugin: scribe\n---\n\n> **Night Market Skill** — ported from [claude-night-market/scribe](https://github.com/athola/claude-night-market/tree/master/plugins/scribe). For the full experience with agents, hooks, and commands, install the Claude Code plugin.\n\n\n# AI Slop Detection\n\n**Slop is a density problem, not a word problem.**\n\nA single \"delve\" is fine. Five \"delves\" near a \"tapestry\"\nand an \"embark\" is generated text. This skill scores\ndensity per 100 words, marker clustering, and whether\nthe overall register fits the document type. It does not\nban words; it flags concentrations.\n\n## Execution Workflow\n\nIdentify target files and classify them as technical docs,\nnarrative prose, or code comments. Classification feeds\ncontext-aware scoring: tier-1 markers in marketing copy\nscore lower than the same markers in API reference.\n\n### Language Detection\n\n- Auto-detect language from text content using function word frequency\n- Override with explicit `--lang` parameter (en, de, fr, es)\n- Load language-specific patterns from `data/languages/{lang}.yaml`\n- Fall back to English if detection confidence is low\n- See `modules/language-handling.md` for cultural calibration and concrete pattern sets\n\n### Vocabulary and Phrase Detection\n\nLoad: `@modules/vocabulary-patterns.md`\n\nMarkers fall into three confidence tiers. Tier 1 words\n(\"delve\", \"multifaceted\", \"leverage\") appear far more often\nin AI text than human text. Tier 2 covers context-dependent\ntransitions (\"moreover\", \"subsequently\"). Tier 3 covers\nvapid phrases (\"In today's fast-paced world\", \"cannot be\noverstated\").\n\n| Word | Context | Human Alternative |\n|------|---------|-------------------|\n| delve | \"delve into\" | explore, examine, look at |\n| tapestry | \"rich tapestry\" | mix, combination, variety |\n| realm | \"in the realm of\" | in, within, regarding |\n| embark | \"embark on a journey\" | start, begin |\n| beacon | \"a beacon of\" | example, model |\n| spearheaded | formal attribution | led, started |\n| multifaceted | describing complexity | complex, varied |\n| comprehensive | describing scope | thorough, complete |\n| pivotal | importance marker | key, important |\n| nuanced | sophistication signal | subtle, detailed |\n| meticulous/meticulously | care marker | careful, detailed |\n| intricate | complexity marker | detailed, complex |\n| showcasing | display verb | showing, displaying |\n| leveraging | business jargon | using |\n| streamline | optimization verb | simplify, improve |\n\n### Tier 2: Medium-Confidence Markers"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn7d107jg9jv602h9ytsegydq184a42s\",\n  \"slug\": \"nm-scribe-slop-detector\",\n  \"version\": \"1.9.19\",\n  \"publishedAt\": 1787750524989\n}"},{"path":"modules/anti-goals.md","content":"---\nmodule: anti-goals\ncategory: safety\ndependencies: [Read]\nestimated_tokens: 500\n---\n\n# Anti-Goals: What NOT to Clean Up\n\n**Aggressive de-slopping has its own failure modes.**\n\nThis module is the safety rail. Every other module in the\nslop-detector tells you what to flag and remove; this one\ntells you what to *leave alone* even when it pattern-\nmatches. The bar for deletion is higher than the bar for\nflagging.\n\nWhen in doubt: leave it alone, surface it as a finding,\nand let a human decide.\n\n## Class 1: Comments that earn their bytes\n\nThese look like slop on density alone but carry meaning\nthe code does not:\n\n### Why-comments (always keep)\n\nA comment that explains *why* a non-obvious decision was\nmade is the highest-value comment class. The code is the\n\"what\"; comments earn their place by carrying the \"why\".\n\n```rust\n// We sleep 200ms specifically because the upstream\n// rate-limiter buckets at 5/s; faster retries return\n// 429 and waste a slot:\nthread::sleep(Duration::from_millis(200));\n```\n\nThis pattern-matches as a \"magic constant with comment\"\nwhich §3.2 flags as marketing slop, but it is the\n*opposite* of slop: the comment names the constraint that\nmakes the constant correct.\n\n**Rule**: a comment that names a constraint, references an\nupstream contract, or explains a counter-intuitive choice\nis information the code cannot carry. Keep it.\n\n### Safety comments on `unsafe` blocks (always keep)\n\n```rust\n// SAFETY: the caller has already validated that `idx`\n// is within `slice.len()`; see the bounds check in\n// `Buffer::insert` two frames up:\nunsafe { *slice.as_ptr().add(idx) }\n```\n\nThese are *required* by `clippy::undocumented_unsafe_blocks`\nand are part of the contract the code makes with reviewers.\nStripping them removes the only proof the unsafe block is\ncorrect.\n\n### Structured-meaning comment prefixes (always keep)\n\nMany codebases adopt structured prefixes for specific\ncomment classes. Examples:\n\n```\n// SAFETY: ...\n// INVARIANT: ...\n// LOCK ORDER: ...\n// BLOCKING: ...\n// PERFORMANCE: ...\n// SECURITY: ...\n// THREAD: ...\n```\n\nThese are project-specific contracts. They are not slop\neven if they look formulaic: the formula *is* the\ncontract. Audit before stripping; do not strip on pattern\nmatch alone.\n\n### Regression-pinning tests (always keep)\n\nA test that looks trivial (`assert!(parse(\"\").is_err())`)\nmay be pinning a regression. Deleting it because it \"looks\nslop\" is exactly how the regression returns.\n\n**Rule**: tests with bug-tracker references in their name\nor comment (`test_regression_1234`, `// repro for #1234`)\nmust not be removed without an explicit decision that the\nregression class is no longer relevant.\n\n## Class 2: Code that should not be flattened\n\n### `thiserror`-style error variants (do not collapse)\n\n```rust\n#[derive(Error)]\npub enum Error {\n    #[error(\"connection refused\")]\n    ConnectionRefused,\n    #[error(\"timeout after {0}s\")]\n    Timeout(u64),\n    #[error(\"invalid response: {0}\")]\n    InvalidResponse(String),\n    // .."},{"path":"modules/ci-integration.md","content":"---\nmodule: ci-integration\ncategory: automation\ndependencies: [Bash]\nestimated_tokens: 500\n---\n\n# CI Integration\n\nUse the `--ci` flag to produce machine-readable output and exit with a non-zero code when\nslop density exceeds a threshold. Intended for use in GitHub Actions and pre-commit hooks.\n\n## Flags\n\n| Flag | Default | Description |\n|------|---------|-------------|\n| `--ci` | off | Emit JSON output instead of the markdown report |\n| `--threshold <float>` | `3.0` | Score above which the run fails (exit code 1) |\n\n## JSON Output Schema\n\nWhen `--ci` is set, write a single JSON object to stdout:\n\n```json\n{\n  \"files\": [\n    {\n      \"path\": \"docs/guide.md\",\n      \"score\": 2.4,\n      \"rating\": \"Light\",\n      \"markers\": 7\n    }\n  ],\n  \"summary\": {\n    \"total_files\": 1,\n    \"avg_score\": 2.4,\n    \"max_score\": 2.4,\n    \"pass\": true\n  }\n}\n```\n\n### Field Definitions\n\n| Field | Type | Description |\n|-------|------|-------------|\n| `files[].path` | str | Path to the scanned file (relative to repo root) |\n| `files[].score` | float | Slop density score (0–10+) |\n| `files[].rating` | str | One of: Clean, Light, Moderate, Heavy |\n| `files[].markers` | int | Total marker count in the file |\n| `summary.total_files` | int | Number of files scanned |\n| `summary.avg_score` | float | Mean score across all files |\n| `summary.max_score` | float | Highest score across all files |\n| `summary.pass` | bool | True when max_score <= threshold |\n\n## Exit Codes\n\n| Code | Meaning |\n|------|---------|\n| 0 | All files pass (max_score <= threshold) |\n| 1 | One or more files exceed the threshold |\n| 2 | Execution error (file not found, parse failure, etc.) |\n\n## Instructions for Claude\n\nWhen `--ci` appears in the invocation:\n\n1. Run the full detection workflow as normal.\n2. Collect per-file results: path, score, rating, marker count.\n3. Compute summary fields: total_files, avg_score (round to 2 decimal places), max_score.\n4. Set `pass` to `true` when `max_score <= threshold`, `false` otherwise.\n5. Write the JSON object to stdout. Do not write the markdown report.\n6. Report exit code 1 if `pass` is false, 0 if true, 2 on any error.\n\nDo not mix prose with the JSON output. The JSON must be the only content on stdout so\nit can be parsed by downstream tools.\n\n## GitHub Actions Example\n\n```yaml\n- name: Slop check\n  run: |\n    result=$(claude -p \"Skill(scribe:slop-detector) --ci --threshold 3.0 docs/\")\n    echo \"$result\" | jq .\n    pass=$(echo \"$result\" | jq -r '.summary.pass')\n    if [ \"$pass\" != \"true\" ]; then\n      echo \"Slop threshold exceeded\" >&2\n      exit 1\n    fi\n```\n\n## Pre-commit Hook Example\n\n```yaml\n# .pre-commit-config.yaml\n- repo: local\n  hooks:\n    - id: slop-check\n      name: Slop density check\n      language: system\n      entry: bash -c 'claude -p \"Skill(scribe:slop-detector) --ci --threshold 3.0\" \"$@\"'\n      types: [markdown]\n      pass_filenames: true\n```"},{"path":"modules/cleanup-workflow.md","content":"---\nmodule: cleanup-workflow\ncategory: methodology\ndependencies: [Read, Grep, Bash]\nestimated_tokens: 700\n---\n\n# Cleanup Workflow\n\n**Run passes in order. Each pass is independent. Commit\nbetween passes. Prefer deletion over rewriting.**\n\nThis module gives the multi-pass cleanup methodology. The\norder matters: each pass assumes the prior passes have\nlanded. Mixing concerns within a pass produces diffs that\nno reviewer can audit.\n\n## The cardinal rules\n\n1. **One pass per commit.** A commit titled \"cleanup\"\n   that touches comments, prose, error handling, and\n   tests is not reviewable. Split.\n2. **Deletion beats rewriting.** When in doubt, remove\n   the material. AI slop is additive; the cheapest\n   correct fix is almost always to take material away.\n3. **Cleanup decisions on a compromised baseline are\n   themselves compromised.** Run Pass 0 first.\n4. **Do not silently apply low-confidence fixes.** Surface\n   them as findings, let a human decide (see\n   `anti-goals.md`).\n5. **Stop when a pass finds nothing.** Do not invent work\n   to fill the pass.\n\n## Pass 0: Pre-slop sweep (always first)\n\nBefore any cleanup, audit for things that should not be\nin the repo at all:\n\n- Committed agent-config files (`CLAUDE.md`, `.cursorrules`,\n  `AGENTS.md`, `.codex/config.toml`, `.aider.conf.yml`,\n  etc.) with secrets or broad capability grants.\n- Committed credentials (run `gitleaks` / `trufflehog`).\n- Untrusted MCP server entries.\n- Hooks that auto-execute on session start.\n\nCommit any redactions or revocations *before* any other\ncleanup, since later passes assume an uncompromised\nbaseline.\n\n```bash\n# Pre-slop sweep checklist\ngitleaks detect --no-banner\nls -la | grep -E '^.*(CLAUDE|cursor|codex|aider|kiro)'\nfind . -name '.mcp' -o -name 'mcp.json' -type f\n```\n\n## Pass 1: Surface lint sweep\n\nRun the cheap automated detectors. Fix or delete what\nthey flag. This is the floor, not the ceiling.\n\n```bash\n# Linter floor\n[language-specific formatter] --check\n[language-specific linter] --strict\n\n# Dependency hygiene\n[unused-dep detector]\n[vulnerability scanner]\n```\n\nCommit. If your linter supports an \"no escape hatches\"\nrule (e.g. `allow_attributes = \"deny\"` in Rust clippy),\nenable it. it prevents the most common AI-agent dodge:\nsilencing a lint with `#[allow(...)]` instead of fixing\nthe underlying code.\n\n## Pass 2: Hallucination sweep\n\nRun `Skill(scribe:slop-detector)` module\n`hallucination-detection.md`:\n\n- Every quoted identifier in prose: does it exist?\n- Every backticked file path: does it exist?\n- Every cited URL: does it 200?\n- Every recommended package install: does it resolve on\n  the relevant registry?\n- Every config key in docs: does the code read it?\n\nThen run module `stub-and-deferral.md`:\n\n- Every TODO/FIXME/XXX/HACK: is there a tracked issue\n  link, or is the surrounding code path defunct?\n- Every `// for now`, `// placeholder`, `// dummy`: same\n  question.\n- Every `todo!()` / `unimplemented!()` /\n  `NotImplementedError`: is this reachable from a public\n  AP"}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":"Detects AI-generated writing patterns in prose Skill: slop-detector Owner: athola Summary: Detects AI-generated writing patterns in prose Tags: latest:1.9.19 Version history: v1.9.19 | 2026-08-26T13:22:04.989Z | user Release v1.9.19 v1.9.17 | 2026-07-30T05:42:01.025Z | user Release v1.9.17 v1.9.16 | 2026-07-14T19:58:50.789Z | user Release v1.9.16 v1.9.14 | 2026-06-30T18:06:29.352Z | user Release v1.9.14 v1.9.13 | 2026-06-27T16:24:12.634Z | user Release v1.9.13 v1","editorialQuality":{"score":100,"threshold":65,"status":"ready","wordCount":1397,"uniquenessScore":56,"reasons":[]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-10T07:28:33.045Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-10-10T07:28:33.045Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-10T10:56:42.102Z","emptyReason":null},"items":[{"id":"8ebccd8e-3863-4187-8355-c3f14e1f9edf","entityType":"agent","canonicalPath":"/agent/iofficeai-aionui","slug":"iofficeai-aionui","name":"AionUi","description":"Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!","url":"https://github.com/iOfficeAI/AionUi","homepage":"https://www.aionui.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-10-09T19:11:12.944Z","createdAt":"2026-02-25T03:38:16.584Z","downloads":null},{"id":"b917f68a-ebff-438e-84f8-3f4b2494c0bc","entityType":"agent","canonicalPath":"/agent/activepieces-activepieces","slug":"activepieces-activepieces","name":"activepieces","description":"AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents","url":"https://github.com/activepieces/activepieces","homepage":"https://www.activepieces.com","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-15T02:22:12.426Z","createdAt":"2026-02-25T03:38:12.412Z","downloads":null},{"id":"5cb26759-3a39-483f-94cf-276a98c13bb8","entityType":"agent","canonicalPath":"/agent/cherryhq-cherry-studio","slug":"cherryhq-cherry-studio","name":"cherry-studio","description":"AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs","url":"https://github.com/CherryHQ/cherry-studio","homepage":"https://cherry-ai.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-11T14:38:40.986Z","createdAt":"2026-02-25T03:38:19.379Z","downloads":null},{"id":"6f6582d0-5d76-4f0f-b81d-86520247950b","entityType":"agent","canonicalPath":"/agent/copilotkit-copilotkit","slug":"copilotkit-copilotkit","name":"CopilotKit","description":"The Frontend for Agents & Generative UI. React + Angular","url":"https://github.com/CopilotKit/CopilotKit","homepage":"https://docs.copilotkit.ai","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-03-25T09:50:57.846Z","createdAt":"2026-02-25T03:39:14.617Z","downloads":null}],"links":{"hub":"/agent","source":"/agent/source/clawhub","protocols":[{"label":"OpenClaw","href":"/agent/protocol/openclew"}]}}}