Remove list_files tool

This commit is contained in:
2026-01-31 13:18:46 -08:00
parent c973499445
commit e9396b7c25
3 changed files with 78 additions and 52 deletions

View File

@@ -2,7 +2,7 @@
Minimal Claude Code alternative using DSPy RLM! Single Python file, ~305 lines.
Shoutout to Rahul for inspiring the boilerplate. Here's his initial [nanocode implementation](https://x.com/rahulgs/status/2010179011033608227).
Built using Claude Code, then used to build itself.
![screenshot](https://d1pz4mbco29rws.cloudfront.net/public/nanocode.png)
@@ -171,25 +171,29 @@ print(result.answer)
### Overview
```python
class RLMCodingProgram(PrecompiledProgram):
config: RLMCodingConfig
def forward(self, task: str) -> dspy.Prediction:
# Returns prediction with .answer
return self.agent(task=task)
def get_tools(self) -> dict:
# Returns dict of available tools
def set_tool(self, name: str, tool: callable):
# Add or replace a tool
def remove_tool(self, name: str):
# Remove a tool by name
def reload_lms(self):
# Recreate LM objects from current config
```
nanocode.py
├── File Operations
│ ├── read_file() - Read with line numbers
├── write_file() - Write content
└── edit_file() - Find & replace
├── Search Operations
│ ├── glob_files() - Pattern matching
└── grep_files() - Regex search
├── Shell Operations
│ └── run_bash() - Execute commands
├── DSPy Components
├── CodingAssistant (Signature)
│ ├── RLMCodingProgram (PrecompiledProgram)
│ ├── forward() - Run agent on task
├── get_tools() - Get available tools
│ │ ├── set_tool() - Add/replace a tool
│ │ ├── remove_tool() - Remove a tool
├── reload_lms() - Recreate LMs from config
│ │ └── load_state() - Load state with LM fix
│ └── RLMReasoningCallback
└── Modaic Integration
└── RLMCodingConfig (PrecompiledConfig)
```
### Key Classes