@omni-stove/ai-rules
v2025.11.2
Published
A repository that manages the common foundation for AI rules. Also publishes CLI tool scripts to npm registry. Each repository can obtain the latest version of common rules by executing `@omni-stove/ai-rules` (Node.js).
Downloads
125
Readme
ai-rules
A repository that manages the common foundation for AI rules.
Also publishes CLI tool scripts to npm registry.
Each repository can obtain the latest version of common rules by executing @omni-stove/ai-rules (Node.js).
Automatic Release
This repository automatically releases a new version of the package to npm registry whenever there are changes to the src directory. This ensures that the latest AI rules are always available for other projects.
Releases are automatically performed under the following conditions:
- When pushing to the
mainbranch with changes tosrc/**,index.js, or.github/** - When manually executed from the "Actions" tab in GitHub Actions
Versioning uses CalVer (Calendar Versioning), and versions are automatically generated in the format YYYY.MM.RELEASE_COUNT. For example, the first release in March 2025 would be 2025.3.1.
Installation
For Developers (when editing this repository)
If you don't need to adjust the script itself, you can simply edit the documents and commit them
Setup
npm run setupThe package is now available on npm registry, so no special authentication is required for installation.
Settings Required to Run the CLI Tool
Rename the
.env.examplefile to.envEdit the
.envfile to set your GitHub Personal Access TokenGITHUB_TOKEN=your_github_personal_access_tokenTo run the CLI tool:
node index.jsOr, to run with a specified output destination:
node index.js --output /path/to/output
Preparation for CLI Users
Add the following to .gitignore
.clinerules
.cursor
.roo
.roomodes
.ai-rules-version.json
.github/copilot-instructions.md
.claude/*
!.claude/commands
CLAUDE.personal.md
.gemini/*
!.gemini/commands
GEMINI.personal.md
.serena/cacheNote for Claude Code users:
- Copy
.claude/CLAUDE.example.mdto your project root asCLAUDE.mdfor your main configuration - Copy
.claude/CLAUDE.personal.mdto your project root asCLAUDE.personal.mdfor personal settings (this file is git-ignored) - The main
CLAUDE.mdshould import personal configuration using@CLAUDE.personal.md
Note for Gemini users:
- Copy
.gemini/GEMINI.example.mdto your project root asGEMINI.mdfor your main configuration - Copy
.gemini/GEMINI.personal.mdto your project root asGEMINI.personal.mdfor personal settings (this file is git-ignored) - The main
GEMINI.mdshould import personal configuration using@GEMINI.personal.md
Claude Code Setup Instructions
For Team Leads (Setting up team configuration)
Run the CLI tool to generate configuration files:
npm install @omni-stove/ai-rules npx @omni-stove/ai-rulesCopy the generated main configuration:
cp .claude/CLAUDE.example.md CLAUDE.mdCustomize
CLAUDE.mdfor your team's needs and commit it to the repository.
For Team Members (Setting up personal configuration)
Ensure the repository has
CLAUDE.mdin the project rootCreate your personal configuration:
cp .claude/CLAUDE.personal.md CLAUDE.personal.mdCustomize
CLAUDE.personal.mdwith your personal preferences (personas, personal settings, etc.). This file is git-ignored and won't be shared.The main
CLAUDE.mdautomatically imports personal settings via@CLAUDE.personal.md
Gemini Code Setup Instructions
For Team Leads (Setting up team configuration)
Run the CLI tool to generate configuration files:
npm install @omni-stove/ai-rules npx @omni-stove/ai-rulesCopy the generated main configuration:
cp .gemini/GEMINI.example.md GEMINI.mdCustomize
GEMINI.mdfor your team's needs and commit it to the repository.
For Team Members (Setting up personal configuration)
Ensure the repository has
GEMINI.mdin the project rootCreate your personal configuration:
cp .gemini/GEMINI.personal.md GEMINI.personal.mdCustomize
GEMINI.personal.mdwith your personal preferences (personas, personal settings, etc.). This file is git-ignored and won't be shared.The main
GEMINI.mdautomatically imports personal settings via@GEMINI.personal.md
Node.js Version
Install the package:
npm install @omni-stove/ai-rulesIncorporating CLI execution into postinstall will automatically download the latest rules:
"postinstall": "@omni-stove/ai-rules"Place the local-ai-rules directory at the root and add repository-specific rules that are not common rules.
.clineignore and .cursorignore should be configured for each repository.
Directory Structure
index.js
A script that converts rules to various formats. Currently supports:
.clinerules/*.md(Cline).cursor/rules/*.mdc(Cursor).roo/rules/*.md(Roo).claude/rules/*.md,CLAUDE.example.md, andCLAUDE.personal.md(Claude Code).gemini/rules/*.md,GEMINI.example.md, andGEMINI.personal.md(Gemini).github/copilot-instructions.md(GitHub Copilot)
src
Contains index.md, which is the source of all AI rules, and detailed documents on various technical matters are placed under ai-docs.
src/index.md
The source file for all AI rules. This is used as the basis for conversion to various formats.
src/ai-docs
Contains detailed documents on various technical matters. The documents are split to consider the context window size and to load appropriate documents for each task.
