Skip to content
All posts

Engineering4 min read

Agentic Development

Why I built domain-driver to help agents write code my way, and how domain-factory in 0.8.0 takes a feature from a one-sentence request through review and documentation.

Isaac Hatilima

Full-stack and DevOps engineer

Eight friendly cartoon robots on a factory line specifying, building, reviewing, documenting and approving a web app, in warm burgundy and sand tones.

In the era of agentic development, there is always a new skill trending. Some come bundled with other skills you will probably never reach for, but because they are trending, you feel like you have to install them. If we are being honest with ourselves (and we should be), we all have our own ways of doing things.

That is why I set out to build tools that help agents write code the way I would, without me re-juggling SKILL.md files in every project. All my login forms have two inputs and a button, so why not have a tool that tells agents exactly how I want them built?

domain-driver: my way, every time

domain-driver is a CLI that scaffolds domain-driven feature folders, a bit like Laravel's php artisan make, for Next.js, React, Node (Express, Fastify or Hono), NestJS and TanStack Start. It detects your stack and generates only the layers that stack needs, one file per action: CreateComment.service.ts, CreateComment.repository.ts, CreateComment.controller.ts, and a useCreateComment hook where there is a frontend.

The part that matters for agents is init. It writes my rules into the project's AGENTS.md and CLAUDE.md and installs a skill, so whichever agent opens the project scaffolds with the tool instead of hand-writing layers, and keeps the same shape: one action per file, controllers that call one service, services that hold the logic, repositories that only touch data. I stop repeating myself, and every feature looks like I wrote it.

Meet domain-driver 0.8.0, now with domain-factory

Scaffolding gets a feature started. domain-factory takes it the rest of the way. You give it one sentence:

text
/domain-factory add post comments; the author and the post's owner can delete or archive a comment, everyone else can like and reply

and a small team of agents takes it from there, each with one job:

  1. Spec writer. Reads the project first: every AGENTS.md, the packages and the stack of each one. Then it writes a spec with the exact domain-driver commands to run, who may do what, and acceptance criteria that can be tested.
  2. Builder. Scaffolds with domain-driver, fills in the generated files and writes a test for every acceptance criterion, all on its own branch in its own git worktree.
  3. Four reviewers, in parallel. Security goes through the permission rules one action at a time. Code runs the tests and checks the domain-driver rules. UX and UI look at the running app. If any of them asks for changes, the builder goes again, up to twice.
  4. Documenter. Writes a page for the feature in Documentation/: its status, the dates, what users should be able to do and what they actually can do. If something did not ship, the page says why.
  5. Approver. Merges the branch or hands it to me. Anything that changes who may do what, adds a migration or a dependency, or touches deploy config always comes back to a person.

It runs in Claude Code with Opus and Sonnet, and in Codex with GPT-6 Astra, Sol and Luna, each agent on the model that fits its job.

Still my way

This is the part I care about most. The factory does not impose its own taste. The spec writer reads your guidance before planning, and your project's rules beat the factory's defaults: if your services use several repositories, or your frontend scaffolds one layer at a time, that is what the spec says. The one thing guidance cannot change is the security floor: permission checks stay on the server, and who is calling never comes from the request body.

Some of my own habits are built in too. Methods stay small: any method that scores above 5 on cyclomatic complexity gets split into named private methods, the same limit phpinsights uses by default. And every feature ends up documented in plain words, not only in commit messages.

Try it

bash
npm install -D domain-driver   # a local install runs init for younpx domain-driver init         # or run it yourself

init tells you when it adds the factory. Then start a job with /domain-factory <request> in Claude Code or $domain-factory <request> in Codex. It never starts on its own.

The loop is modelled on the software factory from zazencodes.

Your agents should work the way you do, not the way this week's trending skill does.

Links:

  • Agentic Development
  • domain-driver
  • AI

Written by Isaac Hatilima

I build and run products across web, mobile and infrastructure.

More about me

Planning a release like this?

Tell me what you are working on. We’ll agree on the scope, and I’ll build it and keep it running.

Book a call