Dev.to AI πŸ€– Ai πŸ‘ 2 πŸ“– 1 min read

Stop Maintaining 5 AI Coding Rule Files by Hand: Deterministic Converter for .cursorrules, .mdc, CLAUDE.md, AGENTS.md & Windsurf

If your team uses more than one AI coding assistant in 2026, you probably have the same architectural rules duplicated across four or five slightly different files: .cursorrules (legacy Cursor single-file) .cursor/ru

If your team uses more than one AI coding assistant in 2026, you probably have the same architectural rules duplicated across four or five slightly different files:

  • .cursorrules (legacy Cursor single-file)
  • .cursor/rules/*.mdc (modern Cursor YAML frontmatter + globs)
  • CLAUDE.md (Claude Code)
  • AGENTS.md (Codex / OpenCode / Antigravity)
  • .windsurfrules (Windsurf)
  • .github/copilot-instructions.md (GitHub Copilot)

Every time you update a testing convention or forbid a deprecated pattern, three of those files drift out of sync.

I built ai-agent-rules-converter (MIT license, zero npm dependencies) plus a 100% browser-local web converter so you can maintain one canonical rule file and deterministically generate all the others.

Why deterministic parsing instead of asking an LLM?

Asking an LLM to "rewrite my .cursorrules as CLAUDE.md" silently drops edge-case prohibitions, invents markdown headings, and produces noisy diffs in PRs.

A deterministic converter parses YAML frontmatter (description, globs, alwaysApply) cleanly, preserves every bullet verbatim, and outputs identical bytes on repeated runs so CI checks stay green.

Usage (Node.js 18+, zero dependencies)

git clone https://github.com/matiascorrea2024-star/ai-agent-rules-converter.git
cd ai-agent-rules-converter
npm test

# Convert legacy .cursorrules to CLAUDE.md
node bin/convert-rules.js .cursorrules --to claude-md -o CLAUDE.md

# Convert CLAUDE.md to Cursor .mdc with globs
node bin/convert-rules.js CLAUDE.md --to cursor-mdc --globs "src/**/*.ts" -o .cursor/rules/project.mdc

# Fan out to all 5 harnesses at once
node bin/convert-rules.js AGENTS.md --all --out-dir ./generated-rules

Try it without installing anything

Paste any .cursorrules, .mdc, CLAUDE.md, AGENTS.md, or .windsurfrules file into the free browser-local converter β€” all parsing runs strictly client-side in your browser with zero uploads.

What rule files is your team standardizing on in 2026? Most teams I talk to are consolidating around AGENTS.md + CLAUDE.md and generating .cursor/rules/*.mdc in CI.

πŸ“° 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.