/semantic-tree-import
Import a previously exported semantic tree to restore memory, continue work, or share knowledge.
$ npx -y skills add qdhenry/Claude-Command-Suite --agent claude-codeHow it fires
How this command gets triggered: by you, by Claude, or both.
- Fires itselfClaude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/semantic-tree-import
Context preview
What this command does when you run it.
Import a previously exported semantic tree to restore memory, continue work, or share knowledge.
Command definition
semantic-tree-import.mdtools:
- read
- write
- edit
- bash
arguments: $FILENAME
Semantic Tree Import
Import a previously exported semantic tree to restore memory, continue work, or share knowledge.
Based on the WFGY project: https://github.com/onestardao/WFGY
Instructions
1. **Validate Import File**
- Locate file: "$FILENAME" in `./exports/` or provided path
- Detect format from extension or content:
- `.txt`: Plain text WFGY export
- `.json`: JSON structured export
- Verify file header and version compatibility
- Check for corruption or tampering (checksum if available)
2. **Parse Tree Data**
- Extract metadata:
- Tree name and ID
- Export date and version
- Node count and statistics
- Parse nodes based on format:
- TXT: Split by delimiter, parse fields
- JSON: Direct object parsing
- Validate node structure:
- Required fields present
- Valid ΔS values (0.0 - 1.0)
- Valid λ symbols (→←<>×)
- Valid modules (BBMC/BBPF/BBCR/BBAM)
3. **Check for Conflicts**
- Search for existing tree with same name
- If exists, offer options:
- Replace existing tree
- Merge with existing (append nodes)
- Create with new name (auto-suffix)
- Cancel import
- Check for duplicate node IDs
- Verify relationship integrity
4. **Import Tree Structure**
- Create tree file in `.wfgy/trees/`
- Import nodes in chronological order
- Rebuild relationships:
- Parent-child connections
- Cross-references
- Bridge connections
- Reconstruct indices
- Restore checkpoints if present
5. **Post-Import Processing**
- Recalculate statistics:
- Total/average ΔS
- Module distribution
- Tree depth
- Rebuild search indices
- Verify relationship integrity
- Update `.wfgy/trees/registry.json`
- Log import in `.wfgy/logs/imports.log`
6. **Activation Options**
- Ask to activate imported tree:
- Yes: Set as active tree
- No: Keep current active tree
- Update `.wfgy/context.json` if activated
- Create import report
Output Format
Semantic Tree Import Successful
═══════════════════════════════════════
Imported Tree: [name]
Source File: $FILENAME
Import Date: [timestamp]
Import Statistics:
- Nodes Imported: [count]/[total]
- Time Range: [first] to [last]
- File Version: [version]
- Compatibility: ✓ Full
Tree Analysis:
- Average ΔS: [value]
- Primary Module: [BBMC/BBPF/BBCR/BBAM]
- Max Depth: [value]
- Branches: [count]
Validation Results:
✓ Header valid
✓ Nodes structure correct
✓ Relationships preserved
✓ No conflicts detected
Tree Status: [Active/Inactive]
Next Steps:
1. View imported tree: /semantic:tree-view
2. Continue building: /semantic:node-build
3. Switch to tree: /semantic:tree-switch "[name]"
Import Modes
Replace Mode
/semantic:tree-import "backup.txt" --replace
Overwrites existing tree with same name
Merge Mode
/semantic:tree-import "additional.txt" --merge
Appends nodes to existing tree
Safe Mode (Default)
/semantic:tree-import "tree.txt"
Creates new tree, auto-renames if conflict
Error Handling
Common issues and solutions:
**Version Mismatch**
Warning: File version 0.9.0, current 1.0.0
Attempting compatibility mode...
[List of adjusted fields]
**Corrupted Nodes**
Error: Node 45 has invalid structure
Options:
1. Skip corrupted nodes
2. Attempt repair
3. Cancel import
**Missing Relationships**
Warning: 3 nodes reference missing parents
Auto-creating placeholder nodes...
Compatibility
Supports imports from:
- WFGY v0.9.0 and higher
- Other WFGY-compatible systems
- Partial trees (with warnings)
- Compressed exports
Advanced Options
# Import and activate immediately
/semantic:tree-import "tree.txt" --activate
# Import with validation only (dry run)
/semantic:tree-import "tree.txt" --validate-only
# Import specific date range
/semantic:tree-import "tree.txt" --from "2024-01-01" --to "2024-01-31"
# Import and merge with existing
/semantic:tree-import "tree.txt" --merge --tree "Existing Tree"
Read more
tools: - read - write - edit - bash arguments: $FILENAME
Semantic Tree Import
Import a previously exported semantic tree to restore memory, continue work, or share knowledge.
Based on the WFGY project: https://github.com/onestardao/WFGY
Instructions
1. **Validate Import File**
- Locate file: "$FILENAME" in `./exports/` or provided path
- Detect format from extension or content:
- `.txt`: Plain text WFGY export
- `.json`: JSON structured export
- Verify file header and version compatibility
- Check for corruption or tampering (checksum if available)
2. **Parse Tree Data**
- Extract metadata:
- Tree name and ID
- Export date and version
- Node count and statistics
- Parse nodes based on format:
- TXT: Split by delimiter, parse fields
- JSON: Direct object parsing
- Validate node structure:
- Required fields present
- Valid ΔS values (0.0 - 1.0)
- Valid λ symbols (→←<>×)
- Valid modules (BBMC/BBPF/BBCR/BBAM)
3. **Check for Conflicts**
- Search for existing tree with same name
- If exists, offer options:
- Replace existing tree
- Merge with existing (append nodes)
- Create with new name (auto-suffix)
- Cancel import
- Check for duplicate node IDs
- Verify relationship integrity
4. **Import Tree Structure**
- Create tree file in `.wfgy/trees/`
- Import nodes in chronological order
- Rebuild relationships:
- Parent-child connections
- Cross-references
- Bridge connections
- Reconstruct indices
- Restore checkpoints if present
5. **Post-Import Processing**
- Recalculate statistics:
- Total/average ΔS
- Module distribution
- Tree depth
- Rebuild search indices
- Verify relationship integrity
- Update `.wfgy/trees/registry.json`
- Log import in `.wfgy/logs/imports.log`
6. **Activation Options**
- Ask to activate imported tree:
- Yes: Set as active tree
- No: Keep current active tree
- Update `.wfgy/context.json` if activated
- Create import report
Output Format
Semantic Tree Import Successful ═══════════════════════════════════════ Imported Tree: [name] Source File: $FILENAME Import Date: [timestamp] Import Statistics: - Nodes Imported: [count]/[total] - Time Range: [first] to [last] - File Version: [version] - Compatibility: ✓ Full Tree Analysis: - Average ΔS: [value] - Primary Module: [BBMC/BBPF/BBCR/BBAM] - Max Depth: [value] - Branches: [count] Validation Results: ✓ Header valid ✓ Nodes structure correct ✓ Relationships preserved ✓ No conflicts detected Tree Status: [Active/Inactive] Next Steps: 1. View imported tree: /semantic:tree-view 2. Continue building: /semantic:node-build 3. Switch to tree: /semantic:tree-switch "[name]"
Import Modes
Replace Mode
/semantic:tree-import "backup.txt" --replace
Overwrites existing tree with same name
Merge Mode
/semantic:tree-import "additional.txt" --merge
Appends nodes to existing tree
Safe Mode (Default)
/semantic:tree-import "tree.txt"
Creates new tree, auto-renames if conflict
Error Handling
Common issues and solutions:
**Version Mismatch**
Warning: File version 0.9.0, current 1.0.0 Attempting compatibility mode... [List of adjusted fields]
**Corrupted Nodes**
Error: Node 45 has invalid structure Options: 1. Skip corrupted nodes 2. Attempt repair 3. Cancel import
**Missing Relationships**
Warning: 3 nodes reference missing parents Auto-creating placeholder nodes...
Compatibility
Supports imports from:
- WFGY v0.9.0 and higher
- Other WFGY-compatible systems
- Partial trees (with warnings)
- Compressed exports
Advanced Options
# Import and activate immediately /semantic:tree-import "tree.txt" --activate # Import with validation only (dry run) /semantic:tree-import "tree.txt" --validate-only # Import specific date range /semantic:tree-import "tree.txt" --from "2024-01-01" --to "2024-01-31" # Import and merge with existing /semantic:tree-import "tree.txt" --merge --tree "Existing Tree"
A comprehensive development toolkit designed following Anthropic's Claude Code Best Practices for AI-assisted software development.
Repo: qdhenry/Claude-Command-Suite
Other commands on claude-command-suite.
- /boundary-bbcr-fallback
Execute automatic BBCR (Collapse-Rebirth Correction) when knowledge boundaries are exceeded or reasoning fails.
Open command - /boundary-detect
Analyze semantic position relative to knowledge boundaries to prevent hallucination and identify uncertainty zones.
Open command - /boundary-heatmap
Generate a visual heatmap of knowledge boundaries showing safe zones, risk areas, and semantic coverage.
Open command - /boundary-risk-assess
Evaluate the current risk level and provide detailed analysis of potential hallucination or reasoning failure.
Open command - /boundary-safe-bridge
Find and construct semantic bridges to safely navigate from current position to target concept without crossing dangerous boundaries.
Open command - /optimize-prompt
Takes an input prompt and returns ONLY a token-optimized version that preserves meaning while minimizing token count. Based on LLM tokenization principles: common words tokenize more efficiently, unusual words break into more tokens, and conciseness reduces cost.
Open command

