Skip to content

Dead code: 12 unwired agents/ modules + duplicate shell file (~5.2k LOC) #27

Description

@ninjahawk

A scan of the codebase turned up a set of modules under agents/ that are never imported anywhere in the project. This was checked with a project-wide import / from grep, excluding each module itself, tests/, and backups/. None are referenced by the runtime entry points (agents/daemon.py, api/server.py, mcp/server.py, agents/autonomy_loop.py, agents/reasoning_layer.py) or transitively by anything those import.

Unwired modules (zero static imports)

File LOC
agents/governance_evolution.py 553
agents/meta_synthesis.py 535
agents/distributed_memory.py 518
agents/swarm_learning.py 474
agents/multi_node_communication.py 459
agents/distributed_consensus.py 431
agents/agent_migration.py 409
agents/distributed_swarm.py 385
agents/agent_native_interface.py 317
agents/self_improvement_loop.py 281
agents/delegation.py 269
agents/shared_goal.py 235
subtotal 4866

Duplicate shell file

shell/agent-shell.py (332 LOC) is a hyphenated duplicate of shell/agent_shell.py (107 LOC, the one actually imported by api/server.py). The hyphenated name cannot be imported as a Python module, and nothing references it (not in any .bat, entrypoint.sh, or docker-compose.yml). It looks like an older copy left behind.

Total: about 5.2k LOC with no runtime path.

Why this is worth cleaning up

  • Several names (distributed_consensus, multi_node_communication, swarm_learning, distributed_swarm, governance_evolution) imply multi-node or swarm capabilities that the running 3-agent single-node system does not use. That works against the understated framing the README aims for.
  • Dead code is a maintenance and review cost: it shows up in greps, import scans, and the security-review surface for no benefit.

Before deleting

Confirm none are loaded dynamically (importlib, string-based import, plugin discovery) or run as standalone scripts (if __name__ == "__main__"). A static-import scan would miss those paths. If any are worth keeping as experiments, consider moving them under an experimental/ or attic/ folder so the agents/ import graph reflects what actually runs.

Found during a general bug and structure scan; filing as a tracking issue rather than deleting directly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions