Designing for AI

Coding agents work best when they have constraints. Here's how conventions, domain-driven design, and Rust's type system shape the way we're building Aonyx.

Coding agents work best when they have constraints. Give them a blank canvas and they'll produce generic, inconsistent code. Give them strong conventions and they'll follow them with more discipline than any human team.

This is the bet behind Aonyx: an opinionated full-stack Rust framework designed for the age of coding agents. We're not just building another web framework—we're rethinking what developer tools should look like when AI is a first-class participant in the development process.

Conventions over Configuration

Rails popularized conventions over configuration for humans. It turns out the same principle matters even more for AI.

When a coding agent encounters a problem with multiple valid solutions, it has to guess—or worse, ask you to decide. Strong conventions eliminate that guesswork. The agent looks at existing code, recognizes the pattern, and applies it. First try, no clarification needed. This is important when working with coding agents, because it allows coding agents to perform a task correctly on the first try. They can easily look at examples in the code, understand the convention, and apply it to a new situation. The stronger the conventions, the less room there is for errors.

We are following this paradigm with Aonyx. By being opinionated about the architecture and infrastructure of a modern web application, we can implement features that go beyond the basic building blocks like components or HTTP endpoints. Like authentication, background processing, and observability.

Implementing more functionality inside the framework not only speeds up the development of new applications, it also reduces the amount of code that users need to write. Instead of building a full authentication system, users can simply invoke a function in the framework. This reduces the amount of code that needs to be reviewed and makes working with coding agents much more efficient.

Following conventions was an uphill battle in the past. It required discipline, the willingness to be a stickler for the rules, and time to develop conventions in a team. This is changing. Coding agents have infinite discipline to follow conventions. We have better programming languages that can catch violations at compile time. And we can more easily build tools that verify conventions during code review.

Domain-Driven Design

The interface to your codebase is becoming natural language. That changes what matters. When you're talking to AI about your code, you're using words. And those words should map directly to your domain.

This is why we take inspiration from Domain-Driven Design and its idea of a ubiquitous language to create a shared vocabulary for building Aonyx applications, covering both the framework's features and your business domain.

How you think about your business shapes how you structure the code. How you structure your code is how you talk to AI. And how you talk to AI is with the terms from your business domain. A full circle.

Having a consistent language that is focused on the domain has many benefits:

  • Code review shifts from "What is this function doing?" to "Is this the right business logic?"
  • Debugging follows the business logic: "The order is stuck in the PaymentPending state", not "There's a null somewhere".
  • Prompts to AI stay high-level: "Add a cancellation flow to orders", not step-by-step implementation details.

The conventions and ubiquitous language allow us to express intent when working with coding agents, reducing the amount of upfront specification and planning work. We can skip a lot of the details and talk about the high-level goal that we want to achieve, trusting the AI to map concepts to conventions.

Feedback Loops

When working with coding agents, it is important to have quick feedback loops so that the AI can test and verify their work. Unit tests and linters are one way to address this, but we also see a clear trend towards statically typed languages. TypeScript is the most visible example, but we think it doesn't go far enough.

Rust's type system catches errors that TypeScript can't—null safety, ownership, exhaustive matching. For a coding agent, these aren't nice-to-haves; they're guardrails that prevent entire categories of mistakes from reaching runtime. When the compiler is stricter, the feedback loop is tighter.

We're building Aonyx around this principle:

  • Automated tests are fast to run and easy to write. Aonyx provides the right abstractions and tools to test your application and business logic from end-to-end, giving both you and the AI confidence.
  • Constraints in the business logic are expressed in Rust's type system and checked at compile-time. This provides early feedback and avoids costly runtime errors. When it compiles, it runs.
  • Custom linting tools that verify your code follows Aonyx's conventions, ensuring that the AI's output stays consistent with the rest of your codebase.

What's Next?

We're launching Aonyx in the coming weeks. If you're building in Rust and want to see what an AI-native framework looks like in practice, follow along—or reach out if you'd like early access.

To learn more about us, check out our introduction:

Introducing Aonyx
We are building an AI-native development platform that helps teams ship faster and reach new platforms ahead of competitors.

Subscribe to Aonyx AI

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.
jamie@example.com
Subscribe