Eduarda Ferreira

How I Use Cortex to Augment My AI Agents

I show you how Cortex gives my AI agents the knowledge they need before they work, so each agent builds with what we have learned.

Before I could orchestrate a swarm, I had to stop my agents from wrecking what we had built. More agents would only multiply the damage. That is why I am starting here.

Part 1: How We Solved AI Coding Slop

My coding agents wrecked my cofounder's life's work faster than he could review my changes. It was our product Journeys, a human-AI collaboration platform with more than a million lines he had written by hand and was proud of. I turned our codebase into a crime scene one reasonable commit at a time.

I'm Eduarda Ferreira, and I founded Socra with Mike. I have been coding with AI since 2023, and back then I had to ask him for help most of the time. That year I made 216 GitHub contributions.

Mike is a self-taught full-stack developer who has been coding for almost ten years, and every decision in our codebase carries what those years taught him about building good software. He held the whole system in his head, and for most of that decade the reasons behind his decisions lived nowhere else.

A white humanoid robot spilling a tangled stream of colorful codeUntil 2024, Copilot finished the line I was typing, or I pasted a block of code from an AI chat bot. Then coding agents arrived that could read our codebase, edit files, run commands, and build whole features alone. I stopped asking Mike for help and moved fast, and the freedom felt great: 1,112 contributions that year.

Every commit my agents made looked fine on its own, and the tests passed. Together, the commits wore what made Journeys special away, because the specific knowledge behind each file was missing at the moment my agents changed it: the things Mike knows about our system that no model was trained on. They filled these gaps with generic guesses.

At first the slop arrived as small bugs, one confident wrong guess at a time, until Journeys was unusable. We started losing power users, and Mike could not review changes at the speed I could produce them. What kept him up at night was having to reverse engineer my agents' damage in his own codebase.

This is how he described what reviewing my work felt like:

"The first thing I saw would be terrible. I'd be like, man, we don't do it this way, this is going to have these problems. Then I'd look a little deeper, pull back a layer of the onion, and it would get worse. I'd pull back another layer, and it would get even worse. It makes you feel really terrible as a senior engineer to watch your life's work getting wrecked."

In 2025 we split the work as Mike started building a new codebase from scratch to replace Journeys.

I treated the wrecked codebase as my lab and set out to build a self-improving swarm. Every experiment ended the same way: an agent learned what I wanted, the session closed, and the learning went with it. The next agent started blank, and one of them broke something I had already fixed 10x before.

So I carried the context by hand pasting summaries from one session into the next, and the tokens I burned were obscene, at the peak I was spending $100 a day on Cursor. I memorized dozens of keyboard shortcuts for the prompts I repeated daily. Then came the markdown files with instructions for everything my agents needed to know and it multiplied into a mess nobody maintained.

The codebase moved every day and the files stood still. My agents kept reading last month's wrong decisions and following it with full confidence. Writing the knowledge down was easy, but I had no system for keeping it true.

Working at a photolithography tool under the yellow light of the cleanroom at Texas InstrumentsBefore Socra and a 3D printing startup, I was a photolithography engineer at Texas Instruments, in a full cleanroom suit, no makeup, no perfume, because one particle can kill a chip. That factory knew how to learn. When a run taught us something, we changed the recipe, and every run after it inherited the change. Nobody re-taught a lesson at the start of a shift, because the lesson lived in the recipe.

My swarm had no place where a lesson could live. Being able to make my swarm actually work came down to one question: how does an agent get everything it needs to know before it acts (and nothing else) and keeps that knowledge up to date? Last year we started building Cortex to answer it.

Mike had been fighting the same problem from his side. He tried agents.md files, and they helped with the one thing each file described and nothing around it. So he had an idea for how to solve this problem, which he explains here, and that's what Cortex is.

I started using Cortex six months ago, on Journeys first. Now Journeys is on the best shape it has ever been and we decided to keep it instead of replacing.

Cortex has no agent of its own. It plugs into the agents I already used, Claude Code and Codex among them, so my coding agents stayed the same.

Before the agent changes anything in my repos, it flashed the Module that explains how things should be done. Module is the knowledge object: a named, versioned specification of how one part of a system should work and why. My agents also consume Mike's modules, with his reasons, and every Module it depended on followed, foundations first, so they know how to code the way he does.

Every Module has one owner, and only that owner approves its words. In mine, that is me. My agents can propose a change, and teammates can help draft or carry it out, but none of them decides what becomes true. I decide what becomes true and they reconcile the code.

When I ask my agents to perform tasks that contradict the knowledge in modules, they first ask for permission to update the module content. When I give my agents any information that's not present in modules, they ask permission to add. That way they build my knowledge graph and I don't have to do anything.

At Socra, Mike owns the backend, every API, every MCP server, and all of our infrastructure. I own design, all our web apps, and Journeys (our old monorepo).

The other day, Mike messaged me:

"Cortex UI is looking really good."

I found that awesome, because I had not worked on Cortex UI. What I had shipped was a release of the shared UI system behind all our web apps. My agents had improved its components and updated every web app to it. Cortex was the app Mike happened to open. This was my work reaching his screen with nothing in it for him to repair.

When I explained what he was looking at, he replied:

"Baby's first abstraction 🥹"

My goal is to build hundreds of products. Every one of them will depend on the same Modules: the design system, the shared components, and the decisions Mike and I approved. When I want to improve something, I change the words in one Module. Then my agents go product by product, flash the changed Module, find where each product no longer matches it, and fix the gap. I open none of the repositories. Every new product starts with every decision made before it.

You don’t have to write any modules to start using it. Once installed, Cortex teaches your agents how to use it, so your agents will start using it natively.

You will find yourself repeating yourself less and your systems improving over time.

We will have one-click setup as official plugin at OpenAI and Anthropic. For now, you can follow these docs to get started via agents plugins, cli, or mcp.

Learn more:

https://workspace.socra.com/products/cortex

Connect your coding agent:

https://workspace.socra.com/docs/cortex/integrations/coding-agents

Connect Claude or ChatGPT via MCP:

https://workspace.socra.com/docs/cortex/guides/mcp

Learn more about Cortex:

https://cortex.socra.com

Did something not work, or should something work better? Email team@socra.com, or tag @eduardadotai or @morteymike on X.