@mandors/cli 0.3.6 → 0.3.9

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.
@@ -0,0 +1,20 @@
1
+ {"layer":"project","type":"created","id":"test-proj","by":"BUDISANTOSO","ts":"2026-02-02T10:28:51.466422Z"}
2
+ {"layer":"feature","type":"created","id":"test-proj-feature-qgFb","by":"BUDISANTOSO","ts":"2026-02-02T10:28:59.0611Z"}
3
+ {"layer":"task","type":"created","id":"test-proj-feature-qgFb-task-9fse","by":"BUDISANTOSO","ts":"2026-02-02T10:29:14.29734Z"}
4
+ {"layer":"task","type":"ready","id":"test-proj-feature-qgFb-task-9fse","by":"system","ts":"2026-02-02T10:29:14.29734Z"}
5
+ {"layer":"task","type":"created","id":"test-proj-feature-qgFb-task-u4Sb","by":"BUDISANTOSO","ts":"2026-02-02T10:29:16.665464Z"}
6
+ {"layer":"task","type":"ready","id":"test-proj-feature-qgFb-task-u4Sb","by":"system","ts":"2026-02-02T10:29:16.665464Z"}
7
+ {"layer":"task","type":"created","id":"test-proj-feature-qgFb-task-CPT4","by":"BUDISANTOSO","ts":"2026-02-02T10:29:19.350275Z"}
8
+ {"layer":"task","type":"ready","id":"test-proj-feature-qgFb-task-CPT4","by":"system","ts":"2026-02-02T10:29:19.350275Z"}
9
+ {"layer":"task","type":"updated","id":"test-proj-feature-qgFb-task-9fse","by":"BUDISANTOSO","ts":"2026-02-02T10:29:29.806828Z","changes":["status"]}
10
+ {"layer":"task","type":"updated","id":"test-proj-feature-qgFb-task-u4Sb","by":"BUDISANTOSO","ts":"2026-02-02T10:29:33.953761Z","changes":["status"]}
11
+ {"layer":"task","type":"updated","id":"test-proj-feature-qgFb-task-CPT4","by":"BUDISANTOSO","ts":"2026-02-02T10:29:38.227724Z","changes":["status"]}
12
+ {"layer":"task","type":"updated","id":"test-proj-feature-qgFb-task-CPT4","by":"BUDISANTOSO","ts":"2026-02-02T10:29:38.249316Z","changes":["status"]}
13
+ {"layer":"issue","type":"created","id":"test-proj-issue-Kj2y","by":"BUDISANTOSO","ts":"2026-02-02T10:29:50.229194Z"}
14
+ {"layer":"issue","type":"ready","id":"test-proj-issue-Kj2y","by":"system","ts":"2026-02-02T10:29:50.229194Z"}
15
+ {"layer":"issue","type":"created","id":"test-proj-issue-NDVP","by":"BUDISANTOSO","ts":"2026-02-02T10:29:52.962947Z"}
16
+ {"layer":"issue","type":"ready","id":"test-proj-issue-NDVP","by":"system","ts":"2026-02-02T10:29:52.962947Z"}
17
+ {"layer":"issue","type":"created","id":"test-proj-issue-39iV","by":"BUDISANTOSO","ts":"2026-02-02T10:29:56.23988Z"}
18
+ {"layer":"issue","type":"ready","id":"test-proj-issue-39iV","by":"system","ts":"2026-02-02T10:29:56.23988Z"}
19
+ {"layer":"issue","type":"updated","id":"test-proj-issue-Kj2y","by":"BUDISANTOSO","ts":"2026-02-02T10:30:01.070387Z","changes":["status"]}
20
+ {"layer":"issue","type":"updated","id":"test-proj-issue-NDVP","by":"BUDISANTOSO","ts":"2026-02-02T10:30:01.082771Z","changes":["status"]}
@@ -0,0 +1 @@
1
+ {"id":"test-proj-feature-qgFb","project_id":"test-proj","name":"Test Feature","goal":"A test feature for testing tasks and issues in development environment with proper workflow","priority":"P3","status":"draft","created_at":"2026-02-02T10:28:59.0611Z","updated_at":"2026-02-02T10:28:59.0611Z","created_by":"BUDISANTOSO","updated_by":"BUDISANTOSO"}
@@ -0,0 +1,3 @@
1
+ {"id":"test-proj-issue-39iV","project_id":"test-proj","name":"Issue Security 1","goal":"Security issue in test feature that needs immediate attention and comprehensive security testing","issue_type":"security","priority":"P1","status":"ready","affected_files":["file3.go"],"affected_tests":["test3.go"],"implementation_steps":["Security step 1"],"created_at":"2026-02-02T10:29:56.23988Z","last_updated_at":"2026-02-02T10:29:56.23988Z","created_by":"BUDISANTOSO","last_updated_by":"BUDISANTOSO"}
2
+ {"id":"test-proj-issue-Kj2y","project_id":"test-proj","name":"Issue Bug 1","goal":"Bug in the test feature that needs fixing with proper analysis and solution steps for comprehensive testing","issue_type":"bug","priority":"P0","status":"in_progress","affected_files":["file1.go"],"affected_tests":["test1.go"],"implementation_steps":["Fix step 1","Fix step 2"],"created_at":"2026-02-02T10:29:50.229194Z","last_updated_at":"2026-02-02T10:30:01.070387Z","created_by":"BUDISANTOSO","last_updated_by":"BUDISANTOSO"}
3
+ {"id":"test-proj-issue-NDVP","project_id":"test-proj","name":"Issue Improvement 1","goal":"Improve performance of the test feature with optimization strategies and benchmarking approaches for comprehensive testing","issue_type":"improvement","priority":"P2","status":"resolved","affected_files":["file2.go"],"affected_tests":["test2.go"],"implementation_steps":["Optimize step 1","Optimize step 2"],"created_at":"2026-02-02T10:29:52.962947Z","last_updated_at":"2026-02-02T10:30:01.082771Z","created_by":"BUDISANTOSO","last_updated_by":"BUDISANTOSO"}
@@ -0,0 +1,11 @@
1
+ {
2
+ "id": "test-proj",
3
+ "name": "Test Project",
4
+ "goal": "A test project for CLI testing",
5
+ "status": "initial",
6
+ "strict": false,
7
+ "created_at": "2026-02-02T10:28:51.466422Z",
8
+ "updated_at": "2026-02-02T10:28:51.466422Z",
9
+ "created_by": "BUDISANTOSO",
10
+ "updated_by": "BUDISANTOSO"
11
+ }
@@ -0,0 +1,29 @@
1
+ {
2
+ "version": "mandor.v1",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "rules": {
5
+ "task": {
6
+ "dependency": "same_project_only",
7
+ "cycle": "disallowed"
8
+ },
9
+ "feature": {
10
+ "dependency": "cross_project_allowed",
11
+ "cycle": "disallowed"
12
+ },
13
+ "issue": {
14
+ "dependency": "same_project_only",
15
+ "cycle": "disallowed"
16
+ },
17
+ "priority": {
18
+ "levels": [
19
+ "P0",
20
+ "P1",
21
+ "P2",
22
+ "P3",
23
+ "P4",
24
+ "P5"
25
+ ],
26
+ "default": "P3"
27
+ }
28
+ }
29
+ }
@@ -0,0 +1,3 @@
1
+ {"id":"test-proj-feature-qgFb-task-9fse","feature_id":"test-proj-feature-qgFb","project_id":"test-proj","name":"Task 1","goal":"This is a comprehensive test task for testing the task summary command implementation in the CLI. The task involves comprehensive testing of all the features that were recently implemented. It should cover multiple scenarios including ready tasks, in-progress tasks, blocked tasks, pending tasks, and completed tasks. The implementation should handle all edge cases and error scenarios properly.\n\nThis task includes detailed testing of the markdown table output format to ensure proper alignment and formatting of all columns. The testing should verify that task IDs, names, priorities, and statuses are displayed correctly. It should also test filtering by priority levels and ensure that the output is properly sorted by creation date within each status group.\n\nThe task requires implementation of comprehensive error handling for invalid feature IDs and proper workspace initialization checks. The testing should cover scenarios where features don't exist, tasks don't exist, and various filter combinations. All error messages should be clear and helpful to the user.\n\nThe implementation should also include documentation and examples of how to use the new commands. This includes examples for each command type and explanation of the output format. The documentation should be clear and easy to follow for new users.","priority":"P3","status":"in_progress","implementation_steps":["Step 1","Step 2"],"test_cases":["Test 1","Test 2"],"derivable_files":["file1.go","file2.go"],"library_needs":["none"],"created_at":"2026-02-02T10:29:14.29734Z","updated_at":"2026-02-02T10:29:29.806828Z","created_by":"BUDISANTOSO","updated_by":"BUDISANTOSO"}
2
+ {"id":"test-proj-feature-qgFb-task-u4Sb","feature_id":"test-proj-feature-qgFb","project_id":"test-proj","name":"Task 2","goal":"This is a comprehensive test task for testing the task summary command implementation in the CLI. The task involves comprehensive testing of all the features that were recently implemented. It should cover multiple scenarios including ready tasks, in-progress tasks, blocked tasks, pending tasks, and completed tasks. The implementation should handle all edge cases and error scenarios properly.\n\nThis task includes detailed testing of the markdown table output format to ensure proper alignment and formatting of all columns. The testing should verify that task IDs, names, priorities, and statuses are displayed correctly. It should also test filtering by priority levels and ensure that the output is properly sorted by creation date within each status group.\n\nThe task requires implementation of comprehensive error handling for invalid feature IDs and proper workspace initialization checks. The testing should cover scenarios where features don't exist, tasks don't exist, and various filter combinations. All error messages should be clear and helpful to the user.\n\nThe implementation should also include documentation and examples of how to use the new commands. This includes examples for each command type and explanation of the output format. The documentation should be clear and easy to follow for new users.","priority":"P0","status":"in_progress","implementation_steps":["Step 1","Step 2"],"test_cases":["Test 1","Test 2"],"derivable_files":["file1.go","file2.go"],"library_needs":["none"],"created_at":"2026-02-02T10:29:16.665464Z","updated_at":"2026-02-02T10:29:33.953761Z","created_by":"BUDISANTOSO","updated_by":"BUDISANTOSO"}
3
+ {"id":"test-proj-feature-qgFb-task-CPT4","feature_id":"test-proj-feature-qgFb","project_id":"test-proj","name":"Task 3","goal":"This is a comprehensive test task for testing the task summary command implementation in the CLI. The task involves comprehensive testing of all the features that were recently implemented. It should cover multiple scenarios including ready tasks, in-progress tasks, blocked tasks, pending tasks, and completed tasks. The implementation should handle all edge cases and error scenarios properly.\n\nThis task includes detailed testing of the markdown table output format to ensure proper alignment and formatting of all columns. The testing should verify that task IDs, names, priorities, and statuses are displayed correctly. It should also test filtering by priority levels and ensure that the output is properly sorted by creation date within each status group.\n\nThe task requires implementation of comprehensive error handling for invalid feature IDs and proper workspace initialization checks. The testing should cover scenarios where features don't exist, tasks don't exist, and various filter combinations. All error messages should be clear and helpful to the user.\n\nThe implementation should also include documentation and examples of how to use the new commands. This includes examples for each command type and explanation of the output format. The documentation should be clear and easy to follow for new users.","priority":"P2","status":"done","implementation_steps":["Step 1","Step 2"],"test_cases":["Test 1","Test 2"],"derivable_files":["file1.go","file2.go"],"library_needs":["none"],"created_at":"2026-02-02T10:29:19.350275Z","updated_at":"2026-02-02T10:29:38.249316Z","created_by":"BUDISANTOSO","updated_by":"BUDISANTOSO"}
@@ -0,0 +1,13 @@
1
+ {
2
+ "id": "bPTh",
3
+ "name": "Mandor",
4
+ "version": "mandor.v1",
5
+ "schema_version": "mandor.v1",
6
+ "created_at": "2026-02-02T10:28:47.490328Z",
7
+ "last_updated_at": "2026-02-02T10:28:47.490328Z",
8
+ "created_by": "BUDISANTOSO",
9
+ "config": {
10
+ "default_priority": "P3",
11
+ "strict_mode": false
12
+ }
13
+ }
package/README.md CHANGED
@@ -1,12 +1,17 @@
1
1
  # Mandor - Event-Based Task Manager CLI for AI Agent Workflows
2
2
 
3
3
  <p align="center">
4
- <strong>Deterministic JSONL output | Streaming-native architecture | Schema-driven task management</strong>
4
+ <strong>Stop writing markdown plans. Start shipping features with deterministic task tracking.</strong>
5
+ </p>
6
+
7
+ <p align="center">
8
+ <strong>Event-sourced | Dependency-aware | CLI-native | Built for AI agents</strong>
5
9
  </p>
6
10
 
7
11
  <p align="center">
8
12
  <a href="#installation">Installation</a> •
9
13
  <a href="#quick-start">Quick Start</a> •
14
+ <a href="#why-mandor">Why Mandor</a> •
10
15
  <a href="#core-concepts">Core Concepts</a> •
11
16
  <a href="#commands">Commands</a> •
12
17
  <a href="#examples">Examples</a>
@@ -14,14 +19,28 @@
14
19
 
15
20
  ---
16
21
 
22
+ ## Why Mandor
23
+
24
+ **No More Markdown Plan Files**
25
+
26
+ Traditional workflows scatter task state across markdown files, spreadsheets, and Slack messages. Dependencies are manual, status is fiction, and progress is invisible until code review.
27
+
28
+ Mandor brings **deterministic task management** to AI agent workflows:
29
+
30
+ - **Single Source of Truth**: All state in `events.jsonl`—queryable, reproducible, auditable
31
+ - **Automatic Dependency Resolution**: Mark tasks done → dependents auto-transition to ready
32
+ - **Schema-Driven**: Enforce implementation steps, test cases, and library needs upfront
33
+ - **CLI-Native**: Works in terminal, scripts, and CI/CD pipelines
34
+ - **Event-Sourced**: Full audit trail of every status change
35
+
17
36
  ## Overview
18
37
 
19
38
  Mandor is a CLI tool for managing tasks, features, and issues in AI agent workflows:
20
39
 
21
- - **Event-Based Architecture**: All changes logged in `events.jsonl`
22
- - **JSONL Format**: Deterministic, append-only storage
23
- - **Dependency Tracking**: Automatic status based on dependencies
24
- - **Cross-Platform**: Go binary for macOS, Linux, Windows
40
+ - **Event-Based Architecture**: All changes logged in `events.jsonl` with immutable timestamps
41
+ - **JSONL Format**: Deterministic, append-only storage for reproducibility
42
+ - **Dependency Tracking**: Automatic status transitions when dependencies complete
43
+ - **Cross-Platform**: Go binary for macOS, Linux, Windows (arm64 & x64)
25
44
 
26
45
  ---
27
46
 
@@ -106,34 +125,72 @@ go build -o ./binaries/mandor ./cmd/mandor
106
125
 
107
126
  ```bash
108
127
  export MANDOR_ENV=development
109
- ./binaries/mandor init --workspace-name "My Project"
128
+ mandor init "My Project"
110
129
  ```
111
130
 
112
131
  ### 2. Create a Project
113
132
 
114
133
  ```bash
115
- ./binaries/mandor project create api --name "API Development" \
116
- --goal "Build REST API endpoints"
134
+ mandor project create api --name "API Development" \
135
+ --goal "Build REST API service with authentication and endpoints"
117
136
  ```
118
137
 
119
138
  ### 3. Create a Feature
120
139
 
121
140
  ```bash
122
- ./binaries/mandor feature create "Auth Feature" --project api \
123
- --goal "Implement authentication system" \
141
+ mandor feature create "Authentication" --project api \
142
+ --goal "Implement JWT-based authentication with login and refresh flows for secure API access" \
124
143
  --scope backend
125
144
  ```
126
145
 
127
- ### 4. Create Tasks
146
+ ### 4. Create Tasks with Dependencies
128
147
 
129
148
  ```bash
130
- ./binaries/mandor task create "JWT Parser" \
131
- --feature api-feature-xxx \
132
- --goal "Parse and validate JWT tokens" \
133
- --implementation-steps "none" \
134
- --test-cases "none" \
135
- --derivable-files "none" \
136
- --library-needs "none"
149
+ # Create first task (no dependencies)
150
+ mandor task create api-feature-xxx "JWT Parser" \
151
+ --goal "Parse and validate JWT tokens in incoming requests with expiry and signature verification" \
152
+ --implementation-steps "Setup crypto library|Add token validation|Handle expiry|Return errors" \
153
+ --test-cases "Valid token accepted|Expired token rejected|Invalid signature rejected" \
154
+ --derivable-files "jwt_validator.go|jwt_test.go" \
155
+ --library-needs "golang-jwt" \
156
+ --priority P1
157
+
158
+ # Create dependent task (depends on JWT Parser)
159
+ mandor task create api-feature-xxx "Login Endpoint" \
160
+ --goal "Accept user credentials and return JWT token with refresh token flow" \
161
+ --implementation-steps "Setup endpoint|Validate credentials|Generate JWT|Return tokens" \
162
+ --test-cases "Valid creds return token|Invalid creds rejected|Tokens properly formatted" \
163
+ --derivable-files "login_handler.go|login_test.go" \
164
+ --library-needs "none" \
165
+ --depends-on api-task-xxx-001 \
166
+ --priority P1
167
+ ```
168
+
169
+ ### 5. View Task Progress
170
+
171
+ ```bash
172
+ # See all tasks in feature
173
+ mandor task list api-feature-xxx
174
+
175
+ # See tasks ready to work on
176
+ mandor task ready api-feature-xxx
177
+
178
+ # See blocked/waiting tasks
179
+ mandor task blocked api-feature-xxx
180
+
181
+ # See summary grouped by status
182
+ mandor task summary api-feature-xxx
183
+ ```
184
+
185
+ ### 6. Mark Tasks Complete
186
+
187
+ ```bash
188
+ # Get task ID from list
189
+ mandor task update <task-id> --status in_progress
190
+ mandor task update <task-id> --status done
191
+
192
+ # Dependent tasks auto-transition to "ready"
193
+ mandor task ready api-feature-xxx # Now shows "Login Endpoint" as ready
137
194
  ```
138
195
 
139
196
  ---
@@ -193,52 +250,98 @@ mandor feature update <id> --project <id> --cancel --reason "Reason"
193
250
  ### Task Commands
194
251
 
195
252
  ```bash
196
- # Create a task
197
- mandor task create "Name" --feature <id> -g "Goal" \
198
- --implementation-steps "step1|step2" \
199
- --test-cases "test1|test2" \
200
- --derivable-files "file1|file2" \
253
+ # Create a task (positional arguments: feature_id, name)
254
+ mandor task create <feature_id> "<name>" \
255
+ --goal "Task description (min 500 chars)" \
256
+ --implementation-steps "step1|step2|step3" \
257
+ --test-cases "test1|test2|test3" \
258
+ --derivable-files "file1.go|file2.go" \
201
259
  --library-needs "lib1|lib2" \
202
260
  [--priority <P0-P5>] \
203
261
  [--depends-on <task-id>]
204
262
 
205
- # List tasks
206
- mandor task list --feature <id> [--status <value>] [--priority <value>]
263
+ # List tasks in a feature (positional argument: feature_id)
264
+ mandor task list <feature_id> [--status <value>] [--priority <value>] [--json]
265
+
266
+ # Show ready tasks (available to work on)
267
+ mandor task ready <feature_id> [--priority <P0-P5>] [--json]
268
+
269
+ # Show blocked tasks (waiting on dependencies)
270
+ mandor task blocked <feature_id> [--priority <P0-P5>] [--json]
271
+
272
+ # Show task summary (grouped by status)
273
+ mandor task summary <feature_id>
207
274
 
208
275
  # Show task details
209
276
  mandor task detail <task-id> [--include-deleted] [--events] [--dependencies]
210
277
 
211
- # Update task
212
- mandor task update <id> [--status <value>] \
213
- [--cancel --reason] [--reopen] \
214
- [--depends <ids>] [--depends-add <ids>] [--depends-remove <ids>]
278
+ # Update task status
279
+ mandor task update <id> --status <value>
215
280
 
216
- # Complete a task (in_progress done)
281
+ # Transition task to work on it
217
282
  mandor task update <id> --status in_progress
283
+
284
+ # Mark task complete (auto-unblocks dependents)
218
285
  mandor task update <id> --status done
286
+
287
+ # Block task manually (external dependency)
288
+ mandor task update <id> --status blocked --reason "Waiting on API response"
289
+
290
+ # Cancel task
291
+ mandor task update <id> --cancel --reason "Superseded by feature X"
292
+
293
+ # Reopen cancelled task
294
+ mandor task update <id> --reopen
219
295
  ```
220
296
 
221
297
  ### Issue Commands
222
298
 
223
299
  ```bash
224
300
  # Create an issue
225
- mandor issue create "Name" --project <id> -t <type> -g "Goal" \
226
- --affected-files "file1" \
227
- --affected-tests "test1" \
228
- --implementation-steps "step1" \
301
+ mandor issue create <project_id> "<name>" \
302
+ --type <type> \
303
+ --goal "Issue description (min 200 chars)" \
304
+ --affected-files "file1|file2" \
305
+ --affected-tests "test1|test2" \
306
+ --implementation-steps "step1|step2" \
229
307
  [--priority <P0-P5>] \
230
308
  [--depends-on <issue-id>]
231
309
 
232
- # List issues
233
- mandor issue list --project <id> [--status <value>] [--type <value>]
310
+ # List issues in a project
311
+ mandor issue list <project_id> [--status <value>] [--type <value>] [--json]
312
+
313
+ # Show ready issues (available to fix)
314
+ mandor issue ready <project_id> [--type <type>] [--priority <P0-P5>] [--json]
315
+
316
+ # Show blocked issues (waiting on dependencies)
317
+ mandor issue blocked <project_id> [--type <type>] [--priority <P0-P5>] [--json]
318
+
319
+ # Show issue summary (grouped by status)
320
+ mandor issue summary <project_id>
234
321
 
235
322
  # Show issue details
236
323
  mandor issue detail <issue-id> [--include-deleted]
237
324
 
238
- # Update issue
239
- mandor issue update <id> [--status <value>] [--start] [--resolve] \
240
- [--wontfix --reason] [--reopen] \
241
- [--depends-on <ids>]
325
+ # Update issue status
326
+ mandor issue update <id> --status <value>
327
+
328
+ # Start working on an issue
329
+ mandor issue update <id> --start
330
+
331
+ # Mark issue resolved
332
+ mandor issue update <id> --resolve
333
+
334
+ # Mark issue as won't fix
335
+ mandor issue update <id> --wontfix --reason "Working as intended"
336
+
337
+ # Reopen a resolved/wontfix issue
338
+ mandor issue update <id> --reopen
339
+
340
+ # Block issue manually
341
+ mandor issue update <id> --status blocked --reason "Waiting on infrastructure"
342
+
343
+ # Cancel issue (duplicate/no longer relevant)
344
+ mandor issue update <id> --cancel --reason "Duplicate of issue #123"
242
345
  ```
243
346
 
244
347
  ---
@@ -487,117 +590,238 @@ grep '"type":"status_changed"' .mandor/events.jsonl | wc -l
487
590
  ### Complete Feature Workflow
488
591
 
489
592
  ```bash
490
- # Setup
491
- mandor init --workspace-name "API Project"
492
- mandor project create api --name "API" --goal "Build REST API"
493
- mandor feature create "Auth" --project api --goal "Authentication" --scope backend
593
+ # Initialize and create project
594
+ export MANDOR_ENV=development
595
+ mandor init "API Project"
596
+ mandor project create api --name "REST API" --goal "Build production REST API with authentication"
494
597
 
495
- # Create tasks with dependencies
496
- mandor task create "JWT Parser" --feature auth-xxx \
497
- -g "Parse JWT tokens" --implementation-steps "none" \
498
- --test-cases "none" --derivable-files "none" --library-needs "none"
598
+ # Create feature (structured epic)
599
+ mandor feature create "Authentication" --project api \
600
+ --goal "Implement JWT-based auth with login, logout, and token refresh flows" \
601
+ --scope backend
499
602
 
500
- mandor task create "JWT Validator" --feature auth-xxx \
501
- -g "Validate JWT tokens" --implementation-steps "none" \
502
- --test-cases "none" --derivable-files "none" --library-needs "none" \
503
- --depends-on jwt-parser-task-id
603
+ # Create first task (no dependencies)
604
+ mandor task create api-feature-xxx "JWT Parser" \
605
+ --goal "Parse and validate JWT tokens with signature verification and expiry checks" \
606
+ --implementation-steps "Import crypto library|Implement token parsing|Add signature validation|Handle expiry" \
607
+ --test-cases "Valid token accepted|Invalid signature rejected|Expired token rejected" \
608
+ --derivable-files "jwt_parser.go|jwt_parser_test.go" \
609
+ --library-needs "golang-jwt" \
610
+ --priority P1
611
+
612
+ # Create dependent task
613
+ mandor task create api-feature-xxx "JWT Validator" \
614
+ --goal "Create middleware to validate JWT tokens in incoming requests" \
615
+ --implementation-steps "Create middleware|Validate token|Check expiry|Return errors" \
616
+ --test-cases "Valid requests pass|Invalid requests rejected|Error responses correct" \
617
+ --derivable-files "auth_middleware.go|auth_middleware_test.go" \
618
+ --library-needs "none" \
619
+ --depends-on <jwt-parser-id> \
620
+ --priority P1
621
+
622
+ # Create another dependent task
623
+ mandor task create api-feature-xxx "Login Endpoint" \
624
+ --goal "Accept credentials and return JWT token pair with refresh token" \
625
+ --implementation-steps "Setup endpoint|Validate credentials|Generate JWT|Store refresh token|Return tokens" \
626
+ --test-cases "Valid creds return tokens|Invalid creds rejected|Tokens formatted correctly" \
627
+ --derivable-files "login_handler.go|login_handler_test.go" \
628
+ --library-needs "none" \
629
+ --depends-on <jwt-parser-id> \
630
+ --priority P1
631
+
632
+ # View progress and blocking status
633
+ mandor task list api-feature-xxx # See all tasks
634
+ mandor task ready api-feature-xxx # Only JWT Parser is ready
635
+ mandor task blocked api-feature-xxx # Validator and Login waiting on Parser
636
+ mandor task summary api-feature-xxx # Grouped summary
504
637
 
505
638
  # Execute workflow
506
- mandor task update jwt-parser-id --status in_progress
507
- mandor task update jwt-parser-id --status done
639
+ mandor task update <jwt-parser-id> --status in_progress
640
+ mandor task update <jwt-parser-id> --status done
641
+
642
+ # Now Validator and Login auto-transition to ready
643
+ mandor task ready api-feature-xxx # Both now ready to start
644
+
645
+ # Work on dependent tasks
646
+ mandor task update <jwt-validator-id> --status in_progress
647
+ mandor task update <jwt-validator-id> --status done
508
648
 
509
- # Validator automatically becomes ready
510
- mandor task update jwt-validator-id --status in_progress
511
- mandor task update jwt-validator-id --status done
649
+ mandor task update <login-endpoint-id> --status in_progress
650
+ mandor task update <login-endpoint-id> --status done
512
651
 
513
- # Mark feature done
514
- mandor feature update auth-xxx --project api --status active
515
- mandor feature update auth-xxx --project api --status done
652
+ # Mark feature complete
653
+ mandor feature update api-feature-xxx --project api --status active
654
+ mandor feature update api-feature-xxx --project api --status done
516
655
  ```
517
656
 
518
657
  ### Multi-Project Dependencies
519
658
 
520
659
  ```bash
521
- # Create projects with cross-project enabled
522
- mandor project create core --name "Core" --goal "Core library"
523
- mandor project create api --name "API" --goal "API layer" --task-dep cross_project_allowed
524
-
525
- # Create task in core
526
- mandor feature create lib --project core --goal "Core library"
527
- mandor task create "DB Connection" --feature lib-xxx \
528
- -g "Database connection" --implementation-steps "none" \
529
- --test-cases "none" --derivable-files "none" --library-needs "none"
660
+ # Create projects with cross-project dependencies enabled
661
+ mandor project create core --name "Core Library" \
662
+ --goal "Shared database and utility libraries"
663
+ mandor project create api --name "API Service" \
664
+ --goal "REST API service" --task-dep cross_project_allowed
665
+
666
+ # Create shared library feature and task
667
+ mandor feature create "Database Layer" --project core \
668
+ --goal "Connection pool and query builder for database access" \
669
+ --scope backend
530
670
 
531
- # Create task in api depending on core task
532
- mandor feature create endpoints --project api --goal "API endpoints"
533
- mandor task create "User Endpoint" --feature endpoints-xxx \
534
- -g "User API endpoint" --implementation-steps "none" \
535
- --test-cases "none" --derivable-files "none" --library-needs "none" \
536
- --depends-on db-connection-task-id
671
+ mandor task create core-feature-xxx "Database Connection Pool" \
672
+ --goal "Implement connection pool with health checks and auto-reconnect" \
673
+ --implementation-steps "Create pool|Setup health check|Auto-reconnect|Connection limits" \
674
+ --test-cases "Pool creates connections|Health check works|Reconnect on failure" \
675
+ --derivable-files "db_pool.go|db_pool_test.go" \
676
+ --library-needs "pgx|pgxpool" \
677
+ --priority P0
678
+
679
+ # Create API feature depending on core library task
680
+ mandor feature create "User Endpoints" --project api \
681
+ --goal "User CRUD endpoints backed by database" \
682
+ --scope backend
537
683
 
538
- # Complete core task, api task becomes ready
539
- mandor task update db-connection-id --status in_progress
540
- mandor task update db-connection-id --status done
684
+ mandor task create api-feature-xxx "User API Handler" \
685
+ --goal "Create REST endpoints for user CRUD operations" \
686
+ --implementation-steps "Setup handler|Implement GET|Implement POST|Implement DELETE" \
687
+ --test-cases "GET returns user|POST creates user|DELETE removes user" \
688
+ --derivable-files "user_handler.go|user_handler_test.go" \
689
+ --library-needs "gin|none" \
690
+ --depends-on <db-pool-task-id> \
691
+ --priority P0
692
+
693
+ # Check progress
694
+ mandor task list core-feature-xxx # DB Pool ready to start
695
+ mandor task blocked api-feature-xxx # User Handler blocked on DB Pool
696
+
697
+ # Complete core task, dependents auto-unblock
698
+ mandor task update <db-pool-task-id> --status in_progress
699
+ mandor task update <db-pool-task-id> --status done
700
+
701
+ # API task now ready
702
+ mandor task ready api-feature-xxx # User Handler now ready
541
703
  ```
542
704
 
543
705
  ### Issue Tracking with Dependencies
544
706
 
545
707
  ```bash
546
- # Create blocking issues
547
- mandor issue create "Data Validation Bug" --project api -t bug \
548
- -g "Fix data validation" --affected-files "validate.js" \
549
- --affected-tests "validate_test.js" --implementation-steps "step1"
550
-
551
- mandor issue create "Cache Issue" --project api -t bug \
552
- -g "Fix cache issue" --affected-files "cache.js" \
553
- --affected-tests "cache_test.js" --implementation-steps "step1"
554
-
555
- # Create dependent issue
556
- mandor issue create "Database Crash" --project api -t bug \
557
- -g "Fix crash" --affected-files "db.js" \
558
- --affected-tests "db_test.js" --implementation-steps "step1" \
559
- --depends-on data-validation-id|cache-issue-id
560
-
561
- # Resolve blocking issues
562
- mandor issue update data-validation-id --resolve
563
- mandor issue update cache-issue-id --resolve
564
-
565
- # Dependent issue automatically becomes ready
566
- mandor issue update database-crash-id --start
567
- mandor issue update database-crash-id --resolve
708
+ # Create blocker issues
709
+ mandor issue create api "Data Validation Bug" \
710
+ --type bug \
711
+ --goal "Fix data validation allowing invalid emails to pass through" \
712
+ --affected-files "validate.go|email_validator.go" \
713
+ --affected-tests "validate_test.go|email_validator_test.go" \
714
+ --implementation-steps "Add email regex|Add domain check|Add test cases" \
715
+ --priority P0
716
+
717
+ mandor issue create api "Cache Consistency Issue" \
718
+ --type bug \
719
+ --goal "Fix race condition in cache invalidation causing stale data" \
720
+ --affected-files "cache.go|invalidation.go" \
721
+ --affected-tests "cache_test.go" \
722
+ --implementation-steps "Add mutex|Refactor invalidation|Add concurrency tests" \
723
+ --priority P0
724
+
725
+ # Create dependent issue (depends on blockers)
726
+ mandor issue create api "High Memory Usage in Production" \
727
+ --type bug \
728
+ --goal "Fix memory leak causing OOM errors in production due to cache and validation issues" \
729
+ --affected-files "main.go|memory.go" \
730
+ --affected-tests "memory_test.go" \
731
+ --implementation-steps "Profile memory|Identify leaks|Fix validation and cache" \
732
+ --depends-on <data-validation-bug-id>|<cache-issue-id> \
733
+ --priority P0
734
+
735
+ # Check status
736
+ mandor issue ready api # Both blockers ready
737
+ mandor issue blocked api # Memory issue blocked
738
+
739
+ # Resolve blocking issues (order doesn't matter)
740
+ mandor issue update <data-validation-bug-id> --start
741
+ mandor issue update <data-validation-bug-id> --resolve
742
+
743
+ mandor issue update <cache-issue-id> --start
744
+ mandor issue update <cache-issue-id> --resolve
745
+
746
+ # Check progress
747
+ mandor issue ready api # Memory issue now ready
748
+ mandor issue summary api # See all status groups
749
+
750
+ # Fix dependent issue
751
+ mandor issue update <memory-issue-id> --start
752
+ mandor issue update <memory-issue-id> --resolve
568
753
  ```
569
754
 
570
755
  ### Cancel and Reopen Workflow
571
756
 
572
757
  ```bash
573
- # Create feature and tasks
574
- mandor feature create "Experiment" --project api --goal "Try something"
575
- mandor task create "Try X" --feature experiment-xxx -g "Test X" \
576
- --implementation-steps "none" --test-cases "none" \
577
- --derivable-files "none" --library-needs "none"
758
+ # Create experimental feature and tasks
759
+ mandor feature create "OAuth2 Investigation" --project api \
760
+ --goal "Research OAuth2 integration options" \
761
+ --scope backend
578
762
 
579
- # Cancel the feature
580
- mandor feature update experiment-xxx --project api --cancel --reason "Not needed"
763
+ mandor task create api-feature-xxx "Compare OAuth2 Libraries" \
764
+ --goal "Research and compare auth0, okta, and open-source options" \
765
+ --implementation-steps "Create comparison spreadsheet|Evaluate pros/cons|Estimate effort" \
766
+ --test-cases "Evaluation complete|Team consensus reached" \
767
+ --derivable-files "oauth2_comparison.md" \
768
+ --library-needs "none" \
769
+ --priority P2
770
+
771
+ mandor task create api-feature-xxx "Proof of Concept" \
772
+ --goal "Build minimal OAuth2 integration demo" \
773
+ --implementation-steps "Setup oauth lib|Create login flow|Test flow" \
774
+ --test-cases "Login works|Token refresh works" \
775
+ --derivable-files "poc_oauth.go|poc_oauth_test.go" \
776
+ --library-needs "none" \
777
+ --priority P2
581
778
 
582
- # Cannot create new tasks in cancelled feature
583
- mandor task create "Try Y" --feature experiment-xxx -g "Test Y" \
584
- --implementation-steps "none" --test-cases "none" \
585
- --derivable-files "none" --library-needs "none"
586
- # Error: "Cannot create task for cancelled feature"
779
+ # List tasks
780
+ mandor task list api-feature-xxx # Show feature tasks
587
781
 
588
- # Reopen the feature
589
- mandor feature update experiment-xxx --project api --reopen
782
+ # Change requirements, decide not to pursue OAuth2
783
+ mandor feature update api-feature-xxx --project api \
784
+ --cancel --reason "Sticking with JWT, OAuth2 adds too much complexity"
590
785
 
591
- # Can create tasks again
592
- mandor task create "Try Y" --feature experiment-xxx -g "Test Y" \
593
- --implementation-steps "none" --test-cases "none" \
594
- --derivable-files "none" --library-needs "none"
786
+ # Try to create new task (fails)
787
+ mandor task create api-feature-xxx "Integration Tests" \
788
+ --goal "Add integration tests" \
789
+ --implementation-steps "none" \
790
+ --test-cases "none" \
791
+ --derivable-files "none" \
792
+ --library-needs "none"
793
+ # Error: "Cannot create task for cancelled feature"
794
+
795
+ # Change mind - reopen the feature to continue research
796
+ mandor feature update api-feature-xxx --project api --reopen
797
+
798
+ # Can now create tasks again
799
+ mandor task list api-feature-xxx # Previous tasks still exist
800
+ mandor task create api-feature-xxx "Hybrid Approach" \
801
+ --goal "Combine JWT with optional OAuth2 for third-party apps" \
802
+ --implementation-steps "Design hybrid flow|Implement dual auth|Test both flows" \
803
+ --test-cases "JWT still works|OAuth2 works|Both interoperable" \
804
+ --derivable-files "hybrid_auth.go" \
805
+ --library-needs "oauth2lib" \
806
+ --priority P3
595
807
  ```
596
808
 
597
809
  ---
598
810
 
599
811
  ## Best Practices
600
812
 
813
+ ### Mandor vs. Markdown Plan Files
814
+
815
+ | Problem | Markdown Plans | Mandor |
816
+ |---------|---|---|
817
+ | Single source of truth | ❌ Scattered across multiple files | ✓ Centralized `events.jsonl` |
818
+ | Dependency tracking | ❌ Manual, often wrong | ✓ Automatic status transitions |
819
+ | Progress visibility | ❌ Requires manual updates | ✓ Real-time status queries |
820
+ | Audit trail | ❌ Git history only | ✓ Immutable event log |
821
+ | Blocking detection | ❌ Must review files | ✓ `mandor task blocked <id>` |
822
+ | Schema validation | ❌ Free-form text | ✓ Enforced structure |
823
+ | Automation | ❌ Parse text with regex | ✓ JSON queryable for scripts |
824
+
601
825
  ### 1. Use Meaningful IDs
602
826
 
603
827
  Project and feature IDs should be:
@@ -664,6 +888,54 @@ mandor config set default_priority P2
664
888
  mandor config set strict_mode true
665
889
  ```
666
890
 
891
+ ### 9. Stop Writing Markdown Plan Files
892
+
893
+ Replace this workflow:
894
+
895
+ ```markdown
896
+ # PLAN.md
897
+ ## Phase 1: Authentication
898
+ - [ ] JWT parser (depends on cryptography)
899
+ - [ ] Login endpoint (depends on JWT parser)
900
+ - ...
901
+ # Status: Last updated 3 days ago
902
+ ```
903
+
904
+ With this:
905
+
906
+ ```bash
907
+ # Create structured plan
908
+ mandor feature create "Authentication" --project api \
909
+ --goal "Implement JWT and login endpoints" \
910
+ --scope backend
911
+
912
+ # Create tasks with explicit dependencies
913
+ mandor task create "JWT Parser" --feature auth-xxx \
914
+ -g "Validate JWT tokens..." \
915
+ --implementation-steps "Step 1|Step 2" \
916
+ --test-cases "Test invalid tokens|Test expired" \
917
+ --library-needs "jsonwebtoken" \
918
+ --priority P1
919
+
920
+ mandor task create "Login Endpoint" --feature auth-xxx \
921
+ -g "Accept credentials and return JWT..." \
922
+ --depends-on jwt-parser-id \
923
+ --priority P1
924
+
925
+ # Real-time progress queries
926
+ mandor task ready auth-xxx # See what's available now
927
+ mandor task blocked auth-xxx # See what's waiting
928
+ mandor task summary auth-xxx # See grouped status
929
+ ```
930
+
931
+ Benefits:
932
+ - No file sync required
933
+ - Dependencies auto-validated
934
+ - Blocking tasks auto-detected
935
+ - Reproducible state (`events.jsonl`)
936
+ - Queryable via CLI or JSON
937
+ - Works in CI/CD pipelines
938
+
667
939
  ---
668
940
 
669
941
  ## Troubleshooting
package/bin/mandor ADDED
Binary file
Binary file
Binary file
Binary file
Binary file
package/mandor-cli ADDED
Binary file
package/mandor-test ADDED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mandors/cli",
3
- "version": "0.3.6",
3
+ "version": "0.3.9",
4
4
  "description": "Event-based task manager CLI for AI agent workflows",
5
5
  "main": "npm/lib/index.js",
6
6
  "bin": {