project-roadmap-tracking 0.1.0 → 0.2.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 +291 -24
- package/dist/commands/add.d.ts +2 -0
- package/dist/commands/add.js +39 -31
- package/dist/commands/complete.d.ts +2 -0
- package/dist/commands/complete.js +35 -12
- package/dist/commands/init.d.ts +1 -0
- package/dist/commands/init.js +63 -46
- package/dist/commands/list.d.ts +3 -0
- package/dist/commands/list.js +65 -62
- package/dist/commands/pass-test.d.ts +4 -1
- package/dist/commands/pass-test.js +36 -13
- package/dist/commands/show.d.ts +4 -1
- package/dist/commands/show.js +38 -59
- package/dist/commands/update.d.ts +2 -0
- package/dist/commands/update.js +54 -31
- package/dist/commands/validate.d.ts +4 -1
- package/dist/commands/validate.js +74 -32
- package/dist/errors/base.error.d.ts +21 -0
- package/dist/errors/base.error.js +35 -0
- package/dist/errors/circular-dependency.error.d.ts +8 -0
- package/dist/errors/circular-dependency.error.js +13 -0
- package/dist/errors/config-not-found.error.d.ts +7 -0
- package/dist/errors/config-not-found.error.js +12 -0
- package/dist/errors/index.d.ts +16 -0
- package/dist/errors/index.js +26 -0
- package/dist/errors/invalid-task.error.d.ts +7 -0
- package/dist/errors/invalid-task.error.js +12 -0
- package/dist/errors/roadmap-not-found.error.d.ts +7 -0
- package/dist/errors/roadmap-not-found.error.js +12 -0
- package/dist/errors/task-not-found.error.d.ts +7 -0
- package/dist/errors/task-not-found.error.js +12 -0
- package/dist/errors/validation.error.d.ts +16 -0
- package/dist/errors/validation.error.js +16 -0
- package/dist/repositories/config.repository.d.ts +76 -0
- package/dist/repositories/config.repository.js +282 -0
- package/dist/repositories/index.d.ts +2 -0
- package/dist/repositories/index.js +2 -0
- package/dist/repositories/roadmap.repository.d.ts +82 -0
- package/dist/repositories/roadmap.repository.js +201 -0
- package/dist/services/display.service.d.ts +182 -0
- package/dist/services/display.service.js +320 -0
- package/dist/services/error-handler.service.d.ts +114 -0
- package/dist/services/error-handler.service.js +169 -0
- package/dist/services/roadmap.service.d.ts +142 -0
- package/dist/services/roadmap.service.js +269 -0
- package/dist/services/task-dependency.service.d.ts +210 -0
- package/dist/services/task-dependency.service.js +371 -0
- package/dist/services/task-query.service.d.ts +123 -0
- package/dist/services/task-query.service.js +259 -0
- package/dist/services/task.service.d.ts +132 -0
- package/dist/services/task.service.js +173 -0
- package/dist/util/read-config.js +12 -2
- package/dist/util/read-roadmap.js +12 -2
- package/dist/util/types.d.ts +5 -0
- package/dist/util/update-task.js +2 -1
- package/dist/util/validate-task.js +6 -5
- package/oclif.manifest.json +114 -5
- package/package.json +19 -3
package/README.md
CHANGED
|
@@ -1,15 +1,161 @@
|
|
|
1
1
|
# project-roadmap-tracking
|
|
2
2
|
|
|
3
|
-
CLI
|
|
3
|
+
A modern, production-ready CLI tool for managing project tasks and roadmaps with advanced features like dependency tracking, validation, and comprehensive test coverage.
|
|
4
4
|
|
|
5
5
|
[](https://oclif.io)
|
|
6
6
|
[](https://npmjs.org/package/project-roadmap-tracking)
|
|
7
7
|
[](https://npmjs.org/package/project-roadmap-tracking)
|
|
8
8
|
|
|
9
|
+
## Features
|
|
10
|
+
|
|
11
|
+
- 📝 **Task Management**: Create, update, and track bugs, features, improvements, planning tasks, and research items
|
|
12
|
+
- 🔗 **Dependency Tracking**: Define task dependencies and detect circular dependencies
|
|
13
|
+
- 🎯 **Priority & Status**: Organize tasks by priority (high/medium/low) and status (not-started/in-progress/completed)
|
|
14
|
+
- ✅ **Test Tracking**: Mark tasks as passing tests to maintain quality
|
|
15
|
+
- 🔍 **Powerful Filtering**: Filter and sort tasks by multiple criteria
|
|
16
|
+
- 📊 **Validation**: Comprehensive roadmap validation with detailed error reporting
|
|
17
|
+
- ⚡ **Performance**: LRU caching and file watching for optimal performance
|
|
18
|
+
- 🏗️ **Modern Architecture**: Service layer, repository pattern, and 98.78% test coverage
|
|
19
|
+
- 📦 **Configuration**: Multi-level config inheritance (project → user → global)
|
|
20
|
+
- 🔄 **Backward Compatible**: Legacy mode via `--no-repo` flag
|
|
21
|
+
|
|
22
|
+
## Quick Start
|
|
23
|
+
|
|
24
|
+
### Installation
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
npm install -g project-roadmap-tracking
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### Initialize a Project
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
# Initialize with sample tasks
|
|
34
|
+
prt init --name "My Project" --withSampleTasks
|
|
35
|
+
|
|
36
|
+
# Or create an empty roadmap
|
|
37
|
+
prt init --name "My Project"
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Basic Usage
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
# Add a new feature
|
|
44
|
+
prt add "User authentication" -t feature -d "Implement JWT auth" -p high
|
|
45
|
+
|
|
46
|
+
# List all high-priority tasks
|
|
47
|
+
prt list -p high
|
|
48
|
+
|
|
49
|
+
# Show task details
|
|
50
|
+
prt show F-001
|
|
51
|
+
|
|
52
|
+
# Update task status
|
|
53
|
+
prt update F-001 --status=in-progress
|
|
54
|
+
|
|
55
|
+
# Complete a task
|
|
56
|
+
prt complete F-001 --tests
|
|
57
|
+
|
|
58
|
+
# Validate roadmap integrity
|
|
59
|
+
prt validate
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Architecture
|
|
63
|
+
|
|
64
|
+
PRT follows a modern layered architecture:
|
|
65
|
+
|
|
66
|
+
- **CLI Layer**: Thin command handlers using oclif
|
|
67
|
+
- **Service Layer**: Business logic (TaskService, RoadmapService, etc.)
|
|
68
|
+
- **Repository Layer**: Data access with caching and file watching
|
|
69
|
+
- **Error Handling**: Custom error hierarchy with error codes
|
|
70
|
+
|
|
71
|
+
For detailed architecture documentation, see [ARCHITECTURE.md](ARCHITECTURE.md).
|
|
72
|
+
|
|
73
|
+
## Data Format
|
|
74
|
+
|
|
75
|
+
PRT uses two JSON files to manage your project:
|
|
76
|
+
|
|
77
|
+
### `.prtrc.json` (Configuration)
|
|
78
|
+
Project configuration with optional caching settings:
|
|
79
|
+
|
|
80
|
+
```json
|
|
81
|
+
{
|
|
82
|
+
"$schema": "https://raw.githubusercontent.com/ZacharyEggert/project-roadmap-tracking/master/schemas/config/v1.1.json",
|
|
83
|
+
"name": "My Project",
|
|
84
|
+
"description": "Project description",
|
|
85
|
+
"path": "./prt.json",
|
|
86
|
+
"cache": {
|
|
87
|
+
"enabled": true,
|
|
88
|
+
"maxSize": 10
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### `prt.json` (Roadmap)
|
|
94
|
+
Your tasks and project data:
|
|
95
|
+
|
|
96
|
+
```json
|
|
97
|
+
{
|
|
98
|
+
"$schema": "https://raw.githubusercontent.com/ZacharyEggert/project-roadmap-tracking/master/schemas/roadmap/v1.json",
|
|
99
|
+
"metadata": {
|
|
100
|
+
"name": "My Project",
|
|
101
|
+
"createdAt": "2026-01-22T10:00:00.000Z"
|
|
102
|
+
},
|
|
103
|
+
"tasks": [
|
|
104
|
+
{
|
|
105
|
+
"id": "F-001",
|
|
106
|
+
"title": "User authentication",
|
|
107
|
+
"type": "feature",
|
|
108
|
+
"status": "in-progress",
|
|
109
|
+
"priority": "high",
|
|
110
|
+
"details": "Implement JWT authentication",
|
|
111
|
+
"tags": ["auth", "security"],
|
|
112
|
+
"depends-on": [],
|
|
113
|
+
"blocks": [],
|
|
114
|
+
"passes-tests": false,
|
|
115
|
+
"createdAt": "2026-01-22T10:00:00.000Z",
|
|
116
|
+
"updatedAt": "2026-01-22T10:00:00.000Z"
|
|
117
|
+
}
|
|
118
|
+
]
|
|
119
|
+
}
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### Task ID Format
|
|
123
|
+
|
|
124
|
+
Task IDs follow the pattern `{TYPE}-{NUMBER}`:
|
|
125
|
+
- **B-001**: Bug
|
|
126
|
+
- **F-001**: Feature
|
|
127
|
+
- **I-001**: Improvement
|
|
128
|
+
- **P-001**: Planning
|
|
129
|
+
- **R-001**: Research
|
|
130
|
+
|
|
131
|
+
IDs are auto-generated sequentially per task type.
|
|
132
|
+
|
|
9
133
|
<!-- toc -->
|
|
10
134
|
* [project-roadmap-tracking](#project-roadmap-tracking)
|
|
135
|
+
* [Initialize with sample tasks](#initialize-with-sample-tasks)
|
|
136
|
+
* [Or create an empty roadmap](#or-create-an-empty-roadmap)
|
|
137
|
+
* [Add a new feature](#add-a-new-feature)
|
|
138
|
+
* [List all high-priority tasks](#list-all-high-priority-tasks)
|
|
139
|
+
* [Show task details](#show-task-details)
|
|
140
|
+
* [Update task status](#update-task-status)
|
|
141
|
+
* [Complete a task](#complete-a-task)
|
|
142
|
+
* [Validate roadmap integrity](#validate-roadmap-integrity)
|
|
11
143
|
* [Usage](#usage)
|
|
12
144
|
* [Commands](#commands)
|
|
145
|
+
* [Clone the repository](#clone-the-repository)
|
|
146
|
+
* [Install dependencies](#install-dependencies)
|
|
147
|
+
* [Build the project](#build-the-project)
|
|
148
|
+
* [Run tests](#run-tests)
|
|
149
|
+
* [Run tests with coverage](#run-tests-with-coverage)
|
|
150
|
+
* [Run linter](#run-linter)
|
|
151
|
+
* [Auto-fix linting issues](#auto-fix-linting-issues)
|
|
152
|
+
* [Format code](#format-code)
|
|
153
|
+
* [Run CLI locally without installing](#run-cli-locally-without-installing)
|
|
154
|
+
* [Link for global development testing](#link-for-global-development-testing)
|
|
155
|
+
* [Run all tests](#run-all-tests)
|
|
156
|
+
* [Run a specific test file](#run-a-specific-test-file)
|
|
157
|
+
* [Generate coverage report](#generate-coverage-report)
|
|
158
|
+
* [View coverage summary](#view-coverage-summary)
|
|
13
159
|
<!-- tocstop -->
|
|
14
160
|
|
|
15
161
|
# Usage
|
|
@@ -20,7 +166,7 @@ $ npm install -g project-roadmap-tracking
|
|
|
20
166
|
$ prt COMMAND
|
|
21
167
|
running command...
|
|
22
168
|
$ prt (--version)
|
|
23
|
-
project-roadmap-tracking/0.
|
|
169
|
+
project-roadmap-tracking/0.2.0 darwin-arm64 node-v24.12.0
|
|
24
170
|
$ prt --help [COMMAND]
|
|
25
171
|
USAGE
|
|
26
172
|
$ prt COMMAND
|
|
@@ -57,8 +203,8 @@ add a new task to the roadmap
|
|
|
57
203
|
|
|
58
204
|
```
|
|
59
205
|
USAGE
|
|
60
|
-
$ prt add TITLE -d <value> -t bug|feature|improvement|planning|research [-
|
|
61
|
-
not-started|in-progress|completed] [-g <value>]
|
|
206
|
+
$ prt add TITLE -d <value> -t bug|feature|improvement|planning|research [--no-repo] [-p
|
|
207
|
+
high|medium|low] [-s not-started|in-progress|completed] [-g <value>] [-v]
|
|
62
208
|
|
|
63
209
|
ARGUMENTS
|
|
64
210
|
TITLE title of the task to add
|
|
@@ -72,6 +218,8 @@ FLAGS
|
|
|
72
218
|
<options: not-started|in-progress|completed>
|
|
73
219
|
-t, --type=<option> (required) type of the task to add
|
|
74
220
|
<options: bug|feature|improvement|planning|research>
|
|
221
|
+
-v, --verbose show detailed error information including stack traces
|
|
222
|
+
--no-repo use legacy direct file I/O instead of repository pattern
|
|
75
223
|
|
|
76
224
|
DESCRIPTION
|
|
77
225
|
add a new task to the roadmap
|
|
@@ -80,7 +228,7 @@ EXAMPLES
|
|
|
80
228
|
$ prt add
|
|
81
229
|
```
|
|
82
230
|
|
|
83
|
-
_See code: [src/commands/add.ts](https://github.com/ZacharyEggert/project-roadmap-tracking/blob/v0.
|
|
231
|
+
_See code: [src/commands/add.ts](https://github.com/ZacharyEggert/project-roadmap-tracking/blob/v0.2.0/src/commands/add.ts)_
|
|
84
232
|
|
|
85
233
|
## `prt complete TASKID`
|
|
86
234
|
|
|
@@ -88,13 +236,15 @@ Mark a task as completed
|
|
|
88
236
|
|
|
89
237
|
```
|
|
90
238
|
USAGE
|
|
91
|
-
$ prt complete TASKID [-t]
|
|
239
|
+
$ prt complete TASKID [--no-repo] [-t] [-v]
|
|
92
240
|
|
|
93
241
|
ARGUMENTS
|
|
94
242
|
TASKID ID of the task to complete
|
|
95
243
|
|
|
96
244
|
FLAGS
|
|
97
|
-
-t, --tests
|
|
245
|
+
-t, --tests mark task as passes-tests
|
|
246
|
+
-v, --verbose show detailed error information including stack traces
|
|
247
|
+
--no-repo use legacy direct file I/O instead of repository pattern
|
|
98
248
|
|
|
99
249
|
DESCRIPTION
|
|
100
250
|
Mark a task as completed
|
|
@@ -103,7 +253,7 @@ EXAMPLES
|
|
|
103
253
|
$ prt complete F-001 --tests
|
|
104
254
|
```
|
|
105
255
|
|
|
106
|
-
_See code: [src/commands/complete.ts](https://github.com/ZacharyEggert/project-roadmap-tracking/blob/v0.
|
|
256
|
+
_See code: [src/commands/complete.ts](https://github.com/ZacharyEggert/project-roadmap-tracking/blob/v0.2.0/src/commands/complete.ts)_
|
|
107
257
|
|
|
108
258
|
## `prt help [COMMAND]`
|
|
109
259
|
|
|
@@ -131,7 +281,7 @@ initialize a new project roadmap (prt.json and prt.config.json)
|
|
|
131
281
|
|
|
132
282
|
```
|
|
133
283
|
USAGE
|
|
134
|
-
$ prt init [FOLDER] [-d <value>] [-f] [-n <value>] [--withSampleTasks]
|
|
284
|
+
$ prt init [FOLDER] [-d <value>] [-f] [-n <value>] [-v] [--withSampleTasks]
|
|
135
285
|
|
|
136
286
|
ARGUMENTS
|
|
137
287
|
[FOLDER] folder to initialize the project roadmap in
|
|
@@ -140,6 +290,7 @@ FLAGS
|
|
|
140
290
|
-d, --description=<value> description to print
|
|
141
291
|
-f, --force force initialization even if files already exist
|
|
142
292
|
-n, --name=<value> name to print
|
|
293
|
+
-v, --verbose show detailed error information including stack traces
|
|
143
294
|
--withSampleTasks include sample tasks in the initialized roadmap
|
|
144
295
|
|
|
145
296
|
DESCRIPTION
|
|
@@ -149,7 +300,7 @@ EXAMPLES
|
|
|
149
300
|
$ prt init [path/to/directory]
|
|
150
301
|
```
|
|
151
302
|
|
|
152
|
-
_See code: [src/commands/init.ts](https://github.com/ZacharyEggert/project-roadmap-tracking/blob/v0.
|
|
303
|
+
_See code: [src/commands/init.ts](https://github.com/ZacharyEggert/project-roadmap-tracking/blob/v0.2.0/src/commands/init.ts)_
|
|
153
304
|
|
|
154
305
|
## `prt list`
|
|
155
306
|
|
|
@@ -157,8 +308,8 @@ list tasks in the project roadmap
|
|
|
157
308
|
|
|
158
309
|
```
|
|
159
310
|
USAGE
|
|
160
|
-
$ prt list [-i] [-p high|medium|low|h|m|l] [-o dueDate|priority|createdAt] [-s
|
|
161
|
-
completed|in-progress|not-started]
|
|
311
|
+
$ prt list [-i] [--no-repo] [-p high|medium|low|h|m|l] [-o dueDate|priority|createdAt] [-s
|
|
312
|
+
completed|in-progress|not-started] [-v]
|
|
162
313
|
|
|
163
314
|
FLAGS
|
|
164
315
|
-i, --incomplete filter tasks to show in-progress and not-started only
|
|
@@ -168,6 +319,8 @@ FLAGS
|
|
|
168
319
|
<options: high|medium|low|h|m|l>
|
|
169
320
|
-s, --status=<option> filter tasks by status (completed, in-progress, not-started)
|
|
170
321
|
<options: completed|in-progress|not-started>
|
|
322
|
+
-v, --verbose show detailed error information including stack traces
|
|
323
|
+
--no-repo use legacy direct file I/O instead of repository pattern
|
|
171
324
|
|
|
172
325
|
DESCRIPTION
|
|
173
326
|
list tasks in the project roadmap
|
|
@@ -176,7 +329,7 @@ EXAMPLES
|
|
|
176
329
|
$ prt list -p=h --incomplete --sort=createdAt
|
|
177
330
|
```
|
|
178
331
|
|
|
179
|
-
_See code: [src/commands/list.ts](https://github.com/ZacharyEggert/project-roadmap-tracking/blob/v0.
|
|
332
|
+
_See code: [src/commands/list.ts](https://github.com/ZacharyEggert/project-roadmap-tracking/blob/v0.2.0/src/commands/list.ts)_
|
|
180
333
|
|
|
181
334
|
## `prt pass-test TASKID`
|
|
182
335
|
|
|
@@ -184,11 +337,15 @@ Mark a task as passes-tests
|
|
|
184
337
|
|
|
185
338
|
```
|
|
186
339
|
USAGE
|
|
187
|
-
$ prt pass-test TASKID
|
|
340
|
+
$ prt pass-test TASKID [--no-repo] [-v]
|
|
188
341
|
|
|
189
342
|
ARGUMENTS
|
|
190
343
|
TASKID ID of the task to mark as passing tests
|
|
191
344
|
|
|
345
|
+
FLAGS
|
|
346
|
+
-v, --verbose show detailed error information including stack traces
|
|
347
|
+
--no-repo use legacy direct file I/O instead of repository pattern
|
|
348
|
+
|
|
192
349
|
DESCRIPTION
|
|
193
350
|
Mark a task as passes-tests
|
|
194
351
|
|
|
@@ -196,7 +353,7 @@ EXAMPLES
|
|
|
196
353
|
$ prt pass-test F-001
|
|
197
354
|
```
|
|
198
355
|
|
|
199
|
-
_See code: [src/commands/pass-test.ts](https://github.com/ZacharyEggert/project-roadmap-tracking/blob/v0.
|
|
356
|
+
_See code: [src/commands/pass-test.ts](https://github.com/ZacharyEggert/project-roadmap-tracking/blob/v0.2.0/src/commands/pass-test.ts)_
|
|
200
357
|
|
|
201
358
|
## `prt plugins`
|
|
202
359
|
|
|
@@ -494,11 +651,15 @@ show details of a specific task in the project roadmap
|
|
|
494
651
|
|
|
495
652
|
```
|
|
496
653
|
USAGE
|
|
497
|
-
$ prt show TASK
|
|
654
|
+
$ prt show TASK [--no-repo] [-v]
|
|
498
655
|
|
|
499
656
|
ARGUMENTS
|
|
500
657
|
TASK task ID to show
|
|
501
658
|
|
|
659
|
+
FLAGS
|
|
660
|
+
-v, --verbose show detailed error information including stack traces
|
|
661
|
+
--no-repo use legacy direct file I/O instead of repository pattern
|
|
662
|
+
|
|
502
663
|
DESCRIPTION
|
|
503
664
|
show details of a specific task in the project roadmap
|
|
504
665
|
|
|
@@ -506,7 +667,7 @@ EXAMPLES
|
|
|
506
667
|
$ prt show F-001
|
|
507
668
|
```
|
|
508
669
|
|
|
509
|
-
_See code: [src/commands/show.ts](https://github.com/ZacharyEggert/project-roadmap-tracking/blob/v0.
|
|
670
|
+
_See code: [src/commands/show.ts](https://github.com/ZacharyEggert/project-roadmap-tracking/blob/v0.2.0/src/commands/show.ts)_
|
|
510
671
|
|
|
511
672
|
## `prt update TASKID`
|
|
512
673
|
|
|
@@ -514,8 +675,8 @@ Update a task in place
|
|
|
514
675
|
|
|
515
676
|
```
|
|
516
677
|
USAGE
|
|
517
|
-
$ prt update TASKID [--clear-notes] [-d <value>] [-n <value>] [-s
|
|
518
|
-
true|false]
|
|
678
|
+
$ prt update TASKID [--clear-notes] [-d <value>] [--no-repo] [-n <value>] [-s
|
|
679
|
+
completed|in-progress|not-started] [-t true|false] [-v]
|
|
519
680
|
|
|
520
681
|
ARGUMENTS
|
|
521
682
|
TASKID ID of the task to update
|
|
@@ -527,7 +688,9 @@ FLAGS
|
|
|
527
688
|
<options: completed|in-progress|not-started>
|
|
528
689
|
-t, --tested=<option> update whether the task passes tests
|
|
529
690
|
<options: true|false>
|
|
691
|
+
-v, --verbose show detailed error information including stack traces
|
|
530
692
|
--clear-notes clear all notes from the task
|
|
693
|
+
--no-repo use legacy direct file I/O instead of repository pattern
|
|
531
694
|
|
|
532
695
|
DESCRIPTION
|
|
533
696
|
Update a task in place
|
|
@@ -538,22 +701,126 @@ EXAMPLES
|
|
|
538
701
|
$ prt update F-002 --deps="F-001" --clear-notes
|
|
539
702
|
```
|
|
540
703
|
|
|
541
|
-
_See code: [src/commands/update.ts](https://github.com/ZacharyEggert/project-roadmap-tracking/blob/v0.
|
|
704
|
+
_See code: [src/commands/update.ts](https://github.com/ZacharyEggert/project-roadmap-tracking/blob/v0.2.0/src/commands/update.ts)_
|
|
542
705
|
|
|
543
706
|
## `prt validate`
|
|
544
707
|
|
|
545
|
-
|
|
708
|
+
Validate roadmap structure, task data, and check for circular dependencies
|
|
546
709
|
|
|
547
710
|
```
|
|
548
711
|
USAGE
|
|
549
|
-
$ prt validate
|
|
712
|
+
$ prt validate [--no-repo] [-v]
|
|
713
|
+
|
|
714
|
+
FLAGS
|
|
715
|
+
-v, --verbose show detailed error information including stack traces
|
|
716
|
+
--no-repo use legacy direct file I/O instead of repository pattern
|
|
550
717
|
|
|
551
718
|
DESCRIPTION
|
|
552
|
-
|
|
719
|
+
Validate roadmap structure, task data, and check for circular dependencies
|
|
553
720
|
|
|
554
721
|
EXAMPLES
|
|
555
722
|
$ prt validate
|
|
556
723
|
```
|
|
557
724
|
|
|
558
|
-
_See code: [src/commands/validate.ts](https://github.com/ZacharyEggert/project-roadmap-tracking/blob/v0.
|
|
725
|
+
_See code: [src/commands/validate.ts](https://github.com/ZacharyEggert/project-roadmap-tracking/blob/v0.2.0/src/commands/validate.ts)_
|
|
559
726
|
<!-- commandsstop -->
|
|
727
|
+
|
|
728
|
+
## Development
|
|
729
|
+
|
|
730
|
+
### Setup
|
|
731
|
+
|
|
732
|
+
```bash
|
|
733
|
+
# Clone the repository
|
|
734
|
+
git clone https://github.com/ZacharyEggert/project-roadmap-tracking.git
|
|
735
|
+
cd project-roadmap-tracking
|
|
736
|
+
|
|
737
|
+
# Install dependencies
|
|
738
|
+
yarn install
|
|
739
|
+
|
|
740
|
+
# Build the project
|
|
741
|
+
yarn build
|
|
742
|
+
```
|
|
743
|
+
|
|
744
|
+
### Development Commands
|
|
745
|
+
|
|
746
|
+
```bash
|
|
747
|
+
# Run tests
|
|
748
|
+
yarn test
|
|
749
|
+
|
|
750
|
+
# Run tests with coverage
|
|
751
|
+
yarn test:coverage:summary
|
|
752
|
+
|
|
753
|
+
# Run linter
|
|
754
|
+
yarn lint
|
|
755
|
+
|
|
756
|
+
# Auto-fix linting issues
|
|
757
|
+
yarn lint:fix
|
|
758
|
+
|
|
759
|
+
# Format code
|
|
760
|
+
yarn format
|
|
761
|
+
|
|
762
|
+
# Run CLI locally without installing
|
|
763
|
+
./bin/dev.js COMMAND
|
|
764
|
+
|
|
765
|
+
# Link for global development testing
|
|
766
|
+
yarn link
|
|
767
|
+
prt COMMAND
|
|
768
|
+
```
|
|
769
|
+
|
|
770
|
+
### Testing
|
|
771
|
+
|
|
772
|
+
PRT has comprehensive test coverage (98.78%):
|
|
773
|
+
|
|
774
|
+
- **Unit tests**: Services, repositories, utilities, errors
|
|
775
|
+
- **Command tests**: All CLI commands
|
|
776
|
+
- **Test runner**: Mocha + Chai
|
|
777
|
+
- **Coverage**: c8
|
|
778
|
+
|
|
779
|
+
```bash
|
|
780
|
+
# Run all tests
|
|
781
|
+
yarn test
|
|
782
|
+
|
|
783
|
+
# Run a specific test file
|
|
784
|
+
yarn mocha --loader=tsx/esm "test/path/to/file.test.ts"
|
|
785
|
+
|
|
786
|
+
# Generate coverage report
|
|
787
|
+
yarn test:coverage
|
|
788
|
+
|
|
789
|
+
# View coverage summary
|
|
790
|
+
yarn test:coverage:summary
|
|
791
|
+
```
|
|
792
|
+
|
|
793
|
+
### Architecture
|
|
794
|
+
|
|
795
|
+
For detailed architecture documentation, including design patterns, service layer architecture, repository pattern, and migration path, see [ARCHITECTURE.md](ARCHITECTURE.md).
|
|
796
|
+
|
|
797
|
+
Key architectural features:
|
|
798
|
+
- ✓ Service layer for business logic (99.89% coverage)
|
|
799
|
+
- ✓ Repository pattern with caching and file watching (96.06% coverage)
|
|
800
|
+
- ✓ Custom error hierarchy with error codes (100% coverage)
|
|
801
|
+
- ✓ Comprehensive test suite (98.78% overall coverage)
|
|
802
|
+
- ✓ Backward compatible legacy mode
|
|
803
|
+
|
|
804
|
+
### Contributing
|
|
805
|
+
|
|
806
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for contribution guidelines.
|
|
807
|
+
|
|
808
|
+
### Release Process
|
|
809
|
+
|
|
810
|
+
1. Update version in `package.json`
|
|
811
|
+
2. Run `yarn prepack` (generates manifest and updates README)
|
|
812
|
+
3. Commit changes
|
|
813
|
+
4. Run `yarn pack` to create tarball
|
|
814
|
+
5. Run `npm publish` to publish to npm registry
|
|
815
|
+
|
|
816
|
+
## License
|
|
817
|
+
|
|
818
|
+
MIT
|
|
819
|
+
|
|
820
|
+
## Links
|
|
821
|
+
|
|
822
|
+
- [GitHub Repository](https://github.com/ZacharyEggert/project-roadmap-tracking)
|
|
823
|
+
- [npm Package](https://www.npmjs.com/package/project-roadmap-tracking)
|
|
824
|
+
- [Issues](https://github.com/ZacharyEggert/project-roadmap-tracking/issues)
|
|
825
|
+
- [Architecture Documentation](ARCHITECTURE.md)
|
|
826
|
+
- [Contributing Guidelines](CONTRIBUTING.md)
|
package/dist/commands/add.d.ts
CHANGED
|
@@ -7,10 +7,12 @@ export default class Add extends Command {
|
|
|
7
7
|
static examples: string[];
|
|
8
8
|
static flags: {
|
|
9
9
|
details: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
+
'no-repo': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
10
11
|
priority: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
12
|
status: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
13
|
tags: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
14
|
type: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
14
16
|
};
|
|
15
17
|
run(): Promise<void>;
|
|
16
18
|
}
|
package/dist/commands/add.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { Args, Command, Flags } from '@oclif/core';
|
|
2
|
+
import { getDefaultConfigRepository } from '../repositories/config.repository.js';
|
|
3
|
+
import { RoadmapRepository } from '../repositories/roadmap.repository.js';
|
|
4
|
+
import errorHandlerService from '../services/error-handler.service.js';
|
|
5
|
+
import taskService from '../services/task.service.js';
|
|
2
6
|
import { readConfigFile } from '../util/read-config.js';
|
|
3
7
|
import { readRoadmapFile } from '../util/read-roadmap.js';
|
|
4
|
-
import { PRIORITY, STATUS, TASK_TYPE
|
|
8
|
+
import { PRIORITY, STATUS, TASK_TYPE } from '../util/types.js';
|
|
5
9
|
import { writeRoadmapFile } from '../util/write-roadmap.js';
|
|
6
10
|
export default class Add extends Command {
|
|
7
11
|
static args = {
|
|
@@ -13,6 +17,10 @@ export default class Add extends Command {
|
|
|
13
17
|
// force: Flags.boolean({char: 'f'}),
|
|
14
18
|
// name: Flags.string({char: 'n', description: 'name to print'}),
|
|
15
19
|
details: Flags.string({ char: 'd', description: 'description of the task to add', required: true }),
|
|
20
|
+
'no-repo': Flags.boolean({
|
|
21
|
+
default: false,
|
|
22
|
+
description: 'use legacy direct file I/O instead of repository pattern',
|
|
23
|
+
}),
|
|
16
24
|
priority: Flags.string({
|
|
17
25
|
char: 'p',
|
|
18
26
|
default: PRIORITY.Medium,
|
|
@@ -38,39 +46,39 @@ export default class Add extends Command {
|
|
|
38
46
|
options: [TASK_TYPE.Bug, TASK_TYPE.Feature, TASK_TYPE.Improvement, TASK_TYPE.Planning, TASK_TYPE.Research],
|
|
39
47
|
required: true,
|
|
40
48
|
}),
|
|
49
|
+
verbose: Flags.boolean({
|
|
50
|
+
char: 'v',
|
|
51
|
+
default: false,
|
|
52
|
+
description: 'show detailed error information including stack traces',
|
|
53
|
+
}),
|
|
41
54
|
};
|
|
42
55
|
async run() {
|
|
43
56
|
const { args, flags } = await this.parse(Add);
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
+
try {
|
|
58
|
+
// Use repository pattern by default, unless --no-repo flag is set
|
|
59
|
+
const config = flags['no-repo'] ? await readConfigFile() : await getDefaultConfigRepository().load();
|
|
60
|
+
const roadmap = flags['no-repo']
|
|
61
|
+
? await readRoadmapFile(config.path)
|
|
62
|
+
: await RoadmapRepository.fromConfig(config).load(config.path);
|
|
63
|
+
const taskType = flags.type;
|
|
64
|
+
const newTaskID = taskService.generateNextId(roadmap, taskType);
|
|
65
|
+
const newTask = taskService.createTask({
|
|
66
|
+
details: flags.details,
|
|
67
|
+
id: newTaskID,
|
|
68
|
+
priority: flags.priority,
|
|
69
|
+
status: flags.status,
|
|
70
|
+
tags: flags.tags ? flags.tags.split(',').map((tag) => tag.trim()) : [],
|
|
71
|
+
title: args.title,
|
|
72
|
+
type: taskType,
|
|
73
|
+
});
|
|
74
|
+
const updatedRoadmap = taskService.addTask(roadmap, newTask);
|
|
75
|
+
await (flags['no-repo']
|
|
76
|
+
? writeRoadmapFile(config.path, updatedRoadmap)
|
|
77
|
+
: RoadmapRepository.fromConfig(config).save(config.path, updatedRoadmap));
|
|
78
|
+
}
|
|
79
|
+
catch (error) {
|
|
80
|
+
const exitCode = errorHandlerService.handleError(error);
|
|
81
|
+
this.error(errorHandlerService.formatErrorMessage(error, flags.verbose), { exit: exitCode });
|
|
57
82
|
}
|
|
58
|
-
const newTask = {
|
|
59
|
-
blocks: [],
|
|
60
|
-
createdAt: new Date().toISOString(),
|
|
61
|
-
'depends-on': [],
|
|
62
|
-
details: flags.details,
|
|
63
|
-
id: newTaskID,
|
|
64
|
-
notes: '',
|
|
65
|
-
'passes-tests': false,
|
|
66
|
-
priority: flags.priority,
|
|
67
|
-
status: flags.status,
|
|
68
|
-
tags: flags.tags ? flags.tags.split(',').map((tag) => tag.trim()) : [],
|
|
69
|
-
title: args.title,
|
|
70
|
-
type: taskType,
|
|
71
|
-
updatedAt: new Date().toISOString(),
|
|
72
|
-
};
|
|
73
|
-
roadmapFile.tasks.push(newTask);
|
|
74
|
-
await writeRoadmapFile(config.path, roadmapFile);
|
|
75
83
|
}
|
|
76
84
|
}
|
|
@@ -6,7 +6,9 @@ export default class Complete extends Command {
|
|
|
6
6
|
static description: string;
|
|
7
7
|
static examples: string[];
|
|
8
8
|
static flags: {
|
|
9
|
+
'no-repo': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
9
10
|
tests: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
11
|
+
verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
10
12
|
};
|
|
11
13
|
run(): Promise<void>;
|
|
12
14
|
}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { Args, Command, Flags } from '@oclif/core';
|
|
2
|
+
import { getDefaultConfigRepository } from '../repositories/config.repository.js';
|
|
3
|
+
import { RoadmapRepository } from '../repositories/roadmap.repository.js';
|
|
4
|
+
import errorHandlerService from '../services/error-handler.service.js';
|
|
2
5
|
import { readConfigFile } from '../util/read-config.js';
|
|
3
6
|
import { readRoadmapFile } from '../util/read-roadmap.js';
|
|
4
7
|
import { STATUS } from '../util/types.js';
|
|
@@ -11,25 +14,45 @@ export default class Complete extends Command {
|
|
|
11
14
|
static description = 'Mark a task as completed';
|
|
12
15
|
static examples = ['<%= config.bin %> <%= command.id %> F-001 --tests'];
|
|
13
16
|
static flags = {
|
|
17
|
+
'no-repo': Flags.boolean({
|
|
18
|
+
default: false,
|
|
19
|
+
description: 'use legacy direct file I/O instead of repository pattern',
|
|
20
|
+
}),
|
|
14
21
|
// flag with no value (-f, --force)
|
|
15
22
|
// force: Flags.boolean({char: 'f'}),
|
|
16
23
|
// flag with a value (-n, --name=VALUE)
|
|
17
24
|
// name: Flags.string({char: 'n', description: 'name to print'}),
|
|
18
25
|
tests: Flags.boolean({ char: 't', description: 'mark task as passes-tests' }),
|
|
26
|
+
verbose: Flags.boolean({
|
|
27
|
+
char: 'v',
|
|
28
|
+
default: false,
|
|
29
|
+
description: 'show detailed error information including stack traces',
|
|
30
|
+
}),
|
|
19
31
|
};
|
|
20
32
|
async run() {
|
|
21
33
|
const { args, flags } = await this.parse(Complete);
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
+
try {
|
|
35
|
+
// Use repository pattern by default, unless --no-repo flag is set
|
|
36
|
+
const config = flags['no-repo'] ? await readConfigFile() : await getDefaultConfigRepository().load();
|
|
37
|
+
const roadmap = flags['no-repo']
|
|
38
|
+
? await readRoadmapFile(config.path)
|
|
39
|
+
: await RoadmapRepository.fromConfig(config).load(config.path);
|
|
40
|
+
const updatedRoadmap = await updateTaskInRoadmap(roadmap, args.taskID, flags.tests
|
|
41
|
+
? {
|
|
42
|
+
'passes-tests': true,
|
|
43
|
+
status: STATUS.Completed,
|
|
44
|
+
}
|
|
45
|
+
: {
|
|
46
|
+
status: STATUS.Completed,
|
|
47
|
+
});
|
|
48
|
+
await (flags['no-repo']
|
|
49
|
+
? writeRoadmapFile(config.path, updatedRoadmap)
|
|
50
|
+
: RoadmapRepository.fromConfig(config).save(config.path, updatedRoadmap));
|
|
51
|
+
this.log(`Task ${args.taskID} marked as completed.`);
|
|
52
|
+
}
|
|
53
|
+
catch (error) {
|
|
54
|
+
const exitCode = errorHandlerService.handleError(error);
|
|
55
|
+
this.error(errorHandlerService.formatErrorMessage(error, flags.verbose), { exit: exitCode });
|
|
56
|
+
}
|
|
34
57
|
}
|
|
35
58
|
}
|
package/dist/commands/init.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export default class Init extends Command {
|
|
|
10
10
|
description: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
11
|
force: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
12
12
|
name: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
13
14
|
withSampleTasks: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
14
15
|
};
|
|
15
16
|
buildBlankRoadmap({ description, name, withSampleTasks, }: {
|