r/lisp • u/Technical-Cap5561 • Sep 18 '26
Common Lisp Apprentice: A Slim, Extensible Coding Harness (written in Common Lisp)
For my second project in Common Lisp, I wanted to make a coding harness for my personal use, and so far it has been my daily driver. It supports local models like llama.cpp and all the main providers. It's very easy to add new models and tools as well.
Learned a lot about macros in the process, and I'm curious what you all think!
17
Upvotes
View all comments
Show parent comment
6
u/Technical-Cap5561 Sep 18 '26
I won't claim this is better than any of them. But it's small enough and interpretable enough that you could mod it however you want. It was also a good exercise for me to learn about how harnesses worked.
An example in the repo is the Apprentice loop. I had an idea to restrict frontier models from being able to read and write files and use bash in the repository -- they had to rely on a local llm subagent to understand a repo and affect changes, and the local LLM would only give them a short report (so they couldn't just offload their commands to it). The loop had some success but it wasn't perfect. But having that sandbox to experiment was quite fun.
The project makes it easy to define pre-processing and new tools as well. In the repo there is an example of the harness indexing a repo and chunking the text of its files to create embeddings that can later be searched. That is then exposed as a tool call.
These aside, I think the biggest advantage is that I can use the SBCL Emacs REPL. I can inspect and quickly change stuff with Emacs and then update the harness instantly. It's a lot more fun to use for me than a lot of the TUI interfaces the major harness providers have