Skip to content

Just Apply Determinism

Agents work best when you give them fast, reliable feedback. Here are the tools I use to do that.

Just Apply Determinism

I have always thought about what is the best way to go from idea to product. I think there are some interesting ways to do that, and one of them is by exploiting the agent loop you develop with.

The loop an agent runs in rewards determinism. For example, calling grep to search across a codebase, letting the agent see code errors, running tests, checking types. Given that logic, we sort of know what we are optimizing for when trying to improve an agent harness, which is applying more determinism.

I mostly develop with TypeScript nowadays, and there are a few reasons for that. The types act as a guide for the agent to know what is supposed to come in and out. Another reason is that there is a lot of TypeScript code out there relative to other languages, so the models are really good at it. The third reason is that you can use the language for backend and frontend in one server.

To go deeper on applying more determinism, you can use linters. I use oxlint, ast-grep, and other tools like that. These close the loop at dev time even more.

Recently I have discovered that even the framework you use can help close this loop. I use Effect-TS, which brings functional programming practices to TypeScript.

One last thing I try to do is give Claude Code / Codex examples of repos that apply good principles relevant to the frameworks and languages I am using. To give an example, I am building an observability platform so enterprises can improve AI use. I found myself directing my agent to OpenPanel for UI/UX and SSR rendering ideas, to opencode for amazing Effect-TS practices, and since I am using TanStack Start, I give it a few repos that use it well, like tanstack.com.

Depending on what design and style I am going for, I will find an open-source repo that is a close approximation to it. I do all this alongside using Context7, which helps ground the agent in fresh docs.

All this to say that combining an indeterministic system with determinism is where I think you can make the most out of agents, not just coding ones. Think healthcare, law, or even aerospace.

I call this the chaos harness.