boundary-bbcr-fallback
Execute automatic BBCR (Collapse-Rebirth Correction) when knowledge boundaries are exceeded or reasoning fails.
Manually merge specific semantic nodes to consolidate related concepts and reduce redundancy.
$ npx -y skills add qdhenry/Claude-Command-Suite --agent claude-codeHow it fires
How this command gets triggered: by you, by Claude, or both.
/memory-mergeContext preview
What this command does when you run it.
Manually merge specific semantic nodes to consolidate related concepts and reduce redundancy.
tools: - read - write - edit - grep arguments: $NODE_IDS
Manually merge specific semantic nodes to consolidate related concepts and reduce redundancy.
Based on the WFGY project: https://github.com/onestardao/WFGY
1. **Parse Merge Targets**
2. **Analyze Merge Compatibility**
3. **Create Merged Node**
4. **Build Merge Record**
{
"merged_node": {
"id": "merged_[hash]",
"topic": "Combined topic",
"insight": "Synthesized insight",
"deltaS": weighted_avg,
"lambda": dominant,
"sources": ["node1", "node2", ...],
"merge_timestamp": "ISO_8601"
},
"merge_quality": score,
"information_preserved": percentage
}5. **Update Tree Structure**
NODE MERGE ANALYSIS ═══════════════════════════════════════ Nodes to Merge: [count] Node IDs: $NODE_IDS Merge Compatibility Check: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Node Pair Analysis: ┌─────────────────────────────────────┐ │ Node 1 vs 2 │ ΔS: 0.15 │ ✓ Compatible│ │ Node 1 vs 3 │ ΔS: 0.22 │ ✓ Compatible│ │ Node 2 vs 3 │ ΔS: 0.18 │ ✓ Compatible│ └─────────────────────────────────────┘ Overall Compatibility: [percentage]% Merge Feasibility: [HIGH/MEDIUM/LOW] Nodes Being Merged: ──────────────────────────────────────── Node 1: [id] • Topic: "[topic]" • ΔS: [value] | λ: [direction] • Insight: "[insight preview]" Node 2: [id] • Topic: "[topic]" • ΔS: [value] | λ: [direction] • Insight: "[insight preview]" Node 3: [id] • Topic: "[topic]" • ΔS: [value] | λ: [direction] • Insight: "[insight preview]" Merge Strategy: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Common Themes Identified: • [Theme 1] - appears in all nodes • [Theme 2] - in nodes 1,2 • [Theme 3] - unique to node 3 Conflict Resolution: ⚠️ Contradiction in: [aspect] Node 1 says: [position] Node 2 says: [position] Resolution: [synthesized position] MERGED NODE PREVIEW: ═══════════════════════════════════════ New Node ID: merged_[hash] Combined Topic: "[Synthesized topic covering all aspects]" Synthesized Insight: "[Complete merged insight incorporating all unique information from source nodes]" Merged Metrics: • ΔS: [weighted_avg] (from [min]-[max]) • λ: [dominant] (most common direction) • E_resonance: [mean] • Confidence: [averaged]% Information Preservation: ┌─────────────────────────────────────┐ │ Aspect │ Preserved │ Lost │ ├─────────────────────────────────────┤ │ Key Insights │ 95% │ 5% │ │ Relationships │ 100% │ 0% │ │ Context │ 88% │ 12% │ │ Metrics │ Averaged │ Range │ │ Overall │ 92% │ 8% │ └─────────────────────────────────────┘ Relationship Updates: • Parents: [Combined parent list] • Children: [Combined child list] • References: [Updated count] Confirm Merge? [Yes/No/Modify] Post-Merge Actions: • Original nodes: [Archive/Delete] • References: Auto-updated • Indices: Rebuilt • History: Preserved in merge log
Nearly identical nodes (ΔS < 0.1)
[Node A] + [Node A'] → [Node A_merged]
Related concepts (ΔS < 0.3)
[Auth_JWT] + [Auth_OAuth] → [Auth_Combined]
Multiple related nodes
[A] + [B] + [C] + [D] → [Cluster_Summary]
Same concept over time
[Concept_v1] + [Concept_v2] → [Concept_latest]
# Force merge despite conflicts /memory:merge "node1,node2" --force # Preview merge without executing /memory:merge "node1,node2" --preview # Merge with custom resolution /memory:merge "node1,node2" --resolve "keep_newest" # Merge entire cluster /memory:merge --cluster "cluster_id"
Merging coordinates with:
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:…