openclacky 0.7.2 → 0.7.4
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/CHANGELOG.md +38 -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 +22 -5
- data/lib/clacky/default_skills/new/SKILL.md +61 -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/providers.rb +13 -11
- data/lib/clacky/tools/invoke_skill.rb +5 -1
- data/lib/clacky/tools/safe_shell.rb +2 -2
- data/lib/clacky/tools/shell.rb +48 -20
- data/lib/clacky/ui2/components/input_area.rb +27 -9
- data/lib/clacky/ui2/components/modal_component.rb +22 -2
- data/lib/clacky/ui2/components/welcome_banner.rb +33 -10
- data/lib/clacky/ui2/layout_manager.rb +107 -26
- data/lib/clacky/ui2/line_editor.rb +6 -5
- data/lib/clacky/ui2/screen_buffer.rb +0 -15
- 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
- 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: d4cbc9f7d1de1e64b78bd09ac59e9d911d101ab4e5e4bc6a2e869810311fffbc
|
|
4
|
+
data.tar.gz: 26de964a5a19c4eacf6a2fecff08dd6fe0dcdcc5baacb435fd53ed30095860cb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fdefc255c000713dc69b8062ce8a1e249fbbfe219716dcae1bc16c2ad32a5672080216172f63b4648f30680f9b4295e8cd3a717d0f7d05fc17f93922cc35227e
|
|
7
|
+
data.tar.gz: e650a5ef793d1c435ab23436f407bfff1a76def00a6047c0d6e75fbc13e41dcc5bc3b5ec538b6eef39a928d4dc5339c1c5b3f69da242b12b2fe8d4c59e51e381
|
|
@@ -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
|
|
data/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,44 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.7.3] - 2026-02-26
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
- Modal component validation result handling after form submission
|
|
14
|
+
- Modal height calculation for dynamic field count in form mode
|
|
15
|
+
|
|
16
|
+
### Improved
|
|
17
|
+
- Provider ordering prioritizes well-tested providers (OpenRouter, Minimax) first
|
|
18
|
+
- Updated Minimax to use new base URL (api.minimaxi.com) and M2.5 as default
|
|
19
|
+
- Updated model versions: Claude Sonnet 4.6, OpenRouter Sonnet 4-6, Haiku 4.5
|
|
20
|
+
- Minimax model list now includes M2.1 and M2.5 (removed deprecated Text-01)
|
|
21
|
+
|
|
22
|
+
## [0.7.2] - 2026-02-26
|
|
23
|
+
|
|
24
|
+
### Added
|
|
25
|
+
- Cross-platform auto-install script with mise and WSL support
|
|
26
|
+
- Built-in provider presets for quick model configuration
|
|
27
|
+
- Terminal restart reminder after installation
|
|
28
|
+
- More bin commands for improved CLI experience
|
|
29
|
+
- Shields.io badges to README
|
|
30
|
+
|
|
31
|
+
### Improved
|
|
32
|
+
- Install script robustness and user experience
|
|
33
|
+
- Code-explorer workflow with forked subagent mode explanation
|
|
34
|
+
- README with features, usage scenarios, and comparison table
|
|
35
|
+
- Installation section with clearer instructions
|
|
36
|
+
|
|
37
|
+
### Fixed
|
|
38
|
+
- Binary file detection using magic bytes only (prevents false positives on multibyte text)
|
|
39
|
+
- Display user input before executing callback in handle_submit
|
|
40
|
+
- Install script now uses gem-only approach (removed homebrew dependency)
|
|
41
|
+
|
|
42
|
+
### More
|
|
43
|
+
- Minor formatting fixes in install script and README
|
|
44
|
+
- Removed skill emoji for cleaner UI
|
|
45
|
+
- Removed test-skill
|
|
46
|
+
- Updated install script configuration
|
|
47
|
+
|
|
10
48
|
## [0.7.1] - 2026-02-24
|
|
11
49
|
|
|
12
50
|
This release brings significant user experience improvements, new interaction modes, and enhanced agent capabilities.
|
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) }
|
data/lib/clacky/agent.rb
CHANGED
|
@@ -458,16 +458,37 @@ module Clacky
|
|
|
458
458
|
args[:skip_safety_check] = true
|
|
459
459
|
end
|
|
460
460
|
|
|
461
|
-
#
|
|
462
|
-
|
|
461
|
+
# Automatic progress display after 2 seconds for any tool execution
|
|
462
|
+
progress_shown = false
|
|
463
|
+
progress_timer = nil
|
|
464
|
+
output_buffer = nil
|
|
465
|
+
|
|
466
|
+
if @ui
|
|
463
467
|
progress_message = build_tool_progress_message(call[:name], args)
|
|
464
|
-
|
|
468
|
+
|
|
469
|
+
# For shell commands, create shared output buffer
|
|
470
|
+
if call[:name] == "shell" || call[:name] == "safe_shell"
|
|
471
|
+
output_buffer = { content: "", timestamp: Time.now }
|
|
472
|
+
args[:output_buffer] = output_buffer
|
|
473
|
+
end
|
|
474
|
+
|
|
475
|
+
progress_timer = Thread.new do
|
|
476
|
+
sleep 2
|
|
477
|
+
@ui.show_progress(progress_message, prefix_newline: false, output_buffer: output_buffer)
|
|
478
|
+
progress_shown = true
|
|
479
|
+
end
|
|
465
480
|
end
|
|
466
481
|
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
482
|
+
begin
|
|
483
|
+
result = tool.execute(**args)
|
|
484
|
+
ensure
|
|
485
|
+
# Cancel timer and clear progress if shown
|
|
486
|
+
if progress_timer
|
|
487
|
+
progress_timer.kill
|
|
488
|
+
progress_timer.join
|
|
489
|
+
end
|
|
490
|
+
@ui&.clear_progress if progress_shown
|
|
491
|
+
end
|
|
471
492
|
|
|
472
493
|
# Track modified files for Time Machine snapshots
|
|
473
494
|
track_modified_files(call[:name], args)
|