tint_me 1.0.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.
Files changed (41) hide show
  1. checksums.yaml +7 -0
  2. data/.rubocop_todo.yml +7 -0
  3. data/.serena/project.yml +68 -0
  4. data/.simplecov +24 -0
  5. data/.yardopts +6 -0
  6. data/AGENTS.md +60 -0
  7. data/CHANGELOG.md +29 -0
  8. data/CLAUDE.md +1 -0
  9. data/LICENSE.txt +21 -0
  10. data/README.md +175 -0
  11. data/RELEASING.md +202 -0
  12. data/Rakefile +18 -0
  13. data/benchmark/2025-09-08-style-caching-optimization/01_baseline_results.txt +39 -0
  14. data/benchmark/2025-09-08-style-caching-optimization/02_with_full_caching_results.txt +54 -0
  15. data/benchmark/2025-09-08-style-caching-optimization/03_prefix_only_caching_results.txt +107 -0
  16. data/benchmark/2025-09-08-style-caching-optimization/04_baseline_vs_optimized_analysis.txt +65 -0
  17. data/benchmark/2025-09-08-style-caching-optimization/05_caching_approaches_comparison.txt +59 -0
  18. data/benchmark/2025-09-08-style-caching-optimization/06_append_operator_results.txt +107 -0
  19. data/benchmark/2025-09-08-style-caching-optimization/07_string_concatenation_comparison.txt +66 -0
  20. data/benchmark/2025-09-08-style-caching-optimization/08_with_freeze_optimization_results.txt +107 -0
  21. data/benchmark/2025-09-08-style-caching-optimization/09_freeze_optimization_analysis.txt +49 -0
  22. data/benchmark/2025-09-08-style-caching-optimization/10_constant_access_results.txt +107 -0
  23. data/benchmark/2025-09-08-style-caching-optimization/11_constant_vs_cache_analysis.txt +74 -0
  24. data/benchmark/2025-09-08-style-caching-optimization/12_empty_prefix_analysis.txt +81 -0
  25. data/benchmark/2025-09-08-style-caching-optimization/13_nil_check_optimization_results.txt +107 -0
  26. data/benchmark/2025-09-08-style-caching-optimization/14_nil_vs_empty_check_analysis.txt +81 -0
  27. data/benchmark/2025-09-08-style-caching-optimization/README.md +45 -0
  28. data/benchmark/2025-09-08-style-caching-optimization/benchmark_script.rb +180 -0
  29. data/docs/agents/git-pr.md +298 -0
  30. data/docs/agents/languages.md +388 -0
  31. data/docs/agents/rubocop.md +55 -0
  32. data/lib/tint_me/error.rb +6 -0
  33. data/lib/tint_me/sgr_builder.rb +259 -0
  34. data/lib/tint_me/style/schema.rb +22 -0
  35. data/lib/tint_me/style/types.rb +50 -0
  36. data/lib/tint_me/style.rb +286 -0
  37. data/lib/tint_me/version.rb +8 -0
  38. data/lib/tint_me.rb +62 -0
  39. data/mise.toml +5 -0
  40. data/sig/tint_me.rbs +61 -0
  41. metadata +131 -0
@@ -0,0 +1,298 @@
1
+ # Git Commit and Pull Request Guidelines for AI Agents
2
+
3
+ This guide helps AI agents follow the project's Git and GitHub conventions for commits, pull requests, and merges.
4
+
5
+ ## Table of Contents
6
+ - [Commit Messages](#commit-messages)
7
+ - [Branch Management](#branch-management)
8
+ - [Pull Request Creation](#pull-request-creation)
9
+ - [Pull Request Merging](#pull-request-merging)
10
+ - [Common Issues and Solutions](#common-issues-and-solutions)
11
+
12
+ ## Commit Messages
13
+
14
+ ### Format Requirements
15
+
16
+ All commit messages MUST follow this format:
17
+
18
+ ```
19
+ :emoji: Subject line in imperative mood
20
+
21
+ Detailed explanation of changes (optional)
22
+ - Bullet points for key changes
23
+ - Technical details and trade-offs
24
+
25
+ :robot: Generated with [Agent Name](http://agent.url)
26
+
27
+ Co-Authored-By: Agent Name <agent@email>
28
+ ```
29
+
30
+ **Note**: Replace `[Agent Name]`, `http://agent.url`, and `<agent@email>` with your specific AI agent information.
31
+
32
+ ### Key Rules
33
+
34
+ 1. **Always use GitHub emoji codes** (`:emoji:`), never raw Unicode emojis
35
+ 2. **Start with emoji**: The first character must be `:`
36
+ 3. **Space after emoji**: `:emoji: Subject` not `:emoji:Subject`
37
+ 4. **Imperative mood**: "Fix bug" not "Fixed bug" or "Fixes bug"
38
+ 5. **No period at end of subject**
39
+ 6. **Include AI attribution** for AI-generated commits
40
+
41
+ ### Common Emoji Codes
42
+
43
+ | Emoji | Code | Use Case |
44
+ |-------|------|----------|
45
+ | โšก | `:zap:` | Performance improvements |
46
+ | ๐Ÿ› | `:bug:` | Bug fixes |
47
+ | โœจ | `:sparkles:` | New features |
48
+ | ๐Ÿ“ | `:memo:` | Documentation |
49
+ | โ™ป๏ธ | `:recycle:` | Refactoring |
50
+ | ๐ŸŽจ | `:art:` | Code structure/format improvements |
51
+ | ๐Ÿ”ง | `:wrench:` | Configuration changes |
52
+ | โœ… | `:white_check_mark:` | Adding/updating tests |
53
+ | ๐Ÿ”ฅ | `:fire:` | Removing code/files |
54
+ | ๐Ÿ“ฆ | `:package:` | Updating dependencies |
55
+
56
+ ### Commit Command Example
57
+
58
+ ```bash
59
+ git commit -m "$(cat <<'EOF'
60
+ :zap: Optimize Style#call performance with caching
61
+
62
+ Cache SGR sequences at initialization to avoid recalculation.
63
+ - 7-18x performance improvement
64
+ - 85-91% reduction in object allocations
65
+
66
+ :robot: Generated with [Agent Name](http://agent.url)
67
+
68
+ Co-Authored-By: Agent Name <agent@email>
69
+ EOF
70
+ )"
71
+ ```
72
+
73
+ **Important**: Use heredoc with single quotes (`<<'EOF'`) to preserve special characters.
74
+
75
+ ## Branch Management
76
+
77
+ ### Branch Naming Convention
78
+
79
+ ```
80
+ type/description-with-hyphens
81
+ ```
82
+
83
+ Examples:
84
+ - `feature/style-performance-optimization`
85
+ - `fix/readme-installation-instructions`
86
+ - `docs/git-pr-guidelines`
87
+ - `cleanup/remove-described-class`
88
+
89
+ ### Creating a New Branch
90
+
91
+ ```bash
92
+ git switch -c feature/your-feature-name
93
+ ```
94
+
95
+ ## Pull Request Creation
96
+
97
+ ### Using gh CLI
98
+
99
+ Always use the `gh` CLI tool for creating pull requests.
100
+
101
+ ### Basic PR Creation
102
+
103
+ ```bash
104
+ gh pr create --title ":emoji: Clear descriptive title" --body "PR description"
105
+ ```
106
+
107
+ ### PR with Complex Body
108
+
109
+ For PR bodies containing backticks or complex markdown, use command substitution with heredoc:
110
+
111
+ ```bash
112
+ gh pr create --title ":memo: Update documentation" --body "$(cat <<'EOF'
113
+ ## Summary
114
+ Brief description of changes
115
+
116
+ ## Changes
117
+ - Change 1
118
+ - Change 2
119
+
120
+ ## Before
121
+ ```ruby
122
+ old_code
123
+ ```
124
+
125
+ ## After
126
+ ```ruby
127
+ new_code
128
+ ```
129
+
130
+ :robot: Generated with [Agent Name](http://agent.url)
131
+ EOF
132
+ )"
133
+ ```
134
+
135
+ ### PR Title Format
136
+
137
+ - Must start with GitHub emoji code (same as commits)
138
+ - Clear, descriptive title
139
+ - Example: `:zap: Optimize Style#call performance with SGR caching`
140
+
141
+ ## Pull Request Merging
142
+
143
+ ### Merge Command Format
144
+
145
+ Use merge commits (not squash) with custom messages:
146
+
147
+ ```bash
148
+ gh pr merge PR_NUMBER --merge \
149
+ --subject ":inbox_tray: :emoji: Merge pull request #PR from branch" \
150
+ --body "Brief description of what was merged"
151
+ ```
152
+
153
+ ### Merge Commit Convention
154
+
155
+ The merge commit automatically gets `:inbox_tray:` prefix, so the format is:
156
+
157
+ ```
158
+ :inbox_tray: :original_emoji: Merge pull request #N from user/branch
159
+ ```
160
+
161
+ Example:
162
+ ```bash
163
+ gh pr merge 6 --merge \
164
+ --subject ":inbox_tray: :zap: Merge pull request #6 from sakuro/feature/style-performance-optimization" \
165
+ --body "Style#call performance optimization with SGR caching"
166
+ ```
167
+
168
+ ## Common Issues and Solutions
169
+
170
+ ### Issue: Commit Hook Rejects Message
171
+
172
+ **Error**: "Commit message must start with a GitHub :emoji:"
173
+
174
+ **Solution**: Ensure your commit message starts with `:emoji_code:` (colon on both sides)
175
+
176
+ ### Issue: Raw Emoji in Commit
177
+
178
+ **Error**: "Commit message contains raw emojis"
179
+
180
+ **Solution**: Replace Unicode emoji (๐ŸŽ‰) with GitHub codes (`:tada:`)
181
+
182
+ ### Issue: Backticks in PR Body
183
+
184
+ **Problem**: Backticks in heredoc cause shell interpretation issues
185
+
186
+ **Solution**: Use command substitution with heredoc:
187
+ ```bash
188
+ gh pr create --title "Title" --body "$(cat <<'EOF'
189
+ Content with `backticks` in markdown
190
+ EOF
191
+ )"
192
+ ```
193
+
194
+ ### Issue: Pre-push Hook Failures
195
+
196
+ **Problem**: RuboCop or tests fail during push
197
+
198
+ **Solution**:
199
+ 1. Run `rake` locally first
200
+ 2. Fix any issues before pushing
201
+ 3. Use `bundle exec rubocop -A` for safe auto-fixes
202
+
203
+ ## Staging Changes Safely
204
+
205
+ ### Avoid Bulk Operations
206
+
207
+ **Never use these commands** as they can add unintended files:
208
+ ```bash
209
+ git add . # Adds ALL files in current directory
210
+ git add -A # Adds ALL tracked and untracked files
211
+ git add * # Adds files matching shell glob
212
+ ```
213
+
214
+ ### Recommended Approaches
215
+
216
+ **Option 1: Add specific files explicitly**
217
+ ```bash
218
+ git add lib/specific_file.rb
219
+ git add spec/specific_spec.rb
220
+ git add README.md
221
+ ```
222
+
223
+ **Option 2: Review changes first, then stage**
224
+ ```bash
225
+ # See what would be added
226
+ git status
227
+ git diff
228
+
229
+ # Add specific files you want to commit
230
+ git add path/to/changed_file.rb
231
+ ```
232
+
233
+ **Option 3: Interactive staging for complex changes**
234
+ ```bash
235
+ git add -p # Review and stage changes interactively
236
+ ```
237
+
238
+ ## Best Practices
239
+
240
+ 1. **Always run tests before pushing**: `rake` or `bundle exec rspec`
241
+ 2. **Check RuboCop**: `bundle exec rubocop` before committing
242
+ 3. **Keep commits focused**: One logical change per commit
243
+ 4. **Stage files explicitly**: Avoid `git add .` - specify files individually
244
+ 5. **Review staged changes**: Use `git diff --cached` before committing
245
+ 6. **Write clear PR descriptions**: Include before/after examples when relevant
246
+ 7. **Link issues**: Use "Fixes #123" in PR descriptions
247
+ 8. **Update documentation**: Keep README and CHANGELOG current
248
+
249
+ ## Example Workflow
250
+
251
+ ```bash
252
+ # 1. Create branch
253
+ git switch -c fix/performance-issue
254
+
255
+ # 2. Make changes
256
+ # ... edit files ...
257
+
258
+ # 3. Run tests and lint
259
+ rake
260
+
261
+ # 4. Stage changes (be specific!)
262
+ git add lib/performance_fix.rb
263
+ git add spec/performance_fix_spec.rb
264
+
265
+ # 5. Commit with proper message
266
+ git commit -m "$(cat <<'EOF'
267
+ :zap: Fix performance regression in render method
268
+
269
+ Memoize expensive calculations to avoid recalculation.
270
+ - 3x faster rendering
271
+ - Reduces memory allocations
272
+
273
+ Fixes #42
274
+
275
+ :robot: Generated with [Agent Name](http://agent.url)
276
+
277
+ Co-Authored-By: Agent Name <agent@email>
278
+ EOF
279
+ )"
280
+
281
+ # 6. Push branch
282
+ git push -u origin fix/performance-issue
283
+
284
+ # 7. Create PR
285
+ gh pr create --title ":zap: Fix performance regression in render method" \
286
+ --body "Fixes #42 - Memoization of expensive calculations"
287
+
288
+ # 8. After approval, merge
289
+ gh pr merge 7 --merge \
290
+ --subject ":inbox_tray: :zap: Merge pull request #7 from sakuro/fix/performance-issue" \
291
+ --body "Performance fix through memoization"
292
+ ```
293
+
294
+ ## References
295
+
296
+ - [GitHub Emoji Codes](https://github.com/ikatyang/emoji-cheat-sheet)
297
+ - [Conventional Commits](https://www.conventionalcommits.org/)
298
+ - Project's commit hooks in `.git/hooks/`
@@ -0,0 +1,388 @@
1
+ # Language Guidelines for AI Agents
2
+
3
+ > **Note**: This document contains examples in multiple languages (Japanese, English) to demonstrate proper language usage patterns. This is intentional for educational purposes, even though project documentation is normally written in English only.
4
+
5
+ This document defines language usage conventions for different contexts within the project.
6
+
7
+ ## Overview
8
+
9
+ The project follows a multilingual approach that balances international accessibility with localized communication effectiveness.
10
+
11
+ ## Communication Languages
12
+
13
+ ### AI/Maintainer Chat Communication
14
+
15
+ **Rule**: Use the user's preferred language for chat interactions.
16
+
17
+ - **When user writes in Japanese**: Respond in Japanese
18
+ - **When user writes in English**: Respond in English
19
+ - **When user writes in other languages**: Match their language when possible
20
+ - **Default fallback**: English for unsupported languages
21
+
22
+ **Examples**:
23
+ ```
24
+ User: "ใ“ใฎใƒใ‚ฐใ‚’ไฟฎๆญฃใ—ใฆใใ ใ•ใ„"
25
+ AI: "ใƒใ‚ฐใ‚’ไฟฎๆญฃใ—ใพใ™ใ€‚ใพใšๅ•้กŒใ‚’็ขบ่ชใ•ใ›ใฆใใ ใ•ใ„ใ€‚"
26
+
27
+ User: "Fix this bug please"
28
+ AI: "I'll fix the bug. Let me first identify the issue."
29
+ ```
30
+
31
+ **Rationale**: Effective communication in the user's native language improves understanding and reduces miscommunication.
32
+
33
+ ### Pseudocode and Technical Discussion
34
+
35
+ **Rule**: Comments within pseudocode blocks may use the user's language, while the pseudocode structure remains universal.
36
+
37
+ **Example**:
38
+ ```ruby
39
+ # ใƒฆใƒผใ‚ถใƒผ่ช่จผใ‚’ใƒใ‚งใƒƒใ‚ฏ
40
+ def authenticate_user(credentials)
41
+ # ใƒ‘ใ‚นใƒฏใƒผใƒ‰ใ‚’ใƒใƒƒใ‚ทใƒฅๅŒ–ใ—ใฆๆฏ”่ผƒ
42
+ if hash_password(credentials.password) == stored_hash
43
+ # ่ช่จผๆˆๅŠŸ
44
+ return create_session(credentials.user)
45
+ end
46
+
47
+ # ่ช่จผๅคฑๆ•—
48
+ raise AuthenticationError
49
+ end
50
+ ```
51
+
52
+ ## Code and Documentation Languages
53
+
54
+ ### Source Code
55
+
56
+ **Rule**: All source code MUST be written in English.
57
+
58
+ **Applies to**:
59
+ - Variable names, method names, class names
60
+ - Function parameters and return values
61
+ - Inline code comments
62
+ - Code documentation strings
63
+
64
+ **Examples**:
65
+ ```ruby
66
+ # โœ… Correct
67
+ def calculate_performance_score(metrics)
68
+ # Calculate weighted average of performance metrics
69
+ total_weight = metrics.sum(&:weight)
70
+ return 0 if total_weight.zero?
71
+
72
+ metrics.sum { |metric| metric.value * metric.weight } / total_weight
73
+ end
74
+
75
+ # โŒ Incorrect
76
+ def ใƒ‘ใƒ•ใ‚ฉใƒผใƒžใƒณใ‚น่จˆ็ฎ—(ใƒกใƒˆใƒชใ‚ฏใ‚น)
77
+ # ้‡ใฟไป˜ใๅนณๅ‡ใ‚’่จˆ็ฎ—
78
+ ๅˆ่จˆ้‡ใฟ = ใƒกใƒˆใƒชใ‚ฏใ‚น.sum(&:weight)
79
+ return 0 if ๅˆ่จˆ้‡ใฟ.zero?
80
+
81
+ # ... rest of method
82
+ end
83
+ ```
84
+
85
+ ### Documentation
86
+
87
+ **Rule**: All documentation MUST be written in English.
88
+
89
+ **Applies to**:
90
+ - README files
91
+ - YARD documentation comments
92
+ - API documentation
93
+ - Code comments explaining complex logic
94
+ - Markdown files in `docs/` directory
95
+
96
+ **Examples**:
97
+ ```ruby
98
+ # โœ… Correct YARD documentation
99
+ # Calculates the optimal cache size based on available memory
100
+ # and expected usage patterns.
101
+ #
102
+ # @param available_memory [Integer] Available memory in bytes
103
+ # @param usage_pattern [Symbol] Expected usage pattern (:light, :moderate, :heavy)
104
+ # @return [Integer] Recommended cache size in bytes
105
+ # @raise [ArgumentError] if available_memory is negative
106
+ def calculate_cache_size(available_memory, usage_pattern)
107
+ # Implementation...
108
+ end
109
+ ```
110
+
111
+ ### Issues and Pull Requests
112
+
113
+ **Rule**: Prefer English for titles and descriptions to maximize visibility and collaboration.
114
+
115
+ **GitHub Issues**:
116
+ - **Title**: English preferred
117
+ - **Description**: English preferred, but user's language acceptable
118
+ - **Technical details**: English strongly preferred
119
+
120
+ **Pull Requests**:
121
+ - **Title**: English required (follows commit message conventions)
122
+ - **Description**: English preferred
123
+ - **Code review comments**: English preferred
124
+
125
+ **Examples**:
126
+ ```
127
+ โœ… Preferred
128
+ Title: Fix performance regression in cache invalidation
129
+ Description: Resolves issue where cache invalidation was O(nยฒ)...
130
+
131
+ โœ… Acceptable
132
+ Title: Fix performance regression in cache invalidation
133
+ Description: ใ‚ญใƒฃใƒƒใ‚ทใƒฅ็„กๅŠนๅŒ–ใฎใƒ‘ใƒ•ใ‚ฉใƒผใƒžใƒณใ‚นๅ•้กŒใ‚’ไฟฎๆญฃใ—ใพใ—ใŸใ€‚
134
+ O(nยฒ)ใฎใ‚ขใƒซใ‚ดใƒชใ‚บใƒ ใ‚’O(n)ใซๆ”นๅ–„ใ—ใฆใ„ใพใ™ใ€‚
135
+
136
+ โŒ Avoid
137
+ Title: ใ‚ญใƒฃใƒƒใ‚ทใƒฅใฎๆ€ง่ƒฝๅ•้กŒใ‚’ไฟฎๆญฃ
138
+ Description: [Japanese description]
139
+ ```
140
+
141
+ ## File and Directory Names
142
+
143
+ **Rule**: All file and directory names MUST use English.
144
+
145
+ **Applies to**:
146
+ - Source files: `performance_optimizer.rb`
147
+ - Test files: `performance_optimizer_spec.rb`
148
+ - Documentation: `installation_guide.md`
149
+ - Directories: `lib/`, `spec/`, `docs/`
150
+
151
+ **Naming Conventions**:
152
+ - Use `snake_case` for Ruby files
153
+ - Use `kebab-case` for markdown files and directories when appropriate
154
+ - Use descriptive, clear English terms
155
+
156
+ ## Rationale
157
+
158
+ ### Why English for Code and Documentation?
159
+
160
+ 1. **International Collaboration**: English serves as the lingua franca of programming
161
+ 2. **Tool Compatibility**: Most development tools, libraries, and frameworks expect English
162
+ 3. **Maintainability**: Future maintainers from any background can understand the code
163
+ 4. **Professional Standards**: Industry standard practice for open source projects
164
+ 5. **Search and Discovery**: English keywords improve searchability
165
+
166
+ ### Why User's Language for Communication?
167
+
168
+ 1. **Clarity**: Complex technical concepts are often better explained in native language
169
+ 2. **Efficiency**: Reduces translation overhead and potential misunderstandings
170
+ 3. **Comfort**: Users feel more comfortable expressing nuanced requirements
171
+ 4. **Cultural Context**: Some concepts don't translate well and need cultural context
172
+
173
+ ## Implementation Guidelines for AI Agents
174
+
175
+ ### Language Detection
176
+
177
+ Detect user's preferred language from:
178
+ 1. First message language
179
+ 2. Explicit language requests
180
+ 3. Previous interaction history
181
+ 4. Default to English if uncertain
182
+
183
+ ### Context Switching
184
+
185
+ When switching between communication and code:
186
+ ```
187
+ User: "ใƒ‘ใƒ•ใ‚ฉใƒผใƒžใƒณใ‚นใ‚’ๆ”นๅ–„ใ—ใŸใ„"
188
+ AI: "ใƒ‘ใƒ•ใ‚ฉใƒผใƒžใƒณใ‚นๆ”นๅ–„ใ‚’่กŒใ„ใพใ™ใ€‚ไปฅไธ‹ใฎใ‚ณใƒผใƒ‰ใ‚’ไฟฎๆญฃใ—ใพใ™๏ผš"
189
+
190
+ ```ruby
191
+ def optimize_performance(data)
192
+ # Implement performance optimization
193
+ cached_results = Cache.new
194
+ # ... English comments and code
195
+ end
196
+ ```
197
+
198
+ AI: "ใ“ใฎใ‚ˆใ†ใซใ‚ญใƒฃใƒƒใ‚ทใƒฅใ‚’่ฟฝๅŠ ใ—ใฆใƒ‘ใƒ•ใ‚ฉใƒผใƒžใƒณใ‚นใ‚’ๅ‘ไธŠใ•ใ›ใพใ—ใŸใ€‚"
199
+ ```
200
+
201
+ ### Documentation Generation
202
+
203
+ When generating documentation:
204
+ - Always use English regardless of communication language
205
+ - Translate technical concepts accurately
206
+ - Maintain professional technical writing standards
207
+ - Use objective, factual language without unnecessary embellishment
208
+ - Avoid competitive comparisons with other products/libraries
209
+ - Never use aggressive or dismissive language about alternatives
210
+ - Focus on functionality and benefits rather than superiority claims
211
+
212
+ ### Chat Communication Style
213
+
214
+ When communicating with users in chat:
215
+ - Use professional, measured language
216
+ - Avoid excessive enthusiasm or superlatives
217
+ - Be helpful without being overly effusive
218
+ - Focus on accuracy and usefulness rather than excitement
219
+ - Acknowledge completion without dramatic celebration
220
+
221
+ ## Examples by Context
222
+
223
+ ### Commit Messages
224
+ ```bash
225
+ # โœ… Always English
226
+ git commit -m ":zap: Optimize database query performance
227
+
228
+ Reduce N+1 queries by implementing eager loading.
229
+ - 5x performance improvement
230
+ - Maintains data consistency
231
+
232
+ :robot: Generated with [Agent Name](http://agent.url)
233
+ Co-Authored-By: Agent Name <agent@email>"
234
+ ```
235
+
236
+ **Note**: Replace `[Agent Name]`, `http://agent.url`, and `<agent@email>` with your specific AI agent information.
237
+
238
+ ### Code Reviews
239
+ ```
240
+ # โœ… English preferred for broader team understanding
241
+ "This implementation could benefit from memoization to avoid
242
+ recalculating expensive operations."
243
+
244
+ # โœ… Acceptable if team is primarily Japanese
245
+ "ใ“ใฎใƒกใ‚ฝใƒƒใƒ‰ใฏ้‡ใ„่จˆ็ฎ—ใ‚’็นฐใ‚Š่ฟ”ใ—ใฆใ„ใ‚‹ใฎใงใ€ใƒกใƒขๅŒ–ใ‚’ๆคœ่จŽใ—ใฆใใ ใ•ใ„ใ€‚"
246
+ ```
247
+
248
+ ### Chat Interactions
249
+ ```
250
+ User: "ใƒ†ใ‚นใƒˆใŒๅคฑๆ•—ใ—ใฆใ„ใ‚‹ใ‚ˆใ†ใงใ™"
251
+ AI: "ใƒ†ใ‚นใƒˆใฎๅคฑๆ•—ใ‚’็ขบ่ชใ—ใพใ™ใ€‚ใ‚จใƒฉใƒผใƒญใ‚ฐใ‚’่ฆ‹ใฆใฟใพใ—ใ‚‡ใ†ใ€‚"
252
+
253
+ # When writing test code:
254
+ describe "performance optimization" do
255
+ it "reduces query time by 50%" do
256
+ # Test implementation in English
257
+ end
258
+ end
259
+ ```
260
+
261
+ ## Documentation Style Guidelines
262
+
263
+ ### Avoid Excessive Language
264
+
265
+ ```markdown
266
+ โŒ Overly dramatic
267
+ "This amazing, revolutionary feature completely transforms your workflow!"
268
+
269
+ โœ… Factual and clear
270
+ "This feature streamlines the authentication process by caching validated tokens."
271
+
272
+ โŒ Unnecessary superlatives
273
+ "The world's most powerful, incredibly fast, absolutely best terminal styling library"
274
+
275
+ โœ… Descriptive without embellishment
276
+ "A terminal styling library with performance optimization and composable style objects"
277
+ ```
278
+
279
+ ### Avoid Competitive Comparisons
280
+
281
+ ```markdown
282
+ โŒ Direct competition attacks
283
+ "Unlike slow Library X, our solution is blazing fast"
284
+ "Library Y is outdated and problematic, use this instead"
285
+
286
+ โœ… Focus on own features
287
+ "Optimized for performance with 7-18x speed improvements"
288
+ "Designed with modern Ruby practices and immutable objects"
289
+
290
+ โŒ Dismissive language
291
+ "Other libraries fail to provide..."
292
+ "The broken approach used by..."
293
+
294
+ โœ… Neutral positioning
295
+ "This library provides..."
296
+ "Alternative approach that..."
297
+ ```
298
+
299
+ ### Maintain Professional Tone
300
+
301
+ ```markdown
302
+ โŒ Aggressive language
303
+ "Destroys performance bottlenecks"
304
+ "Kills the competition"
305
+ "Obliterates technical debt"
306
+
307
+ โœ… Professional descriptions
308
+ "Addresses performance bottlenecks"
309
+ "Provides competitive performance"
310
+ "Reduces technical debt"
311
+
312
+ โŒ Emotional appeals
313
+ "You'll absolutely love this feature!"
314
+ "Frustrating bugs are now history!"
315
+
316
+ โœ… Factual benefits
317
+ "This feature improves developer experience"
318
+ "Resolves common integration issues"
319
+ ```
320
+
321
+ ### Chat Communication Examples
322
+
323
+ ```
324
+ โŒ Overly enthusiastic
325
+ "Perfect! Amazing! That's absolutely fantastic!"
326
+ "This is going to be incredible!"
327
+ "Wow, that's the best solution ever!"
328
+
329
+ โœ… Professional acknowledgment
330
+ "Completed. The changes have been applied."
331
+ "Good point. I've implemented that approach."
332
+ "That's been resolved. The tests are now passing."
333
+
334
+ โŒ Excessive superlatives
335
+ "This incredibly powerful feature will revolutionize your workflow!"
336
+ "The absolutely perfect solution for your needs!"
337
+
338
+ โœ… Measured descriptions
339
+ "This feature should improve your workflow efficiency."
340
+ "This approach addresses the requirements you mentioned."
341
+
342
+ โŒ Dramatic language
343
+ "I'll completely transform this code!"
344
+ "Let me totally rebuild this system!"
345
+
346
+ โœ… Factual descriptions
347
+ "I'll refactor this code to improve maintainability."
348
+ "Let me restructure this for better organization."
349
+ ```
350
+
351
+ ## Common Mistakes to Avoid
352
+
353
+ ### Mixed Language Code
354
+ ```ruby
355
+ # โŒ Never mix languages in code
356
+ def calculate_้€Ÿๅบฆ(distance, ๆ™‚้–“)
357
+ return distance / ๆ™‚้–“
358
+ end
359
+
360
+ # โœ… Always use English
361
+ def calculate_speed(distance, time)
362
+ return distance / time
363
+ end
364
+ ```
365
+
366
+ ### Inconsistent Documentation Language
367
+ ```ruby
368
+ # โŒ Inconsistent
369
+ # ใƒฆใƒผใ‚ถใƒผใฎใ‚นใ‚ณใ‚ขใ‚’่จˆ็ฎ—ใ™ใ‚‹
370
+ # @param user [User] The user object
371
+ def calculate_user_score(user)
372
+
373
+ # โœ… Consistent English
374
+ # Calculates the user's performance score
375
+ # @param user [User] The user object
376
+ def calculate_user_score(user)
377
+ ```
378
+
379
+ ### Poor Translation of Technical Terms
380
+ ```
381
+ # โŒ Direct translation loses meaning
382
+ "I will implement the 'hand procedure' for error handling"
383
+
384
+ # โœ… Keep technical terms or provide context
385
+ "I will implement exception handling (ไพ‹ๅค–ๅ‡ฆ็†) for error cases"
386
+ ```
387
+
388
+ This language guideline ensures clear, professional, and accessible code while maintaining effective communication with users in their preferred language.