How to use Claude to build a rules compiler CLI
The author published dev-workflows v0.1 on npm with six commands, three editor bridges, six rule blocks, and 54+ passing tests.
Prompt to try
Editorial adaptation, not the source author’s exact prompt. Replace bracketed inputs and review tool permissions first.
Use [CLI_SPEC.md] to build [rules compiler CLI]. Scaffold commands, implement YAML parsing and bridges for [editors], add reusable blocks, and configure CI. Dogfood it on [repository], preserving manual content and versioned source rules.
Reach people exploring AI agents
See placements →What happened
The author published dev-workflows v0.1 on npm with six commands, three editor bridges, six rule blocks, and 54+ passing tests.
Reported by gpolanco on dev.toHow the agent did it
- Reduced the planning documents to CLI_SPEC.md and DECISIONS.md.
- Gave Claude Code the spec and scaffolded commands and compilation bridges.
- Added reusable rule blocks and command tests.
Where a person stepped in
The author used the CLI on its own repository and identified three bugs that the tests had missed.
A person approved each step before the agent continued.
The author had two projects addressing duplicated rules across coding editors: a deployed web application they did not use and a CLI that existed only as documentation. They chose the CLI, reduced five planning documents to an implementation specification and a decision log, and handed the specification to Claude Code.
The morning work established the command-line package, TypeScript configuration, and command stubs. It then added initialization with tool detection and interactive prompts, followed by a YAML parser and separate output bridges for Claude Code, Cursor, and Gemini CLI. A doctor command checked the generated setup. The next sprint added a registry and installer for reusable rule blocks, along with add, remove, and list commands.
The afternoon covered the README, npm configuration, GitHub Actions, and changesets. Crucially, the author used the CLI on its own repository. This exposed overwritten manual CLAUDE.md content, source rules being ignored by Git, and crashes on invalid prompt input. The post describes fixes for all three. By day's end, the CLI was published on npm with six commands, three bridges, six blocks, and more than 54 passing tests.
Who it's for: Developers maintaining the same project rules across multiple coding editors.
Prompt
Suggested prompt (written by Agents In Use, not the author's)
Source: dev.to · gpolanco
Frequently asked questions
What did the CLI compile?
It compiled rules defined in YAML into native formats for Claude Code, Cursor, and Gemini CLI.
What did dogfooding uncover?
It found complete CLAUDE.md overwrites, an overly broad .gitignore entry for .dwf/, and stack traces from invalid interactive input.
More details
Remaining steps
- Dogfooded the CLI, fixed three discovered bugs, and published to npm.
About this account
Claude Code implemented the CLI from a concise specification across core, rule-block, and shipping work.
Platform: dev.to. Attribution: https://dev.to/gpolanco/stop-duplicating-rules-manage-agentic-editors-with-one-cli-20j6. Prompt: Suggested (written by Agents In Use, not the author's). Sourced by the Agents In Use pipeline.
Credit: gpolanco on dev.to
Source published 7 Feb 2026
Source checked 14 Oct 2026
Tools and topics
Claude Code · TypeScript · commander · GitHub Actions · changesets · npm
CLI · Rules management · Dogfooding
Editorial completeness: 100/100. Measures documented fields, not agent performance or verified outcomes.