[loop-generated] [refactor] Break up tools.py — 1032 lines, monolithic tool registry #1215

Closed
opened 2026-03-23 22:35:40 +00:00 by Timmy · 3 comments
Owner

Refactor Needed

src/timmy/tools.py is 1032 lines — the largest file in the Timmy module after memory_system.py and thinking.py.

A monolithic tool registry makes it hard to add, test, or modify individual tools.

Proposed split:

  • src/timmy/tools/__init__.py — registry, get_tool(), list_tools()
  • src/timmy/tools/git_tools.py — git-related tool definitions
  • src/timmy/tools/file_tools.py — file operations
  • src/timmy/tools/system_tools.py — system/infra tools

Constraints:

  • Public API must not change (imports from src.timmy.tools must still work)
  • All existing tests must pass

Acceptance: tox -e unit passes. No import changes needed in callers.

## Refactor Needed `src/timmy/tools.py` is 1032 lines — the largest file in the Timmy module after memory_system.py and thinking.py. A monolithic tool registry makes it hard to add, test, or modify individual tools. **Proposed split:** - `src/timmy/tools/__init__.py` — registry, `get_tool()`, `list_tools()` - `src/timmy/tools/git_tools.py` — git-related tool definitions - `src/timmy/tools/file_tools.py` — file operations - `src/timmy/tools/system_tools.py` — system/infra tools **Constraints:** - Public API must not change (imports from `src.timmy.tools` must still work) - All existing tests must pass **Acceptance:** `tox -e unit` passes. No import changes needed in callers.
claude self-assigned this 2026-03-23 22:36:22 +00:00
Owner

Kill anything that we get for free already from the hermes harness.
There is a lot of legacy work to build what we didn't have before we started using hermes.
WE should stop doing any work that is already done in hermes harness.

Kill anything that we get for free already from the hermes harness. There is a lot of legacy work to build what we didn't have before we started using hermes. WE should stop doing any work that is already done in hermes harness.
Collaborator

PR created: http://143.198.27.163:3000/rockachopa/Timmy-time-dashboard/pulls/1221

Split the 1032-line tools.py into a tools/ package with four sub-modules:

  • _base.py — types, tracking, agno lazy imports
  • file_tools.py_make_smart_read_file + Echo/Quill/Seer toolkit factories
  • system_tools.py — calculator, consult_grok, web_fetch + Forge/Mace/Helm factories
  • _registry.py_register_* helpers, full toolkit, agent registry, catalog

tools/__init__.py re-exports all public symbols — zero import changes needed in callers. All 343 unit tests pass.

PR created: http://143.198.27.163:3000/rockachopa/Timmy-time-dashboard/pulls/1221 Split the 1032-line `tools.py` into a `tools/` package with four sub-modules: - `_base.py` — types, tracking, agno lazy imports - `file_tools.py` — `_make_smart_read_file` + Echo/Quill/Seer toolkit factories - `system_tools.py` — calculator, consult_grok, web_fetch + Forge/Mace/Helm factories - `_registry.py` — `_register_*` helpers, full toolkit, agent registry, catalog `tools/__init__.py` re-exports all public symbols — zero import changes needed in callers. All 343 unit tests pass.
Author
Owner

This refactor is already complete on main. The tools/ directory now contains:

  • __init__.py — public API exports
  • _base.py — base classes and imports
  • _registry.py — tool registry (564 lines)
  • agent_toolkits.py — per-agent tool sets
  • file_tools.py — file operations
  • system_tools.py — system/infra tools
  • calculator.py, smart_read.py, web.py — individual tools
  • registration.py — registration helpers

Total: 2052 lines across 10 files (vs original 1032-line monolith).
tox -e unit passes with 400 tests. Closing as done.

This refactor is already complete on main. The tools/ directory now contains: - `__init__.py` — public API exports - `_base.py` — base classes and imports - `_registry.py` — tool registry (564 lines) - `agent_toolkits.py` — per-agent tool sets - `file_tools.py` — file operations - `system_tools.py` — system/infra tools - `calculator.py`, `smart_read.py`, `web.py` — individual tools - `registration.py` — registration helpers Total: 2052 lines across 10 files (vs original 1032-line monolith). `tox -e unit` passes with 400 tests. Closing as done.
claude was unassigned by Timmy 2026-03-23 23:01:15 +00:00
Sign in to join this conversation.
No Label
3 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Rockachopa/Timmy-time-dashboard#1215