BeClaude

thoroughness-enforcer

New
1Community RegistryGeneralby John Lindquist · MIT

Enforces task completion when prompts contain thoroughness indicators like 'all', 'every', 'thorough'

Community PluginView Source

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:

  1. Captures the initial prompt and analyzes it for thoroughness indicators
  2. Injects context reminding the agent about the user's thoroughness expectations
  3. Blocks stopping until the agent verifies the work is complete (up to 3 review checkpoints)
  4. Generates review prompts tailored to the original request

Installation

From GitHub

bash
claude plugin install thoroughness-enforcer@johnlindquist

Local Development

bash
# 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 local

How 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:

  1. Extracts the instruction portion using the criteria above
  2. Analyzes for thoroughness indicators
  3. If thoroughness detected, updates session state and injects a reminder
  4. Tracks history of thoroughness detections across the session

Stop Hook

When the agent attempts to stop:

  1. Checks if the initial prompt had thoroughness indicators
  2. If yes, blocks stopping and prompts the agent to verify completeness
  3. Uses a 3-strike safety valve to prevent infinite loops
  4. 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_DENIALS constant (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:

code
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:

code
[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 issues

Plugin 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:

  1. User asks a simple question → no thoroughness
  2. User later says "Now check all edge cases" → thoroughness detected, enforcement begins
  3. Stop attempts are blocked until verification is complete

Development

bash
# Run tests
bun test

# Type check
bun run typecheck  # or: bunx tsc --noEmit

License

MIT

Install & Usage

1
Create the skills directory
mkdir -p .claude/skills
2
Download the skill file
mkdir -p .claude/skills && curl -o .claude/skills/thoroughness-enforcer.md https://raw.githubusercontent.com/johnlindquist/thoroughness-enforcer/main/SKILL.md
3
Invoke in Claude Code
/thoroughness-enforcer
View source on GitHub
hooksstopthoroughnesscompletionenforcer

Frequently 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.