Slash Commands Referenceο
The BioMapper Framework Triad provides slash commands for manual framework activation when automatic detection isnβt sufficient or when you want explicit control. These commands are integrated with the UnifiedBiomapperAgent for seamless operation.
Note
Slash commands are primarily for Claude Code integration. In most cases, automatic detection from natural language is preferred.
Available Commandsο
/biomapper-surgicalο
Purpose: Activate Surgical Framework for internal action logic fixes
Syntax: /biomapper-surgical [ACTION_NAME]
- Parameters:
ACTION_NAME(optional) - Target action to modifyIf omitted, uses
auto_detectmode
Example Usage:
# Specific action
/biomapper-surgical GENERATE_MAPPING_VISUALIZATIONS
# Auto-detect from context
/biomapper-surgical
Output Example:
π SURGICAL MODE: Action Logic Isolation Active
π― Target: GENERATE_MAPPING_VISUALIZATIONS
============================================================
π Action Analysis:
Internal methods: 8
External interfaces: 3
Pipeline integrations: 2
π Detected Issues:
β’ Counting logic using len(df) instead of df['id'].nunique()
β’ Statistics aggregation including duplicates
β
Surgical Modifications Applied:
β’ Fixed counting to use unique entities
β’ Preserved all external interfaces
β’ Pipeline integration unchanged
- When to Use:
Fixing bugs in action logic
Correcting calculations or statistics
Updating internal algorithms
Refactoring without interface changes
/biomapper-circuitousο
Purpose: Diagnose and repair pipeline orchestration issues
Syntax: /biomapper-circuitous [STRATEGY_NAME]
- Parameters:
STRATEGY_NAME(optional) - Strategy file to analyze (without .yaml)If omitted, uses
auto_detectmode
Example Usage:
# Specific strategy
/biomapper-circuitous prot_arv_to_kg2c_uniprot_v3.0
# Auto-detect
/biomapper-circuitous
Output Example:
π CIRCUITOUS MODE: Pipeline Orchestration Analysis
π Strategy: prot_arv_to_kg2c_uniprot_v3.0
============================================================
π Flow Analysis:
Total steps: 8
Dependencies: 5
Context keys: 12
β οΈ Issues Found: 2
β’ parameter: Undefined parameter: ${source_file}
β’ context: Missing context key: stage1_results
π§ Suggested Repairs:
β’ Add missing parameter 'source_file' to parameters section
β’ Ensure key 'stage1_results' is written by previous step
- When to Use:
Parameter substitution failures
Context not passing between steps
Step sequencing problems
YAML strategy debugging
/biomapper-interstitialο
Purpose: Ensure backward compatibility during interface evolution
Syntax: /biomapper-interstitial [ACTION_TYPE]
- Parameters:
ACTION_TYPE(optional) - Action to analyze for compatibilityIf omitted, uses
auto_detectmode
Example Usage:
# Specific action
/biomapper-interstitial EXPORT_DATASET
# Auto-detect
/biomapper-interstitial
Output Example:
π INTERSTITIAL MODE: Interface Compatibility Management
π‘οΈ GUARANTEE: 100% Backward Compatibility
π― Action: EXPORT_DATASET
============================================================
π Current Interface:
Parameters: 5
Context reads: ['datasets']
Context writes: ['output_files']
β οΈ Compatibility Issues: 2
Breaking changes: 0
Warnings: 2
π‘οΈ Ensuring Backward Compatibility...
π§ Applying compatibility solutions:
β’ Maintain alias 'dataset_key' β 'input_key' indefinitely
β’ Maintain alias 'output_dir' β 'directory_path' indefinitely
β
Backward compatibility guaranteed!
- When to Use:
Renaming parameters
Changing action interfaces
Evolving API contracts
Ensuring strategy compatibility
Command Implementationο
The slash commands are integrated with the unified framework architecture and route through the UnifiedBiomapperAgent:
Integration Architecture:
Claude Code β Slash Command β UnifiedBiomapperAgent β Specific Framework
Available commands:
βββ /biomapper-surgical β SurgicalModeAgent
βββ /biomapper-circuitous β CircuitousFramework
βββ /biomapper-interstitial β InterstitialFramework
Script Pattern:
Each command follows this pattern:
# Conceptual implementation - integrated with UnifiedBiomapperAgent
from src.core.safety.unified_agent import unified_agent
# Parse command and arguments
command = "surgical" # or "circuitous", "interstitial"
target = "${ARGUMENT_1:-auto_detect}"
# Route through unified agent
if target != "auto_detect":
# Direct target specification
context = unified_agent.process_user_message(f"{command} {target}")
result = unified_agent.execute_framework_operation("analyze")
else:
# Auto-detect from context
context = unified_agent.process_user_message(f"activate {command} mode")
result = unified_agent.execute_framework_operation("analyze")
Integration with Claude Codeο
Automatic Invocation:
Claude Code can invoke these commands automatically when detecting issues:
# Agent detects counting issue
User: "The statistics are wrong"
Agent: [Runs /biomapper-surgical automatically]
Manual Invocation:
Users can explicitly request framework activation:
User: "/biomapper-surgical GENERATE_MAPPING_VISUALIZATIONS"
Agent: [Activates surgical framework for specified action]
Context Preservation:
Commands maintain context between invocations:
# Framework remembers previous analysis
/biomapper-circuitous strategy_v1
# ... make fixes ...
/biomapper-circuitous # Re-analyzes same strategy
Advanced Featuresο
Verbose Mode:
Add --verbose for detailed output:
/biomapper-surgical EXPORT_DATASET --verbose
Dry Run Mode:
Preview changes without applying:
/biomapper-interstitial --dry-run
Export Analysis:
Save analysis results:
/biomapper-circuitous strategy_v1 --export analysis.json
Best Practicesο
Use Auto-Detection First - Let natural language trigger frameworks - Use commands only when needed
Provide Specific Targets - Include action/strategy names - Helps framework focus analysis
Review Before Applying - Check suggested changes - Ensure compatibility maintained
Chain Commands When Needed - Surgical β Interstitial for safe changes - Circuitous β Surgical for root causes
Common Workflowsο
Workflow 1: Safe Action Update
# 1. Fix the logic
/biomapper-surgical MY_ACTION
# 2. Ensure compatibility
/biomapper-interstitial MY_ACTION
# 3. Verify pipeline
/biomapper-circuitous my_strategy
Workflow 2: Debug Pipeline Issue
# 1. Diagnose flow
/biomapper-circuitous failing_strategy
# 2. Fix identified action
/biomapper-surgical PROBLEMATIC_ACTION
# 3. Re-verify flow
/biomapper-circuitous failing_strategy
Workflow 3: API Evolution
# 1. Check current interface
/biomapper-interstitial OLD_ACTION
# 2. Apply evolution
# ... make changes ...
# 3. Ensure compatibility
/biomapper-interstitial OLD_ACTION
Error Handlingο
Common Errors:
Error |
Resolution |
|---|---|
βAction not foundβ |
Check ACTION_REGISTRY for valid names |
βStrategy file missingβ |
Verify path: src/configs/strategies/experimental/ |
βNo compatibility issuesβ |
Framework working correctly - no action needed |
βContext missingβ |
Run in directory with biomapper source |
Debug Mode:
Enable debug output for troubleshooting:
export BIOMAPPER_DEBUG=1
/biomapper-surgical MY_ACTION
See Alsoο
BioMapper Framework Triad - Complete framework documentation
Framework Triggering Mechanics - Automatic detection mechanics
Real-World Usage Examples - Real-world usage scenarios
src/core/safety/- Framework implementations
β
## Verification Sources
Last verified: 2025-01-22
This documentation was verified against the following project resources:
/biomapper/src/core/safety/unified_agent.py(unified_agent global instance and command routing)/biomapper/src/core/safety/surgical_agent.py(SurgicalModeAgent with activate_surgical_mode)/biomapper/src/core/safety/circuitous_framework.py(CircuitousFramework integration)/biomapper/src/core/safety/interstitial_framework.py(InterstitialFramework integration)/biomapper/CLAUDE.md(Slash command usage patterns and integration)/biomapper/README.md(AI-native developer experience including commands)