refactor: remove 21 git tools + add 6 new supertools #40
Merged
FO
4mo ago+1050+1050+0123456789012345678901234567890123456789-6536-6536-0123456789012345678901234567890123456789
Purpose
Complete Wave S1 — remove all migrated git/GitHub/GitLab tools from supertools, delete the duplicate patch_file, and add 6 new tools that solve documented agent failure modes.
Closes https://github.com/four-bytes/four-opencode-plugins/issues/40
Removals (38 files deleted)
- 21 git/GitHub/GitLab tools → migrated to
four-opencode-git - 3 git lib files (git-utils, gh-utils, gitlab-utils)
- 1 duplicate:
patch_file(identical to opencode nativepatch) - 13 test files for migrated tools
New Tools (6 tools, 6 test files)
| Tool | Purpose |
|---|---|
smart_edit | Fuzzy string replace with whitespace tolerance |
smart_patch | Context-anchored patch ignoring line numbers |
batch_patch | Multi-file atomic patch with rollback |
file_tree | Structured directory listing with sizes |
research | Parallel brain + web search |
solution_confidence | Weighted verification scoring |
Final State
- 10 tools: batch_edit, lint_file, run_tests, append_file + 6 new
- 51 tests pass, 0 fail
- Build: 38 KB (down from ~170 KB with 26 tools)
Summary by cubic
Removed all git/GitHub/GitLab tools after migrating them to four-opencode-git, and added six new supertools for reliable editing, patching, and research. This drops the bundle to ~38 KB and brings the toolset to 10 tools with 51 tests passing.
-
New Features
smart_edit: whitespace-tolerant fuzzy replace for stubborn edits.smart_patch+batch_patch: context-anchored patching and atomic multi-file apply with rollback.file_tree: structured directory listing with sizes and simple filters.research+solution_confidence: parallel brain/web search and weighted “did we fix it?” scoring.
-
Refactors
- Removed 21 git/GitHub/GitLab tools and 3 helper libs (migrated to
four-opencode-git); deleted duplicatepatch_file. - Pruned 13 related tests and updated exports; supertools now includes 10 tools total.
- Aligns with issue #40 goals to complete Wave S1 and eliminate duplicated/migrated functionality.
- Removed 21 git/GitHub/GitLab tools and 3 helper libs (migrated to
Summary by CodeRabbit
Release Notes
-
New Features
- Added batch patching with atomic rollback capability for multiple file edits
- Added file tree navigation and repository structure browsing
- Added multi-source research tool for knowledge and web search queries
- Added smart text editing with intelligent whitespace handling
- Added context-anchored patch application for flexible diff application
- Added solution confidence assessment for pull request validation
-
Removals
- Removed advanced git analytics tools (blast radius, bus factor, curse scoring, trend analysis)
- Removed GitHub/GitLab issue and pull request management utilities
- Removed code ownership and implicit coupling analysis