thoroughness-enforcer
NewEnforces task completion when prompts contain thoroughness indicators like 'all', 'every', 'thorough'
Overview
A Claude Code plugin that automatically detects when users expect thorough, comprehensive work and enforces task completion before allowing the agent to stop.
What It Does
When a user's prompt contains thoroughness indicators like:
- •High confidence: "exhaustive", "thorough", "comprehensive", "deep dive", "ultrathink"
- •Medium confidence: "all", "every", "each", "entire", "complete", "fully"
- •Contextual: "make sure", "ensure", "verify all", "check all"
The plugin:
- Captures the initial prompt and analyzes it for thoroughness indicators
- Injects context reminding the agent about the user's thoroughness expectations
- Blocks stopping until the agent verifies the work is complete (up to 3 review checkpoints)
- Generates review prompts tailored to the original request
Installation
From GitHub
claude plugin install thoroughness-enforcer@johnlindquistLocal Development
# Clone the repo
git clone https://github.com/johnlindquist/thoroughness-enforcer.git
# Install dependencies
cd thoroughness-enforcer
bun install
# Install as local plugin (from the repo directory)
claude plugin install . --scope localHow It Works
UserPromptSubmit Hook
On every user prompt, the plugin checks if the prompt should be analyzed:
Word count criteria:
- •If prompt is < 250 words → analyze the full prompt
- •If prompt is >= 250 words with a
---separator → analyze text after the last separator (if < 250 words) - •Otherwise → skip analysis (likely a context dump)
This allows users to paste large chunks of text (logs, code, error messages) while still having their actual instructions analyzed for thoroughness.
On each qualifying prompt:
- Extracts the instruction portion using the criteria above
- Analyzes for thoroughness indicators
- If thoroughness detected, updates session state and injects a reminder
- Tracks history of thoroughness detections across the session
Stop Hook
When the agent attempts to stop:
- Checks if the initial prompt had thoroughness indicators
- If yes, blocks stopping and prompts the agent to verify completeness
- Uses a 3-strike safety valve to prevent infinite loops
- Generates specific review checklists based on the original request
Configuration
The plugin uses sensible defaults. To customize behavior, you can fork and modify:
- •
src/analyzer.ts- Thoroughness indicators and confidence logic - •
src/state.ts-MAX_STOP_DENIALSconstant (default: 3)
Examples
Simple Prompt
User prompt:
"Fix all TypeScript errors in the codebase and make sure every file compiles"
Plugin detects:
- •"all" (medium confidence)
- •"every" (medium confidence)
- •"make sure" (low confidence)
- •Combined: medium confidence thoroughness
On first stop attempt:
THOROUGHNESS CHECK (Attempt 1/3)
The user's original request contained thoroughness indicators: "all", "every", "make sure"
Original request:
"Fix all TypeScript errors in the codebase and make sure every file compiles"
Before stopping, verify:
1. Have you addressed ALL TypeScript errors?
2. Did you check EVERY file, not just obvious ones?
3. Have you run the compiler to verify success?
Continue working if anything remains incomplete.Prompt with Large Context
When pasting large chunks of text, use --- to separate context from instructions:
User prompt:
[ERROR] 2024-01-10 10:15:32 - Connection failed to database
[ERROR] 2024-01-10 10:15:33 - Retry attempt 1 failed
[ERROR] 2024-01-10 10:15:34 - Retry attempt 2 failed
... (hundreds of log lines)
---
Analyze these logs thoroughly and fix all the connection issuesPlugin behavior:
- •Total prompt is > 250 words → checks for separator
- •Finds
---separator - •Text after separator ("Analyze these logs thoroughly...") is < 250 words
- •Analyzes only the instruction portion
- •Detects "thoroughly" and "all" → high confidence thoroughness
Subsequent Prompts
Thoroughness is checked on every qualifying prompt, not just the first:
- User asks a simple question → no thoroughness
- User later says "Now check all edge cases" → thoroughness detected, enforcement begins
- Stop attempts are blocked until verification is complete
Development
# Run tests
bun test
# Type check
bun run typecheck # or: bunx tsc --noEmitLicense
MIT
Install & Usage
mkdir -p .claude/skillsmkdir -p .claude/skills && curl -o .claude/skills/thoroughness-enforcer.md https://raw.githubusercontent.com/johnlindquist/thoroughness-enforcer/main/SKILL.md/thoroughness-enforcerFrequently Asked Questions
What is thoroughness-enforcer?
Enforces task completion when prompts contain thoroughness indicators like 'all', 'every', 'thorough'
How to install thoroughness-enforcer?
To install thoroughness-enforcer, create the .claude/skills directory in your project, then run the curl command to download the skill file. Once installed, invoke it in Claude Code with /thoroughness-enforcer.
What is thoroughness-enforcer best for?
thoroughness-enforcer is a community categorized under General. It is designed for: hooks, stop, thoroughness, completion, enforcer. Created by John Lindquist.