Local LLM editor
Claude Code creates the briefing while a local language model writes the text.
Every public text is produced by a local language model called gemma4:12b via Ollama on a dedicated machine in the local network. Claude Code only supplies the facts and the task and passes on the model's answer unchanged. The answer is either accepted or discarded and requested again, with SHA-256 markers making any later change to the text detectable.
- Stack
- Python · Ollama (gemma4:12b, local, RTX 4070 Super 12 GB) · SHA-256 marker verification · pytest · Claude Code (briefing and orchestration only)
- Timescale
- Project start 23.08.2026 · first run against the real instance 24.08.2026 · complete toolchain since 29.09.2026.
- Role
- Solo build — design to deployment.
- Scope
- 7,509 lines of Python (excluding vendored code), 114 pytest test functions (as of 02.10.2026).
Separation of Facts and Text
Claude Code supplies the necessary data points, sources and the task as a structured briefing. The local model gemma4:12b generates every public text via Ollama on a dedicated machine in the local network. A briefing summarises the fact stocks and the fixed mandatory statements for the editorial process. The machine runs only on demand and the client checks its reachability before every run.
Safety Through Technical Verification
In the process the text is either taken over byte for byte or discarded and requested again if needed. The SHA-256 hash is recorded in the run log, in the frontmatter and in the start marker of the text block. The component verify.py checks that the bytes match these hashes as a safeguard. A briefing is allowed a maximum of 3 runs and after that an improved briefing with a new identifier is created.
The Toolchain as a Process
The toolchain consists of briefing_neu.py, lint_briefing.py, redakteur.py, abnahme.py, publikation.py, and verify.py. All tools measure, check, or package the data while the model text passes through the process unchanged. The lint checks the requirements before every run and identified five errors in the pilot. Channel profiles and a specific style profile define the requirements for the different output media.
Measurable Model Choice
A blind comparison provided the first basis for an objective model choice. A reproducible test matrix provided the precise measures for the decision. gemma4:12b won both runs in every single metric against its predecessor, with a first-attempt rate of 44.4% in the blind comparison and 72.2% in the test matrix. Since then, exclusively gemma4:12b has been used as the only model for this role.
Continuous Improvement Through Kaizen
Every error class gets one row with a concrete countermeasure on occurrence. On a second occurrence, the correction is fixed as a lint rule or generator default. The goal is to make manual adjustments by hand unnecessary through automated processes. The metric runs per accepted part fell from 3.7 via 2.75 to 2.25 after the toolchain was introduced.
Usage and Scope
The project pages growatt-bridge and watchvault, along with a technical article in German and English, are produced by the local model. This page also originates from the local model. The scope includes 7,509 lines of Python code and 114 pytest test functions.
Get in touch
Interested in a walkthrough?
The source code is private, but I am happy to walk through the architecture and the code on a call, NDA-friendly.
Contact