openclacky 0.7.3 → 0.7.5
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.
- checksums.yaml +4 -4
- data/.clacky/skills/commit/SKILL.md +252 -74
- data/.clacky/skills/gem-release/SKILL.md +33 -1
- data/CHANGELOG.md +51 -0
- data/bin/openclacky +2 -0
- data/lib/clacky/agent/message_compressor_helper.rb +1 -1
- data/lib/clacky/agent/system_prompt_builder.rb +9 -8
- data/lib/clacky/agent/tool_executor.rb +4 -13
- data/lib/clacky/agent.rb +28 -7
- data/lib/clacky/cli.rb +24 -6
- data/lib/clacky/client.rb +0 -48
- data/lib/clacky/default_skills/new/SKILL.md +70 -30
- data/lib/clacky/default_skills/new/scripts/create_rails_project.sh +176 -0
- data/lib/clacky/default_skills/new/scripts/rails_env_checker.sh +389 -0
- data/lib/clacky/default_skills/skill-add/SKILL.md +251 -34
- data/lib/clacky/default_skills/skill-add/scripts/install_from_github.rb +189 -0
- data/lib/clacky/tools/invoke_skill.rb +5 -1
- data/lib/clacky/tools/safe_shell.rb +2 -2
- data/lib/clacky/tools/shell.rb +58 -21
- data/lib/clacky/ui2/components/input_area.rb +27 -9
- data/lib/clacky/ui2/components/modal_component.rb +4 -1
- data/lib/clacky/ui2/components/tool_component.rb +5 -3
- data/lib/clacky/ui2/components/welcome_banner.rb +33 -10
- data/lib/clacky/ui2/layout_manager.rb +119 -29
- data/lib/clacky/ui2/line_editor.rb +6 -5
- data/lib/clacky/ui2/screen_buffer.rb +18 -21
- data/lib/clacky/ui2/terminal_detector.rb +119 -0
- data/lib/clacky/ui2/theme_manager.rb +18 -0
- data/lib/clacky/ui2/themes/base_theme.rb +22 -1
- data/lib/clacky/ui2/themes/hacker_theme.rb +22 -18
- data/lib/clacky/ui2/themes/minimal_theme.rb +19 -15
- data/lib/clacky/ui2/ui_controller.rb +66 -15
- data/lib/clacky/ui2.rb +1 -0
- data/lib/clacky/utils/limit_stack.rb +5 -0
- data/lib/clacky/version.rb +1 -1
- data/scripts/install.sh +8 -8
- metadata +5 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f623e852b5705d9339509514773528e2937fe90fe1fb8feca214a44633aa4d8d
|
|
4
|
+
data.tar.gz: bfff8a16fc705012a2d30a4ea8ac9a90ac6506ddbd45d9f30debe6019d04c52c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 06cf4fe9c03e899ad4f9ccf6a325c10c1c952179240e37d5f18bd9c40b3d0088a4928c2536c578ea4735a606e55d3b5d58ffe9c19d21830f5589e002c99b887a
|
|
7
|
+
data.tar.gz: aa8bf7a73ca171fc1a234bfd3fac2ed51db67c18610fa525179d656186853d00023b0835d8bc7590c772f57563957299968f540239c1d736057d43dcd9f4488c
|
|
@@ -9,14 +9,14 @@ user-invocable: true
|
|
|
9
9
|
|
|
10
10
|
This skill helps users create well-structured, semantic git commits by analyzing changes and suggesting appropriate commit messages.
|
|
11
11
|
|
|
12
|
-
##
|
|
12
|
+
## CRITICAL REQUIREMENT: SINGLE-LINE COMMITS ONLY
|
|
13
13
|
|
|
14
14
|
**ALL commit messages created by this skill MUST be single-line only.**
|
|
15
15
|
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
16
|
+
- DO: `git commit -m "feat: add user authentication"`
|
|
17
|
+
- DON'T: Multi-line commits with body text
|
|
18
|
+
- DON'T: Multiple `-m` flags
|
|
19
|
+
- DON'T: Commit messages with `\n` or additional paragraphs
|
|
20
20
|
|
|
21
21
|
Keep commits concise and focused. If more detail is needed, suggest adding it separately in PR descriptions or documentation.
|
|
22
22
|
|
|
@@ -24,6 +24,19 @@ Keep commits concise and focused. If more detail is needed, suggest adding it se
|
|
|
24
24
|
|
|
25
25
|
This skill automates the process of reviewing git changes and creating meaningful, conventional commits following the semantic commit format (feat/fix/chore/test).
|
|
26
26
|
|
|
27
|
+
## Core Philosophy
|
|
28
|
+
|
|
29
|
+
**THINK IN PURPOSES, NOT FILES**
|
|
30
|
+
|
|
31
|
+
This skill prioritizes understanding the OVERALL GOAL of changes before deciding how to commit them. The default approach is to:
|
|
32
|
+
1. Understand what the developer is trying to achieve
|
|
33
|
+
2. Group all related changes into meaningful, purpose-driven commits
|
|
34
|
+
3. Prefer fewer, cohesive commits over many fragmented ones
|
|
35
|
+
|
|
36
|
+
DO NOT commit file-by-file. DO NOT separate tests from implementation. DO NOT fragment features across multiple commits.
|
|
37
|
+
|
|
38
|
+
Instead, ask: "What story do these changes tell?" and commit accordingly.
|
|
39
|
+
|
|
27
40
|
## Usage
|
|
28
41
|
|
|
29
42
|
To use this skill, simply say:
|
|
@@ -46,20 +59,124 @@ git status
|
|
|
46
59
|
git diff --stat
|
|
47
60
|
```
|
|
48
61
|
|
|
49
|
-
### 2.
|
|
62
|
+
### 2. HOLISTIC ANALYSIS - Understand the Overall Purpose
|
|
63
|
+
|
|
64
|
+
CRITICAL: Before diving into file-by-file analysis, step back and ask:
|
|
65
|
+
|
|
66
|
+
- What is the developer trying to achieve overall? (e.g., "Add authentication feature", "Fix login bugs", "Refactor database layer")
|
|
67
|
+
- Is there a common theme or goal across these changes?
|
|
68
|
+
- Can multiple changes be explained by a single higher-level purpose?
|
|
69
|
+
|
|
70
|
+
Think strategically, not tactically:
|
|
71
|
+
- BAD: "Changed auth.rb, changed user.rb, changed session.rb" -> 3 separate commits
|
|
72
|
+
- GOOD: "These are all part of implementing user authentication" -> 1 commit
|
|
73
|
+
|
|
74
|
+
Review ALL changes together first:
|
|
75
|
+
```bash
|
|
76
|
+
# Get overview of all changes
|
|
77
|
+
git diff --stat
|
|
78
|
+
git diff
|
|
79
|
+
```
|
|
50
80
|
|
|
51
|
-
|
|
81
|
+
Look for patterns:
|
|
82
|
+
- Do multiple files serve the same feature?
|
|
83
|
+
- Are there related bug fixes across files?
|
|
84
|
+
- Is there a refactoring that touches multiple files?
|
|
85
|
+
- Are tests accompanying their implementation?
|
|
86
|
+
|
|
87
|
+
### 3. Review Changes in Detail
|
|
88
|
+
|
|
89
|
+
Now examine each file to understand specifics:
|
|
52
90
|
- The nature of changes (new feature, bug fix, refactoring, tests, documentation)
|
|
53
|
-
-
|
|
54
|
-
-
|
|
91
|
+
- How it connects to the overall purpose identified in step 2
|
|
92
|
+
- Whether it's part of the main change or a separate concern
|
|
55
93
|
|
|
56
94
|
```bash
|
|
57
95
|
git diff <file>
|
|
58
96
|
```
|
|
59
97
|
|
|
60
|
-
###
|
|
98
|
+
### 4. INTELLIGENT GROUPING - Merge Similar Changes
|
|
99
|
+
|
|
100
|
+
CRITICAL PRINCIPLE: Prefer fewer, meaningful commits over many small commits
|
|
101
|
+
|
|
102
|
+
**Grouping Strategy:**
|
|
103
|
+
|
|
104
|
+
1. **Same Feature/Purpose = One Commit**
|
|
105
|
+
- All files contributing to the same feature should be in ONE commit
|
|
106
|
+
- Tests for a feature belong with the feature implementation
|
|
107
|
+
- Related configuration changes belong with the feature
|
|
108
|
+
|
|
109
|
+
2. **Ask: "Would I explain these separately in a code review?"**
|
|
110
|
+
- If you'd say "I added X, Y, and Z as part of feature F" -> ONE commit
|
|
111
|
+
- If you'd say "I added X, and separately I fixed Y" -> TWO commits
|
|
61
112
|
|
|
62
|
-
|
|
113
|
+
3. **Look for these grouping opportunities:**
|
|
114
|
+
- Feature + Tests: Always together
|
|
115
|
+
- Implementation across multiple files: One commit if same feature
|
|
116
|
+
- Bug fix + Test: Together if addressing same issue
|
|
117
|
+
- Refactoring across modules: One commit if same refactoring goal
|
|
118
|
+
- Documentation + Code: Together if documenting the same change
|
|
119
|
+
- Configuration + Code: Together if config is required for the code
|
|
120
|
+
|
|
121
|
+
4. **Only split when:**
|
|
122
|
+
- Changes serve genuinely different purposes
|
|
123
|
+
- Mixing would make the commit unclear or too broad
|
|
124
|
+
- One change is risky and should be isolated
|
|
125
|
+
- Different semantic types that shouldn't mix (feat vs fix vs chore)
|
|
126
|
+
|
|
127
|
+
**Examples of Good Grouping:**
|
|
128
|
+
|
|
129
|
+
GOOD - Merged into ONE commit:
|
|
130
|
+
```
|
|
131
|
+
Commit: feat: add user authentication
|
|
132
|
+
- lib/auth/authenticator.rb (new authentication logic)
|
|
133
|
+
- lib/user.rb (user model updates)
|
|
134
|
+
- lib/session.rb (session management)
|
|
135
|
+
- spec/auth/authenticator_spec.rb (tests)
|
|
136
|
+
- spec/user_spec.rb (updated tests)
|
|
137
|
+
- config/routes.rb (auth routes)
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
GOOD - Different purposes, TWO commits:
|
|
141
|
+
```
|
|
142
|
+
Commit 1: feat: add user authentication
|
|
143
|
+
- lib/auth/authenticator.rb
|
|
144
|
+
- spec/auth/authenticator_spec.rb
|
|
145
|
+
|
|
146
|
+
Commit 2: fix: resolve database timeout issue
|
|
147
|
+
- lib/database/connection.rb
|
|
148
|
+
- spec/database/connection_spec.rb
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
BAD - Over-splitting, should be ONE commit:
|
|
152
|
+
```
|
|
153
|
+
Commit 1: feat: add authentication logic
|
|
154
|
+
- lib/auth/authenticator.rb
|
|
155
|
+
|
|
156
|
+
Commit 2: feat: update user model for authentication
|
|
157
|
+
- lib/user.rb
|
|
158
|
+
|
|
159
|
+
Commit 3: test: add authentication tests
|
|
160
|
+
- spec/auth/authenticator_spec.rb
|
|
161
|
+
|
|
162
|
+
Commit 4: chore: add authentication routes
|
|
163
|
+
- config/routes.rb
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
**Decision Tree:**
|
|
167
|
+
```
|
|
168
|
+
Are changes related to the same goal/feature/purpose?
|
|
169
|
+
|-- YES -> Combine into ONE commit
|
|
170
|
+
| +-- Even if they touch different files/modules
|
|
171
|
+
+-- NO -> Keep as separate commits
|
|
172
|
+
+-- Ask: Are they different semantic types (feat/fix/chore)?
|
|
173
|
+
|-- YES -> Definitely separate
|
|
174
|
+
+-- NO -> Consider if they could still be combined
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
### 5. Generate Commit Messages
|
|
178
|
+
|
|
179
|
+
Based on the holistic analysis, generate commit messages following the conventional commit format:
|
|
63
180
|
|
|
64
181
|
**Format**: `<type>: <description>`
|
|
65
182
|
|
|
@@ -67,8 +184,8 @@ Based on the analysis, generate commit messages following the conventional commi
|
|
|
67
184
|
- `feat`: New features or functionality
|
|
68
185
|
- `fix`: Bug fixes
|
|
69
186
|
- `chore`: Routine tasks, maintenance, dependencies
|
|
70
|
-
- `test`: Adding or modifying tests
|
|
71
|
-
- `docs`: Documentation changes
|
|
187
|
+
- `test`: Adding or modifying tests (only if standalone)
|
|
188
|
+
- `docs`: Documentation changes (only if standalone)
|
|
72
189
|
- `refactor`: Code refactoring without changing functionality
|
|
73
190
|
- `style`: Code style changes (formatting, whitespace)
|
|
74
191
|
- `perf`: Performance improvements
|
|
@@ -79,46 +196,53 @@ Based on the analysis, generate commit messages following the conventional commi
|
|
|
79
196
|
- Use imperative mood ("add feature" not "added feature")
|
|
80
197
|
- Don't end with a period
|
|
81
198
|
- Be specific but brief
|
|
82
|
-
- One logical
|
|
199
|
+
- **One logical PURPOSE per commit** (not one file per commit)
|
|
200
|
+
- Describe the overall goal, not implementation details
|
|
83
201
|
- If more detail is needed, suggest adding it in PR description or commit body separately, but the initial commit MUST be single-line
|
|
84
202
|
|
|
85
203
|
**Examples**:
|
|
86
|
-
- `feat: add user authentication`
|
|
87
|
-
- `fix: resolve
|
|
88
|
-
- `chore: update dependencies`
|
|
89
|
-
- `
|
|
90
|
-
- `docs: update
|
|
91
|
-
|
|
92
|
-
### 4. Group Changes
|
|
204
|
+
- `feat: add user authentication` (not "add authenticator.rb, user.rb, session.rb")
|
|
205
|
+
- `fix: resolve login timeout issues` (not "fix auth.rb timeout")
|
|
206
|
+
- `chore: update dependencies` (not separate commits for each gem)
|
|
207
|
+
- `refactor: simplify database connection logic` (not one commit per file)
|
|
208
|
+
- `docs: update API documentation` (only if pure documentation change)
|
|
93
209
|
|
|
94
|
-
|
|
95
|
-
- Group related changes together
|
|
96
|
-
- Separate features, fixes, and chores
|
|
97
|
-
- Keep commits atomic and focused
|
|
98
|
-
- Suggest the order of commits
|
|
99
|
-
|
|
100
|
-
### 5. Present Suggestions
|
|
210
|
+
### 6. Present Suggestions
|
|
101
211
|
|
|
102
212
|
Show the user:
|
|
103
|
-
-
|
|
213
|
+
- **The overall purpose/goal you identified**
|
|
214
|
+
- List of proposed commits (prefer fewer, consolidated commits)
|
|
104
215
|
- Files included in each commit
|
|
105
216
|
- Commit message for each group
|
|
106
|
-
- Brief explanation of
|
|
217
|
+
- **Brief explanation of WHY changes were grouped this way**
|
|
107
218
|
|
|
108
219
|
Format:
|
|
109
220
|
```
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
Commit
|
|
221
|
+
Overall goal: Implementing user authentication system
|
|
222
|
+
|
|
223
|
+
Proposed commits:
|
|
224
|
+
|
|
225
|
+
Commit 1: feat: add user authentication
|
|
226
|
+
- lib/api/auth.rb (authentication logic)
|
|
227
|
+
- lib/user.rb (user model updates)
|
|
228
|
+
- lib/session.rb (session management)
|
|
229
|
+
- spec/api/auth_spec.rb (tests)
|
|
230
|
+
- spec/user_spec.rb (updated user tests)
|
|
231
|
+
- config/routes.rb (auth routes)
|
|
232
|
+
|
|
233
|
+
Reason: All these files work together to implement the authentication
|
|
234
|
+
feature. Tests and configuration belong with the implementation.
|
|
235
|
+
|
|
236
|
+
Commit 2: fix: resolve database timeout issue
|
|
115
237
|
- lib/database/connection.rb
|
|
238
|
+
- spec/database/connection_spec.rb
|
|
239
|
+
|
|
240
|
+
Reason: Separate bug fix unrelated to authentication.
|
|
116
241
|
|
|
117
|
-
|
|
118
|
-
- .rubocop.yml
|
|
242
|
+
Total: 2 commits (not 6+ small commits)
|
|
119
243
|
```
|
|
120
244
|
|
|
121
|
-
###
|
|
245
|
+
### 7. Get User Confirmation
|
|
122
246
|
|
|
123
247
|
Ask the user:
|
|
124
248
|
- Review the proposed commits
|
|
@@ -126,7 +250,7 @@ Ask the user:
|
|
|
126
250
|
- Allow modifications if needed
|
|
127
251
|
- Get explicit approval before committing
|
|
128
252
|
|
|
129
|
-
###
|
|
253
|
+
### 8. Execute Commits
|
|
130
254
|
|
|
131
255
|
For each approved commit:
|
|
132
256
|
```bash
|
|
@@ -148,7 +272,7 @@ Provide feedback after each commit:
|
|
|
148
272
|
- Show commit hash
|
|
149
273
|
- Display summary
|
|
150
274
|
|
|
151
|
-
###
|
|
275
|
+
### 9. Final Summary
|
|
152
276
|
|
|
153
277
|
After all commits:
|
|
154
278
|
- Show total number of commits created
|
|
@@ -174,8 +298,8 @@ git add <file>
|
|
|
174
298
|
git commit -m "type: single line description"
|
|
175
299
|
|
|
176
300
|
# NEVER use multi-line format like:
|
|
177
|
-
# git commit -m "title" -m "body"
|
|
178
|
-
# git commit -m "title\n\nbody"
|
|
301
|
+
# git commit -m "title" -m "body" -- DON'T DO THIS
|
|
302
|
+
# git commit -m "title\n\nbody" -- DON'T DO THIS
|
|
179
303
|
|
|
180
304
|
# View commit history
|
|
181
305
|
git log --oneline -n 5
|
|
@@ -183,41 +307,77 @@ git log --oneline -n 5
|
|
|
183
307
|
|
|
184
308
|
## Workflow Example
|
|
185
309
|
|
|
310
|
+
BAD Example (Over-splitting):
|
|
186
311
|
```
|
|
187
312
|
User: /commit
|
|
188
313
|
|
|
189
|
-
AI:
|
|
190
|
-
|
|
314
|
+
AI (WRONG APPROACH):
|
|
315
|
+
Found 5 modified files
|
|
316
|
+
|
|
317
|
+
Proposed commits:
|
|
318
|
+
Commit 1: feat: add user model
|
|
319
|
+
- lib/user.rb
|
|
320
|
+
Commit 2: test: add user tests
|
|
321
|
+
- spec/user_spec.rb
|
|
322
|
+
Commit 3: fix: fix auth validation
|
|
323
|
+
- lib/auth.rb
|
|
324
|
+
Commit 4: test: add auth tests
|
|
325
|
+
- spec/auth_spec.rb
|
|
326
|
+
Commit 5: chore: update dependencies
|
|
327
|
+
- Gemfile
|
|
328
|
+
|
|
329
|
+
Problem: Too fragmented! Tests separated from code.
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
GOOD Example (Holistic grouping):
|
|
333
|
+
```
|
|
334
|
+
User: /commit
|
|
335
|
+
|
|
336
|
+
AI (CORRECT APPROACH):
|
|
337
|
+
1. Analyzing all changes...
|
|
191
338
|
Found 5 modified files
|
|
192
339
|
|
|
193
|
-
2.
|
|
340
|
+
2. Identifying overall purpose...
|
|
341
|
+
Main goal: Implementing user registration feature
|
|
342
|
+
Secondary: Fixing existing auth bug
|
|
343
|
+
Maintenance: Dependency updates
|
|
344
|
+
|
|
345
|
+
3. Holistic analysis:
|
|
194
346
|
- lib/user.rb: New user registration feature
|
|
195
|
-
-
|
|
196
|
-
-
|
|
197
|
-
- spec/auth_spec.rb: Tests for auth fix
|
|
198
|
-
- Gemfile: Updated dependencies
|
|
347
|
+
- spec/user_spec.rb: Tests for user registration (same feature)
|
|
348
|
+
- lib/auth.rb: Fix password validation bug (separate concern)
|
|
349
|
+
- spec/auth_spec.rb: Tests for auth fix (same bug fix)
|
|
350
|
+
- Gemfile: Updated dependencies (separate maintenance)
|
|
199
351
|
|
|
200
|
-
|
|
352
|
+
4. Proposed commits (grouped by purpose):
|
|
201
353
|
|
|
202
354
|
Commit 1: feat: add user registration
|
|
203
|
-
- lib/user.rb
|
|
204
|
-
- spec/user_spec.rb
|
|
355
|
+
- lib/user.rb (implementation)
|
|
356
|
+
- spec/user_spec.rb (tests)
|
|
357
|
+
|
|
358
|
+
Reason: Feature and its tests belong together
|
|
205
359
|
|
|
206
360
|
Commit 2: fix: correct password validation logic
|
|
207
|
-
- lib/auth.rb
|
|
208
|
-
- spec/auth_spec.rb
|
|
361
|
+
- lib/auth.rb (bug fix)
|
|
362
|
+
- spec/auth_spec.rb (tests)
|
|
363
|
+
|
|
364
|
+
Reason: Fix and its tests belong together
|
|
209
365
|
|
|
210
366
|
Commit 3: chore: update gem dependencies
|
|
211
367
|
- Gemfile
|
|
368
|
+
|
|
369
|
+
Reason: Unrelated maintenance task
|
|
212
370
|
|
|
213
|
-
|
|
371
|
+
Total: 3 meaningful commits instead of 5 fragmented ones
|
|
372
|
+
|
|
373
|
+
Do you want to proceed? (yes/no)
|
|
214
374
|
|
|
215
375
|
User: yes
|
|
216
376
|
|
|
217
377
|
AI:
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
378
|
+
Commit 1 created (a1b2c3d): feat: add user registration
|
|
379
|
+
Commit 2 created (e4f5g6h): fix: correct password validation logic
|
|
380
|
+
Commit 3 created (i7j8k9l): chore: update gem dependencies
|
|
221
381
|
|
|
222
382
|
Summary: 3 commits created successfully!
|
|
223
383
|
Next steps: Review with 'git log' or push with 'git push'
|
|
@@ -233,22 +393,40 @@ Next steps: Review with 'git log' or push with 'git push'
|
|
|
233
393
|
- Focus on "what" and "why", not "how"
|
|
234
394
|
- Maximum 72 characters for the single line
|
|
235
395
|
|
|
236
|
-
### Commit Organization
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
-
|
|
244
|
-
-
|
|
245
|
-
-
|
|
246
|
-
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
-
|
|
251
|
-
-
|
|
396
|
+
### Commit Organization - THINK PURPOSE, NOT FILES
|
|
397
|
+
|
|
398
|
+
**GOLDEN RULE: One logical PURPOSE per commit, not one FILE per commit**
|
|
399
|
+
|
|
400
|
+
### When to COMBINE Changes (Default Approach)
|
|
401
|
+
- **Feature implementation + its tests** (ALWAYS together)
|
|
402
|
+
- **Multiple files serving the same feature** (one commit)
|
|
403
|
+
- **Bug fix + its test** (ALWAYS together)
|
|
404
|
+
- **Code + required configuration** (together if config enables the code)
|
|
405
|
+
- **Refactoring across multiple files** (one commit if same refactoring goal)
|
|
406
|
+
- **Documentation + code it documents** (together if part of same change)
|
|
407
|
+
- **Related files in same module/feature** (one commit)
|
|
408
|
+
|
|
409
|
+
### When to SPLIT Commits (Exception Cases)
|
|
410
|
+
- **Truly different purposes**: e.g., "add feature X" vs "fix bug Y"
|
|
411
|
+
- **Different semantic types**: feat vs fix vs chore (usually)
|
|
412
|
+
- **Risky changes**: isolate if one change is experimental
|
|
413
|
+
- **Independent concerns**: changes that could be deployed separately
|
|
414
|
+
- **Too broad scope**: if one commit does too many unrelated things
|
|
415
|
+
|
|
416
|
+
### Anti-Patterns to Avoid
|
|
417
|
+
- NEVER split implementation and tests into separate commits
|
|
418
|
+
- NEVER create one commit per file unless files are truly independent
|
|
419
|
+
- NEVER split configuration from the code that requires it
|
|
420
|
+
- NEVER fragment a feature into multiple commits just because it touches multiple files
|
|
421
|
+
|
|
422
|
+
### Decision Framework
|
|
423
|
+
```
|
|
424
|
+
For each set of changes, ask:
|
|
425
|
+
1. "What was I trying to accomplish?" (identify the purpose)
|
|
426
|
+
2. "Do these files work together toward that purpose?" (YES -> combine)
|
|
427
|
+
3. "Would splitting these make the history harder to understand?" (YES -> combine)
|
|
428
|
+
4. "Could these changes be deployed independently?" (NO -> combine)
|
|
429
|
+
```
|
|
252
430
|
|
|
253
431
|
## Error Handling
|
|
254
432
|
|
|
@@ -88,9 +88,28 @@ To use this skill, simply say:
|
|
|
88
88
|
git push origin main --tags
|
|
89
89
|
```
|
|
90
90
|
|
|
91
|
-
4. **
|
|
91
|
+
4. **Create GitHub Release**
|
|
92
|
+
|
|
93
|
+
Extract the release notes for this version from CHANGELOG.md, then create a GitHub Release:
|
|
94
|
+
```bash
|
|
95
|
+
gh release create v{version} \
|
|
96
|
+
--title "v{version}" \
|
|
97
|
+
--notes-file /tmp/release_notes.md \
|
|
98
|
+
--latest
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Steps:
|
|
102
|
+
- Parse the CHANGELOG.md section for `[{version}]`
|
|
103
|
+
- Write it to a temp file (e.g., `/tmp/release_notes_{version}.md`) to avoid shell escaping issues
|
|
104
|
+
- Run `gh release create` with `--notes-file`
|
|
105
|
+
- Verify the release appears at: `https://github.com/clacky-ai/open-clacky/releases`
|
|
106
|
+
|
|
107
|
+
> **Prerequisite**: `gh` CLI must be installed (`brew install gh`) and authenticated (`gh auth login`)
|
|
108
|
+
|
|
109
|
+
5. **Verify Publication**
|
|
92
110
|
- Check gem appears on RubyGems.org
|
|
93
111
|
- Verify version information is correct
|
|
112
|
+
- Confirm GitHub Release is visible at the releases page
|
|
94
113
|
|
|
95
114
|
### 6. Documentation - CHANGELOG Writing Process
|
|
96
115
|
|
|
@@ -201,6 +220,15 @@ git commit -m "chore: bump version to X.Y.Z"
|
|
|
201
220
|
git tag vX.Y.Z
|
|
202
221
|
git push origin main
|
|
203
222
|
git push origin --tags
|
|
223
|
+
|
|
224
|
+
# Create GitHub Release (requires gh CLI)
|
|
225
|
+
# 1. Extract release notes from CHANGELOG.md for this version
|
|
226
|
+
# 2. Write to temp file to avoid shell escaping issues
|
|
227
|
+
# 3. Create the release
|
|
228
|
+
gh release create vX.Y.Z \
|
|
229
|
+
--title "vX.Y.Z" \
|
|
230
|
+
--notes-file /tmp/release_notes_X.Y.Z.md \
|
|
231
|
+
--latest
|
|
204
232
|
```
|
|
205
233
|
|
|
206
234
|
## File Locations
|
|
@@ -218,6 +246,7 @@ git push origin --tags
|
|
|
218
246
|
- New version successfully published to RubyGems
|
|
219
247
|
- Git repository updated with version tag
|
|
220
248
|
- CHANGELOG.md updated with release notes
|
|
249
|
+
- GitHub Release created and visible at https://github.com/clacky-ai/open-clacky/releases
|
|
221
250
|
- No build or deployment errors
|
|
222
251
|
|
|
223
252
|
## Error Handling
|
|
@@ -227,6 +256,8 @@ git push origin --tags
|
|
|
227
256
|
- If gem build fails, check gemspec configuration
|
|
228
257
|
- If git push fails, verify repository permissions
|
|
229
258
|
- If gem push fails, check RubyGems credentials
|
|
259
|
+
- If `gh release create` fails, ensure `gh` CLI is installed (`brew install gh`) and authenticated (`gh auth login`)
|
|
260
|
+
- If GitHub Release notes look wrong, check CHANGELOG.md formatting for the version section
|
|
230
261
|
|
|
231
262
|
## Notes
|
|
232
263
|
|
|
@@ -241,6 +272,7 @@ git push origin --tags
|
|
|
241
272
|
- Git repository access
|
|
242
273
|
- RubyGems account with push permissions
|
|
243
274
|
- Bundle and RSpec for testing
|
|
275
|
+
- `gh` CLI installed and authenticated (`brew install gh && gh auth login`)
|
|
244
276
|
|
|
245
277
|
## Version History
|
|
246
278
|
|
data/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,57 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.7.5] - 2026-02-28
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
- Tool errors now display in low-key style (same as tool result) to avoid alarming users for non-critical errors the agent can retry
|
|
14
|
+
- Session list now shows last message instead of first message for better context
|
|
15
|
+
- Shell tool uses login shell (`-l`) instead of interactive shell (`-i`) for proper environment variable loading
|
|
16
|
+
|
|
17
|
+
### Improved
|
|
18
|
+
- Shell tool now reliably loads user environment (PATH, rbenv, nvm, etc.) on every execution
|
|
19
|
+
- Session list shows resume tip (`clacky -a <session_id>`) to help users continue previous sessions
|
|
20
|
+
|
|
21
|
+
### More
|
|
22
|
+
- Add GitHub Release creation step to gem-release skill
|
|
23
|
+
- Remove debug logging from API client
|
|
24
|
+
|
|
25
|
+
## [0.7.4] - 2026-02-27
|
|
26
|
+
|
|
27
|
+
### Added
|
|
28
|
+
- Real-time command output viewing with Ctrl+O hotkey
|
|
29
|
+
- GitHub skill installation support in skill-add
|
|
30
|
+
- Rails project creation scripts in new skill
|
|
31
|
+
- Auto-create ~/clacky_workspace when starting from home directory
|
|
32
|
+
|
|
33
|
+
### Improved
|
|
34
|
+
- System prompt with glob tool usage guidance
|
|
35
|
+
- Commit skill with holistic grouping strategy and purpose-driven commits
|
|
36
|
+
- Theme color support for light backgrounds (bright mode refinements)
|
|
37
|
+
- Shell output handling and preview functionality
|
|
38
|
+
- Message compressor optimization (reduced to 200)
|
|
39
|
+
|
|
40
|
+
### Fixed
|
|
41
|
+
- UI2 output re-rendering on modal close and height changes
|
|
42
|
+
- Double render issue in inline input cleanup
|
|
43
|
+
- Small terminal width handling for logo display
|
|
44
|
+
- Extra newline in question display
|
|
45
|
+
|
|
46
|
+
### More
|
|
47
|
+
- Commented out idle timer debug logs for cleaner output
|
|
48
|
+
|
|
49
|
+
## [0.7.3] - 2026-02-26
|
|
50
|
+
|
|
51
|
+
### Fixed
|
|
52
|
+
- Modal component validation result handling after form submission
|
|
53
|
+
- Modal height calculation for dynamic field count in form mode
|
|
54
|
+
|
|
55
|
+
### Improved
|
|
56
|
+
- Provider ordering prioritizes well-tested providers (OpenRouter, Minimax) first
|
|
57
|
+
- Updated Minimax to use new base URL (api.minimaxi.com) and M2.5 as default
|
|
58
|
+
- Updated model versions: Claude Sonnet 4.6, OpenRouter Sonnet 4-6, Haiku 4.5
|
|
59
|
+
- Minimax model list now includes M2.1 and M2.5 (removed deprecated Text-01)
|
|
60
|
+
|
|
10
61
|
## [0.7.2] - 2026-02-26
|
|
11
62
|
|
|
12
63
|
### Added
|
data/bin/openclacky
CHANGED
|
@@ -7,7 +7,7 @@ module Clacky
|
|
|
7
7
|
module MessageCompressorHelper
|
|
8
8
|
# Compression thresholds
|
|
9
9
|
COMPRESSION_THRESHOLD = 150_000 # Trigger compression when exceeding this (in tokens)
|
|
10
|
-
MESSAGE_COUNT_THRESHOLD =
|
|
10
|
+
MESSAGE_COUNT_THRESHOLD = 200 # Trigger compression when exceeding this (in message count)
|
|
11
11
|
MAX_RECENT_MESSAGES = 20 # Keep this many recent message pairs intact
|
|
12
12
|
TARGET_COMPRESSED_TOKENS = 10_000 # Target size after compression
|
|
13
13
|
IDLE_COMPRESSION_THRESHOLD = 20_000 # Minimum messages needed for idle compression
|
|
@@ -24,14 +24,15 @@ module Clacky
|
|
|
24
24
|
- After creating the TODO list, START EXECUTING each task immediately
|
|
25
25
|
- Don't stop after planning - continue to work on the tasks!
|
|
26
26
|
2. Always read existing code before making changes (use file_reader/glob/grep or invoke code-explorer skill)
|
|
27
|
-
3.
|
|
28
|
-
4.
|
|
29
|
-
5.
|
|
30
|
-
6.
|
|
31
|
-
7.
|
|
32
|
-
8.
|
|
33
|
-
9.
|
|
34
|
-
10.
|
|
27
|
+
3. **Use glob tool to search for files** - it respects .gitignore, filters binary files, and sorts by modification time
|
|
28
|
+
4. Ask clarifying questions if requirements are unclear
|
|
29
|
+
5. Break down complex tasks into manageable steps
|
|
30
|
+
6. **USE TOOLS to create/modify files** - don't just return code
|
|
31
|
+
7. Write code that is secure, efficient, and easy to understand
|
|
32
|
+
8. Test your changes using the shell tool when appropriate
|
|
33
|
+
9. **IMPORTANT**: After completing each step, mark the TODO as completed and continue to the next one
|
|
34
|
+
10. Keep working until ALL TODOs are completed or you need user input
|
|
35
|
+
11. Provide brief explanations after completing actions
|
|
35
36
|
|
|
36
37
|
IMPORTANT: You should frequently refer to the existing codebase. For unclear instructions,
|
|
37
38
|
prioritize understanding the codebase first before answering or taking action.
|
|
@@ -98,22 +98,12 @@ module Clacky
|
|
|
98
98
|
preview_error = show_write_preview(args)
|
|
99
99
|
when "edit"
|
|
100
100
|
preview_error = show_edit_preview(args)
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
else
|
|
104
|
-
# For other tools, show formatted arguments
|
|
105
|
-
tool = @tool_registry.get(call[:name]) rescue nil
|
|
106
|
-
if tool
|
|
107
|
-
formatted = tool.format_call(args) rescue "#{call[:name]}(...)"
|
|
108
|
-
@ui&.show_tool_args(formatted)
|
|
109
|
-
else
|
|
110
|
-
@ui&.show_tool_args(call[:arguments])
|
|
111
|
-
end
|
|
101
|
+
# Shell and other tools don't need special preview
|
|
102
|
+
# They will be shown via show_tool_call in the main flow
|
|
112
103
|
end
|
|
113
104
|
|
|
114
105
|
preview_error
|
|
115
106
|
rescue JSON::ParserError
|
|
116
|
-
@ui&.show_tool_args(call[:arguments])
|
|
117
107
|
nil
|
|
118
108
|
end
|
|
119
109
|
end
|
|
@@ -256,7 +246,8 @@ module Clacky
|
|
|
256
246
|
/go\s+(build|test)/,
|
|
257
247
|
/make\s+(test|build)/,
|
|
258
248
|
/pytest/,
|
|
259
|
-
/jest
|
|
249
|
+
/jest/,
|
|
250
|
+
/sleep\s+\d+/ # sleep command with duration
|
|
260
251
|
]
|
|
261
252
|
|
|
262
253
|
slow_patterns.any? { |pattern| command.match?(pattern) }
|