⏳ This skill is pending AI review.
Scores will appear once the review pipeline completes.
slopmonster
Review writing for its intended reader, check common AI writing patterns, revise, request a second pass from a different model family, and check again. Trigger on /slopmonster, "humanize this", "de-slop this", "does this sound like AI", "fix this copy".
Choose how to use this skill
You do not need every option. Choose the path your AI client supports. The stable page stays the same; versioned files are immutable.
1. Native installer
This listing has no registered native installer command. Use the complete package or source fallback below, depending on what your client supports.
Do not guess an installer command or replace an existing version without reviewing the diff.
2. Complete package recommended
Download the ZIP when available. It includes SKILL.md plus the references, security notes and version metadata.
No complete ProSkills package is published for this listing yet.3. Prompt-only
Copy the prompt above when the agent can read the stable page or when you want to adopt the workflow without installing a skill.
Need only the instruction file?
Download SKILL.md only if your client requires a single file. The complete ZIP is safer for a full installation because it preserves the references and release context.
No path installs or executes anything by itself. Your agent still needs access to the project files. Before updating, compare the installed version and review the diff.
// RATINGS
Not yet listed on ClawHub or SkillsMP
// README
SlopMonster

SlopMonster checks English writing for common AI writing patterns and provides instructions for editing the draft. Use it on a README, a landing page, an email or a script.
The Python checker reports matches in five categories and gives the text a score out of 5. The editing workflow asks an AI agent to review the draft for its intended reader, revise it, and request another pass from a different model family.
A score of 5/5 means the checker found no scored matches. You still need to review whether the text makes sense, supports its claims and gives the reader what they came for. The previous version of this README passed while using repetitive metaphors and vague contrasts. That exposed a gap in the editing guidance.
Quick start
The checker uses Python 3 and its standard library. It needs no API key or packages to install.
git clone https://github.com/ItsssssJack/SlopMonster
cd SlopMonster
# Check a short draft.
python3 tools/deslop.py --text "It's not just a tool, it's a game-changing journey."
# Scores 3/5 and exits with status 1.
# Check a Markdown file.
python3 tools/deslop.py README.md
# Check text extracted from an HTML file.
python3 tools/deslop.py index.html
Each category with a match costs one point, regardless of how many matches it contains. The command exits with status 0 at 5/5 and status 1 below 5/5. Empty input also fails. Checking a file leaves its contents unchanged.
For Markdown, the checker skips fenced code blocks, inline code, images and struck-through examples. For HTML, it removes tags and script/style contents. It doesn't render the page, so text hidden by CSS can still be included.
Edit a draft
Give your agent SKILL.md and the draft. Include the intended audience and where the writing will appear if those are unclear from the text.
- Run the checker to identify the patterns it recognizes.
- Review the draft's purpose and order. A README should explain the tool and show how to use it. An email should make its reason for writing clear.
- Rewrite unclear or repetitive passages. Check that each sentence adds useful information and that claims match the supplied facts.
- Request a second editing pass from a different model family, then inspect the changes and run the checker again.
The second pass uses prompts/cleanse.txt. With a supported AI command-line tool (CLI) installed and authenticated, run:
# If Claude wrote the draft, use Codex for the second pass.
DESLOP_WRITER=claude tools/cleanse.sh draft.md > cleansed.md
# If GPT wrote the draft, use Claude for the second pass.
DESLOP_WRITER=gpt tools/cleanse.sh draft.md > cleansed.md
# Read the edited file, then check it as Markdown.
python3 tools/deslop.py cleansed.md
Run the command for the family that wrote your draft. The script writes edited copy to standard output and change notes to standard error. It uses the installed CLI's configured model.
If the required CLI is missing, the script prints the editing prompt and draft, then exits with status 127. Paste that output into the other model family's chat. A timeout exits with status 124. Check the exit status before treating the output file as an edited draft. A warning about a missing notes marker means the response may include change notes in the copy.
Using another model provides another editing pass. It doesn't guarantee better writing. Review the result for changed facts and lost context before accepting it.
Use as an agent skill
For Claude Code, copy this folder to ~/.claude/skills/slopmonster/ and invoke
/slopmonster. For Codex or another agent, ask it to follow SKILL.md.
What the checker flags
The current score has five categories:
| Category | What it checks |
|---|---|
| Vocabulary | Listed words such as delve and seamless, including selected word forms. |
| Sentence patterns | Listed constructions such as not just X, but Y, stacked hedges and certain self-answering questions. |
| Punctuation | Repeated em dashes or stacked hyphenated compounds within a 220-character window in a sentence, plus semicolon density. |
| Three-item lists | Two specific list patterns that often occur in promotional copy. |
| Possible unsupported proof | Numbers near nouns such as users or customers. The checker cannot verify the claim. |
The patterns are in tools/deslop.py. The broader editing catalogue is in references/signs-of-ai-writing.md. Some entries in that catalogue require editorial judgment and have no automated check.
If a flagged customer count is accurate and you have evidence for it, use:
python3 tools/deslop.py index.html --allow-proof
This option still reports proof matches but removes their score penalty. It doesn't check the evidence. In this mode, 5/5 can include proof warnings.
Review beyond the score
Read the draft in the context where someone will encounter it. Check these points before accepting an edit:
- Audience and purpose: Does it answer the reader's likely questions at the right level of detail? Explain technical terms where they first matter.
- Opening: Does the first paragraph explain the subject or establish a useful reason to keep reading? Avoid adding a second hook that delays the explanation.
- Progression: Does each sentence build on the previous one? Remove repeated metaphors and contrasts that add no information.
- Claims: Can you support each factual statement? Describe optional behavior with its conditions. For example, a command's failure status only stops a workflow if that workflow is configured to act on it.
- Voice: Does the wording suit the author and format? Contractions are fine where natural. Forced fragments and invented opinions can make the edit worse.
See references/principles.md for more editing guidance and examples. Never add a statistic or testimonial to make a sentence sound specific. If information is missing, flag it for the author.
Limits
The checker uses English patterns and has no language detection. Text in another language can score 5/5 because those patterns don't match.
It can flag ordinary wording and miss poor writing. It cannot determine who wrote the text, verify facts or judge whether a hook suits the audience. Use its findings as prompts for review. A passing score alone doesn't establish writing quality.
Optional CI check
You can run the checker in continuous integration (CI), the automated checks a repository runs when code changes. Because a score below 5/5 returns a failure status, a workflow that runs the command can fail on flagged copy.
This repository's workflow runs the regression tests and checks both this README and a sample file. Copy it to your repository and set the file paths you want checked. Blocking a merge or deployment requires your own repository rules or deployment configuration.
python3 tools/test_deslop.py
bash tools/test_cleanse.sh
python3 tools/deslop.py README.md
Examples and sources
- Jasper homepage excerpt: a recorded editing run with the commands and output from that run. Scores can change as rules change.
- Ridgeline Roofing: a longer worked example with before-and-after copy. Check any business facts before reusing a line.
- Source list: Wikipedia's Signs of AI writing and the open-source humanizer projects used to assemble the catalogue. The marketing guidance also draws on Steve Krug, Daniel Priestley and Alex Hormozi.
// HOW IT'S BUILT
// FILES
22 files shipped with this skill. Inline text is the catalog copy. The upstream link is the source repository.
SKILL.md5.9 KBe3e31e52252dupstream ↗
--- name: slopmonster description: Review writing for its intended reader, check common AI writing patterns, revise, request a second pass from a different model family, and check again. Trigger on /slopmonster, "humanize this", "de-slop this", "does this sound like AI", "fix this copy". --- # SlopMonster Edit the supplied draft for its audience and purpose. The workflow supports READMEs, landing pages, emails and scripts. Use the checker to locate known patterns, then review the writing in context. A score of 5/5 means no scored patterns matched; it does not establish that the copy is clear or accurate. ## Step 1: Establish the context and run the checker Identify the reader, the format and what the reader needs from the text. Use the user's brief and the draft itself. Ask a focused question only when missing context would materially change the edit. A README should explain what the project does, how to use it and its limitations. A sales page may need an opening that establishes a problem. An email may need to start with the request. Choose an approach that fits the document. ```bash python3 tools/deslop.py draft.md python3 tools/deslop.py page.html python3 tools/deslop.py page.html --view view-site python3 tools/deslop.py --text "paste a draft" ``` The checker scores five categories: vocabulary, sentence patterns, punctuation, three-item lists and possible unsupported proof. Each category with a match costs one point. Below 5/5 it exits with status 1. Empty input also fails. For Markdown, use the file path so code and quoted specimens are handled as Markdown. The rules are English only and do not detect the input language. ## Step 2: Review and rewrite Read [references/principles.md](references/principles.md) for the editorial checks and [references/signs-of-ai-writing.md](references/signs-of-ai-writing.md) for the pattern catalogue. Work through the draft in this order: 1. **Purpose and structure.** Answer the reader's first question early. Remove duplicate hooks and curiosity gaps that delay an explanation. Keep each paragraph focused on a useful point, with enough context to understand it. 2. **Meaning and evidence.** Check that each sentence adds information and follows from what came before. Explain conditions on claims. Remove empty contrasts, repeated metaphors and comparisons that do not help the reader. Preserve facts, technical behavior and the author's position. 3. **Wording and rhythm.** Review the checker findings and replace vague language with direct wording. Read adjacent sentences together for repetitive shapes. Let sentence length follow the thought. Keep useful lists and punctuation. Do not manufacture personality by adding an opinion, a mistake, a fragment or a fixed quota of short sentences. Do not add a number to every claim. Use only facts supplied by the author or verified from an appropriate source. The checker can flag valid language. Review the actual match before editing it. Never hide ordinary prose in code formatting to raise the score. If a necessary phrase still triggers a rule, explain the remaining finding to the user. ## Step 3: Request a second editing pass Use a different model family from the one that wrote the draft. This provides a second review with the same audience and purpose; inspect its suggestions before accepting them. | Draft written with | Command | |---|---| | Claude | `DESLOP_WRITER=claude tools/cleanse.sh draft.md > cleansed.md` | | GPT / Codex / ChatGPT | `DESLOP_WRITER=gpt tools/cleanse.sh draft.md > cleansed.md` | | Gemini | Use either command to select an installed rival CLI. | The script uses the selected CLI's configured model and [prompts/cleanse.txt](prompts/cleanse.txt). The CLI must be installed and authenticated. If it is unavailable, use the prompt and draft in the other model family's chat. If a second model cannot be accessed, report that the pass was not completed and continue the editorial review and local checks. Standard output contains the edited copy. Standard error contains change notes. To keep both: ```bash DESLOP_WRITER=gpt tools/cleanse.sh draft.md > cleansed.md 2> notes.txt ``` Check the command's exit status. A timeout returns 124. A missing rival CLI returns 127 and prints the prompt and input as standard output; that output is not an edited draft. Other CLI failures also need to be resolved before using the file. The model separates its notes with `<<<SLOPMONSTER-NOTES>>>`. A warning about a missing marker means notes may have been included in the copy. Inspect the result. ## Step 4: Compare the edit and check again Compare the result with the source. Check facts and commands for changes, confirm that links and placeholders survived, and read the opening in context. Review the notes for deletions that may have removed necessary information. ```bash python3 tools/deslop.py cleansed.md ``` Aim to resolve the checker findings while preserving the intended meaning. Report any justified exceptions. The final editorial review is required even at 5/5. If you change a regex, run `python3 tools/test_deslop.py`. If you change the cleanse script, run `bash tools/test_cleanse.sh`. ## Factual claims Never invent evidence. This includes customer counts, testimonials, ratings and results. If the draft needs missing information, flag it for the author with a placeholder such as `[needs number]`. Do not publish an unresolved placeholder as a verified claim. The proof rule only sees number-and-noun patterns. It cannot verify whether a claim is true. Use `--allow-proof` only after checking the evidence; the option retains the warning while removing its score penalty. ## Output Return the rewritten copy or save the edited artifact as requested. Then give up to five short notes explaining substantive changes and the check results. State whether the second model pass completed. Keep any unresolved claims or remaining checker findings visible. Do not claim the edit proves human authorship.README.md7.6 KB513228341101upstream ↗
# SlopMonster  SlopMonster checks English writing for common AI writing patterns and provides instructions for editing the draft. Use it on a README, a landing page, an email or a script. The Python checker reports matches in five categories and gives the text a score out of 5. The editing workflow asks an AI agent to review the draft for its intended reader, revise it, and request another pass from a different model family. A score of 5/5 means the checker found no scored matches. You still need to review whether the text makes sense, supports its claims and gives the reader what they came for. The previous version of this README passed while using repetitive metaphors and vague contrasts. That exposed a gap in the editing guidance. ## Quick start The checker uses Python 3 and its standard library. It needs no API key or packages to install. ```bash git clone https://github.com/ItsssssJack/SlopMonster cd SlopMonster # Check a short draft. python3 tools/deslop.py --text "It's not just a tool, it's a game-changing journey." # Scores 3/5 and exits with status 1. # Check a Markdown file. python3 tools/deslop.py README.md # Check text extracted from an HTML file. python3 tools/deslop.py index.html ``` Each category with a match costs one point, regardless of how many matches it contains. The command exits with status 0 at 5/5 and status 1 below 5/5. Empty input also fails. Checking a file leaves its contents unchanged. For Markdown, the checker skips fenced code blocks, inline code, images and struck-through examples. For HTML, it removes tags and script/style contents. It doesn't render the page, so text hidden by CSS can still be included. ## Edit a draft Give your agent [SKILL.md](SKILL.md) and the draft. Include the intended audience and where the writing will appear if those are unclear from the text. 1. Run the checker to identify the patterns it recognizes. 2. Review the draft's purpose and order. A README should explain the tool and show how to use it. An email should make its reason for writing clear. 3. Rewrite unclear or repetitive passages. Check that each sentence adds useful information and that claims match the supplied facts. 4. Request a second editing pass from a different model family, then inspect the changes and run the checker again. The second pass uses [prompts/cleanse.txt](prompts/cleanse.txt). With a supported AI command-line tool (CLI) installed and authenticated, run: ```bash # If Claude wrote the draft, use Codex for the second pass. DESLOP_WRITER=claude tools/cleanse.sh draft.md > cleansed.md # If GPT wrote the draft, use Claude for the second pass. DESLOP_WRITER=gpt tools/cleanse.sh draft.md > cleansed.md # Read the edited file, then check it as Markdown. python3 tools/deslop.py cleansed.md ``` Run the command for the family that wrote your draft. The script writes edited copy to standard output and change notes to standard error. It uses the installed CLI's configured model. If the required CLI is missing, the script prints the editing prompt and draft, then exits with status 127. Paste that output into the other model family's chat. A timeout exits with status 124. Check the exit status before treating the output file as an edited draft. A warning about a missing notes marker means the response may include change notes in the copy. Using another model provides another editing pass. It doesn't guarantee better writing. Review the result for changed facts and lost context before accepting it. ### Use as an agent skill For Claude Code, copy this folder to `~/.claude/skills/slopmonster/` and invoke `/slopmonster`. For Codex or another agent, ask it to follow [SKILL.md](SKILL.md). ## What the checker flags The current score has five categories: | Category | What it checks | |---|---| | Vocabulary | Listed words such as `delve` and `seamless`, including selected word forms. | | Sentence patterns | Listed constructions such as `not just X, but Y`, stacked hedges and certain self-answering questions. | | Punctuation | Repeated em dashes or stacked hyphenated compounds within a 220-character window in a sentence, plus semicolon density. | | Three-item lists | Two specific list patterns that often occur in promotional copy. | | Possible unsupported proof | Numbers near nouns such as `users` or `customers`. The checker cannot verify the claim. | The patterns are in [tools/deslop.py](tools/deslop.py). The broader editing catalogue is in [references/signs-of-ai-writing.md](references/signs-of-ai-writing.md). Some entries in that catalogue require editorial judgment and have no automated check. If a flagged customer count is accurate and you have evidence for it, use: ```bash python3 tools/deslop.py index.html --allow-proof ``` This option still reports proof matches but removes their score penalty. It doesn't check the evidence. In this mode, 5/5 can include proof warnings. ## Review beyond the score Read the draft in the context where someone will encounter it. Check these points before accepting an edit: - **Audience and purpose:** Does it answer the reader's likely questions at the right level of detail? Explain technical terms where they first matter. - **Opening:** Does the first paragraph explain the subject or establish a useful reason to keep reading? Avoid adding a second hook that delays the explanation. - **Progression:** Does each sentence build on the previous one? Remove repeated metaphors and contrasts that add no information. - **Claims:** Can you support each factual statement? Describe optional behavior with its conditions. For example, a command's failure status only stops a workflow if that workflow is configured to act on it. - **Voice:** Does the wording suit the author and format? Contractions are fine where natural. Forced fragments and invented opinions can make the edit worse. See [references/principles.md](references/principles.md) for more editing guidance and examples. Never add a statistic or testimonial to make a sentence sound specific. If information is missing, flag it for the author. ### Limits The checker uses English patterns and has no language detection. Text in another language can score 5/5 because those patterns don't match. It can flag ordinary wording and miss poor writing. It cannot determine who wrote the text, verify facts or judge whether a hook suits the audience. Use its findings as prompts for review. A passing score alone doesn't establish writing quality. ## Optional CI check You can run the checker in continuous integration (CI), the automated checks a repository runs when code changes. Because a score below 5/5 returns a failure status, a workflow that runs the command can fail on flagged copy. This repository's [workflow](.github/workflows/slop.yml) runs the regression tests and checks both this README and a sample file. Copy it to your repository and set the file paths you want checked. Blocking a merge or deployment requires your own repository rules or deployment configuration. ```bash python3 tools/test_deslop.py bash tools/test_cleanse.sh python3 tools/deslop.py README.md ``` ## Examples and sources - [Jasper homepage excerpt](examples/jasper-live-run.md): a recorded editing run with the commands and output from that run. Scores can change as rules change. - [Ridgeline Roofing](examples/ridgeline-roofing.md): a longer worked example with before-and-after copy. Check any business facts before reusing a line. - [Source list](references/sources.md): Wikipedia's *Signs of AI writing* and the open-source humanizer projects used to assemble the catalogue. The marketing guidance also draws on Steve Krug, Daniel Priestley and Alex Hormozi. [MIT license](LICENSE).references/principles.md3.9 KBd433c19cc7e1upstream ↗
# Editing principles Use these checks alongside the pattern catalogue. Start with the document's reader and purpose, then review individual sentences. A passing checker score does not answer the editorial questions below. ## 1. Give the reader the information they need Identify what the reader came to learn or do. In a README, explain the project's function before discussing optional integrations. In an email, state the reason for writing early. A sales page may need to establish a customer problem before describing the offer. Steve Krug's *Don't Make Me Think* informs the emphasis on reducing unnecessary interpretation. Problem-first pitch guidance from Daniel Priestley and Alex Hormozi is useful for sales copy; it should not dictate every document's opening. > Before: ~~It scores your copy out of 5 and it can fail your build.~~ > > After: The checker reports matches in five categories. You can also run it in > an automated repository check, where a score below 5/5 returns a failure status. The second sentence supplies the context needed to understand the optional use. Whether that failure blocks a merge or deployment depends on the configuration. ## 2. Make the opening lead into an explanation A hook should establish a relevant question or reason to read. Once it has done that, answer the question. Avoid following it with another vague promise about information that appears later. Read the first few paragraphs together. Check whether the reader learns something useful in each one. Remove openings that could introduce almost any product. > Before: ~~Most tools that fix this are built on the same public research. This > one adds the two things the others skip.~~ > > After: SlopMonster includes a Python checker and instructions for editing the > draft with an AI agent. The replacement explains the contents without making an unsupported comparison with other tools. ## 3. Check the relationship between sentences Each sentence should add information, explain a consequence or provide an example the reader needs. Repeated metaphors and mirrored sentence structures can create rhythm without developing the point. Read adjacent sentences for meaning. Ask what the second sentence adds and whether its claim follows from the first. Use a contrast only when the distinction matters. > Before: ~~Developers call this a linter. Everyone else can call it a checker > that will not let you ship.~~ > > After: Run the checker on a file to see which patterns it flags. The command > leaves the file unchanged. The replacement describes what someone using the command can expect. ## 4. Keep claims within the available evidence Use a specific detail when it is relevant and supported. Do not add a number or testimonial merely to make a sentence feel concrete. Verify dates and technical specifications as carefully as customer counts. The roofing examples in [the worked example](../examples/ridgeline-roofing.md) illustrate possible edits. A reader reusing them must check the underlying business facts. A precise claim can still be false. If necessary evidence is missing, mark the gap for the author. Describe limitations and conditions where the claim appears so the reader can interpret it correctly. ## 5. Preserve a voice that suits the document Read the edit aloud or as a complete page. Keep the author's level of formality and allow sentence length to follow the content. Lists can have three items when there are three useful items. An em dash can be appropriate punctuation. Avoid imposing a quota of fragments or contractions. Do not invent an opinion or deliberate error to make the writing seem personal. For instructions, prioritize an order the reader can follow and commands they can use. After editing, compare against the original for changed meaning and run the checker again. Review remaining findings in context and report any necessary exceptions. Never put ordinary prose in code formatting merely to suppress a match.references/signs-of-ai-writing.md4.4 KBac18cd4da0e6upstream ↗
# Signs of AI writing — the catalogue This catalogue lists patterns to review while editing. It draws on Wikipedia's *Signs of AI writing*, maintained by WikiProject AI Cleanup, and the projects in [sources.md](sources.md). These patterns can also appear in human writing. The five groups correspond to the checker's scoring categories, but some advice requires editorial judgment and has no regex check. Read the findings in context. The complete automated rules are in `tools/deslop.py`. --- ## 1 · Vocabulary Review these words for vague or promotional use. Keep necessary technical terms and literal meanings when they fit the document, and report any remaining match. **Words and phrases to review:** `delve` · `tapestry` · `testament to` · `underscores` · `seamless(ly)` · `robust` · `navigate the landscape` · `in today's fast-paced world` · `it's important to note` · `it's worth noting` · `that being said` · `at the end of the day` · `unlock` · `supercharge` · `elevate` · `game-changing` · `revolutionise` · `harness the power of` · `dive deep` · `myriad` · `plethora` · `realm` · `ever-evolving` · `cutting-edge` · `transformative` · `paradigm shift` · `synergy` · `holistic` · `embark` **Additional words to review in context:** `leverage` · `foster` · `crucial` · `pivotal` · `streamline` · `empower` · `showcase` · `curated` · `meticulous` · `compelling` · `innovative` · `comprehensive` · `journey` · `solution` · `effortless` · `intuitive` · `world-class` · `best-in-class` · `unleash` · `boost` The checker does not apply frequency allowances to these editorial lists. Its implemented vocabulary patterns flag even a single match. Replace vague wording with an explanation of what happens. Often a plain word such as `use` is enough. ## 2 · Constructions (the shapes) Review sentence structures as well as individual words: | Shape | Example | Fix | |---|---|---| | `not just X, but Y` | `It's not just a course, it's a journey` | Cut the first clause, keep the claim | | `more than just` | `More than just another app` | Same | | `whether you're X or Y` | `Whether you're a beginner or a pro…` | Name the one reader you mean | | `that's where X comes in` | `That's where Acme comes in` | State what X does | | `say goodbye to` | `Say goodbye to guesswork` | Name what replaces it | | `imagine a…` | `Imagine a world where…` | Show it instead | | hedged benefit | `helps you to`, `can help you` | Describe the benefit at the certainty the evidence supports | | stacked hedging | `may potentially`, `could possibly` | Remove redundant hedges while preserving uncertainty | | self-answering question | `The result? Faster shipping.` | A sentence | Also review adjacent sentences that repeat a metaphor, manufacture a contrast between audiences or introduce a second hook before explaining the first. These broader problems require reading the paragraph in context. Remove unnecessary process commentary and repeated summaries. Use formatting to help the reader scan. Let paragraph and sentence length follow the material. ## 3 · Punctuation cadence - Repeated em dashes within a sentence. Check whether the interruptions make it harder to follow. The checker uses 220-character windows. - Stacked hyphenated compounds. The checker flags four within one sentence window. - Semicolon density. The checker uses a threshold that scales with text length. Punctuation can be appropriate even when it triggers a pattern. Review readability and retain qualifications needed for accuracy. ## 4 · Rhythm The checker recognizes two three-item list patterns, including `faster, smarter, and better`. Review whether each item contributes information. Keep a useful list at its natural length. A list's item count cannot establish who wrote it. ## 5 · Invented proof Never invent customer counts or other evidence. The checker flags numbers near certain nouns, but it cannot determine whether the claim is supported. Verify the claim before using `--allow-proof`, which keeps the warning and removes its score penalty. Check dates and specifications too, even when no rule flags them. --- ## Review the complete draft Use [principles.md](principles.md) to check the audience and purpose, the opening, the progression between sentences, the evidence and the author's voice. Removing recognized patterns is only part of the edit. Do not force fragments or opinions into the draft to make it seem personal.references/sources.md2.4 KBde6035a82db7upstream ↗
# Sources The original pattern catalogue drew on the resources below. The current editorial guidance also reflects problems found in this repository's README: repetitive metaphors, unexplained technical claims and sentence pairs that added no useful information. ## Writing-pattern catalogue [Wikipedia: Signs of AI writing](https://en.wikipedia.org/wiki/Wikipedia:Signs_of_AI_writing) is maintained by WikiProject AI Cleanup. It provides examples for reviewing text. A matching pattern alone does not establish who wrote a passage. The following open-source projects informed the original implementation: | Project | Contribution to this repository | |---|---| | [blader/humanizer](https://github.com/blader/humanizer) | Pattern categories drawn from the Wikipedia catalogue. | | [harshaneel/humanize](https://github.com/harshaneel/humanize) | Research references and punctuation patterns. | | [lguz/humanize-writing-skill](https://github.com/lguz/humanize-writing-skill) | An editing workflow with multiple passes and vocabulary lists. | | [haidrrrry/humanize-ai-writing](https://github.com/haidrrrry/humanize-ai-writing) | Instructions that can be used as a standalone editing prompt. | See each project for its own documentation and license. The implemented rules in [tools/deslop.py](../tools/deslop.py) determine the score. The broader catalogue in [signs-of-ai-writing.md](signs-of-ai-writing.md) includes checks that require editorial judgment. ## Editorial guidance Steve Krug's *Don't Make Me Think* informs the emphasis on making information easy to understand. The original marketing examples drew on Daniel Priestley's problem-first pitch order and Alex Hormozi's work on offers and supporting claims. [principles.md](principles.md) applies that guidance according to the document's purpose. A README should explain the project early. A sales page may need to establish a customer problem before describing the offer. Neither approach calls for invented evidence. ## Second-model review The cleanse script routes a draft to a different model family using an installed CLI. It uses that CLI's configured model and does not pin a model version. This repository does not establish that a second model will produce a better edit. Compare the output with the draft for changes in meaning and run the checker again. The workflow makes no claim to prove human authorship or bypass AI detectors..github/workflows/slop.yml1014 Bf59b7d294712upstream ↗
name: slop gate on: [push, pull_request] jobs: test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: python-version: '3.11' # The catalogue is regexes, so the regression suite is the only thing # standing between a tweak and a silently half-blind linter. - name: Regression tests run: python3 tools/test_deslop.py # The copy/notes split is what keeps the model's change notes out of # cleansed.md. No model calls, so it runs here like any other unit test. - name: Cleanse split tests run: bash tools/test_cleanse.sh - name: Lint the README run: python3 tools/deslop.py README.md # This is the gate itself, copied as-is into your own repo: point it at # whatever file holds your shipped copy. Non-zero below 5/5 fails the build. - name: Lint the shipped copy run: python3 tools/deslop.py --text "$(cat examples/gate-sample.txt)".gitignore29 B2348c91f7a19upstream ↗
.DS_Store __pycache__/ *.pycdocs/img/hero.png690 KBf3a620effe4fupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
docs/img/rule-1-vocab.png533 KB90a8e819077fupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
docs/img/rule-2-phrases.png481 KB040635f7658bupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
docs/img/rule-3-punctuation.png390 KBfe4f693f5cc2upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
docs/img/rule-4-rhythm.png452 KB58d75baaf0a0upstream ↗
Contents are not inlined in the catalog. Open the upstream file.
docs/img/rule-5-conversion.png600 KBd4044a6fba0bupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
examples/gate-sample.txt182 Be0d142d77367upstream ↗
Six nails per shingle, every shingle. You get a written scope and a fixed number before anyone climbs a ladder. We do not do overlays. If the roof needs replacing, it gets stripped.examples/jasper-live-run.md3.6 KBf2ef20853a7aupstream ↗
# Live run — a real marketing page, start to finish A real, unedited run of the full pipeline (29 Aug 2026) on seven verbatim sentences from the homepage of a large AI marketing SaaS. The draft was written by their team or their tools. We only ran the loop on it. This is the receipt the README numbers come from. ## Step 1 — Lint the original ``` $ python3 tools/deslop.py --text "…seven sentences from the live page…" 112 words of visible copy AI vocabulary: · unlock (1) · empower (1) rule-of-three rhythm: · rule-of-three list (contacts, leads, and opportunities) · rule-of-three list (briefs, insights, and channel) · rule-of-three list (tips, advice, and practical) · rule-of-three list (stories, tools, and expert) score 3/5 needs a cleanse ``` These seven sentences are the scored sample. The full homepage fetch, which includes nav and menu strings, scored 2/5. Only the 3/5 above is reproducible from the text in this file, so 3/5 is the number the README quotes. ## The original ```text From advanced language models to context-aware intelligence and intuitive agents, Jasper's rich product experience is designed to meet marketers where they work—so they can customize AI for how they work. Measure how your brand performs across every major AI answer engine, prioritize the actions that matter, and ship brand-governed content at scale. Scale SEO, personalization, and campaigns and more—driving faster, smarter marketing growth. Empower your team to target specific accounts, contacts, leads, and opportunities. Transform briefs, insights, and channel requirements into on-brand campaign content. Find tips, advice, and practical use cases to advance your AI marketing strategy. Unlock the full potential of Jasper through stories, tools, and expert guidance built for marketers. ``` Quoted verbatim for criticism, and fenced because it is input to the tool rather than copy this repo is shipping. ## Step 3 — The cleanse (GPT-5.6 via the codex CLI, one call, 40s) ``` $ tools/cleanse.sh original.txt > cleansed.txt ``` > Jasper brings advanced language models and context-aware intelligence into agents that > meet marketers where they already work. Teams can customize Jasper around their > workflows, track brand performance across every major AI answer engine and focus on > the actions that matter. Then ship brand-governed content at scale. > > Use Jasper to scale SEO and personalization across campaigns and other marketing work, > driving faster, smarter growth. Target specific accounts and contacts, including > individual leads and opportunities. Turn briefs and insights into on-brand campaign > content built around each channel's requirements. > > Jasper offers practical advice and use cases to move your AI marketing strategy > forward. That's where I'd start. And marketers can get more from Jasper through > stories and tools, backed by expert guidance. What the model reported changing. It replaced `unlock`, `transform` and `empower` with direct verbs. It broke the stacked three-part lists into uneven sentences. It removed both em dashes. It cut "rich product experience". It kept the rough "And" opening. ## Step 4 — Re-lint ``` $ python3 tools/deslop.py --text "$(cat cleansed.txt)" 119 words of visible copy score 5/5 CLEAN ``` **3/5 → 5/5, meaning intact, length within 10%, nothing invented.** That is the whole loop: lint, rewrite, cleanse, re-lint. Note what the cleanse did *not* fix: the copy is now clean, but it is still generic — no numbers, no named pain, no refusals. That is what `references/principles.md` is for. The linter gets you to "not machine". The principles get you to "good".examples/ridgeline-roofing.md5.4 KB24306215c331upstream ↗
# Worked example — Ridgeline Roofing A full site build. It arrived as a wireframe of `Lorem ipsum` and "Medium length section heading goes here". Every shipped line went through this system. This file is the record. ## Six tells, caught and cut Every one of these showed up in a first draft of the page and was rewritten on sight. **The three-item flourish** > ~~Trusted, reliable and built to last.~~ > **Six nails per shingle, every shingle.** > Three adjectives is a rhythm, not an argument. One specification beats it every time. **The `not just X, but Y` shape** > ~~Not just a roof, but peace of mind.~~ > **A written scope and a fixed number before anyone climbs a ladder.** > The construction promises a reveal and then delivers an abstraction. **Puffed-up verbs** > ~~We leverage industry-leading materials to deliver unparalleled protection.~~ > **We source materials from manufacturers who test for wind, hail and sun.** > `leverage`, `deliver`, `unparalleled`, `seamless`, `robust`, `elevate`. All of them mean nothing and cost a line. **Empty superlatives** > ~~The area's most trusted roofing experts.~~ > **Roofing, and only roofing, since 2001.** > "Most trusted" is unfalsifiable, so the reader discounts it entirely. A date cannot be argued with. **Em-dash pile-up** > ~~Our team — trained, certified and local — is ready to help.~~ > **Thirty-eight on the crew, factory-trained for every material we install.** > One dash in a paragraph is punctuation. Three is a tic. **Hollow proof** > ~~Loved by 10,000+ happy homeowners.~~ > **Project names and photography are placeholders — swap in your own jobs before this goes live.** > Inventing a number is the one unrecoverable mistake. Say the slot is empty instead. ## Where the shipped lines came from Four sources, and if a sentence cannot name its source it does not go on the page: 1. **What the trade actually does** — the strongest source. "Six nails per shingle, every shingle" is a real specification with a real failure mode behind it. Nothing invented sounds like that, because invented copy does not know it. 2. **What the customer already fears** — that the number will move, that the yard will be wrecked, that they are being sold a whole roof for a flashing problem. The page answers those three, in order. 3. **What the competition will not say** — refusals travel further than promises. "We do not do overlays" and "we do not quote from the driveway" both position and disqualify in one line. 4. **The wireframe's own surviving lines** — "From first call to final nail" arrived already written and was better than anything a rewrite would produce. It stayed. ## Every line, wireframe → shipped | Slot | Wireframe | Shipped | |---|---|---| | Home · hero | Medium length hero heading goes here | The roof your house was supposed to have | | Home · hero sub | Lorem ipsum dolor sit amet… | Inspection, repair and replacement for homes and commercial buildings. You get a written scope and a fixed number before anyone climbs a ladder. | | Home · CTA | Button | Book a free inspection | | Home · logo band | Certified by the names that set the standard | Certified to install and warranty the systems we sell | | Home · feature band | Tagline · Medium length section heading | The build-up · A roof is seven layers. Most quotes only price two. | | Home · materials | Materials from brands that build to last | What each system actually buys you | | Home · closing CTA | Medium length CTA heading goes here | Find out what is actually wrong with your roof | | Services · hero | Short heading here | Four things, done properly | | Services · intro | Lorem ipsum dolor sit amet… | We do not do gutters, siding, windows or conservatories. We do roofs. | | Services · repair | Tagline · Medium length section heading | We photograph the cause, not just the stain on your ceiling | | Services · warranty | Short heading goes here | Two warranties, and they are different things | | About · hero | Short heading here | Twenty-five years, one trade, same county | | About · story | Tagline · Medium length section heading | Why we started · We got tired of following bad roofers around | | About · values | Short heading goes here | The things we will not do, whatever you offer us | ## The mechanical cleanse checklist used on the finished page 1. **Strip the adjectives.** Delete every adjective, read it back, restore only the ones whose absence changed the meaning. Usually one in five survives. 2. **Find the number.** Any claim that could carry a number gets one, or gets cut. "Long-lasting" becomes "25 years". "Fast" becomes "4.2 hours". 3. **Name the noun.** "Materials" becomes "ice and water shield". "Quality workmanship" becomes "six nails per shingle". The specific noun is the whole trick. 4. **Cut the throat-clearing.** Delete the first sentence of each paragraph and check whether anything was lost. Usually it was a run-up. 5. **Read it aloud.** Anything you would not say standing on a driveway comes out. 6. **Verify every claim.** Numbers, certifications and warranty terms get checked against reality before publishing. Anything unverified is marked as a placeholder *on the page*, not quietly left in. Point 6 is not decorative. The Ridgeline build carried five unverified wireframe figures (25+ years, 4,800 roofs, 38 technicians, 50-year warranty, 4.2-hour call-out) and the page says so, in a visible callout, rather than shipping them as fact.LICENSE1.0 KB79819274e478upstream ↗
MIT License Copyright (c) 2026 Jack Roberts Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.prompts/cleanse.txt3.2 KBc8c513a06b56upstream ↗
Edit the draft below for its intended reader and purpose. Infer the format and audience from the supplied context. Preserve the author's position and level of formality. A README needs a clear explanation and usable instructions. A sales page or script may need a different opening. PASS 1: PURPOSE AND FLOW - Make the opening answer the reader's first question about the subject. - Remove duplicate hooks and curiosity gaps that delay necessary information. - Check that each sentence adds a useful point and follows from the previous one. - Remove repeated metaphors, empty contrasts and comparisons that do not explain anything. Describe the relevant behavior directly. - Explain jargon where the reader needs it. Keep conditions attached to claims. - Keep a closing summary only if it serves this document's reader. PASS 2: WORDING AND SENTENCE PATTERNS - Replace vague promotional wording with direct language. Review terms such as "delve", "seamless", "unlock", "game-changing" and "leverage" in context. - Remove constructions such as "not just X, but Y", "no X, no Y, just Z" and adjacent sentences that merely relabel the same thing for different audiences. Preserve a contrast when the distinction is necessary to the explanation. - Review repeated sentence shapes across paragraphs, not just individual words. - Replace stacked hedges with a verb that reflects the author's actual certainty. - Review self-answering questions and decorative lists. Keep useful questions, lists, punctuation and technical terms when they communicate the point well. PASS 3: CONTEXT AND ACCURACY - Read the result as a complete document. Does it suit the reader and the format? - Let sentence length follow the meaning. Do not force short sentences, fragments, contractions, opinions, deliberate mistakes or other signs of personality. - Use concrete details already in the source where they help. Do not add a number to each claim or turn every document into sales copy. - Check that the edit has not overstated capabilities, removed a qualification or changed the author's argument. ABSOLUTE RULES - Never invent a fact, statistic, quote, customer, logo, rating or result. - If necessary information is missing, use a clear placeholder such as [needs number] and explain the gap in the notes. Do not guess. - Preserve factual meaning and technical behavior. Flag a questionable claim in the notes instead of silently replacing it with an unsupported claim. - Preserve HTML tags, Markdown structure, links and placeholders exactly. - Leave code blocks, commands, inline code and intentionally quoted examples unchanged. They may document the very patterns being discussed. - Keep the author's register. Do not add an opinion the author did not express. OUTPUT Return the rewritten copy in full, and nothing before it. Then a line containing exactly <<<SLOPMONSTER-NOTES>>> and nothing else, then at most five bullets describing the substantive edits or unresolved concerns. No preamble or restatement of these instructions. The marker is parsed by a script. Emit it exactly once, alone on its line, with no bullet, quotes or backticks around it, even when you changed nothing. Everything above it is returned as copy; everything below it is shown to the author as notes. TEXT TO EDIT:tools/cleanse.sh6.0 KB0c3113f709f0upstream ↗
#!/usr/bin/env bash # The model cleanse — a second model strips the tells the first one wrote. # # The rule: the cleanse runs on a DIFFERENT model family than the one that wrote # the draft. A model is bad at hearing its own accent. A rival hears it instantly. # # ./cleanse.sh draft.md # cleanse a file # cat draft.md | ./cleanse.sh - # cleanse stdin # TIMEOUT=240 ./cleanse.sh draft.md # longer bound for a long document # # Routing, in order: # 1. codex CLI found -> GPT-5.6 pass via `codex exec` (you are in Claude Code / Gemini) # 2. no codex, claude CLI found AND DESLOP_WRITER=gpt -> Claude pass (you are in Codex) # 3. neither -> prints the prompt so you can paste it into ChatGPT yourself # # If you are ALREADY inside Codex/ChatGPT: you do not need this script. The GPT # family is the one you are talking to. Paste prompts/cleanse.txt plus your draft. # # Always exits 124 on timeout. ALWAYS re-lint the output: # python3 tools/deslop.py --text "$(cat cleansed.md)" set -uo pipefail HERE="$(cd "$(dirname "$0")" && pwd)" PROMPT_FILE="$HERE/../prompts/cleanse.txt" TIMEOUT="${TIMEOUT:-180}" if [ "${1:-}" = "-" ] || [ $# -eq 0 ]; then DRAFT="$(cat)" else # Without this, a typo'd filename sent an EMPTY draft to a paid model call and # wrote the reply into your output file at exit 0. [ -f "$1" ] && [ -r "$1" ] || { echo "cleanse: cannot read $1" >&2; exit 66; } DRAFT="$(cat "$1")" fi [ -n "$(printf '%s' "$DRAFT" | tr -d '[:space:]')" ] || { echo "cleanse: draft is empty, nothing to cleanse" >&2; exit 66; } FULL="$(cat "$PROMPT_FILE") $DRAFT" find_bin() { command -v "$1" 2>/dev/null || { [ -x "$HOME/.local/bin/$1" ] && echo "$HOME/.local/bin/$1"; }; } # The reply is the copy, then a sentinel line, then the change notes. Copy goes to # STDOUT so the documented `cleanse.sh draft.md > cleansed.md` writes prose ONLY; # the notes go to STDERR so you still read them. # # Splitting on the old bare `---` was not possible: `---` is a legal markdown # horizontal rule and a YAML frontmatter delimiter, so any draft that contained one # got cut at the wrong place. Without a split the notes landed inside cleansed.md, # and step 4 then scored the model's own commentary as prose and stamped it CLEAN — # the gate reporting a clean page at exactly the moment it was measuring the wrong # bytes. Redirecting to a file and reading only that file is the documented flow, so # the leak was invisible until you opened the output. # # Fails OPEN on content: no sentinel means print the whole reply as copy and warn. # A stray note you can see and delete; a silently swallowed last paragraph you cannot. NOTES_SENTINEL='<<<SLOPMONSTER-NOTES>>>' emit_copy() { awk -v s="$NOTES_SENTINEL" ' $0 == s { seen = 1; next } seen { notes = notes $0 "\n"; next } { body = body $0 "\n" } END { if (!seen) { printf "%s", body print "cleanse: WARNING no " s " line in the reply." > "/dev/stderr" print "cleanse: emitting everything as copy. Check the tail before you ship," > "/dev/stderr" print "cleanse: because change notes may be scored as prose by the re-lint." > "/dev/stderr" exit 0 } sub(/\n+$/, "", body) # drop the blank lines that preceded the sentinel printf "%s\n", body if (notes != "") { print "" > "/dev/stderr" print "cleanse: what changed -" > "/dev/stderr" printf "%s", notes > "/dev/stderr" } } ' } CODEX="$(find_bin codex || true)" CLAUDE="$(find_bin claude || true)" run_bounded() { # run_bounded <cmd...> — macOS has no `timeout`, so we roll one OUT="$(mktemp)"; trap 'rm -f "$OUT"' RETURN "$@" >"$OUT" 2>&1 </dev/null & PID=$!; WAITED=0 while kill -0 "$PID" 2>/dev/null; do if [ "$WAITED" -ge "$TIMEOUT" ]; then kill -9 "$PID" 2>/dev/null; wait "$PID" 2>/dev/null echo "deslop: cleanse timed out after ${TIMEOUT}s" >&2; return 124 fi sleep 2; WAITED=$((WAITED + 2)) done wait "$PID"; RC=$?; cat "$OUT"; return $RC } if [ -n "$CODEX" ] && [ "${DESLOP_WRITER:-claude}" != "gpt" ]; then # Claude (or Gemini) wrote the draft -> GPT-5.6 cleanses it. # --skip-git-repo-check: copy lives in plain folders. Sandbox read-only: this # is a text transform, it has no business writing files. RAW="$(run_bounded "$CODEX" exec --skip-git-repo-check --sandbox read-only "$FULL")" || exit $? # codex wraps the answer in banners; the answer sits between the last bare # `codex` line and `tokens used`. # # Test the EXTRACTION, not the first line. Branching on `read -r first` meant an # answer that opened with a blank line fell through to the raw transcript — # banner, session id, the whole prompt file — written straight into your output. # `read` also strips leading whitespace, which breaks the "preserve markdown # structure exactly" instruction the prompt file gives. BODY="$(printf '%s\n' "$RAW" | awk '$0=="codex"{buf="";on=1;next} $0=="tokens used"{on=0;next} on{buf=buf $0 "\n"} END{printf "%s", buf}')" if [ -n "$(printf '%s' "$BODY" | tr -d '[:space:]')" ]; then printf '%s\n' "$BODY" | emit_copy else printf '%s\n' "$RAW" | emit_copy fi elif [ -n "$CLAUDE" ] && [ "${DESLOP_WRITER:-claude}" = "gpt" ]; then # GPT wrote the draft -> Claude cleanses it. # Captured before the split, not piped straight into it: a pipeline reports the # LAST command's status, so a timeout would have returned emit_copy's 0 and the # 124 contract would have been lost. CLAUDE_OUT="$(run_bounded "$CLAUDE" -p "$FULL")" || exit $? printf '%s\n' "$CLAUDE_OUT" | emit_copy else # Reached when the only CLI available is the same family that wrote the draft. # Running that would be a model marking its own homework, which is the one # thing this script exists to prevent. Print the prompt instead. echo "cleanse: no rival-family CLI found (a Claude draft needs codex, a GPT" >&2 echo "draft needs claude). Paste the block below into the other family's chat:" >&2 echo >&2 printf '%s\n' "$FULL" exit 127 fitools/deslop.py18 KB50bf25913730upstream ↗
#!/usr/bin/env python3 """Hunt AI tells in the visible copy of a built page. Regex, no opinions, exits red. python3 deslop.py index.html python3 deslop.py index.html --view view-site # score one tab only python3 deslop.py --text "some copy to check" This reads only what a visitor can SEE: it strips <script>, <style>, and every HTML tag, so it scores the words on the page rather than the markup around them. Scoring is out of 5. Below 5 exits non-zero. That is deliberate — "mostly clean" copy is how a page ends up sounding like every other AI page on the internet. """ import html as _html # aliased: `visible_text` takes a parameter named `html` import re import sys # ── the catalogue ──────────────────────────────────────────────────────────── # Grouped by why they are a tell, because the fix differs per group. # Matched by root, so every inflection fires: `elevate` also catches elevates, # elevated, elevating, elevation. Landing-page copy is written in the third # person ("Acme elevates your workflow"), so exact-string matching missed the # single most common surface form of every word here. VOCAB = [ 'delve', 'leverage', 'seamless', 'elevate', 'robust', 'unlock', 'unleash', 'empower', 'streamline', 'cutting-edge', 'state-of-the-art', 'game-changer', 'game-changing', 'revolutionize', 'revolutionise', 'transformative', 'transformation', 'innovate', 'holistic', 'synergy', 'synergies', 'paradigm', 'bespoke', 'meticulous', 'tapestry', 'testament', 'beacon', 'unparalleled', 'supercharge', 'turbocharge', 'effortless', 'next-level', # second tier: fine once in a long page, damning in every section 'pivotal', 'foster', 'showcase', 'compelling', 'intuitive', 'world-class', 'best-in-class', ] # Words with an ordinary literal sense — "we craft furniture", "harness the # horse", "the landscape of the valley". Matched exactly, never by root, so the # innocent use survives and only the marketing inflection is caught. VOCAB_EXACT = [ 'crafted', 'curated', 'harnessing', 'harness the power', 'journey', 'realm', 'landscape', 'navigate the', 'in the world of', "in today's", 'ever-evolving', 'fast-paced', 'look no further', 'dive in', "let's dive", 'deep dive', 'embark', 'unlock the power', 'buckle up', 'the secret sauce', 'level up', ] def _root_pattern(word): """A regex matching `word` and its inflections. Strip a trailing e/ed/ing/ly to get the root, then allow the suffixes back. The bare `e?` alternative is load-bearing: without it, stripping the `e` from `elevate` leaves `elevat`, which no longer matches the base form itself. """ root = re.sub(r'(ed|ing|ly|e)$', '', word) if len(root) < 4: # too short to stem safely return rf"(?<!\w){re.escape(word)}(?!\w)" return rf"(?<!\w){re.escape(root)}(?:e|es|ed|ing|ion|ions|ional|ive|al|ally|s|ly|ness)?(?!\w)" # Negated "just/only/merely/simply", in either register. # # `\bnot\b` cannot match inside `isn't` — there is no standalone `not` token there — so # an uncontracted-only pattern misses every contracted form, which is the register a # model reaches for when it is trying hardest to sound human. Matching the `n't` suffix # covers isn't / aren't / wasn't / doesn't / don't / won't / can't without enumerating # them. Straight and curly apostrophes both. _NEG_JUST = r"(?:\bnot|n['’]t)\s+(?:just|only|merely|simply)\b" # The Y clause of the swap, reached across a comma or a single full stop. It is not # always a copula — "it doesn't just park you, it GETS you there" is the same move — so # this takes a pronoun subject and lets any verb follow. The punctuation carries the # precision: "It's not just about money." has no Y clause and stays clean, and so does # "Do not just take my word for it." _XY_TAIL = r"[^!?]{0,80}?[,.]\s*(?:it|this|that|they|we|you|he|she|i)\b" PHRASES = [ # constructions, not words — these are the loudest tells # The contracted and uncontracted forms both matter: formal register is not an # adversarial rewrite, it is the default thing a model emits. (_NEG_JUST + r"[^.!?]{0,80}\bbut\b", "the 'not just X, but Y' construction"), (_NEG_JUST + _XY_TAIL, "the 'not just X, it's Y' construction"), (r"\bwhether you(?:'?re| are)\b[^.!?]{0,40}\bor\b", "the 'whether you're X or Y' opener"), (r"\bmore than just\b", "'more than just'"), (r"\b(that|this)(?:'?s| is) where\b[^.!?]{0,30}\bcomes? in\b", "'that's where X comes in'"), (r"\bsay goodbye to\b", "'say goodbye to'"), (r"\bimagine (a|an|the)\b", "the 'imagine a…' opener"), (r"\bin conclusion\b|\bto sum up\b", "essay-summary phrasing"), (r"\bwhen it comes to\b", "'when it comes to' filler"), (r"\bat the end of the day\b", "'at the end of the day'"), (r"\bthe key is\b|\bthe truth is\b", "throat-clearing opener"), (r"\bhelps? you to\b|\bcan help you\b", "hedged benefit ('helps you to…')"), (r"\bmay potentially\b|\bcould potentially\b|\bmight possibly\b", "stacked hedging"), (r"\bvery unique\b|\bquite literally\b", "intensifier padding"), # Openers and self-answering questions. Cheap literals, near-zero false # positives, and they cover the register a pure vocabulary list cannot see. (r"\bhere'?s the thing\b|\blet'?s break (it|this) down\b|\bthe best part\b", "throat-clearing opener"), (r"\bready to get started\b|\blet'?s get started\b", "boilerplate CTA"), (r"\bthe (result|answer|catch|kicker|upshot)\?\s", "self-answering question"), ] # Invented social proof. Deliberately broad: this is the one mistake with no # route back, so recall matters more than precision. If your number is real and # you can evidence it, pass --allow-proof and the rule drops to advisory. # Hyphenated compound modifiers. One is ordinary English: "a 25-year warranty". # Four in a sentence is a model reaching for authority it has not earned, and the # giveaway is that they stack in front of one noun: "our industry-leading, # context-aware, best-in-class, AI-powered platform". The floor is high on purpose. # Real trade copy runs one to three per hundred words, and stacked slop runs sixty. COMPOUND = re.compile(r'\b[a-z]{2,}-[a-z]{2,}(?:-[a-z]{2,})*\b', re.I) COMPOUND_FLOOR = 4 PROOF = re.compile( # Digits, thousands separators and a decimal point, but never a trailing # full stop. Absorbing it let "Don't Make Me Think, 2000. The reader…" read # as a proof claim, because the year swallowed the sentence break and then # reached across it for a noun. A number and its noun live in one sentence. r"([\d][\d,]*(?:\.\d+)?)\s*\+?\s*" r"((?:happy|early|active|satisfied|verified|trusted|delighted)\s+)?" r"(?:\w+\s+){0,1}" r"(users?|customers?|learners?|students?|teams?|members?|companies|businesses" r"|homeowners?|subscribers?|clients?|patients?|readers?|sites?|projects?)" # Closed with a word boundary, like `_root_pattern`. Without it `sites?` # matched inside "sitemaps", `teams?` inside "teamsters" and `projects?` # inside "projectors", and "12 sitemaps" scored as invented social proof. r"(?!\w)", re.I) def normalise(t): """Fold the typographic variants back to the plain ones the rules match. A non-breaking hyphen is not `-`, \xa0 is not a space, and a curly apostrophe is not `'`. Miss any of them and `cutting-edge`, `it's not just X` and `whether you're` all stop matching on real copy, because real copy is exactly where the pretty characters come from. Every input path runs through here. Markdown skipped it once, and the construction rules went blind on every .md file with a smart quote in it. """ t = t.replace('‑', '-').replace('\xa0', ' ').replace('’', "'") return re.sub(r'\s+', ' ', t).strip() def visible_text(html): """What a visitor actually reads. Script/style stripped, tags removed.""" t = re.sub(r'<(script|style)\b.*?</\1>', ' ', html, flags=re.S | re.I) t = re.sub(r'<!--.*?-->', ' ', t, flags=re.S) t = re.sub(r'<[^>]+>', ' ', t) # Decode every entity, not a hand-written six. Numeric entities used to leak # through as literal text: each `'` donated a phantom semicolon to the # punctuation rule, and every apostrophe-encoded page went blind to the # `it's not just X` and `whether you're` patterns. t = _html.unescape(t) return normalise(t) def read_utf8(path): """Read a file as UTF-8, whatever the machine's locale says. open() with no encoding= uses the locale's, which is cp1252 on a stock Windows install. A UTF-8 page then decodes its em-dashes and curly apostrophes into mojibake, .replace('’', "'") never fires, and window.count('—') counts zero. The punctuation and construction rules go silently blind: the same copy scores 4/5 through --text and 5/5 CLEAN from a file path, and the file path is what CI wires in. A gate that passes because it cannot read is worse than no gate at all. Reported by @Azrael259 in #3, who hit it on Windows. """ return open(path, encoding='utf-8', errors='replace').read() def markdown_prose(md): """The prose of a Markdown file, with the specimens removed. A literal is not copy. A README that documents `delve` has not shipped the word, it has quoted it, and a linter that cannot tell the difference makes every catalogue score zero. So four things come out before scoring: fenced blocks ```…``` commands and code, never prose inline code `delve` the specimen being named struck text ~~before~~ the line being shown as wrong, on purpose images  alt text is metadata, not body copy Link text stays, because that is read as part of the sentence. Everything else is scored exactly as before: this strips markup, it does not soften a single rule. """ md = re.sub(r'```.*?```', ' ', md, flags=re.S) md = re.sub(r'!\[[^\]]*\]\([^)]*\)', ' . ', md) md = re.sub(r'\[([^\]]*)\]\([^)]*\)', r'\1', md) # Stand-ins, not deletions. Removing `[needs number]` outright welds # "you do not have, write ... and move on" into a false rule-of-three, and # a linter that invents a hit is worse than one that misses. Two letters # keep the clause intact without ever matching a rule itself. md = re.sub(r'`[^`]*`', ' it ', md) md = re.sub(r'~~.*?~~', ' it ', md, flags=re.S) # Headings, table cells and rows are separate copy, not one long sentence. # Joined, two em-dashes from two table rows read as one machine cadence. md = re.sub(r'^\s{0,3}#{1,6}\s*(.*)$', r' . \1 . ', md, flags=re.M) md = re.sub(r'\|', ' . ', md) # A bullet is its own line of copy. Left joined, two list items donate one # em-dash each and read as a single machine cadence that nobody wrote. md = re.sub(r'^\s*(?:[-*+]|\d+\.)\s+', ' . ', md, flags=re.M) md = re.sub(r'^\s*>\s?', ' . ', md, flags=re.M) md = re.sub(r'[*_>]', ' ', md) return normalise(md) def audit(text): hits = {'vocab': [], 'phrases': [], 'punctuation': [], 'rhythm': [], 'proof': []} low = text.lower() for w in VOCAB: n = len(re.findall(_root_pattern(w), low)) if n: hits['vocab'].append((w, n)) for w in VOCAB_EXACT: n = len(re.findall(rf"(?<!\w){re.escape(w)}(?!\w)", low)) if n: hits['vocab'].append((w, n)) for pat, label in PHRASES: found = re.findall(pat, low) if found: hits['phrases'].append((label, len(found))) # Em-dash density: two or more in one sentence reads as machine cadence. # Bounded to a 220-char window on purpose — UI strings (nav items, quiz options, # labels) carry no terminal punctuation, so a naive sentence split merges the # whole page into one "sentence" and this rule fires on every page. Ask me how # I know. A linter that cries wolf gets switched off. for s in re.split(r'(?<=[.!?])\s+', text): for i in range(0, max(1, len(s)), 220): window = s[i:i + 220] if window.count('—') >= 2: hits['punctuation'].append(('two or more em-dashes in one sentence', window[:70].strip())) break for s in re.split(r'(?<=[.!?])\s+', text): for i in range(0, max(1, len(s)), 220): window = s[i:i + 220] found = COMPOUND.findall(window) if len(found) >= COMPOUND_FLOOR: hits['punctuation'].append((f'{len(found)} hyphenated compounds stacked ' 'in one sentence', ', '.join(found[:4]))) break # Floor of 3: two semicolons in a long technical page is a style, not a tell. if text.count(';') > max(3, len(text) // 1200): hits['punctuation'].append(('semicolon-heavy for web copy', f"{text.count(';')} found")) # Tricolon: the rule-of-three reflex. Two shapes, deliberately narrow. # # With the Oxford comma, three single words: "faster, smarter, and better". # Without it, the third item must be a 2–3 word phrase that ends the clause: # "Trusted, reliable and built to last". That phrase requirement is what # separates a rhetorical flourish from a plain list of services — # "Inspection, repair and replacement for homes and commercial buildings" # is three real things a roofer does, its third item runs long, and # flagging it would be exactly the wolf-crying that gets a linter switched # off. Note the shape is what is judged, not the meaning: a three-word # closing item ("replacement for homes") does fire, by design. for pat in (r'\b(\w{4,}),\s+(\w{4,}),\s+and\s+(\w{4,})\b', r'\b(\w{4,}),\s+(\w{4,})\s+and\s+((?:\w+\s+){1,2}\w+)\s*[.!?,;:]'): for m in re.finditer(pat, text): hits['rhythm'].append(('rule-of-three list', m.group(0)[:60])) for m in PROOF.finditer(text): hits['proof'].append(m.group(0).strip()) return hits def report(hits, label='', allow_proof=False): weights = {'vocab': 1, 'phrases': 1, 'punctuation': 1, 'rhythm': 1, 'proof': 1} if allow_proof: # The one rule a regex cannot judge: it sees a number beside a noun, not # whether you can evidence it. --allow-proof still prints the hits, but # stops a true, defensible claim from blocking a green build forever. weights['proof'] = 0 failed = [k for k, v in hits.items() if v] score = 5 - sum(weights[k] for k in failed) score = max(0, score) titles = { 'vocab': 'AI vocabulary', 'phrases': 'AI constructions', 'punctuation': 'punctuation cadence', 'rhythm': 'rule-of-three rhythm', 'proof': 'possible invented proof', } if label: print(f'── {label}') for k in ('proof', 'phrases', 'vocab', 'punctuation', 'rhythm'): if not hits[k]: continue print(f' {titles[k]}:') for item in hits[k][:8]: print(f' · {item[0] if isinstance(item, tuple) else item}' + (f' ({item[1]})' if isinstance(item, tuple) and len(item) > 1 else '')) if len(hits[k]) > 8: print(f' · …and {len(hits[k]) - 8} more') print(f'\n score {score}/5', end=' ') print('CLEAN' if score == 5 else 'needs a cleanse') return score if __name__ == '__main__': # Reading UTF-8 correctly means real non-ASCII now reaches print(), and a # Windows console is cp1252: one CJK character or emoji inside a flagged # snippet would end the run in a UnicodeEncodeError traceback. Replace # rather than raise. Naming the tell is the job; echoing it byte-for-byte # is not, and the suite already asserts this tool never shows a traceback. try: sys.stdout.reconfigure(errors='replace') except (AttributeError, ValueError): # already-wrapped or exotic stream pass args = sys.argv[1:] if not args: sys.exit(__doc__) allow_proof = '--allow-proof' in args args = [a for a in args if a != '--allow-proof'] as_md = '--markdown' in args args = [a for a in args if a != '--markdown'] if args[0] == '--text': text = ' '.join(args[1:]) if as_md: text = markdown_prose(text) elif args[0].endswith('.md') or as_md: try: text = markdown_prose(read_utf8(args[0])) except (FileNotFoundError, IsADirectoryError, PermissionError) as e: sys.exit(f'deslop: cannot read {args[0]}: {e.strerror}') else: try: html = read_utf8(args[0]) except (FileNotFoundError, IsADirectoryError, PermissionError) as e: sys.exit(f'deslop: cannot read {args[0]}: {e.strerror}') if '--view' in args: # score one element only: slice from its id= to the next id="view-…" vid = args[args.index('--view') + 1] start = html.find(f'id="{vid}"') if start < 0: sys.exit(f'no element with id "{vid}"') nxt = html.find('id="view-', start + 1) html = html[start:nxt if nxt > 0 else len(html)] text = visible_text(html) # Nothing to score is a failure, not a pass. A cleanse that times out leaves a # zero-byte file, and a gate that stamps an empty file CLEAN reports slop as # clean at exactly the moment the pipeline broke. if not text.split(): sys.exit('deslop: no visible copy to score — empty input') print(f'{len(text.split())} words of visible copy\n') sys.exit(0 if report(audit(text), allow_proof=allow_proof) == 5 else 1)tools/test_cleanse.sh4.1 KBcf428d568bbeupstream ↗
#!/usr/bin/env bash # Regression tests for the copy/notes split in cleanse.sh. # # The split is what keeps the model's change notes out of cleansed.md. Without it # step 4 re-lints the notes as if they were prose and reports CLEAN, which is the # gate lying at the one moment you are relying on it. # # Sources emit_copy out of cleanse.sh rather than reimplementing it, so this test # fails if the real function drifts. No model calls, so it runs in CI. set -uo pipefail HERE="$(cd "$(dirname "$0")" && pwd)" eval "$(sed -n "/^NOTES_SENTINEL=/,/^}$/p" "$HERE/cleanse.sh")" fail=0 check() { # check <name> <condition-result> if [ "$2" = "0" ]; then printf ' ok %s\n' "$1" else printf ' FAIL %s\n' "$1"; fail=1; fi } # ── the ordinary reply ────────────────────────────────────────────────────── out="$(printf 'Line one.\nLine two.\n\n%s\n- killed a tell\n' "$NOTES_SENTINEL" | emit_copy 2>/dev/null)" [ "$out" = "$(printf 'Line one.\nLine two.')" ]; check 'copy is the text above the sentinel' $? err="$(printf 'Copy.\n\n%s\n- killed a tell\n' "$NOTES_SENTINEL" | emit_copy 2>&1 >/dev/null)" case "$err" in *'killed a tell'*) check 'notes go to stderr' 0;; *) check 'notes go to stderr' 1;; esac case "$out" in *'killed a tell'*) check 'notes stay OUT of stdout' 1;; *) check 'notes stay OUT of stdout' 0;; esac # ── a draft that legitimately contains --- ────────────────────────────────── # The old separator was a bare `---`, which is both a markdown rule and a YAML # frontmatter delimiter, so splitting on it truncated any draft containing one. body="$(printf 'Intro.\n\n---\n\nAfter the rule.\nFinal line.\n\n%s\n- a note\n' "$NOTES_SENTINEL" | emit_copy 2>/dev/null)" case "$body" in *'Final line.'*) check 'copy past a --- survives' 0;; *) check 'copy past a --- survives' 1;; esac case "$body" in *'---'*) check 'the --- itself is preserved' 0;; *) check 'the --- itself is preserved' 1;; esac case "$body" in *'a note'*) check 'notes not leaked past a ---' 1;; *) check 'notes not leaked past a ---' 0;; esac # ── no sentinel: fail OPEN, never eat the copy ────────────────────────────── out="$(printf 'Only copy.\nSecond line.\n' | emit_copy 2>/dev/null)" case "$out" in *'Second line.'*) check 'missing sentinel keeps all copy' 0;; *) check 'missing sentinel keeps all copy' 1;; esac err="$(printf 'Only copy.\n' | emit_copy 2>&1 >/dev/null)" case "$err" in *WARNING*) check 'missing sentinel warns loudly' 0;; *) check 'missing sentinel warns loudly' 1;; esac # ── sentinel with nothing after it ────────────────────────────────────────── err="$(printf 'Copy only.\n\n%s\n' "$NOTES_SENTINEL" | emit_copy 2>&1 >/dev/null)" [ -z "$err" ]; check 'empty notes print nothing to stderr' $? # ── the blank lines before the sentinel are not published ─────────────────── # The model separates the sentinel from the copy with a blank line. Without the # trim, every cleansed file ends in trailing whitespace. # Asserted through a FILE, not "$(...)": command substitution strips trailing # newlines, so a $()-based check cannot see this bug at all and passes either way. tmp="$(mktemp)" printf 'Copy ends here.\n\n\n%s\n- a note\n' "$NOTES_SENTINEL" | emit_copy 2>/dev/null >"$tmp" [ "$(wc -c <"$tmp" | tr -d ' ')" = "16" ]; check 'blank lines before the sentinel are trimmed' $? rm -f "$tmp" # ── the sentinel must not match when quoted inside prose ──────────────────── out="$(printf 'We use the `%s` marker.\nStill copy.\n' "$NOTES_SENTINEL" | emit_copy 2>/dev/null)" case "$out" in *'Still copy.'*) check 'sentinel inside a line is not a split point' 0;; *) check 'sentinel inside a line is not a split point' 1;; esac [ "$fail" = "0" ] && echo "all cleanse tests passed" || { echo "cleanse tests FAILED"; exit 1; }tools/test_deslop.py14 KB0a2651fd2cdfupstream ↗
#!/usr/bin/env python3 """Regression tests for the linter. Run: python3 tools/test_deslop.py Two directions, and the second is the one that matters. It is easy to widen a regex until it catches everything, so every widening here is paired with a must-stay-clean case that would break if the rule got greedy. """ import re import subprocess import sys import tempfile import os sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) from deslop import (VOCAB, VOCAB_EXACT, audit, visible_text, _root_pattern, markdown_prose, PROOF) fails = [] def check(name, cond, detail=''): if not cond: fails.append(f'{name}: {detail}') def groups(text): return {k for k, v in audit(text).items() if v} # ── every catalogue word still fires in its own base form ─────────────────── # The obvious stemming fix (strip a trailing "e") silently kills `elevate`, # `leverage`, `delve` and ten others. This test is what catches that. for w in VOCAB: check(f'base form "{w}"', re.search(_root_pattern(w), w.lower()), 'root pattern no longer matches its own base word') for w in VOCAB_EXACT: check(f'exact form "{w}"', 'vocab' in groups(f'We {w} things.'), 'not detected') # ── inflections fire too: the gap that made the tool half-blind ───────────── for w in ('elevates', 'unlocks', 'empowers', 'streamlines', 'leverages', 'harnessing', 'revolutionizes', 'innovation', 'transformational'): check(f'inflection "{w}"', 'vocab' in groups(f'Acme {w} your workflow.'), 'missed') # ── literal senses must NOT fire ──────────────────────────────────────────── # Stemming `crafted` to `craft` would flag a furniture maker. These are the # words that earn their place on the exact-match list. for ok in ('We craft furniture by hand in Leeds.', 'Harness the horse before you load the cart.', 'They walked the length of the valley.'): check('literal sense clean', 'vocab' not in groups(ok), ok) # ── constructions, contracted and not ─────────────────────────────────────── for bad in ("It's not just a tool, it's a platform.", 'It is not just a tool, it is a platform.', 'Whether you are a beginner or a pro, start here.', 'This is where Acme comes in.', "Here's the thing. You need a plan.", 'The result? Teams ship faster.', 'Ready to get started?'): check('construction caught', 'phrases' in groups(bad), bad) check('plain "whether you are" is clean', 'phrases' not in groups('Check whether you are on the latest version.')) # ── rhythm: the repo's own canonical bad example must fail ────────────────── check('no-Oxford tricolon', 'rhythm' in groups('Trusted, reliable and built to last.'), 'the tell quoted in examples/ridgeline-roofing.md scored clean') check('Oxford tricolon', 'rhythm' in groups('It is faster, smarter, and better.')) check('short items are not a tricolon', 'rhythm' not in groups('We shipped red, white, and blue.')) check('fronted adverbial is not a tricolon', 'rhythm' not in groups('On Tuesday, we shipped the release and went home.')) # The discriminator that earns the no-Oxford rule its place: a rhetorical # flourish ends in a phrase, a plain list of services does not. This is the # repo's own shipped hero line — flagging it would be crying wolf. check('service list is not a tricolon', 'rhythm' not in groups('Inspection, repair and replacement for homes and commercial buildings.')) check('or-list is not a tricolon', 'rhythm' not in groups('We do not do gutters, siding, windows or conservatories.')) # ── proof: the canonical fabricated line must fail ────────────────────────── check('canonical invented proof', 'proof' in groups('Loved by 10,000+ happy homeowners.'), 'the line quoted in references/principles.md scored clean') check('small counts too', 'proof' in groups('Trusted by 25 businesses.')) # ── entities: decoded, not leaked ─────────────────────────────────────────── t = visible_text("<p>It's not just a tool, it's a platform.</p>") check('entity apostrophes decoded', "it's not just" in t.lower(), repr(t)) check('entities do not donate semicolons', t.count(';') == 0, repr(t)) check('phrase seen through entities', 'phrases' in groups(t)) check('nbsp becomes a space', visible_text('<p>a b</p>') == 'a b') # ── the gate: empty input must fail, not pass ─────────────────────────────── here = os.path.dirname(os.path.abspath(__file__)) r = subprocess.run([sys.executable, f'{here}/deslop.py', '--text', ''], capture_output=True, text=True) check('empty input exits non-zero', r.returncode != 0, f'exit {r.returncode}') r = subprocess.run([sys.executable, f'{here}/deslop.py', '/nope/missing.html'], capture_output=True, text=True) check('missing file exits non-zero', r.returncode != 0, f'exit {r.returncode}') check('missing file has no traceback', 'Traceback' not in r.stderr, r.stderr[:80]) # ── files are read as UTF-8, whatever the locale ─────────────────────────── # open() with no encoding= uses the locale's, cp1252 on a stock Windows box. A # UTF-8 page then decodes to mojibake and the em-dash and construction rules # never fire, so a page full of tells scores CLEAN. Driven through the CLI on # purpose: --text was always fine, the file paths were the blind spot. Both of # them: .html goes through visible_text, .md through markdown_prose. _dir = tempfile.mkdtemp() _tells = ('It’s not just a tool, it’s a platform. Whether you’re a startup ' 'or an agency, we ship fast — really fast — every week.') for name, body in (('utf8.html', f'<html><body><p>{_tells}</p></body></html>'), ('utf8.md', _tells)): path = os.path.join(_dir, name) with open(path, 'w', encoding='utf-8') as fh: fh.write(body) r = subprocess.run([sys.executable, f'{here}/deslop.py', path], capture_output=True, text=True, encoding='utf-8', errors='replace') check(f'{name} is not decoded as cp1252', r.returncode != 0, 'a UTF-8 page full of tells scored CLEAN - locale decoding is back') check(f'{name}: construction rule fires', 'construction' in r.stdout, r.stdout[:140]) check(f'{name}: em-dash rule fires', 'em-dash' in r.stdout, r.stdout[:140]) # A flagged snippet outside the console codepage must score, not traceback. _cjk = os.path.join(_dir, 'cjk.html') with open(_cjk, 'w', encoding='utf-8') as fh: fh.write('<html><body><p>Our seamless platform 你好 — 世界 ' '— delivers robust value today.</p></body></html>') r = subprocess.run([sys.executable, f'{here}/deslop.py', _cjk], capture_output=True, text=True, encoding='utf-8', errors='replace') check('non-cp1252 snippet does not traceback', 'Traceback' not in r.stderr, r.stderr[-160:]) check('non-cp1252 snippet still scores', 'score' in r.stdout, r.stdout[:140]) # ── clean human copy still scores 5/5 ─────────────────────────────────────── for ok in ('Six nails per shingle, every shingle.', 'You get a written scope and a fixed number before anyone climbs a ladder.', 'We do not do overlays. If the roof needs replacing, it gets stripped.'): check('clean copy stays clean', not groups(ok), f'{ok} -> {groups(ok)}') # ── markdown: a literal is not copy ───────────────────────────────────────── # Every strip below is paired with a case that must survive it, because the # fastest way to make a catalogue score 5/5 is to stop reading the catalogue. md = markdown_prose('Use `delve` here. See [the guide](u.md) for more.') check('inline code is not scored', 'delve' not in md, repr(md)) check('link text survives', 'the guide' in md, repr(md)) check('surrounding prose survives', 'for more' in md, repr(md)) md = markdown_prose('> ~~Trusted, reliable and built to last.~~\n> **Six nails per shingle.**') check('struck specimen is not scored', 'rhythm' not in groups(md), repr(md)) check('the shipped line survives', 'Six nails per shingle' in md, repr(md)) md = markdown_prose('Intro.\n```\nleverage seamless unlock\n```\nOutro.') check('fenced block is not scored', not groups(md), repr(md)) check('prose around the fence survives', 'Intro' in md and 'Outro' in md, repr(md)) # Deleting a code span outright welds the clause into a false rule-of-three. md = markdown_prose('If a claim needs a number you do not have, write `[needs number]` and move on.') check('stripping code invents no tricolon', 'rhythm' not in groups(md), repr(md)) # Two table rows are two lines of copy, not one sentence with a dash pile-up. md = markdown_prose('| a | **3/5** — one thing |\n| b | **5/5** — another thing |') check('table rows do not merge into one cadence', 'punctuation' not in groups(md), repr(md)) # A heading must not run into the sentence beneath it. md = markdown_prose('## Receipts, not claims\nA real run on seven sentences.') check('heading does not weld to body', 'Receipts, not claims A real' not in md, repr(md)) # Markdown handling strips markup only. Real slop in real prose still fails. md = markdown_prose('We leverage seamless, robust and cutting-edge tooling to empower teams.') check('markdown does not soften vocabulary', 'vocab' in groups(md), repr(md)) md = markdown_prose('It is not just a tool, it is a journey.') check('markdown does not soften constructions', 'phrases' in groups(md), repr(md)) md = markdown_prose('- Tier 1 — delete on sight\n- Tier 2 — usually cut') check('bullets do not merge into one cadence', 'punctuation' not in groups(md), repr(md)) # but a genuine pile-up inside one bullet must still fire md = markdown_prose('- Our team — trained, certified and local — is ready to help.') check('dash pile-up inside a bullet still fires', 'punctuation' in groups(md), repr(md)) # ── hyphens: stacking, not the hyphen itself ──────────────────────────────── stack = 'Our industry-leading, context-aware, best-in-class, AI-powered platform ships.' check('four stacked compounds fire', 'punctuation' in groups(stack), stack) for ok in ('We fitted a 25-year warranty and a 4.2-hour call-out on a two-storey roof.', 'The built-up roof needs a full-width strip before the tear-off.', 'A well-known, long-standing trade name.'): check('ordinary hyphenated copy stays clean', 'punctuation' not in groups(ok), f'{ok} -> {groups(ok)}') md = markdown_prose('> ~~Em-dash pile-up~~\n> **Thirty-eight on the crew, factory-trained today.**') check('blockquote lines do not merge', 'punctuation' not in groups(md), repr(md)) # ── proof: a number and its noun live in one sentence ─────────────────────── for hit in ('10,000+ happy users', '500 teams', '2,000 verified customers', '3.5 million customers'): check('real proof claim still caught', PROOF.search(hit), hit) for clean in ('"Don\'t Make Me Think", 2000. The reader decides in seconds.', 'Roofing, and only roofing, since 2001. Customers come back.', 'Version 2.0. Readers can skip it.'): check('proof does not reach across a full stop', not PROOF.search(clean), clean) # ── negated "just": the contracted register counts too ────────────────────── # `\bnot\b` has no standalone token to match inside `isn't`, so an uncontracted-only # pattern scored every contracted form clean — in the register a model reaches for # when it is trying hardest to sound human. The full stop cases matter as much: the # window could not previously cross one. for hit in ("This isn't just a map, it's a plan.", 'It is not just a map. It is a plan.', "SlopMonster isn't just a linter, it's a gate.", "These aren't just words, they're tells.", 'This is not just a map, but a plan.', "It doesn't just score you, it fails the build."): check('negated-just construction caught', 'phrases' in groups(hit), hit) # Paired must-stay-clean cases, per this file's rule. The Y clause needs a comma or a # full stop before its pronoun, which is what stops a bare negation tripping the rule. for clean in ("It's not just about money.", 'Do not just take my word for it.', 'We could not just sit there. The rain kept falling.', 'The lot is not paved, it is grass.', 'He said the price was not right, and we walked away.'): check('negated-just stays clean', 'phrases' not in groups(clean), clean) # ── proof nouns need a closing boundary ───────────────────────────────────── # `sites?` matched inside "sitemaps", `teams?` inside "teamsters". Real proof # claims must still fire; ordinary nouns that merely start with one must not. for clean in ('We generated 12 sitemaps last quarter.', 'The hall seats 20 projectors.', 'We shipped 40 userscripts.', 'The union sent 300 teamsters.'): check('proof noun does not match inside a longer word', 'proof' not in groups(clean), clean) for hit in ('Trusted by 10,000 teams.', 'We host 12 sites.', 'Over 300 clients served.'): check('proof claim still caught', 'proof' in groups(hit), hit) # ── the README's own must-not-fire tricolon example ───────────────────────── # The wolf-crying case the narrowness exists to prevent. If this fires, the # README is lying about the rule. check('README safe tricolon example stays clean', 'rhythm' not in groups('Inspection, repair and replacement for homes and commercial buildings.')) check('README tricolon example still fires', 'rhythm' in groups('Trusted, reliable and built to last.')) if fails: print(f'{len(fails)} FAILED\n') for f in fails: print(f' · {f}') sys.exit(1) print('all tests passed')
Plain-text copy, no login: /skill-bundles/itsssssjack-slopmonster.md