@mandors/cli 0.3.2 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (186) hide show
  1. package/.mandor/projects/cancel-reopen/events.jsonl +18 -0
  2. package/.mandor/projects/cancel-reopen/features.jsonl +3 -0
  3. package/.mandor/projects/cancel-reopen/issues.jsonl +1 -0
  4. package/.mandor/projects/cancel-reopen/project.jsonl +11 -0
  5. package/.mandor/projects/cancel-reopen/schema.json +29 -0
  6. package/.mandor/projects/cancel-reopen/tasks.jsonl +2 -0
  7. package/.mandor/projects/config-test/events.jsonl +4 -0
  8. package/.mandor/projects/config-test/features.jsonl +1 -0
  9. package/.mandor/projects/config-test/issues.jsonl +0 -0
  10. package/.mandor/projects/config-test/project.jsonl +11 -0
  11. package/.mandor/projects/config-test/schema.json +29 -0
  12. package/.mandor/projects/config-test/tasks.jsonl +1 -0
  13. package/.mandor/projects/cross-dep-1/events.jsonl +6 -0
  14. package/.mandor/projects/cross-dep-1/features.jsonl +1 -0
  15. package/.mandor/projects/cross-dep-1/issues.jsonl +0 -0
  16. package/.mandor/projects/cross-dep-1/project.jsonl +11 -0
  17. package/.mandor/projects/cross-dep-1/schema.json +29 -0
  18. package/.mandor/projects/cross-dep-1/tasks.jsonl +1 -0
  19. package/.mandor/projects/cross-dep-2/events.jsonl +5 -0
  20. package/.mandor/projects/cross-dep-2/features.jsonl +1 -0
  21. package/.mandor/projects/cross-dep-2/issues.jsonl +0 -0
  22. package/.mandor/projects/cross-dep-2/project.jsonl +11 -0
  23. package/.mandor/projects/cross-dep-2/schema.json +29 -0
  24. package/.mandor/projects/cross-dep-2/tasks.jsonl +1 -0
  25. package/.mandor/projects/cycle-test/events.jsonl +8 -0
  26. package/.mandor/projects/cycle-test/features.jsonl +1 -0
  27. package/.mandor/projects/cycle-test/issues.jsonl +0 -0
  28. package/.mandor/projects/cycle-test/project.jsonl +11 -0
  29. package/.mandor/projects/cycle-test/schema.json +29 -0
  30. package/.mandor/projects/cycle-test/tasks.jsonl +3 -0
  31. package/.mandor/projects/cycle-test-2/events.jsonl +4 -0
  32. package/.mandor/projects/cycle-test-2/features.jsonl +1 -0
  33. package/.mandor/projects/cycle-test-2/issues.jsonl +0 -0
  34. package/.mandor/projects/cycle-test-2/project.jsonl +11 -0
  35. package/.mandor/projects/cycle-test-2/schema.json +29 -0
  36. package/.mandor/projects/cycle-test-2/tasks.jsonl +1 -0
  37. package/.mandor/projects/deep-chain/events.jsonl +8 -0
  38. package/.mandor/projects/deep-chain/features.jsonl +1 -0
  39. package/.mandor/projects/deep-chain/issues.jsonl +0 -0
  40. package/.mandor/projects/deep-chain/project.jsonl +11 -0
  41. package/.mandor/projects/deep-chain/schema.json +29 -0
  42. package/.mandor/projects/deep-chain/tasks.jsonl +3 -0
  43. package/.mandor/projects/feature-chain/events.jsonl +12 -0
  44. package/.mandor/projects/feature-chain/features.jsonl +3 -0
  45. package/.mandor/projects/feature-chain/issues.jsonl +0 -0
  46. package/.mandor/projects/feature-chain/project.jsonl +11 -0
  47. package/.mandor/projects/feature-chain/schema.json +29 -0
  48. package/.mandor/projects/feature-chain/tasks.jsonl +1 -0
  49. package/.mandor/projects/feature-lock/events.jsonl +5 -0
  50. package/.mandor/projects/feature-lock/features.jsonl +1 -0
  51. package/.mandor/projects/feature-lock/issues.jsonl +0 -0
  52. package/.mandor/projects/feature-lock/project.jsonl +11 -0
  53. package/.mandor/projects/feature-lock/schema.json +29 -0
  54. package/.mandor/projects/feature-lock/tasks.jsonl +1 -0
  55. package/.mandor/projects/issue-state/events.jsonl +7 -0
  56. package/.mandor/projects/issue-state/features.jsonl +0 -0
  57. package/.mandor/projects/issue-state/issues.jsonl +2 -0
  58. package/.mandor/projects/issue-state/project.jsonl +11 -0
  59. package/.mandor/projects/issue-state/schema.json +29 -0
  60. package/.mandor/projects/issue-state/tasks.jsonl +0 -0
  61. package/.mandor/projects/issue-types/events.jsonl +19 -0
  62. package/.mandor/projects/issue-types/features.jsonl +0 -0
  63. package/.mandor/projects/issue-types/issues.jsonl +6 -0
  64. package/.mandor/projects/issue-types/project.jsonl +11 -0
  65. package/.mandor/projects/issue-types/schema.json +29 -0
  66. package/.mandor/projects/issue-types/tasks.jsonl +0 -0
  67. package/.mandor/projects/multi-chain-1/events.jsonl +6 -0
  68. package/.mandor/projects/multi-chain-1/features.jsonl +1 -0
  69. package/.mandor/projects/multi-chain-1/issues.jsonl +0 -0
  70. package/.mandor/projects/multi-chain-1/project.jsonl +11 -0
  71. package/.mandor/projects/multi-chain-1/schema.json +29 -0
  72. package/.mandor/projects/multi-chain-1/tasks.jsonl +1 -0
  73. package/.mandor/projects/multi-chain-2/events.jsonl +7 -0
  74. package/.mandor/projects/multi-chain-2/features.jsonl +1 -0
  75. package/.mandor/projects/multi-chain-2/issues.jsonl +0 -0
  76. package/.mandor/projects/multi-chain-2/project.jsonl +11 -0
  77. package/.mandor/projects/multi-chain-2/schema.json +29 -0
  78. package/.mandor/projects/multi-chain-2/tasks.jsonl +1 -0
  79. package/.mandor/projects/multi-chain-3/events.jsonl +7 -0
  80. package/.mandor/projects/multi-chain-3/features.jsonl +1 -0
  81. package/.mandor/projects/multi-chain-3/issues.jsonl +0 -0
  82. package/.mandor/projects/multi-chain-3/project.jsonl +11 -0
  83. package/.mandor/projects/multi-chain-3/schema.json +29 -0
  84. package/.mandor/projects/multi-chain-3/tasks.jsonl +1 -0
  85. package/.mandor/projects/priority-filter/events.jsonl +10 -0
  86. package/.mandor/projects/priority-filter/features.jsonl +1 -0
  87. package/.mandor/projects/priority-filter/issues.jsonl +0 -0
  88. package/.mandor/projects/priority-filter/project.jsonl +11 -0
  89. package/.mandor/projects/priority-filter/schema.json +29 -0
  90. package/.mandor/projects/priority-filter/tasks.jsonl +4 -0
  91. package/.mandor/projects/priority-test/events.jsonl +4 -0
  92. package/.mandor/projects/priority-test/features.jsonl +1 -0
  93. package/.mandor/projects/priority-test/issues.jsonl +0 -0
  94. package/.mandor/projects/priority-test/project.jsonl +11 -0
  95. package/.mandor/projects/priority-test/schema.json +29 -0
  96. package/.mandor/projects/priority-test/tasks.jsonl +1 -0
  97. package/.mandor/projects/same-only-1/events.jsonl +4 -0
  98. package/.mandor/projects/same-only-1/features.jsonl +1 -0
  99. package/.mandor/projects/same-only-1/issues.jsonl +0 -0
  100. package/.mandor/projects/same-only-1/project.jsonl +11 -0
  101. package/.mandor/projects/same-only-1/schema.json +29 -0
  102. package/.mandor/projects/same-only-1/tasks.jsonl +1 -0
  103. package/.mandor/projects/same-only-2/events.jsonl +2 -0
  104. package/.mandor/projects/same-only-2/features.jsonl +1 -0
  105. package/.mandor/projects/same-only-2/issues.jsonl +0 -0
  106. package/.mandor/projects/same-only-2/project.jsonl +11 -0
  107. package/.mandor/projects/same-only-2/schema.json +29 -0
  108. package/.mandor/projects/same-only-2/tasks.jsonl +0 -0
  109. package/.mandor/projects/scope-constraint/events.jsonl +4 -0
  110. package/.mandor/projects/scope-constraint/features.jsonl +3 -0
  111. package/.mandor/projects/scope-constraint/issues.jsonl +0 -0
  112. package/.mandor/projects/scope-constraint/project.jsonl +11 -0
  113. package/.mandor/projects/scope-constraint/schema.json +29 -0
  114. package/.mandor/projects/scope-constraint/tasks.jsonl +0 -0
  115. package/.mandor/projects/scope-test/events.jsonl +2 -0
  116. package/.mandor/projects/scope-test/features.jsonl +1 -0
  117. package/.mandor/projects/scope-test/issues.jsonl +0 -0
  118. package/.mandor/projects/scope-test/project.jsonl +11 -0
  119. package/.mandor/projects/scope-test/schema.json +29 -0
  120. package/.mandor/projects/scope-test/tasks.jsonl +0 -0
  121. package/.mandor/projects/soft-delete-test/events.jsonl +14 -0
  122. package/.mandor/projects/soft-delete-test/features.jsonl +2 -0
  123. package/.mandor/projects/soft-delete-test/issues.jsonl +0 -0
  124. package/.mandor/projects/soft-delete-test/project.jsonl +11 -0
  125. package/.mandor/projects/soft-delete-test/schema.json +29 -0
  126. package/.mandor/projects/soft-delete-test/tasks.jsonl +4 -0
  127. package/.mandor/projects/status-flow/events.jsonl +29 -0
  128. package/.mandor/projects/status-flow/features.jsonl +3 -0
  129. package/.mandor/projects/status-flow/issues.jsonl +1 -0
  130. package/.mandor/projects/status-flow/project.jsonl +11 -0
  131. package/.mandor/projects/status-flow/schema.json +29 -0
  132. package/.mandor/projects/status-flow/tasks.jsonl +5 -0
  133. package/.mandor/projects/task-field-test/events.jsonl +8 -0
  134. package/.mandor/projects/task-field-test/features.jsonl +1 -0
  135. package/.mandor/projects/task-field-test/issues.jsonl +0 -0
  136. package/.mandor/projects/task-field-test/project.jsonl +11 -0
  137. package/.mandor/projects/task-field-test/schema.json +29 -0
  138. package/.mandor/projects/task-field-test/tasks.jsonl +3 -0
  139. package/.mandor/projects/test-diamond/events.jsonl +21 -0
  140. package/.mandor/projects/test-diamond/features.jsonl +1 -0
  141. package/.mandor/projects/test-diamond/issues.jsonl +0 -0
  142. package/.mandor/projects/test-diamond/project.jsonl +11 -0
  143. package/.mandor/projects/test-diamond/schema.json +29 -0
  144. package/.mandor/projects/test-diamond/tasks.jsonl +4 -0
  145. package/.mandor/projects/test-fanin/events.jsonl +17 -0
  146. package/.mandor/projects/test-fanin/features.jsonl +1 -0
  147. package/.mandor/projects/test-fanin/issues.jsonl +0 -0
  148. package/.mandor/projects/test-fanin/project.jsonl +11 -0
  149. package/.mandor/projects/test-fanin/schema.json +29 -0
  150. package/.mandor/projects/test-fanin/tasks.jsonl +4 -0
  151. package/.mandor/projects/test-fanout/events.jsonl +18 -0
  152. package/.mandor/projects/test-fanout/features.jsonl +1 -0
  153. package/.mandor/projects/test-fanout/issues.jsonl +0 -0
  154. package/.mandor/projects/test-fanout/project.jsonl +11 -0
  155. package/.mandor/projects/test-fanout/schema.json +29 -0
  156. package/.mandor/projects/test-fanout/tasks.jsonl +5 -0
  157. package/.mandor/projects/test-linear/events.jsonl +21 -0
  158. package/.mandor/projects/test-linear/features.jsonl +1 -0
  159. package/.mandor/projects/test-linear/issues.jsonl +0 -0
  160. package/.mandor/projects/test-linear/project.jsonl +11 -0
  161. package/.mandor/projects/test-linear/schema.json +29 -0
  162. package/.mandor/projects/test-linear/tasks.jsonl +4 -0
  163. package/.mandor/workspace.json +13 -0
  164. package/README.md +591 -267
  165. package/binaries/darwin-arm64/mandor +0 -0
  166. package/binaries/darwin-arm64.tar.gz +0 -0
  167. package/binaries/darwin-x64/mandor +0 -0
  168. package/binaries/darwin-x64.tar.gz +0 -0
  169. package/binaries/linux-arm64/mandor +0 -0
  170. package/binaries/linux-arm64.tar.gz +0 -0
  171. package/binaries/linux-x64/mandor +0 -0
  172. package/binaries/linux-x64.tar.gz +0 -0
  173. package/binaries/mandor +0 -0
  174. package/binaries/win32-arm64/mandor.exe +0 -0
  175. package/binaries/win32-arm64.tar.gz +0 -0
  176. package/binaries/win32-x64/mandor.exe +0 -0
  177. package/binaries/win32-x64.tar.gz +0 -0
  178. package/package.json +1 -1
  179. package/testscen11/.mandor/projects/proj11/events.jsonl +38 -0
  180. package/testscen11/.mandor/projects/proj11/features.jsonl +3 -0
  181. package/testscen11/.mandor/projects/proj11/issues.jsonl +1 -0
  182. package/testscen11/.mandor/projects/proj11/project.jsonl +11 -0
  183. package/testscen11/.mandor/projects/proj11/schema.json +29 -0
  184. package/testscen11/.mandor/projects/proj11/tasks.jsonl +6 -0
  185. package/testscen11/.mandor/workspace.json +13 -0
  186. package/testscen12/.mandor/workspace.json +13 -0
package/README.md CHANGED
@@ -1,9 +1,5 @@
1
1
  # Mandor - Event-Based Task Manager CLI for AI Agent Workflows
2
2
 
3
- <p align="center">
4
- <img src="logo.png" alt="Mandor CLI">
5
- </p>
6
-
7
3
  <p align="center">
8
4
  <strong>Deterministic JSONL output | Streaming-native architecture | Schema-driven task management</strong>
9
5
  </p>
@@ -11,6 +7,7 @@
11
7
  <p align="center">
12
8
  <a href="#installation">Installation</a> •
13
9
  <a href="#quick-start">Quick Start</a> •
10
+ <a href="#core-concepts">Core Concepts</a> •
14
11
  <a href="#commands">Commands</a> •
15
12
  <a href="#examples">Examples</a>
16
13
  </p>
@@ -28,401 +25,728 @@ Mandor is a CLI tool for managing tasks, features, and issues in AI agent workfl
28
25
 
29
26
  ---
30
27
 
31
- ## Background: Why Mandor Was Built
28
+ ## Core Concepts
32
29
 
33
- Research on **Context Rot** reveals a critical challenge for AI agents: LLM performance degrades significantly as input token count increases.
30
+ ### Entity Hierarchy
34
31
 
35
- ### The Problem
32
+ ```
33
+ Workspace
34
+ └── Projects
35
+ └── Features
36
+ └── Tasks
37
+ └── Issues
38
+ ```
36
39
 
37
- AI agents working on long tasks accumulate conversation history, task notes, and context. Research shows:
40
+ ### Entity Types
38
41
 
39
- | Factor | Impact |
40
- |--------|--------|
41
- | Input Length | Performance drops 10-40% as tokens increase |
42
- | Irrelevant Content | Causes 15-30% error rate |
43
- | Task Complexity | Reasoning degrades faster than retrieval |
42
+ | Type | Purpose | Status Values |
43
+ |------|---------|---------------|
44
+ | **Task** | Work items within a feature | ready, in_progress, done, blocked, cancelled |
45
+ | **Feature** | Logical grouping of related tasks | draft, active, done, blocked, cancelled |
46
+ | **Issue** | Problems, bugs, or improvement requests | ready, in_progress, resolved, wontfix, blocked |
44
47
 
45
- Even simple retrieval tasks show degradation at scale. Benchmarks like "Needle in a Haystack" (NIAH) show near-perfect scores, but they test simple keyword matching - not real-world reasoning.
48
+ ### Dependency Types
46
49
 
47
- ### Why Structured Task Management Helps
50
+ - **Task Dependencies**: One task can depend on multiple tasks
51
+ - **Feature Dependencies**: Features can depend on other features
52
+ - **Issue Dependencies**: Issues can depend on other issues
48
53
 
49
- Instead of stuffing everything into the context window:
54
+ ### Status Transitions
50
55
 
51
- ```bash
52
- # Instead of: "Remember the 15 tasks from our conversation..."
53
-
54
- # Use Mandor to externalize state:
55
- mandor task list --project api --status pending
56
- # Returns compact JSON for parsing
56
+ **Tasks:**
57
+ ```
58
+ ready → in_progress → done
59
+ ready blocked (dependency not done)
60
+ blocked ready (dependencies resolved)
61
+ ready cancelled
62
+ cancelled → ready (reopen)
63
+ ```
57
64
 
58
- mandor task detail auth-feature-abc-task-xyz789
59
- # Exact state, no ambiguity
65
+ **Features:**
66
+ ```
67
+ draft → active → done
68
+ draft → blocked (dependency not done)
69
+ draft → cancelled
70
+ cancelled → draft (reopen)
60
71
  ```
61
72
 
62
- Mandor provides:
63
- - **Compact Context**: Replace verbose descriptions with structured JSON
64
- - **Deterministic Output**: JSONL format is reliable to parse
65
- - **Complete Audit Trail**: Event log shows what changed and when
66
- - **Dependency Enforcement**: Auto-blocking prevents invalid states
73
+ **Issues:**
74
+ ```
75
+ ready in_progress resolved
76
+ ready in_progress wontfix
77
+ ready blocked (dependency not done)
78
+ blocked → ready (dependencies resolved)
79
+ resolved → ready (reopen)
80
+ wontfix → ready (reopen)
81
+ ```
67
82
 
68
83
  ---
69
84
 
70
85
  ## Installation
71
86
 
72
- Mandor can be installed via curl or npm.
87
+ ### Build from Source
73
88
 
74
- ### Option 1: curl (Recommended for macOS/Linux)
89
+ ```bash
90
+ git clone https://github.com/budisantoso/mandor.git
91
+ cd mandor
92
+ go build -o ./binaries/mandor ./cmd/mandor
93
+ ```
75
94
 
76
- The fastest way to install Mandor on macOS or Linux:
95
+ ### Use from Binaries
77
96
 
78
97
  ```bash
79
- # Install latest stable version (to ~/.local/bin)
80
- curl -fsSL https://raw.githubusercontent.com/sanxzy/mandor/main/scripts/install.sh | sh
98
+ ./binaries/mandor --help
99
+ ```
81
100
 
82
- # Install to custom directory
83
- curl -fsSL https://raw.githubusercontent.com/sanxzy/mandor/main/scripts/install.sh | sh -s -- --prefix /usr/local/bin
101
+ ---
84
102
 
85
- # Install latest prerelease (beta versions)
86
- curl -fsSL https://raw.githubusercontent.com/sanxzy/mandor/main/scripts/install.sh | sh -s -- --prerelease
103
+ ## Quick Start
87
104
 
88
- # Install specific version
89
- curl -fsSL https://raw.githubusercontent.com/sanxzy/mandor/main/scripts/install.sh | sh -s -- --version v0.0.16
105
+ ### 1. Initialize Workspace
106
+
107
+ ```bash
108
+ export MANDOR_ENV=development
109
+ ./binaries/mandor init --workspace-name "My Project"
90
110
  ```
91
111
 
92
- **Default install location:** `$HOME/.local/bin/mandor`
112
+ ### 2. Create a Project
93
113
 
94
- **Add to PATH:**
95
114
  ```bash
96
- # For bash
97
- echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc && source ~/.bashrc
115
+ ./binaries/mandor project create api --name "API Development" \
116
+ --goal "Build REST API endpoints"
117
+ ```
98
118
 
99
- # For zsh
100
- echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc && source ~/.zshrc
119
+ ### 3. Create a Feature
120
+
121
+ ```bash
122
+ ./binaries/mandor feature create "Auth Feature" --project api \
123
+ --goal "Implement authentication system" \
124
+ --scope backend
101
125
  ```
102
126
 
103
- **Verify installation:**
127
+ ### 4. Create Tasks
128
+
104
129
  ```bash
105
- mandor --help
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"
106
137
  ```
107
138
 
108
- ### Option 2: NPM (Cross-platform)
139
+ ---
140
+
141
+ ## Commands Reference
109
142
 
110
- Install via npm for macOS, Linux, or Windows:
143
+ ### Workspace Commands
111
144
 
112
145
  ```bash
113
- # Install globally
114
- npm install -g @mandor/cli
146
+ # Initialize a new workspace
147
+ mandor init --workspace-name "Name"
148
+
149
+ # View workspace status
150
+ mandor status
115
151
 
116
- # Verify installation
117
- mandor --help
152
+ # Manage configuration
153
+ mandor config get <key>
154
+ mandor config set <key> <value>
155
+ mandor config reset <key>
118
156
  ```
119
157
 
120
- **Or use npx to run without installing:**
158
+ ### Project Commands
159
+
121
160
  ```bash
122
- npx @mandor/cli init "My Project"
123
- ```
161
+ # Create a project
162
+ mandor project create <id> --name "Name" --goal "Description"
163
+
164
+ # List projects
165
+ mandor project list
124
166
 
125
- **Programmatic usage:**
126
- ```javascript
127
- const mandor = require('@mandor/cli');
167
+ # Show project details
168
+ mandor project detail <project-id>
128
169
 
129
- const cli = new mandor.Mandor({ json: true, cwd: '/project/path' });
130
- await cli.init('My Project');
131
- await cli.projectCreate('api', { name: 'API Service' });
132
- const tasks = await cli.taskList({ project: 'api', status: 'pending' });
170
+ # Delete a project
171
+ mandor project delete <project-id>
133
172
  ```
134
173
 
135
- ### Platform Support
174
+ ### Feature Commands
136
175
 
137
- | Method | macOS | Linux | Windows |
138
- |--------|-------|-------|---------|
139
- | curl | arm64, x64 | arm64, x64 | ❌ |
140
- | npm | ✅ arm64, x64 | ✅ arm64, x64 | ✅ arm64, x64 |
176
+ ```bash
177
+ # Create a feature
178
+ mandor feature create "Name" --project <id> --goal "Description" [--scope <value>]
141
179
 
142
- ### Troubleshooting
180
+ # List features
181
+ mandor feature list --project <id> [--scope <value>]
143
182
 
144
- **curl: command not found**
145
- Install curl: `brew install curl` (macOS) or `sudo apt install curl` (Linux)
183
+ # Show feature details
184
+ mandor feature detail <feature-id> --project <id> [--include-deleted]
146
185
 
147
- **mandor: command not found**
148
- Ensure the install directory is in your PATH (see above)
186
+ # Update feature
187
+ mandor feature update <id> --project <id> [--status <value>] [--cancel --reason] [--reopen]
188
+
189
+ # Delete feature (soft delete)
190
+ mandor feature update <id> --project <id> --cancel --reason "Reason"
191
+ ```
192
+
193
+ ### Task Commands
149
194
 
150
- **Permission denied**
151
195
  ```bash
152
- # Fix permissions for ~/.local/bin
153
- chmod +x ~/.local/bin/mandor
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" \
201
+ --library-needs "lib1|lib2" \
202
+ [--priority <P0-P5>] \
203
+ [--depends-on <task-id>]
204
+
205
+ # List tasks
206
+ mandor task list --feature <id> [--status <value>] [--priority <value>]
207
+
208
+ # Show task details
209
+ mandor task detail <task-id> [--include-deleted] [--events] [--dependencies]
210
+
211
+ # Update task
212
+ mandor task update <id> [--status <value>] \
213
+ [--cancel --reason] [--reopen] \
214
+ [--depends <ids>] [--depends-add <ids>] [--depends-remove <ids>]
215
+
216
+ # Complete a task (in_progress → done)
217
+ mandor task update <id> --status in_progress
218
+ mandor task update <id> --status done
154
219
  ```
155
220
 
156
- **NPM permission errors**
221
+ ### Issue Commands
222
+
157
223
  ```bash
158
- # Use npx (no install)
159
- npx @mandor/cli init "My Project"
224
+ # 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" \
229
+ [--priority <P0-P5>] \
230
+ [--depends-on <issue-id>]
231
+
232
+ # List issues
233
+ mandor issue list --project <id> [--status <value>] [--type <value>]
234
+
235
+ # Show issue details
236
+ mandor issue detail <issue-id> [--include-deleted]
237
+
238
+ # Update issue
239
+ mandor issue update <id> [--status <value>] [--start] [--resolve] \
240
+ [--wontfix --reason] [--reopen] \
241
+ [--depends-on <ids>]
242
+ ```
243
+
244
+ ---
245
+
246
+ ## Configuration
160
247
 
161
- # Or fix npm global permissions
162
- mkdir -p ~/.npm-global
163
- npm config set prefix '~/.npm-global'
164
- echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
165
- source ~/.bashrc
248
+ ### Available Config Keys
249
+
250
+ ```bash
251
+ # Default priority for new entities
252
+ mandor config set default_priority P3
253
+
254
+ # Strict mode for dependency rules
255
+ mandor config set strict_mode true
256
+
257
+ # View current config
258
+ mandor config get default_priority
259
+ mandor config get strict_mode
260
+
261
+ # Reset to defaults
262
+ mandor config reset default_priority
166
263
  ```
167
264
 
265
+ ### Priority Values
266
+
267
+ | Priority | Use Case |
268
+ |----------|----------|
269
+ | P0 | Critical / Security |
270
+ | P1 | High / Blocker |
271
+ | P2 | Medium-High |
272
+ | P3 | Medium (default) |
273
+ | P4 | Medium-Low |
274
+ | P5 | Low / Nice to have |
275
+
276
+ ### Scope Values
277
+
278
+ Valid scope values for features: `frontend`, `backend`, `fullstack`, `cli`, `desktop`, `android`, `flutter`, `react-native`, `ios`, `swift`
279
+
280
+ ### Issue Types
281
+
282
+ Valid issue types: `bug`, `improvement`, `debt`, `security`, `performance`
283
+
168
284
  ---
169
285
 
170
- ## Quick Start
286
+ ## Dependency Management
287
+
288
+ ### Creating Dependencies
171
289
 
172
290
  ```bash
173
- # 1. Initialize workspace
174
- mandor init "My Project"
291
+ # Task depends on another task
292
+ mandor task create "Task B" --feature f1 \
293
+ --depends-on task-a-id
175
294
 
176
- # 2. Create project
177
- mandor project create api --name "API Service" --goal "Implement REST API"
295
+ # Issue depends on another issue
296
+ mandor issue create "Issue B" --project p1 \
297
+ --depends-on issue-a-id
178
298
 
179
- # 3. Create feature
180
- mandor feature create "User Auth" --project api --goal "Implement login/logout"
299
+ # Feature depends on another feature
300
+ mandor feature create "Feature B" --project p1 \
301
+ --depends-on feature-a-id
302
+ ```
181
303
 
182
- # 4. Get feature ID and create task
183
- FEATURE_ID=$(mandor feature list --project api --json | jq -r '.[0].id')
184
- mandor task create "Password Hashing" \
185
- --feature $FEATURE_ID \
186
- --goal "Implement bcrypt hashing" \
187
- --implementation-steps "Install bcrypt|Create utility|Write tests" \
188
- --test-cases "Hash validation|Password comparison" \
189
- --derivable-files "src/utils/password.ts" \
190
- --library-needs "bcrypt"
304
+ ### Managing Dependencies
191
305
 
192
- # 5. Check status
193
- mandor status
306
+ ```bash
307
+ # Add dependencies
308
+ mandor task update <task-id> --depends-add "id1|id2"
309
+
310
+ # Replace all dependencies
311
+ mandor task update <task-id> --depends "id1|id2"
312
+
313
+ # Remove dependencies
314
+ mandor task update <task-id> --depends-remove "id1"
194
315
  ```
195
316
 
196
- ---
317
+ ### Dependency Behaviors
318
+
319
+ - **Auto-blocking**: Entities start `blocked` if dependencies aren't `done`
320
+ - **Auto-unblocking**: When a dependency becomes `done`, dependents automatically transition to `ready`
321
+ - **Cross-project**: Dependencies can span projects if enabled in project config
322
+
323
+ ### Cross-Project Dependencies
324
+
325
+ Projects can be configured to allow or disallow cross-project dependencies:
197
326
 
198
- ## Commands
327
+ ```bash
328
+ # Allow cross-project task dependencies
329
+ mandor project create p1 --task-dep cross_project_allowed
199
330
 
200
- ### Workspace
331
+ # Restrict to same-project only (default)
332
+ mandor project create p2 --task-dep same_project_only
333
+ ```
201
334
 
202
- | Command | Description |
203
- |---------|-------------|
204
- | `mandor init <name>` | Initialize workspace |
205
- | `mandor status` | Show workspace status |
206
- | `mandor config get/set/list` | Manage configuration |
335
+ ### Circular Dependency Prevention
207
336
 
208
- ### Project
337
+ Mandor automatically prevents:
338
+ - Self-dependencies (A → A)
339
+ - Two-node cycles (A → B → A)
340
+ - N-node cycles (A → B → C → A)
341
+ - Cross-project cycles
209
342
 
210
- | Command | Description |
211
- |---------|-------------|
212
- | `mandor project create <id> --name --goal` | Create project |
213
- | `mandor project list` | List projects |
214
- | `mandor project detail <id>` | Show project details |
215
- | `mandor project update <id>` | Update metadata |
216
- | `mandor project delete <id>` | Delete project |
343
+ ---
217
344
 
218
- ### Feature
345
+ ## Status Management
219
346
 
220
- | Command | Description |
221
- |---------|-------------|
222
- | `mandor feature create <name> --project --goal` | Create feature |
223
- | `mandor feature list [--project <id>]` | List features |
224
- | `mandor feature detail <id>` | Show feature details |
225
- | `mandor feature update <id>` | Update/cancel/reopen |
347
+ ### Checking Status
226
348
 
227
- **Status flow:** `draft` → `active` → `done` (or `blocked` → `cancelled`)
349
+ ```bash
350
+ # List blocked tasks
351
+ mandor task list --feature <id> --status blocked
228
352
 
229
- ### Task
353
+ # List ready tasks
354
+ mandor task list --feature <id> --status ready
230
355
 
231
- | Command | Description |
232
- |---------|-------------|
233
- | `mandor task create <name> --feature --goal --implementation-steps --test-cases --derivable-files --library-needs` | Create task |
234
- | `mandor task list [--feature <id>] [--project <id>] [--status <status>]` | List tasks |
235
- | `mandor task detail <id>` | Show task details |
236
- | `mandor task update <id>` | Update task |
237
- | `mandor task ready [--project <id>] [--priority <P0-P5>]` | List ready tasks |
238
- | `mandor task blocked [--project <id>]` | List blocked tasks |
356
+ # List all tasks
357
+ mandor task list --feature <id>
358
+ ```
239
359
 
240
- **Status flow:** `pending` → `ready` → `in_progress` → `done` (or `blocked` → `cancelled`)
360
+ ### Transitioning Status
241
361
 
242
- **Note on `--library-needs`:** This flag is required. Provide comma-separated library names (e.g., `"bcrypt,lodash"`), or use `"none"` if the task requires no new external libraries.
362
+ ```bash
363
+ # Task workflow
364
+ mandor task update <id> --status in_progress
365
+ mandor task update <id> --status done
366
+
367
+ # Feature workflow
368
+ mandor feature update <id> --project <pid> --status active
369
+ mandor feature update <id> --project <pid> --status done
370
+
371
+ # Issue workflow
372
+ mandor issue update <id> --start
373
+ mandor issue update <id> --resolve
374
+ # or
375
+ mandor issue update <id> --wontfix --reason "Reason"
376
+ ```
243
377
 
244
- ### Issue
378
+ ### Cancel and Reopen
245
379
 
246
- | Command | Description |
247
- |---------|-------------|
248
- | `mandor issue create <name> --project --type --goal --affected-files --affected-tests --implementation-steps` | Create issue |
249
- | `mandor issue list [--project <id>] [--type <type>] [--status <status>]` | List issues |
250
- | `mandor issue detail <id>` | Show issue details |
251
- | `mandor issue update <id>` | Update/resolve/wontfix/cancel |
252
- | `mandor issue ready [--project <id>]` | List ready issues |
253
- | `mandor issue blocked [--project <id>]` | List blocked issues |
380
+ ```bash
381
+ # Cancel (soft delete)
382
+ mandor task update <id> --cancel --reason "Why cancelled"
383
+ mandor feature update <id> --project <pid> --cancel --reason "Why cancelled"
384
+ mandor issue update <id> --wontfix --reason "Why wontfix"
385
+
386
+ # Reopen
387
+ mandor task update <id> --reopen
388
+ mandor feature update <id> --project <pid> --reopen
389
+ mandor issue update <id> --reopen
390
+ ```
254
391
 
255
- **Issue types:** `bug`, `improvement`, `debt`, `security`, `performance`
256
- **Status flow:** `open` → `ready` → `in_progress` → `resolved` (or `wontfix`/`blocked` → `cancelled`)
392
+ **Note**: Cancelled entities can be viewed with `--include-deleted` flag.
257
393
 
258
- ### Utility
394
+ ---
259
395
 
260
- | Command | Description |
261
- |---------|-------------|
262
- | `mandor populate [--markdown\|--json]` | Full CLI reference |
263
- | `mandor completion [bash\|zsh\|fish]` | Shell completion |
396
+ ## Filtering and Querying
264
397
 
265
- ### AI Documentation
398
+ ### Filter by Status
266
399
 
267
- | Command | Description |
268
- |---------|-------------|
269
- | `mandor ai claude` | Generate CLAUDE.md for the project |
270
- | `mandor ai agents` | Generate AGENTS.md for multi-agent coordination |
400
+ ```bash
401
+ mandor task list --feature <id> --status ready
402
+ mandor task list --feature <id> --status blocked
403
+ mandor task list --feature <id> --status done
404
+ ```
405
+
406
+ ### Filter by Priority
407
+
408
+ ```bash
409
+ mandor task list --feature <id> --priority P0
410
+ mandor task list --feature <id> --priority P2
411
+ ```
271
412
 
272
- Generate AI assistant documentation files:
413
+ ### Filter by Scope (Features)
273
414
 
274
415
  ```bash
275
- # Generate CLAUDE.md for Claude Code
276
- mandor ai claude
416
+ mandor feature list --project <id> --scope backend
417
+ mandor feature list --project <id> --scope frontend
418
+ ```
419
+
420
+ ### Filter by Type (Issues)
277
421
 
278
- # Generate AGENTS.md for multi-agent coordination
279
- mandor ai agents
422
+ ```bash
423
+ mandor issue list --project <id> --type bug
424
+ mandor issue list --project <id> --type security
280
425
  ```
281
426
 
282
427
  ---
283
428
 
284
- ## Entity Types
429
+ ## Event System
430
+
431
+ ### Event Log Location
432
+
433
+ All events are stored in `.mandor/events.jsonl` in your workspace.
285
434
 
286
- | Entity | File | Description |
287
- |--------|------|-------------|
288
- | Workspace | `.mandor/workspace.json` | Root container |
289
- | Project | `.mandor/projects/<id>/project.jsonl` | Feature/task/issue grouping |
290
- | Feature | `.mandor/projects/<id>/features.jsonl` | High-level functionality |
291
- | Task | `.mandor/projects/<id>/tasks.jsonl` | Work item implementing feature |
292
- | Issue | `.mandor/projects/<id>/issues.jsonl` | Bug/improvement/debt |
293
- | Events | `.mandor/projects/<id>/events.jsonl` | Append-only audit trail |
435
+ ### Event Types
294
436
 
295
- ### ID Format
437
+ | Event | Description |
438
+ |-------|-------------|
439
+ | entity_created | New entity created |
440
+ | status_changed | Status transitioned |
441
+ | dependency_added | Dependency added |
442
+ | dependency_removed | Dependency removed |
443
+ | dependent_unblocked | Dependent entity became ready |
444
+ | entity_reopened | Cancelled entity reopened |
445
+ | entity_cancelled | Entity cancelled |
296
446
 
297
- | Entity | Format | Example |
298
- |--------|--------|---------|
299
- | Project | `<id>` | `api` |
300
- | Feature | `<project>-feature-<nanoid>` | `api-feature-abc123` |
301
- | Task | `<feature_id>-task-<nanoid>` | `api-feature-abc-task-xyz789` |
302
- | Issue | `<project>-issue-<nanoid>` | `api-issue-abc123` |
447
+ ### Viewing Events
448
+
449
+ ```bash
450
+ # View events for a specific entity
451
+ mandor task detail <id> --events
452
+
453
+ # Events are also shown in default detail view
454
+ mandor task detail <id>
455
+ ```
303
456
 
304
457
  ---
305
458
 
306
- ## File Structure
459
+ ## JSONL Format
460
+
461
+ Mandor uses JSONL (JSON Lines) for event storage:
307
462
 
463
+ ```json
464
+ {"timestamp":"2026-02-01T10:00:00Z","type":"entity_created","entity":"task","id":"task-abc","name":"JWT Parser"}
465
+ {"timestamp":"2026-02-01T10:01:00Z","type":"status_changed","entity":"task","id":"task-abc","from":"ready","to":"in_progress"}
466
+ {"timestamp":"2026-02-01T10:02:00Z","type":"status_changed","entity":"task","id":"task-abc","from":"in_progress","to":"done"}
467
+ {"timestamp":"2026-02-01T10:02:00Z","type":"dependent_unblocked","entity":"task","id":"task-xyz","dependency":"task-abc"}
308
468
  ```
309
- .mandor/
310
- ├── workspace.json # Workspace metadata
311
- └── projects/
312
- └── <project_id>/
313
- ├── project.jsonl # Project metadata
314
- ├── schema.json # Project rules
315
- ├── features.jsonl # Feature state
316
- ├── tasks.jsonl # Task state
317
- ├── issues.jsonl # Issue state
318
- └── events.jsonl # Append-only audit trail
469
+
470
+ ### Parsing Events
471
+
472
+ ```bash
473
+ # View all events
474
+ cat .mandor/events.jsonl
475
+
476
+ # Filter for specific entity
477
+ grep "task-abc" .mandor/events.jsonl
478
+
479
+ # Count events by type
480
+ grep '"type":"status_changed"' .mandor/events.jsonl | wc -l
319
481
  ```
320
482
 
321
483
  ---
322
484
 
323
- ## Dependency Management
485
+ ## Examples
486
+
487
+ ### Complete Feature Workflow
488
+
489
+ ```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
494
+
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"
499
+
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
504
+
505
+ # Execute workflow
506
+ mandor task update jwt-parser-id --status in_progress
507
+ mandor task update jwt-parser-id --status done
508
+
509
+ # Validator automatically becomes ready
510
+ mandor task update jwt-validator-id --status in_progress
511
+ mandor task update jwt-validator-id --status done
512
+
513
+ # Mark feature done
514
+ mandor feature update auth-xxx --project api --status active
515
+ mandor feature update auth-xxx --project api --status done
516
+ ```
517
+
518
+ ### Multi-Project Dependencies
519
+
520
+ ```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"
530
+
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
537
+
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
541
+ ```
324
542
 
325
- ### Status Based on Dependencies
543
+ ### Issue Tracking with Dependencies
326
544
 
327
- - **Feature**: No deps → `draft`, all done → `active`, otherwise blocked
328
- - **Task**: No deps → `ready`, all done → `ready`, otherwise pending
329
- - **Issue**: No deps `ready`, all resolved `ready`, otherwise open
545
+ ```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
568
+ ```
330
569
 
331
- ### Blocking
570
+ ### Cancel and Reopen Workflow
332
571
 
333
- Cannot cancel entities that other entities depend on. Use `--force` to override.
572
+ ```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"
578
+
579
+ # Cancel the feature
580
+ mandor feature update experiment-xxx --project api --cancel --reason "Not needed"
581
+
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"
587
+
588
+ # Reopen the feature
589
+ mandor feature update experiment-xxx --project api --reopen
590
+
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"
595
+ ```
334
596
 
335
597
  ---
336
598
 
337
- ## Configuration
599
+ ## Best Practices
600
+
601
+ ### 1. Use Meaningful IDs
602
+
603
+ Project and feature IDs should be:
604
+ - Short but descriptive
605
+ - Lowercase with hyphens
606
+ - Consistent naming convention
607
+
608
+ ```bash
609
+ # Good
610
+ mandor project create user-auth
611
+ mandor feature create jwt-tokens
612
+
613
+ # Avoid
614
+ mandor project create p1
615
+ mandor feature create f123
616
+ ```
617
+
618
+ ### 2. Set Default Priority
619
+
620
+ Configure default priority in workspace:
621
+
622
+ ```bash
623
+ mandor config set default_priority P3
624
+ ```
625
+
626
+ ### 3. Use Scopes for Features
627
+
628
+ Assign scopes to help filter and organize:
629
+
630
+ ```bash
631
+ mandor feature create "Login UI" --project api --scope frontend
632
+ mandor feature create "Login API" --project api --scope backend
633
+ ```
338
634
 
339
- ### Priority Levels
635
+ ### 4. Keep Dependencies Shallow
340
636
 
341
- | Priority | Description |
342
- |----------|-------------|
343
- | P0 | Critical - Must do |
344
- | P1 | High - Important |
345
- | P2 | Medium - Should do |
346
- | P3 | Normal - Default |
347
- | P4 | Low - Nice to have |
348
- | P5 | Minimal - Can defer |
637
+ Deep dependency chains (>5 levels) can be hard to manage. Consider breaking into smaller features.
349
638
 
350
- ### Scope Options (Features)
639
+ ### 5. Use Issues for Bugs, Tasks for Work
351
640
 
352
- `frontend`, `backend`, `fullstack`, `cli`, `desktop`, `mobile`
641
+ - **Tasks**: Work to be done (implementations, refactoring)
642
+ - **Issues**: Problems to be fixed or improvements to be made
643
+
644
+ ### 6. Document Cancellation Reasons
645
+
646
+ Always provide clear reasons when cancelling:
647
+
648
+ ```bash
649
+ mandor task update <id> --cancel --reason "Superseded by feature X"
650
+ ```
651
+
652
+ ### 7. Review Blocked Tasks Regularly
653
+
654
+ ```bash
655
+ mandor task list --feature <id> --status blocked
656
+ ```
657
+
658
+ ### 8. Use Configuration for Consistency
659
+
660
+ Set up workspace configuration early:
661
+
662
+ ```bash
663
+ mandor config set default_priority P2
664
+ mandor config set strict_mode true
665
+ ```
353
666
 
354
667
  ---
355
668
 
356
- ## Examples
669
+ ## Troubleshooting
357
670
 
358
- ### Complete Workflow
359
-
360
- ```bash
361
- mandor init "My Project"
362
- mandor project create api --name "API Service" --goal "Implement API"
363
-
364
- # Create features
365
- mandor feature create "User Auth" --project api --goal "Login/logout/registration"
366
-
367
- # Get feature ID for creating tasks
368
- AUTH_FEATURE_ID=$(mandor feature list --project api --json | jq -r '.[] | select(.name == "User Auth") | .id')
369
-
370
- # Create tasks under the User Auth feature
371
- mandor task create "Password Hashing" \
372
- --feature $AUTH_FEATURE_ID \
373
- --goal "Implement bcrypt hashing" \
374
- --implementation-steps "Install bcrypt|Create utility|Write tests" \
375
- --test-cases "Hash validation|Password comparison" \
376
- --derivable-files "src/utils/password.ts" \
377
- --library-needs "bcrypt"
378
-
379
- mandor task create "JWT Token Management" \
380
- --feature $AUTH_FEATURE_ID \
381
- --goal "Implement JWT token generation and validation" \
382
- --implementation-steps "Review JWT spec|Implement token generation|Add validation middleware" \
383
- --test-cases "Token generation works|Token validation works|Expired tokens rejected" \
384
- --derivable-files "src/utils/jwt.ts|src/middleware/auth.ts" \
385
- --library-needs "jsonwebtoken"
386
-
387
- # Task with no new external libraries
388
- mandor task create "Update Login Endpoint" \
389
- --feature $AUTH_FEATURE_ID \
390
- --goal "Refactor existing login endpoint" \
391
- --implementation-steps "Review current endpoint|Refactor logic|Update tests" \
392
- --test-cases "Endpoint returns correct status|Authentication works|Errors handled" \
393
- --derivable-files "src/handlers/auth.ts" \
394
- --library-needs "none"
671
+ ### "Command not found"
395
672
 
396
- mandor issue create "Fix security vulnerability" --project api \
397
- --type security --goal "Fix JWT signing vulnerability" \
398
- --affected-files "src/utils/jwt.ts" \
399
- --affected-tests "src/utils/jwt.test.ts" \
400
- --implementation-steps "Review JWT library|Update to secure version|Verify signature"
673
+ Ensure mandor is in your PATH:
401
674
 
402
- mandor status
675
+ ```bash
676
+ export PATH="$HOME/.local/bin:$PATH"
677
+ ```
678
+
679
+ ### "Project not found"
680
+
681
+ Check the project ID and ensure you're in the correct workspace.
682
+
683
+ ```bash
684
+ mandor project list
403
685
  ```
404
686
 
405
- ### Issue Lifecycle
687
+ ### "Entity not found"
688
+
689
+ Verify the entity ID exists:
406
690
 
407
691
  ```bash
408
- mandor issue create "Security Fix" --project api \
409
- --type security --goal "Fix vulnerability"
692
+ mandor task list --feature <feature-id>
693
+ ```
694
+
695
+ ### "Cross-project dependency detected"
696
+
697
+ The project doesn't allow cross-project dependencies:
410
698
 
411
- mandor issue update api-issue-xxx --status in_progress
412
- mandor issue update api-issue-xxx --resolve # or --wontfix
413
- mandor issue update api-issue-xxx --reopen # if needed
699
+ ```bash
700
+ # Check project config
701
+ mandor project detail <project-id>
702
+
703
+ # Create new project with cross-project enabled
704
+ mandor project create <id> --task-dep cross_project_allowed
705
+ ```
706
+
707
+ ### "Invalid status transition"
708
+
709
+ The transition isn't allowed by the state machine:
710
+
711
+ ```bash
712
+ # Tasks: ready -> in_progress -> done
713
+ # Features: draft -> active -> done
714
+ ```
715
+
716
+ ### "Cannot create task for cancelled feature"
717
+
718
+ Reopen the feature first:
719
+
720
+ ```bash
721
+ mandor feature update <id> --project <pid> --reopen
414
722
  ```
415
723
 
416
724
  ---
417
725
 
418
- ## Exit Codes
726
+ ## File Structure
419
727
 
420
- | Code | Meaning |
421
- |------|---------|
422
- | 0 | Success |
423
- | 1 | System error (I/O, internal) |
424
- | 2 | Validation error (not found, invalid input) |
425
- | 3 | Permission error |
728
+ ```
729
+ mandor/
730
+ ├── cmd/
731
+ │ └── mandor/ # CLI entry point
732
+ ├── internal/
733
+ │ ├── cmd/ # Command implementations
734
+ │ ├── domain/ # Domain models
735
+ │ ├── service/ # Business logic
736
+ │ ├── repository/ # Data access
737
+ │ └── events/ # Event handling
738
+ ├── .mandor/ # Workspace (created by init)
739
+ │ ├── workspace.json # Workspace config
740
+ │ └── projects/ # Projects directory
741
+ │ └── <project>/
742
+ │ ├── project.json
743
+ │ ├── features/
744
+ │ ├── tasks/
745
+ │ ├── issues/
746
+ │ └── events.jsonl
747
+ └── binaries/
748
+ └── mandor # Built binary
749
+ ```
426
750
 
427
751
  ---
428
752