Dead Code Analysis Summary - netherframe Project
Historical note: This page is preserved as an archival analysis snapshot. It reflects the repository state at the time it was written and should not be treated as the current architecture contract. Start with Historical Internal Docs, Hybrid Execution Overview, and Migration Guide for current guidance.
Executive Summary
After conducting a deep analysis of the netherframe codebase, I've identified approximately 50+ files that can be classified as dead code, obsolete implementations, or misplaced files. The most significant findings include an entire unused package (libs/netherframe), multiple duplicate implementations in nf.core, and several unregistered CLI commands.
Critical Findings by Package
1. libs/netherframe - ENTIRE PACKAGE IS DEAD CODE
- Status: Empty shell package with no Python code
- Purpose: Originally intended as a meta-package to bundle nf.core and nf.cli
- Current state: Not part of workspace, no imports, no actual functionality
- Recommendation: Remove entire package
2. libs/netherframe.core - ~41 FILES OF DEAD CODE
Duplicate/Obsolete Modules (7 files)
native_execution_enhanced.py- Enhanced version never importednative_provider.py- Completely unused moduletransactional_state_engine.py- Never importedcircular_orchestrator_enhanced.py- Very limited usecore_backup.py- Backup file not usednative_orchestration.py- Standalone script, not a moduleperformance_orchestrator.py- Never imported
Backup Files (17 files)
- 17
.backupfiles in tests/integration/phased_execution/
Temporary Scripts (8 files)
- Debug scripts:
debug_assignment_processing.py,debug_assignment_processing2.py,debug_autoscope.py,debug_codec.py - Fix scripts:
fix_autoscope_examples.py,fix_config_syntax.py,fix_examples.py,fix_resource_syntax.py
Duplicate Protocol Buffers (6 files)
- Same protobuf files exist in 3 locations (root, nf/core/gen/)
Misplaced Test Files (3 files)
- Test files at package root instead of tests directory
3. discovery/netherframe.discovery.hashicorp.aws - NOT DEAD CODE
- Status: Implemented but not exposed in public API
- Purpose: AWS resource discovery functionality
- Current state: Complete with tests, awaiting integration
- Recommendation: Keep - this is unreleased functionality
4. libs/netherframe.generation - 2 BACKUP FILES
cli.py~- Editor backup fileschema_parser.py~- Editor backup file- Minor: Empty
__all__declarations in init files
5. tools/netherframe.cli - 6 FILES OF DEAD CODE
Obsolete/Unused Commands (5 files)
synth_command.py- Duplicate implementation (active one in commands/)commands/native.py- Unregistered commandcommands/idiff.py- Unregistered commandexecute_plan_command.py- Unregistered commandtui/plan_viewer.py- Only used by unused idiff
Misplaced Test File (1 file)
test_idiff.py- In wrong location
Code to Fix
watch_command.py- Imports from obsolete synth_command
Summary Statistics
| Package | Dead Files | Impact |
|---|---|---|
| libs/netherframe | Entire package | High - Remove package |
| libs/netherframe.core | ~41 files | High - Major cleanup needed |
| discovery/netherframe.discovery.hashicorp.aws | 0 files | None - Keep as future feature |
| libs/netherframe.generation | 2 files | Low - Minor cleanup |
| tools/netherframe.cli | 6 files | Medium - Unused features |
| TOTAL | ~50 files |
Recommendations
Immediate Actions
- Remove the entire
libs/netherframepackage - Delete all backup files (
.backup,~files) - Remove temporary debug/fix scripts from nf.core
- Delete unused CLI commands and fix import in watch_command.py
Strategic Decisions Needed
- Decide on native execution implementation (regular vs enhanced)
- Consolidate protobuf file locations
- Determine if unused CLI commands (native, idiff) should be integrated or removed
- Plan release of discovery functionality
Code Organization
- Move test files to proper test directories
- Consolidate duplicate implementations
- Remove experimental/obsolete modules
Impact of Cleanup
Removing this dead code will: - Reduce codebase size by ~15-20% - Eliminate confusion about which implementations to use - Improve maintainability and clarity - Make it easier for new contributors to understand the codebase - Reduce the risk of accidentally using obsolete code