@mandors/cli 0.3.10 → 0.4.0

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.
package/README.md CHANGED
@@ -1,11 +1,15 @@
1
- # Mandor - Event-Based Task Manager CLI for AI Agent Workflows
1
+ # Mandor - Deterministic Task Manager CLI for AI Agent Workflows
2
+
3
+ <p align="center">
4
+ <img src="logo.png" alt="Mandor Logo" width="600">
5
+ </p>
2
6
 
3
7
  <p align="center">
4
8
  <strong>Stop writing markdown plans. Start shipping features with deterministic task tracking.</strong>
5
9
  </p>
6
10
 
7
11
  <p align="center">
8
- <strong>Event-sourced | Dependency-aware | CLI-native | Built for AI agents</strong>
12
+ <strong>Dependency-aware | Structured storage | CLI-native | Built for AI agents</strong>
9
13
  </p>
10
14
 
11
15
  <p align="center">
@@ -27,18 +31,18 @@ Traditional workflows scatter task state across markdown files, spreadsheets, an
27
31
 
28
32
  Mandor brings **deterministic task management** to AI agent workflows:
29
33
 
30
- - **Single Source of Truth**: All state in `events.jsonl`—queryable, reproducible, auditable
34
+ - **Single Source of Truth**: All state in structured JSONL files—queryable, reproducible, auditable
31
35
  - **Automatic Dependency Resolution**: Mark tasks done → dependents auto-transition to ready
32
36
  - **Schema-Driven**: Enforce implementation steps, test cases, and library needs upfront
33
37
  - **CLI-Native**: Works in terminal, scripts, and CI/CD pipelines
34
- - **Event-Sourced**: Full audit trail of every status change
38
+ - **Dependency Tracking**: Full support for same-project and cross-project dependencies
35
39
 
36
40
  ## Overview
37
41
 
38
42
  Mandor is a CLI tool for managing tasks, features, and issues in AI agent workflows:
39
43
 
40
- - **Event-Based Architecture**: All changes logged in `events.jsonl` with immutable timestamps
41
- - **JSONL Format**: Deterministic, append-only storage for reproducibility
44
+ - **Structured Storage**: All data in JSONL format with full audit trail
45
+ - **Real-Time Status**: Query tasks/issues by status (ready, blocked, in_progress)
42
46
  - **Dependency Tracking**: Automatic status transitions when dependencies complete
43
47
  - **Cross-Platform**: Go binary for macOS, Linux, Windows (arm64 & x64)
44
48
 
@@ -46,23 +50,15 @@ Mandor is a CLI tool for managing tasks, features, and issues in AI agent workfl
46
50
 
47
51
  ## Core Concepts
48
52
 
49
- ### Entity Hierarchy
50
-
51
- ```
52
- Workspace
53
- └── Projects
54
- └── Features
55
- └── Tasks
56
- └── Issues
57
- ```
58
-
59
53
  ### Entity Types
60
54
 
61
55
  | Type | Purpose | Status Values |
62
56
  |------|---------|---------------|
63
- | **Task** | Work items within a feature | ready, in_progress, done, blocked, cancelled |
57
+ | **Workspace** | Top-level container for all projects | (single instance per directory) |
58
+ | **Project** | Container for features and issues | (active/deleted) |
64
59
  | **Feature** | Logical grouping of related tasks | draft, active, done, blocked, cancelled |
65
- | **Issue** | Problems, bugs, or improvement requests | ready, in_progress, resolved, wontfix, blocked |
60
+ | **Task** | Work items within a feature | pending, ready, in_progress, done, blocked, cancelled |
61
+ | **Issue** | Problems, bugs, or improvement requests | open, ready, in_progress, resolved, wontfix, blocked, cancelled |
66
62
 
67
63
  ### Dependency Types
68
64
 
@@ -74,47 +70,50 @@ Workspace
74
70
 
75
71
  **Tasks:**
76
72
  ```
77
- ready → in_progress → done
78
- ready → blocked (dependency not done)
79
- blockedready (dependencies resolved)
80
- ready → cancelled
81
- cancelledready (reopen)
73
+ pending{ready, in_progress, cancelled}
74
+ ready → {in_progress, cancelled}
75
+ in_progress{done, blocked, cancelled}
76
+ blocked{ready, cancelled}
77
+ done → (terminal)
78
+ cancelled → (terminal)
82
79
  ```
83
80
 
84
81
  **Features:**
85
82
  ```
86
- draft → active done
87
- draft → blocked (dependency not done)
88
- draft → cancelled
89
- cancelleddraft (reopen)
83
+ draft → {active, blocked, cancelled}
84
+ active{done, blocked, cancelled}
85
+ blocked{draft, active, done, cancelled}
86
+ done{cancelled}
87
+ cancelled → {draft}
90
88
  ```
91
89
 
92
90
  **Issues:**
93
91
  ```
94
- ready → in_progress resolved
95
- ready → in_progress wontfix
96
- ready → blocked (dependency not done)
97
- blocked → ready (dependencies resolved)
98
- resolved → ready (reopen)
99
- wontfix → ready (reopen)
92
+ open{ready, in_progress, blocked, resolved, wontfix, cancelled}
93
+ ready → {in_progress, blocked, resolved, wontfix, cancelled}
94
+ in_progress{blocked, resolved, wontfix, cancelled}
95
+ blocked → {ready, resolved, wontfix, cancelled}
96
+ resolved → (terminal, can reopen to any status)
97
+ wontfix → (terminal, can reopen to any status)
98
+ cancelled → (terminal, can reopen to any status)
100
99
  ```
101
100
 
102
101
  ---
103
102
 
104
103
  ## Installation
105
104
 
106
- ### Build from Source
105
+ ### Install with curl
107
106
 
108
107
  ```bash
109
- git clone https://github.com/budisantoso/mandor.git
110
- cd mandor
111
- go build -o ./binaries/mandor ./cmd/mandor
108
+ curl -fsSL https://raw.githubusercontent.com/sanxzy/mandor/main/scripts/install.sh | sh
109
+ mandor --help
112
110
  ```
113
111
 
114
- ### Use from Binaries
112
+ ### Install from npm
115
113
 
116
114
  ```bash
117
- ./binaries/mandor --help
115
+ npm install -g @mandors/cli
116
+ mandor --help
118
117
  ```
119
118
 
120
119
  ---
@@ -168,28 +167,22 @@ mandor task create api-feature-xxx "Login Endpoint" \
168
167
  ### 5. View Task Progress
169
168
 
170
169
  ```bash
171
- # See all tasks in feature
172
- mandor task list api-feature-xxx
173
-
174
- # See tasks ready to work on
175
- mandor task ready api-feature-xxx
170
+ # See all tasks in feature with visualization
171
+ mandor track feature api-feature-xxx
176
172
 
177
- # See blocked/waiting tasks
178
- mandor task blocked api-feature-xxx
179
-
180
- # See summary grouped by status
181
- mandor task summary api-feature-xxx
173
+ # Get task details
174
+ mandor task detail <task-id>
182
175
  ```
183
176
 
184
177
  ### 6. Mark Tasks Complete
185
178
 
186
179
  ```bash
187
- # Get task ID from list
180
+ # Get task ID from track output
188
181
  mandor task update <task-id> --status in_progress
189
182
  mandor task update <task-id> --status done
190
183
 
191
184
  # Dependent tasks auto-transition to "ready"
192
- mandor task ready api-feature-xxx # Now shows "Login Endpoint" as ready
185
+ mandor track feature api-feature-xxx # Now shows "Login Endpoint" as ready
193
186
  ```
194
187
 
195
188
  ---
@@ -200,626 +193,252 @@ mandor task ready api-feature-xxx # Now shows "Login Endpoint" as ready
200
193
 
201
194
  ```bash
202
195
  # Initialize a new workspace
203
- mandor init --workspace-name "Name"
196
+ mandor init [--workspace-name <name>] [-y]
204
197
 
205
- # View workspace status
206
- mandor status
198
+ # View workspace and project status
199
+ mandor status [--project <id>] [--json]
207
200
 
208
201
  # Manage configuration
209
202
  mandor config get <key>
210
203
  mandor config set <key> <value>
204
+ mandor config list
211
205
  mandor config reset <key>
206
+
207
+ # Display all commands and best practices
208
+ mandor populate
209
+
210
+ # Show version
211
+ mandor version
212
+
213
+ # Generate shell completions
214
+ mandor completion [bash|zsh|fish]
215
+
216
+ # AI-assisted documentation
217
+ mandor ai --help
218
+ ```
219
+
220
+ ### Track Commands
221
+
222
+ ```bash
223
+ # Track workspace status
224
+ mandor track
225
+
226
+ # Track project status
227
+ mandor track project <project-id>
228
+
229
+ # Track feature with tasks
230
+ mandor track feature <feature-id> [--verbose]
231
+
232
+ # Track specific task
233
+ mandor track task <task-id>
234
+
235
+ # Track issue
236
+ mandor track issue <issue-id>
212
237
  ```
213
238
 
214
239
  ### Project Commands
215
240
 
216
241
  ```bash
217
242
  # Create a project
218
- mandor project create <id> --name "Name" --goal "Description"
219
-
220
- # List projects
221
- mandor project list
243
+ mandor project create <id> --name <name> --goal <goal> [OPTIONS]
222
244
 
223
245
  # Show project details
224
246
  mandor project detail <project-id>
225
247
 
226
- # Delete a project
227
- mandor project delete <project-id>
248
+ # Update project
249
+ mandor project update <project-id> [--name <name>] [--goal <goal>] [--status <status>]
228
250
  ```
229
251
 
230
252
  ### Feature Commands
231
253
 
232
254
  ```bash
233
255
  # Create a feature
234
- mandor feature create "Name" --project <id> --goal "Description" [--scope <value>]
256
+ mandor feature create <name> --project <id> --goal <goal> [--scope <scope>] [--priority <priority>]
235
257
 
236
258
  # List features
237
- mandor feature list --project <id> [--scope <value>]
259
+ mandor feature list --project <id>
238
260
 
239
261
  # Show feature details
240
- mandor feature detail <feature-id> --project <id> [--include-deleted]
262
+ mandor feature detail <feature-id> --project <id>
241
263
 
242
264
  # Update feature
243
- mandor feature update <id> --project <id> [--status <value>] [--cancel --reason] [--reopen]
244
-
245
- # Delete feature (soft delete)
246
- mandor feature update <id> --project <id> --cancel --reason "Reason"
265
+ mandor feature update <feature-id> --project <id> [--name <text>] [--goal <goal>] [--scope <scope>] [--priority <priority>] [--status <status>] [--depends <ids>] [--cancel --reason <text>] [--reopen] [--dry-run]
247
266
  ```
248
267
 
249
268
  ### Task Commands
250
269
 
251
270
  ```bash
252
- # Create a task (positional arguments: feature_id, name)
253
- mandor task create <feature_id> "<name>" \
254
- --goal "Task description (min 500 chars)" \
255
- --implementation-steps "step1|step2|step3" \
256
- --test-cases "test1|test2|test3" \
257
- --derivable-files "file1.go|file2.go" \
258
- --library-needs "lib1|lib2" \
259
- [--priority <P0-P5>] \
260
- [--depends-on <task-id>]
261
-
262
- # List tasks in a feature (positional argument: feature_id)
263
- mandor task list <feature_id> [--status <value>] [--priority <value>] [--json]
264
-
265
- # Show ready tasks (available to work on)
266
- mandor task ready <feature_id> [--priority <P0-P5>] [--json]
267
-
268
- # Show blocked tasks (waiting on dependencies)
269
- mandor task blocked <feature_id> [--priority <P0-P5>] [--json]
270
-
271
- # Show task summary (grouped by status)
272
- mandor task summary <feature_id>
271
+ # Create a task
272
+ mandor task create <feature-id> <name> --goal <goal> \
273
+ --implementation-steps <steps> --test-cases <cases> \
274
+ --derivable-files <files> --library-needs <libs> \
275
+ [--priority <priority>] [--depends-on <ids>]
273
276
 
274
277
  # Show task details
275
- mandor task detail <task-id> [--include-deleted] [--events] [--dependencies]
276
-
277
- # Update task status
278
- mandor task update <id> --status <value>
279
-
280
- # Transition task to work on it
281
- mandor task update <id> --status in_progress
278
+ mandor task detail <task-id>
282
279
 
283
- # Mark task complete (auto-unblocks dependents)
284
- mandor task update <id> --status done
285
-
286
- # Block task manually (external dependency)
287
- mandor task update <id> --status blocked --reason "Waiting on API response"
288
-
289
- # Cancel task
290
- mandor task update <id> --cancel --reason "Superseded by feature X"
291
-
292
- # Reopen cancelled task
293
- mandor task update <id> --reopen
280
+ # Update task
281
+ mandor task update <task-id> [--name <text>] [--goal <goal>] [--priority <priority>] \
282
+ [--status <status>] [--depends-add <ids>] [--depends-remove <ids>] [--cancel --reason <text>] [--dry-run]
294
283
  ```
295
284
 
296
285
  ### Issue Commands
297
286
 
298
287
  ```bash
299
288
  # Create an issue
300
- mandor issue create <project_id> "<name>" \
301
- --type <type> \
302
- --goal "Issue description (min 200 chars)" \
303
- --affected-files "file1|file2" \
304
- --affected-tests "test1|test2" \
305
- --implementation-steps "step1|step2" \
306
- [--priority <P0-P5>] \
307
- [--depends-on <issue-id>]
308
-
309
- # List issues in a project
310
- mandor issue list <project_id> [--status <value>] [--type <value>] [--json]
311
-
312
- # Show ready issues (available to fix)
313
- mandor issue ready <project_id> [--type <type>] [--priority <P0-P5>] [--json]
314
-
315
- # Show blocked issues (waiting on dependencies)
316
- mandor issue blocked <project_id> [--type <type>] [--priority <P0-P5>] [--json]
317
-
318
- # Show issue summary (grouped by status)
319
- mandor issue summary <project_id>
289
+ mandor issue create <name> --project <id> --type <type> --goal <goal> \
290
+ --affected-files <files> --affected-tests <tests> \
291
+ --implementation-steps <steps> [--priority <priority>] [--depends-on <ids>] [--library-needs <libs>]
320
292
 
321
293
  # Show issue details
322
- mandor issue detail <issue-id> [--include-deleted]
323
-
324
- # Update issue status
325
- mandor issue update <id> --status <value>
326
-
327
- # Start working on an issue
328
- mandor issue update <id> --start
329
-
330
- # Mark issue resolved
331
- mandor issue update <id> --resolve
332
-
333
- # Mark issue as won't fix
334
- mandor issue update <id> --wontfix --reason "Working as intended"
335
-
336
- # Reopen a resolved/wontfix issue
337
- mandor issue update <id> --reopen
338
-
339
- # Block issue manually
340
- mandor issue update <id> --status blocked --reason "Waiting on infrastructure"
341
-
342
- # Cancel issue (duplicate/no longer relevant)
343
- mandor issue update <id> --cancel --reason "Duplicate of issue #123"
344
- ```
345
-
346
- ---
347
-
348
- ## Configuration
349
-
350
- ### Available Config Keys
351
-
352
- ```bash
353
- # Default priority for new entities
354
- mandor config set default_priority P3
355
-
356
- # Strict mode for dependency rules
357
- mandor config set strict_mode true
358
-
359
- # View current config
360
- mandor config get default_priority
361
- mandor config get strict_mode
362
-
363
- # Reset to defaults
364
- mandor config reset default_priority
365
- ```
294
+ mandor issue detail <issue-id> --project <id>
366
295
 
367
- ### Priority Values
368
-
369
- | Priority | Use Case |
370
- |----------|----------|
371
- | P0 | Critical / Security |
372
- | P1 | High / Blocker |
373
- | P2 | Medium-High |
374
- | P3 | Medium (default) |
375
- | P4 | Medium-Low |
376
- | P5 | Low / Nice to have |
377
-
378
- ### Scope Values
379
-
380
- Valid scope values for features: `frontend`, `backend`, `fullstack`, `cli`, `desktop`, `android`, `flutter`, `react-native`, `ios`, `swift`
381
-
382
- ### Issue Types
383
-
384
- Valid issue types: `bug`, `improvement`, `debt`, `security`, `performance`
385
-
386
- ---
387
-
388
- ## Dependency Management
389
-
390
- ### Creating Dependencies
391
-
392
- ```bash
393
- # Task depends on another task
394
- mandor task create "Task B" --feature f1 \
395
- --depends-on task-a-id
396
-
397
- # Issue depends on another issue
398
- mandor issue create "Issue B" --project p1 \
399
- --depends-on issue-a-id
400
-
401
- # Feature depends on another feature
402
- mandor feature create "Feature B" --project p1 \
403
- --depends-on feature-a-id
404
- ```
405
-
406
- ### Managing Dependencies
407
-
408
- ```bash
409
- # Add dependencies
410
- mandor task update <task-id> --depends-add "id1|id2"
411
-
412
- # Replace all dependencies
413
- mandor task update <task-id> --depends "id1|id2"
414
-
415
- # Remove dependencies
416
- mandor task update <task-id> --depends-remove "id1"
296
+ # Update issue
297
+ mandor issue update <issue-id> [--name <text>] [--goal <goal>] [--priority <priority>] \
298
+ [--type <type>] [--status <status>] [--start] [--resolve] [--wontfix] [--reason <text>] [--cancel --reason <text>] [--dry-run]
417
299
  ```
418
300
 
419
- ### Dependency Behaviors
420
-
421
- - **Auto-blocking**: Entities start `blocked` if dependencies aren't `done`
422
- - **Auto-unblocking**: When a dependency becomes `done`, dependents automatically transition to `ready`
423
- - **Cross-project**: Dependencies can span projects if enabled in project config
424
-
425
- ### Cross-Project Dependencies
426
-
427
- Projects can be configured to allow or disallow cross-project dependencies:
301
+ ### AI Commands
428
302
 
429
303
  ```bash
430
- # Allow cross-project task dependencies
431
- mandor project create p1 --task-dep cross_project_allowed
432
-
433
- # Restrict to same-project only (default)
434
- mandor project create p2 --task-dep same_project_only
304
+ # AI-assisted documentation generation
305
+ mandor ai --help
435
306
  ```
436
307
 
437
- ### Circular Dependency Prevention
438
-
439
- Mandor automatically prevents:
440
- - Self-dependencies (A → A)
441
- - Two-node cycles (A → B → A)
442
- - N-node cycles (A → B → C → A)
443
- - Cross-project cycles
444
-
445
308
  ---
446
309
 
447
- ## Status Management
310
+ ## Common Workflows
448
311
 
449
- ### Checking Status
450
-
451
- ```bash
452
- # List blocked tasks
453
- mandor task list --feature <id> --status blocked
454
-
455
- # List ready tasks
456
- mandor task list --feature <id> --status ready
457
-
458
- # List all tasks
459
- mandor task list --feature <id>
460
- ```
312
+ ### Replace This (Markdown Plan Files)
461
313
 
462
- ### Transitioning Status
463
-
464
- ```bash
465
- # Task workflow
466
- mandor task update <id> --status in_progress
467
- mandor task update <id> --status done
468
-
469
- # Feature workflow
470
- mandor feature update <id> --project <pid> --status active
471
- mandor feature update <id> --project <pid> --status done
472
-
473
- # Issue workflow
474
- mandor issue update <id> --start
475
- mandor issue update <id> --resolve
476
- # or
477
- mandor issue update <id> --wontfix --reason "Reason"
478
- ```
479
-
480
- ### Cancel and Reopen
481
-
482
- ```bash
483
- # Cancel (soft delete)
484
- mandor task update <id> --cancel --reason "Why cancelled"
485
- mandor feature update <id> --project <pid> --cancel --reason "Why cancelled"
486
- mandor issue update <id> --wontfix --reason "Why wontfix"
487
-
488
- # Reopen
489
- mandor task update <id> --reopen
490
- mandor feature update <id> --project <pid> --reopen
491
- mandor issue update <id> --reopen
492
- ```
493
-
494
- **Note**: Cancelled entities can be viewed with `--include-deleted` flag.
495
-
496
- ---
497
-
498
- ## Filtering and Querying
499
-
500
- ### Filter by Status
314
+ ```markdown
315
+ # PLAN.md
316
+ ## Phase 1: Authentication
317
+ - [ ] JWT parser (depends on cryptography)
318
+ - [ ] Login endpoint (depends on JWT parser)
319
+ - [ ] Refresh token (depends on JWT parser)
501
320
 
502
- ```bash
503
- mandor task list --feature <id> --status ready
504
- mandor task list --feature <id> --status blocked
505
- mandor task list --feature <id> --status done
321
+ Status: Last updated 3 days ago (probably stale!)
506
322
  ```
507
323
 
508
- ### Filter by Priority
324
+ ### With This (Mandor)
509
325
 
510
326
  ```bash
511
- mandor task list --feature <id> --priority P0
512
- mandor task list --feature <id> --priority P2
513
- ```
514
-
515
- ### Filter by Scope (Features)
327
+ # Create structured plan
328
+ mandor feature create "Authentication" --project api \
329
+ --goal "Implement JWT and login endpoints" \
330
+ --scope backend
516
331
 
517
- ```bash
518
- mandor feature list --project <id> --scope backend
519
- mandor feature list --project <id> --scope frontend
520
- ```
332
+ # Create tasks with explicit dependencies
333
+ mandor task create auth-feature-id "JWT Parser" \
334
+ --goal "Validate JWT tokens..." \
335
+ --implementation-steps "Step 1|Step 2" \
336
+ --test-cases "Test invalid tokens|Test expired" \
337
+ --derivable-files "jwt.go|jwt_test.go" \
338
+ --library-needs "jsonwebtoken" \
339
+ --priority P1
521
340
 
522
- ### Filter by Type (Issues)
341
+ mandor task create auth-feature-id "Login Endpoint" \
342
+ --goal "Accept credentials and return JWT..." \
343
+ --depends-on jwt-parser-task-id \
344
+ --priority P1
523
345
 
524
- ```bash
525
- mandor issue list --project <id> --type bug
526
- mandor issue list --project <id> --type security
346
+ # Real-time progress queries
347
+ mandor track feature auth-feature-id # See all tasks and status
348
+ mandor track task jwt-parser-task-id # See specific task details
527
349
  ```
528
350
 
529
- ---
530
-
531
- ## Event System
532
-
533
- ### Event Log Location
534
-
535
- All events are stored in `.mandor/events.jsonl` in your workspace.
536
-
537
- ### Event Types
538
-
539
- | Event | Description |
540
- |-------|-------------|
541
- | entity_created | New entity created |
542
- | status_changed | Status transitioned |
543
- | dependency_added | Dependency added |
544
- | dependency_removed | Dependency removed |
545
- | dependent_unblocked | Dependent entity became ready |
546
- | entity_reopened | Cancelled entity reopened |
547
- | entity_cancelled | Entity cancelled |
351
+ **Benefits:**
352
+ - No file sync required
353
+ - Dependencies auto-validated
354
+ - Blocking tasks auto-detected
355
+ - Structured JSONL storage
356
+ - Queryable via CLI or JSON
357
+ - Works in CI/CD pipelines
548
358
 
549
- ### Viewing Events
359
+ ### Dependency Management
550
360
 
551
361
  ```bash
552
- # View events for a specific entity
553
- mandor task detail <id> --events
554
-
555
- # Events are also shown in default detail view
556
- mandor task detail <id>
557
- ```
558
-
559
- ---
560
-
561
- ## JSONL Format
362
+ # View all projects and their status
363
+ mandor status
562
364
 
563
- Mandor uses JSONL (JSON Lines) for event storage:
365
+ # Check a specific project
366
+ mandor status --project api
564
367
 
565
- ```json
566
- {"timestamp":"2026-02-01T10:00:00Z","type":"entity_created","entity":"task","id":"task-abc","name":"JWT Parser"}
567
- {"timestamp":"2026-02-01T10:01:00Z","type":"status_changed","entity":"task","id":"task-abc","from":"ready","to":"in_progress"}
568
- {"timestamp":"2026-02-01T10:02:00Z","type":"status_changed","entity":"task","id":"task-abc","from":"in_progress","to":"done"}
569
- {"timestamp":"2026-02-01T10:02:00Z","type":"dependent_unblocked","entity":"task","id":"task-xyz","dependency":"task-abc"}
570
- ```
368
+ # View feature dependencies and progress
369
+ mandor track project api
571
370
 
572
- ### Parsing Events
371
+ # Create tasks with dependencies
372
+ mandor task create feature-id "Step 2" \
373
+ --goal "..." \
374
+ --implementation-steps "..." \
375
+ --test-cases "..." \
376
+ --derivable-files "..." \
377
+ --library-needs "..." \
378
+ --depends-on task-id-1|task-id-2
573
379
 
574
- ```bash
575
- # View all events
576
- cat .mandor/events.jsonl
380
+ # See all feature tasks with status
381
+ mandor track feature feature-id
577
382
 
578
- # Filter for specific entity
579
- grep "task-abc" .mandor/events.jsonl
383
+ # Mark as done (auto-unblocks dependents)
384
+ mandor task update task-id --status done
580
385
 
581
- # Count events by type
582
- grep '"type":"status_changed"' .mandor/events.jsonl | wc -l
386
+ # Verify dependents auto-transitioned to ready
387
+ mandor track feature feature-id
583
388
  ```
584
389
 
585
- ---
586
-
587
- ## Examples
588
-
589
- ### Complete Feature Workflow
390
+ ### Issue Tracking
590
391
 
591
392
  ```bash
592
- # Initialize and create project
593
- mandor init "API Project"
594
- mandor project create api --name "REST API" --goal "Build production REST API with authentication"
595
-
596
- # Create feature (structured epic)
597
- mandor feature create "Authentication" --project api \
598
- --goal "Implement JWT-based auth with login, logout, and token refresh flows" \
599
- --scope backend
600
-
601
- # Create first task (no dependencies)
602
- mandor task create api-feature-xxx "JWT Parser" \
603
- --goal "Parse and validate JWT tokens with signature verification and expiry checks" \
604
- --implementation-steps "Import crypto library|Implement token parsing|Add signature validation|Handle expiry" \
605
- --test-cases "Valid token accepted|Invalid signature rejected|Expired token rejected" \
606
- --derivable-files "jwt_parser.go|jwt_parser_test.go" \
607
- --library-needs "golang-jwt" \
608
- --priority P1
609
-
610
- # Create dependent task
611
- mandor task create api-feature-xxx "JWT Validator" \
612
- --goal "Create middleware to validate JWT tokens in incoming requests" \
613
- --implementation-steps "Create middleware|Validate token|Check expiry|Return errors" \
614
- --test-cases "Valid requests pass|Invalid requests rejected|Error responses correct" \
615
- --derivable-files "auth_middleware.go|auth_middleware_test.go" \
616
- --library-needs "none" \
617
- --depends-on <jwt-parser-id> \
618
- --priority P1
619
-
620
- # Create another dependent task
621
- mandor task create api-feature-xxx "Login Endpoint" \
622
- --goal "Accept credentials and return JWT token pair with refresh token" \
623
- --implementation-steps "Setup endpoint|Validate credentials|Generate JWT|Store refresh token|Return tokens" \
624
- --test-cases "Valid creds return tokens|Invalid creds rejected|Tokens formatted correctly" \
625
- --derivable-files "login_handler.go|login_handler_test.go" \
626
- --library-needs "none" \
627
- --depends-on <jwt-parser-id> \
628
- --priority P1
629
-
630
- # View progress and blocking status
631
- mandor task list api-feature-xxx # See all tasks
632
- mandor task ready api-feature-xxx # Only JWT Parser is ready
633
- mandor task blocked api-feature-xxx # Validator and Login waiting on Parser
634
- mandor task summary api-feature-xxx # Grouped summary
635
-
636
- # Execute workflow
637
- mandor task update <jwt-parser-id> --status in_progress
638
- mandor task update <jwt-parser-id> --status done
639
-
640
- # Now Validator and Login auto-transition to ready
641
- mandor task ready api-feature-xxx # Both now ready to start
642
-
643
- # Work on dependent tasks
644
- mandor task update <jwt-validator-id> --status in_progress
645
- mandor task update <jwt-validator-id> --status done
646
-
647
- mandor task update <login-endpoint-id> --status in_progress
648
- mandor task update <login-endpoint-id> --status done
393
+ # Create a bug issue
394
+ mandor issue create "Fix memory leak in auth" \
395
+ --project api \
396
+ --type bug \
397
+ --priority P0 \
398
+ --goal "Goroutine leak in token refresh handler..." \
399
+ --affected-files "src/handlers/auth.go|src/middleware/auth.go" \
400
+ --affected-tests "src/handlers/auth_test.go" \
401
+ --implementation-steps "Identify leak|Add cleanup|Test|Verify"
649
402
 
650
- # Mark feature complete
651
- mandor feature update api-feature-xxx --project api --status active
652
- mandor feature update api-feature-xxx --project api --status done
653
- ```
403
+ # View issue details
404
+ mandor issue detail issue-id --project api
654
405
 
655
- ### Multi-Project Dependencies
406
+ # Start working on an issue
407
+ mandor issue update issue-id --start
656
408
 
657
- ```bash
658
- # Create projects with cross-project dependencies enabled
659
- mandor project create core --name "Core Library" \
660
- --goal "Shared database and utility libraries"
661
- mandor project create api --name "API Service" \
662
- --goal "REST API service" --task-dep cross_project_allowed
663
-
664
- # Create shared library feature and task
665
- mandor feature create "Database Layer" --project core \
666
- --goal "Connection pool and query builder for database access" \
667
- --scope backend
409
+ # Mark as resolved
410
+ mandor issue update issue-id --resolve
668
411
 
669
- mandor task create core-feature-xxx "Database Connection Pool" \
670
- --goal "Implement connection pool with health checks and auto-reconnect" \
671
- --implementation-steps "Create pool|Setup health check|Auto-reconnect|Connection limits" \
672
- --test-cases "Pool creates connections|Health check works|Reconnect on failure" \
673
- --derivable-files "db_pool.go|db_pool_test.go" \
674
- --library-needs "pgx|pgxpool" \
675
- --priority P0
676
-
677
- # Create API feature depending on core library task
678
- mandor feature create "User Endpoints" --project api \
679
- --goal "User CRUD endpoints backed by database" \
680
- --scope backend
412
+ # Mark as won't fix with reason
413
+ mandor issue update issue-id --wontfix --reason "Working as intended"
681
414
 
682
- mandor task create api-feature-xxx "User API Handler" \
683
- --goal "Create REST endpoints for user CRUD operations" \
684
- --implementation-steps "Setup handler|Implement GET|Implement POST|Implement DELETE" \
685
- --test-cases "GET returns user|POST creates user|DELETE removes user" \
686
- --derivable-files "user_handler.go|user_handler_test.go" \
687
- --library-needs "gin|none" \
688
- --depends-on <db-pool-task-id> \
689
- --priority P0
690
-
691
- # Check progress
692
- mandor task list core-feature-xxx # DB Pool ready to start
693
- mandor task blocked api-feature-xxx # User Handler blocked on DB Pool
694
-
695
- # Complete core task, dependents auto-unblock
696
- mandor task update <db-pool-task-id> --status in_progress
697
- mandor task update <db-pool-task-id> --status done
698
-
699
- # API task now ready
700
- mandor task ready api-feature-xxx # User Handler now ready
415
+ # See project issues with track
416
+ mandor track project api
701
417
  ```
702
418
 
703
- ### Issue Tracking with Dependencies
419
+ ### Configuration
704
420
 
705
421
  ```bash
706
- # Create blocker issues
707
- mandor issue create api "Data Validation Bug" \
708
- --type bug \
709
- --goal "Fix data validation allowing invalid emails to pass through" \
710
- --affected-files "validate.go|email_validator.go" \
711
- --affected-tests "validate_test.go|email_validator_test.go" \
712
- --implementation-steps "Add email regex|Add domain check|Add test cases" \
713
- --priority P0
714
-
715
- mandor issue create api "Cache Consistency Issue" \
716
- --type bug \
717
- --goal "Fix race condition in cache invalidation causing stale data" \
718
- --affected-files "cache.go|invalidation.go" \
719
- --affected-tests "cache_test.go" \
720
- --implementation-steps "Add mutex|Refactor invalidation|Add concurrency tests" \
721
- --priority P0
722
-
723
- # Create dependent issue (depends on blockers)
724
- mandor issue create api "High Memory Usage in Production" \
725
- --type bug \
726
- --goal "Fix memory leak causing OOM errors in production due to cache and validation issues" \
727
- --affected-files "main.go|memory.go" \
728
- --affected-tests "memory_test.go" \
729
- --implementation-steps "Profile memory|Identify leaks|Fix validation and cache" \
730
- --depends-on <data-validation-bug-id>|<cache-issue-id> \
731
- --priority P0
732
-
733
- # Check status
734
- mandor issue ready api # Both blockers ready
735
- mandor issue blocked api # Memory issue blocked
736
-
737
- # Resolve blocking issues (order doesn't matter)
738
- mandor issue update <data-validation-bug-id> --start
739
- mandor issue update <data-validation-bug-id> --resolve
740
-
741
- mandor issue update <cache-issue-id> --start
742
- mandor issue update <cache-issue-id> --resolve
743
-
744
- # Check progress
745
- mandor issue ready api # Memory issue now ready
746
- mandor issue summary api # See all status groups
747
-
748
- # Fix dependent issue
749
- mandor issue update <memory-issue-id> --start
750
- mandor issue update <memory-issue-id> --resolve
751
- ```
422
+ # Set default priority
423
+ mandor config set default_priority P2
752
424
 
753
- ### Cancel and Reopen Workflow
425
+ # Enable strict mode
426
+ mandor config set strict_mode true
754
427
 
755
- ```bash
756
- # Create experimental feature and tasks
757
- mandor feature create "OAuth2 Investigation" --project api \
758
- --goal "Research OAuth2 integration options" \
759
- --scope backend
428
+ # View all configuration
429
+ mandor config list
760
430
 
761
- mandor task create api-feature-xxx "Compare OAuth2 Libraries" \
762
- --goal "Research and compare auth0, okta, and open-source options" \
763
- --implementation-steps "Create comparison spreadsheet|Evaluate pros/cons|Estimate effort" \
764
- --test-cases "Evaluation complete|Team consensus reached" \
765
- --derivable-files "oauth2_comparison.md" \
766
- --library-needs "none" \
767
- --priority P2
431
+ # Get specific value
432
+ mandor config get default_priority
768
433
 
769
- mandor task create api-feature-xxx "Proof of Concept" \
770
- --goal "Build minimal OAuth2 integration demo" \
771
- --implementation-steps "Setup oauth lib|Create login flow|Test flow" \
772
- --test-cases "Login works|Token refresh works" \
773
- --derivable-files "poc_oauth.go|poc_oauth_test.go" \
774
- --library-needs "none" \
775
- --priority P2
776
-
777
- # List tasks
778
- mandor task list api-feature-xxx # Show feature tasks
779
-
780
- # Change requirements, decide not to pursue OAuth2
781
- mandor feature update api-feature-xxx --project api \
782
- --cancel --reason "Sticking with JWT, OAuth2 adds too much complexity"
783
-
784
- # Try to create new task (fails)
785
- mandor task create api-feature-xxx "Integration Tests" \
786
- --goal "Add integration tests" \
787
- --implementation-steps "none" \
788
- --test-cases "none" \
789
- --derivable-files "none" \
790
- --library-needs "none"
791
- # Error: "Cannot create task for cancelled feature"
792
-
793
- # Change mind - reopen the feature to continue research
794
- mandor feature update api-feature-xxx --project api --reopen
795
-
796
- # Can now create tasks again
797
- mandor task list api-feature-xxx # Previous tasks still exist
798
- mandor task create api-feature-xxx "Hybrid Approach" \
799
- --goal "Combine JWT with optional OAuth2 for third-party apps" \
800
- --implementation-steps "Design hybrid flow|Implement dual auth|Test both flows" \
801
- --test-cases "JWT still works|OAuth2 works|Both interoperable" \
802
- --derivable-files "hybrid_auth.go" \
803
- --library-needs "oauth2lib" \
804
- --priority P3
434
+ # Reset to default
435
+ mandor config reset default_priority
805
436
  ```
806
437
 
807
438
  ---
808
439
 
809
440
  ## Best Practices
810
441
 
811
- ### Mandor vs. Markdown Plan Files
812
-
813
- | Problem | Markdown Plans | Mandor |
814
- |---------|---|---|
815
- | Single source of truth | ❌ Scattered across multiple files | ✓ Centralized `events.jsonl` |
816
- | Dependency tracking | ❌ Manual, often wrong | ✓ Automatic status transitions |
817
- | Progress visibility | ❌ Requires manual updates | ✓ Real-time status queries |
818
- | Audit trail | ❌ Git history only | ✓ Immutable event log |
819
- | Blocking detection | ❌ Must review files | ✓ `mandor task blocked <id>` |
820
- | Schema validation | ❌ Free-form text | ✓ Enforced structure |
821
- | Automation | ❌ Parse text with regex | ✓ JSON queryable for scripts |
822
-
823
442
  ### 1. Use Meaningful IDs
824
443
 
825
444
  Project and feature IDs should be:
@@ -837,17 +456,27 @@ mandor project create p1
837
456
  mandor feature create f123
838
457
  ```
839
458
 
840
- ### 2. Set Default Priority
459
+ ### 2. Write Clear Goals
841
460
 
842
- Configure default priority in workspace:
461
+ Goals should include:
462
+ - What is being built/fixed
463
+ - Why it matters
464
+ - Technical requirements
465
+ - Acceptance criteria
843
466
 
844
467
  ```bash
845
- mandor config set default_priority P3
468
+ # Good
469
+ --goal "Implement JWT-based authentication with login and refresh flows for secure API access"
470
+
471
+ # Avoid
472
+ --goal "Add authentication"
846
473
  ```
847
474
 
848
475
  ### 3. Use Scopes for Features
849
476
 
850
- Assign scopes to help filter and organize:
477
+ Organize by scope:
478
+ - `frontend`, `backend`, `fullstack`
479
+ - `cli`, `desktop`, `android`, `flutter`, `react-native`, `ios`, `swift`
851
480
 
852
481
  ```bash
853
482
  mandor feature create "Login UI" --project api --scope frontend
@@ -856,83 +485,89 @@ mandor feature create "Login API" --project api --scope backend
856
485
 
857
486
  ### 4. Keep Dependencies Shallow
858
487
 
859
- Deep dependency chains (>5 levels) can be hard to manage. Consider breaking into smaller features.
488
+ Deep dependency chains (>5 levels) are hard to manage. Consider breaking into smaller features.
489
+
490
+ ```bash
491
+ # Good: tasks depend on other tasks in same feature
492
+ mandor task create "Task B" --feature feature-id --depends-on task-a-id
493
+
494
+ # Consider splitting if: task chains exceed 5 levels
495
+ ```
496
+
497
+ ### 5. Use Issues for Bugs, Tasks for Features
860
498
 
861
- ### 5. Use Issues for Bugs, Tasks for Work
499
+ - **Tasks**: Feature work, implementation, refactoring
500
+ - **Issues**: Bugs, improvements, technical debt, security, performance
862
501
 
863
- - **Tasks**: Work to be done (implementations, refactoring)
864
- - **Issues**: Problems to be fixed or improvements to be made
502
+ ```bash
503
+ # Feature work
504
+ mandor task create "Add OAuth2" --feature api-auth
505
+
506
+ # Bug fix
507
+ mandor issue create "Fix auth timeout" --project api --type bug
508
+ ```
865
509
 
866
510
  ### 6. Document Cancellation Reasons
867
511
 
868
512
  Always provide clear reasons when cancelling:
869
513
 
870
514
  ```bash
871
- mandor task update <id> --cancel --reason "Superseded by feature X"
515
+ mandor task update task-id --cancel --reason "Superseded by feature X"
516
+ mandor feature update feature-id --project api --cancel --reason "Sticking with JWT, OAuth2 adds too much complexity"
872
517
  ```
873
518
 
874
- ### 7. Review Blocked Tasks Regularly
519
+ ### 7. Use Pipe-Separated Lists
520
+
521
+ For flags accepting multiple values, use pipe separators:
875
522
 
876
523
  ```bash
877
- mandor task list --feature <id> --status blocked
524
+ # Implementation steps
525
+ --implementation-steps "Step 1|Step 2|Step 3"
526
+
527
+ # Test cases
528
+ --test-cases "Case 1|Case 2|Case 3"
529
+
530
+ # Dependencies
531
+ --depends-on task-1|task-2|task-3
878
532
  ```
879
533
 
880
- ### 8. Use Configuration for Consistency
534
+ ### 8. Use --dry-run to Preview Changes
881
535
 
882
- Set up workspace configuration early:
536
+ Before making significant updates, preview with `--dry-run`:
883
537
 
884
538
  ```bash
885
- mandor config set default_priority P2
886
- mandor config set strict_mode true
539
+ mandor task update task-id --status done --cancel --dry-run
540
+ mandor feature update feature-id --project api --cancel --reason "..." --dry-run
887
541
  ```
888
542
 
889
- ### 9. Stop Writing Markdown Plan Files
543
+ ### 9. Set Configuration Early
890
544
 
891
- Replace this workflow:
545
+ Configure workspace defaults at the start:
892
546
 
893
- ```markdown
894
- # PLAN.md
895
- ## Phase 1: Authentication
896
- - [ ] JWT parser (depends on cryptography)
897
- - [ ] Login endpoint (depends on JWT parser)
898
- - ...
899
- # Status: Last updated 3 days ago
547
+ ```bash
548
+ mandor init "Project Name"
549
+ mandor config set default_priority P2
550
+ mandor config set strict_mode true
900
551
  ```
901
552
 
902
- With this:
553
+ ### 10. Review Status Regularly
903
554
 
904
555
  ```bash
905
- # Create structured plan
906
- mandor feature create "Authentication" --project api \
907
- --goal "Implement JWT and login endpoints" \
908
- --scope backend
556
+ # Workspace overview
557
+ mandor status
909
558
 
910
- # Create tasks with explicit dependencies
911
- mandor task create "JWT Parser" --feature auth-xxx \
912
- -g "Validate JWT tokens..." \
913
- --implementation-steps "Step 1|Step 2" \
914
- --test-cases "Test invalid tokens|Test expired" \
915
- --library-needs "jsonwebtoken" \
916
- --priority P1
559
+ # Project summary
560
+ mandor status --project api
917
561
 
918
- mandor task create "Login Endpoint" --feature auth-xxx \
919
- -g "Accept credentials and return JWT..." \
920
- --depends-on jwt-parser-id \
921
- --priority P1
562
+ # See feature progress
563
+ mandor track project api
922
564
 
923
- # Real-time progress queries
924
- mandor task ready auth-xxx # See what's available now
925
- mandor task blocked auth-xxx # See what's waiting
926
- mandor task summary auth-xxx # See grouped status
927
- ```
565
+ # See feature tasks
566
+ mandor track feature feature-id
928
567
 
929
- Benefits:
930
- - No file sync required
931
- - Dependencies auto-validated
932
- - Blocking tasks auto-detected
933
- - Reproducible state (`events.jsonl`)
934
- - Queryable via CLI or JSON
935
- - Works in CI/CD pipelines
568
+ # See task details
569
+ mandor track task task-id
570
+ ```
936
571
 
937
572
  ---
938
573
 
@@ -948,10 +583,10 @@ export PATH="$HOME/.local/bin:$PATH"
948
583
 
949
584
  ### "Project not found"
950
585
 
951
- Check the project ID and ensure you're in the correct workspace.
586
+ Check the project ID and ensure you're in the correct workspace:
952
587
 
953
588
  ```bash
954
- mandor project list
589
+ mandor status
955
590
  ```
956
591
 
957
592
  ### "Entity not found"
@@ -959,7 +594,8 @@ mandor project list
959
594
  Verify the entity ID exists:
960
595
 
961
596
  ```bash
962
- mandor task list --feature <feature-id>
597
+ mandor track feature <feature-id>
598
+ mandor track project <project-id>
963
599
  ```
964
600
 
965
601
  ### "Cross-project dependency detected"
@@ -971,7 +607,7 @@ The project doesn't allow cross-project dependencies:
971
607
  mandor project detail <project-id>
972
608
 
973
609
  # Create new project with cross-project enabled
974
- mandor project create <id> --task-dep cross_project_allowed
610
+ mandor project create <id> --name "..." --goal "..." --task-dep cross_project_allowed
975
611
  ```
976
612
 
977
613
  ### "Invalid status transition"
@@ -979,8 +615,9 @@ mandor project create <id> --task-dep cross_project_allowed
979
615
  The transition isn't allowed by the state machine:
980
616
 
981
617
  ```bash
982
- # Tasks: ready -> in_progress -> done
983
- # Features: draft -> active -> done
618
+ # Tasks: pending → ready in_progress done
619
+ # Features: draft active done
620
+ # Issues: open → ready → in_progress → resolved
984
621
  ```
985
622
 
986
623
  ### "Cannot create task for cancelled feature"
@@ -993,37 +630,36 @@ mandor feature update <id> --project <pid> --reopen
993
630
 
994
631
  ---
995
632
 
633
+ ## Configuration Keys
634
+
635
+ | Key | Type | Default | Description |
636
+ |-----|------|---------|-------------|
637
+ | `default_priority` | string | P3 | Default priority for new entities (P0-P5) |
638
+ | `strict_mode` | boolean | false | Enable strict dependency validation |
639
+
640
+ ---
641
+
996
642
  ## File Structure
997
643
 
998
644
  ```
999
- mandor/
1000
- ├── cmd/
1001
- │ └── mandor/ # CLI entry point
1002
- ├── internal/
1003
- │ ├── cmd/ # Command implementations
1004
- ├── domain/ # Domain models
1005
- ├── service/ # Business logic
1006
- ├── repository/ # Data access
1007
- └── events/ # Event handling
1008
- ├── .mandor/ # Workspace (created by init)
1009
- │ ├── workspace.json # Workspace config
1010
- │ └── projects/ # Projects directory
1011
- │ └── <project>/
1012
- │ ├── project.json
1013
- │ ├── features/
1014
- │ ├── tasks/
1015
- │ ├── issues/
1016
- │ └── events.jsonl
1017
- └── binaries/
1018
- └── mandor # Built binary
645
+ .mandor/
646
+ ├── workspace.json # Workspace metadata
647
+ ├── config.json # Workspace configuration
648
+ └── projects/
649
+ └── <project-id>/
650
+ ├── project.json # Project metadata
651
+ ├── features.jsonl # Feature records
652
+ ├── tasks.jsonl # Task records
653
+ └── issues.jsonl # Issue records
1019
654
  ```
1020
655
 
1021
656
  ---
1022
657
 
1023
658
  ## Support
1024
659
 
1025
- - Issues: https://github.com/budisantoso/mandor/issues
660
+ - Issues: https://github.com/sanxzy/mandor/issues
1026
661
  - Documentation: `/docs` directory
662
+ - Repository: https://github.com/sanxzy/mandor
1027
663
 
1028
664
  ---
1029
665