@taskset/cli 5.1.0 → 6.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 +30 -0
- package/README.md +21 -22
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +212 -113
- package/docs/_meta.ts +5 -0
- package/docs/agent-closeout.md +69 -0
- package/docs/agents/_meta.ts +6 -0
- package/docs/agents/commands.md +94 -0
- package/docs/agents/index.md +113 -0
- package/docs/agents/llms.txt +35 -0
- package/docs/agents/query-recipes.md +76 -0
- package/docs/agents/workflows.md +60 -0
- package/docs/cli-reference.md +53 -34
- package/docs/configuration.md +53 -31
- package/docs/document-types.md +53 -24
- package/docs/getting-started.md +61 -49
- package/docs/index.md +37 -25
- package/docs/maintainers/architecture/decisions/0001-documentation-platform.md +21 -47
- package/docs/maintainers/development/contributing.md +2 -3
- package/docs/maintainers/development/documentation.md +32 -49
- package/docs/maintainers/index.md +1 -3
- package/docs/maintainers/product/vision.md +27 -33
- package/docs/memory-model.md +58 -0
- package/docs/security-compliance-tracking.md +107 -0
- package/docs/task-files.md +19 -13
- package/docs/taxonomy-cookbook.md +59 -0
- package/package.json +4 -4
- package/skills/taskset/SKILL.md +89 -57
- package/skills/taskset/references/document-modeling-examples.md +53 -2
- package/skills/taskset-implement/SKILL.md +26 -17
- package/skills/taskset-implement/references/architecture/documentation-and-generated.md +3 -1
- package/skills/taskset-implement/references/architecture/ownership-and-dependencies.md +2 -1
- package/skills/taskset-implement/references/architecture/product-and-source.md +22 -11
- package/skills/taskset-implement/references/architecture/storage-and-snapshots.md +5 -2
- package/skills/taskset-implement/references/conventions/naming-and-packages.md +1 -1
- package/skills/taskset-implement/references/conventions/task-files.md +9 -4
- package/skills/taskset-implement/references/workflows/environment-and-pnpm.md +4 -3
- package/src/cli.ts +174 -112
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
# @taskset/cli
|
|
2
2
|
|
|
3
|
+
## 6.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Add operational memory document kinds (`lesson`, `concern`, `audit`), program rollup, optional closeout gates, and taxonomy allowlists.
|
|
8
|
+
|
|
9
|
+
Agents can create and query lessons, concerns, and audits under `.taskset/` with the same document command surface as existing kinds. `taskset task program` summarizes parent-task programs. Optional `closeout`, `taxonomy`, and `doctor` config keep defaults compatible with existing repositories. `taskset sync` creates the new directories.
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
- @taskset/contracts@6.1.0
|
|
15
|
+
- @taskset/core@6.1.0
|
|
16
|
+
|
|
17
|
+
## 6.0.0
|
|
18
|
+
|
|
19
|
+
### Major Changes
|
|
20
|
+
|
|
21
|
+
- Make Taskset agent-first and polyglot-friendly: discover repositories by `.taskset/`, treat `taskset.config.ts` as optional, support package-runner and global installs, and split docs for humans and agents.
|
|
22
|
+
- 89c31c3: Replace sequential and ULID entity IDs with immutable 5-6 character lowercase hex IDs.
|
|
23
|
+
|
|
24
|
+
Filenames are now `{sequence}-{slug}-{id}.md`. `taskset sync` and `task migrate-ids` migrate legacy IDs, normalize filenames, repair duplicate sequence prefixes by `createdAt`, and rewrite repository references. Default task and document list sorting uses `createdAt` so creation order remains stable. Agents and commands must cite the short `id`, not the mutable sequence prefix.
|
|
25
|
+
|
|
26
|
+
### Patch Changes
|
|
27
|
+
|
|
28
|
+
- Updated dependencies
|
|
29
|
+
- Updated dependencies [89c31c3]
|
|
30
|
+
- @taskset/core@6.0.0
|
|
31
|
+
- @taskset/contracts@6.0.0
|
|
32
|
+
|
|
3
33
|
## 5.1.0
|
|
4
34
|
|
|
5
35
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -1,42 +1,41 @@
|
|
|
1
1
|
# @taskset/cli
|
|
2
2
|
|
|
3
|
-
The public command-line adapter for Taskset. Full documentation is
|
|
4
|
-
[taskset.false.foundation](https://taskset.false.foundation/), including the
|
|
5
|
-
[complete CLI reference](./docs/cli-reference.md).
|
|
3
|
+
The public command-line adapter for Taskset, the Git-native workspace for plans, research, decisions, runbooks, lessons, concerns, audits, and executable tasks. Full documentation is on [taskset.false.foundation](https://taskset.false.foundation/), including the [CLI reference](./docs/cli-reference.md), [document types](./docs/document-types.md), [memory model](./docs/memory-model.md), and [agent guide](./docs/agents/index.md).
|
|
6
4
|
|
|
7
|
-
The published package
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
The published package ships the repository `docs/` and `skills/` trees beside the CLI so agents can load offline references from `node_modules/@taskset/cli/docs` and `node_modules/@taskset/cli/skills`.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
10
8
|
|
|
11
9
|
```bash
|
|
10
|
+
npx @taskset/cli@latest init
|
|
11
|
+
pnpm dlx @taskset/cli init
|
|
12
12
|
pnpm add --save-dev @taskset/cli
|
|
13
|
-
|
|
14
|
-
pnpm taskset task create --title "Document the release"
|
|
13
|
+
npm install --global @taskset/cli
|
|
15
14
|
```
|
|
16
15
|
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
```bash
|
|
17
|
+
taskset document create research --title "Evaluate release options"
|
|
18
|
+
taskset task create --title "Ship the release notes" --related your_research_id_here
|
|
19
|
+
taskset document list --json
|
|
20
|
+
taskset task list --json
|
|
21
|
+
```
|
|
19
22
|
|
|
20
|
-
|
|
23
|
+
The package owns argument tokenization, Zod-backed command validation, output, and exit-code mapping. Repository behavior is delegated to `@taskset/core`.
|
|
24
|
+
|
|
25
|
+
## Commands
|
|
21
26
|
|
|
22
27
|
- `taskset init`, `config`, `doctor`, `generate`, and `sync`
|
|
23
28
|
- `taskset task create|list|show|update|status|delete|migrate-ids`
|
|
24
29
|
- `taskset document create|import|batch|list|show|update|status|delete` (`doc` is an alias)
|
|
25
30
|
- `taskset snapshot create|list|restore`
|
|
26
31
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
inclusive. Filters include
|
|
31
|
-
`--estimate-min`/`--estimate-max`, `--effort-min`/`--effort-max`,
|
|
32
|
-
`--duplicate`, `--sort order`, and due/created/updated before/after bounds.
|
|
33
|
-
`tasks-for-file` was removed.
|
|
32
|
+
`init` creates `.taskset/` for tasks, stories, flows, decisions, research, runbooks, lessons, concerns, and audits without requiring a config file. Pass `--config` for optional `taskset.config.ts`.
|
|
33
|
+
|
|
34
|
+
Exit code `0` means success, `1` means a repository or domain failure, and `2` means invalid CLI usage. Commands reserve stdout for requested output and send diagnostics to stderr.
|
|
34
35
|
|
|
35
|
-
|
|
36
|
-
means invalid CLI usage. Commands reserve stdout for requested output and send
|
|
37
|
-
diagnostics or generation warnings to stderr.
|
|
36
|
+
## Optional config helper
|
|
38
37
|
|
|
39
|
-
`defineConfig` is re-exported for `taskset.config.ts`:
|
|
38
|
+
`defineConfig` is re-exported for optional `taskset.config.ts`:
|
|
40
39
|
|
|
41
40
|
```typescript
|
|
42
41
|
import { defineConfig } from '@taskset/cli'
|
package/dist/cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AA6GA,MAAM,WAAW,UAAU;IAC1B,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACzC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;CACzC;AAgvBD,wBAAsB,MAAM,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,OAAO,GAAE,UAAe,GAAG,OAAO,CAAC,MAAM,CAAC,CAy7B/F"}
|
package/dist/cli.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { readFile } from 'node:fs/promises';
|
|
2
2
|
import path from 'node:path';
|
|
3
3
|
import { parseArgs } from 'node:util';
|
|
4
|
-
import { DocumentIdSchema, DocumentStatusSchema, DocumentTimestampSchema, TaskIdSchema, TaskPrioritySchema, TaskRiskSchema, TaskStatusSchema, TaskTimestampSchema, } from '@taskset/contracts';
|
|
5
|
-
import { buildDocumentGraph, buildTaskIndex, createDocument, createSnapshot, createTask, DOCUMENT_SORT_DIRECTIONS, DOCUMENT_SORT_KEYS, DocumentQuerySchema, deleteDocument, deleteTask, diagnoseRepository, discoverRepository, executeDocumentBatch, generateViews, importDocument, initializeRepository, listDocuments, listSnapshots, migrateTaskIds, normalizeDocumentKind, normalizeRepositoryPath, queryDocuments, queryTasks, RepositoryPathError, readDocument, readTask, restoreSnapshot, serializeDocumentFile, serializeTaskFile, syncRepository, TASK_SORT_DIRECTIONS, TASK_SORT_KEYS, TaskQuerySchema, updateDocument, updateTask, } from '@taskset/core';
|
|
4
|
+
import { ConcernClassSchema, DocumentIdSchema, DocumentStatusSchema, DocumentTimestampSchema, LessonSeveritySchema, TaskIdSchema, TaskPrioritySchema, TaskRiskSchema, TaskStatusSchema, TaskTimestampSchema, } from '@taskset/contracts';
|
|
5
|
+
import { buildDocumentGraph, buildTaskIndex, createDocument, createSnapshot, createTask, DOCUMENT_SORT_DIRECTIONS, DOCUMENT_SORT_KEYS, DocumentQuerySchema, deleteDocument, deleteTask, diagnoseRepository, discoverRepository, executeDocumentBatch, generateViews, getProgramRollup, importDocument, initializeRepository, listDocuments, listSnapshots, migrateTaskIds, normalizeDocumentKind, normalizeRepositoryPath, queryDocuments, queryTasks, RepositoryPathError, readDocument, readTask, restoreSnapshot, serializeDocumentFile, serializeTaskFile, syncRepository, TASK_SORT_DIRECTIONS, TASK_SORT_KEYS, TaskQuerySchema, updateDocument, updateTask, } from '@taskset/core';
|
|
6
6
|
import * as z from 'zod';
|
|
7
7
|
const USAGE = `Usage:
|
|
8
|
-
taskset init [--cwd <path>]
|
|
8
|
+
taskset init [--config] [--cwd <path>]
|
|
9
9
|
taskset config [--json] [--cwd <path>]
|
|
10
10
|
taskset doctor [--json] [--cwd <path>]
|
|
11
11
|
taskset generate [--json] [--cwd <path>]
|
|
@@ -18,8 +18,9 @@ const USAGE = `Usage:
|
|
|
18
18
|
taskset task status <task-id> <status> [--json] [--cwd <path>]
|
|
19
19
|
taskset task delete <task-id> [--remove-dependencies] [--json] [--cwd <path>]
|
|
20
20
|
taskset task migrate-ids [--json] [--cwd <path>]
|
|
21
|
+
taskset task program <parent-id> [--json] [--cwd <path>]
|
|
21
22
|
taskset sync [--concurrency <count>] [--json] [--cwd <path>]
|
|
22
|
-
taskset document create <story|flow|decision|adr|dr|research|runbook> --title <title> [metadata options]
|
|
23
|
+
taskset document create <story|flow|decision|adr|dr|research|runbook|lesson|antipattern|concern|audit> --title <title> [metadata options]
|
|
23
24
|
taskset document import <markdown-path> [--type <type>] [--move]
|
|
24
25
|
taskset document batch <manifest.json> [--concurrency <count>] [--json]
|
|
25
26
|
taskset document list [type] [query options]
|
|
@@ -32,10 +33,12 @@ Metadata options:
|
|
|
32
33
|
--status --priority --order --owner --team --estimate --effort --risk --due-date
|
|
33
34
|
--label --assignee --reviewer --depends-on --related --duplicate
|
|
34
35
|
--parent --file --directory --project --body
|
|
36
|
+
Lesson/concern options: --severity --related-skill --pack --class --cadence
|
|
35
37
|
Repeat array options. Task and document updates clear arrays with --clear-dependencies,
|
|
36
38
|
--clear-labels, --clear-assignees, --clear-reviewers, --clear-related,
|
|
37
|
-
--clear-files, --clear-directories,
|
|
38
|
-
relationships with --clear-parent
|
|
39
|
+
--clear-files, --clear-directories, --clear-projects, --clear-related-skills,
|
|
40
|
+
or --clear-packs. Clear scalar relationships with --clear-parent, --clear-owner,
|
|
41
|
+
--clear-severity, --clear-class, or --clear-cadence.
|
|
39
42
|
|
|
40
43
|
List query options:
|
|
41
44
|
--status --priority --label --owner --assignee --reviewer --team --risk
|
|
@@ -67,6 +70,10 @@ const CommonValuesSchema = z.strictObject({
|
|
|
67
70
|
cwd: CwdSchema,
|
|
68
71
|
json: JsonSchema,
|
|
69
72
|
});
|
|
73
|
+
const InitValuesSchema = z.strictObject({
|
|
74
|
+
cwd: CwdSchema,
|
|
75
|
+
config: z.boolean().optional(),
|
|
76
|
+
});
|
|
70
77
|
const ConcurrencySchema = z.coerce.number().int().min(1).max(32).optional();
|
|
71
78
|
const DocumentKindInputSchema = TrimmedStringSchema.transform((value, context) => {
|
|
72
79
|
try {
|
|
@@ -102,6 +109,11 @@ const DocumentInputSchema = z.strictObject({
|
|
|
102
109
|
parent: TaskIdSchema.optional(),
|
|
103
110
|
directories: StringListSchema.optional(),
|
|
104
111
|
projects: StringListSchema.optional(),
|
|
112
|
+
severity: LessonSeveritySchema.optional(),
|
|
113
|
+
relatedSkills: StringListSchema.optional(),
|
|
114
|
+
packs: StringListSchema.optional(),
|
|
115
|
+
class: ConcernClassSchema.optional(),
|
|
116
|
+
cadence: TrimmedStringSchema.optional(),
|
|
105
117
|
body: z.string().optional(),
|
|
106
118
|
});
|
|
107
119
|
const DocumentUpdateSchema = z
|
|
@@ -126,6 +138,11 @@ const DocumentUpdateSchema = z
|
|
|
126
138
|
parent: TaskIdSchema.nullable().optional(),
|
|
127
139
|
directories: StringListSchema.optional(),
|
|
128
140
|
projects: StringListSchema.optional(),
|
|
141
|
+
severity: LessonSeveritySchema.nullable().optional(),
|
|
142
|
+
relatedSkills: StringListSchema.optional(),
|
|
143
|
+
packs: StringListSchema.optional(),
|
|
144
|
+
class: ConcernClassSchema.nullable().optional(),
|
|
145
|
+
cadence: TrimmedStringSchema.nullable().optional(),
|
|
129
146
|
body: z.string().optional(),
|
|
130
147
|
})
|
|
131
148
|
.refine((input) => Object.keys(input).length > 0, 'Document update requires at least one field');
|
|
@@ -178,6 +195,14 @@ const UPDATE_CLEAR_PAIRS = [
|
|
|
178
195
|
['directory', 'clear-directories'],
|
|
179
196
|
['project', 'clear-projects'],
|
|
180
197
|
];
|
|
198
|
+
const DOCUMENT_UPDATE_CLEAR_PAIRS = [
|
|
199
|
+
...UPDATE_CLEAR_PAIRS,
|
|
200
|
+
['severity', 'clear-severity'],
|
|
201
|
+
['related-skill', 'clear-related-skills'],
|
|
202
|
+
['pack', 'clear-packs'],
|
|
203
|
+
['class', 'clear-class'],
|
|
204
|
+
['cadence', 'clear-cadence'],
|
|
205
|
+
];
|
|
181
206
|
const DocumentCreateValuesSchema = z.strictObject({
|
|
182
207
|
title: TrimmedStringSchema,
|
|
183
208
|
status: DocumentStatusSchema.optional(),
|
|
@@ -199,6 +224,11 @@ const DocumentCreateValuesSchema = z.strictObject({
|
|
|
199
224
|
parent: TaskIdSchema.optional(),
|
|
200
225
|
directory: StringListSchema.optional(),
|
|
201
226
|
project: StringListSchema.optional(),
|
|
227
|
+
severity: LessonSeveritySchema.optional(),
|
|
228
|
+
'related-skill': StringListSchema.optional(),
|
|
229
|
+
pack: StringListSchema.optional(),
|
|
230
|
+
class: ConcernClassSchema.optional(),
|
|
231
|
+
cadence: TrimmedStringSchema.optional(),
|
|
202
232
|
body: z.string().optional(),
|
|
203
233
|
cwd: CwdSchema,
|
|
204
234
|
json: JsonSchema,
|
|
@@ -225,6 +255,11 @@ const DocumentUpdateValuesSchema = z
|
|
|
225
255
|
parent: TaskIdSchema.optional(),
|
|
226
256
|
directory: StringListSchema.optional(),
|
|
227
257
|
project: StringListSchema.optional(),
|
|
258
|
+
severity: LessonSeveritySchema.optional(),
|
|
259
|
+
'related-skill': StringListSchema.optional(),
|
|
260
|
+
pack: StringListSchema.optional(),
|
|
261
|
+
class: ConcernClassSchema.optional(),
|
|
262
|
+
cadence: TrimmedStringSchema.optional(),
|
|
228
263
|
body: z.string().optional(),
|
|
229
264
|
type: TrimmedStringSchema.optional(),
|
|
230
265
|
'clear-priority': z.boolean().optional(),
|
|
@@ -245,11 +280,16 @@ const DocumentUpdateValuesSchema = z
|
|
|
245
280
|
'clear-parent': z.boolean().optional(),
|
|
246
281
|
'clear-directories': z.boolean().optional(),
|
|
247
282
|
'clear-projects': z.boolean().optional(),
|
|
283
|
+
'clear-severity': z.boolean().optional(),
|
|
284
|
+
'clear-related-skills': z.boolean().optional(),
|
|
285
|
+
'clear-packs': z.boolean().optional(),
|
|
286
|
+
'clear-class': z.boolean().optional(),
|
|
287
|
+
'clear-cadence': z.boolean().optional(),
|
|
248
288
|
cwd: CwdSchema,
|
|
249
289
|
json: JsonSchema,
|
|
250
290
|
})
|
|
251
291
|
.superRefine((values, context) => {
|
|
252
|
-
for (const [valueKey, clearKey] of
|
|
292
|
+
for (const [valueKey, clearKey] of DOCUMENT_UPDATE_CLEAR_PAIRS) {
|
|
253
293
|
if (values[valueKey] !== undefined && values[clearKey]) {
|
|
254
294
|
context.addIssue({
|
|
255
295
|
code: 'custom',
|
|
@@ -276,6 +316,8 @@ const DocumentListValuesSchema = z.strictObject({
|
|
|
276
316
|
team: StringListSchema.optional(),
|
|
277
317
|
risk: z.array(TaskRiskSchema).optional(),
|
|
278
318
|
project: StringListSchema.optional(),
|
|
319
|
+
class: z.array(ConcernClassSchema).optional(),
|
|
320
|
+
severity: z.array(LessonSeveritySchema).optional(),
|
|
279
321
|
'depends-on': TaskIdSchema.optional(),
|
|
280
322
|
related: TaskIdSchema.optional(),
|
|
281
323
|
duplicate: TaskIdSchema.optional(),
|
|
@@ -444,6 +486,14 @@ const metadataOptionDefinitions = {
|
|
|
444
486
|
directory: { type: 'string', multiple: true },
|
|
445
487
|
project: { type: 'string', multiple: true },
|
|
446
488
|
};
|
|
489
|
+
const documentMetadataOptionDefinitions = {
|
|
490
|
+
...metadataOptionDefinitions,
|
|
491
|
+
severity: { type: 'string' },
|
|
492
|
+
'related-skill': { type: 'string', multiple: true },
|
|
493
|
+
pack: { type: 'string', multiple: true },
|
|
494
|
+
class: { type: 'string' },
|
|
495
|
+
cadence: { type: 'string' },
|
|
496
|
+
};
|
|
447
497
|
const commonOptionDefinitions = {
|
|
448
498
|
cwd: { type: 'string' },
|
|
449
499
|
json: { type: 'boolean' },
|
|
@@ -614,101 +664,107 @@ function updateInputFromValues(repository, values) {
|
|
|
614
664
|
};
|
|
615
665
|
}
|
|
616
666
|
function documentUpdateInputFromValues(repository, values) {
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
667
|
+
const input = {};
|
|
668
|
+
if (values.title !== undefined)
|
|
669
|
+
input.title = values.title;
|
|
670
|
+
if (values.status !== undefined)
|
|
671
|
+
input.status = values.status;
|
|
672
|
+
if (values['clear-priority'])
|
|
673
|
+
input.priority = null;
|
|
674
|
+
else if (values.priority !== undefined)
|
|
675
|
+
input.priority = values.priority;
|
|
676
|
+
if (values['clear-order'])
|
|
677
|
+
input.order = null;
|
|
678
|
+
else if (values.order !== undefined)
|
|
679
|
+
input.order = values.order;
|
|
680
|
+
if (values['clear-labels'])
|
|
681
|
+
input.labels = [];
|
|
682
|
+
else if (values.label !== undefined)
|
|
683
|
+
input.labels = values.label;
|
|
684
|
+
if (values['clear-dependencies'])
|
|
685
|
+
input.dependsOn = [];
|
|
686
|
+
else if (values['depends-on'] !== undefined)
|
|
687
|
+
input.dependsOn = values['depends-on'];
|
|
688
|
+
if (values['clear-files'])
|
|
689
|
+
input.files = [];
|
|
690
|
+
else if (values.file !== undefined)
|
|
691
|
+
input.files = normalizeMutationPaths(repository, values.file);
|
|
692
|
+
if (values['clear-owner'])
|
|
693
|
+
input.owner = null;
|
|
694
|
+
else if (values.owner !== undefined)
|
|
695
|
+
input.owner = values.owner;
|
|
696
|
+
if (values['clear-assignees'])
|
|
697
|
+
input.assignees = [];
|
|
698
|
+
else if (values.assignee !== undefined)
|
|
699
|
+
input.assignees = values.assignee;
|
|
700
|
+
if (values['clear-reviewers'])
|
|
701
|
+
input.reviewers = [];
|
|
702
|
+
else if (values.reviewer !== undefined)
|
|
703
|
+
input.reviewers = values.reviewer;
|
|
704
|
+
if (values['clear-team'])
|
|
705
|
+
input.team = null;
|
|
706
|
+
else if (values.team !== undefined)
|
|
707
|
+
input.team = values.team;
|
|
708
|
+
if (values['clear-estimate'])
|
|
709
|
+
input.estimate = null;
|
|
710
|
+
else if (values.estimate !== undefined)
|
|
711
|
+
input.estimate = values.estimate;
|
|
712
|
+
if (values['clear-effort'])
|
|
713
|
+
input.effort = null;
|
|
714
|
+
else if (values.effort !== undefined)
|
|
715
|
+
input.effort = values.effort;
|
|
716
|
+
if (values['clear-risk'])
|
|
717
|
+
input.risk = null;
|
|
718
|
+
else if (values.risk !== undefined)
|
|
719
|
+
input.risk = values.risk;
|
|
720
|
+
if (values['clear-due-date'])
|
|
721
|
+
input.dueDate = null;
|
|
722
|
+
else if (values['due-date'] !== undefined)
|
|
723
|
+
input.dueDate = values['due-date'];
|
|
724
|
+
if (values['clear-related'])
|
|
725
|
+
input.related = [];
|
|
726
|
+
else if (values.related !== undefined)
|
|
727
|
+
input.related = values.related;
|
|
728
|
+
if (values['clear-duplicates'])
|
|
729
|
+
input.duplicates = [];
|
|
730
|
+
else if (values.duplicate !== undefined)
|
|
731
|
+
input.duplicates = values.duplicate;
|
|
732
|
+
if (values['clear-parent'])
|
|
733
|
+
input.parent = null;
|
|
734
|
+
else if (values.parent !== undefined)
|
|
735
|
+
input.parent = values.parent;
|
|
736
|
+
if (values['clear-directories'])
|
|
737
|
+
input.directories = [];
|
|
738
|
+
else if (values.directory !== undefined) {
|
|
739
|
+
input.directories = normalizeMutationPaths(repository, values.directory);
|
|
740
|
+
}
|
|
741
|
+
if (values['clear-projects'])
|
|
742
|
+
input.projects = [];
|
|
743
|
+
else if (values.project !== undefined)
|
|
744
|
+
input.projects = values.project;
|
|
745
|
+
if (values['clear-severity'])
|
|
746
|
+
input.severity = null;
|
|
747
|
+
else if (values.severity !== undefined)
|
|
748
|
+
input.severity = values.severity;
|
|
749
|
+
if (values['clear-related-skills'])
|
|
750
|
+
input.relatedSkills = [];
|
|
751
|
+
else if (values['related-skill'] !== undefined)
|
|
752
|
+
input.relatedSkills = values['related-skill'];
|
|
753
|
+
if (values['clear-packs'])
|
|
754
|
+
input.packs = [];
|
|
755
|
+
else if (values.pack !== undefined)
|
|
756
|
+
input.packs = values.pack;
|
|
757
|
+
if (values['clear-class'])
|
|
758
|
+
input.class = null;
|
|
759
|
+
else if (values.class !== undefined)
|
|
760
|
+
input.class = values.class;
|
|
761
|
+
if (values['clear-cadence'])
|
|
762
|
+
input.cadence = null;
|
|
763
|
+
else if (values.cadence !== undefined)
|
|
764
|
+
input.cadence = values.cadence;
|
|
765
|
+
if (values.body !== undefined)
|
|
766
|
+
input.body = values.body;
|
|
767
|
+
return input;
|
|
712
768
|
}
|
|
713
769
|
export async function runCli(args, context = {}) {
|
|
714
770
|
const cwd = path.resolve(context.cwd ?? process.cwd());
|
|
@@ -724,6 +780,23 @@ export async function runCli(args, context = {}) {
|
|
|
724
780
|
return 0;
|
|
725
781
|
}
|
|
726
782
|
if (command === 'init' || command === 'config' || command === 'doctor') {
|
|
783
|
+
if (command === 'init') {
|
|
784
|
+
const parsed = parseArgs({
|
|
785
|
+
args: commandArgs,
|
|
786
|
+
allowPositionals: false,
|
|
787
|
+
options: {
|
|
788
|
+
cwd: { type: 'string' },
|
|
789
|
+
config: { type: 'boolean' },
|
|
790
|
+
},
|
|
791
|
+
});
|
|
792
|
+
const values = parseSchema(InitValuesSchema, parsed.values, 'init options');
|
|
793
|
+
const commandCwd = resolveCommandCwd(cwd, values.cwd);
|
|
794
|
+
const repository = await initializeRepository(commandCwd, {
|
|
795
|
+
writeConfig: values.config === true,
|
|
796
|
+
});
|
|
797
|
+
stdout(`Initialized Taskset in ${repository.rootDirectory}\n`);
|
|
798
|
+
return 0;
|
|
799
|
+
}
|
|
727
800
|
const parsed = parseArgs({
|
|
728
801
|
args: commandArgs,
|
|
729
802
|
allowPositionals: false,
|
|
@@ -731,24 +804,23 @@ export async function runCli(args, context = {}) {
|
|
|
731
804
|
});
|
|
732
805
|
const values = parseSchema(CommonValuesSchema, parsed.values, `${command} options`);
|
|
733
806
|
const commandCwd = resolveCommandCwd(cwd, values.cwd);
|
|
734
|
-
if (command === 'init') {
|
|
735
|
-
const repository = await initializeRepository(commandCwd);
|
|
736
|
-
stdout(`Initialized Taskset in ${repository.rootDirectory}\n`);
|
|
737
|
-
return 0;
|
|
738
|
-
}
|
|
739
807
|
const repository = await discoverRepository(commandCwd);
|
|
740
808
|
if (command === 'config') {
|
|
741
809
|
if (values.json) {
|
|
742
810
|
stdout(`${JSON.stringify({
|
|
743
811
|
rootDirectory: repository.rootDirectory,
|
|
744
812
|
configPath: repository.configPath,
|
|
813
|
+
hasConfig: repository.hasConfig,
|
|
745
814
|
dataDirectory: repository.dataDirectory,
|
|
746
815
|
config: repository.config,
|
|
747
816
|
}, null, 2)}\n`);
|
|
748
817
|
}
|
|
749
|
-
else {
|
|
818
|
+
else if (repository.hasConfig) {
|
|
750
819
|
stdout(`${repository.configPath}\n`);
|
|
751
820
|
}
|
|
821
|
+
else {
|
|
822
|
+
stdout(`defaults (${repository.rootDirectory})\n`);
|
|
823
|
+
}
|
|
752
824
|
return 0;
|
|
753
825
|
}
|
|
754
826
|
const result = await diagnoseRepository(repository);
|
|
@@ -756,7 +828,7 @@ export async function runCli(args, context = {}) {
|
|
|
756
828
|
stdout(`${JSON.stringify(result, null, 2)}\n`);
|
|
757
829
|
}
|
|
758
830
|
else if (result.valid) {
|
|
759
|
-
stdout(`Taskset repository is valid (${result.taskCount} tasks)\n`);
|
|
831
|
+
stdout(`Taskset repository is valid (${result.taskCount} tasks, ${result.documentCount} documents)\n`);
|
|
760
832
|
}
|
|
761
833
|
else {
|
|
762
834
|
for (const diagnostic of result.diagnostics) {
|
|
@@ -793,7 +865,7 @@ export async function runCli(args, context = {}) {
|
|
|
793
865
|
});
|
|
794
866
|
stdout(values.json
|
|
795
867
|
? `${JSON.stringify(result, null, 2)}\n`
|
|
796
|
-
: `Synced ${result.migrations.length} migrations and generated views\n`);
|
|
868
|
+
: `Synced ${result.migrations.length + result.documentMigrations.length} migrations and generated views\n`);
|
|
797
869
|
return 0;
|
|
798
870
|
}
|
|
799
871
|
if (command === 'snapshot') {
|
|
@@ -876,7 +948,7 @@ export async function runCli(args, context = {}) {
|
|
|
876
948
|
const parsed = parseArgs({
|
|
877
949
|
args: subcommandArgs,
|
|
878
950
|
allowPositionals: true,
|
|
879
|
-
options: { ...
|
|
951
|
+
options: { ...documentMetadataOptionDefinitions, ...commonOptionDefinitions },
|
|
880
952
|
});
|
|
881
953
|
const [rawType] = requirePositionals(parsed.positionals, 1, 'exactly one document type');
|
|
882
954
|
const values = parseSchema(DocumentCreateValuesSchema, parsed.values, 'document create options');
|
|
@@ -905,6 +977,11 @@ export async function runCli(args, context = {}) {
|
|
|
905
977
|
? { directories: normalizeMutationPaths(repository, values.directory) }
|
|
906
978
|
: {}),
|
|
907
979
|
...(values.project ? { projects: values.project } : {}),
|
|
980
|
+
...(values.severity ? { severity: values.severity } : {}),
|
|
981
|
+
...(values['related-skill'] ? { relatedSkills: values['related-skill'] } : {}),
|
|
982
|
+
...(values.pack ? { packs: values.pack } : {}),
|
|
983
|
+
...(values.class ? { class: values.class } : {}),
|
|
984
|
+
...(values.cadence ? { cadence: values.cadence } : {}),
|
|
908
985
|
...(values.body !== undefined ? { body: values.body } : {}),
|
|
909
986
|
}, { onWarning });
|
|
910
987
|
writeDocumentRecord(record, values.json, stdout);
|
|
@@ -954,6 +1031,8 @@ export async function runCli(args, context = {}) {
|
|
|
954
1031
|
team: { type: 'string', multiple: true },
|
|
955
1032
|
risk: { type: 'string', multiple: true },
|
|
956
1033
|
project: { type: 'string', multiple: true },
|
|
1034
|
+
class: { type: 'string', multiple: true },
|
|
1035
|
+
severity: { type: 'string', multiple: true },
|
|
957
1036
|
'depends-on': { type: 'string' },
|
|
958
1037
|
related: { type: 'string' },
|
|
959
1038
|
duplicate: { type: 'string' },
|
|
@@ -994,6 +1073,8 @@ export async function runCli(args, context = {}) {
|
|
|
994
1073
|
...(values.team ? { teams: values.team } : {}),
|
|
995
1074
|
...(values.risk ? { risks: values.risk } : {}),
|
|
996
1075
|
...(values.project ? { projects: values.project } : {}),
|
|
1076
|
+
...(values.class ? { classes: values.class } : {}),
|
|
1077
|
+
...(values.severity ? { severities: values.severity } : {}),
|
|
997
1078
|
...(values['depends-on'] ? { dependsOn: values['depends-on'] } : {}),
|
|
998
1079
|
...(values.related ? { related: values.related } : {}),
|
|
999
1080
|
...(values.duplicate ? { duplicate: values.duplicate } : {}),
|
|
@@ -1079,12 +1160,12 @@ export async function runCli(args, context = {}) {
|
|
|
1079
1160
|
return 0;
|
|
1080
1161
|
}
|
|
1081
1162
|
if (subcommand === 'update') {
|
|
1082
|
-
const clearDefinitions = Object.fromEntries(
|
|
1163
|
+
const clearDefinitions = Object.fromEntries(DOCUMENT_UPDATE_CLEAR_PAIRS.map(([, clear]) => [clear, { type: 'boolean' }]));
|
|
1083
1164
|
const parsed = parseArgs({
|
|
1084
1165
|
args: subcommandArgs,
|
|
1085
1166
|
allowPositionals: true,
|
|
1086
1167
|
options: {
|
|
1087
|
-
...
|
|
1168
|
+
...documentMetadataOptionDefinitions,
|
|
1088
1169
|
...clearDefinitions,
|
|
1089
1170
|
...commonOptionDefinitions,
|
|
1090
1171
|
type: { type: 'string' },
|
|
@@ -1167,6 +1248,24 @@ export async function runCli(args, context = {}) {
|
|
|
1167
1248
|
stdout(`${migration.from}\t${migration.to}\n`);
|
|
1168
1249
|
return 0;
|
|
1169
1250
|
}
|
|
1251
|
+
if (subcommand === 'program') {
|
|
1252
|
+
const parsed = parseArgs({
|
|
1253
|
+
args: subcommandArgs,
|
|
1254
|
+
allowPositionals: true,
|
|
1255
|
+
options: commonOptionDefinitions,
|
|
1256
|
+
});
|
|
1257
|
+
const [parentId] = requirePositionals(parsed.positionals, 1, 'exactly one parent task ID');
|
|
1258
|
+
const values = parseSchema(CommonValuesSchema, parsed.values, 'task program options');
|
|
1259
|
+
const repository = await discoverRepository(resolveCommandCwd(cwd, values.cwd));
|
|
1260
|
+
const rollup = await getProgramRollup(repository, parseSchema(TaskIdSchema, parentId, 'parent task ID'));
|
|
1261
|
+
if (values.json) {
|
|
1262
|
+
stdout(`${JSON.stringify(rollup, null, 2)}\n`);
|
|
1263
|
+
}
|
|
1264
|
+
else {
|
|
1265
|
+
stdout(`${rollup.parentId}\t${rollup.status}\tchildren=${rollup.children.total}\topen=${rollup.children.openIds.length}\tconcerns=${rollup.relatedOpenConcerns.length}\tcloseoutReady=${rollup.closeoutReady}\t${rollup.title}\n`);
|
|
1266
|
+
}
|
|
1267
|
+
return 0;
|
|
1268
|
+
}
|
|
1170
1269
|
if (subcommand === 'create') {
|
|
1171
1270
|
const parsed = parseArgs({
|
|
1172
1271
|
args: subcommandArgs,
|
package/docs/_meta.ts
CHANGED
|
@@ -5,4 +5,9 @@ export default {
|
|
|
5
5
|
'cli-reference': 'CLI Reference',
|
|
6
6
|
'task-files': 'Task Files',
|
|
7
7
|
'document-types': 'Document Types',
|
|
8
|
+
'memory-model': 'Memory Model',
|
|
9
|
+
'security-compliance-tracking': 'Security Tracking',
|
|
10
|
+
'agent-closeout': 'Agent Closeout',
|
|
11
|
+
'taxonomy-cookbook': 'Taxonomy Cookbook',
|
|
12
|
+
agents: 'For Agents',
|
|
8
13
|
}
|