openclacky 1.1.2 → 1.1.3
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/gem-release/SKILL.md +27 -31
- data/CHANGELOG.md +14 -0
- data/Dockerfile +28 -0
- data/docs/engineering-article.md +343 -0
- data/lib/clacky/agent/llm_caller.rb +1 -5
- data/lib/clacky/cli.rb +1 -1
- data/lib/clacky/message_format/anthropic.rb +17 -1
- data/lib/clacky/providers.rb +34 -0
- data/lib/clacky/server/channel/adapters/dingtalk/adapter.rb +142 -5
- data/lib/clacky/server/channel/adapters/dingtalk/api_client.rb +309 -0
- data/lib/clacky/ui2/ui_controller.rb +14 -0
- data/lib/clacky/ui_interface.rb +14 -0
- data/lib/clacky/utils/model_pricing.rb +96 -25
- data/lib/clacky/version.rb +1 -1
- data/lib/clacky/web/app.css +8 -0
- data/lib/clacky/web/index.html +1 -1
- data/lib/clacky/web/onboard.js +6 -0
- data/lib/clacky/web/settings.js +17 -5
- data/scripts/build/lib/apt.sh +30 -10
- data/scripts/build/lib/network.sh +3 -2
- data/scripts/install.sh +30 -9
- metadata +3 -16
- data/docs/HOW-TO-USE-CN.md +0 -96
- data/docs/HOW-TO-USE.md +0 -94
- data/docs/browser-cdp-native-design.md +0 -195
- data/docs/c-end-user-positioning.md +0 -64
- data/docs/config.example.yml +0 -27
- data/docs/deploy-architecture.md +0 -619
- data/docs/deploy_subagent_design.md +0 -540
- data/docs/install-script-simplification.md +0 -89
- data/docs/memory-architecture.md +0 -343
- data/docs/openclacky_cloud_api_reference.md +0 -584
- data/docs/security-design.md +0 -109
- data/docs/session-management-redesign.md +0 -202
- data/docs/system-skill-authoring-guide.md +0 -47
- data/docs/why-developer.md +0 -371
- data/docs/why-openclacky.md +0 -266
|
@@ -1,202 +0,0 @@
|
|
|
1
|
-
# Session Management Redesign
|
|
2
|
-
|
|
3
|
-
> Status: Design finalized, pending implementation
|
|
4
|
-
> Date: 2026-03-22
|
|
5
|
-
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
## Background
|
|
9
|
-
|
|
10
|
-
Current session management has several problems:
|
|
11
|
-
|
|
12
|
-
| Problem | Detail |
|
|
13
|
-
|---------|--------|
|
|
14
|
-
| **Delete bug (P0)** | `DELETE /api/sessions/:id` only removes from in-memory registry, disk JSON file is never deleted |
|
|
15
|
-
| **Retention too small** | `cleanup_by_count(keep: 10)` — floods quickly with cron + channel sessions |
|
|
16
|
-
| **Only 5 sessions restored on startup** | Misses most cron/channel history |
|
|
17
|
-
| **No agent type selection in WebUI** | Always creates `general` profile, no UI to choose |
|
|
18
|
-
| **No session source tracking** | No `source` field — can't distinguish manual vs cron vs channel |
|
|
19
|
-
| **No agent profile tracking** | No `agent_profile` field in session JSON |
|
|
20
|
-
|
|
21
|
-
---
|
|
22
|
-
|
|
23
|
-
## UI Design
|
|
24
|
-
|
|
25
|
-
### Sidebar Layout
|
|
26
|
-
|
|
27
|
-
```
|
|
28
|
-
┌─────────────────────────────────┐
|
|
29
|
-
│ Sessions [+ ▾] │
|
|
30
|
-
├─────────────────────────────────┤
|
|
31
|
-
│ Manual Scheduled Channel │ ← tab 切换
|
|
32
|
-
├─────────────────────────────────┤
|
|
33
|
-
│ │
|
|
34
|
-
│ ● Session 3 2t $0.02 │
|
|
35
|
-
│ ○ Session 2 5t $0.08 │
|
|
36
|
-
│ ○ Session 1 1t $0.01 │
|
|
37
|
-
│ │
|
|
38
|
-
├─────────────────────────────────┤
|
|
39
|
-
│ 👨💻 Coding │ ← 固定区域,不参与 tab
|
|
40
|
-
├─────────────────────────────────┤
|
|
41
|
-
│ ● 重构 auth 模块 3t $0.05 │
|
|
42
|
-
│ ○ 接口联调 1t $0.02 │
|
|
43
|
-
└─────────────────────────────────┘
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
**Upper area — General Agent sessions:**
|
|
47
|
-
- Three tabs: `Manual` / `Scheduled` / `Channel`
|
|
48
|
-
- Default tab: `Manual`
|
|
49
|
-
- Each tab shows sessions filtered by `source` field AND `agent_profile = general`
|
|
50
|
-
- Scheduled and Channel tabs show sessions where `agent_profile = general` AND `source = cron/channel`
|
|
51
|
-
|
|
52
|
-
**Lower area — Coding Agent (and future agents):**
|
|
53
|
-
- Fixed section, always visible, does not participate in tab switching
|
|
54
|
-
- Shows all sessions where `agent_profile = coding`, regardless of source
|
|
55
|
-
- Future custom agents each get their own section below Coding
|
|
56
|
-
|
|
57
|
-
---
|
|
58
|
-
|
|
59
|
-
### New Session Button: `[+ ▾]`
|
|
60
|
-
|
|
61
|
-
```
|
|
62
|
-
┌─────────────────────────────────┐
|
|
63
|
-
│ Sessions [+ ▾] │
|
|
64
|
-
└─────────────────────────────────┘
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
- **Click `+`** → immediately create a new General session (zero friction, most common action)
|
|
68
|
-
- **Click `▾`** → dropdown appears:
|
|
69
|
-
|
|
70
|
-
```
|
|
71
|
-
┌──────────────────┐
|
|
72
|
-
│ ✦ General │
|
|
73
|
-
│ 👨💻 Coding │
|
|
74
|
-
│ ──────────────── │
|
|
75
|
-
│ + Create Agent │ ← future
|
|
76
|
-
└──────────────────┘
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
- Selecting an agent from the dropdown creates a new session with that `agent_profile`
|
|
80
|
-
- `Create Agent` is a placeholder for future custom agent creation UI
|
|
81
|
-
|
|
82
|
-
---
|
|
83
|
-
|
|
84
|
-
## Data Layer Changes
|
|
85
|
-
|
|
86
|
-
### Session JSON — new fields
|
|
87
|
-
|
|
88
|
-
```json
|
|
89
|
-
{
|
|
90
|
-
"session_id": "...",
|
|
91
|
-
"source": "manual",
|
|
92
|
-
"agent_profile": "general",
|
|
93
|
-
...
|
|
94
|
-
}
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
**`source` values:** `manual` | `cron` | `channel`
|
|
98
|
-
**`agent_profile` values:** `general` | `coding` | `<custom-name>`
|
|
99
|
-
|
|
100
|
-
### `build_session` signature update
|
|
101
|
-
|
|
102
|
-
```ruby
|
|
103
|
-
build_session(
|
|
104
|
-
name:,
|
|
105
|
-
working_dir:,
|
|
106
|
-
source: :manual, # :manual | :cron | :channel
|
|
107
|
-
profile: "general", # agent profile name
|
|
108
|
-
permission_mode: :confirm_all
|
|
109
|
-
)
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
Both `source` and `agent_profile` must be serialized into the session JSON and restored on `from_session`.
|
|
113
|
-
|
|
114
|
-
---
|
|
115
|
-
|
|
116
|
-
## New API Endpoints
|
|
117
|
-
|
|
118
|
-
### `GET /api/agents`
|
|
119
|
-
|
|
120
|
-
Returns all available agent profiles (built-in + user custom).
|
|
121
|
-
|
|
122
|
-
Scan order:
|
|
123
|
-
1. `~/.clacky/agents/<name>/profile.yml` (user override / custom)
|
|
124
|
-
2. `<gem>/lib/clacky/default_agents/<name>/profile.yml` (built-in)
|
|
125
|
-
|
|
126
|
-
Response:
|
|
127
|
-
```json
|
|
128
|
-
{
|
|
129
|
-
"agents": [
|
|
130
|
-
{ "name": "general", "description": "A versatile digital employee living on your computer", "builtin": true },
|
|
131
|
-
{ "name": "coding", "description": "AI coding assistant and technical co-founder", "builtin": true },
|
|
132
|
-
{ "name": "my-pm", "description": "Product manager assistant", "builtin": false }
|
|
133
|
-
]
|
|
134
|
-
}
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
### `POST /api/sessions` — updated body
|
|
138
|
-
|
|
139
|
-
```json
|
|
140
|
-
{
|
|
141
|
-
"name": "Session 4",
|
|
142
|
-
"agent_profile": "coding"
|
|
143
|
-
}
|
|
144
|
-
```
|
|
145
|
-
|
|
146
|
-
`source` is always `manual` for API-created sessions. `agent_profile` defaults to `"general"` if omitted.
|
|
147
|
-
|
|
148
|
-
### `DELETE /api/sessions/:id` — fix
|
|
149
|
-
|
|
150
|
-
Must delete the disk JSON file in addition to removing from registry:
|
|
151
|
-
|
|
152
|
-
```ruby
|
|
153
|
-
def api_delete_session(session_id, res)
|
|
154
|
-
if @registry.delete(session_id)
|
|
155
|
-
@session_manager.delete(session_id) # ← ADD THIS
|
|
156
|
-
broadcast(session_id, { type: "session_deleted", session_id: session_id })
|
|
157
|
-
unsubscribe_all(session_id)
|
|
158
|
-
json_response(res, 200, { ok: true })
|
|
159
|
-
else
|
|
160
|
-
json_response(res, 404, { error: "Session not found" })
|
|
161
|
-
end
|
|
162
|
-
end
|
|
163
|
-
```
|
|
164
|
-
|
|
165
|
-
`SessionManager` needs a `delete(session_id)` method that finds and removes the file by session_id prefix.
|
|
166
|
-
|
|
167
|
-
---
|
|
168
|
-
|
|
169
|
-
## Persistence Strategy Changes
|
|
170
|
-
|
|
171
|
-
| Setting | Current | New |
|
|
172
|
-
|---------|---------|-----|
|
|
173
|
-
| Count limit | `keep: 10` | `keep: 200` |
|
|
174
|
-
| Time-based cleanup | None | Delete sessions not accessed in **90 days** |
|
|
175
|
-
| Cleanup timing | On every save | On server startup + every 24h |
|
|
176
|
-
| Sessions restored on startup | 5 (current dir only) | 20 (current dir) |
|
|
177
|
-
|
|
178
|
-
---
|
|
179
|
-
|
|
180
|
-
## Implementation Order
|
|
181
|
-
|
|
182
|
-
1. **Fix DELETE bug** — `api_delete_session` + `SessionManager#delete` by session_id
|
|
183
|
-
2. **Data fields** — add `source` + `agent_profile` to `build_session`, `to_session_data`, `restore_session`
|
|
184
|
-
3. **Channel/Cron tagging** — pass `source: :channel` / `source: :cron` when `ChannelManager` and cron create sessions
|
|
185
|
-
4. **Persistence upgrade** — `keep: 200`, 90-day cleanup, restore 20 on startup
|
|
186
|
-
5. **`GET /api/agents`** — scan both dirs, merge, return list
|
|
187
|
-
6. **Frontend — sidebar redesign** — Manual/Scheduled/Channel tabs + Coding fixed section
|
|
188
|
-
7. **Frontend — `[+ ▾]` button** — split button with agent dropdown
|
|
189
|
-
|
|
190
|
-
---
|
|
191
|
-
|
|
192
|
-
## File Locations
|
|
193
|
-
|
|
194
|
-
| File | Change |
|
|
195
|
-
|------|--------|
|
|
196
|
-
| `lib/clacky/session_manager.rb` | Add `delete(session_id)`, change keep to 200, add 90-day cleanup |
|
|
197
|
-
| `lib/clacky/agent/session_serializer.rb` | Serialize/restore `source` + `agent_profile` |
|
|
198
|
-
| `lib/clacky/server/http_server.rb` | Fix `api_delete_session`, add `GET /api/agents`, update `build_session`, restore 20 sessions |
|
|
199
|
-
| `lib/clacky/server/session_registry.rb` | Expose `agent_profile` + `source` in `session_summary` |
|
|
200
|
-
| `lib/clacky/server/channel/channel_manager.rb` | Pass `source: :channel` to `build_session` |
|
|
201
|
-
| `lib/clacky/web/sessions.js` | Tab switching, Coding section, `[+ ▾]` button |
|
|
202
|
-
| CSS / HTML template | New sidebar layout, tab styles, split button |
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
# System Skill Authoring Guide
|
|
2
|
-
|
|
3
|
-
Guidelines for writing built-in (system-level) skills under `lib/clacky/default_skills/`.
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## 1. Communicating with the Clacky server
|
|
8
|
-
|
|
9
|
-
Always use environment variables — never hardcode the port.
|
|
10
|
-
|
|
11
|
-
```bash
|
|
12
|
-
curl -s http://${CLACKY_SERVER_HOST}:${CLACKY_SERVER_PORT}/api/xxx
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
`http_server.rb` injects `CLACKY_SERVER_HOST` and `CLACKY_SERVER_PORT` at startup.
|
|
16
|
-
|
|
17
|
-
---
|
|
18
|
-
|
|
19
|
-
## 2. Read state via API, not config files
|
|
20
|
-
|
|
21
|
-
Skills must not read local config files directly.
|
|
22
|
-
|
|
23
|
-
- ❌ `cat ~/.clacky/browser.yml`
|
|
24
|
-
- ✅ `curl http://${CLACKY_SERVER_HOST}:${CLACKY_SERVER_PORT}/api/browser/status`
|
|
25
|
-
|
|
26
|
-
Exception: lightweight `enable` / `disable` operations may read/write yml directly (see `channel-manager`).
|
|
27
|
-
|
|
28
|
-
---
|
|
29
|
-
|
|
30
|
-
## 3. Running supporting scripts
|
|
31
|
-
|
|
32
|
-
If a skill includes supporting scripts, instruct the AI to run them directly using the full path — **do not describe how to discover the path**. The LLM context already contains the full paths of all files in the skill directory (injected via supporting files at invoke time).
|
|
33
|
-
|
|
34
|
-
Write it simply as:
|
|
35
|
-
|
|
36
|
-
```
|
|
37
|
-
Run the setup script:
|
|
38
|
-
ruby SKILL_DIR/scripts/feishu_setup.rb
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
or for Python:
|
|
42
|
-
|
|
43
|
-
```
|
|
44
|
-
python3 SKILL_DIR/scripts/setup.py
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
No `Gem.find_files`, no `find` fallback, no path-discovery logic needed.
|
data/docs/why-developer.md
DELETED
|
@@ -1,371 +0,0 @@
|
|
|
1
|
-
# Why Clacky for Professional Developers
|
|
2
|
-
|
|
3
|
-
## Executive Summary
|
|
4
|
-
|
|
5
|
-
Clacky is an open-source, CLI-first AI development assistant designed specifically for professional developers. It addresses critical pain points in existing AI coding tools while providing enterprise-grade features including multi-model support, automated safety mechanisms, and cost-optimized architecture.
|
|
6
|
-
|
|
7
|
-
**Key Results:**
|
|
8
|
-
- **50% lower cost** compared to Claude Code
|
|
9
|
-
- **Zero vendor lock-in** with multi-model support
|
|
10
|
-
- **Fully automated** with confirm_safe and auto_approve modes
|
|
11
|
-
- **Production validated** - used to self-iterate Clacky for 3 weeks
|
|
12
|
-
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
## The Problem
|
|
16
|
-
|
|
17
|
-
Professional developers face three critical pain points with existing AI coding tools:
|
|
18
|
-
|
|
19
|
-
### 1. Performance & Reliability Issues
|
|
20
|
-
|
|
21
|
-
| Issue | Impact |
|
|
22
|
-
|-------|--------|
|
|
23
|
-
| **Slow response** | Interrupted workflow, reduced productivity |
|
|
24
|
-
| **API blocking/banning** | Business continuity risk, especially for non-US developers |
|
|
25
|
-
| **Region restrictions** | Limited access to premium models |
|
|
26
|
-
|
|
27
|
-
### 2. High Costs
|
|
28
|
-
|
|
29
|
-
| Tool | Monthly Cost | Pain Point |
|
|
30
|
-
|------|--------------|------------|
|
|
31
|
-
| Claude Code | $17-200/seat | Expensive for teams |
|
|
32
|
-
| Cursor Pro | $20+/month | Addictive pricing model |
|
|
33
|
-
| GitHub Copilot | $10-100/seat | Accumulated costs |
|
|
34
|
-
|
|
35
|
-
**Problem**: Most tools lock you into expensive APIs without transparency on cost drivers.
|
|
36
|
-
|
|
37
|
-
### 3. Lack of Safe Automation
|
|
38
|
-
|
|
39
|
-
Current AI coding tools require constant vigilance:
|
|
40
|
-
|
|
41
|
-
```
|
|
42
|
-
❌ Every command requires manual confirmation
|
|
43
|
-
❌ No automatic risk detection and mitigation
|
|
44
|
-
❌ "Watch mode" fatigue - developers must stare at screens
|
|
45
|
-
❌ Cannot run unattended for complete tasks
|
|
46
|
-
❌ Dangerous commands (rm, curl | sh) require manual review
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
---
|
|
50
|
-
|
|
51
|
-
## The Solution: Clacky
|
|
52
|
-
|
|
53
|
-
Clacky addresses all three pain points with a developer-first approach.
|
|
54
|
-
|
|
55
|
-
### 1. Multi-Model Architecture
|
|
56
|
-
|
|
57
|
-
```
|
|
58
|
-
┌─────────────────────────────────────────────────────────────┐
|
|
59
|
-
│ Clacky Multi-Model Support │
|
|
60
|
-
├─────────────────────────────────────────────────────────────┤
|
|
61
|
-
│ ✅ OpenRouter │ Unified access to 100+ models │
|
|
62
|
-
│ ✅ OpenAI │ GPT-4, GPT-4o compatibility │
|
|
63
|
-
│ ✅ Anthropic Config │ Claude Code configuration compat │
|
|
64
|
-
│ ✅ DeepSeek │ 95% cheaper than OpenAI │
|
|
65
|
-
│ ✅ M2.1 Support │ Latest model versions │
|
|
66
|
-
│ ✅ Custom Endpoints │ Bring your own API server │
|
|
67
|
-
└─────────────────────────────────────────────────────────────┘
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
**Benefits:**
|
|
71
|
-
- No single point of failure
|
|
72
|
-
- Choose the best model for each task
|
|
73
|
-
- Significant cost savings with alternative providers
|
|
74
|
-
- Bypass regional restrictions
|
|
75
|
-
|
|
76
|
-
### 2. Smart Automation Modes
|
|
77
|
-
|
|
78
|
-
#### confirm_safe Mode
|
|
79
|
-
|
|
80
|
-
Automatically approves low-risk operations while keeping you in control:
|
|
81
|
-
|
|
82
|
-
| Operation | Behavior |
|
|
83
|
-
|-----------|----------|
|
|
84
|
-
| File reads | ✅ Auto-approved |
|
|
85
|
-
| Directory listing | ✅ Auto-approved |
|
|
86
|
-
| Search operations | ✅ Auto-approved |
|
|
87
|
-
| Safe shell commands | ✅ Auto-approved |
|
|
88
|
-
| Dangerous commands | ⚠️ Replaced with safe alternatives |
|
|
89
|
-
| File edits | 🔒 Confirmation required |
|
|
90
|
-
| File deletions | 🔒 Confirmation required |
|
|
91
|
-
|
|
92
|
-
**Result**: ~70% of commands run automatically, dramatically reducing watch mode fatigue.
|
|
93
|
-
|
|
94
|
-
#### auto_approve Mode
|
|
95
|
-
|
|
96
|
-
Complete hands-off operation for batch tasks:
|
|
97
|
-
|
|
98
|
-
```
|
|
99
|
-
┌─────────────────────────────────────────────────────────────┐
|
|
100
|
-
│ auto_approve Mode │
|
|
101
|
-
├─────────────────────────────────────────────────────────────┤
|
|
102
|
-
│ • Execute complete requirements without interruption │
|
|
103
|
-
│ • Dangerous operations automatically replaced │
|
|
104
|
-
│ • No file edit confirmations required │
|
|
105
|
-
│ • Ideal for: refactoring, testing, batch processing │
|
|
106
|
-
│ • Risk level: Low (with SafeShell protection) │
|
|
107
|
-
└─────────────────────────────────────────────────────────────┘
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
#### SafeShell Protection
|
|
111
|
-
|
|
112
|
-
Clacky's SafeShell automatically:
|
|
113
|
-
|
|
114
|
-
1. **Detects dangerous commands**: `rm -rf`, `curl | sh`, `sudo`
|
|
115
|
-
2. **Replaces with safe alternatives**:
|
|
116
|
-
- `rm` → Moves to trash (recoverable)
|
|
117
|
-
- `curl | sh` → Blocks and warns
|
|
118
|
-
- Dangerous git operations → Confirmed first
|
|
119
|
-
3. **Enforces project boundaries**: Cannot escape project directory
|
|
120
|
-
4. **Logs all operations**: Audit trail for security review
|
|
121
|
-
|
|
122
|
-
### 3. Cost-Optimized Architecture
|
|
123
|
-
|
|
124
|
-
#### Real-Time Cost Transparency
|
|
125
|
-
|
|
126
|
-
Every request displays:
|
|
127
|
-
```
|
|
128
|
-
💰 Cost: $0.0042 (Claude 3.5 Sonnet)
|
|
129
|
-
📊 Tokens: 1,250 in / 850 out
|
|
130
|
-
🗜️ Compression saved: 60%
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
#### Advanced Context Management
|
|
134
|
-
|
|
135
|
-
```
|
|
136
|
-
┌─────────────────────────────────────────────────────────────┐
|
|
137
|
-
│ Cost Optimization Pipeline │
|
|
138
|
-
├─────────────────────────────────────────────────────────────┤
|
|
139
|
-
│ 1. Request received │
|
|
140
|
-
│ ↓ │
|
|
141
|
-
│ 2. Context compression (60% reduction typical) │
|
|
142
|
-
│ ↓ │
|
|
143
|
-
│ 3. Tool call pre-filtering │
|
|
144
|
-
│ • Expensive operations identified early │
|
|
145
|
-
│ • Smart caching for repeated operations │
|
|
146
|
-
│ ↓ │
|
|
147
|
-
│ 4. Model selection optimization │
|
|
148
|
-
│ • Use cheaper models for simple tasks │
|
|
149
|
-
│ • Reserve expensive models for complex reasoning │
|
|
150
|
-
│ ↓ │
|
|
151
|
-
│ 5. Response generation │
|
|
152
|
-
└─────────────────────────────────────────────────────────────┘
|
|
153
|
-
```
|
|
154
|
-
|
|
155
|
-
**Measured Results:**
|
|
156
|
-
- **50% lower cost** vs Claude Code
|
|
157
|
-
- **60% context compression** on average
|
|
158
|
-
- **Early tool filtering** eliminates unnecessary expensive calls
|
|
159
|
-
|
|
160
|
-
---
|
|
161
|
-
|
|
162
|
-
## Validation: Production-Proven
|
|
163
|
-
|
|
164
|
-
### Self-Iteration Test (3 Weeks)
|
|
165
|
-
|
|
166
|
-
Clacky was used to develop and iterate on itself for three consecutive weeks:
|
|
167
|
-
|
|
168
|
-
| Metric | Result |
|
|
169
|
-
|--------|--------|
|
|
170
|
-
| Self-contained development | ✅ Complete |
|
|
171
|
-
| Feature parity with Claude Code | ✅ Achieved |
|
|
172
|
-
| Code quality | ✅ Production-ready |
|
|
173
|
-
| External research tasks | ✅ webfetch outperformed Claude Code |
|
|
174
|
-
|
|
175
|
-
### WebFetch Advantage
|
|
176
|
-
|
|
177
|
-
For tasks requiring external web resources:
|
|
178
|
-
- Clacky's webfetch tool is more reliable
|
|
179
|
-
- Better handling of dynamic content
|
|
180
|
-
- Faster response times
|
|
181
|
-
|
|
182
|
-
### Team Validation
|
|
183
|
-
|
|
184
|
-
- **Internal team**: 100% adoption for daily development
|
|
185
|
-
- **Production deployments**: Zero critical incidents
|
|
186
|
-
- **Developer satisfaction**: "Cannot go back to Claude Code"
|
|
187
|
-
|
|
188
|
-
---
|
|
189
|
-
|
|
190
|
-
## Feature Comparison
|
|
191
|
-
|
|
192
|
-
| Feature | **Clacky** | Claude Code | Cursor | Lovable |
|
|
193
|
-
|---------|------------|-------------|--------|---------|
|
|
194
|
-
| **Multi-Model Support** | ✅ Full | ❌ Anthropic only | ❌ OpenAI only | ⚠️ Limited |
|
|
195
|
-
| **Self-Hosted** | ✅ Yes | ❌ No | ❌ No | ❌ No |
|
|
196
|
-
| **confirm_safe Mode** | ✅ Yes | ❌ No | ❌ No | ❌ No |
|
|
197
|
-
| **auto_approve Mode** | ✅ Yes | ❌ No | ❌ No | ❌ No |
|
|
198
|
-
| **SafeShell Protection** | ✅ Auto | ⚠️ Manual | ⚠️ Manual | N/A |
|
|
199
|
-
| **Real-Time Cost** | ✅ Full | ⚠️ Limited | ⚠️ Limited | ❌ No |
|
|
200
|
-
| **Cost Reduction** | ✅ 50% | Baseline | +20% | +25% |
|
|
201
|
-
| **Session Persistence** | ✅ Full | ⚠️ Limited | ⚠️ Limited | ⚠️ Limited |
|
|
202
|
-
| **Open Source** | ✅ MIT | ❌ Closed | ❌ Closed | ❌ Closed |
|
|
203
|
-
| **Skills/Plugins** | ✅ Extensible | ❌ No | ⚠️ Limited | ❌ No |
|
|
204
|
-
|
|
205
|
-
---
|
|
206
|
-
|
|
207
|
-
## Technical Architecture
|
|
208
|
-
|
|
209
|
-
### Tool System
|
|
210
|
-
|
|
211
|
-
Clacky uses a modular tool architecture:
|
|
212
|
-
|
|
213
|
-
```
|
|
214
|
-
Clacky::Tools::Base
|
|
215
|
-
├── FileTool (read, write, edit, glob)
|
|
216
|
-
├── ShellTool (safe execution with protection)
|
|
217
|
-
├── WebTool (fetch, search)
|
|
218
|
-
├── GitTool (status, commit, branch)
|
|
219
|
-
├── CodeTool (run, test, lint)
|
|
220
|
-
└── Custom Tools (user-defined)
|
|
221
|
-
```
|
|
222
|
-
|
|
223
|
-
### Agent Architecture
|
|
224
|
-
|
|
225
|
-
```
|
|
226
|
-
┌─────────────────────────────────────────────────────────────┐
|
|
227
|
-
│ React-Based Agent │
|
|
228
|
-
├─────────────────────────────────────────────────────────────┤
|
|
229
|
-
│ 1. REASON → Analyze task and context │
|
|
230
|
-
│ 2. ACT → Execute tools (with safety filters) │
|
|
231
|
-
│ 3. OBSERVE → Process results and plan next step │
|
|
232
|
-
│ │
|
|
233
|
-
│ Loop until task completion or max iterations │
|
|
234
|
-
└─────────────────────────────────────────────────────────────┘
|
|
235
|
-
```
|
|
236
|
-
|
|
237
|
-
### Configuration
|
|
238
|
-
|
|
239
|
-
Clacky is compatible with Claude Code's configuration format:
|
|
240
|
-
|
|
241
|
-
```yaml
|
|
242
|
-
# ~/.clacky/config.yml
|
|
243
|
-
api:
|
|
244
|
-
provider: openrouter # or openai, anthropic, deepseek
|
|
245
|
-
model: claude-3-5-sonnet
|
|
246
|
-
api_key: ${OPENROUTER_API_KEY}
|
|
247
|
-
|
|
248
|
-
automation:
|
|
249
|
-
mode: confirm_safe # or auto_approve, manual
|
|
250
|
-
safe_shell: true
|
|
251
|
-
cost_alert: 0.10
|
|
252
|
-
|
|
253
|
-
models:
|
|
254
|
-
default: claude-3-5-sonnet
|
|
255
|
-
cheap: deepseek-chat
|
|
256
|
-
reasoning: claude-3-opus
|
|
257
|
-
```
|
|
258
|
-
|
|
259
|
-
---
|
|
260
|
-
|
|
261
|
-
## Cost Analysis
|
|
262
|
-
|
|
263
|
-
### Monthly Cost Comparison (Individual Developer)
|
|
264
|
-
|
|
265
|
-
| Tool | API Cost | Tool Cost | **Total** |
|
|
266
|
-
|------|----------|-----------|-----------|
|
|
267
|
-
| Claude Code | $17-200 | Included | $17-200 |
|
|
268
|
-
| Cursor Pro | $20 | + API costs | $40-100 |
|
|
269
|
-
| **Clacky + DeepSeek** | ~$5 | Free | **$5** |
|
|
270
|
-
| **Clacky + OpenRouter** | ~$10 | Free | **$10** |
|
|
271
|
-
|
|
272
|
-
### Annual Savings
|
|
273
|
-
|
|
274
|
-
| Team Size | Claude Code | Clacky | **Annual Savings** |
|
|
275
|
-
|-----------|-------------|--------|-------------------|
|
|
276
|
-
| 5 developers | $1,020 | $600 | **$420 (41%)** |
|
|
277
|
-
| 10 developers | $2,040 | $1,200 | **$840 (41%)** |
|
|
278
|
-
| 50 developers | $10,200 | $6,000 | **$4,200 (41%)** |
|
|
279
|
-
|
|
280
|
-
---
|
|
281
|
-
|
|
282
|
-
## Quick Start
|
|
283
|
-
|
|
284
|
-
### Installation
|
|
285
|
-
|
|
286
|
-
```bash
|
|
287
|
-
# One-line installation (macOS/Linux)
|
|
288
|
-
curl -sSL https://raw.githubusercontent.com/clacky-ai/openclacky/main/scripts/install.sh | bash
|
|
289
|
-
|
|
290
|
-
# Or via Ruby gem
|
|
291
|
-
gem install openclacky
|
|
292
|
-
```
|
|
293
|
-
|
|
294
|
-
### Configuration
|
|
295
|
-
|
|
296
|
-
```bash
|
|
297
|
-
# Interactive configuration wizard
|
|
298
|
-
clacky config set
|
|
299
|
-
|
|
300
|
-
# Or set API key directly
|
|
301
|
-
export OPENROUTER_API_KEY=your-api-key
|
|
302
|
-
```
|
|
303
|
-
|
|
304
|
-
### Usage
|
|
305
|
-
|
|
306
|
-
```bash
|
|
307
|
-
# Start interactive agent
|
|
308
|
-
clacky agent
|
|
309
|
-
|
|
310
|
-
# Run with confirm_safe (recommended for daily use)
|
|
311
|
-
clacky agent --mode confirm_safe "Refactor the authentication module"
|
|
312
|
-
|
|
313
|
-
# Run fully automated for complete tasks
|
|
314
|
-
clacky agent --mode auto_approve "Write integration tests for all controllers"
|
|
315
|
-
|
|
316
|
-
# Attach to existing session
|
|
317
|
-
clacky agent -c
|
|
318
|
-
|
|
319
|
-
# List available tools
|
|
320
|
-
clacky tools
|
|
321
|
-
```
|
|
322
|
-
|
|
323
|
-
---
|
|
324
|
-
|
|
325
|
-
## Why Professional Developers Choose Clacky
|
|
326
|
-
|
|
327
|
-
### Performance
|
|
328
|
-
- Faster response with multi-model failover
|
|
329
|
-
- No more watching for API blocks
|
|
330
|
-
- Production-validated reliability
|
|
331
|
-
|
|
332
|
-
### Cost Control
|
|
333
|
-
- Transparent, real-time cost visibility
|
|
334
|
-
- 50% lower operational costs
|
|
335
|
-
- No vendor lock-in
|
|
336
|
-
|
|
337
|
-
### Automation
|
|
338
|
-
- reclaim hours of watch time each week
|
|
339
|
-
- Complete unattended task execution
|
|
340
|
-
- Smart safety without friction
|
|
341
|
-
|
|
342
|
-
### Flexibility
|
|
343
|
-
- Open source and self-hostable
|
|
344
|
-
- Plugin system for custom workflows
|
|
345
|
-
- Compatible with existing configurations
|
|
346
|
-
|
|
347
|
-
---
|
|
348
|
-
|
|
349
|
-
## Summary
|
|
350
|
-
|
|
351
|
-
| Pain Point | Clacky's Solution |
|
|
352
|
-
|------------|-------------------|
|
|
353
|
-
| Slow + Blocked | Multi-model support with automatic failover |
|
|
354
|
-
| High Costs | 50% cost reduction + real-time transparency |
|
|
355
|
-
| Watch Mode Fatigue | confirm_safe + auto_approve automation |
|
|
356
|
-
| Vendor Lock-in | 100% open source, self-hostable |
|
|
357
|
-
| Limited Models | OpenRouter, OpenAI, DeepSeek, M2.1 |
|
|
358
|
-
|
|
359
|
-
**Result**: A tool that professional developers can trust, afford, and rely on.
|
|
360
|
-
|
|
361
|
-
---
|
|
362
|
-
|
|
363
|
-
## Get Started
|
|
364
|
-
|
|
365
|
-
- **GitHub**: https://github.com/clacky-ai/openclacky
|
|
366
|
-
- **Documentation**: https://docs.clacky.ai
|
|
367
|
-
- **Discord**: https://discord.gg/clacky
|
|
368
|
-
|
|
369
|
-
---
|
|
370
|
-
|
|
371
|
-
*Last updated: February 2025*
|