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
@@ -0,0 +1,202 @@
1
+ # ATP Industry Benchmark Sources
2
+
3
+ This document defines the default industry benchmark values used by Clawck for human-equivalent time comparisons in ATP v0.2 `EntryComparison` objects. Each category includes representative task types, estimated human completion times, and supporting citations.
4
+
5
+ ---
6
+
7
+ ## Methodology
8
+
9
+ Benchmark values represent the **median time a competent professional** would spend on the task without AI assistance. Values are derived from industry surveys, time-tracking aggregates, and professional practice literature. Where exact studies are unavailable, estimates are triangulated from multiple practitioner sources and calibrated against large-scale time-tracking datasets.
10
+
11
+ All times assume a single practitioner working on a task of typical complexity. Highly specialized or unusually complex tasks may exceed these estimates significantly.
12
+
13
+ ---
14
+
15
+ ## Benchmark Values by Category
16
+
17
+ ### code
18
+
19
+ | Task Type | Benchmark | Minutes |
20
+ |-----------|-----------|---------|
21
+ | PR review | Review a standard pull request (< 400 lines) | 30 min |
22
+ | Bug fix | Diagnose and fix a moderate bug | 45 min |
23
+ | Feature | Implement a small-to-medium feature | 240 min (4 hrs) |
24
+ | Unit tests | Write unit tests for an existing module | 120 min (2 hrs) |
25
+
26
+ **Default category benchmark:** 240 min (feature-level task)
27
+
28
+ **Sources:**
29
+ - SmartBear / Cisco study on code review practices: optimal review sessions are 60-90 minutes, with single PR reviews averaging 30-60 minutes for reviewable changesets. [SmartBear, "Best Practices for Code Review," 2023]
30
+ - Stack Overflow Developer Survey (2023, 2024): median developer reports spending 30-60 minutes per code review and 4-8 hours on new feature implementation.
31
+ - Stripe Developer Coefficient Report (2018): developers spend ~17.3 hours/week on maintenance tasks including debugging; individual bug fixes average 30-90 minutes.
32
+ - GitClear "Software Development in 2024" report: average time-to-merge for PRs is increasing, with median feature branches taking 4-6 hours of active development.
33
+
34
+ ---
35
+
36
+ ### content
37
+
38
+ | Task Type | Benchmark | Minutes |
39
+ |-----------|-----------|---------|
40
+ | Blog post | Draft a 1,000-1,500 word blog post | 180 min (3 hrs) |
41
+ | Social post | Write and schedule a social media post | 30 min |
42
+ | Email | Compose a professional email or newsletter | 15 min |
43
+ | Technical documentation | Write a technical document or guide | 240 min (4 hrs) |
44
+
45
+ **Default category benchmark:** 180 min (blog post)
46
+
47
+ **Sources:**
48
+ - Orbit Media Studios Annual Blogging Survey (2023): average blog post takes 4 hours 10 minutes; median closer to 3 hours for posts under 1,500 words.
49
+ - Content Marketing Institute "B2B Content Marketing" report (2024): technical content creation averages 3-6 hours per piece.
50
+ - Sprout Social Index (2023): social media managers spend 15-45 minutes per post including copy, imagery selection, and scheduling.
51
+ - Boomerang email productivity research: the average professional email takes 5-15 minutes to compose; complex business emails up to 30 minutes.
52
+
53
+ ---
54
+
55
+ ### research
56
+
57
+ | Task Type | Benchmark | Minutes |
58
+ |-----------|-----------|---------|
59
+ | Competitive analysis | Analyze 3-5 competitors across defined dimensions | 360 min (6 hrs) |
60
+ | Literature review | Survey and synthesize 10-20 sources on a topic | 480 min (8 hrs) |
61
+
62
+ **Default category benchmark:** 360 min (competitive analysis)
63
+
64
+ **Sources:**
65
+ - Crayon "State of Competitive Intelligence" report (2023): CI professionals spend 6-10 hours on a standard competitive analysis deliverable.
66
+ - Academic research methodology literature: systematic literature reviews take 20-80+ hours; a focused topical review of 10-20 sources typically requires 6-12 hours. [Fink, A. "Conducting Research Literature Reviews," Sage, 2019]
67
+ - McKinsey Global Institute productivity reports: knowledge workers spend approximately 19% of their time searching for and gathering information.
68
+
69
+ ---
70
+
71
+ ### data_entry
72
+
73
+ | Task Type | Benchmark | Minutes |
74
+ |-----------|-----------|---------|
75
+ | Spreadsheet (100 rows) | Manual data entry of ~100 structured rows | 120 min (2 hrs) |
76
+ | Migration script | Write and validate a data migration script | 180 min (3 hrs) |
77
+
78
+ **Default category benchmark:** 120 min (spreadsheet entry)
79
+
80
+ **Sources:**
81
+ - Bureau of Labor Statistics Occupational Outlook: data entry keyers process 10,000-15,000 keystrokes per hour; 100 rows of moderate-complexity data takes 1-3 hours depending on field count.
82
+ - Zapier "State of Business Automation" report (2023): manual data tasks average 2-4 hours per batch for small-to-medium datasets.
83
+ - Stack Overflow and DBA community estimates: data migration scripts for moderate schemas take 2-6 hours including testing and validation.
84
+
85
+ ---
86
+
87
+ ### analysis
88
+
89
+ | Task Type | Benchmark | Minutes |
90
+ |-----------|-----------|---------|
91
+ | Quarterly report | Compile and analyze a quarterly business report | 480 min (8 hrs) |
92
+ | Data visualization | Create a polished data visualization or dashboard | 120 min (2 hrs) |
93
+
94
+ **Default category benchmark:** 480 min (quarterly report)
95
+
96
+ **Sources:**
97
+ - FP&A Trends Survey (2023): finance professionals spend 1-2 full days on quarterly reporting, with 6-10 hours of active analysis work.
98
+ - Databox "State of Business Reporting" (2023): creating a standard business report takes 5-10 hours on average.
99
+ - Storytelling with Data community surveys: a single polished data visualization takes 1-4 hours depending on complexity; dashboard pages take 2-6 hours.
100
+
101
+ ---
102
+
103
+ ### testing
104
+
105
+ | Task Type | Benchmark | Minutes |
106
+ |-----------|-----------|---------|
107
+ | Test plan | Write a test plan for a feature or release | 120 min (2 hrs) |
108
+ | Regression suite | Design and document a regression test suite | 240 min (4 hrs) |
109
+
110
+ **Default category benchmark:** 120 min (test plan)
111
+
112
+ **Sources:**
113
+ - ISTQB Foundation Level Syllabus: test planning and design activities account for 10-30% of total project effort; a feature-level test plan typically takes 2-4 hours.
114
+ - Ministry of Testing community surveys: QA professionals report spending 2-3 hours on test plans for medium-complexity features and 4-8 hours on comprehensive regression suites.
115
+ - SmartBear "State of Software Quality" report (2023): test creation and maintenance consume an average of 25% of QA time, with individual test suite creation taking 3-6 hours.
116
+
117
+ ---
118
+
119
+ ### design
120
+
121
+ | Task Type | Benchmark | Minutes |
122
+ |-----------|-----------|---------|
123
+ | Wireframe | Create wireframes for a feature or page | 180 min (3 hrs) |
124
+ | Email template | Design an email template | 120 min (2 hrs) |
125
+
126
+ **Default category benchmark:** 180 min (wireframe)
127
+
128
+ **Sources:**
129
+ - Nielsen Norman Group UX research: wireframing a single page or feature flow takes 2-4 hours for an experienced designer; higher-fidelity wireframes take longer.
130
+ - Litmus "State of Email" report (2023): email template design and development averages 2-4 hours per template.
131
+ - UX Design Institute industry benchmarks: low-fidelity wireframes average 1-3 hours; medium-fidelity with annotations average 3-6 hours.
132
+
133
+ ---
134
+
135
+ ### communication
136
+
137
+ | Task Type | Benchmark | Minutes |
138
+ |-----------|-----------|---------|
139
+ | Meeting summary | Summarize a 30-60 minute meeting with action items | 30 min |
140
+ | Status report | Write a project status update | 45 min |
141
+
142
+ **Default category benchmark:** 30 min (meeting summary)
143
+
144
+ **Sources:**
145
+ - Harvard Business Review research on meeting productivity (2022): professionals spend 15-30 minutes summarizing a one-hour meeting; detailed minutes with action items take 30-45 minutes.
146
+ - Asana "Anatomy of Work" Index (2023): workers spend 58% of their time on "work about work" including status updates; individual status reports take 30-60 minutes.
147
+ - Otter.ai productivity research: manual meeting summarization takes 2-3x the length of the meeting for comprehensive notes; 0.5x for a focused summary.
148
+
149
+ ---
150
+
151
+ ### planning
152
+
153
+ | Task Type | Benchmark | Minutes |
154
+ |-----------|-----------|---------|
155
+ | Sprint planning | Prepare and run sprint planning for a small team | 120 min (2 hrs) |
156
+ | Roadmap | Draft a product or project roadmap | 240 min (4 hrs) |
157
+
158
+ **Default category benchmark:** 120 min (sprint planning)
159
+
160
+ **Sources:**
161
+ - Scrum Guide (2020): sprint planning is timeboxed to 8 hours for a one-month sprint; for two-week sprints, 2-4 hours is typical including preparation.
162
+ - Atlassian Agile Coach resources: sprint planning preparation takes 1-2 hours; the ceremony itself takes 1-2 hours for teams of 5-9.
163
+ - ProductPlan "State of Product Management" report (2023): roadmap creation and maintenance takes 3-8 hours per quarter; initial roadmap drafts take 4-6 hours.
164
+
165
+ ---
166
+
167
+ ### other
168
+
169
+ | Task Type | Benchmark | Minutes |
170
+ |-----------|-----------|---------|
171
+ | Miscellaneous admin | General administrative or uncategorized tasks | 60 min (1 hr) |
172
+
173
+ **Default category benchmark:** 60 min
174
+
175
+ **Sources:**
176
+ - McKinsey Global Institute "The Social Economy" (2012, updated 2023): knowledge workers spend 28% of their workweek on email and administrative tasks; individual admin items average 15-60 minutes.
177
+ - RescueTime productivity data (2023): the median "productive" task session lasts 45-75 minutes.
178
+
179
+ ---
180
+
181
+ ## Summary Table
182
+
183
+ | Category | Default Benchmark | Representative Task |
184
+ |----------|------------------:|---------------------|
185
+ | code | 240 min | Feature implementation |
186
+ | content | 180 min | Blog post |
187
+ | research | 360 min | Competitive analysis |
188
+ | data_entry | 120 min | Spreadsheet (100 rows) |
189
+ | analysis | 480 min | Quarterly report |
190
+ | testing | 120 min | Test plan |
191
+ | design | 180 min | Wireframe |
192
+ | communication | 30 min | Meeting summary |
193
+ | planning | 120 min | Sprint planning |
194
+ | other | 60 min | Misc admin |
195
+
196
+ ---
197
+
198
+ ## Updating Benchmarks
199
+
200
+ Benchmark values should be reviewed annually against new survey data. To override defaults, configure `benchmarks` in the ATP export envelope or adjust `human_equivalents` in `clawck.config.json`.
201
+
202
+ Community contributions of benchmark data with citations are welcome via pull request.
@@ -0,0 +1,423 @@
1
+ # Clawck Platform Testing Guide
2
+
3
+ ## Pre-Flight: Get Clawck Running
4
+
5
+ Before testing on any platform, make sure the server is up:
6
+
7
+ ```bash
8
+ # Verify installed
9
+ clawck --version # Should show 0.4.0
10
+
11
+ # Initialize if not already done
12
+ clawck init
13
+
14
+ # Start the server (leave this running in a terminal)
15
+ clawck serve
16
+ # Dashboard: http://localhost:3456
17
+ ```
18
+
19
+ Keep `clawck serve` running in a background terminal for all tests. Every platform below will write entries to the same database, so you'll see everything show up in one dashboard.
20
+
21
+ ---
22
+
23
+ ## Platform 1: Claude Code (Hooks + MCP -- Terminal)
24
+
25
+ **What it is:** Claude Code runs in your terminal. It supports both hooks (automatic, fires every turn) and MCP (explicit agent control). Hooks are the recommended default.
26
+
27
+ ### Setup
28
+
29
+ **Step 1: Install hooks (recommended — automatic tracking)**
30
+
31
+ Add to `~/.claude/settings.json`:
32
+
33
+ ```json
34
+ {
35
+ "hooks": {
36
+ "UserPromptSubmit": [
37
+ {
38
+ "hooks": [
39
+ {
40
+ "type": "command",
41
+ "command": "clawck hook start"
42
+ }
43
+ ]
44
+ }
45
+ ],
46
+ "Stop": [
47
+ {
48
+ "hooks": [
49
+ {
50
+ "type": "command",
51
+ "command": "clawck hook stop"
52
+ }
53
+ ]
54
+ }
55
+ ]
56
+ }
57
+ }
58
+ ```
59
+
60
+ Or run `clawck hooks install claude` for the full config.
61
+
62
+ Hooks fire automatically on every turn — no agent cooperation needed. Every prompt submission starts a timer, every stop event ends it. This is the most reliable integration because it doesn't depend on the agent remembering to call tools.
63
+
64
+ **Step 2: Add MCP server (optional — for explicit agent control)**
65
+
66
+ If you want the agent to set richer task names, categories, or project metadata, add the MCP server too. Edit `~/.claude/mcp_servers.json` (global) or `.claude/mcp_servers.json` (per-project):
67
+
68
+ ```json
69
+ {
70
+ "clawck": {
71
+ "command": "npx",
72
+ "args": ["-y", "clawck", "mcp"]
73
+ }
74
+ }
75
+ ```
76
+
77
+ This gives agents `clawck_start_task`, `clawck_stop_task`, `clawck_log_task`, `clawck_status`, and `clawck_timesheet` tools. When MCP tools are used alongside hooks, the agent's explicit start/stop overrides the hook's auto-tracking for that turn.
78
+
79
+ **Step 3: Add CLAUDE.md instructions (only needed if using MCP)**
80
+
81
+ Add to `~/.claude/CLAUDE.md` (global) or your project's `CLAUDE.md`. Run `clawck setup claude` to get the full snippet. These instructions tell the agent how to use the MCP tools — they're not needed if you're only using hooks.
82
+
83
+ ### Test Sequence
84
+
85
+ 1. Open Claude Code: `claude`
86
+ 2. Give it a real task: "Read the README.md in this project and suggest 3 improvements"
87
+ 3. If using hooks: check `clawck status` — an entry should be running automatically
88
+ 4. If using MCP: watch for `clawck_start_task` and `clawck_stop_task` tool calls in the output
89
+ 5. Open `http://localhost:3456` — your entry should appear
90
+
91
+ ### What to Verify
92
+
93
+ - [ ] Entry appears in dashboard with correct task description
94
+ - [ ] Duration is reasonable (seconds to minutes, not hours)
95
+ - [ ] Category is set (code, research, content, etc.)
96
+ - [ ] Agent shows as "claude-code" or similar
97
+ - [ ] Multi-turn conversations create separate entries per turn
98
+ - [ ] Hooks fire even when the agent doesn't explicitly call MCP tools
99
+
100
+ ---
101
+
102
+ ## Platform 2: Claude Desktop (MCP -- App)
103
+
104
+ **What it is:** The Claude desktop app supports MCP servers through its config file. Same MCP protocol as Claude Code, different config location.
105
+
106
+ ### Setup
107
+
108
+ **Step 1: Find your config file**
109
+
110
+ - **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
111
+ - **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
112
+
113
+ Create it if it doesn't exist.
114
+
115
+ **Step 2: Add Clawck MCP server**
116
+
117
+ ```json
118
+ {
119
+ "mcpServers": {
120
+ "clawck": {
121
+ "command": "npx",
122
+ "args": ["-y", "clawck", "mcp"]
123
+ }
124
+ }
125
+ }
126
+ ```
127
+
128
+ **Step 3: Restart Claude Desktop**
129
+
130
+ Completely quit and reopen the app. Check the MCP icon (hammer/wrench icon) in the chat -- you should see Clawck's tools listed:
131
+ - `clawck_start_task`
132
+ - `clawck_stop_task`
133
+ - `clawck_log_task`
134
+ - `clawck_status`
135
+ - `clawck_timesheet`
136
+
137
+ ### Test Sequence
138
+
139
+ 1. Open Claude Desktop
140
+ 2. Verify MCP tools are visible (click the hammer icon)
141
+ 3. Tell Claude: "Use your clawck tools to start tracking, then research the top 3 trends in AI agents for 2026, then stop tracking when done"
142
+ 4. Claude should call `clawck_start_task` -> do the research -> call `clawck_stop_task`
143
+ 5. Check `http://localhost:3456` for the entry
144
+
145
+ ### What to Verify
146
+
147
+ - [ ] MCP tools appear in the tool list
148
+ - [ ] Claude calls start/stop without being reminded each turn
149
+ - [ ] Entry shows up in the dashboard
150
+ - [ ] If Claude doesn't auto-track, test with explicit "start your clawck timer" prompt
151
+
152
+ ### Note on Claude Desktop
153
+
154
+ Claude Desktop's MCP support may require you to explicitly tell the model to use the tools at first. Unlike Claude Code where you can add CLAUDE.md instructions, Desktop doesn't have a persistent system prompt you control. You may need to start each conversation with "Use your Clawck tools to track your time on every response."
155
+
156
+ ---
157
+
158
+ ## Platform 3: Claude Web (claude.ai)
159
+
160
+ **What it is:** Claude.ai supports URL-based MCP connectors, but Clawck's MCP server is stdio-based (designed for local tools). So we need a different approach.
161
+
162
+ ### The Reality
163
+
164
+ Clawck's MCP server uses stdio (stdin/stdout), which works for local tools like Claude Code and Cursor. Claude.ai needs URL-based MCP servers (SSE endpoints). Right now there's no direct MCP integration path.
165
+
166
+ ### Option A: REST API via Artifacts (Demo/Showcase)
167
+
168
+ You can build an artifact that talks to Clawck's REST API. This works if Clawck is running on a publicly accessible server (not localhost from claude.ai's perspective).
169
+
170
+ **This is mostly useful for demos**, not daily tracking.
171
+
172
+ ### Option B: Manual Logging via Conversation
173
+
174
+ Log entries after the fact using the CLI:
175
+
176
+ ```bash
177
+ clawck log "Testing playbook refinement" --duration 45 --project my-project --client my-client --category planning
178
+ ```
179
+
180
+ ### Option C: Build an SSE MCP Wrapper (Roadmap)
181
+
182
+ This is the real unlock. Add an SSE endpoint to Clawck's server so URL-based MCP clients (like claude.ai) can connect:
183
+
184
+ ```
185
+ clawck serve --mcp-sse
186
+ # Exposes: http://localhost:3456/mcp/sse
187
+ ```
188
+
189
+ Then add it as a connector in claude.ai settings. **This should go on the Clawck roadmap** -- it's the feature that makes Clawck work everywhere, not just in IDEs.
190
+
191
+ ### What to Do Now
192
+
193
+ For claude.ai, just use the CLI to log work manually after sessions. The real play is shipping the SSE MCP endpoint so claude.ai users can connect directly.
194
+
195
+ ---
196
+
197
+ ## Platform 4: OpenClaw
198
+
199
+ **What it is:** An agent gateway that can run on dedicated hardware. OpenClaw uses behavioral markdown files (AGENT.md, HEARTBEAT.md) to configure agent behavior.
200
+
201
+ ### Setup
202
+
203
+ **Option A: MCP (if OpenClaw supports MCP servers)**
204
+
205
+ If OpenClaw has MCP client support, add the same config:
206
+
207
+ ```json
208
+ {
209
+ "clawck": {
210
+ "command": "npx",
211
+ "args": ["-y", "clawck", "mcp"]
212
+ }
213
+ }
214
+ ```
215
+
216
+ **Option B: REST API Integration**
217
+
218
+ If OpenClaw runs tasks via scripts or workflows, call Clawck's REST API directly:
219
+
220
+ ```bash
221
+ # At the start of an agent task
222
+ ENTRY_ID=$(curl -s -X POST http://localhost:3456/api/start \
223
+ -H "Content-Type: application/json" \
224
+ -d '{"task": "Handle customer inquiry", "project": "client-support", "client": "acme-corp", "category": "communication", "agent": "receptionist-agent-01"}' \
225
+ | jq -r '.id')
226
+
227
+ # ... agent does work ...
228
+
229
+ # At the end
230
+ curl -s -X POST http://localhost:3456/api/stop \
231
+ -H "Content-Type: application/json" \
232
+ -d "{\"id\": \"$ENTRY_ID\", \"status\": \"completed\", \"summary\": \"Handled booking inquiry, scheduled appointment\"}"
233
+ ```
234
+
235
+ **Option C: Behavioral Files (Agent Self-Tracking)**
236
+
237
+ Add to your OpenClaw agent's `AGENT.md`:
238
+
239
+ ```markdown
240
+ ## Generation Time Tracking (Clawck)
241
+
242
+ You are responsible for measuring your own generation time using Clawck MCP tools.
243
+ This is NOT human time tracking -- you are timing how long YOUR computation takes per turn.
244
+
245
+ ### Rules
246
+ - Start the timer (`clawck_start_task`) at the START of every turn.
247
+ - Stop the timer (`clawck_stop_task`) at the END of every turn.
248
+ - One turn = one time entry.
249
+ - Always stop on failure with `status: "failed"`.
250
+ - Never skip timing. Never ask permission.
251
+ ```
252
+
253
+ Add to `HEARTBEAT.md` (per-turn hooks):
254
+
255
+ ```markdown
256
+ ## Per-Turn Timing
257
+ 1. On message received -> `clawck_start_task` with task, project, client, category
258
+ 2. On response complete -> `clawck_stop_task` with entry ID, status, summary
259
+ 3. On error -> `clawck_stop_task` with `status: "failed"`
260
+ ```
261
+
262
+ ### Test Sequence
263
+
264
+ 1. Deploy Clawck alongside OpenClaw on the target machine
265
+ 2. Send a test message to the agent via its configured channel (Telegram, Slack, etc.)
266
+ 3. Check `clawck status` on the machine
267
+ 4. Verify entry appears with correct client/project mapping
268
+
269
+ ### What to Verify
270
+
271
+ - [ ] Entries are created for each agent interaction
272
+ - [ ] Client and project fields map correctly
273
+ - [ ] Duration reflects actual agent processing time, not human wait time
274
+ - [ ] Failed interactions are logged with `status: "failed"`
275
+
276
+ ### Client-Facing Reports
277
+
278
+ Each OpenClaw instance generates its own Clawck reports. Monthly, you can run:
279
+
280
+ ```bash
281
+ clawck report --format html --days 30 --client acme-corp -o acme-march-2026.html
282
+ ```
283
+
284
+ Send that to the client. They see exactly what their AI agent did, how much time it saved, and the dollar value.
285
+
286
+ ---
287
+
288
+ ## Platform 5: Cursor
289
+
290
+ **What it is:** AI-powered code editor with MCP support. Configuration is per-project.
291
+
292
+ ### Setup
293
+
294
+ **Step 1: Create MCP config**
295
+
296
+ Create `.cursor/mcp.json` in your project root:
297
+
298
+ ```json
299
+ {
300
+ "mcpServers": {
301
+ "clawck": {
302
+ "command": "npx",
303
+ "args": ["-y", "clawck", "mcp"]
304
+ }
305
+ }
306
+ }
307
+ ```
308
+
309
+ **Step 2 (Optional): Add hooks**
310
+
311
+ Create `.cursor/hooks.json`:
312
+
313
+ ```json
314
+ {
315
+ "hooks": {
316
+ "pre_user_prompt": [
317
+ {
318
+ "type": "command",
319
+ "command": "clawck hook start"
320
+ }
321
+ ],
322
+ "stop": [
323
+ {
324
+ "type": "command",
325
+ "command": "clawck hook stop"
326
+ }
327
+ ]
328
+ }
329
+ }
330
+ ```
331
+
332
+ **Step 3: Restart Cursor**
333
+
334
+ Reopen the project. The MCP server should initialize automatically.
335
+
336
+ ### Test Sequence
337
+
338
+ 1. Open a project in Cursor with the MCP config
339
+ 2. Use Cursor's AI chat: "Refactor this function to use async/await"
340
+ 3. Check if Clawck tools are called
341
+ 4. Verify at `http://localhost:3456`
342
+ 5. Run `clawck hooks status` to check hook detection
343
+
344
+ ### What to Verify
345
+
346
+ - [ ] MCP server initializes (check Cursor's MCP panel if available)
347
+ - [ ] Entries appear in the dashboard
348
+ - [ ] Agent identified as "cursor"
349
+ - [ ] Project inferred from workspace directory
350
+
351
+ ---
352
+
353
+ ## Cross-Platform Verification Checklist
354
+
355
+ After testing on at least 2-3 platforms, verify these in the dashboard:
356
+
357
+ ### Data Quality
358
+ - [ ] Different agents appear (claude-code, cursor, receptionist-agent-01, etc.)
359
+ - [ ] Task descriptions are meaningful, not generic
360
+ - [ ] Categories are set appropriately
361
+ - [ ] Durations are realistic (seconds-minutes for IDE, minutes for OpenClaw)
362
+
363
+ ### Dashboard
364
+ - [ ] Stats cards show correct totals
365
+ - [ ] Savings banner calculates properly
366
+ - [ ] By Agent tab shows breakdown per platform
367
+ - [ ] By Project tab groups correctly
368
+
369
+ ### Reports
370
+ - [ ] `clawck report --format html` generates a clean report
371
+ - [ ] `clawck report --format pdf` generates a valid PDF
372
+ - [ ] Multi-platform entries appear together in one report
373
+
374
+ ### The Screenshot Test
375
+ - [ ] Take a screenshot of the dashboard after 1 day of real use
376
+ - [ ] Does it look impressive enough for LinkedIn?
377
+ - [ ] Is the savings number prominent?
378
+ - [ ] Would someone who knows nothing about Clawck understand the value in 5 seconds?
379
+
380
+ ---
381
+
382
+ ## Showcase Polish Checklist (Before Marketing)
383
+
384
+ ### Version Sync
385
+ - [ ] `package.json` version matches everywhere
386
+ - [ ] MCP server `serverInfo.version` matches
387
+ - [ ] API `/api/health` version matches
388
+ - [ ] README badges (if any) match
389
+
390
+ ### First-Run Experience
391
+ - [ ] `npm install -g clawck && clawck init && clawck serve` works in under 60 seconds
392
+ - [ ] Dashboard loads with clear empty state, not errors
393
+ - [ ] `clawck seed` generates convincing demo data
394
+ - [ ] `clawck setup claude` outputs clean, copy-pasteable config
395
+
396
+ ### Dashboard Visual Pass
397
+ - [ ] Savings banner is visually dominant (this is your hero metric)
398
+ - [ ] No layout issues at common screen widths
399
+ - [ ] Dark theme looks polished in screenshots
400
+
401
+ ### README / GitHub
402
+ - [ ] Hero screenshot of dashboard at the top of README
403
+ - [ ] Quick start works as written (test fresh install)
404
+ - [ ] All links resolve
405
+ - [ ] License and attribution are clean
406
+
407
+ ### The LinkedIn Screenshot
408
+ - [ ] Dashboard with real data (not seeded)
409
+ - [ ] At least 3-4 hours of tracked agent work visible
410
+ - [ ] Savings number is compelling ($100+)
411
+ - [ ] Multiple agents/projects showing activity
412
+
413
+ ---
414
+
415
+ ## Roadmap Items Discovered
416
+
417
+ Based on this testing guide, these should go on the Clawck roadmap:
418
+
419
+ 1. **SSE MCP endpoint** -- Enables claude.ai, web-based tools, and remote MCP clients
420
+ 2. **Auto-detect project from cwd** -- Less manual field-setting for IDE users
421
+ 3. **Dashboard screenshot mode** -- One-click clean export for social sharing
422
+ 4. **Client-facing report template** -- Branded HTML report for sending to clients
423
+ 5. **`clawck doctor`** -- Diagnostic command that checks version sync, MCP connectivity, hook installation status