Introducing Open Case Studies: how we built the warehouse robotics case with DSLs and agents
Today we’re launching our Open Case Studies. These are complete projects built for fictitious clients, so we can publish everything, from the request and the code to the decisions behind them. The first is the warehouse robotics case study, where we present a solution to a modernization request for an existing system, using a DSL and a custom AI harness in tandem.
In this blog post we go a step further into the process by which we produced that solution. This gives a peek into how we work when we receive such a request. We go into detail on how we break down the request, set goals, plan, and execute. During this process, we also explain how we leverage AI as a tool in the software engineering process, accounting for the accumulation of technical constraints, decisions, and other requirements over time.
You can expect to take away an understanding of how we execute a modernization project from request to result, and how we leverage AI in this process.
Open Case Studies
Client work usually sits behind NDAs, which makes it hard to show how we actually work. Our Open Case Studies take a different approach: the customers are invented, so we can be fully transparent. Alongside the request, the code, and the decisions, each study documents the development process we applied.
Every case centers on domain-specific software, built the way we build it for our clients. The warehouse robotics case study is the first of these, launching alongside this post, and more are on the way.
Some background first
The warehouse robotics case study focuses on these three parts:
- WPL, the Warehouse Policy Language, a domain-specific language (DSL) for warehouse robot policies.
- An agent that works with the user and the DSL.
- A simulation that is controlled by the DSL.
All of this is packaged up in a custom lightweight IDE, purpose-built for working with WPL, driving the agent, and interacting with the simulation.
The techniques below are broadly applicable, so they can apply to any project where an AI works through a DSL, and where the DSL gives leverage to verify and apply the AI’s changes in a constrained way that a user can understand.
Starting from a request
Every open case study starts from a request, just like any other project. For this one we wrote a request for proposal (RFP) from the point of view of a fictional warehouse operator. The following sentence captures the whole idea quite nicely:
Our robot rules are so low level that only a few specialists can change them safely, so we want a readable policy language and a simulator where our own operators can try changes before they reach the floor.
From that, we identified four general needs:
- A DSL that abstracts low-level details, so non-programmers can work with it while keeping deterministic behavior.
- AI support to ease working with the language, specifically for non-programmers.
- A simulation that’s driven by the DSL for verification, and that the AI can also interact with.
- One integrated, standalone application that presents all of these together, so it’s easy to install and use right away.
Setting goals
Goal setting takes different forms depending on the project. For this one, we defined the goals upfront to match our proposal. They stay high level, keep us on track, and help the client understand what direction we’re taking.
However, goals change, as even the best-laid plans do. Even so, a solid starting point gives us common ground to work from, and lets us adapt in a way that everyone involved understands.
This is a critical part of how we like to work: we’re upfront about our plans from the get-go, and we adapt when needs change.
Questions about the user
While setting goals, we ask ourselves (and our clients) a few questions. They help us dial in who we’re writing software for, and what they expect from that software.
| Question | Answer |
|---|---|
| Who is our end user? | General operators, not just trained specialists. |
| What will they expect? | Something intuitive that matches how they observe the floor, and the corrective actions they can take. |
| What is the value to them? | Faster improvements to floor operations, without waiting on specialists to interpret observations. |
| How will we know we got it right? | A general operator can propose an operations change, backed by simulation results. |
The answers and the discussion that produces these answers are equally important. They provide context and a direction, akin to a vector, that we can use to guide the rest of our work. Discussing these questions gives everyone a better sense of what we’re shooting for, and how we can achieve it.
Questions about the implementation
The next questions are more internal, but it’s worth sharing how we ask them.
What kind of DSL?
We knew that the request needed a DSL that general operators could work with. Rules should read as “when this happens, do that”, based on what operators observe on the floor. That makes it declarative, with imperative semantics for rule actions. Such a DSL should be fairly upfront, compact, and able to be reasoned about quickly.
What kind of AI support?
We knew the desired support should take an operator’s request and observations, and turn them into policy changes. Most importantly, the operator shouldn’t need to know the DSL to make these changes. That, and the AI must stay contained within the app.
This tells us we need an embedded harness, with a custom toolset. An embedded harness is an agent harness that lives inside another application. An embedded harness gives us an exceptional degree of control through a constrained feature set, while still using an agent to cut through large volumes of data and complexity. These kinds of harnesses are typically used to enrich an existing application, commonly to add a chat interface on top of an existing tool.
A standalone harness, by contrast, runs by itself, has a high degree of freedom, and may have direct access to the system it runs on (such as the underlying file system or a shell). That’s effective for working on complex and broad-reaching tasks, but comes with its own risks and challenges.
Note that there’s a spectrum between the two, so weighing which solution best fits your need is an important starting point, but it’s likely you’ll need to adopt elements that move you in the other direction as well. Doing this carefully on an as-needed basis is critical to reduce complexity, improve reliability, and lower risk.
Notably, this setup isn’t intended to replace specialists. It’s intended to remove the bottleneck the client reported, which is a common type of request for us. Operators can then suggest improvements without waiting for a specialist to first interpret their observations, since the AI does that interpretation through the DSL. The specialist still approves the final changes, but need not do the interpretation themselves.
How should we simulate?
We decided to do a discrete simulation, tick by tick, so the same policy from the same initial state always gives the same result N ticks later.
That determinism makes results stable and facilitates comparisons across runs.
However, it also means we lose the ability to simulate a real running warehouse floor, a limitation we accept in favor of reproducibility.
If an operator makes a change, runs the simulation several times, and gets a different outcome each time, the tool can no longer help them interpret their observations or convey their solution unambiguously.
That then defeats the purpose of the tool, even if it more accurately reflects the real-world state.
With a client, we would raise this trade-off early: explain what a more realistic simulation would cost in reproducibility and propose the deterministic alternative.
Planning
Planning follows directly from the goals.
For the DSL, we cover only a subset of all robot controls, focused on policies. Given some conditions, a rule states what to do:
rule "keep charging" when isCharging() and currentCharge() < 0.8 {
charge()
}
It’s less expressive than a fully imperative language, but far simpler to reason about. In addition, these rules are evaluated top-down, so the first matching rule executes. This, in conjunction with the fact that multiple policies can be applied circumstantially, creates playbooks that can be applied in real time. Both the user and the AI understand these more easily, and it’s simpler to compile into whatever representation the real system needs later on.
For the AI, the embedded harness serves workflows rather than open-ended control. The application drives the workflow steps, and the model does the reasoning within some of those steps. It serves two use cases, general Q&A and producing DSL changes. A deliberately small set of tools is made available through the harness to support these use cases. Extra documentation stays out of the model’s context until a tool call fetches it, so information arrives only as the task needs it.
For the simulation, we keep things simple: it advances tick by tick, interprets the compiled DSL artifacts directly, and acts as a simplified, deterministic model of the warehouse floor. Each policy compiles to a JSON IR that mirrors the structure of WPL’s rules, and the simulation then interprets that IR, rather than WPL directly.
Recording decisions
We record design decisions as Architecture Decision Records (ADRs). ADRs encode decisions for humans and agents alike, and they force us to be explicit about our (or an agent’s) intent and reasoning.
When a new developer joins, ADRs explain why the system is shaped the way it is. Agents read them too, so they respect those decisions before changing anything the ADRs cover. ADRs are one of the guides we describe in How to architect software projects for AI agents. The DSL’s validations, type checks, and tests are the matching sensors: they let an agent verify its own changes before a human reviews them.
Execution
Code, tests, and documentation are written together.
This matters most in projects where agents are involved. Our workflows go beyond a Plan-Do-Check-Act (PDCA) or Observe-Orient-Decide-Act (OODA) loop, since a code change rarely exists by itself. After a change, steps like self-correction, documentation, and refactoring alignment keep outdated or excessive information from misdirecting the next agent (or user).
Humans and agents share the work, but risk decides who does what. Agents usually handle low-criticality tasks, with their changes being reviewed by another agent, a human, or both. High-criticality tasks, such as grammar design or type system work, are written by a human or supervised directly. Agent reviews are very helpful, but they don’t replace a human in the loop entirely; we keep an eye on the process and intervene on a case-by-case basis even for automated runs. In a client project, the engineers making these calls are the same people the client talks to directly, with one stable contact throughout.
Large tasks are decomposed. This means the DSL, the AI integration, and the simulation work are each broken into subtasks, which are broken down further and revised as needed. Much of the upfront effort goes into producing small, well-planned tasks that agent workflows can readily consume. Tasks also frequently get re-evaluated along the way, and sometimes decomposed further, to adapt to the project’s trajectory as it evolves. Tasks are typically structured as a dependency graph, allowing an agent (or one of us) to pick open tasks from the graph’s frontier.
Moving fast with agents is tempting, but it’s not always the best choice. Well-engineered agent workflows and proper task decomposition take effort to establish and maintain. Unsurprisingly, vibe coding is no substitute for proper engineering.
Reflection
Throughout the process, and at the end, we reflect on our goals. If we hit them, we confirm it against the success criteria. If not, we work back through the plan to find where we diverged and correct course. Again, we view this like a vector, and working on the project involves adding changes in the right direction.
We check early and often: small cycles during execution, larger ones at major milestones. In a client project, the first of those milestones is a version the client can see and judge for themselves, and we aim to get there fast. The ultimate aim is to catch deviations early, while they’re still cheap to fix.
Codifying these kinds of procedures into workflows gives us a way to work effectively on tasks in a consistent fashion. This approach, in particular, lends itself to agentic work quite well, and can be automated quite easily.
Wrap-up and delivery
With the goals met, we package the result and hand it over. For this project, that’s a standalone application where an operator can describe what they see on the floor, review the policy change the agent proposes, and watch the simulation play it out.
You can see the result in the warehouse robotics case study.
If your domain has rules that only a few specialists can change, we’d like to hear about it: take a look at our domain-specific AI services, or get in touch!
About the Author
Benjamin F. Wilson
Ben is an experienced engineer with a background in programming language theory & full-stack development. He previously co-founded his own software company, and has extensive experience leading projects. He's passionate about facilitating team success, & solving complex problems. In his spare time you can find him working on DIY things, electronics, & gardening.


