intent-engine 0.11.1

A command-line database service for tracking strategic intent, tasks, and events
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
# Intent-Engine Dashboard User Guide

**Version**: 0.10.x

---

## Overview

The Intent-Engine Dashboard is a web-based interface for visualizing and managing your tasks and events. It complements the CLI, providing a rich visual experience with Markdown rendering, real-time search, and intuitive task management.

### Key Features

- **Task Management**: Create, update, delete, and organize tasks
- **Markdown Support**: Rich text rendering with code highlighting
- **Hierarchical Tasks**: Parent-child relationships with subtasks
- **Event Tracking**: Record decisions, blockers, milestones, and notes
- **Smart Search**: Unified search across tasks and events
- **Focus-Driven Workflow**: Start, switch, and complete tasks
- **Multi-Project Support**: Manage multiple projects simultaneously

---

## Quick Start

### 1. Start the Dashboard

Navigate to your project directory and start the dashboard:

```bash
cd /path/to/your/project
ie dashboard start
```

The dashboard will automatically:
- Detect the project database (`.intent-engine/project.db`)
- Use the fixed port 11391
- Display the URL to access

Example output:
```
Dashboard starting for project: my-project
  Port: 11391
  URL: http://localhost:11391
  Mode: background

Dashboard server started successfully
   PID: 12345
   URL: http://localhost:11391

Dashboard is accessible from external IPs. Access via:
    - http://localhost:11391 (local)
    - http://<your-ip>:11391 (from other devices)

Tip: Use 'ie dashboard status' to check server status
Tip: Use 'ie dashboard stop' to stop the server
```

### 2. Access the Dashboard

Open your web browser and navigate to the URL shown (e.g., `http://localhost:11391`).

**Network Access**:
- Local access: `http://localhost:11391`
- From other devices: `http://<your-machine-ip>:11391` (e.g., from Windows host when running in WSL)

**Security Notice**: The Dashboard is accessible from your local network. There is no authentication currently. Only run the Dashboard on trusted networks.

You'll see the Dashboard interface with:
- **Left Sidebar**: Task list with filters
- **Main Panel**: Task details and operations
- **Right Sidebar**: Event history

### 3. Stop the Dashboard

To stop the dashboard server:

```bash
ie dashboard stop
```

Or, if running in foreground mode (with `--foreground` flag):
- Press `Ctrl+C` in the terminal

---

## Dashboard Interface

### Header

The header contains:
- **Project Name**: Currently active project
- **New Task**: Create a new top-level task
- **Current Focus**: Jump to the currently focused task
- **Pick Next**: Get a smart recommendation for the next task

### Left Sidebar: Task List

#### Search Bar
- Type to search across tasks and events
- Results update as you type (300ms debounce)
- Supports full-text search with operators (`AND`, `OR`, `NOT`)

#### Filter Buttons
- **All**: Show all tasks
- **Todo**: Show only tasks in "todo" status
- **Doing**: Show only tasks in "doing" status
- **Done**: Show only completed tasks

#### Task Cards
Each task card displays:
- **Task ID**: `#42`
- **Task Name**: Truncated if too long
- **Status Badge**: Color-coded (yellow/blue/green)
- **Priority Badge**: Critical/High/Medium/Low (if set)
- **Parent Indicator**: "Parent: #10" if task has a parent

**Active Task**: The currently focused task is highlighted with a blue background.

### Main Panel: Task Details

When you select a task, the main panel shows:

#### Task Header
- **Task ID** and **Name**
- **Status Badge**: Current status
- **Priority Badge**: If set
- **Parent Link**: Clickable link to parent task

#### Action Buttons

**For Todo Tasks**:
- **Start Task**: Begin working on this task (sets focus)

**For Doing Tasks**:
- **Complete Task**: Mark task as done (focus-driven, no ID needed)
- **Spawn Subtask**: Create a child task and switch to it

**For All Tasks**:
- **Switch to This**: Change focus to this task
- **Add Event**: Record a decision, blocker, milestone, or note
- **Delete**: Remove the task (only if no subtasks)

#### Specification Section
- Rendered Markdown with:
  - Headings, lists, tables
  - Code blocks with syntax highlighting
  - Blockquotes, links, images
  - Safe HTML (XSS protection via DOMPurify)

#### Metadata Section
Displays timestamps:
- **Created**: When task was first created (`first_todo_at`)
- **Started**: When task was first started (`first_doing_at`)
- **Completed**: When task was completed (`first_done_at`)

### Right Sidebar: Event History

Shows events related to the current task:

#### Event Types
- **Decision**: Important decisions and their rationale
- **Blocker**: Problems preventing progress
- **Milestone**: Significant achievements
- **Note**: General observations and comments

Each event card shows:
- **Type Badge**: Color-coded by type
- **Timestamp**: When the event was logged
- **Content**: Rendered Markdown

---

## Common Workflows

### Create a New Task

**Via Dashboard:**
1. Click **+ New Task** in the header
2. Fill in the form:
   - **Name** (required): Brief task description
   - **Specification** (optional): Detailed description in Markdown
   - **Priority** (optional): Critical/High/Medium/Low
   - **Parent Task ID** (optional): ID of parent task
3. Click **Create Task**

**Via CLI:**
```bash
echo '{"tasks":[{
  "name": "Implement feature X",
  "status": "doing",
  "spec": "## Goal\nImplement feature X\n\n## Approach\n- Step 1\n- Step 2"
}]}' | ie plan
```

The new task appears in the task list and opens automatically.

### Work on a Task

#### Start a Task
1. Find the task in the list
2. Click to open details
3. Click **Start Task**

The task status changes to "doing" and becomes the current focus.

#### Add Events During Work
While working on a task, record important information:

1. Click **Add Event**
2. Select event type:
   - **Decision**: "Chose JWT over sessions because..."
   - **Blocker**: "Blocked by missing API keys"
   - **Milestone**: "Completed authentication module"
   - **Note**: "Found useful reference: https://..."
3. Write content in Markdown
4. Click **Add Event**

**Via CLI:**
```bash
ie log decision "Chose JWT over sessions for stateless API"
ie log blocker "Waiting for API credentials"
ie log milestone "Authentication module complete"
ie log note "Consider adding rate limiting"
```

Events appear in the right sidebar chronologically.

#### Complete the Task
1. Ensure the task is your current focus
2. Click **Complete Task**

**Via CLI:**
```bash
echo '{"tasks":[{"name": "Task name", "status": "done"}]}' | ie plan
```

The task status changes to "done" and focus is cleared.

**Note**: You cannot complete a task that has incomplete subtasks.

### Break Down a Large Task

For complex tasks, create subtasks:

**Via Dashboard:**
1. Start the parent task (must be focused)
2. Click **Spawn Subtask**
3. Enter:
   - **Subtask Name**: Specific sub-goal
   - **Specification** (optional): Details
4. Submit

**Via CLI:**
```bash
# Subtasks auto-parent to the currently focused task
echo '{"tasks":[
  {"name": "Subtask 1", "status": "todo"},
  {"name": "Subtask 2", "status": "todo"}
]}' | ie plan
```

The subtask is created and **automatically becomes the new focus**.

### Search for Information

#### Quick Search
1. Type in the search bar (left sidebar)
2. View results as you type
3. Click a task to view details

**Via CLI:**
```bash
ie search "todo doing"           # Find unfinished tasks
ie search "JWT authentication"   # Full-text search
```

#### Advanced Search
Use the API directly for advanced queries:
```bash
# Search with operators
curl "http://127.0.0.1:11391/api/search?query=JWT+AND+authentication"

# Search events only
curl "http://127.0.0.1:11391/api/search?query=blocker&include_tasks=false"
```

### Get Task Recommendations

Click **Pick Next** in the header to get a smart recommendation based on:
- **Depth-First**: Subtasks of current task (if any)
- **Priority**: Higher priority tasks first
- **Age**: Older tasks first (among same priority)

The recommended task opens automatically.

---

## Multi-Project Support

### Managing Multiple Projects

You can run dashboards for multiple projects simultaneously:

```bash
# Project A
cd /path/to/project-a
ie dashboard start
# Runs on port 11391

# Project B (custom port required if Project A is running)
cd /path/to/project-b
ie dashboard start --port 11392
# Runs on custom port 11392

# Project C (custom port required)
cd /path/to/project-c
ie dashboard start --port 11393
# Runs on custom port 11393
```

### Check Running Dashboards

```bash
ie dashboard status
```

### Stop a Specific Dashboard

```bash
# Stop dashboard in current directory
cd /path/to/project-a
ie dashboard stop

# Or stop by port
ie dashboard stop --port 11391
```

---

## Tips and Best Practices

### Writing Good Specifications

Use Markdown to make specs readable:

````markdown
## Goal
Add JWT-based authentication to the API.

## Requirements
- Login endpoint: `POST /auth/login`
- Token refresh: `POST /auth/refresh`
- Logout: `POST /auth/logout`

## Technical Notes
```javascript
// Example token payload
{
  "user_id": 123,
  "email": "user@example.com",
  "exp": 1234567890
}
```

## Acceptance Criteria
- [ ] Users can log in with email/password
- [ ] Tokens expire after 1 hour
- [ ] Refresh tokens work for 7 days
````

### Using Events Effectively

**Decisions**: Record the "why" behind choices
```markdown
**Decision**: Use HS256 for JWT signing

**Rationale**:
- Simpler than RS256 (no key pair management)
- Sufficient for our single-server setup
- Can upgrade to RS256 if we add microservices
```

**Blockers**: Be specific about what's blocking you
```markdown
**Blocked by**: Missing AWS credentials

**Details**:
- Need S3 access keys for file upload feature
- Requested from DevOps team (Ticket #456)
- ETA: 2 days
```

**Milestones**: Celebrate progress
```markdown
**Milestone**: Authentication module complete

**Achievement**:
- Login/logout working
- Token refresh implemented
- All tests passing (12/12)
- Documentation updated
```

---

## Troubleshooting

### Dashboard Won't Start

**Error**: `Database not found`

**Solution**: Make sure you're in an Intent-Engine project directory:
```bash
# Initialize project first
ie init

# Then start dashboard
ie dashboard start
```

**Error**: `Port 11391 already in use`

**Solution**: Use a different port:
```bash
ie dashboard start --port 11392
```

Or stop the existing dashboard:
```bash
ie dashboard stop
```

### Page Not Loading

1. **Check server is running**:
   ```bash
   ie dashboard status
   ```

2. **Check network access**:
   - Dashboard binds to `0.0.0.0` (accessible from network)
   - Verify firewall allows port 11391 if accessing from external devices
   - Test local access first: `http://localhost:11391`

3. **Try another browser**:
   - Tested: Chrome, Firefox, Safari, Edge

### Task Not Appearing

1. **Refresh the page**: No auto-reload currently
2. **Check filters**: Make sure you're not filtering it out
3. **Search for it**: Use the search bar to find the task

### Can't Complete Task

**Error**: "Task has incomplete subtasks"

**Solution**: Complete all subtasks first, then the parent:
```bash
# Via CLI - find subtasks
ie search "todo doing"

# Start and complete subtasks
echo '{"tasks":[{"name": "Subtask 1", "status": "doing", "spec": "..."}]}' | ie plan
# ... work on it ...
echo '{"tasks":[{"name": "Subtask 1", "status": "done"}]}' | ie plan

# Now complete parent
echo '{"tasks":[{"name": "Parent task", "status": "done"}]}' | ie plan
```

### Performance Issues

**Problem**: Slow page load with 500+ tasks

**Workaround**:
- Use filters (Todo/Doing) instead of "All"
- Search for specific tasks instead of browsing
- Clean up old completed tasks

---

## Known Limitations

1. **No Real-Time Updates**
   - Manual page refresh required after CLI changes

2. **No Authentication**
   - **Security Warning**: Dashboard is accessible from your local network without authentication
   - Binds to `0.0.0.0` (all network interfaces) for development convenience
   - **Not suitable for untrusted networks or multi-user setups**
   - **Recommendation**: Only run on trusted networks (e.g., home network, private VPN)

3. **Basic Error Handling**
   - Errors shown via browser alerts

4. **No Undo/Redo**
   - Deletes are permanent
   - Be careful when deleting tasks

5. **Performance with Large Datasets**
   - No pagination (loads all tasks)
   - May slow down with 1000+ tasks

### Workarounds

- Use CLI for bulk operations
- Regularly archive completed tasks
- Use search instead of browsing large lists

---

## Browser Compatibility

### Tested Browsers

- Chrome 120+
- Firefox 121+
- Safari 17+
- Edge 120+

### Required Features

- ES6 JavaScript
- Fetch API
- CSS Grid
- LocalStorage (for future features)

---

## Integration with CLI

### Data Sync

Both interfaces (Dashboard and CLI) share the same database:

```
.intent-engine/project.db
         |
    +----+----+
    |         |
Dashboard    CLI
```

Changes made in one interface are immediately visible in others (after refresh for Dashboard).

### Example Workflow

```bash
# Create task via CLI
echo '{"tasks":[{"name": "Implement feature X", "status": "doing", "spec": "..."}]}' | ie plan

# Refresh Dashboard -> Task appears

# Start task via Dashboard (click button)

# Add event via CLI
ie log decision "Using approach A"

# Refresh Dashboard -> Event appears

# Complete via CLI
echo '{"tasks":[{"name": "Implement feature X", "status": "done"}]}' | ie plan

# Refresh Dashboard -> Task marked done
```

---

## Getting Help

### Documentation

- **API Reference**: `docs/dashboard-api-reference.md`
- **Architecture**: `docs/archive/web-dashboard-spec.md`
- **CLI Guide**: `docs/en/guide/command-reference-full.md`

### Support

- **Issues**: https://github.com/wayfind/intent-engine/issues

---

## Appendix: Example Screenshots (Text)

### Main Dashboard View
```
+------------------------------------------------------------------+
| Intent-Engine Dashboard          [+] New  [Focus]  [Pick Next]   |
+------------------------------------------------------------------+
|  Search...         |                                              |
| +----------------+ |  Task #42: Implement Authentication         |
| |All|Todo|Doing| | |  Status: doing    Priority: high            |
| +----------------+ |                                              |
|                    |  [Complete] [+ Spawn] [Add Event]            |
| #42 Implement A... |                                              |
| doing | high       |  ## Specification                            |
|                    |  Add JWT-based authentication...             |
| #43 Setup DB       |                                              |
| todo               |  ## Metadata                                 |
|                    |  Created: 2025-11-16 12:00                   |
| #44 Write Tests    |  Started: 2025-11-16 13:00                   |
| todo               |                                              |
+--------------------+----------------------------------------------+
```

---

**Last Updated**: 2025-12-29