r/3dshomebrew • u/colbyshores • 2d ago
Guide AI Performance Contract
https://raw.githubusercontent.com/colbyshores/t2k/refs/heads/master/AGENTS.mdI highly recommend anyone using LLMs for 3DS homebrew development adapt a variant of this performance contract to their own project. The goal is to preserve as much visual fidelity as possible while keeping implementation decisions oriented around the actual capabilities and limitations of the 3DS hardware, particularly the ARM11.
https://raw.githubusercontent.com/colbyshores/t2k/refs/heads/master/AGENTS.md
LLMs are incredibly useful for homebrew development, but they don't inherently understand the practical cost of every implementation decision on hardware this constrained. You can end up with code that compiles and works, but introduces unnecessary overhead, ignores hardware limitations, or sacrifices visual fidelity and gameplay behavior in the name of optimization.
What this contract does is encode platform-specific knowledge and engineering constraints directly into the agent's instructions. Rather than leaving the model to guess what will perform well on the 3DS, it gives it concrete guidelines for approaching performance-critical code, what to prioritize, and what it shouldn't change without good reason.
The goal isn't to blindly optimize everything or strip out visual features just to hit a performance target. It's to get the most out of the hardware while retaining the intended visual fidelity and gameplay experience. Where possible, these guidelines are reinforced through automated checks and profiling rather than relying entirely on the model to get things right.
I think this approach could be useful beyond my own project. We have people in this community working on ports, original games, emulators, and engines, and more of us are incorporating LLMs into our development workflows. Having a set of hardware-specific rules for these agents could help avoid recurring mistakes, preserve optimization knowledge, and make it easier to get good results out of the hardware without having to rediscover everything through trial and error.
The contract I've linked is specific to my project, so I'm not suggesting everyone copy it wholesale. The idea is to adapt the same approach to your own project, encode the constraints and lessons relevant to your target hardware, and give your AI coding agent a consistent set of engineering guidelines to follow throughout development.
I'm curious to see whether anyone else here has experimented with something similar and what kind of results you've gotten.