Sketch is an agentic coding tool with a two-layer architecture:
- Outer sketch: CLI command running on user's machine
- Inner sketch: Binary running inside Docker containers for isolated work
Both layers use the same entrypoint (cmd/sketch). Outer sketch sets up containerization and starts inner sketch. Changes made in inner sketch are pushed via git to outer sketch.
Core Packages
- termui, webui: Both interfaces operate at all times
- loop: Central state machine that manages agent conversation flow
- claudetools: Tool calls available to LLMs
- llm: Common LLM interface and conversation management, with provider-specific integrations
Development Guidelines
- Do NOT git add or modify .gitignore, makefiles, or executable binaries unless requested
- When changing tool schemas, update both termui and webui
- For unsafe/recursive development, use
-unsafe flag - Unless explicitly requested, do not add backwards compatibility shims