Cortex: Measurement-Gated Evolution and Pruning of Coding-Agent Skills and Rules
Samuele Giampieri
Independent Researcher
Published October 9, 2026 · on the feed October 15, 2026 · ▲ 3 · arXiv 2610.14216
The abstract
Coding agents such as Claude Code also follow text files that developers write for them: a project file, skills the agent may choose to open, and rules that load automatically when the agent reads matching files. We call these files the agent's harness. Developers add to it whenever they correct the agent, but one success proves little: the same agent can pass a task once and fail it the next time. We present Cortex, a tool that tests changes to the harness instead of trusting them. It saves fixes from the developer's sessions as replayable tasks, finds the corrections that recur, writes one skill or rule at a time, and keeps it only if repeated runs with and without it show a net gain and no task made noticeably worse. Existing text is tested the same way before it is deleted, and Cortex neither adds nor deletes text the agent never used. We tested Cortex with Claude Haiku 4.5 on a repository built for the purpose, with conventions the model tends to break, one area with nothing to learn, and a script playing the developer. On held-out tasks, the harnesses it built made the agent follow the conventions far more often than no skills or rules did, left the comparison area unchanged, and added no text read on every turn. Rules, which load automatically, did most of the work; skills helped only when offered with the files a task touches, and those offered on every turn were rarely opened. Cortex kept none of the useless or harmful suggestions we planted, but the agent never opened the useless ones or the harmful skills, and it reached no verdict on the harmful rules, so the test shows that Cortex keeps no unused text, not that it detects damage. Under the stronger Claude Sonnet 5 a single run's harness added little, and on a real open-source project, where the agent was rarely corrected, Cortex found nothing to learn. We release the tool, the lab and its data.
The Brief
2:52A short podcast summary of the paper. Written and voiced by AI.
Transcript
Cortex. Measurement-Gated Evolution and Pruning of Coding-Agent Skills and Rules. By Samuele Giampieri, working independently. Published on the ninth of October. Its code repository is worked out: about one hundred source files, with a readme and a licence.
Coding agents such as Claude Code do not only follow the request in front of them. They also follow text files that developers write for them. There is a project file. There are skills, which the agent may choose to open. And there are rules, which load automatically whenever the agent reads matching files. The paper calls this collection of files the agent's harness.
Developers add to the harness every time they correct the agent. The trouble is that a single success proves little. The same agent can pass a task once and fail it the next time. So a fix that seemed to work may not have done anything at all, and the harness keeps growing on the strength of anecdotes.
Cortex is a tool that tests changes to the harness instead of trusting them. A new piece of text earns its place only by measurement, and existing text has to keep earning it, or go.
Cortex saves fixes from the developer's sessions as tasks that can be replayed. It finds the corrections that recur, and writes one skill or rule at a time. Each candidate is kept only under two conditions: repeated runs with it and without it show a net gain, and no task gets noticeably worse. Existing text is tested the same way before it is deleted. And Cortex neither adds nor deletes text that the agent never used.
The test used Claude Haiku 4.5 on a repository built for the purpose. It had conventions the model tends to break, one area with nothing to learn, kept as a comparison, and a script playing the part of the developer. On held-out tasks, the harnesses Cortex built made the agent follow the conventions far more often than having no skills or rules did. The comparison area was left unchanged, and no text was added that gets read on every turn.
Rules, which load automatically, did most of the work. Skills helped only when they were offered alongside the files a task touches. Skills offered on every turn were rarely opened at all.
The author also planted useless and harmful suggestions, and Cortex kept none of them. The author is careful about what that does and does not show. The agent never opened the useless suggestions or the harmful skills, and Cortex reached no verdict on the harmful rules. So the test shows that Cortex keeps no unused text. It does not show that Cortex detects damage.
Two further results mark the limits. Under the stronger Claude Sonnet 5, the harness built from a single run added little. And on a real open-source project, where the agent was rarely corrected, Cortex found nothing to learn.
The tool, the lab and its data are all released. What Cortex offers is a discipline more than a trick: treat every line written for an agent as a claim, run it enough times to see whether it holds, and let text the agent never uses go. The report is equally plain about where that discipline found nothing to do.
More with an account
Listen to every day’s papers
Daily playlists, deep dives, quests for the papers, and quizzes on their key terms.
Join free