rulesync 0.2.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 dyoshikawa
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -3,123 +3,135 @@
3
3
  [![CI](https://github.com/dyoshikawa/rulesync/actions/workflows/ci.yml/badge.svg)](https://github.com/dyoshikawa/rulesync/actions/workflows/ci.yml)
4
4
  [![npm version](https://badge.fury.io/js/rulesync.svg)](https://www.npmjs.com/package/rulesync)
5
5
 
6
- 統一されたAIルール設定ファイル(`.rulesync/*.md`)から、各種AI開発支援ツールの設定ファイルを自動生成するNode.js CLIツールです。
6
+ A Node.js CLI tool that automatically generates configuration files for various AI development tools from unified AI rule files (`.rulesync/*.md`).
7
7
 
8
- ## 対応ツール
8
+ ## Supported Tools
9
9
 
10
10
  - **GitHub Copilot Custom Instructions** (`.github/instructions/*.instructions.md`)
11
11
  - **Cursor Project Rules** (`.cursor/rules/*.md`)
12
12
  - **Cline Rules** (`.clinerules/*.md`)
13
+ - **Claude Code Memory** (`./CLAUDE.md`)
13
14
 
14
- ## インストール
15
+ ## Installation
15
16
 
16
17
  ```bash
17
18
  npm install -g rulesync
18
- # または
19
+ # or
19
20
  pnpm add -g rulesync
20
- # または
21
+ # or
21
22
  yarn global add rulesync
22
23
  ```
23
24
 
24
- ## 使用方法
25
+ ## Usage
25
26
 
26
- ### 1. 初期化
27
+ ### 1. Initialize
27
28
 
28
29
  ```bash
29
30
  rulesync init
30
31
  ```
31
32
 
32
- `.rulesync/` ディレクトリとサンプルルールファイルが作成されます。
33
+ This creates a `.rulesync/` directory with sample rule files.
33
34
 
34
- ### 2. ルールファイルの編集
35
+ ### 2. Edit Rule Files
35
36
 
36
- Markdownファイルにフロントマターでメタデータを記述します:
37
+ Define metadata in front matter for each Markdown file:
37
38
 
38
39
  ```markdown
39
40
  ---
40
- priority: high
41
- targets: ["*"] # または [copilot, cursor, cline]
42
- description: "TypeScriptコーディングルール"
41
+ ruleLevel: overview # or detail
42
+ targets: ["*"] # or [copilot, cursor, cline, claudecode]
43
+ description: "TypeScript coding rules"
43
44
  globs: ["**/*.ts", "**/*.tsx"]
44
45
  ---
45
46
 
46
47
  # TypeScript Rules
47
48
 
48
- - TypeScriptを使用する
49
- - 型注釈を明確に記述する
49
+ - Use TypeScript
50
+ - Write clear type annotations
50
51
  ```
51
52
 
52
- ### 3. 設定ファイル生成
53
+ ### Rule Levels
54
+
55
+ - **overview**: Project-wide overview and policies (only one file allowed)
56
+ - **detail**: Specific implementation rules and detailed guidelines (multiple files allowed)
57
+
58
+ Each tool handles rule levels differently:
59
+ - **Claude Code**: overview → `CLAUDE.md`, detail → `.claude/memories/*.md`
60
+ - **Cursor**: overview → `ruletype: always`, detail → `ruletype: autoattached`
61
+
62
+ ### 3. Generate Configuration Files
53
63
 
54
64
  ```bash
55
- # 全ツール用設定ファイル生成
65
+ # Generate for all tools
56
66
  rulesync generate
57
67
 
58
- # 特定ツールのみ
68
+ # Generate for specific tools
59
69
  rulesync generate --copilot
60
70
  rulesync generate --cursor
61
71
  rulesync generate --cline
72
+ rulesync generate --claude
62
73
  ```
63
74
 
64
- ### 4. その他のコマンド
75
+ ### 4. Other Commands
65
76
 
66
77
  ```bash
67
- # 設定の妥当性チェック
78
+ # Validate configuration
68
79
  rulesync validate
69
80
 
70
- # 現在の状況確認
81
+ # Check current status
71
82
  rulesync status
72
83
 
73
- # ファイル監視・自動生成
84
+ # Watch files and auto-generate
74
85
  rulesync watch
75
86
  ```
76
87
 
77
- ## 設定ファイル構造
88
+ ## Configuration File Structure
78
89
 
79
90
  ```
80
- .ai-rules/
81
- ├── coding-rules.md # コーディングルール
82
- ├── naming-conventions.md # 命名規則
83
- ├── architecture.md # アーキテクチャガイドライン
84
- ├── security.md # セキュリティルール
85
- └── custom.md # プロジェクト固有ルール
91
+ .rulesync/
92
+ ├── coding-rules.md # Coding rules
93
+ ├── naming-conventions.md # Naming conventions
94
+ ├── architecture.md # Architecture guidelines
95
+ ├── security.md # Security rules
96
+ └── custom.md # Project-specific rules
86
97
  ```
87
98
 
88
- ## 生成される設定ファイル
99
+ ## Generated Configuration Files
89
100
 
90
- | ツール | 出力先 | 形式 |
91
- |--------|--------|------|
101
+ | Tool | Output Path | Format |
102
+ |------|------------|--------|
92
103
  | GitHub Copilot | `.github/instructions/*.instructions.md` | Front Matter + Markdown |
93
104
  | Cursor | `.cursor/rules/*.md` | MDC (YAML header + Markdown) |
94
- | Cline | `.clinerules/*.md` | プレーンMarkdown |
105
+ | Cline | `.clinerules/*.md` | Plain Markdown |
106
+ | Claude Code | `./CLAUDE.md` (overview), `.claude/memories/*.md` (detail) | Plain Markdown |
95
107
 
96
- ## 開発
108
+ ## Development
97
109
 
98
110
  ```bash
99
- # 依存関係インストール
111
+ # Install dependencies
100
112
  pnpm install
101
113
 
102
- # 開発実行
114
+ # Development run
103
115
  pnpm dev
104
116
 
105
- # ビルド
117
+ # Build
106
118
  pnpm build
107
119
 
108
- # テスト
120
+ # Test
109
121
  pnpm test
110
122
 
111
- # コード品質チェック
123
+ # Code quality checks
112
124
  pnpm lint
113
125
  pnpm format
114
126
  pnpm secretlint
115
127
  ```
116
128
 
117
- ## ライセンス
129
+ ## License
118
130
 
119
131
  MIT License
120
132
 
121
- ## 貢献
133
+ ## Contributing
122
134
 
123
- Issue Pull Request をお待ちしています!
135
+ Issues and Pull Requests are welcome!
124
136
 
125
- 詳細な仕様については [SPECIFICATION.md](./SPECIFICATION.md) をご覧ください。
137
+ For detailed specifications, see [SPECIFICATION.md](./SPECIFICATION.md).