opensourceprojects.dev

A broadsheet for software that doesn't ask for your email

Teach your AI agents your coding patterns once, get repeatable results
GitHub RepoImpressions3

Project Description

View on GitHub

Stop Rewriting AI-Generated Code: Teach Your Agents Your Patterns Once

You know the drill. You ask an AI agent to build an endpoint, and it hands you generic boilerplate that doesn't match your codebase at all. No Zod validation, wrong ORM, inconsistent response format. So you spend twenty minutes rewriting what the AI should have gotten right in the first place. OpenAgents Control (OAC) is an open-source framework that tries to solve this by teaching AI agents your coding patterns up front—so the code they generate actually looks like yours.

What It Does

OAC is built on OpenCode, an open-source AI coding framework, and extends it with specialized agents, context management, and team workflows. The core idea is simple: instead of letting an AI agent guess at your conventions, you define your patterns once, and the agent loads them before generating any code.

The project is model-agnostic—it works with Claude, GPT, Gemini, MiniMax, and local models—and supports multiple languages including TypeScript, Python, Go, Rust, and C#. The agents are stored as editable markdown files, meaning you can modify their behavior without recompiling anything or dealing with vendor lock-in.

Architecturally, OAC follows what they call the MVI principle: Minimal Viable Information. Context files stay under 200 lines, and loading is lazy, so the agent only pulls in what it needs when it needs it. This keeps responses fast and token usage down.

Why It's Cool

The thing that makes OAC stand out is how it handles the context problem. Most AI agents treat every request like it's the first time they've seen your project. OAC flips that by making context-aware generation the default behavior.

Your patterns, enforced. The README shows a concrete example: generic AI output versus code that uses your Zod schema, your Drizzle ORM setup, and your preferred response format. That's the difference between code you have to refactor and code you can ship. If you've ever spent hours fixing inconsistencies across AI-generated code, you'll appreciate what this buys you.

Agents you can actually edit. A lot of AI tooling treats agents as black boxes. OAC stores them as markdown files you can open in any editor. Want to add a constraint about error handling? Change a workflow step? Just edit the file. No compilation, no plugin SDK, no fighting the framework. It's refreshingly transparent.

Human-in-the-loop by default. OAC agents always request approval before executing anything. The flow is propose, approve, execute. That means no more "oh no, what did the AI just do?" moments where you discover the agent refactored your entire auth system while you were getting coffee. You stay in control, which is how AI-assisted development should work.

Team consistency without effort. Store your patterns once, commit them to the repo, and every developer on your team gets the same standards automatically. New hires inherit your team's patterns just by cloning the repository. That's a genuinely useful workflow improvement, especially for teams that have been struggling to standardize how they use AI tools.

Token efficiency is a real design goal. The lazy loading and small context files aren't just optimization theater—they make the tool actually pleasant to use. AI coding tools that burn tokens on irrelevant context get slow and expensive fast. OAC's approach keeps things lean.

How to Try It

Getting started with OAC is straightforward. Head over to the repository and check out the Quick Start section in the README. Since OAC is built on OpenCode, you'll want to have that installed first—the README points to opencode.ai for setup instructions.

Once you're set up, the workflow looks something like this:

  1. Clone the repository and review the existing agent definitions in the markdown files
  2. Edit the agents to reflect your team's coding patterns—your validation libraries, your ORM, your response conventions
  3. Commit those context files to your project repository
  4. Start a session and let the agent propose a plan before it touches any code
  5. Approve each step and watch the generated code match your existing style

The README emphasizes that you can customize everything—workflows, constraints, agent behavior—directly in the markdown files. There's also a roadmap link and a community link in the repo if you want to see where the project is headed or get involved.

Final Thoughts

OAC isn't trying to be the flashiest AI coding tool out there. It's solving a practical, annoying problem: AI agents that don't know your codebase produce code you have to fix. By putting pattern definition and approval gates at the center of the workflow, it makes AI assistance feel less like gambling and more like delegation. If you're on a team that's been burned by inconsistent AI-generated code, or if you're tired of rewriting boilerplate that should've been right the first time, this is worth a look. It's early days, but the approach is solid—and anything that cuts down on refactoring time is a win.


Follow @githubprojects for more developer tools and open source projects.

Back to Projects
Project ID: 76e71ae5-42be-4622-927f-a4ffd804d3c8Last updated: August 24, 2026 at 05:33 AM