Agentic Python coding dojo¶
Tuesday, April 7rd 2026, 19:00
Spektral, Lendkai 45, 8020 Graz
It's time again to do some coding together. However, this time we deviate from the well-known path of a classic coding dojo where we switch seats and develop something together using agentic coding.
We start from a rough specification for adding a feature to an existing open source project (maintained by one of the organizers) and go from there.
Together we will build the basic project instructions for agents, develop the prompt to plan what we want to do, and put it into action. We will review any source code generated by AI and ensure that no slop code is injected into the project.
A single laptop is shared between all attendants, and whoever wants to type can ask to be handed the keyboard and mouse.
Link collection¶
cloud providers¶
LLM router without subscription
- eu: souvereign cloud, zero data retention
- edenai (Fr)
- cortecs (A)
- us:
- openrouter (USA)
OSS Agentic tools¶
LLMS¶
- Ollama: Free open source (for now) local AI
- LmStudio: Free closed-source local AI
-
Duck.ai: Free general purpose online AI
-
visual studio extensions :
- pencil.dev: UI design tool
- openpencil: OSS upcoming alternative
Learning offer in Styria and Carinthia¶
Methods¶
- OpenSpec
- https://github.com/Fission-AI/OpenSpec
- a random example using it: https://github.com/AskonsaAnna/wellness-app/blob/main/openspec/project.md
- Superpowers
- Lat.md
Introduction to pygount¶
The introductory slides are available as PDF or Keynote.
TL;DR: Pygount is a command-line tool for counting source lines of code (SLOC) using the pygments library. Itself is about 3K SLOC and has a test suite that runs in a few seconds and covers 95% of the code. This makes it a nice project to experiment with.
Results of coding dojo¶
We attempted to implement the following GitHub issue: #112 Add chart for git tags.
You can find the results of our coding dojo in the following pull requests, which also include prompts and the resulting chart. The 2nd PR has screenshots of the conversation with Jetbrains Junie.
-
#112 Agentic coding dojo, part 1: The first attempt by simply pasting the semifinished requirements from the GitHub issue. This resulted in a technically working SVG that contained a botched area chart.
-
#112 Agentic coding dojo, part 2: The refined version, where we simply told it to make a bar chart instead.
While this is a promising prototype, some issues need to be addressed:
- The general architecture of just implementign a
Writerthat is very different to existing writers and adding messy**kwargsto all writers is not a very amitious way to do things. We need to explore other options. For example, add a separate command line application for charts, or split pygount into subcommand likecountandchart. - The color scheme is not very good. Colors look same-y and somewhat ugly. Suggestion from Dorian: pick one of the matplotlib's qualitatice color maps, for example, "tab20."
- Fun fact: The coding agent mentioned that adding end user documentation would have been useful, but did not add it because it was not part of the requirements. Something to consider for future prompts.
Local agentic coding with ollama¶
Clone the pygount repository (or a fork thereof if you want to contribute):
Follow the instructions to set up a local environment. TL; DR: It uses uv.
Install ollama.
On macOS:
Pull a model for suitable for coding depending on how powerful your machine is:
ollama pull gemma4:e4b # Should work on most machines
ollama pull gpt-oss:20b # Should work well with graphics cards that have 16+ GB RAM.
ollama pull qwen3.5:35b-a3b-coding-nvfp4 # Works on Mac with 48+ GB RAM
Run the agent:
or
The larger the model, the longer it takes to process requests, but results tend to be better. But even the gemma4 model should be able to get give an overview of an existing code base, suggest improvements, and perform minor refactorings
Example prompts:
Might yield a result like this:
Pygount is a command-line tool for counting source code lines (SLOC) using the pygments (https://pygments.org/) library.
Purpose
It scans folders for source code files and counts lines of code, comment lines, and blank lines for each programming language. Similar to tools like sloccount and cloc, but leverages Pygments' lexer system to support any programming language Pygments knows (https://pygments.org/languages/).
...
Asking to
>>> Review the existing code for ways to improve it.
>>> Tell me your top 5 suggestions, sorted by possible gain, with the most useful one first.
Might propose (with details omitted and personal evaluation by roskakori added):
- Refactor the large analysis.py module into smaller, focused modules ✅ Makes sense. Too lazy so far.
- Replace regex-based file scanning with pathlib and pathspec ☑️ Tried, but
glob.glob()still can do thingsPath.glob()can't.- Add async support for I/O-bound operations (file reading, encoding detection) ❌ Checked a while ago. This would be pointless because pygount is CPU-bound. Better use
ProcessPoolExecutor.- Fix technical debt in default.py — duplicate
__repr__code ✅ Nice! Was unaware of this. 3 SLOC gone for good.- Add configuration file support (.pygount.toml) ✅ Makes sense. Too lazy so far.
General useful request:
or