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
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
# Intent-Engine User Guide

**Version**: 0.11.0
**Last Updated**: 2026-03-09

---

## Table of Contents

1. [What is Intent-Engine?]#what-is-intent-engine
2. [Installation]#installation
3. [Quick Start]#quick-start
4. [Core Concepts]#core-concepts
5. [Command Reference]#command-reference
6. [Task Lifecycle]#task-lifecycle
7. [Validation Rules]#validation-rules
8. [Best Practices]#best-practices
9. [Integration Guide]#integration-guide
10. [Troubleshooting]#troubleshooting
11. [FAQ]#faq

---

## What is Intent-Engine?

Intent-Engine is an **AI-native task management system** designed for persistent, hierarchical task tracking across sessions. Unlike ephemeral todo lists, Intent-Engine:

- **Persists across sessions** - Never lose your work context
- **Supports hierarchical tasks** - Break down complex work into subtrees
- **Records decisions** - Track *why* you made choices, not just *what* you did
- **Integrates with AI assistants** - Built for Claude Code, Claude Desktop, and other AI tools

### When to Use Intent-Engine

| Scenario | Use Intent-Engine? |
|----------|-------------------|
| Multi-session project work | ✅ Yes |
| Complex task with 3+ subtasks | ✅ Yes |
| Need to record decisions/rationale | ✅ Yes |
| Simple one-off task | ❌ Use TodoWrite |
| Quick fix, no context needed | ❌ Use TodoWrite |

**Rule of thumb**: If losing the task context would be a shame, use Intent-Engine.

---

## Installation

### Option 1: Cargo (Recommended)
```bash
cargo install intent-engine
```

### Option 2: npm
```bash
npm install -g @origintask/intent-engine
```

### Option 3: Homebrew (macOS)
```bash
brew install wayfind/tap/intent-engine
```

### Verify Installation
```bash
ie --version
ie doctor  # Check system health
```

---

## Quick Start

### 1. Initialize a Project
```bash
cd /path/to/your/project
ie init
```

### 2. Create Your First Task
```bash
echo '{"tasks":[{
  "name":"My First Task",
  "status":"doing",
  "spec":"Learning how to use Intent-Engine"
}]}' | ie plan
```

### 3. Check Status
```bash
ie status
```

### 4. Complete the Task
```bash
echo '{"tasks":[{"name":"My First Task","status":"done"}]}' | ie plan
```

---

## Core Concepts

### Focus-Driven Workflow

Intent-Engine uses a **focus model** where one task is "current" at any time:

```
┌─────────────────────────────────┐
│  Current Focus: Task #42        │
│  "Implement authentication"     │
└─────────────────────────────────┘
    ┌────┴────┐
    ▼         ▼
 Task #43   Task #44
 "JWT"      "OAuth"
```

- **Focus** (`current_task_id`): The task you're actively working on
- **Subtasks**: Child tasks automatically inherit focus context
- **Auto-parenting**: New tasks become children of the focused task

### Task States

| State | Symbol | Description |
|-------|--------|-------------|
| `todo` | 📋 | Planned, not started |
| `doing` | 🔨 | In progress (requires description) |
| `done` || Completed (requires all children done) |

### Hierarchical Structure

Tasks can have parent-child relationships:

```
Project Refactor (doing)
├── Design Phase (done)
│   ├── Define API schema (done)
│   └── Write specifications (done)
├── Implementation (doing)    ← Current focus
│   ├── Backend API (doing)
│   └── Frontend UI (todo)
└── Testing (todo)
```

---

## Command Reference

### ie status

View current task context and focus.

```bash
ie status           # Show focused task
ie status 42        # Show specific task #42
ie status --format json  # JSON output
```

**Output includes**:
- Current focused task details
- Ancestor chain (parent hierarchy)
- Sibling tasks (same level)
- Descendant tasks (children and below)

### ie task (v0.11+)

Single-task CRUD operations. Preferred for individual task management.

```bash
# Create
ie task create "Task name"
ie task create "Subtask" --parent 42
ie task create "Task" --status doing --priority high

# Read
ie task get 42
ie task get 42 --with-context    # Include ancestor/event context
ie task list                     # List all tasks
ie task list --status todo       # Filter by status
ie task list --tree              # Show as tree

# Update
ie task update 42 --status doing
ie task update 42 --priority critical
ie task update 42 --metadata type=epic
ie task update 42 --spec "## Goal\n..."

# Focus
ie task start 42                 # Set doing + focus
ie task done                     # Complete focused task
ie task done 42                  # Complete specific task
ie task next                     # Suggest next task to work on

# Delete
ie task delete 42
ie task delete 42 --cascade      # Delete task and all children
```

**`ie task` vs `ie plan`**: Use `ie task` for single operations. Use `ie plan` for batch create/update via JSON stdin.

### ie plan

The universal command for all task operations. Accepts JSON via stdin.

#### Create Tasks
```bash
echo '{"tasks":[{"name":"Task Name","status":"todo"}]}' | ie plan
```

#### Start a Task (requires spec)
```bash
echo '{"tasks":[{
  "name":"Task Name",
  "status":"doing",
  "spec":"## Goal\nWhat you want to achieve\n\n## Approach\nHow you plan to do it"
}]}' | ie plan
```

#### Complete a Task
```bash
echo '{"tasks":[{"name":"Task Name","status":"done"}]}' | ie plan
```

#### Create Hierarchy
```bash
echo '{"tasks":[{
  "name":"Parent Task",
  "status":"doing",
  "spec":"Parent description",
  "children":[
    {"name":"Child 1","status":"todo"},
    {"name":"Child 2","status":"todo"}
  ]
}]}' | ie plan
```

#### Create Root Task (Ignore Current Focus)
```bash
echo '{"tasks":[{"name":"Independent Task","parent_id":null}]}' | ie plan
```

#### Assign to Specific Parent
```bash
echo '{"tasks":[{"name":"Child Task","parent_id":42}]}' | ie plan
```

#### Include Description from File
```bash
# Create description file
cat > /tmp/spec.md << 'EOF'
## Goal
Implement user authentication

## Approach
- Use JWT tokens
- HS256 algorithm
- 24h expiry
EOF

# Use @file syntax
echo '{"tasks":[{
  "name":"Auth Task",
  "status":"doing",
  "spec":"@file(/tmp/spec.md)"
}]}' | ie plan
# File is auto-deleted after successful execution

# Keep file after execution
echo '{"tasks":[{"name":"Task","spec":"@file(/tmp/spec.md, keep)"}]}' | ie plan
```

### ie log

Record events associated with tasks.

```bash
ie log decision "Chose PostgreSQL for better JSON support"
ie log blocker "Waiting for API credentials from vendor"
ie log milestone "Authentication module complete"
ie log note "Consider adding rate limiting later"

# Log to specific task
ie log decision "message" --task 42
```

**Event Types**:
| Type | Use For |
|------|---------|
| `decision` | Architecture and design choices |
| `blocker` | Impediments and blockers |
| `milestone` | Key achievements |
| `note` | General observations |

### ie search

Search across tasks and events.

```bash
# Status filter (find unfinished tasks)
ie search "todo doing"

# Full-text search
ie search "authentication JWT"

# Boolean operators
ie search "API AND authentication"
ie search "frontend OR backend"

# Output formats
ie search "query" --format json
```

### ie init

Initialize a new Intent-Engine project.

```bash
ie init                    # Current directory
ie init --at /path/to/dir  # Specific directory
```

### ie dashboard

Manage the web dashboard.

```bash
ie dashboard start         # Start dashboard server
ie dashboard stop          # Stop dashboard server
ie dashboard status        # Check dashboard status
```

### ie doctor

Check system health and dependencies.

```bash
ie doctor
```

---

## Task Lifecycle

### Complete Lifecycle Example

```bash
# 1. Create a new feature task
echo '{"tasks":[{
  "name":"User Authentication",
  "status":"doing",
  "spec":"## Goal\nImplement secure user authentication\n\n## Approach\n- JWT tokens\n- Refresh token rotation"
}]}' | ie plan

# 2. Break down into subtasks
echo '{"tasks":[{
  "name":"User Authentication",
  "children":[
    {"name":"Design token schema"},
    {"name":"Implement login endpoint"},
    {"name":"Add token validation middleware"},
    {"name":"Write tests"}
  ]
}]}' | ie plan

# 3. Record decisions as you work
ie log decision "Chose HS256 for JWT signing - simpler key management"
ie log decision "Set access token expiry to 15 minutes for security"

# 4. Complete subtasks one by one
echo '{"tasks":[{"name":"Design token schema","status":"done"}]}' | ie plan
echo '{"tasks":[{"name":"Implement login endpoint","status":"done"}]}' | ie plan

# 5. Note a blocker
ie log blocker "Redis connection issues - investigating"

# 6. Continue and complete remaining subtasks
echo '{"tasks":[{"name":"Add token validation middleware","status":"done"}]}' | ie plan
echo '{"tasks":[{"name":"Write tests","status":"done"}]}' | ie plan

# 7. Complete parent (only works when all children are done)
echo '{"tasks":[{"name":"User Authentication","status":"done"}]}' | ie plan

# 8. Record milestone
ie log milestone "User Authentication feature complete"
```

---

## Validation Rules

Intent-Engine enforces these rules to maintain data integrity:

### Rule 1: Description Required for Starting

When setting a task to `doing`, you must provide a description (`spec`):

```bash
# ❌ This will fail
echo '{"tasks":[{"name":"Task","status":"doing"}]}' | ie plan
# Error: spec (description) is required when starting a task

# ✅ This works
echo '{"tasks":[{"name":"Task","status":"doing","spec":"Goal and approach"}]}' | ie plan
```

**Rationale**: Before starting work, you should know what you're trying to achieve.

### Rule 2: Children Must Complete Before Parent

A parent task cannot be marked `done` if any child is not `done`:

```bash
# Setup: Parent with incomplete child
echo '{"tasks":[{
  "name":"Parent",
  "status":"doing",
  "spec":"Parent task",
  "children":[{"name":"Child","status":"todo"}]
}]}' | ie plan

# ❌ This will fail
echo '{"tasks":[{"name":"Parent","status":"done"}]}' | ie plan
# Error: Cannot complete task 'Parent': has incomplete subtasks

# ✅ Complete child first, then parent
echo '{"tasks":[{"name":"Child","status":"done"}]}' | ie plan
echo '{"tasks":[{"name":"Parent","status":"done"}]}' | ie plan
```

**Rationale**: Hierarchical consistency - a task isn't done until all its parts are done.

### Rule 3: Idempotent Operations

The same `ie plan` command can be run multiple times safely:

```bash
# Running this twice creates only ONE task
echo '{"tasks":[{"name":"My Task"}]}' | ie plan
echo '{"tasks":[{"name":"My Task"}]}' | ie plan  # Updates, doesn't duplicate
```

---

## Best Practices

### 1. Write Meaningful Descriptions

```bash
# ❌ Too vague
"spec":"Implement feature"

# ✅ Clear goal and approach
"spec":"## Goal\nAdd rate limiting to API endpoints\n\n## Approach\n- Use sliding window algorithm\n- Store counts in Redis\n- Return 429 when exceeded"
```

### 2. Use Hierarchical Decomposition

```bash
# ❌ Flat list of 10 tasks
Task 1, Task 2, Task 3, ... Task 10

# ✅ Logical hierarchy
Parent Task
├── Subtask Group A
│   ├── A.1
│   └── A.2
└── Subtask Group B
    ├── B.1
    └── B.2
```

### 3. Record Decisions Immediately

```bash
# When you make a choice, record it right away
ie log decision "Chose PostgreSQL over MongoDB - need ACID transactions"
```

### 4. Use parent_id for Independent Tasks

```bash
# When creating a task unrelated to current focus
echo '{"tasks":[{"name":"Bug Fix #123","parent_id":null}]}' | ie plan
```

### 5. Keep Status Updated

```bash
# Start of work
echo '{"tasks":[{"name":"Task","status":"doing","spec":"..."}]}' | ie plan

# During work
ie log note "Progress: 50% complete"

# End of work
echo '{"tasks":[{"name":"Task","status":"done"}]}' | ie plan
```

---

## Integration Guide

### Claude Code Integration

Add to your project's `CLAUDE.md`:

```markdown
# Task Management

Use `ie` for task tracking:
- Session start: `ie status`
- Create/update: `echo '{...}' | ie plan`
- Decisions: `ie log decision "..."`
```

### Session Start Hook

Configure Claude's session hook to auto-run `ie status`:

```json
{
  "hooks": {
    "SessionStart": [{
      "hooks": [{
        "type": "command",
        "command": "ie status"
      }]
    }]
  }
}
```

### Environment Variables

| Variable | Description |
|----------|-------------|
| `IE_SESSION_ID` | Session identifier for multi-session support |
| `IE_DATABASE_PATH` | Custom database file path |
| `IE_LOG_LEVEL` | Logging verbosity (error, warn, info, debug) |

---

## Troubleshooting

### "spec required when starting a task"

**Cause**: Trying to set `status: doing` without a `spec`.

**Solution**: Add a description:
```bash
echo '{"tasks":[{"name":"Task","status":"doing","spec":"Description here"}]}' | ie plan
```

### "Cannot complete task: has incomplete subtasks"

**Cause**: Trying to complete a parent while children are still `todo` or `doing`.

**Solution**: Complete all children first:
```bash
ie status <parent_id>  # Check which children are incomplete
# Complete each child
echo '{"tasks":[{"name":"Child","status":"done"}]}' | ie plan
```

### "Task not found"

**Cause**: Task name doesn't match exactly.

**Solution**: Check exact name with `ie search` or `ie status`.

### Database Locked

**Cause**: Multiple processes accessing the database.

**Solution**:
```bash
ie doctor  # Check for issues
# If needed, stop dashboard and retry
ie dashboard stop
```

---

## FAQ

### Q: Can I use ie without AI assistants?

Yes! Intent-Engine is a standalone CLI tool. While designed for AI integration, it works perfectly for human-driven task management.

### Q: How do I migrate from another task system?

Export your tasks to JSON and use `ie plan` to import:
```bash
cat tasks.json | ie plan
```

### Q: Where is the data stored?

By default: `.intent-engine/intent.db` in your project root.

### Q: Can multiple team members use the same database?

The database is designed for single-user, local use. For teams, consider separate databases or the web dashboard.

### Q: How do I backup my data?

Copy the `.intent-engine/` directory.

### Q: Can I undo a completed task?

Yes, update the status back:
```bash
echo '{"tasks":[{"name":"Task","status":"doing"}]}' | ie plan
```

---

## Further Reading

- [Plan Command Details]./plan.md
- [Interface Specification]../spec-03-interface-current.md
- [Dashboard User Guide]../dashboard-user-guide.md
- [System Prompt for AI]../system_prompt.md

---

*End of User Guide*