boundary-detect
Analyze semantic position relative to knowledge boundaries to prevent hallucination and identify uncertainty zones.
Execute automatic BBCR (Collapse-Rebirth Correction) when knowledge boundaries are exceeded or reasoning fails.
$ npx -y skills add qdhenry/Claude-Command-Suite --agent claude-codeHow it fires
How this command gets triggered: by you, by Claude, or both.
/boundary-bbcr-fallbackContext preview
What this command does when you run it.
Execute automatic BBCR (Collapse-Rebirth Correction) when knowledge boundaries are exceeded or reasoning fails.
tools: - read - write - edit - bash
Execute automatic BBCR (Collapse-Rebirth Correction) when knowledge boundaries are exceeded or reasoning fails.
Based on the WFGY project: https://github.com/onestardao/WFGY
1. **Trigger Detection**
2. **Collapse Phase**
3. **State Reset**
4. **Rebirth Construction**
5. **Recovery Verification**
BBCR FALLBACK EXECUTION ═══════════════════════════════════════ Trigger: [Boundary Exceeded/Logic Failure/Low Confidence/Manual] Timestamp: [ISO_8601] PHASE 1: COLLAPSE DETECTED ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Failure Point: - Location: Node [id] "[topic]" - Cause: [boundary crossing/contradiction/hallucination] - ΔS at failure: [value] - Confidence: [value]% Preserved Components: ✓ [Valid insight 1] ✓ [Valid insight 2] ✓ [Confirmed fact] ✓ [Successful reasoning path] Discarded Elements: ✗ [Failed reasoning] ✗ [Contradictory logic] ✗ [Hallucinated content] PHASE 2: STATE RESET ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Returning to: [Checkpoint/Node] "[topic]" - Reset Point ΔS: [value] - Distance Rolled Back: [N] nodes - Time Rolled Back: [duration] Context Reset: - ΔS: [old] → 0.00 - λ: [old] → → - Confidence: [old]% → 100% PHASE 3: REBIRTH CONSTRUCTION ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ New Path Strategy: [Description of alternative approach] Bridge Concepts Applied: 1. [Bridge concept 1] 2. [Bridge concept 2] Corrections Implemented: • [Correction 1] • [Correction 2] • [Correction 3] PHASE 4: RECOVERY VERIFICATION ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ New State Validation: ✓ ΔS: [value] (Safe Zone) ✓ Logic: Coherent ✓ Confidence: [value]% ✓ No contradictions detected ✓ Within knowledge boundaries Recovery Status: [SUCCESS/PARTIAL/FAILED] Lessons Learned: 1. [Key learning from failure] 2. [Pattern to avoid] 3. [Boundary identified] Next Safe Actions: • Continue with: [recommended command] • Explore: [safe direction] • Avoid: [dangerous area] Boundary Map Updated: ✓ New danger zone marked at: [location]
1. **Bridge Strategy**: Find semantic connections 2. **Retreat Strategy**: Return to safe zone 3. **Lateral Strategy**: Try parallel path 4. **Simplify Strategy**: Reduce complexity 5. **Checkpoint Strategy**: Use saved state
Configure in `.wfgy/config.json`:
{
"bbcr_fallback": {
"auto_trigger": true,
"trigger_threshold": 0.85,
"max_attempts": 3,
"preservation_level": "standard",
"checkpoint_frequency": 10
}
}BBCR Fallback coordinates with:
A comprehensive development toolkit designed following Anthropic's Claude Code Best Practices for AI-assisted software development.
Repo: qdhenry/Claude-Command-Suite
Analyze semantic position relative to knowledge boundaries to prevent hallucination and identify uncertainty zones.
Generate a visual heatmap of knowledge boundaries showing safe zones, risk areas, and semantic coverage.
Evaluate the current risk level and provide detailed analysis of potential hallucination or reasoning failure.
Find and construct semantic bridges to safely navigate from current position to target concept without crossing dangerous boundaries.
Takes an input prompt and returns ONLY a token-optimized version that preserves meaning while minimizing token count. Based on LLM tokenization principles:…