codingbuddy-rules 2.2.0 β†’ 2.3.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.
@@ -6,6 +6,42 @@ This guide explains how to use the common AI rules (`.ai-rules/`) in Claude Code
6
6
 
7
7
  Claude Code uses the `.claude/` directory for project-specific custom instructions, referencing the common rules from `.ai-rules/`.
8
8
 
9
+ ## πŸ†• Code Conventions Support
10
+
11
+ CodingBuddy now automatically enforces project code conventions from config files:
12
+
13
+ ### Available MCP Tool
14
+
15
+ **`get_code_conventions`**: Parses and exposes project conventions from:
16
+ - `tsconfig.json` - TypeScript strict mode, compiler options
17
+ - `eslint.config.js` / `.eslintrc.json` - Linting rules
18
+ - `.prettierrc` - Formatting rules (quotes, semicolons, indentation)
19
+ - `.editorconfig` - Editor settings (indent style/size, line endings, charset)
20
+ - `.markdownlint.json` - Markdown linting rules
21
+
22
+ ### When to Use
23
+
24
+ **ACT Mode**: Call `get_code_conventions` before implementing to verify code follows project conventions.
25
+
26
+ **EVAL Mode**: The `conventions` checklist domain is automatically included in code reviews.
27
+
28
+ ### Example Usage
29
+
30
+ ```typescript
31
+ // In ACT mode
32
+ const conventions = await get_code_conventions();
33
+
34
+ // Verify TypeScript strict mode
35
+ if (conventions.typescript.strict) {
36
+ // Ensure no implicit any types
37
+ }
38
+
39
+ // Check Prettier formatting
40
+ if (conventions.prettier.singleQuote) {
41
+ // Use single quotes
42
+ }
43
+ ```
44
+
9
45
  ## Integration Method
10
46
 
11
47
  ### 1. Create Claude Configuration
@@ -64,6 +64,10 @@
64
64
  "rule": "Configuration changes MUST be validated (lint, typecheck, build)",
65
65
  "verification_key": "validation"
66
66
  },
67
+ "convention_compliance": {
68
+ "rule": "Code MUST follow project conventions from config files (tsconfig, eslint, prettier, editorconfig, markdownlint)",
69
+ "verification_key": "convention_compliance"
70
+ },
67
71
  "language": {
68
72
  "rule": "MUST respond in Korean as specified in communication.language",
69
73
  "verification_key": "language"
@@ -74,6 +78,7 @@
74
78
  "backward_compatible": "Check existing tests pass, verify no breaking changes to build output",
75
79
  "documentation": "Add inline comments explaining non-obvious settings",
76
80
  "validation": "Run yarn lint, yarn typecheck, yarn build after changes",
81
+ "convention_compliance": "Call get_code_conventions MCP tool and verify code follows all project conventions",
77
82
  "language": "All response text in Korean"
78
83
  }
79
84
  },
@@ -114,6 +119,19 @@
114
119
  "5. Test that all features still work",
115
120
  "6. Document any breaking changes or migration steps"
116
121
  ]
122
+ },
123
+ "convention_verification": {
124
+ "approach": "Verify code against project config files",
125
+ "applies_to": "ACT mode implementation and EVAL mode review",
126
+ "steps": [
127
+ "1. Call get_code_conventions MCP tool to get project conventions",
128
+ "2. TypeScript: Verify strict mode, noImplicitAny, strictNullChecks compliance",
129
+ "3. ESLint: Check flat config usage, verify no lint errors",
130
+ "4. Prettier: Verify formatting (quotes, semicolons, trailing commas, indentation)",
131
+ "5. EditorConfig: Check indentation style/size, line endings, charset",
132
+ "6. Markdown: Verify markdownlint rules compliance",
133
+ "7. Report any convention violations with specific file/line references"
134
+ ]
117
135
  }
118
136
  },
119
137
 
@@ -178,7 +196,7 @@
178
196
  ],
179
197
 
180
198
  "communication": {
181
- "language": "en",
199
+ "language": "ko",
182
200
  "style": "Technical and precise, focusing on configuration details",
183
201
  "approach": [
184
202
  "Start by understanding the current configuration state",
@@ -0,0 +1,201 @@
1
+ {
2
+ "domain": "conventions",
3
+ "icon": "πŸ“",
4
+ "description": "Code conventions and formatting consistency from project config files",
5
+ "categories": [
6
+ {
7
+ "name": "typescript",
8
+ "triggers": {
9
+ "files": ["**/*.ts", "**/*.tsx"],
10
+ "imports": [],
11
+ "patterns": []
12
+ },
13
+ "items": [
14
+ {
15
+ "id": "conv-ts-001",
16
+ "text": "TypeScript strict mode is enabled (tsconfig.json: strict: true)",
17
+ "priority": "high",
18
+ "reason": "Strict mode catches type errors early and improves code quality"
19
+ },
20
+ {
21
+ "id": "conv-ts-002",
22
+ "text": "No implicit any is enforced (tsconfig.json: noImplicitAny: true)",
23
+ "priority": "high",
24
+ "reason": "Explicit types prevent runtime errors"
25
+ },
26
+ {
27
+ "id": "conv-ts-003",
28
+ "text": "Strict null checks are enabled (tsconfig.json: strictNullChecks: true)",
29
+ "priority": "high",
30
+ "reason": "Prevents null/undefined errors at runtime"
31
+ },
32
+ {
33
+ "id": "conv-ts-004",
34
+ "text": "Path aliases match tsconfig.json paths configuration",
35
+ "priority": "medium",
36
+ "reason": "Consistent import paths improve maintainability"
37
+ }
38
+ ]
39
+ },
40
+ {
41
+ "name": "eslint",
42
+ "triggers": {
43
+ "files": ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx"],
44
+ "imports": [],
45
+ "patterns": []
46
+ },
47
+ "items": [
48
+ {
49
+ "id": "conv-eslint-001",
50
+ "text": "Using ESLint flat config (eslint.config.js, not .eslintrc)",
51
+ "priority": "medium",
52
+ "reason": "Flat config is the new standard and more maintainable"
53
+ },
54
+ {
55
+ "id": "conv-eslint-002",
56
+ "text": "Code follows ESLint rules defined in project config",
57
+ "priority": "high",
58
+ "reason": "Consistent linting prevents code quality issues"
59
+ },
60
+ {
61
+ "id": "conv-eslint-003",
62
+ "text": "No ESLint errors or warnings in modified files",
63
+ "priority": "high",
64
+ "reason": "Lint errors indicate code quality or style violations"
65
+ }
66
+ ]
67
+ },
68
+ {
69
+ "name": "prettier",
70
+ "triggers": {
71
+ "files": [
72
+ "**/*.ts",
73
+ "**/*.tsx",
74
+ "**/*.js",
75
+ "**/*.jsx",
76
+ "**/*.json",
77
+ "**/*.css",
78
+ "**/*.scss"
79
+ ],
80
+ "imports": [],
81
+ "patterns": []
82
+ },
83
+ "items": [
84
+ {
85
+ "id": "conv-prettier-001",
86
+ "text": "Code uses consistent quote style per .prettierrc (singleQuote setting)",
87
+ "priority": "medium",
88
+ "reason": "Consistent quoting improves readability"
89
+ },
90
+ {
91
+ "id": "conv-prettier-002",
92
+ "text": "Semicolons match .prettierrc setting (semi: true/false)",
93
+ "priority": "medium",
94
+ "reason": "Consistent semicolon usage prevents parsing ambiguities"
95
+ },
96
+ {
97
+ "id": "conv-prettier-003",
98
+ "text": "Trailing commas follow .prettierrc (trailingComma setting)",
99
+ "priority": "low",
100
+ "reason": "Consistent trailing commas make diffs cleaner"
101
+ },
102
+ {
103
+ "id": "conv-prettier-004",
104
+ "text": "Indentation matches .prettierrc (tabWidth setting)",
105
+ "priority": "medium",
106
+ "reason": "Consistent indentation is essential for readability"
107
+ },
108
+ {
109
+ "id": "conv-prettier-005",
110
+ "text": "Arrow function parentheses match .prettierrc (arrowParens setting)",
111
+ "priority": "low",
112
+ "reason": "Consistent arrow function style"
113
+ }
114
+ ]
115
+ },
116
+ {
117
+ "name": "editorconfig",
118
+ "triggers": {
119
+ "files": [
120
+ "**/*.ts",
121
+ "**/*.tsx",
122
+ "**/*.js",
123
+ "**/*.jsx",
124
+ "**/*.json",
125
+ "**/*.css",
126
+ "**/*.scss",
127
+ "**/*.md",
128
+ "**/*.mdx"
129
+ ],
130
+ "imports": [],
131
+ "patterns": []
132
+ },
133
+ "items": [
134
+ {
135
+ "id": "conv-editor-001",
136
+ "text": "Indentation style matches .editorconfig (indent_style: space/tab)",
137
+ "priority": "high",
138
+ "reason": "Mixed tabs and spaces cause rendering issues"
139
+ },
140
+ {
141
+ "id": "conv-editor-002",
142
+ "text": "Indent size matches .editorconfig (indent_size setting)",
143
+ "priority": "high",
144
+ "reason": "Consistent indentation improves code readability"
145
+ },
146
+ {
147
+ "id": "conv-editor-003",
148
+ "text": "Line endings match .editorconfig (end_of_line: lf/crlf)",
149
+ "priority": "medium",
150
+ "reason": "Consistent line endings prevent git conflicts"
151
+ },
152
+ {
153
+ "id": "conv-editor-004",
154
+ "text": "File encoding is UTF-8 per .editorconfig (charset setting)",
155
+ "priority": "medium",
156
+ "reason": "UTF-8 ensures proper character display"
157
+ },
158
+ {
159
+ "id": "conv-editor-005",
160
+ "text": "Trailing whitespace removed per .editorconfig",
161
+ "priority": "low",
162
+ "reason": "Trailing whitespace creates unnecessary diffs"
163
+ },
164
+ {
165
+ "id": "conv-editor-006",
166
+ "text": "Files end with newline per .editorconfig (insert_final_newline)",
167
+ "priority": "low",
168
+ "reason": "Final newlines are POSIX standard"
169
+ }
170
+ ]
171
+ },
172
+ {
173
+ "name": "markdown",
174
+ "triggers": {
175
+ "files": ["**/*.md", "**/*.mdx"],
176
+ "imports": [],
177
+ "patterns": []
178
+ },
179
+ "items": [
180
+ {
181
+ "id": "conv-md-001",
182
+ "text": "Markdown heading style follows .markdownlint.json (MD003 rule)",
183
+ "priority": "low",
184
+ "reason": "Consistent heading style improves document structure"
185
+ },
186
+ {
187
+ "id": "conv-md-002",
188
+ "text": "Markdown list style follows .markdownlint.json (MD004 rule)",
189
+ "priority": "low",
190
+ "reason": "Consistent list markers improve readability"
191
+ },
192
+ {
193
+ "id": "conv-md-003",
194
+ "text": "No markdownlint violations per .markdownlint.json rules",
195
+ "priority": "medium",
196
+ "reason": "Markdown lint rules ensure document quality"
197
+ }
198
+ ]
199
+ }
200
+ ]
201
+ }
@@ -2,7 +2,7 @@
2
2
  "modes": {
3
3
  "PLAN": {
4
4
  "description": "Task planning and design phase",
5
- "instructions": "섀계 μš°μ„  μ ‘κ·Ό. TDD κ΄€μ μ—μ„œ ν…ŒμŠ€νŠΈ μΌ€μ΄μŠ€ λ¨Όμ € μ •μ˜. κ΅¬ν˜„ μ „ μ•„ν‚€ν…μ²˜ κ²€ν† .",
5
+ "instructions": "섀계 μš°μ„  μ ‘κ·Ό. TDD κ΄€μ μ—μ„œ ν…ŒμŠ€νŠΈ μΌ€μ΄μŠ€ λ¨Όμ € μ •μ˜. κ΅¬ν˜„ μ „ μ•„ν‚€ν…μ²˜ κ²€ν† . πŸ“ μ™„λ£Œ ν›„ docs/codingbuddy/plan/ 에 PLAN λ¬Έμ„œ μž‘μ„± ꢌμž₯ (./docs/codingbuddy/scripts/new-doc.sh plan <slug>).",
6
6
  "rules": ["rules/core.md", "rules/augmented-coding.md"],
7
7
  "agent": "plan-mode",
8
8
  "delegates_to": "frontend-developer",
@@ -13,7 +13,7 @@
13
13
  },
14
14
  "ACT": {
15
15
  "description": "Actual task execution phase",
16
- "instructions": "Red-Green-Refactor 사이클 μ€€μˆ˜. μ΅œμ†Œ κ΅¬ν˜„ ν›„ 점진적 κ°œμ„ . ν’ˆμ§ˆ κΈ°μ€€ μΆ©μ‘± 확인.",
16
+ "instructions": "Red-Green-Refactor 사이클 μ€€μˆ˜. μ΅œμ†Œ κ΅¬ν˜„ ν›„ 점진적 κ°œμ„ . ν’ˆμ§ˆ κΈ°μ€€ μΆ©μ‘± 확인. πŸ“ μ™„λ£Œ ν›„ docs/codingbuddy/act/ 에 ACT λ¬Έμ„œ μž‘μ„± ꢌμž₯ (./docs/codingbuddy/scripts/new-doc.sh act <slug>).",
17
17
  "rules": [
18
18
  "rules/core.md",
19
19
  "rules/project.md",
@@ -28,7 +28,7 @@
28
28
  },
29
29
  "EVAL": {
30
30
  "description": "Result review and assessment phase",
31
- "instructions": "μ½”λ“œ ν’ˆμ§ˆ κ²€ν† . SOLID 원칙 μ€€μˆ˜ 확인. ν…ŒμŠ€νŠΈ 컀버리지 점검. κ°œμ„ μ  μ œμ•ˆ.",
31
+ "instructions": "μ½”λ“œ ν’ˆμ§ˆ κ²€ν† . SOLID 원칙 μ€€μˆ˜ 확인. ν…ŒμŠ€νŠΈ 컀버리지 점검. κ°œμ„ μ  μ œμ•ˆ. πŸ“ μ™„λ£Œ ν›„ docs/codingbuddy/eval/ 에 EVAL λ¬Έμ„œ μž‘μ„± ꢌμž₯ (./docs/codingbuddy/scripts/new-doc.sh eval <slug>).",
32
32
  "rules": ["rules/core.md", "rules/augmented-coding.md"],
33
33
  "agent": "eval-mode",
34
34
  "delegates_to": "code-reviewer",
@@ -38,6 +38,19 @@
38
38
  "performance-specialist",
39
39
  "code-quality-specialist"
40
40
  ]
41
+ },
42
+ "AUTO": {
43
+ "description": "Autonomous execution mode",
44
+ "instructions": "PLAN β†’ ACT β†’ EVAL 사이클 μžλ™ μ‹€ν–‰. Critical/High μ΄μŠˆκ°€ 0이 될 λ•ŒκΉŒμ§€ 반볡. (μ„Έμ…˜ λ¬Έμ„œλŠ” 각 PLAN/ACT/EVAL λ‹¨κ³„μ—μ„œ μž‘μ„±λ¨)",
45
+ "rules": ["rules/core.md", "rules/project.md", "rules/augmented-coding.md"],
46
+ "agent": "auto-mode",
47
+ "delegates_to": "frontend-developer",
48
+ "defaultSpecialists": [
49
+ "architecture-specialist",
50
+ "test-strategy-specialist",
51
+ "code-quality-specialist",
52
+ "security-specialist"
53
+ ]
41
54
  }
42
55
  },
43
56
  "defaultMode": "PLAN"
@@ -238,6 +238,14 @@ See `.ai-rules/rules/clarification-guide.md` for detailed question guidelines.
238
238
  - [Framework best practices]
239
239
  - [Accessibility considerations]
240
240
 
241
+ ## πŸ“ Session Documentation (Optional)
242
+ To preserve this planning session for future reference:
243
+ \`\`\`bash
244
+ ./docs/codingbuddy/scripts/new-doc.sh plan <slug>
245
+ \`\`\`
246
+ - Creates timestamped PLAN document in `docs/codingbuddy/plan/`
247
+ - Useful for: Complex features, team handoffs, audit trails
248
+
241
249
  **Next:** Type `ACT` to execute, or modify plan
242
250
  ```
243
251
 
@@ -391,6 +399,14 @@ Execute implementation following TDD cycle, augmented coding principles, and qua
391
399
  ## πŸ“ Next Steps
392
400
  [Return to PLAN mode automatically]
393
401
 
402
+ ## πŸ“ Session Documentation (Optional)
403
+ To preserve this implementation session for future reference:
404
+ \`\`\`bash
405
+ ./docs/codingbuddy/scripts/new-doc.sh act <slug>
406
+ \`\`\`
407
+ - Creates timestamped ACT document in `docs/codingbuddy/act/`
408
+ - Useful for: Implementation decisions, debugging context, knowledge transfer
409
+
394
410
  **Next:** Type `ACT` to continue, `PLAN` to review, or `EVAL` for quality assessment
395
411
  ```
396
412
 
@@ -660,6 +676,14 @@ Self-improvement through iterative refinement
660
676
  - [ ] Critical Findings section appears before What Works
661
677
  - [ ] No defense of implementation decisions
662
678
 
679
+ ## πŸ“ Session Documentation (Optional)
680
+ To preserve this evaluation session for future reference:
681
+ \`\`\`bash
682
+ ./docs/codingbuddy/scripts/new-doc.sh eval <slug>
683
+ \`\`\`
684
+ - Creates timestamped EVAL document in `docs/codingbuddy/eval/`
685
+ - Useful for: Quality reviews, improvement tracking, retrospectives
686
+
663
687
  **πŸ”΄ Required:**
664
688
  - All recommendations must include web search validation or reference documentation
665
689
  - Security and Accessibility assessments must reference respective Specialist Agent frameworks
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codingbuddy-rules",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "description": "AI coding rules for consistent practices across AI assistants",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",