boundary-bbcr-fallback
Execute automatic BBCR (Collapse-Rebirth Correction) when knowledge boundaries are exceeded or reasoning fails.
Measure semantic resonance (E_resonance) to assess reasoning stability and coherence over time.
$ npx -y skills add qdhenry/Claude-Command-Suite --agent claude-codeHow it fires
How this command gets triggered: by you, by Claude, or both.
/reasoning-resonanceContext preview
What this command does when you run it.
Measure semantic resonance (E_resonance) to assess reasoning stability and coherence over time.
tools: - read - write - grep - bash
Measure semantic resonance (E_resonance) to assess reasoning stability and coherence over time.
Based on the WFGY project: https://github.com/onestardao/WFGY
1. **Initialize Resonance Analysis**
2. **Calculate E_resonance**
E_resonance = Rolling_Mean(|B|) over last n nodes Where: B = Semantic residue from BBMC |B| = Magnitude of residue n = Window size Weighted formula: E_res = Σ(w_i * |B_i|) / Σ(w_i) w_i = decay^(n-i)
3. **Analyze Resonance Patterns**
4. **Identify Resonance Sources**
5. **Generate Stability Report**
SEMANTIC RESONANCE ANALYSIS
═══════════════════════════════════════
Current E_resonance: [value]
Stability Status: [Stable/Moderate/Unstable/Critical]
Resonance Visualization:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Low Medium High
0.0 0.5 1.0
[═══════════▼═════════════]
[value]
Resonance Over Time:
────────────────────────────────────────
1.0 │ ╱╲
0.8 │ ╱ ╲ ╱╲
0.6 │ ╱ ╲ ╱ ╲ ⚠️
0.4 │ ╱ ╲╱ ╲ ╱
0.2 │ ╱ ╲╱ ← Current
0.0 └──────────────────────────
-30 -20 -10 0
Nodes Ago
Window Analysis:
┌─────────────────────────────────────┐
│ Window │ E_res │ Trend │ Status │
├─────────────────────────────────────┤
│ 5 nodes │ 0.42 │ ↑ │ ⚠️ Rising│
│ 10 nodes│ 0.38 │ → │ Stable │
│ 20 nodes│ 0.35 │ ↓ │ ✓ Good │
└─────────────────────────────────────┘
Resonance Components:
• Semantic Residue: [average |B|]
• Variation: [standard deviation]
• Peak Value: [max |B|]
• Frequency: [oscillation rate]
Stability Factors:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Positive (Stabilizing):
✓ Consistent topic focus
✓ Logical progression
✓ Low ΔS transitions
Negative (Destabilizing):
⚠️ Rapid context switches
⚠️ Unresolved contradictions
⚠️ Increasing complexity
Resonance Sources Identified:
1. Node [id]: High residue ([value]) - [reason]
2. Node [id]: Logic jump - [description]
3. Node [id]: Context switch - [description]
Harmonic Analysis:
• Fundamental Frequency: [value] cycles/node
• Dominant Period: [value] nodes
• Phase Coherence: [percentage]%
• Entropy: [value]
Risk Assessment:
────────────────────────────────────────
Current Risk: [Low/Medium/High/Critical]
Breakdown Probability: [percentage]%
Time to Critical (if rising): [nodes]
Stabilization Recommendations:
1. [Primary action to reduce resonance]
2. [Secondary measure]
3. [Preventive step]
Suggested Commands:
• Reduce resonance: /wfgy:bbmc
• Stabilize logic: /reasoning:chain-validate
• Focus attention: /wfgy:bbam
• Create checkpoint: /memory:checkpointE: 0.2 → 0.2 → 0.3 → 0.2 → 0.2
E: 0.2 → 0.5 → 0.2 → 0.6 → 0.2
E: 0.3 → 0.4 → 0.5 → 0.6 → 0.7
E: 0.7 → 0.8 → 0.85 → 0.9 → BBCR
# Custom window size /reasoning:resonance --window 15 # Frequency analysis /reasoning:resonance --fourier # Predictive modeling /reasoning:resonance --predict 10 # Compare with baseline /reasoning:resonance --baseline
Resonance measurement feeds:
A comprehensive development toolkit designed following Anthropic's Claude Code Best Practices for AI-assisted software development.
Repo: qdhenry/Claude-Command-Suite
Execute automatic BBCR (Collapse-Rebirth Correction) when knowledge boundaries are exceeded or reasoning fails.
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:…