white-bear

$npx mdskill add jongwony/epistemic-protocols/white-bear

Audit prose for negative framing before commit.

  • Detects prohibited phrasing in LLM-facing files.
  • Reads SKILL.md, agent prompts, and style files.
  • Uses grep and glob to scan working-tree content.
  • Emits structured findings for human review.
SKILL.md
.github/skills/white-bearView on GitHub ↗
---
name: white-bear
description: This skill should be used when the user asks to "check white bear", "audit prohibition phrasing", "find negative framing", or invokes /white-bear. Reviews LLM-facing prose in this project's plugin SKILL.md files, project-local skills, agent prompts, and Output Style files for White Bear compliance (positive rationale over negative prohibition). Project-local contributor tooling.
allowed-tools: Read, Grep, Glob
---

# White Bear Audit

Review LLM-facing prose for compliance with the White Bear authoring principle: prefer positive rationale over negative prohibition. Project-local contributor utility; emits structured findings without writing fixes.

## Purpose

Surface phrasing patterns that evoke the prohibited target through negative framing before they land on `main`. Findings are presented for review; the human author decides which to rewrite, mark as load-bearing, or dismiss.

## Inputs

**Manual invocation only** (interactive `/white-bear`):
- The caller passes target file paths or a glob; with no argument, the skill enumerates the in-scope set under the working tree HEAD.
- Files are read at their working-tree state — the post-edit, pre-commit content the contributor is about to ship.

## Scope

**In scope** (LLM-facing prose where this principle applies):
- `*/skills/*/SKILL.md` — protocol and utility skill prose, outside formal blocks
- `.claude/skills/*/SKILL.md` — project-local skill prose, outside formal blocks
- `*/agents/*.md` — agent system-prompt prose
- `epistemic-cooperative/styles/*.md` — Output Style prose

**Out of scope** (positively framed — these regions remain compliant by purpose):
- Formal blocks within SKILL.md files: regions delimited by `── FLOW ──`, `── MORPHISM ──`, `── TYPES ──`, `── PHASE TRANSITIONS ──`, `── LOOP ──`, `── TOOL GROUNDING ──`, `── MODE STATE ──`, `── COMPOSITION ──`, and any `── <NAME> ──` block. Formal definition layers where notation patterns are content.
- Fenced code blocks (` ``` ... ``` `) — code is content, and example code attached to a definition is part of that definition.
- Files under `docs/`, `CLAUDE.md`, `README*.md`, `*/references/*.md` — contributor documentation where examples serve human comprehension.
- Files under `.claude/rules/` and `.claude/principles/` — rule prose admits intentional negative formulations as discriminant signals (operational test in `safeguards.md §White Bear Avoidance`). One-pass audit across these files would erase calibration signals at intentionally preserved decision points.
- Files under `.insights/`, `memory/` — session and context substrates outside this skill's audit surface.

## What to evaluate

The principle prose is loaded into the session context by the Claude Code harness via `.claude/rules/safeguards.md §White Bear Avoidance`. Apply that definition directly; the prose is authoritative.

For each in-scope file, consider every prose sentence outside formal blocks and code fences:

A **White Bear signal** is a sentence in LLM-facing prose framed as a prohibition (do not, never, avoid, must not, should not, cannot) that admits a positive restatement preserving the directive's force. A sentence whose load-bearing meaning collapses without the prohibition (a safety boundary the LLM observes, a contract the LLM honors) remains compliant; the test is whether a positive restatement preserves both the directive's force and its meaning.

**Cited preserved-prohibition carve-outs** (treat as compliant by purpose, surface only as `severity: low` if the rewrite preference is judgment-dependent):
- Prothesis Rule 14 — Phase 3 `Await` wait discipline (passive completion barrier vs active polling at the per-turn decision point)
- Aitesis substrate boundary (legitimate inference vs substrate violation per inference)
- Katalepsis Rule 11 — verification-gate 1-correct option design (comprehension verification vs decision-axis selection by purpose)
- Prosoche Stop-as-Gate (subagent return path vs main-agent gate interaction at the `GATE_DETECTED` decision point)
- Epharmoge Layer 2 auto-activation prohibition (deliberate user invocation vs AI speculative activation at protocol activation)

For each candidate finding, prefer the rewrite that preserves the directive's meaning while satisfying the principle. Treat ambiguous cases as `severity: low` and surface them for human triage.

## Output

Emit a single JSON object as the final assistant message.

```json
{
  "summary": {
    "files_audited": 0,
    "findings_total": 0,
    "by_severity": {"high": 0, "medium": 0, "low": 0}
  },
  "findings": [
    {
      "file": "<repo-relative path>",
      "line": 0,
      "severity": "high",
      "excerpt": "<verbatim text from the file — single line or short span>",
      "rationale": "<one sentence: which aspect of the principle this excerpt invites, and how a positive restatement would land>",
      "suggested_rewrite": "<a candidate restatement that preserves directive force>"
    }
  ]
}
```

Severity calibration:

| Severity | Surface |
|----------|---------|
| `high` | Rules sections, Phase prose, agent system prompts — places where prohibition materially shapes downstream LLM behavior |
| `medium` | Distinctions, Composition notes, scope-boundary descriptions in supporting sections |
| `low` | Borderline cases where the rewrite preference is judgment-dependent and a contributor may legitimately keep the original |

When zero findings result, emit the JSON object with empty `findings` array and zero counts. The summary always emits.

## Self-application

This SKILL.md is itself in scope. The audit may surface findings against the prose above; rewrite in place when the rewrite preserves directive force. Findings against this file are first-class — the audit's own definition is subject to the same review as any other in-scope file.

## Distinction

| Surface | Mechanism | Failure mode handled |
|---------|-----------|---------------------|
| `verify` | Deterministic static checks (JSON schema, notation, cross-ref, graph, encapsulation BANNED patterns, language purity) | Structural drift between coupled artifacts; literal pattern leaks |
| `white-bear` | Claude-judge semantic review of LLM-facing prose | Negative-framing drift that survives structural validity |
| `zero-shot` | Sibling semantic audit | Few-shot anchoring drift |
| `encapsulation` | Sibling semantic audit | Contributor-knowledge assumption drift; BANNED-bypass rephrasing |

The verify surface runs deterministically at pre-commit and CI; semantic audits run on-demand via their slash commands. Each maintains its own confidence curve.

## Stage classification

Stage 2 evidence-collection instrument. Findings carry the N=1 dogfooding caveat inherent to a project where the audit definition, the rule prose, and the contributor are entangled. Architectural inscription — promoting any pattern observed across findings into a deterministic verify check — waits on Stage 2 variation-stable retention evidence accumulating across multiple PRs and contributors.
More from jongwony/epistemic-protocols