Coding agents repeat the wrong precedent. Here is what stops them

Four pre-registered studies, 588 agent runs: agents copy the wrong precedent near a change, the project tests do not stop it, a test for the rule does, and one sentence at the old wrong code prevents most violations.

November 18, 2026 · 6 min · Hamidreza Mohaqeq

I built a context language for AI coding agents. Three experiments said they didn't need it

Three pre-registered experiments, about 130 agent runs: a formal context language didn’t make coding agents follow architecture rules better, because they already read the code.

November 10, 2026 · 7 min · Hamidreza Mohaqeq

Discovering a codebase's architecture instead of declaring it

An agent skill that finds the architectural patterns and anti-patterns a repository actually has, across 13 languages, and grades each one with file:line evidence.

May 24, 2026 · 3 min · Hamidreza Mohaqeq

Teaching kids to make games on a phone (in German)

A German-language tutorial for children: thirteen small Pygame Zero games that run on an Android phone with Pydroid 3, from drawing shapes to a space shooter.

January 19, 2026 · 2 min · Hamidreza Mohaqeq

A berth planning board as a native web component

A Gantt-like, drag-and-drop schedule of vessels at a port’s berths, built with Lit and TypeScript as a standards-based custom element.

January 4, 2026 · 2 min · Hamidreza Mohaqeq

A fully local RAG service with Kotlin, Ktor, Ollama and pgvector

Upload PDFs, ask questions, keep everything on your machine: a small retrieval-augmented generation service with query expansion and no external API calls.

December 3, 2025 · 3 min · Hamidreza Mohaqeq

Ray Tracing in One Weekend, in Kotlin

Working through Peter Shirley’s ray tracing book in Kotlin: small classes, a PPM file as output, and a thread pool to make the final render bearable.

September 27, 2023 · 2 min · Hamidreza Mohaqeq