Dev.to AI πŸ€– Ai πŸ‘ 0 πŸ“– 3 min read

codemyrules 0.9: One lint feedback loop, four AI coding harnesses

Two weeks ago I released codemyrules. Two weeks ago I released codemyrules, an agent skill that turns the rules in your CLAUDE.md or AGENTS.md into executable lint rules. At the time, its feedback loop worked only in C

Two weeks ago I released codemyrules.

Two weeks ago I released codemyrules, an agent skill that turns the rules in your CLAUDE.md or AGENTS.md into executable lint rules.

At the time, its feedback loop worked only in Claude Code.

That limitation is now gone. codemyrules 0.9 brings the same feedback loop to pi, opencode and GitHub Copilot CLI.

This post tells you what changed from version 0.3 to version 0.9.

The feedback loop in more harnesses

The rules and the doc cleanup always worked in every harness.
The feedback loop needs hooks, and each harness has a different hook API.
Now the loop works in four harnesses:

Harness How the loop is installed
Claude Code project hooks in .claude/settings.local.json
pi a project extension in .pi/extensions/
opencode 2 a project plugin in .opencode/plugins/
GitHub Copilot CLI project hooks in .github/hooks/codemyrules.json

All four use the same harness-neutral core.
Each harness gets only a small adapter.

You do not have to select the harness.
The installer looks at the folders in your project and selects the harness.
If it finds more than one harness, it asks you to select one.

npm install -g codemyrules
codemyrules install . --config loop.json           # dry run: shows the plan and the harness
codemyrules install . --config loop.json --apply   # installs it

Note: I tested the Copilot CLI adapter with its hook contract, but not yet in a live Copilot CLI session.
If you use Copilot CLI, please tell me if it works for you.
Codex and Cursor do not have the loop yet.

More stacks

  • oxlint: If your frontend uses oxlint, codemyrules now writes the rules as oxlint JS plugins. The loop reads the oxlint output and counts oxlint-disable comments as suppressions.
  • PowerShell: codemyrules now writes PSScriptAnalyzer rules. It uses the built-in rules first. If no built-in rule fits, it writes a custom rule with Pester tests.

Biome is not supported yet.
The installer tells you this.
It does not fail silently.

A guard that is harder to trick

An agent that wants to finish a task will sometimes find a shortcut past the linter.
The guard stops these shortcuts and asks you first.
I did a review of the guard and closed these gaps:

  • Shell commands: An agent can change a lint config or add an ignore comment with sed or echo. The shell guard compares the files before and after each shell command, and finds these changes.
  • Commits: An agent can commit a change to hide it from the diff. Now the end-of-turn lint compares against the commit from the start of the turn.
  • Part of a line: If an edit changes part of a line, the guard now checks the full line.
  • Loops: The loop sends the same findings back to the agent only one time, so a turn cannot loop forever.
  • Errors: If a hook cannot run, it stops and tells you how to repair it. It does not fail open.

Safer updates

The hooks now come from the codemyrules npm package.
Each project has a pinned copy of the package.
When you run npm update -g codemyrules, no project changes.
A new version runs in a project only after you install it again in that project.
The dry run shows the version change first.
Thus, a bad release cannot get into your projects automatically.

Two new commands show and remove the setup:

codemyrules status .
codemyrules uninstall . --apply

Try it

In Claude Code:

claude plugin marketplace add clirimajeti/codemyrules
claude plugin install codemyrules@codemyrules

For pi, opencode or Copilot CLI, see the README.
Then ask: "Turn our ADRs and AGENTS.md into lint rules."

The full list of changes is in the CHANGELOG.

What is next

I am writing a paper about where the rules for an agent must be: in prose or in lint rules.
I will write a separate post when it is ready.

Until then, please tell me which harness you want next, and which of your rules a linter cannot check.
Comments and issues are both welcome.

πŸ“° Read the original article on Dev.to AI

Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes β€” full credit and traffic to the original publisher.