- 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
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.analyticsmodule - 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.deploymentmodule - 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
agentcommand (renamed toai)
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,peerssubcommands - No registration conflicts detected
- Commands connect to hermes-service via AITBCHTTPClient
Cleanup Action Items
Immediate Actions (High Priority)
-
Re-enable
cross_chainandmonitor# 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
-
Implement missing core modules
aitbc_cli.core.analyticsfor analytics commandaitbc_cli.core.deploymentfor deployment commandaitbc_cli.core.configandaitbc_cli.core.node_clientfor node commandaitbc_cli.core.agent_communicationfor agent_comm command
-
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
-
Add command registration validation
- Prevent future naming conflicts
- Add unit tests for command registration
-
Document command dependencies
- Add clear documentation for each command
- Include dependency requirements
-
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:
- Unit Tests: Verify all functions work correctly
- Integration Tests: Test with live coordinator API
- Command Registration: Ensure no conflicts with existing commands
- Security Review: Validate no security vulnerabilities
- 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:
- Safe to re-enable immediately:
cross_chain,monitor(no core dependencies) - 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:
- Re-enable
cross_chainandmonitorimmediately (no core dependencies) - Implement missing core modules or refactor commands to remove dependencies
- Re-enable remaining commands after core module fixes
- Update scenario documentation to accurately reflect disabled state
This cleanup will restore valuable CLI functionality while maintaining code quality.