How I work with AI in development: my method
I work with AI by following a common thread. In my experience, asking Claude or ChatGPT for one thing at a time gives you pieces that each work and never add up to a whole. My method decides what to ask, which model to ask, with what context, and how to check the result.
AI has changed the way I work as a freelance Drupal developer, and the method is still mine. The delegated work lands on a server that acts as a remote core: it routes tasks between models, starts environments on demand and remembers the decisions I've made. This is how it's built, and what the measurements say.
What is the common thread when I work with AI?
The common thread is four steps, which I always follow in the same order:
- I analyse the problem. I gather everything in a brief: what needs doing, why, and under which constraints.
- I define the flow by breaking the problem into atomic tasks. I write the full list of steps and use AI to check it: covering every step, finding the functional gaps the list leaves open, keeping track from one session to the next. The work starts from a GitLab issue, code goes through an OpenSpec change that pins down the specification, and architecture choices end up in an ADR.
- I delegate to the system. Each task goes to the right model, with a precise specification.
- I review and decide. I read everything that comes back before pushing. The final call is mine.
AI works inside these steps and takes the volume off my hands: writing and reading logs. I set the direction.
What role does the server play in the flow?
Everything in the flow goes through the server, which over time has become a set of microservices that support development and centralise shared work. Today it is made of many containers, split into separate Docker Compose projects. The same machine hosts GitLab with its CI, Ollama with the local models, ctx-memory with the decision memory, the skill registry and the development environments.
Centralising keeps everything aligned. Skills live in a registry on the server, and the system pushes updates to every machine I work from automatically. Some of them run on the server itself, next to Ollama, and hand Claude only the result. The system also keeps sensitive data on a separate path, and condenses text with Caveman, which shortens messages before they reach Claude.
The hardware is an AMD Ryzen 9 9950X with plenty of RAM and no graphics card: for now, CPU and RAM are enough.
How does the server route the work?
Through a table of rules written into Claude Code's global instructions, which applies to every session without being repeated. An MCP server receives the delegated work and sends it on:
| The work is… | It goes to |
|---|---|
| a new, self-contained file of at most 150 lines, a mechanical change, a search in the repository | a Haiku subagent |
| code that needs repository context, several files at once, tests | a Sonnet subagent |
| an irreversible branch whose specification can't be written in full | a dedicated Opus subagent |
| a long log to make sense of, the text checks of the skills, data that must stay on my network | Qwen3 instruct on Ollama |
| a change of a few lines | Opus, directly |
| architecture, synthesis, review, decisions | Opus |
Opus, the model that drives the session, designs and reviews, and the subagents write the bulk of the code. Each subagent works in its own context: Opus sends the specification, gets back a short report, and reads the code only when it reviews it. The tokens this keeps out of the context, and how I verify the work of the subagents, are in Why do I delegate code to Claude Code subagents?
One rule covers Ollama when it's asleep. Waking it up takes time, once per session, and the system treats that as a price worth paying, since it covers all the work that follows. When Ollama can't be reached, the log goes to Haiku.
How do environments start only when they're needed?
Environments start on demand thanks to Traefik and Sablier. Traefik receives the requests for every service on the server, and Sablier keeps containers stopped until someone calls them, starts them on the first request and stops them after a period of inactivity. Most of the containers work this way, split into groups: the site environments, ctx-memory, the AI tools, even the browser I use to generate images. While I was writing this article, most of them were asleep.
Each environment is ready when I open it, and the machine leaves its memory to Ollama while the environments sleep.
How do I avoid explaining the context again in every session?
With ctx-memory, my RAG system for tasks and decisions, built on Drupal 11 and Typesense. Issues record what was done, while ctx-memory keeps the why, with the evidence next to it, and shares it across Claude sessions. A new session starts from context that is already defined, instead of working out tasks and decisions from scratch.
I always use it from Claude. An MCP server exposes three tools, search, read and capture, and a dedicated skill teaches the agent how to use them: when I open a session on a project, the agent retrieves the decisions that concern it and works with that context in front of it. When I decide something, the same skill writes it into the graph. Two hooks capture automatically: every proposal.md of an OpenSpec change goes in as evidence along with the decision it states, and every committed ADR goes in with the permalink to its commit.
Underneath, Drupal acts as the graph database: contexts, decisions, evidence and relations are Drupal entities with revisions and permissions, and Typesense, connected through Search API, indexes them for search. A captured decision always starts as «proposed», and only I can confirm it. The components and the four rules that keep the memory reliable are in ctx-memory: how I built a decision memory for Claude on Drupal.
How much work goes through the local model?
The local model takes the reading work: logs to summarise and the text checks of the skills. Until 21 October 2026 it also wrote files and diffs; since then code goes to the Claude subagents. The system logs every delegation, with the tokens the local model reads and the ones it writes, and the count covers only the work with Claude, meaning skills and MCP tools, without the other applications that use Ollama on the server.
The tokens read are the logs and files that Claude would otherwise have read, along with the instructions the local model needs. The tokens written are the output Claude would otherwise have produced.
The real saving is larger, because every file Claude reads stays in its context for the turns that follow. The number that matters to me is practical: with delegation I reach the end of the week, where before I ran out halfway.
How well does a local model perform on a CPU?
Qwen3 on a CPU finishes a short job without making me wait: that holds for a skill run on the server and for a log summary.
The guides online advise against Qwen3-Coder without a suitable graphics card. Conduction's guide measures about 6 minutes per answer with an 8 GB GPU, which leaves 68% of the model on the CPU. The difference is the model: the Qwen3 models I have used are 30B-A3B, mixture-of-experts models with 30 billion parameters, of which about 3 billion are active for each token, quantised to 4 bits to take up little memory. That's why they answer at the speed of a much smaller model. These times hold for this machine and for short jobs, such as a skill run or a log summary.
Reliability holds up too: attempts that come back empty are rare, and the system counts them separately, outside the savings figures.
How do I review what comes back from delegation?
I read every delivery before pushing, because delegating the writing leaves the responsibility for the result with me. On one working day I noted the defects of every delegated delivery, and each one had at least one: a --quiet option that let the output through, a comm run on unsorted files, sample comments copied from a core module, a verdict stated without any evidence behind it. They are small defects, and that's exactly why they slip through. Skills and pipeline scripts run automatic checks before merging: English identifiers, translations, exported configuration.
A real case
AI Disclosure, the module I created on drupal.org, got a report: when an image was replaced, the site kept the decision made for the old one. It went through the loop described above, with my OK at every public step. At each step I checked the whole flow end to end on a test site, ran the code for real and reviewed its quality line by line, and the fix was in the module the same day. AI is one more tool: the work and the responsibility stay mine. (The issue on drupal.org (opens in a new tab))
Sources
The information about the system was read on 1 October 2026 on the server where the system runs; the routing table was updated on 24 October 2026.
- Claude Code (opens in a new tab), Anthropic. Primary source.
- Model Context Protocol (opens in a new tab). Primary source.
- Ollama (opens in a new tab) and Qwen3-Coder (opens in a new tab), 30B-A3B models. Primary source.
- Local LLM setup with Ollama and Qwen (opens in a new tab), Conduction: Qwen3-Coder on an 8 GB GPU, about 68% of the model on the CPU and answers in about 6 minutes.
- Sablier (opens in a new tab) and Traefik (opens in a new tab). Primary source.
- Typesense (opens in a new tab) and Search API Typesense (opens in a new tab). Primary source.
- OpenSpec (opens in a new tab). Primary source.
- Architecture Decision Records (opens in a new tab). Primary source.
- Ollama delegation log, Sablier configuration, Claude Code global instructions, skill registry, ctx-memory contexts and decisions. Author's own measurements.
This text was translated by AI.
How was AI used?
Translated from the Italian original with AI assistance, then read and corrected by a person, who holds editorial responsibility.