[Feature Request] Mechanism to make CLAUDE.md instructions binding/mandatory, not advisory

Status Closed — not planned
Maintainer reply None cached
Activity 3 comments · opened Dec 18, 2025 · closed Feb 14, 2026

Problem Statement

Currently, CLAUDE.md instructions are loaded as context but are fundamentally advisory. Claude can choose to ignore or forget these instructions mid-session. This creates a critical gap for users trying to enforce quality/safety policies.

Real-World Example

We implemented an "Anti-ABK" (Assumption-Based Knowledge) protocol requiring Claude to call hemisphere-languages MCP tools to verify syntax before writing code. Despite:

  1. Clear instructions in CLAUDE.md
  2. A PreToolUse hook that blocks Edit/Write without verification
  3. Behavioral checkpoint documentation

Claude still wrote syntactically invalid TypeScript files. The hook verified that lang_search was called, but couldn't verify that Claude actually applied the verification results.

The Architectural Gap

| Layer | Enforcement Level |
|-------|------------------|
| CLAUDE.md instructions | Advisory - Claude can ignore |
| PreToolUse hooks | Tool-blocking only - can't enforce cognition |
| PostToolUse hooks | Reactive only - damage already done |
| MCP tools | Optional - Claude chooses to call |

What's Missing

  1. No "strict mode" that makes CLAUDE.md rules non-bypassable
  2. No cognitive enforcement - hooks block tools, not reasoning patterns
  3. No output validation - hooks can't verify that tool output quality matches requirements
  4. No binding between verification and action - calling a verification tool doesn't guarantee applying its results

Suggested Solutions

  1. Mandatory instruction flag in CLAUDE.md:

``markdown
<!-- @mandatory -->
## Anti-ABK Protocol
You MUST call lang_search before writing code.
``

  1. PostToolUse validation hooks that can:
  • Run linters/compilers on written files
  • Revert changes if validation fails
  • Force Claude to retry with explicit error context
  1. Bound verification pattern:
  • Require verification tool output hash to be referenced in edit
  • Hook validates that edit content matches verified patterns
  1. Cognitive checkpoints (ambitious):
  • Hook that fires before Claude completes reasoning
  • Can inject "STOP - did you verify?" prompts
  • Block response generation until checkpoint satisfied

Impact

Without mandatory enforcement, any safety/quality policy in CLAUDE.md is only as strong as Claude's willingness to follow it in that moment. This undermines the entire purpose of instruction files for enterprise/production use cases.

Environment

  • Claude Code CLI
  • Using PreToolUse hooks for enforcement
  • MCP servers for verification tools

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗