🤖

複数の Coding Agent に与える Rule を管理する AI Docs Sync

に公開

以前 GitHub Copilot、Cline、Cursor の Rule 一元管理するツールを作ったのですが、Cline や Cursor に日夜変更が入り続け、Rule を1つのファイルにするというよりは、指定のディレクトリに Markdown 形式で設置する形式の採用が増えてきたので、その形式にも対応しました。

また Agent に対して、読んではいけないファイルを指定する ignore も各サービスで定義ファイルが違うのでこれも一元管理できる仕組みを追加しました。

https://zenn.dev/him0/articles/87a68c7dcf65cb

この変更対応を受けて、Coding Agent 向けの Rule をまとめ上げるというコンセプトから外れてきたのでリポジトリ及びコマンドの名称を AI Rule Forge という名称から AI Docs Sync に変更しました。

https://github.com/him0/ai-docs-sync

あとちゃんと npm で package を公開したので、npx コマンドで実行する際にリポジトリ指定からパッケージ指定で実行できるようになりました。

https://www.npmjs.com/package/@him0/ai-docs-sync

使い方

初期化

npx @him0/ai-docs-sync init

これを実行すると ai-docs/ディレクトリができます。
ai-docs/rules/に rule を markdown 形式で記載
ai-docs/ignoreに ignore を igtignore の形式で記載

変更の適用

npx @him0/ai-docs-sync

GitHub Copilot、Cline、Cursor 各サービス向けのファイルが更新されます
上書きが発生してしまうので git 管理下でバージョン管理しながら利用してください

生成される、ファイルやディレクトリ今のところ以下

  • .github/copilot-instructions.md (for GitHub Copilot - merged single file)
  • .clinerules/ directory with individual .md files (for Cline)
  • .cursor/rules/ directory with .mdc format files with frontmatter (for Cursor)
  • .copilotignore (for GitHub Copilot)
  • .clineignore (for Cline)
  • .cursor/ignore (for Cursor)

使うか不明だが一応 plan モード

npx @him0/ai-docs-sync plan

不具合・ご意見、機能追加

いずれも歓迎です。英語でも日本語でも大丈夫です。Issue & PR お待ちしております。

https://github.com/him0/ai-docs-sync

Discussion