Files
aitbc/docs/cli/DISABLED_COMMANDS_CLEANUP.md
aitbc 81f6aac768 Update disabled commands documentation and re-enable cross_chain/monitor
- Updated DISABLED_COMMANDS_CLEANUP.md to reflect current state (2026-05-27)
- Re-enabled cross_chain command (no core dependency)
- Re-enabled monitor command (no core dependency)
- Updated analysis: 6 commands disabled due to missing aitbc_cli.core modules
- hermes now marked as previously disabled but now enabled
- Added clear action items for remaining disabled commands
2026-05-27 07:07:37 +02:00

7.6 KiB

Disabled Commands Cleanup Analysis

Overview

This document analyzes the currently disabled CLI commands and provides recommendations for cleanup.

Disabled Commands (as of 2026-05-27)

1. analytics - Chain Analytics

File: cli/aitbc_cli/commands/analytics.py Status: Commented out in core/main.py line 133 Reason: "Disabled - imports from non-existent aitbc_cli.core"

Analysis:

  • Size: 403 lines of code
  • Functionality: Chain analytics and monitoring commands
  • Dependencies: aitbc_cli.core.analytics (missing module)
  • Potential Value: Medium - analytics useful for monitoring

Recommendation: RE-ENABLE AFTER CORE MODULE FIX

  • Need to implement or restore aitbc_cli.core.analytics module
  • Alternatively, refactor to remove core dependency
  • Analytics commands are valuable for operators

2. cross_chain - Cross-Chain Trading

File: cli/aitbc_cli/commands/cross_chain.py Status: Commented out in core/main.py line 134 Reason: "Disabled - may have similar issues"

Analysis:

  • Size: 435 lines of code
  • Functionality: Cross-chain trading operations
  • Dependencies: Uses AITBCHTTPClient (no core dependency)
  • Potential Value: High - cross-chain is strategic

Recommendation: RE-ENABLE AND TEST

  • No core dependency found in the file
  • Should be safe to re-enable
  • Test for any hidden dependencies

3. deployment - Production Deployment

File: cli/aitbc_cli/commands/deployment.py Status: Commented out in core/main.py line 135 Reason: "Disabled - missing core.deployment module"

Analysis:

  • Size: 378 lines of code
  • Functionality: Production deployment and scaling commands
  • Dependencies: aitbc_cli.core.deployment (missing module)
  • Potential Value: Medium - useful for production deployments

Recommendation: RE-ENABLE AFTER CORE MODULE FIX

  • Need to implement or restore aitbc_cli.core.deployment module
  • Alternatively, refactor to remove core dependency

4. monitor - Monitoring and Dashboard

File: cli/aitbc_cli/commands/monitor.py Status: Commented out in core/main.py line 136 Reason: "Disabled - may have similar issues"

Analysis:

  • Size: 474 lines of code
  • Functionality: Monitoring, metrics, and alerting commands
  • Dependencies: Uses AITBCHTTPClient (no core dependency)
  • Potential Value: High - monitoring is essential

Recommendation: RE-ENABLE AND TEST

  • No core dependency found in the file
  • Should be safe to re-enable
  • Test for any hidden dependencies

5. node - Node Management

File: cli/aitbc_cli/commands/node.py Status: Commented out in core/main.py line 137 Reason: "Disabled - imports from non-existent aitbc_cli.core"

Analysis:

  • Size: 1,044 lines of code
  • Functionality: Node management commands
  • Dependencies: aitbc_cli.core.config, aitbc_cli.core.node_client (missing modules)
  • Potential Value: High - node management is essential

Recommendation: RE-ENABLE AFTER CORE MODULE FIX

  • Need to implement or restore core modules
  • Large command group with significant functionality

6. agent_comm - Agent Communication

File: cli/aitbc_cli/commands/agent_comm.py Status: Commented out in core/main.py line 138 Reason: "Disabled - imports from non-existent aitbc_cli.core"

Analysis:

  • Size: Unknown (file exists but not reviewed)
  • Functionality: Agent communication commands
  • Dependencies: aitbc_cli.core.agent_communication (missing module)
  • Potential Value: Medium - agent coordination

Recommendation: RE-ENABLE AFTER CORE MODULE FIX

  • Need to implement or restore core module
  • Conflicts with agent command (renamed to ai)

Previously Disabled (Now Enabled)

hermes - Hermes Integration

File: cli/aitbc_cli/commands/hermes.py Status: ENABLED in core/main.py line 151 Previous Reason: "Temporarily disabled due to command registration issues"

Resolution:

  • Re-enabled as part of CLI subcommand implementation (May 2026)
  • Added send, receive, peers subcommands
  • No registration conflicts detected
  • Commands connect to hermes-service via AITBCHTTPClient

Cleanup Action Items

Immediate Actions (High Priority)

  1. Re-enable cross_chain and monitor

    # Uncomment lines 134 and 136 in core/main.py
    # cli.add_command(cross_chain, name="crosschain")
    # cli.add_command(monitor)
    
    • Test for any hidden dependencies
    • Verify no naming conflicts
  2. Implement missing core modules

    • aitbc_cli.core.analytics for analytics command
    • aitbc_cli.core.deployment for deployment command
    • aitbc_cli.core.config and aitbc_cli.core.node_client for node command
    • aitbc_cli.core.agent_communication for agent_comm command
  3. Update scenario documentation

    • Mark disabled groups as "Disabled (missing core dependency)" not "Empty"
    • Add scenarios for active groups: edge, operations, hermes, workflow, simulate, config profiles, mining, wallet advanced

Code Quality Improvements

  1. Add command registration validation

    • Prevent future naming conflicts
    • Add unit tests for command registration
  2. Document command dependencies

    • Add clear documentation for each command
    • Include dependency requirements
  3. Create command deprecation policy

    • Formal process for disabling commands
    • Clear timeline for removal

Security Considerations

Current State

  • Disabled commands are still present in repository
  • No security risk from disabled code
  • Potential for confusion among users

Recommendations

  • Remove truly unused commands to reduce attack surface
  • Keep valuable disabled code in separate branch if needed
  • Document reasons for disabling

Testing Requirements

Before re-enabling any disabled command:

  1. Unit Tests: Verify all functions work correctly
  2. Integration Tests: Test with live coordinator API
  3. Command Registration: Ensure no conflicts with existing commands
  4. Security Review: Validate no security vulnerabilities
  5. Documentation: Update help text and usage examples

Timeline

Week Action Status
1 Re-enable cross_chain and monitor Pending
1 Test re-enabled commands Pending
2 Implement missing core modules Pending
2 Re-enable remaining disabled commands Pending
3 Update scenario documentation Pending

Risk Assessment

Command Risk Level Action
analytics Low Re-enable after core module fix
cross_chain Low Re-enable and test immediately
deployment Low Re-enable after core module fix
monitor Low Re-enable and test immediately
node Medium Re-enable after core module fix
agent_comm Medium Re-enable after core module fix

Conclusion

The disabled commands fall into two categories:

  1. Safe to re-enable immediately: cross_chain, monitor (no core dependencies)
  2. Require core module implementation: analytics, deployment, node, agent_comm

The "missing core dependency" issue is the primary blocker. These commands are not "empty" - they contain substantial functionality but depend on aitbc_cli.core modules that need to be implemented or restored.

Next Steps:

  1. Re-enable cross_chain and monitor immediately (no core dependencies)
  2. Implement missing core modules or refactor commands to remove dependencies
  3. Re-enable remaining commands after core module fixes
  4. Update scenario documentation to accurately reflect disabled state

This cleanup will restore valuable CLI functionality while maintaining code quality.