clawck 0.1.3 → 0.4.1

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 (106) hide show
  1. package/README.md +251 -174
  2. package/dist/cli/index.js +947 -87
  3. package/dist/cli/index.js.map +1 -1
  4. package/dist/core/atp.d.ts +31 -0
  5. package/dist/core/atp.d.ts.map +1 -0
  6. package/dist/core/atp.js +96 -0
  7. package/dist/core/atp.js.map +1 -0
  8. package/dist/core/benchmarks.d.ts +20 -0
  9. package/dist/core/benchmarks.d.ts.map +1 -0
  10. package/dist/core/benchmarks.js +86 -0
  11. package/dist/core/benchmarks.js.map +1 -0
  12. package/dist/core/clawck.d.ts +39 -3
  13. package/dist/core/clawck.d.ts.map +1 -1
  14. package/dist/core/clawck.js +140 -18
  15. package/dist/core/clawck.js.map +1 -1
  16. package/dist/core/database.d.ts +16 -1
  17. package/dist/core/database.d.ts.map +1 -1
  18. package/dist/core/database.js +177 -8
  19. package/dist/core/database.js.map +1 -1
  20. package/dist/core/patterns.d.ts +7 -0
  21. package/dist/core/patterns.d.ts.map +1 -0
  22. package/dist/core/patterns.js +36 -0
  23. package/dist/core/patterns.js.map +1 -0
  24. package/dist/core/personal.d.ts +26 -0
  25. package/dist/core/personal.d.ts.map +1 -0
  26. package/dist/core/personal.js +60 -0
  27. package/dist/core/personal.js.map +1 -0
  28. package/dist/core/runtime.d.ts +17 -0
  29. package/dist/core/runtime.d.ts.map +1 -0
  30. package/dist/core/runtime.js +43 -0
  31. package/dist/core/runtime.js.map +1 -0
  32. package/dist/core/types.d.ts +93 -2
  33. package/dist/core/types.d.ts.map +1 -1
  34. package/dist/core/types.js +9 -2
  35. package/dist/core/types.js.map +1 -1
  36. package/dist/core/webhooks.d.ts +22 -0
  37. package/dist/core/webhooks.d.ts.map +1 -0
  38. package/dist/core/webhooks.js +70 -0
  39. package/dist/core/webhooks.js.map +1 -0
  40. package/dist/hooks/adapters.d.ts +8 -0
  41. package/dist/hooks/adapters.d.ts.map +1 -0
  42. package/dist/hooks/adapters.js +152 -0
  43. package/dist/hooks/adapters.js.map +1 -0
  44. package/dist/hooks/handler.d.ts +9 -0
  45. package/dist/hooks/handler.d.ts.map +1 -0
  46. package/dist/hooks/handler.js +93 -0
  47. package/dist/hooks/handler.js.map +1 -0
  48. package/dist/hooks/index.d.ts +10 -0
  49. package/dist/hooks/index.d.ts.map +1 -0
  50. package/dist/hooks/index.js +23 -0
  51. package/dist/hooks/index.js.map +1 -0
  52. package/dist/hooks/install.d.ts +16 -0
  53. package/dist/hooks/install.d.ts.map +1 -0
  54. package/dist/hooks/install.js +247 -0
  55. package/dist/hooks/install.js.map +1 -0
  56. package/dist/hooks/session.d.ts +10 -0
  57. package/dist/hooks/session.d.ts.map +1 -0
  58. package/dist/hooks/session.js +72 -0
  59. package/dist/hooks/session.js.map +1 -0
  60. package/dist/hooks/stdin.d.ts +6 -0
  61. package/dist/hooks/stdin.d.ts.map +1 -0
  62. package/dist/hooks/stdin.js +38 -0
  63. package/dist/hooks/stdin.js.map +1 -0
  64. package/dist/hooks/types.d.ts +26 -0
  65. package/dist/hooks/types.d.ts.map +1 -0
  66. package/dist/hooks/types.js +7 -0
  67. package/dist/hooks/types.js.map +1 -0
  68. package/dist/index.d.ts +10 -0
  69. package/dist/index.d.ts.map +1 -1
  70. package/dist/index.js +19 -1
  71. package/dist/index.js.map +1 -1
  72. package/dist/reports/html.d.ts +14 -0
  73. package/dist/reports/html.d.ts.map +1 -0
  74. package/dist/reports/html.js +353 -0
  75. package/dist/reports/html.js.map +1 -0
  76. package/dist/reports/pdf.d.ts +14 -0
  77. package/dist/reports/pdf.d.ts.map +1 -0
  78. package/dist/reports/pdf.js +177 -0
  79. package/dist/reports/pdf.js.map +1 -0
  80. package/dist/reports/periods.d.ts +18 -0
  81. package/dist/reports/periods.d.ts.map +1 -0
  82. package/dist/reports/periods.js +55 -0
  83. package/dist/reports/periods.js.map +1 -0
  84. package/dist/server/api.d.ts.map +1 -1
  85. package/dist/server/api.js +156 -2
  86. package/dist/server/api.js.map +1 -1
  87. package/dist/server/mcp.d.ts.map +1 -1
  88. package/dist/server/mcp.js +31 -10
  89. package/dist/server/mcp.js.map +1 -1
  90. package/docs/atp-schema.json +298 -0
  91. package/docs/atp-spec-v0.2.md +216 -0
  92. package/docs/benchmarks-sources.md +202 -0
  93. package/docs/platform-testing-guide.md +423 -0
  94. package/docs/skills/clawck-setup.md +131 -0
  95. package/docs/skills/clawck-usage.md +148 -0
  96. package/docs/snippets/claude-md.txt +33 -0
  97. package/docs/snippets/hooks-claude.json +24 -0
  98. package/docs/snippets/hooks-cline.txt +10 -0
  99. package/docs/snippets/hooks-codex.json +16 -0
  100. package/docs/snippets/hooks-cursor.json +16 -0
  101. package/docs/snippets/hooks-gemini.json +16 -0
  102. package/docs/snippets/hooks-windsurf.json +16 -0
  103. package/docs/snippets/mcp-config.json +7 -0
  104. package/docs/snippets/openclaw-agent-md.txt +18 -0
  105. package/docs/snippets/openclaw-heartbeat-md.txt +17 -0
  106. package/package.json +4 -2
package/README.md CHANGED
@@ -1,23 +1,11 @@
1
- # ⏱️🦀 Clawck
1
+ # Clawck v0.4
2
2
 
3
3
  **Time tracking for AI agents. Toggl for the agentic era.**
4
4
 
5
- Clawck is an open-source tool that tracks how long AI agents spend on tasks, projects, and client work then shows you how much human-equivalent time and money they saved.
5
+ Clawck is an open-source tool that tracks how long AI agents spend on tasks, projects, and client work - then shows you how much human-equivalent time and money they saved.
6
6
 
7
7
  Every service business runs on timesheets. AI agent businesses will too.
8
8
 
9
- ---
10
-
11
- ## Why Clawck?
12
-
13
- AI agents are doing real work — writing code, researching grants, generating content, analyzing data. But nobody's tracking *how long* that work takes or *how much value* it delivers.
14
-
15
- Clawck answers the questions your clients, managers, and finance teams are already asking:
16
-
17
- - **"What did the AI actually do today?"** → A clear timesheet showing every task, duration, and outcome
18
- - **"Is this worth what we're paying?"** → Human-equivalent hours and cost savings calculated automatically
19
- - **"Which agent is the most productive?"** → Per-agent breakdowns across projects and clients
20
-
21
9
  ## Quick Start
22
10
 
23
11
  ```bash
@@ -27,37 +15,75 @@ npm install -g clawck
27
15
  # Initialize
28
16
  clawck init
29
17
 
30
- # Seed with sample data (to see the dashboard)
18
+ # Seed with sample data
31
19
  clawck seed --count 30
32
20
 
33
21
  # Start the server + dashboard
34
22
  clawck serve
35
- # Dashboard at http://localhost:3456
23
+ # Open http://localhost:3456
24
+
25
+ # Generate an interactive HTML report
26
+ clawck report --format html
36
27
  ```
37
28
 
38
- ## How It Works
29
+ ## Features
30
+
31
+ - **Time tracking** - Start/stop timers or log completed tasks retroactively
32
+ - **Human-equivalent calculations** - Configurable multipliers estimate how long a human would take
33
+ - **Tracking patterns** - Reusable task templates (code-review, research, testing, etc.)
34
+ - **Approval workflow** - Mark entries as approved for billing/invoicing
35
+ - **Reports** - Terminal, PDF, and interactive HTML reports with calendar, table, Gantt, and CSV views
36
+ - **Dashboard** - Real-time web dashboard with stats, entries, and breakdowns
37
+ - **MCP server** - Works with Claude Code, Cline, Cursor, Windsurf via stdio
38
+ - **REST API** - Full CRUD API for any agent framework
39
+ - **Multi-agent sync** - Pull from remote instances or push via ingest endpoint
40
+ - **Webhooks** - Notify on task completion, failure, or idle alerts
41
+ - **Platform hooks** - Auto-track via Claude Code hooks, Gemini, Cursor, etc.
42
+ - **PDF reports** - Professional timesheet PDFs with entry details table
43
+ - **CSV/JSON export** - Export data for external tools
44
+
45
+ ## Getting Started
39
46
 
40
47
  ### 1. Agents clock in and out
41
48
 
42
- **Via MCP (Claude Code, Cline, Cursor, Windsurf):**
49
+ **Via platform hooks (recommended — Claude Code, Cursor, Gemini, Windsurf, Codex):**
43
50
 
44
- Add to your MCP config (`~/.claude/mcp_servers.json` or similar):
51
+ Hooks fire automatically on every turn no agent cooperation needed.
52
+
53
+ Claude Code — add to `~/.claude/settings.json`:
45
54
 
46
55
  ```json
47
56
  {
48
- "clawck": {
49
- "command": "npx",
50
- "args": ["-y", "clawck", "mcp"]
57
+ "hooks": {
58
+ "UserPromptSubmit": [
59
+ {
60
+ "hooks": [
61
+ { "type": "command", "command": "clawck hook start" }
62
+ ]
63
+ }
64
+ ],
65
+ "Stop": [
66
+ {
67
+ "hooks": [
68
+ { "type": "command", "command": "clawck hook stop" }
69
+ ]
70
+ }
71
+ ]
51
72
  }
52
73
  }
53
74
  ```
54
75
 
55
- Now your agent has access to:
56
- - `clawck_start_task` — Start a timer
57
- - `clawck_stop_task`Stop a timer
58
- - `clawck_log_task` — Log a completed task retroactively
59
- - `clawck_status` See what's running
60
- - `clawck_timesheet` — Get a summary report
76
+ Or run `clawck hooks install claude` for the full config.
77
+
78
+ **Via MCP (optional for explicit agent control):**
79
+
80
+ Add to `~/.claude/mcp_servers.json` (or equivalent for Cline, Cursor, Windsurf):
81
+
82
+ ```json
83
+ { "clawck": { "command": "npx", "args": ["-y", "clawck", "mcp"] } }
84
+ ```
85
+
86
+ This gives agents `clawck_start_task`, `clawck_stop_task`, etc. for granular control. Add CLAUDE.md instructions (run `clawck setup claude`) to tell the agent to use them.
61
87
 
62
88
  **Via REST API:**
63
89
 
@@ -65,48 +91,31 @@ Now your agent has access to:
65
91
  # Start a task
66
92
  curl -X POST http://localhost:3456/api/start \
67
93
  -H "Content-Type: application/json" \
68
- -d '{"task": "Research grant opportunities", "project": "grant-research", "client": "acme-corp", "category": "research", "agent": "cubi-research-01"}'
94
+ -d '{"task": "Research grant opportunities", "project": "grant-research", "client": "acme-corp", "category": "research", "agent": "research-agent-01"}'
69
95
 
70
96
  # Stop a task
71
97
  curl -X POST http://localhost:3456/api/stop \
72
98
  -H "Content-Type: application/json" \
73
- -d '{"id": "entry-uuid-here", "status": "completed", "summary": "Found 12 matching grants", "tokens_in": 15000, "tokens_out": 3000}'
99
+ -d '{"id": "entry-uuid-here", "status": "completed", "summary": "Found 12 matching grants"}'
74
100
  ```
75
101
 
76
- **Via the SDK (in your own code):**
102
+ **Via the SDK:**
77
103
 
78
104
  ```typescript
79
105
  import { Clawck } from 'clawck';
80
106
 
81
- const clawck = new Clawck({
82
- default_client: 'acme-corp',
83
- default_agent: 'my-agent',
84
- });
85
-
86
- const entry = clawck.start({
87
- task: 'Analyze Q3 customer data',
88
- project: 'analytics',
89
- category: 'analysis',
90
- });
91
-
107
+ const clawck = new Clawck({ default_client: 'acme-corp', default_agent: 'my-agent' });
108
+ const entry = clawck.start({ task: 'Analyze Q3 data', project: 'analytics', category: 'analysis' });
92
109
  // ... agent does work ...
93
-
94
- clawck.stop({
95
- id: entry.id,
96
- status: 'completed',
97
- tokens_in: 25000,
98
- tokens_out: 8000,
99
- cost_usd: 0.12,
100
- summary: 'Identified 3 key churn drivers',
101
- });
110
+ clawck.stop({ id: entry.id, status: 'completed', tokens_in: 25000, cost_usd: 0.12 });
102
111
  ```
103
112
 
104
113
  ### 2. Clawck calculates human-equivalent value
105
114
 
106
- Every entry has a **category** (research, content, code, data_entry, design, etc.) and Clawck applies configurable multipliers to estimate how long a human would take:
115
+ Every entry has a **category** and Clawck applies configurable multipliers:
107
116
 
108
- | Category | Agent → Human Multiplier | Human Rate |
109
- |----------|--------------------------|------------|
117
+ | Category | Multiplier | Human Rate |
118
+ |----------|-----------|------------|
110
119
  | Research | 12x | $50/hr |
111
120
  | Content | 10x | $45/hr |
112
121
  | Code | 6x | $75/hr |
@@ -114,83 +123,140 @@ Every entry has a **category** (research, content, code, data_entry, design, etc
114
123
  | Design | 5x | $60/hr |
115
124
  | Analysis | 10x | $55/hr |
116
125
  | Testing | 8x | $65/hr |
126
+ | Planning | 6x | $50/hr |
127
+ | Communication | 8x | $40/hr |
128
+ | Other | 8x | $50/hr |
117
129
 
118
- So if an agent spends 30 minutes on research, Clawck reports it as **6 hours of human-equivalent work** and **$300 in estimated value**.
130
+ 30 minutes of agent research = **6 hours human-equivalent** = **$300 estimated value**.
119
131
 
120
- ### 3. View the dashboard
132
+ > **Note:** These multipliers are configurable starting estimates. They represent
133
+ > roughly how many hours of equivalent human work one hour of agent work produces
134
+ > for each category. Adjust them based on your team's actual experience.
135
+ > See `docs/benchmarks-sources.md` for industry timing data to help calibrate.
121
136
 
122
- Open `http://localhost:3456` to see:
137
+ ### 3. View results
123
138
 
124
- - 📊 **Stats cards** Agent hours, human-equiv hours, cost, active tasks
125
- - 💚 **Savings banner** Total estimated value delivered
126
- - 📋 **Time entries** Every task with duration, category, and status
127
- - 📁 **By Project** Hours breakdown per project with visual bars
128
- - 🤖 **By Agent** — Per-agent productivity and success rates
129
- - 🏷️ **By Category** — Where time is going across work types
139
+ - **Dashboard** at `http://localhost:3456` - stats, entries, breakdowns by project/agent/category
140
+ - **Terminal** - `clawck report` for quick summaries
141
+ - **HTML** - `clawck report --format html` - interactive report with calendar, sortable table, Gantt chart, CSV export
142
+ - **PDF** - `clawck report --format pdf` - printable timesheet with entry details
130
143
 
131
- ## Multi-Agent Aggregation
144
+ ## Tracking Patterns
132
145
 
133
- Running 10 agents across multiple machines? Clawck merges them:
146
+ Patterns are reusable templates for common task types. They set default values for category, project, client, agent, and tags.
134
147
 
135
- **Option A: Central collector pulls from remote instances**
148
+ **Built-in patterns:** `default`, `code-review`, `research`, `content-creation`, `testing`
136
149
 
137
- ```yaml
138
- # .clawck/config.json
139
- {
140
- "remote_sources": [
141
- { "name": "research-agent", "url": "http://cubi-01:3456/api/entries" },
142
- { "name": "writer-agent", "url": "http://cubi-02:3456/api/entries" },
143
- { "name": "coder-agent", "url": "http://cubi-03:3456/api/entries" }
144
- ],
145
- "sync_interval": 60
146
- }
150
+ ```bash
151
+ # List available patterns
152
+ clawck pattern list
153
+
154
+ # Use a pattern when starting a task
155
+ clawck start "Review auth module" --pattern code-review
156
+
157
+ # Add a custom pattern
158
+ clawck pattern add --name deploy --category code --project ops --tags deploy release
159
+
160
+ # Set a default pattern
161
+ clawck pattern use research
147
162
  ```
148
163
 
149
- **Option B: Agents push to a central instance**
164
+ Patterns merge as defaults - any explicit flags you pass override the pattern's values.
165
+
166
+ ## Approval Workflow
167
+
168
+ Entries can be approved for billing, invoicing, or quality control.
150
169
 
151
170
  ```bash
152
- # From any agent, POST entries to central Clawck
153
- curl -X POST http://central-clawck:3456/api/ingest \
154
- -H "Content-Type: application/json" \
155
- -d '[{"task": "...", "agent": "cubi-01", ...}]'
171
+ # Approve an entry (supports 8-char ID prefix)
172
+ clawck approve a1b2c3d4
173
+
174
+ # View only approved entries
175
+ clawck entries --approved
176
+
177
+ # View unapproved entries
178
+ clawck entries --unapproved
179
+
180
+ # Filter in list view too
181
+ clawck list --approved
156
182
  ```
157
183
 
158
- Entries merge cleanly by UUID no conflicts, no duplicates.
184
+ The API also supports approval: `POST /api/entries/:id/approve`.
185
+
186
+ ## Reports
187
+
188
+ ### Terminal
189
+
190
+ ```bash
191
+ clawck report # Last 7 days
192
+ clawck report --days 30 --detailed # With individual entries
193
+ clawck report --client acme-corp # Filter by client
194
+ ```
195
+
196
+ ### HTML (interactive)
197
+
198
+ ```bash
199
+ clawck report --format html -o report.html
200
+ ```
201
+
202
+ The HTML report includes four tabs:
203
+ - **Calendar** - Color-coded day grid showing entry count and hours
204
+ - **Table** - Sortable table of all entries with full details
205
+ - **Gantt** - Timeline visualization of tasks grouped by date
206
+ - **CSV** - Copyable CSV data for spreadsheets
207
+
208
+ ### PDF
209
+
210
+ ```bash
211
+ clawck report --format pdf -o report.pdf
212
+ ```
213
+
214
+ Professional timesheet PDF with summary stats, breakdowns by project/agent/category, and an entry details table.
159
215
 
160
216
  ## CLI Commands
161
217
 
162
218
  ```bash
163
- clawck init # Create .clawck/ directory with config
164
- clawck serve # Start API + dashboard (default: port 3456)
165
- clawck serve --port 8080 # Custom port
166
- clawck mcp # Start MCP server on stdio
219
+ # Setup
220
+ clawck init # Create .clawck/ directory with config
221
+ clawck serve [--port 8080] # Start API + dashboard
222
+ clawck mcp # Start MCP server on stdio
223
+ clawck seed [--count 50] # Generate test data
167
224
 
168
225
  # Time tracking
169
- clawck start <task> # Start a timer
170
- clawck stop <id> # Stop a timer
171
- clawck log <task> --duration 30 # Log a completed task retroactively
226
+ clawck start <task> [--pattern <name>] # Start a timer
227
+ clawck stop <id> # Stop a timer
228
+ clawck log <task> --duration 30 # Log a completed task
172
229
 
173
230
  # Viewing entries
174
- clawck status # Show running tasks and stats
175
- clawck list # List entries in a table (last 7 days)
176
- clawck list --days 30 --project web # Filter by days/project/client/agent
177
- clawck get <id> # Show a single entry
178
- clawck entries --status running # Query with filters
179
-
180
- # Reports & export
181
- clawck report # Timesheet summary (last 7 days)
182
- clawck report --days 30 --detailed # With individual entries
183
- clawck export --format csv --days 30 # Export as CSV (also: json)
231
+ clawck status # Show running tasks and stats
232
+ clawck list [--days 30] [--approved] # List entries in a table
233
+ clawck get <id> # Show a single entry
234
+ clawck entries [--status running] # Query with filters
235
+
236
+ # Reports and export
237
+ clawck report [--format terminal|pdf|html] [--output path]
238
+ clawck export [--format csv|json] [--days 30]
184
239
 
185
- # Editing & deleting
186
- clawck edit <id> --task "New name" # Edit fields (task, project, client, agent, etc.)
187
- clawck delete <id> # Delete an entry (supports 8-char prefix)
240
+ # Patterns
241
+ clawck pattern list # Show tracking patterns
242
+ clawck pattern add --name <n> [opts] # Add a custom pattern
243
+ clawck pattern use <name> # Set default pattern
188
244
 
189
- # Testing
190
- clawck seed --count 50 # Generate test data
245
+ # Approval
246
+ clawck approve <id> # Approve an entry
247
+
248
+ # Editing and deleting
249
+ clawck edit <id> --task "New name" # Edit fields
250
+ clawck delete <id> # Delete an entry (8-char prefix OK)
251
+
252
+ # Hooks
253
+ clawck hooks install <platform> # Show hook config for a platform
254
+ clawck hooks status # Check installed hooks
255
+ clawck setup [claude|mcp|openclaw] # Output integration snippets
191
256
 
192
257
  # Global options
193
- clawck --json <command> # Output as JSON (for scripting)
258
+ clawck --json <command> # JSON output for scripting
259
+ clawck -d <path> <command> # Custom data directory
194
260
  ```
195
261
 
196
262
  ## Configuration
@@ -202,8 +268,10 @@ Edit `.clawck/config.json`:
202
268
  "port": 3456,
203
269
  "default_client": "acme-corp",
204
270
  "default_project": "general",
205
- "default_agent": "cubi-01",
271
+ "default_agent": "agent-01",
206
272
  "default_model": "claude-sonnet-4-20250514",
273
+ "default_source": "clawck",
274
+ "default_pattern": "default",
207
275
  "human_equivalents": {
208
276
  "research": { "multiplier": 12, "human_rate_usd": 50 },
209
277
  "content": { "multiplier": 10, "human_rate_usd": 45 },
@@ -215,11 +283,20 @@ Edit `.clawck/config.json`:
215
283
  "planning": { "multiplier": 6, "human_rate_usd": 50 },
216
284
  "communication": { "multiplier": 8, "human_rate_usd": 40 },
217
285
  "other": { "multiplier": 8, "human_rate_usd": 50 }
218
- }
286
+ },
287
+ "patterns": [
288
+ { "name": "default", "description": "General task tracking", "category": "other" },
289
+ { "name": "code-review", "description": "Code review and refactoring", "category": "code", "tags": ["review"] },
290
+ { "name": "research", "description": "Research and analysis", "category": "research" },
291
+ { "name": "content-creation", "description": "Content writing", "category": "content" },
292
+ { "name": "testing", "description": "Writing and running tests", "category": "testing" }
293
+ ],
294
+ "remote_sources": [],
295
+ "webhooks": []
219
296
  }
220
297
  ```
221
298
 
222
- Clawck validates config on load. Invalid values (e.g., non-numeric port, malformed human_equivalents) will show a clear error message.
299
+ Config is validated on load. Invalid values produce clear error messages.
223
300
 
224
301
  ## REST API
225
302
 
@@ -229,6 +306,7 @@ Clawck validates config on load. Invalid values (e.g., non-numeric port, malform
229
306
  | `POST` | `/api/stop` | Stop a running task |
230
307
  | `POST` | `/api/log` | Log a completed task retroactively |
231
308
  | `PATCH` | `/api/entries/:id` | Update an entry |
309
+ | `POST` | `/api/entries/:id/approve` | Approve an entry |
232
310
  | `GET` | `/api/entries` | Query entries (with filters) |
233
311
  | `GET` | `/api/entries/:id` | Get a single entry |
234
312
  | `GET` | `/api/running` | Get currently running tasks |
@@ -240,107 +318,106 @@ Clawck validates config on load. Invalid values (e.g., non-numeric port, malform
240
318
  | `GET` | `/api/health` | Health check |
241
319
  | `GET` | `/api/stats` | Quick stats |
242
320
 
321
+ ## Multi-Agent Aggregation
322
+
323
+ Running agents across multiple machines? Clawck merges them:
324
+
325
+ **Pull mode** - central collector fetches from remote instances:
326
+
327
+ ```json
328
+ {
329
+ "remote_sources": [
330
+ { "name": "research-agent", "url": "http://agent-01:3456/api/entries" },
331
+ { "name": "writer-agent", "url": "http://agent-02:3456/api/entries" }
332
+ ],
333
+ "sync_interval": 60
334
+ }
335
+ ```
336
+
337
+ **Push mode** - agents POST entries to a central instance:
338
+
339
+ ```bash
340
+ curl -X POST http://central-clawck:3456/api/ingest \
341
+ -H "Content-Type: application/json" \
342
+ -d '[{"task": "...", "agent": "agent-01", ...}]'
343
+ ```
344
+
345
+ Entries merge by UUID - no conflicts, no duplicates.
346
+
243
347
  ## Architecture
244
348
 
245
349
  ```
246
350
  clawck/
247
351
  src/
248
- core/ Schema, database (SQLite), entry manager
249
- server/ REST API (Express) + MCP server (stdio)
250
- dashboard/ Single-file HTML dashboard
251
- cli/ → Command-line interface
252
- adapters/ Framework integrations (future)
352
+ core/ - Types, database (SQLite), entry manager, patterns
353
+ server/ - REST API (Express) + MCP server (stdio)
354
+ dashboard/ - Single-file HTML dashboard
355
+ reports/ - PDF and HTML report generators
356
+ cli/ - Command-line interface
357
+ hooks/ - Platform hook integrations
253
358
  .clawck/
254
- config.json Your configuration
255
- clawck.db SQLite database (auto-created)
359
+ config.json - Your configuration
360
+ clawck.db - SQLite database (auto-created)
256
361
  ```
257
362
 
258
363
  **Design principles:**
259
- - **Zero external dependencies** SQLite is embedded, no Redis/Postgres/Docker needed
260
- - **One process** API, dashboard, and MCP all run from the same `clawck serve`
261
- - **Append-first writes** Entries are created and updated; deletion available via CLI
262
- - **UUID-based merging** Multi-agent data combines without conflicts
263
- - **Configurable multipliers** Human-equivalent estimates are transparent and adjustable
264
-
265
- ## ClawckSpec v0.1
266
-
267
- Clawck implements an open schema for agent work entries. Any tool can emit ClawckSpec-compatible entries:
268
-
269
- ```json
270
- {
271
- "id": "550e8400-e29b-41d4-a716-446655440000",
272
- "agent": "cubi-research-01",
273
- "model": "claude-sonnet-4-20250514",
274
- "client": "acme-corp",
275
- "project": "grant-research",
276
- "task": "Find NEA grants matching sustainability criteria",
277
- "category": "research",
278
- "start": "2026-03-07T10:00:00Z",
279
- "end": "2026-03-07T10:47:00Z",
280
- "status": "completed",
281
- "tokens_in": 12400,
282
- "tokens_out": 3200,
283
- "cost_usd": 0.0852,
284
- "tool_calls": 8,
285
- "summary": "Found 12 matching grants totaling $2.4M in available funding",
286
- "tags": ["grants", "sustainability"],
287
- "source": "clawck-mcp",
288
- "spec_version": "0.1.0"
289
- }
290
- ```
364
+ - **Zero infrastructure** - SQLite embedded, no Redis/Postgres/Docker needed
365
+ - **One process** - API, dashboard, and MCP all run from `clawck serve`
366
+ - **Append-first** - Entries are created and updated; deletion available via CLI
367
+ - **UUID-based merging** - Multi-agent data combines without conflicts
368
+ - **Configurable** - Human-equivalent multipliers are transparent and adjustable
291
369
 
292
370
  ## Integrations
293
371
 
294
- ### Claude Code
295
- Add to `~/.claude/mcp_servers.json`:
372
+ **Platform hooks (recommended)** - Auto-track via `clawck hooks install claude|cursor|cline|windsurf|gemini|codex`
373
+
374
+ **Claude Code MCP** - Add to `~/.claude/mcp_servers.json` for explicit agent control:
296
375
  ```json
297
376
  { "clawck": { "command": "npx", "args": ["-y", "clawck", "mcp"] } }
298
377
  ```
299
378
 
300
- ### OpenClaw
301
- Instrument at the harness level — auto-start/stop entries on task dispatch.
379
+ **n8n** - POST to `/api/start` and `/api/stop` from HTTP Request nodes.
302
380
 
303
- ### n8n
304
- POST to `/api/start` and `/api/stop` from HTTP Request nodes.
305
-
306
- ### LangGraph / CrewAI / Any Python Framework
381
+ **Python frameworks (LangGraph, CrewAI, etc.):**
307
382
  ```python
308
383
  import requests
309
-
310
- # Start
311
- r = requests.post("http://localhost:3456/api/start", json={
312
- "task": "Analyze data", "project": "analytics", "agent": "my-agent"
313
- })
384
+ r = requests.post("http://localhost:3456/api/start", json={"task": "Analyze data", "agent": "my-agent"})
314
385
  entry_id = r.json()["id"]
315
-
316
- # Stop
317
- requests.post("http://localhost:3456/api/stop", json={
318
- "id": entry_id, "status": "completed"
319
- })
386
+ requests.post("http://localhost:3456/api/stop", json={"id": entry_id, "status": "completed"})
320
387
  ```
321
388
 
389
+ ## Help / Troubleshooting
390
+
391
+ - `clawck --help` for CLI usage
392
+ - `clawck setup` for agent integration snippets
393
+ - `clawck hooks status` to check hook installations
394
+ - Data directory defaults to `.clawck/` in your working directory. Override with `-d <path>` or `CLAWCK_DIR` env var.
395
+
322
396
  ## Roadmap
323
397
 
398
+ - [x] PDF report export
399
+ - [x] Webhooks (task completion, failure, idle alerts)
400
+ - [x] Claude Code hooks adapter
401
+ - [x] Tracking patterns
402
+ - [x] Approval workflow
403
+ - [x] HTML interactive reports
324
404
  - [ ] Python SDK (`pip install clawck`)
325
405
  - [ ] Auto-instrumentation (monkey-patch LLM client libraries)
326
- - [ ] PDF report export
327
406
  - [ ] Email digest (weekly summary to clients)
328
- - [ ] Webhooks (notify on task completion)
329
- - [ ] Claude Code hooks adapter
330
407
  - [ ] OpenTelemetry exporter
331
- - [ ] "Powered by Clawck" embeddable widget
408
+ - [ ] Embeddable widget
332
409
 
333
410
  ## Contributing
334
411
 
335
412
  Contributions welcome! Especially:
336
- - **Adapters** New framework integrations
337
- - **Dashboard** UI improvements and features
338
- - **Multipliers** Better human-equivalent estimates backed by data
413
+ - **Adapters** - New framework integrations
414
+ - **Dashboard** - UI improvements and features
415
+ - **Multipliers** - Better human-equivalent estimates backed by data
339
416
 
340
417
  ## License
341
418
 
342
- MIT — use it, fork it, build on it.
419
+ MIT
343
420
 
344
421
  ---
345
422
 
346
- Built by [CubiCrew](https://cubicrew.com) · Created by [Vince Quarles](https://github.com/vincequarles)
423
+ Built by [CubiCrew](https://cubicrew.com) - Created by [Vince Quarles](https://github.com/vincequarles)