@taskset/cli 3.0.3 → 5.1.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/CHANGELOG.md +39 -0
- package/README.md +8 -3
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +686 -19
- package/docs/_meta.ts +8 -0
- package/docs/cli-reference.md +461 -0
- package/docs/configuration.md +61 -0
- package/docs/document-types.md +100 -0
- package/docs/getting-started.md +99 -0
- package/docs/index.md +37 -0
- package/docs/maintainers/_meta.ts +7 -0
- package/docs/maintainers/architecture/_meta.ts +5 -0
- package/docs/maintainers/architecture/decisions/0001-documentation-platform.md +70 -0
- package/docs/maintainers/architecture/decisions/0002-code-architecture.md +31 -0
- package/docs/maintainers/architecture/decisions/0003-snapshot-policy.md +31 -0
- package/docs/maintainers/architecture/decisions/_meta.ts +5 -0
- package/docs/maintainers/architecture/overview.md +111 -0
- package/docs/maintainers/architecture/synchronization.md +56 -0
- package/docs/maintainers/development/_meta.ts +6 -0
- package/docs/maintainers/development/contributing.md +59 -0
- package/docs/maintainers/development/documentation.md +69 -0
- package/docs/maintainers/development/engineering.md +59 -0
- package/docs/maintainers/development/testing.md +89 -0
- package/docs/maintainers/index.md +22 -0
- package/docs/maintainers/product/_meta.ts +3 -0
- package/docs/maintainers/product/vision.md +76 -0
- package/docs/maintainers/technology.md +55 -0
- package/docs/task-files.md +174 -0
- package/package.json +10 -8
- package/skills/taskset/SKILL.md +227 -0
- package/skills/taskset/references/changesets-examples.md +97 -0
- package/skills/taskset/references/document-modeling-examples.md +63 -0
- package/skills/taskset/references/monorepo-task-modeling.md +125 -0
- package/skills/taskset/references/task-modeling-examples.md +249 -0
- package/skills/taskset-implement/SKILL.md +234 -0
- package/skills/taskset-implement/agents/openai.yaml +4 -0
- package/skills/taskset-implement/references/architecture/client-and-server.md +69 -0
- package/skills/taskset-implement/references/architecture/documentation-and-generated.md +70 -0
- package/skills/taskset-implement/references/architecture/ownership-and-dependencies.md +107 -0
- package/skills/taskset-implement/references/architecture/product-and-source.md +80 -0
- package/skills/taskset-implement/references/architecture/storage-and-snapshots.md +45 -0
- package/skills/taskset-implement/references/architecture.md +34 -0
- package/skills/taskset-implement/references/conventions/backend-and-tooling.md +33 -0
- package/skills/taskset-implement/references/conventions/design.md +38 -0
- package/skills/taskset-implement/references/conventions/interfaces-and-ui.md +50 -0
- package/skills/taskset-implement/references/conventions/naming-and-packages.md +64 -0
- package/skills/taskset-implement/references/conventions/task-files.md +89 -0
- package/skills/taskset-implement/references/conventions/tests-and-docs.md +55 -0
- package/skills/taskset-implement/references/conventions/typescript-and-exports.md +41 -0
- package/skills/taskset-implement/references/conventions.md +40 -0
- package/skills/taskset-implement/references/release.md +135 -0
- package/skills/taskset-implement/references/workflows/dependencies-and-docs-site.md +54 -0
- package/skills/taskset-implement/references/workflows/environment-and-pnpm.md +108 -0
- package/skills/taskset-implement/references/workflows/persisted-data-and-git.md +30 -0
- package/skills/taskset-implement/references/workflows/validation.md +34 -0
- package/skills/taskset-implement/references/workflows/vitest-and-test-strategy.md +82 -0
- package/skills/taskset-implement/references/workflows.md +33 -0
- package/src/cli.ts +851 -17
package/docs/_meta.ts
ADDED
|
@@ -0,0 +1,461 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: CLI Reference
|
|
3
|
+
description: Complete reference for the taskset command-line interface.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# CLI Reference
|
|
7
|
+
|
|
8
|
+
The `taskset` command is a thin adapter over `@taskset/core`. It parses
|
|
9
|
+
arguments, validates command options, calls core operations, and renders human
|
|
10
|
+
or JSON output.
|
|
11
|
+
|
|
12
|
+
Use `pnpm taskset <command>` when Taskset is installed as a project
|
|
13
|
+
dependency. The examples below use `taskset` directly for brevity.
|
|
14
|
+
|
|
15
|
+
## Common Behavior
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
taskset help
|
|
19
|
+
taskset --help
|
|
20
|
+
taskset -h
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Running without a command also prints usage. These help paths exit with code
|
|
24
|
+
`0`.
|
|
25
|
+
|
|
26
|
+
Most repository commands accept:
|
|
27
|
+
|
|
28
|
+
| Option | Description |
|
|
29
|
+
| --- | --- |
|
|
30
|
+
| `--cwd <path>` | Resolve repository discovery from another working directory. |
|
|
31
|
+
| `--json` | Emit structured JSON instead of human-readable text where supported. |
|
|
32
|
+
|
|
33
|
+
Stdout is reserved for requested output. Diagnostics, validation failures, and
|
|
34
|
+
best-effort generated-view refresh warnings are written to stderr.
|
|
35
|
+
|
|
36
|
+
Exit codes:
|
|
37
|
+
|
|
38
|
+
| Code | Meaning |
|
|
39
|
+
| --- | --- |
|
|
40
|
+
| `0` | Command succeeded. |
|
|
41
|
+
| `1` | Repository or domain operation failed, such as invalid task state or delete blockers. |
|
|
42
|
+
| `2` | CLI usage, argument validation, path normalization, or parse validation failed. |
|
|
43
|
+
|
|
44
|
+
## Repository Commands
|
|
45
|
+
|
|
46
|
+
### `init`
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
taskset init [--cwd <path>]
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Initializes a Taskset repository in the target directory. The command creates
|
|
53
|
+
`taskset.config.ts`, `.taskset/tasks/`, and `.taskset/.gitignore` when they do
|
|
54
|
+
not already exist.
|
|
55
|
+
|
|
56
|
+
Human output:
|
|
57
|
+
|
|
58
|
+
```text
|
|
59
|
+
Initialized Taskset in <root-directory>
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### `config`
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
taskset config [--json] [--cwd <path>]
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Discovers the nearest `taskset.config.ts` by walking upward from the working
|
|
69
|
+
directory.
|
|
70
|
+
|
|
71
|
+
Human output is the config file path. JSON output contains:
|
|
72
|
+
|
|
73
|
+
```json
|
|
74
|
+
{
|
|
75
|
+
"rootDirectory": "...",
|
|
76
|
+
"configPath": "...",
|
|
77
|
+
"dataDirectory": "...",
|
|
78
|
+
"config": {}
|
|
79
|
+
}
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### `doctor`
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
taskset doctor [--json] [--cwd <path>]
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Validates the repository without modifying files. It scans canonical task
|
|
89
|
+
metadata, paths, and graph relationships.
|
|
90
|
+
|
|
91
|
+
Human success output:
|
|
92
|
+
|
|
93
|
+
```text
|
|
94
|
+
Taskset repository is valid (<count> tasks)
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Human failure output is tab-separated:
|
|
98
|
+
|
|
99
|
+
```text
|
|
100
|
+
<code> <path-or-> <message> <remediation>
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
JSON output is the full doctor result, including `valid`, `taskCount`, and
|
|
104
|
+
diagnostics.
|
|
105
|
+
|
|
106
|
+
### `generate`
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
taskset generate [--json] [--cwd <path>]
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Rebuilds disposable generated views under each entity folder's `.generated/`
|
|
113
|
+
directory (for example `.taskset/tasks/.generated/` and
|
|
114
|
+
`.taskset/stories/.generated/`). Removes any legacy `.taskset/generated/` tree.
|
|
115
|
+
|
|
116
|
+
Human output:
|
|
117
|
+
|
|
118
|
+
```text
|
|
119
|
+
Generated <count> views in <directory>
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
JSON output is the generated-views result with the target directory and written
|
|
123
|
+
files.
|
|
124
|
+
|
|
125
|
+
## Snapshot Commands
|
|
126
|
+
|
|
127
|
+
Snapshots are non-authoritative safety checkpoints under `.taskset/snapshots/`.
|
|
128
|
+
Git remains the normal history and collaboration mechanism.
|
|
129
|
+
|
|
130
|
+
### `snapshot create`
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
taskset snapshot create [--json] [--cwd <path>]
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
Creates an immutable archive of canonical task files.
|
|
137
|
+
|
|
138
|
+
Human output is the snapshot ID. JSON output is the snapshot manifest.
|
|
139
|
+
|
|
140
|
+
### `snapshot list`
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
taskset snapshot list [--json] [--cwd <path>]
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
Lists available snapshots.
|
|
147
|
+
|
|
148
|
+
Human output is tab-separated:
|
|
149
|
+
|
|
150
|
+
```text
|
|
151
|
+
<snapshot-id> <created-at> <file-count>
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
JSON output is an array of snapshot manifests.
|
|
155
|
+
|
|
156
|
+
### `snapshot restore`
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
taskset snapshot restore <snapshot-id> [--apply] [--json] [--cwd <path>]
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
Previews or restores canonical task files from a snapshot. The default is a dry
|
|
163
|
+
run. Use `--apply` to mutate task files.
|
|
164
|
+
|
|
165
|
+
Human output:
|
|
166
|
+
|
|
167
|
+
```text
|
|
168
|
+
Would restore <count> task files from <snapshot-id>
|
|
169
|
+
Restored <count> task files from <snapshot-id>
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
JSON output is the restore result, including `applied` and `changes`.
|
|
173
|
+
|
|
174
|
+
## Task Metadata Options
|
|
175
|
+
|
|
176
|
+
`task create` and `task update` accept the same metadata options unless noted.
|
|
177
|
+
Array options are repeatable.
|
|
178
|
+
|
|
179
|
+
| Option | Field | Notes |
|
|
180
|
+
| --- | --- | --- |
|
|
181
|
+
| `--title <title>` | `title` | Required for create, optional for update. |
|
|
182
|
+
| `--status <status>` | `status` | One of `todo`, `doing`, `blocked`, `done`, `canceled`. |
|
|
183
|
+
| `--priority <priority>` | `priority` | One of `low`, `medium`, `high`, `urgent`. |
|
|
184
|
+
| `--order <number>` | `order` | Nonnegative finite number. Lower values sort first. |
|
|
185
|
+
| `--label <label>` | `labels` | Repeatable. |
|
|
186
|
+
| `--depends-on <task-id>` | `dependsOn` | Repeatable. |
|
|
187
|
+
| `--file <path>` | `files` | Repeatable; normalized to a repository-relative POSIX path. |
|
|
188
|
+
| `--owner <owner>` | `owner` | Trimmed string. |
|
|
189
|
+
| `--assignee <assignee>` | `assignees` | Repeatable. |
|
|
190
|
+
| `--reviewer <reviewer>` | `reviewers` | Repeatable. |
|
|
191
|
+
| `--team <team>` | `team` | Trimmed string. |
|
|
192
|
+
| `--estimate <minutes>` | `estimate` | Nonnegative integer. |
|
|
193
|
+
| `--effort <value>` | `effort` | Nonnegative finite number. |
|
|
194
|
+
| `--risk <risk>` | `risk` | One of `low`, `medium`, `high`. |
|
|
195
|
+
| `--due-date <date>` | `dueDate` | `YYYY-MM-DD` or `YYYY-MM-DD HH:mm UTC`. |
|
|
196
|
+
| `--related <task-id>` | `related` | Repeatable. |
|
|
197
|
+
| `--duplicate <task-id>` | `duplicates` | Repeatable. |
|
|
198
|
+
| `--parent <task-id>` | `parent` | Single task ID. |
|
|
199
|
+
| `--directory <path>` | `directories` | Repeatable; normalized to a repository-relative POSIX path. |
|
|
200
|
+
| `--project <project>` | `projects` | Repeatable. |
|
|
201
|
+
| `--body <markdown>` | body | Replaces the Markdown body. |
|
|
202
|
+
| `--json` | output | Emit a task record as JSON. |
|
|
203
|
+
| `--cwd <path>` | discovery | Resolve repository discovery from another directory. |
|
|
204
|
+
|
|
205
|
+
## Task Commands
|
|
206
|
+
|
|
207
|
+
### `task create`
|
|
208
|
+
|
|
209
|
+
```bash
|
|
210
|
+
taskset task create --title <title> [metadata options] [--json] [--cwd <path>]
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
Creates a versionless task file using repository defaults for omitted
|
|
214
|
+
configured fields.
|
|
215
|
+
|
|
216
|
+
Human output is the task ID. JSON output is a task record containing
|
|
217
|
+
`relativePath` and metadata fields.
|
|
218
|
+
|
|
219
|
+
### `task list`
|
|
220
|
+
|
|
221
|
+
```bash
|
|
222
|
+
taskset task list [query options] [--json] [--cwd <path>]
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
Lists tasks using metadata, relationship, planning, timestamp, text, path, and
|
|
226
|
+
impact filters.
|
|
227
|
+
|
|
228
|
+
Filter options:
|
|
229
|
+
|
|
230
|
+
| Option | Description |
|
|
231
|
+
| --- | --- |
|
|
232
|
+
| `--status <status>` | Repeatable; OR within statuses. |
|
|
233
|
+
| `--priority <priority>` | Repeatable; OR within priorities. |
|
|
234
|
+
| `--label <label>` | Repeatable; every requested label must be present. |
|
|
235
|
+
| `--owner <owner>` | Repeatable; OR within owners. |
|
|
236
|
+
| `--assignee <assignee>` | Repeatable; OR within assignees. |
|
|
237
|
+
| `--reviewer <reviewer>` | Repeatable; OR within reviewers. |
|
|
238
|
+
| `--team <team>` | Repeatable; OR within teams. |
|
|
239
|
+
| `--risk <risk>` | Repeatable; OR within risks. |
|
|
240
|
+
| `--project <project>` | Repeatable; OR within projects. |
|
|
241
|
+
| `--depends-on <task-id>` | Match a direct dependency. |
|
|
242
|
+
| `--related <task-id>` | Match a related task. |
|
|
243
|
+
| `--duplicate <task-id>` | Match a duplicate task relationship. |
|
|
244
|
+
| `--parent <task-id>` | Match a direct parent. |
|
|
245
|
+
| `--file <path>` | Repeatable; unified containment query over `files` and `directories`. |
|
|
246
|
+
| `--directory <path>` | Repeatable; containment query over `directories` only. |
|
|
247
|
+
| `--estimate-min <minutes>` | Inclusive minimum estimate. |
|
|
248
|
+
| `--estimate-max <minutes>` | Inclusive maximum estimate. |
|
|
249
|
+
| `--effort-min <value>` | Inclusive minimum effort. |
|
|
250
|
+
| `--effort-max <value>` | Inclusive maximum effort. |
|
|
251
|
+
| `--due-before <date>` | Inclusive due-date upper bound. |
|
|
252
|
+
| `--due-after <date>` | Inclusive due-date lower bound. |
|
|
253
|
+
| `--created-before <date>` | Inclusive created-at upper bound. |
|
|
254
|
+
| `--created-after <date>` | Inclusive created-at lower bound. |
|
|
255
|
+
| `--updated-before <date>` | Inclusive updated-at upper bound. |
|
|
256
|
+
| `--updated-after <date>` | Inclusive updated-at lower bound. |
|
|
257
|
+
| `--search <text>` | Search task title and Markdown body; every whitespace-separated term must match. |
|
|
258
|
+
| `--sort <key>` | Sort key. |
|
|
259
|
+
| `--direction <asc|desc>` | Sort direction. |
|
|
260
|
+
| `--impact` | Add tasks that transitively depend on direct matches. |
|
|
261
|
+
| `--include-derived` | Include derived relationship projections in JSON output. |
|
|
262
|
+
|
|
263
|
+
Sort keys are `id`, `title`, `status`, `priority`, `order`, `owner`, `team`,
|
|
264
|
+
`estimate`, `effort`, `risk`, `dueDate`, `createdAt`, and `updatedAt`. With
|
|
265
|
+
`--sort order`, tasks without `order` sort after ordered tasks; duplicate
|
|
266
|
+
values fall back to task ID ordering.
|
|
267
|
+
|
|
268
|
+
Different filter categories compose with AND. Repeated enum, person, project,
|
|
269
|
+
file, and directory values use OR within their category. Repeated labels are
|
|
270
|
+
stricter and require all requested labels.
|
|
271
|
+
|
|
272
|
+
Search is Unicode-normalized and case-insensitive. Its terms may occur in any
|
|
273
|
+
order or location across the combined title and Markdown body, so
|
|
274
|
+
`--search "cache invalidation"` does not require that exact phrase.
|
|
275
|
+
|
|
276
|
+
Without `--impact`, human output is:
|
|
277
|
+
|
|
278
|
+
```text
|
|
279
|
+
<task-id> <status> <title>
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
With `--impact`, human output prefixes direct and impacted rows:
|
|
283
|
+
|
|
284
|
+
```text
|
|
285
|
+
direct <task-id> <status> <title>
|
|
286
|
+
impact <task-id> <status> <title>
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
JSON output without `--impact` is an array of task records. JSON output with
|
|
290
|
+
`--impact` is:
|
|
291
|
+
|
|
292
|
+
```json
|
|
293
|
+
{
|
|
294
|
+
"direct": [],
|
|
295
|
+
"impacted": []
|
|
296
|
+
}
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
Use `--include-derived` to include `blockedBy`, `blocks`, `children`, and
|
|
300
|
+
`subtasks` projections in each JSON record.
|
|
301
|
+
|
|
302
|
+
### `task show`
|
|
303
|
+
|
|
304
|
+
```bash
|
|
305
|
+
taskset task show <task-id> [--include-derived] [--json] [--cwd <path>]
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
Shows one task by ID.
|
|
309
|
+
|
|
310
|
+
Human output is the serialized task Markdown. JSON output contains:
|
|
311
|
+
|
|
312
|
+
```json
|
|
313
|
+
{
|
|
314
|
+
"relativePath": ".taskset/tasks/0000001-short-title.md",
|
|
315
|
+
"metadata": {},
|
|
316
|
+
"body": "...",
|
|
317
|
+
"derived": {}
|
|
318
|
+
}
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
The `derived` property is present only with `--include-derived`.
|
|
322
|
+
|
|
323
|
+
### `task update`
|
|
324
|
+
|
|
325
|
+
```bash
|
|
326
|
+
taskset task update <task-id> [metadata options] [clear options] [--json] [--cwd <path>]
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
Updates one task. At least one non-control option is required. A field cannot
|
|
330
|
+
be set and cleared in the same command.
|
|
331
|
+
|
|
332
|
+
Clear options:
|
|
333
|
+
|
|
334
|
+
| Option | Effect |
|
|
335
|
+
| --- | --- |
|
|
336
|
+
| `--clear-priority` | Remove `priority`. |
|
|
337
|
+
| `--clear-order` | Remove `order`. |
|
|
338
|
+
| `--clear-labels` | Replace `labels` with an empty list. |
|
|
339
|
+
| `--clear-dependencies` | Replace `dependsOn` with an empty list. |
|
|
340
|
+
| `--clear-files` | Replace `files` with an empty list. |
|
|
341
|
+
| `--clear-owner` | Remove `owner`. |
|
|
342
|
+
| `--clear-assignees` | Replace `assignees` with an empty list. |
|
|
343
|
+
| `--clear-reviewers` | Replace `reviewers` with an empty list. |
|
|
344
|
+
| `--clear-team` | Remove `team`. |
|
|
345
|
+
| `--clear-estimate` | Remove `estimate`. |
|
|
346
|
+
| `--clear-effort` | Remove `effort`. |
|
|
347
|
+
| `--clear-risk` | Remove `risk`. |
|
|
348
|
+
| `--clear-due-date` | Remove `dueDate`. |
|
|
349
|
+
| `--clear-related` | Replace `related` with an empty list. |
|
|
350
|
+
| `--clear-duplicates` | Replace `duplicates` with an empty list. |
|
|
351
|
+
| `--clear-parent` | Remove `parent`. |
|
|
352
|
+
| `--clear-directories` | Replace `directories` with an empty list. |
|
|
353
|
+
| `--clear-projects` | Replace `projects` with an empty list. |
|
|
354
|
+
|
|
355
|
+
Human output is the task ID. JSON output is the updated task record.
|
|
356
|
+
|
|
357
|
+
### `task status`
|
|
358
|
+
|
|
359
|
+
```bash
|
|
360
|
+
taskset task status <task-id> <status> [--json] [--cwd <path>]
|
|
361
|
+
```
|
|
362
|
+
|
|
363
|
+
Updates only task status and enforces lifecycle transition rules. `done` and
|
|
364
|
+
`canceled` are terminal states.
|
|
365
|
+
|
|
366
|
+
Human output is the task ID. JSON output is the updated task record.
|
|
367
|
+
|
|
368
|
+
### `task delete`
|
|
369
|
+
|
|
370
|
+
```bash
|
|
371
|
+
taskset task delete <task-id> [--remove-dependencies] [--json] [--cwd <path>]
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
Deletes one task. By default, deletion is blocked while another task has an
|
|
375
|
+
inbound canonical dependency on the target. Use `--remove-dependencies` to
|
|
376
|
+
remove those inbound references and delete the target in one mutation.
|
|
377
|
+
|
|
378
|
+
Human output is the deleted task ID. JSON output contains `deleted: true`
|
|
379
|
+
alongside the deleted task record.
|
|
380
|
+
|
|
381
|
+
### `task migrate-ids`
|
|
382
|
+
|
|
383
|
+
```bash
|
|
384
|
+
taskset task migrate-ids [--json] [--cwd <path>]
|
|
385
|
+
```
|
|
386
|
+
|
|
387
|
+
Atomically converts legacy `TS-` task IDs to seven-digit, title-derived IDs and
|
|
388
|
+
rewrites canonical relationships plus references in repository text files.
|
|
389
|
+
Dependencies, Git internals, build output, caches, generated views, indexes,
|
|
390
|
+
and snapshots are excluded. Human output is a tab-separated
|
|
391
|
+
old-to-new mapping; JSON emits the same mapping as objects.
|
|
392
|
+
|
|
393
|
+
### `sync`
|
|
394
|
+
|
|
395
|
+
```bash
|
|
396
|
+
taskset sync [--concurrency <count>] [--json] [--cwd <path>]
|
|
397
|
+
```
|
|
398
|
+
|
|
399
|
+
Ensures every canonical document directory exists under `.taskset`, applies
|
|
400
|
+
legacy task-ID and repository-reference migrations, and rebuilds generated
|
|
401
|
+
views. Progress counts and percentages are sent to stderr.
|
|
402
|
+
|
|
403
|
+
## Document Commands
|
|
404
|
+
|
|
405
|
+
`document` may be shortened to `doc`. Supported types are `story`, `flow`,
|
|
406
|
+
`decision`, `research`, and `runbook`; `adr` and `dr` alias `decision`.
|
|
407
|
+
|
|
408
|
+
```bash
|
|
409
|
+
taskset document create <type> --title <title> [metadata options]
|
|
410
|
+
taskset document import <markdown-path> [--type <type>] [--title <title>] [--move]
|
|
411
|
+
taskset document batch <manifest.json> [--concurrency <count>] [--json]
|
|
412
|
+
taskset document list [type] [query options]
|
|
413
|
+
taskset document show <document-id> [--type <type>] [--include-derived] [--json]
|
|
414
|
+
taskset document update <document-id> [metadata options] [--type <type>]
|
|
415
|
+
taskset document status <document-id> <status> [--type <type>] [--json]
|
|
416
|
+
taskset document delete <document-id> [--type <type>] [--remove-dependencies] [--json]
|
|
417
|
+
```
|
|
418
|
+
|
|
419
|
+
Create uses the type-specific template unless `--body` is supplied and accepts
|
|
420
|
+
the same metadata options as `task create`. Import preserves the Markdown body
|
|
421
|
+
and infers type from a recognized parent directory when possible. It copies by
|
|
422
|
+
default; `--move` deletes the source only after the canonical document is
|
|
423
|
+
written successfully.
|
|
424
|
+
|
|
425
|
+
List, show, update, status, and delete mirror the task commands, including
|
|
426
|
+
search, filters, sort, impact, derived relationships, clear flags, and
|
|
427
|
+
guarded deletion. Document statuses are `draft`, `ready`, `active`, `accepted`,
|
|
428
|
+
`superseded`, and `archived`.
|
|
429
|
+
|
|
430
|
+
Batch manifests contain an array of `create`, `import`, `update`, and `export`
|
|
431
|
+
operations. Work is paced with bounded concurrency, results preserve manifest
|
|
432
|
+
order, progress is sent to stderr, and `--json` reserves stdout for the result
|
|
433
|
+
array. See [Document Types](document-types.md#batch-workflows) for a complete
|
|
434
|
+
manifest example.
|
|
435
|
+
|
|
436
|
+
## Generated-View Warnings
|
|
437
|
+
|
|
438
|
+
Task and document creation, update, status changes, deletion, and snapshot
|
|
439
|
+
restore mutate canonical Markdown first and then refresh disposable generated
|
|
440
|
+
views. If that refresh fails after the canonical mutation succeeds, the command
|
|
441
|
+
still succeeds and writes a stderr warning:
|
|
442
|
+
|
|
443
|
+
```text
|
|
444
|
+
warning: <message>
|
|
445
|
+
```
|
|
446
|
+
|
|
447
|
+
Run `taskset generate` later to rebuild generated views explicitly.
|
|
448
|
+
|
|
449
|
+
## Compatibility Notes
|
|
450
|
+
|
|
451
|
+
`tasks-for-file` was removed. Use:
|
|
452
|
+
|
|
453
|
+
```bash
|
|
454
|
+
taskset task list --file <path> --impact
|
|
455
|
+
```
|
|
456
|
+
|
|
457
|
+
Task files are versionless. Frontmatter that still contains a legacy version
|
|
458
|
+
field is invalid and must be converted by removing that field while preserving
|
|
459
|
+
the rest of the task metadata and Markdown body. Snapshot restore previews by
|
|
460
|
+
default; pass `--apply` only when the displayed plan is the mutation you intend
|
|
461
|
+
to commit.
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Configuration
|
|
3
|
+
description: How taskset.config.ts identifies and configures a Taskset repository.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Configuration
|
|
7
|
+
|
|
8
|
+
Taskset usage begins with `taskset.config.ts` at the repository root. Commands
|
|
9
|
+
started in nested packages or directories walk upward until they find this
|
|
10
|
+
file.
|
|
11
|
+
|
|
12
|
+
```typescript
|
|
13
|
+
import { defineConfig } from '@taskset/cli'
|
|
14
|
+
|
|
15
|
+
export default defineConfig({
|
|
16
|
+
project: {
|
|
17
|
+
name: 'taskset',
|
|
18
|
+
},
|
|
19
|
+
tasks: {
|
|
20
|
+
defaults: {
|
|
21
|
+
status: 'todo',
|
|
22
|
+
priority: 'medium',
|
|
23
|
+
labels: ['taskset'],
|
|
24
|
+
},
|
|
25
|
+
statuses: ['todo', 'doing', 'blocked', 'done', 'canceled'],
|
|
26
|
+
priorities: ['low', 'medium', 'high', 'urgent'],
|
|
27
|
+
},
|
|
28
|
+
})
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Contract
|
|
32
|
+
|
|
33
|
+
- `project.name` is optional repository metadata.
|
|
34
|
+
- `tasks.defaults.status`, `priority`, and `labels` are optional defaults used
|
|
35
|
+
by task creation.
|
|
36
|
+
- `tasks.statuses` selects and orders the repository's active status vocabulary
|
|
37
|
+
from Taskset's canonical values. Task creation, updates, lifecycle changes,
|
|
38
|
+
listing, generated views, and diagnostics reject or report task statuses
|
|
39
|
+
outside that list. The default status must be included.
|
|
40
|
+
- `tasks.priorities` selects and orders the repository's active priority
|
|
41
|
+
vocabulary from Taskset's canonical values. Task creation rejects a priority
|
|
42
|
+
outside that list, and the default priority must be included.
|
|
43
|
+
- `urgent` is the highest supported priority. Taskset does not maintain a
|
|
44
|
+
separate urgency field because two overlapping importance scales make task
|
|
45
|
+
ordering harder to understand and keep consistent.
|
|
46
|
+
- Unknown fields, invalid enum values, empty names, and duplicate default
|
|
47
|
+
labels or vocabulary values are rejected.
|
|
48
|
+
- The config file is executable trusted project code and may use erasable
|
|
49
|
+
TypeScript syntax supported by the repository's Node version.
|
|
50
|
+
|
|
51
|
+
The config identifies behavior; it is not task storage. Canonical task state
|
|
52
|
+
remains under `.taskset/tasks/`, regardless of configuration.
|
|
53
|
+
|
|
54
|
+
## Discovery
|
|
55
|
+
|
|
56
|
+
`taskset init` creates a minimal config when one does not exist and initializes
|
|
57
|
+
`.taskset/tasks/`. Other commands require a discoverable config and report an
|
|
58
|
+
error when run outside a Taskset repository.
|
|
59
|
+
|
|
60
|
+
Use `taskset config --json` to inspect the discovered root and resolved
|
|
61
|
+
defaults.
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Document Types
|
|
3
|
+
description: Canonical stories, flows, decisions, research, and runbooks.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Document Types
|
|
7
|
+
|
|
8
|
+
Taskset stores durable project context beside tasks without forcing every note
|
|
9
|
+
into a task lifecycle. Each type has strict common frontmatter and a body
|
|
10
|
+
template suited to its purpose. Documents use the same planning, people, path,
|
|
11
|
+
and relationship metadata fields as tasks, with document-specific statuses.
|
|
12
|
+
|
|
13
|
+
| Type | Directory | Template focus |
|
|
14
|
+
| --- | --- | --- |
|
|
15
|
+
| `story` | `.taskset/stories/` | user outcome and acceptance criteria |
|
|
16
|
+
| `flow` | `.taskset/flows/` | preconditions, journey, variants, checks |
|
|
17
|
+
| `decision` (`adr`, `dr`) | `.taskset/decisions/` | context, decision, alternatives, consequences |
|
|
18
|
+
| `research` | `.taskset/research/` | question, sources, findings, recommendation |
|
|
19
|
+
| `runbook` | `.taskset/runbooks/` | symptoms, checks, actions, rollback, escalation |
|
|
20
|
+
|
|
21
|
+
Create a document from its template:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
taskset document create story --title "Member signs in via SSO"
|
|
25
|
+
taskset document create flow --title "Recover a delayed deposit"
|
|
26
|
+
taskset document create adr --title "Use transactional outbox"
|
|
27
|
+
taskset document create research --title "Evaluate queue providers" --related <task-id>
|
|
28
|
+
taskset document create runbook --title "Recover consumer lag"
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
IDs and filenames use a per-type seven-digit sequence and title slug, for
|
|
32
|
+
example `.taskset/flows/0000001-member-signs-in-via-sso.md`. Disposable metadata
|
|
33
|
+
indexes for that kind live beside the files in `.taskset/flows/.generated/`.
|
|
34
|
+
|
|
35
|
+
## Query And Mutation
|
|
36
|
+
|
|
37
|
+
Documents support the same command surface as tasks:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
taskset document list research --search "queue" --owner platform --impact
|
|
41
|
+
taskset document show <document-id> --type research --include-derived --json
|
|
42
|
+
taskset document update <document-id> --status ready --label infra --file packages/core
|
|
43
|
+
taskset document status <document-id> accepted --type decision
|
|
44
|
+
taskset document delete <document-id> --remove-dependencies
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Statuses are `draft`, `ready`, `active`, `accepted`, `superseded`, and
|
|
48
|
+
`archived`. `--related` may point at tasks or documents. `--depends-on` and
|
|
49
|
+
`--parent` must resolve to other Taskset documents.
|
|
50
|
+
|
|
51
|
+
## Import Existing Markdown
|
|
52
|
+
|
|
53
|
+
Use `document import` when a repository already has material under paths such
|
|
54
|
+
as `docs/stories`, `docs/flows`, `docs/adr`, `docs/research`, or
|
|
55
|
+
`docs/runbooks`:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
taskset document import docs/flows/0001-sign-in.md
|
|
59
|
+
taskset document import docs/architecture/use-postgres.md --type decision
|
|
60
|
+
taskset document import docs/runbooks/consumer-lag.md --move
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
The type is inferred from recognized parent directory names when `--type` is
|
|
64
|
+
omitted. `adr`, `dr`, `decision`, and `decisions` all normalize to `decision`.
|
|
65
|
+
The first H1 supplies the title unless `--title` is passed. Existing
|
|
66
|
+
frontmatter is replaced with Taskset's canonical metadata while the Markdown
|
|
67
|
+
body is preserved. Import copies by default; `--move` removes the source only
|
|
68
|
+
after the canonical file has been written successfully.
|
|
69
|
+
|
|
70
|
+
Use `document list [type]`, `document show <id>`, and `--json` for inspection
|
|
71
|
+
and automation. Sequences are per type, so pass `--type` to `document show`
|
|
72
|
+
when the same ID exists in more than one kind.
|
|
73
|
+
|
|
74
|
+
## Batch Workflows
|
|
75
|
+
|
|
76
|
+
Use a JSON manifest when an agent or migration needs to create, import, update,
|
|
77
|
+
or export many documents. Operations run through a bounded TanStack Pacer queue;
|
|
78
|
+
progress such as `3/8 (38%)` is written to stderr, while `--json` keeps stdout
|
|
79
|
+
safe for automation.
|
|
80
|
+
|
|
81
|
+
```json
|
|
82
|
+
[
|
|
83
|
+
{ "action": "create", "input": { "type": "story", "title": "Member upgrades" } },
|
|
84
|
+
{ "action": "import", "sourcePath": "docs/flows/checkout.md", "options": { "type": "flow" } },
|
|
85
|
+
{ "action": "update", "id": "0000001-member-upgrades", "type": "story", "input": { "status": "ready" } },
|
|
86
|
+
{ "action": "export", "id": "0000001-member-upgrades", "type": "story", "targetPath": "exports/member-upgrades.md" }
|
|
87
|
+
]
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
taskset document batch taskset-documents.json --concurrency 4 --json
|
|
92
|
+
taskset sync --concurrency 8
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
`taskset sync` creates missing document-kind directories inside `.taskset`,
|
|
96
|
+
migrates legacy task filenames and references throughout repository text files,
|
|
97
|
+
refreshes data `.gitignore` rules for scoped `.generated/` directories, removes
|
|
98
|
+
legacy global `.taskset/generated/`, and rebuilds generated views. Build
|
|
99
|
+
outputs, dependencies, caches, snapshots, and Git internals are excluded from
|
|
100
|
+
reference rewriting.
|