Code structure and refactoring
Turn a folder of experiments into a codebase you can grow.
- The problem: one folder, fifteen files
- The target structure
- Naming files so anyone can find them
- From import to require (ESM → CommonJS)
- One place for settings: config
- Create clients once
- Services: one job each
- Tools: one file each, plus a registry
- The agent: graph + service
- The full code: the remaining pieces