| Josh Bleecher Snyder | 6d4c7ea | 2025-05-12 12:14:24 -0700 | [diff] [blame] | 1 | Sketch is an agentic coding tool with a two-layer architecture: |
| 2 | |
| 3 | 1. Outer sketch: CLI command running on user's machine |
| 4 | 2. Inner sketch: Binary running inside Docker containers for isolated work |
| 5 | |
| 6 | 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. |
| 7 | |
| 8 | ## Core Packages |
| 9 | |
| Josh Bleecher Snyder | 322dae9 | 2025-06-04 12:27:07 -0700 | [diff] [blame] | 10 | - termui, webui: both interfaces operate at all times |
| 11 | - loop: state machine that manages agent conversation flow |
| Josh Bleecher Snyder | 6d4c7ea | 2025-05-12 12:14:24 -0700 | [diff] [blame] | 12 | |
| 13 | ## Development Guidelines |
| 14 | |
| 15 | - Do NOT git add or modify .gitignore, makefiles, or executable binaries unless requested |
| Josh Bleecher Snyder | 322dae9 | 2025-06-04 12:27:07 -0700 | [diff] [blame] | 16 | - When adding, removing, or changing tools, update both termui and webui |
| 17 | - Unless explicitly requested, do not add backwards compatibility shims. Just change all the relevant code. |
| Josh Bleecher Snyder | 385da54 | 2025-05-12 19:18:10 -0700 | [diff] [blame] | 18 | |
| 19 | ## Meta |
| 20 | |
| 21 | The program you are working on is Sketch. The program you are running is Sketch. This can be slightly confusing: Carefully distinguish the prompt and tools you have from the codebase you are working on. Modifying the code does not change your prompt or tools. |
| Josh Bleecher Snyder | 6e35332 | 2025-05-21 18:21:24 +0000 | [diff] [blame] | 22 | |
| Josh Bleecher Snyder | d9b1eb4 | 2025-05-28 21:59:54 -0700 | [diff] [blame] | 23 | To start a copy of sketch, use -skaband-addr="" -addr ":8080" -unsafe -prompt "some appropriate prompt". Do not use pkill or killall to stop background sketch processes--your process is called sketch! Instead, kill the pid provided by the bash tool when you started the background process. Do not browse to :80--that is your process! Instead browse to :8080. |
| Josh Bleecher Snyder | 78e7cf9 | 2025-05-23 14:33:34 -0700 | [diff] [blame] | 24 | |
| Josh Bleecher Snyder | 6e35332 | 2025-05-21 18:21:24 +0000 | [diff] [blame] | 25 | ## Testing |
| 26 | |
| 27 | - Do NOT use the testify package. Write tests using the standard Go testing library only. |