claudedash 1.1.18 → 1.1.20

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 (45) hide show
  1. package/README.md +183 -148
  2. package/dist/cli.js +34 -38
  3. package/dist/cli.js.map +1 -1
  4. package/dist/core/contextHealth.d.ts.map +1 -1
  5. package/dist/core/contextHealth.js +9 -4
  6. package/dist/core/contextHealth.js.map +1 -1
  7. package/dist/core/todoReader.js +4 -0
  8. package/dist/core/todoReader.js.map +1 -1
  9. package/dist/core/types.d.ts +3 -0
  10. package/dist/core/types.d.ts.map +1 -1
  11. package/dist/public/404/index.html +1 -1
  12. package/dist/public/404.html +1 -1
  13. package/dist/public/__next.__PAGE__.txt +4 -4
  14. package/dist/public/__next._full.txt +9 -9
  15. package/dist/public/__next._head.txt +3 -3
  16. package/dist/public/__next._index.txt +3 -3
  17. package/dist/public/__next._tree.txt +1 -1
  18. package/dist/public/_next/static/chunks/102f894cc892994d.js +1 -0
  19. package/dist/public/_next/static/chunks/3503d32179c4604c.js +1 -0
  20. package/dist/public/_next/static/chunks/3ecc4e803f4fe50b.js +2 -0
  21. package/dist/public/_next/static/chunks/417032eeb2cd875f.js +1 -0
  22. package/dist/public/_next/static/chunks/4282b93d7fdb053b.js +70 -0
  23. package/dist/public/_next/static/chunks/42d98220570fe13c.js +1 -0
  24. package/dist/public/_next/static/chunks/a5e4bfca0e003ba5.js +4 -0
  25. package/dist/public/_next/static/chunks/turbopack-b020cfa7754340f9.js +4 -0
  26. package/dist/public/_not-found/__next._full.txt +7 -7
  27. package/dist/public/_not-found/__next._head.txt +3 -3
  28. package/dist/public/_not-found/__next._index.txt +3 -3
  29. package/dist/public/_not-found/__next._not-found.__PAGE__.txt +2 -2
  30. package/dist/public/_not-found/__next._not-found.txt +3 -3
  31. package/dist/public/_not-found/__next._tree.txt +1 -1
  32. package/dist/public/_not-found/index.html +1 -1
  33. package/dist/public/_not-found/index.txt +7 -7
  34. package/dist/public/index.html +1 -1
  35. package/dist/public/index.txt +9 -9
  36. package/package.json +1 -1
  37. package/dist/public/_next/static/chunks/5b865c50d9614bb0.js +0 -1
  38. package/dist/public/_next/static/chunks/64ee9622541d967c.js +0 -1
  39. package/dist/public/_next/static/chunks/66f59f4487e89157.js +0 -1
  40. package/dist/public/_next/static/chunks/9dc6819ec7a7f68e.js +0 -70
  41. package/dist/public/_next/static/chunks/d1f8ac52f80f9493.js +0 -5
  42. package/dist/public/_next/static/chunks/turbopack-87039ecabc6befeb.js +0 -4
  43. /package/dist/public/_next/static/{VZgE2eaffrTwBeTsQ_vpQ → X4yDDUDj2TcAO92p7xxHo}/_buildManifest.js +0 -0
  44. /package/dist/public/_next/static/{VZgE2eaffrTwBeTsQ_vpQ → X4yDDUDj2TcAO92p7xxHo}/_clientMiddlewareManifest.json +0 -0
  45. /package/dist/public/_next/static/{VZgE2eaffrTwBeTsQ_vpQ → X4yDDUDj2TcAO92p7xxHo}/_ssgManifest.js +0 -0
package/README.md CHANGED
@@ -1,59 +1,115 @@
1
1
  # claudedash
2
2
 
3
- See what your AI agent is actually doing.
3
+ **See exactly what your AI agent is doing — in real time.**
4
4
 
5
- [![npm](https://img.shields.io/npm/v/claudedash)](https://www.npmjs.com/package/claudedash)
6
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5
+ [![npm version](https://img.shields.io/npm/v/claudedash?color=00f5ff&labelColor=0f0f12)](https://www.npmjs.com/package/claudedash)
6
+ [![npm downloads](https://img.shields.io/npm/dm/claudedash?labelColor=0f0f12)](https://www.npmjs.com/package/claudedash)
7
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?labelColor=0f0f12)](https://opensource.org/licenses/MIT)
7
8
  [![CI](https://github.com/yunusemrgrl/claudedash/actions/workflows/ci.yml/badge.svg)](https://github.com/yunusemrgrl/claudedash/actions/workflows/ci.yml)
8
9
 
9
10
  ---
10
11
 
11
- ## The problem
12
+ ## The Problem
12
13
 
13
- You tell Claude Code to refactor your auth system. It says "on it." You wait. Terminal scrolls. Minutes pass. You have no idea if it's on task 2 of 12 or stuck in a loop. You're flying blind.
14
+ You tell Claude Code: _"refactor the auth system."_ It says: _"on it."_
14
15
 
15
- claudedash fixes that. One command, zero config. It reads Claude Code's own task files and gives you a live Kanban board.
16
+ Terminal scrolls. Minutes pass. Is it on step 3 of 12? Stuck in a loop? Already done?
17
+
18
+ **You have no idea.**
19
+
20
+ claudedash fixes that. One command, zero config — a live dashboard for every Claude Code session.
16
21
 
17
22
  ```bash
18
23
  npx -y claudedash@latest start
19
24
  ```
20
25
 
21
- That's it. Open `localhost:4317`. Watch your agent work.
26
+ Open `localhost:4317`. Watch your agent work.
22
27
 
23
- ![claudedash demo](landing/assets/activitiy.mp4)
28
+ ---
24
29
 
25
- ## How it works
30
+ ## Quick Start
26
31
 
27
- Claude Code writes task state to `~/.claude/tasks/` when it uses the TodoWrite tool. claudedash reads those files, watches for changes, and streams updates to your browser via SSE. No database. No auth. No cloud. Just files.
32
+ ```bash
33
+ # Zero-install — always gets the latest version
34
+ npx -y claudedash@latest start
28
35
 
29
- **Important:** Claude Code only writes task files when TodoWrite is actively used. To ensure your sessions always appear on the dashboard, add this to your project's `CLAUDE.md`:
36
+ # Install lifecycle hooks (recommended)
37
+ claudedash hooks install
30
38
 
31
- ```markdown
32
- You MUST use the TodoWrite tool to track your work.
33
- At the START of any multi-step task, create a todo list with all steps.
34
- Mark each task in_progress before starting, completed after finishing.
39
+ # Set up plan mode for structured task execution
40
+ claudedash init
35
41
  ```
36
42
 
37
- Or run `claudedash init` — it generates a ready-to-use `CLAUDE.md` snippet.
43
+ That's it. The dashboard auto-detects your Claude sessions.
44
+
45
+ ---
46
+
47
+ ## Features
38
48
 
39
- ## Two modes
49
+ - **Live Kanban board** — real-time task status from `~/.claude/tasks/`, updated via SSE within ~100ms
50
+ - **Plan mode** — structured execution with dependencies, acceptance criteria, and blocked-task detection
51
+ - **Context health** — token usage bar per session, warnings at 65% (warn) and 75% (critical)
52
+ - **Quality gates** — lint / typecheck / test results per task with a full timeline history
53
+ - **Worktrees** — map parallel agents across git branches, see dirty/ahead/behind at a glance
54
+ - **Agent API** — `POST /log`, `POST /agent/register`, heartbeat, BLOCKED → instant browser push notification
55
+ - **Hook integration** — PostToolUse/Stop/PreCompact/PostCompact hooks stream every tool call live
56
+ - **Cost tracker** — 5-hour rolling billing block estimate per model, real-time
57
+ - **MCP server** — `get_queue`, `get_sessions`, `get_cost`, `log_task` — Claude can query its own dashboard
58
+ - **Zero infra** — no database, no cloud, reads files from `~/.claude/` directly
40
59
 
41
- | | Live | Plan |
42
- |---|---|---|
43
- | **What** | Watch Claude Code work | Structured project planning |
44
- | **Source** | `~/.claude/tasks/` | `.claudedash/queue.md` |
45
- | **Setup** | None | `npx claudedash init` |
46
- | **Use when** | You want visibility | You want control |
60
+ ---
61
+
62
+ ## Live Mode vs Plan Mode
63
+
64
+ | | **Live Mode** | **Plan Mode** |
65
+ | ----------------- | ------------------------------ | ---------------------------- |
66
+ | **What** | Watch Claude work in real time | Structured project execution |
67
+ | **Source** | `~/.claude/tasks/` | `.claudedash/queue.md` |
68
+ | **Setup** | None | `claudedash init` |
69
+ | **Use when** | Visibility matters | Control matters |
70
+ | **Deps / AC** | — | ✓ Full dependency graph |
71
+ | **Execution log** | — | ✓ `execution.log` |
47
72
 
48
- Live mode is the default. Plan mode adds dependencies, acceptance criteria, and execution tracking on top.
73
+ Live mode is on by default. Both modes can run simultaneously.
74
+
75
+ ---
49
76
 
50
- | Live | Queue | Activity |
51
- |---|---|---|
52
- | ![Live](landing/assets/live.png) | ![Queue](landing/assets/queue.png) | ![Activity](landing/assets/activitiy.mp4) |
77
+ ## Screenshots
78
+
79
+ <table>
80
+ <tr>
81
+ <td align="center" width="50%">
82
+ <img src="landing/assets/live.png" alt="Live View" /><br/>
83
+ <sub><b>Live View</b> — Session Kanban + context health per agent</sub>
84
+ </td>
85
+ <td align="center" width="50%">
86
+ <img src="landing/assets/queue.png" alt="Queue" /><br/>
87
+ <sub><b>Queue</b> — Plan mode task board with dependency graph</sub>
88
+ </td>
89
+ </tr>
90
+ <tr>
91
+ <td align="center" width="50%">
92
+ <img src="landing/assets/worktrees.png" alt="Worktrees" /><br/>
93
+ <sub><b>Worktrees</b> — Parallel agents across git branches</sub>
94
+ </td>
95
+ <td align="center" width="50%">
96
+ <img src="landing/assets/activity.gif" alt="Activity" /><br/>
97
+ <sub><b>Activity</b> — Tool analytics + full prompt history</sub>
98
+ </td>
99
+ </tr>
100
+ <tr>
101
+ <td align="center" width="50%">
102
+ <img src="landing/assets/config.png" alt="Config" /><br/>
103
+ <sub><b>Config</b> — Hook setup, port, token management</sub>
104
+ </td>
105
+ <td align="center" width="50%">
106
+ <img src="landing/assets/docs.png" alt="Docs" /><br/>
107
+ <sub><b>Docs</b> — Built-in reference for API + plan mode</sub>
108
+ </td>
109
+ </tr>
110
+ </table>
53
111
 
54
- | Worktrees | Config | Docs |
55
- |---|---|---|
56
- | ![Worktrees](landing/assets/worktrees.png) | ![Config](landing/assets/config.png) | ![Docs](landing/assets/docs.png) |
112
+ ---
57
113
 
58
114
  ## Install
59
115
 
@@ -66,9 +122,11 @@ npm i -g claudedash
66
122
  claudedash start
67
123
  ```
68
124
 
69
- ### Plan mode
125
+ ---
126
+
127
+ ## Plan Mode
70
128
 
71
- For structured project execution with task dependencies and acceptance criteria.
129
+ Initialize in your project:
72
130
 
73
131
  ```bash
74
132
  claudedash init
@@ -76,155 +134,133 @@ claudedash init
76
134
 
77
135
  This creates `.claudedash/` with:
78
136
 
79
- | File | Purpose |
80
- |---|---|
81
- | `queue.md` | Your task list — slices, dependencies, AC |
82
- | `workflow.md` | Execution protocol your agent follows |
83
- | `execution.log` | Agent logs DONE/FAILED/BLOCKED here |
84
- | `config.json` | Heading patterns, port, field definitions |
85
- | `CLAUDE.md` | Paste into your project's CLAUDE.md |
137
+ | File | Purpose |
138
+ | --------------- | ----------------------------------------------------- |
139
+ | `queue.md` | Task list — slices, dependencies, acceptance criteria |
140
+ | `workflow.md` | Execution protocol for your agent |
141
+ | `execution.log` | Agent logs `DONE` / `FAILED` / `BLOCKED` here |
142
+ | `CLAUDE.md` | Paste into your project's `CLAUDE.md` |
86
143
 
87
- Then:
144
+ **queue.md format:**
88
145
 
89
- 1. Edit `queue.md` with your actual tasks
90
- 2. Copy `CLAUDE.md` contents into your project's CLAUDE.md
91
- 3. Tell your agent: *"follow .claudedash/workflow.md, start with S1-T1"*
92
- 4. Run `claudedash start` and watch the dashboard
93
-
94
- ## CLI
95
-
96
- ```bash
97
- claudedash start # Auto-detect modes, open dashboard
98
- claudedash start --claude-dir /path # Custom Claude directory
99
- claudedash start -p 3000 # Custom port
100
- claudedash start --host 0.0.0.0 # Expose to network (shows warning)
101
- claudedash start --token <secret> # Enable token auth for sharing
102
- claudedash init # Init plan mode in current dir
103
- claudedash recover # Summarize last session after /clear
104
- claudedash spec # Create spec-mode templates
105
- claudedash worktree create <branch> # Create isolated worktree
106
- ```
146
+ ```markdown
147
+ # Slice S1
107
148
 
108
- ## Sharing with your team
149
+ ## S1-T1
109
150
 
110
- By default, claudedash only listens on `127.0.0.1` (localhost). To share the dashboard with a teammate:
151
+ Area: Backend
152
+ Depends: -
153
+ Description: Setup database schema
154
+ AC: Tables created, migrations run
111
155
 
112
- ```bash
113
- # 1. Start with a secret token
114
- claudedash start --token mysecret123
156
+ ## S1-T2
115
157
 
116
- # Or use an environment variable
117
- CLAUDEDASH_TOKEN=mysecret123 claudedash start
158
+ Area: Backend
159
+ Depends: S1-T1
160
+ Description: Implement user auth
161
+ AC: Login and registration working
118
162
  ```
119
163
 
120
- Your teammate can then open the dashboard with the token in the URL:
164
+ Tell your agent:
121
165
 
122
166
  ```
123
- http://your-host:4317?token=mysecret123
167
+ Follow .claudedash/workflow.md, start with S1-T1.
124
168
  ```
125
169
 
126
- Or pass it as a header:
170
+ ---
171
+
172
+ ## CLI
173
+
174
+ | Command | Description |
175
+ | ----------------------------------- | ----------------------------------------- |
176
+ | `claudedash start` | Start dashboard (auto-detect modes) |
177
+ | `claudedash start -p 3000` | Custom port |
178
+ | `claudedash start --token <secret>` | Enable auth token |
179
+ | `claudedash init` | Init plan mode in current directory |
180
+ | `claudedash hooks install` | Install PostToolUse/Stop/PreCompact hooks |
181
+ | `claudedash status` | Single-line terminal summary (no browser) |
182
+ | `claudedash doctor` | Check setup: hooks, port, version, queue |
183
+ | `claudedash recover` | Summarize last session after `/clear` |
184
+
185
+ ---
186
+
187
+ ## Sharing with Your Team
188
+
189
+ By default claudedash listens on `127.0.0.1` only.
127
190
 
128
191
  ```bash
129
- curl -H "Authorization: Bearer mysecret123" http://your-host:4317/sessions
192
+ # Start with a token
193
+ claudedash start --token mysecret123
194
+
195
+ # Or via env
196
+ CLAUDEDASH_TOKEN=mysecret123 claudedash start
130
197
  ```
131
198
 
132
- > **Security:** Never commit your token to git. Use `.env` and add it to `.gitignore`. Consider using a local tunnel like [ngrok](https://ngrok.com) or [cloudflared](https://github.com/cloudflare/cloudflared) rather than exposing `--host 0.0.0.0` directly.
199
+ Team access: `http://your-host:4317?token=mysecret123`
200
+
201
+ > **Tip:** Use a tunnel instead of exposing `--host 0.0.0.0`:
133
202
  >
134
203
  > ```bash
135
- > # Share via tunnel without network exposure
136
204
  > claudedash start --token $(openssl rand -hex 16)
137
205
  > ngrok http 4317
138
206
  > ```
139
207
 
140
- ## Queue format (Plan mode)
208
+ ---
141
209
 
142
- ```markdown
143
- # Slice S1
210
+ ## Advanced Features
144
211
 
145
- ## S1-T1
146
- Area: Backend
147
- Depends: -
148
- Description: Setup database schema
149
- AC: Tables created and migrations run
212
+ ### Context Health
150
213
 
151
- ## S1-T2
152
- Area: Backend
153
- Depends: S1-T1
154
- Description: Implement user authentication
155
- AC: Login and registration endpoints working
156
- ```
214
+ Color-coded token usage per session — green → yellow → red at 65% / 75%.
215
+ [Context Health docs](docs/context-health.md)
157
216
 
158
- Validates: required fields, duplicate IDs, unknown deps, circular deps.
217
+ ### Quality Gates
159
218
 
160
- ## Execution log (Plan mode)
219
+ Log `lint`, `typecheck`, `test` results per task via `meta.quality` in `execution.log`.
220
+ See ✅/❌ inline in each card, with full timeline.
221
+ → [Quality Gates docs](docs/quality-gates.md)
161
222
 
162
- Append-only JSONL:
223
+ ### Worktrees
163
224
 
164
- ```json
165
- {"task_id":"S1-T1","status":"DONE","timestamp":"2026-02-16T14:31:22Z","agent":"claude"}
166
- {"task_id":"S1-T2","status":"FAILED","timestamp":"2026-02-16T14:33:10Z","agent":"claude","meta":{"reason":"timeout"}}
167
- {"task_id":"S1-T3","status":"BLOCKED","reason":"API key missing","timestamp":"2026-02-16T14:35:00Z","agent":"claude"}
168
- ```
225
+ Running agents across multiple git branches? The Worktrees tab maps sessions to branches by `cwd`, shows dirty/ahead/behind state, and lists which tasks are running where. Native support for `claude --worktree <name>` (creates `.claude/worktrees/<name>/`).
226
+ → [Worktree docs](docs/worktrees.md)
169
227
 
170
- ## Observability Features
228
+ ### MCP Server
171
229
 
172
- ### Quality Gates
230
+ Claude can query its own dashboard:
173
231
 
174
- Track lint, typecheck, and test results per task and view them as a timeline in the Plan mode dashboard.
175
-
176
- Log quality results in `execution.log`:
177
-
178
- ```json
179
- {
180
- "task_id": "F1-2",
181
- "status": "DONE",
182
- "timestamp": "2026-02-18T12:05:00Z",
183
- "agent": "claude",
184
- "meta": {
185
- "file": "src/core/logParser.ts",
186
- "quality": { "lint": true, "typecheck": true, "test": false }
187
- }
188
- }
232
+ ```bash
233
+ claude mcp add claudedash -- npx -y claudedash@latest mcp
189
234
  ```
190
235
 
191
- Select any task in Plan mode to see its quality check history with pass/fail badges. → [Quality Gates docs](docs/quality-gates.md)
236
+ Tools: `get_queue`, `get_sessions`, `get_cost`, `get_history`, `log_task`, `create_task`, `register_agent`, `send_heartbeat`.
192
237
 
193
- ### Context Health
194
-
195
- See how much of Claude's context window each session is using, with color-coded warnings at 65% (warn) and 75% (critical).
196
-
197
- - Session cards show a compact `72%` indicator
198
- - Selected session shows a full progress bar in the token header
199
- - A header banner appears when any session crosses warn/critical level
200
-
201
- → [Context Health docs](docs/context-health.md) | [Estimation methodology](docs/context-estimation.md)
238
+ ---
202
239
 
203
- ### Worktree Observability
240
+ ## API
204
241
 
205
- When running agents across multiple git worktrees in parallel, the new **Worktrees** tab shows:
242
+ | Endpoint | Description |
243
+ | --------------------------- | ------------------------------------ |
244
+ | `GET /health` | Status, modes, connected clients |
245
+ | `GET /sessions` | All sessions with context health |
246
+ | `GET /sessions/:id/context` | Session JSONL summary |
247
+ | `GET /events` | SSE stream |
248
+ | `GET /snapshot` | Plan mode state |
249
+ | `GET /queue` | Computed task statuses |
250
+ | `GET /worktrees` | Git worktrees with task associations |
251
+ | `GET /billing-block` | Current 5h billing window |
252
+ | `GET /cost` | Estimated cost by model |
253
+ | `POST /log` | Log task result |
254
+ | `POST /plan/task` | Add task to queue.md |
255
+ | `POST /agent/register` | Register an agent |
206
256
 
207
- - Branch name and HEAD commit per worktree
208
- - Dirty/clean status (uncommitted changes)
209
- - Ahead/behind commits relative to upstream
210
- - Which agent tasks are running in each worktree
257
+ ---
211
258
 
212
- [Worktree docs](docs/worktrees.md)
259
+ ## Stack
213
260
 
214
- ## API
261
+ TypeScript · Fastify · chokidar · SSE · Next.js 16 · Tailwind CSS · Vitest
215
262
 
216
- | Endpoint | Description |
217
- |---|---|
218
- | `GET /health` | Status + available modes + `connectedClients` + `lastSessions` |
219
- | `GET /sessions` | All Claude Code sessions (includes `contextHealth`) |
220
- | `GET /sessions/:id` | Tasks for a session |
221
- | `GET /events` | SSE stream |
222
- | `GET /snapshot` | Plan mode state |
223
- | `GET /quality-timeline` | Quality check events (filter with `?taskId=` or `?file=`) |
224
- | `GET /worktrees` | Git worktrees with task associations |
225
- | `GET /claude-insights` | Claude usage report (sandboxed HTML) |
226
- | `POST /plan/task` | Add a task to queue.md |
227
- | `PATCH /plan/task/:id` | Update task status (DONE / BLOCKED / FAILED) |
263
+ ---
228
264
 
229
265
  ## Development
230
266
 
@@ -233,19 +269,18 @@ git clone https://github.com/yunusemrgrl/claudedash.git
233
269
  cd claudedash && npm install
234
270
  cd dashboard && npm install && cd ..
235
271
 
236
- npm run build # Build core + dashboard
237
- npm test # 165 tests
238
- npm run dev # Dev server with watch
272
+ npm run build # Build core + dashboard
273
+ npm test # Run tests
274
+ npm run dev # Dev server with watch
239
275
  ```
240
276
 
241
- ## Stack
242
-
243
- TypeScript, Fastify, chokidar, SSE, Next.js, Tailwind, Vitest.
277
+ ---
244
278
 
245
279
  ## Contributing
246
280
 
247
- PRs welcome. Open an issue first for anything beyond small fixes. See [CHANGELOG.md](CHANGELOG.md) for release history.
281
+ PRs welcome. Open an issue first for anything beyond small fixes.
282
+ See [CHANGELOG.md](CHANGELOG.md) for release history.
248
283
 
249
284
  ## License
250
285
 
251
- MIT
286
+ MIT — not affiliated with Anthropic.
package/dist/cli.js CHANGED
@@ -8,7 +8,7 @@ const program = new Command();
8
8
  program
9
9
  .name('claudedash')
10
10
  .description('Live Kanban, quality gates and context health monitoring for Claude Code agents')
11
- .version('1.1.18');
11
+ .version('1.1.20');
12
12
  program
13
13
  .command('init')
14
14
  .description('Initialize claudedash in current directory')
@@ -77,6 +77,17 @@ Each task from \`queue.md\` is processed through these phases.
77
77
 
78
78
  ---
79
79
 
80
+ ## Phase 0 — BOOTSTRAP (run once at session start)
81
+
82
+ 1. Read \`.claudedash/CLAUDE.md\` — mandatory project rules (TodoWrite, MCP tools, pre-commit checklist).
83
+ 2. Read \`.claudedash/queue.md\` — full task list.
84
+ 3. Read \`.claudedash/execution.log\` — understand what is already DONE/FAILED/BLOCKED.
85
+ 4. Identify all READY tasks: dependencies satisfied, not yet in execution.log as DONE.
86
+
87
+ If claudedash MCP is configured (\`claude mcp list\` shows \`claudedash\`), use \`get_queue\` instead of reading files manually.
88
+
89
+ ---
90
+
80
91
  ## Phase 1 — INTAKE
81
92
 
82
93
  Read the next READY task from \`.claudedash/queue.md\`.
@@ -91,37 +102,31 @@ Read the next READY task from \`.claudedash/queue.md\`.
91
102
 
92
103
  Implement the task.
93
104
 
94
- 1. Read the task description and acceptance criteria.
105
+ 1. Read the task description and acceptance criteria carefully.
95
106
  2. Identify affected files using the codebase.
96
107
  3. Implement the change. Follow existing conventions.
97
- 4. Run relevant tests/linters to verify.
108
+ 4. Run relevant tests/linters to verify the AC is met.
98
109
 
99
110
  ---
100
111
 
101
- ## Phase 3 — LOG
112
+ ## Phase 3 — VERIFY (mandatory before logging DONE)
102
113
 
103
- Record the result. **Preferred: HTTP** (when claudedash server is running). **Fallback: file** (append to execution.log directly).
114
+ Run the full pre-commit checklist. Never skip.
104
115
 
105
- ### Option A — HTTP (preferred when server is running on port 4317)
116
+ \`\`\`
117
+ npm run lint # 0 errors required
118
+ npx tsc --noEmit # server/CLI types
119
+ cd dashboard && npx tsc --noEmit && cd .. # dashboard types
120
+ npm run build # full build must succeed
121
+ \`\`\`
106
122
 
107
- \`\`\`bash
108
- # Success
109
- curl -sf -X POST http://localhost:4317/log \\
110
- -H 'Content-Type: application/json' \\
111
- -d '{"task_id":"S1-T1","status":"DONE","agent":"claude"}' || true
123
+ If any step fails: fix it, re-run, then proceed to Phase 4.
112
124
 
113
- # Failure
114
- curl -sf -X POST http://localhost:4317/log \\
115
- -H 'Content-Type: application/json' \\
116
- -d '{"task_id":"S1-T1","status":"FAILED","agent":"claude","reason":"tests failing"}' || true
125
+ ---
117
126
 
118
- # Blocked (triggers real-time browser notification)
119
- curl -sf -X POST http://localhost:4317/log \\
120
- -H 'Content-Type: application/json' \\
121
- -d '{"task_id":"S1-T1","status":"BLOCKED","agent":"claude","reason":"missing API key"}' || true
122
- \`\`\`
127
+ ## Phase 4 LOG
123
128
 
124
- ### Option B File (fallback, append one JSON line)
129
+ Append result to \`.claudedash/execution.log\` (one JSON line):
125
130
 
126
131
  Success:
127
132
  \`\`\`json
@@ -138,22 +143,11 @@ Blocked:
138
143
  {"task_id":"S1-T1","status":"BLOCKED","reason":"missing API key","timestamp":"2026-01-15T10:30:00Z","agent":"claude"}
139
144
  \`\`\`
140
145
 
141
- ---
142
-
143
- ## Phase 3b — CHECK QUEUE (optional, when server is running)
144
-
145
- Get computed task statuses with dependency resolution:
146
-
147
- \`\`\`bash
148
- curl -sf http://localhost:4317/queue
149
- # Returns: { tasks: [...], summary: { total, done, failed, blocked, ready } }
150
- \`\`\`
151
-
152
- Use this instead of manually parsing queue.md + execution.log.
146
+ If claudedash MCP is configured, use \`log_task\` tool instead of writing the file directly.
153
147
 
154
148
  ---
155
149
 
156
- ## Phase 4 — NEXT
150
+ ## Phase 5 — NEXT
157
151
 
158
152
  Pick the next READY task and return to Phase 1.
159
153
  If no READY tasks remain, stop and report summary.
@@ -163,10 +157,12 @@ If no READY tasks remain, stop and report summary.
163
157
  ## Rules
164
158
 
165
159
  1. One task at a time. Finish before starting next.
166
- 2. Always log to execution.log never skip Phase 3.
167
- 3. If stuck after 2 attempts, log FAILED and move on.
168
- 4. Do not modify queue.md it is read-only for the agent.
169
- 5. Use \`new Date().toISOString()\` for timestamps.
160
+ 2. Always run Phase 3 (verify) before Phase 4 (log). Never log DONE without a passing build.
161
+ 3. Always log to execution.log never skip Phase 4.
162
+ 4. If stuck after 2 attempts, log FAILED and move on.
163
+ 5. Do not modify queue.md — it is read-only for the agent.
164
+ 6. Use \`new Date().toISOString()\` for timestamps.
165
+ 7. Use TodoWrite to track progress — the user monitors the live dashboard.
170
166
  `;
171
167
  writeFileSync(join(claudeWatchDir, 'workflow.md'), workflowTemplate);
172
168
  console.log('✓ Created workflow.md');