@taskset/cli 5.1.0 → 6.0.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 +16 -0
- package/README.md +21 -22
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +28 -8
- package/docs/_meta.ts +1 -0
- package/docs/agents/_meta.ts +5 -0
- package/docs/agents/commands.md +70 -0
- package/docs/agents/index.md +99 -0
- package/docs/agents/llms.txt +28 -0
- package/docs/agents/workflows.md +50 -0
- package/docs/cli-reference.md +23 -23
- package/docs/configuration.md +33 -31
- package/docs/document-types.md +20 -17
- package/docs/getting-started.md +56 -49
- package/docs/index.md +31 -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 +25 -33
- package/docs/task-files.md +19 -13
- package/package.json +4 -4
- package/skills/taskset/SKILL.md +43 -30
- package/skills/taskset-implement/SKILL.md +17 -11
- 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 +11 -10
- package/skills/taskset-implement/references/architecture/storage-and-snapshots.md +2 -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 +29 -10
package/docs/task-files.md
CHANGED
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
---
|
|
2
|
-
title:
|
|
2
|
+
title: Understand Taskset task files
|
|
3
3
|
description: The canonical Markdown representation for Taskset work items.
|
|
4
|
+
contentType: Conceptual
|
|
5
|
+
navLabel: Task Files
|
|
4
6
|
---
|
|
5
7
|
|
|
6
|
-
#
|
|
8
|
+
# Understand Taskset task files
|
|
7
9
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
+
Tasks are the executable layer of Taskset. Use them to carry ownership, status, dependencies, and code impact for delivery work. Pair them with [stories, research, decisions, flows, and runbooks](document-types.md) when the surrounding memory should stay durable.
|
|
11
|
+
|
|
12
|
+
Task files live under `.taskset/tasks/`. YAML frontmatter owns structured metadata. The Markdown body owns durable human context for that piece of execution.
|
|
10
13
|
|
|
11
14
|
```markdown
|
|
12
15
|
---
|
|
13
|
-
id:
|
|
16
|
+
id: a1b2c3
|
|
14
17
|
title: Add task validation
|
|
15
18
|
status: doing
|
|
16
19
|
priority: high
|
|
@@ -48,9 +51,10 @@ Explain why the task exists.
|
|
|
48
51
|
## Canonical Data
|
|
49
52
|
|
|
50
53
|
Required fields are `id`, `title`, `status`, `createdAt`, and `updatedAt`.
|
|
51
|
-
Task IDs are immutable
|
|
52
|
-
|
|
53
|
-
|
|
54
|
+
Task IDs are immutable 5-6 character lowercase hex values, such as `a1b2c3`.
|
|
55
|
+
Filenames keep a separate display sequence and title slug:
|
|
56
|
+
`0000001-add-task-validation-a1b2c3.md`. Agents and commands reference the short
|
|
57
|
+
`id`, never the mutable sequence prefix.
|
|
54
58
|
|
|
55
59
|
Task files use one strict versionless metadata shape. Optional fields:
|
|
56
60
|
|
|
@@ -74,10 +78,12 @@ back to deterministic task ID ordering.
|
|
|
74
78
|
|
|
75
79
|
## Compatibility Cutover
|
|
76
80
|
|
|
77
|
-
Legacy `TS-` ULIDs remain readable so a
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
+
Legacy `TS-` ULIDs and sequential `0000001-title` IDs remain readable so a
|
|
82
|
+
repository can migrate safely. Run `taskset sync` or `taskset task migrate-ids`
|
|
83
|
+
to atomically assign short hex IDs, normalize filenames to
|
|
84
|
+
`{sequence}-{slug}-{id}.md`, repair duplicate sequence prefixes by `createdAt`,
|
|
85
|
+
and rewrite relationships plus repository text references. The command prints
|
|
86
|
+
the old-to-new mapping for any ID rewrites.
|
|
81
87
|
|
|
82
88
|
Task metadata is versionless. Versioned task frontmatter is invalid input and
|
|
83
89
|
fails with a schema diagnostic rather than being silently rewritten.
|
|
@@ -126,7 +132,7 @@ text, file, and directory filters. Numeric and timestamp ranges are inclusive:
|
|
|
126
132
|
taskset task list --file packages/core --impact --json
|
|
127
133
|
taskset task list --sort order
|
|
128
134
|
taskset task list --estimate-min 30 --estimate-max 120 --risk high
|
|
129
|
-
taskset task list --duplicate
|
|
135
|
+
taskset task list --duplicate a1b2c3
|
|
130
136
|
```
|
|
131
137
|
|
|
132
138
|
Repeated enum, person, project, file, and directory values use OR within the
|
package/package.json
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
"name": "@taskset/cli",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"private": false,
|
|
5
|
-
"version": "
|
|
6
|
-
"description": "
|
|
5
|
+
"version": "6.0.0",
|
|
6
|
+
"description": "CLI for Taskset: plan, research, decide, operate, and track repository work as Markdown.",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"author": {
|
|
9
9
|
"name": "junkieshuffle",
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"zod": "4.6.5",
|
|
49
|
-
"@taskset/contracts": "
|
|
50
|
-
"@taskset/core": "
|
|
49
|
+
"@taskset/contracts": "6.0.0",
|
|
50
|
+
"@taskset/core": "6.0.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@types/node": "^26.6.3",
|
package/skills/taskset/SKILL.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: taskset
|
|
3
|
-
description: Taskset workflow guidance for agents that plan and track
|
|
3
|
+
description: Taskset workflow guidance for agents that plan, research, decide, operate, and track delivery with stories, flows, research, decisions, runbooks, and tasks stored in .taskset/, including batch imports and cross-package monorepo work. While executing work, agents must create follow-up tasks or subtasks (Taskset child tasks or body checklist items) for newly discovered work, keep parent and subtask progress current mid-work, mark every finished subtask done or checked, create Taskset documents (research, decision, runbook, story, or flow) when work produces reusable evidence, lasting choices, or procedures, link them with --related, and update the session or repository primary skill when lasting lessons should prevent future failures.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Taskset
|
|
7
7
|
|
|
8
|
-
Use this skill when working in a repository that uses Taskset to store
|
|
8
|
+
Use this skill when working in a repository that uses Taskset to store plans, research, decisions, runbooks, and executable tasks as human-readable Markdown beside the code. Tasks move delivery. Documents preserve the memory that makes delivery coherent.
|
|
9
9
|
|
|
10
10
|
## Packaged Docs And Skills
|
|
11
11
|
|
|
@@ -18,7 +18,8 @@ treat those paths as the detailed offline reference set:
|
|
|
18
18
|
| `node_modules/@taskset/cli/skills/taskset/SKILL.md` | This skill (agent workflow for tasks and documents) |
|
|
19
19
|
| `node_modules/@taskset/cli/skills/taskset/references/` | Task modeling, document modeling, monorepo, and Changesets examples |
|
|
20
20
|
| `node_modules/@taskset/cli/skills/taskset-implement/` | Engineering standards used while developing Taskset itself |
|
|
21
|
-
| `node_modules/@taskset/cli/docs/` |
|
|
21
|
+
| `node_modules/@taskset/cli/docs/` | Human docs: getting started, configuration, CLI reference, task files, document types |
|
|
22
|
+
| `node_modules/@taskset/cli/docs/agents/` | Agent docs: workflows, command contracts, discovery index |
|
|
22
23
|
| `node_modules/@taskset/cli/docs/maintainers/` | Architecture, ADRs, testing, and maintainer workflows |
|
|
23
24
|
|
|
24
25
|
In the Taskset repository itself, prefer the workspace copies at `skills/` and
|
|
@@ -43,10 +44,15 @@ package root.
|
|
|
43
44
|
|
|
44
45
|
- Treat `.taskset/tasks/` as the canonical task source of truth and the sibling
|
|
45
46
|
document-kind directories as the canonical durable project-document source.
|
|
46
|
-
- Treat
|
|
47
|
+
- Treat the nearest `.taskset/` directory as the repository marker. Optional
|
|
48
|
+
`taskset.config.ts` at that root overlays defaults; built-in defaults apply
|
|
49
|
+
when it is absent.
|
|
47
50
|
- Do not create a second task store, hidden database, or alternate sync layer.
|
|
48
51
|
- Use Taskset commands to inspect and mutate tasks instead of editing canonical task files by hand when a command exists.
|
|
49
|
-
-
|
|
52
|
+
- Invoke Taskset with whatever runner the environment provides:
|
|
53
|
+
`npx @taskset/cli`, `pnpm dlx @taskset/cli`, `yarn dlx @taskset/cli`,
|
|
54
|
+
`bunx @taskset/cli`, `pnpm exec taskset`, or a global `taskset` binary. Do not
|
|
55
|
+
require `pnpm taskset`.
|
|
50
56
|
- While executing or working a task, agents MUST create follow-up Taskset tasks or subtasks for newly discovered work. In this skill, "subtask" means either a Taskset child task (`--parent`) or a Markdown checklist item (`- [ ]`) in the parent task body—choose child tasks when independent status, ownership, dependencies, or history are needed; otherwise prefer checklist items. Do not leave that work only in chat, memory, or an informal note.
|
|
51
57
|
- Agents MUST keep the parent task status and every subtask current mid-work: set Taskset tasks and child tasks to `doing` when work starts, check off completed checklist items as `- [x]`, update statuses when progress or blockers change, and mark each finished child task `done` when its acceptance criteria are met. Do not leave finished checklist items unchecked or finished child tasks open, and do not mark a parent task `done` while any tracked subtask (child task or checklist item) remains unfinished.
|
|
52
58
|
- While executing a task, agents MUST create a Taskset document in the same change when work produces reusable evidence (`research`), a lasting choice (`decision` / `adr`), an operational procedure (`runbook`), or durable product context (`story` / `flow`). Link the document and originating task with `--related`. Do not leave that material only in chat, memory, or a closed task body. Short scratch notes and one-off checklist steps stay in the task body.
|
|
@@ -54,8 +60,8 @@ package root.
|
|
|
54
60
|
|
|
55
61
|
## Recommended Workflow
|
|
56
62
|
|
|
57
|
-
1. Confirm the repository root
|
|
58
|
-
2. Inspect repository health with `taskset
|
|
63
|
+
1. Confirm the repository root with `taskset config --json` (look for `.taskset/`, not a required config file).
|
|
64
|
+
2. Inspect repository health with `taskset doctor --json`.
|
|
59
65
|
3. List or show tasks and check their owner and assignees before changing or executing them.
|
|
60
66
|
4. Resolve whether the current Git user is authorized to take the selected task; obtain confirmation when another person is responsible and the request does not already authorize that specific takeover.
|
|
61
67
|
5. Create, update, execute, or close tasks with Taskset commands.
|
|
@@ -75,24 +81,24 @@ For ownership-gate scenarios, read [owner and assignee examples](references/task
|
|
|
75
81
|
## Common Commands
|
|
76
82
|
|
|
77
83
|
```bash
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
84
|
+
taskset config --json
|
|
85
|
+
taskset doctor --json
|
|
86
|
+
taskset task list --json
|
|
87
|
+
taskset task show your_task_id_here --json
|
|
88
|
+
taskset task create --title "Describe the work"
|
|
89
|
+
taskset task update your_task_id_here --status doing
|
|
90
|
+
taskset task status your_task_id_here done
|
|
91
|
+
taskset task delete your_task_id_here
|
|
92
|
+
taskset task list --search "multiple terms" --json
|
|
93
|
+
taskset task list --file packages/core --impact --json
|
|
94
|
+
taskset document create story --title "Describe the user outcome"
|
|
95
|
+
taskset document create research --title "Evaluate options" --related your_task_id_here
|
|
96
|
+
taskset document update your_document_id_here --status ready --type research
|
|
97
|
+
taskset document list research --search "queue" --impact --json
|
|
98
|
+
taskset document show your_document_id_here --type research --include-derived --json
|
|
99
|
+
taskset document import docs/adr/0001-example.md --type adr --move
|
|
100
|
+
taskset document batch taskset-documents.json --concurrency 4 --json
|
|
101
|
+
taskset sync --json
|
|
96
102
|
```
|
|
97
103
|
|
|
98
104
|
## Practical Guidance
|
|
@@ -123,14 +129,18 @@ pnpm taskset sync
|
|
|
123
129
|
- Use `document batch <manifest.json>` for repeatable multi-document create,
|
|
124
130
|
import, update, and export jobs. Progress belongs on stderr and `--json`
|
|
125
131
|
output on stdout. Use `sync` after upgrades to ensure canonical directories,
|
|
126
|
-
migrate legacy IDs
|
|
127
|
-
|
|
132
|
+
migrate legacy IDs to short hex IDs, normalize filenames, repair duplicate
|
|
133
|
+
sequence prefixes, rewrite repository text references, refresh data
|
|
134
|
+
`.gitignore` patterns for scoped `.generated/` directories, and rebuild views.
|
|
128
135
|
- Disposable metadata indexes live beside each entity folder
|
|
129
136
|
(`.taskset/tasks/.generated/`, `.taskset/stories/.generated/`, and the other
|
|
130
137
|
document-kind folders), not under a global `.taskset/generated/`.
|
|
131
|
-
- New task and document IDs
|
|
132
|
-
|
|
133
|
-
|
|
138
|
+
- New task and document IDs are immutable 5-6 character lowercase hex values
|
|
139
|
+
such as `a1b2c3`. Filenames use `{sequence}-{slug}-{id}.md`. Agents MUST
|
|
140
|
+
reference the short `id` in commands, relationships, and handoffs—never the
|
|
141
|
+
mutable filename sequence prefix. Use `sync` or `task migrate-ids` for legacy
|
|
142
|
+
repositories; do not rename entity files by hand because canonical
|
|
143
|
+
relationships must be rewritten together.
|
|
134
144
|
- When a task change affects repository behavior, follow up with the relevant tests, docs, and `git diff --check`.
|
|
135
145
|
|
|
136
146
|
## Task Modeling
|
|
@@ -223,5 +233,8 @@ For paired examples of required, multi-package, and unnecessary changesets, read
|
|
|
223
233
|
- In monorepos, verify affected packages and consumers against the workspace and task-runner graphs rather than relying only on the initially named directory.
|
|
224
234
|
- In repositories using Changesets, reconcile the task's declared Changeset requirement with the actual affected packages before completion.
|
|
225
235
|
- Prefer the smallest Taskset command that proves the intended state.
|
|
236
|
+
- Cite tasks and documents by their short hex `id` (`a1b2c3`), not by filename
|
|
237
|
+
sequence numbers. Use that `id` with `task show`, `task update`, `--related`,
|
|
238
|
+
`--depends-on`, and `--parent`.
|
|
226
239
|
- Avoid editing generated output, caches, or any non-canonical `.taskset/` artifacts.
|
|
227
240
|
- Report validation failures plainly and only claim success after the command has run.
|
|
@@ -85,9 +85,9 @@ listed in Preserve Product Invariants, the invariant takes precedence. Explain
|
|
|
85
85
|
the conflict to the user and request an explicit override with rationale before
|
|
86
86
|
proceeding.
|
|
87
87
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
88
|
+
Do not turn accidental manifest mistakes, empty packages, or placeholder
|
|
89
|
+
dependencies into conventions. Report them and follow the intended
|
|
90
|
+
`@taskset/<directory-name>` ownership model.
|
|
91
91
|
|
|
92
92
|
## Preserve Product Invariants
|
|
93
93
|
|
|
@@ -126,20 +126,26 @@ Non-negotiable rules:
|
|
|
126
126
|
- Document mutations, imports, exports, and batches belong to core. The CLI
|
|
127
127
|
validates manifests and renders output only. Use TanStack Pacer for bounded
|
|
128
128
|
heavy batches and migrations, emit count and percentage progress, preserve
|
|
129
|
-
manifest result order, and serialize writes that allocate
|
|
129
|
+
manifest result order, and serialize writes that allocate short hex IDs plus
|
|
130
|
+
filename display sequences.
|
|
130
131
|
- Disposable metadata indexes live in each entity folder's `.generated/`
|
|
131
132
|
directory (for example `.taskset/tasks/.generated/` and
|
|
132
133
|
`.taskset/research/.generated/`), not a global `.taskset/generated/` tree.
|
|
133
134
|
- Repository sync is the maintenance entrypoint: ensure canonical `.taskset/`
|
|
134
|
-
directories, migrate task IDs
|
|
135
|
+
directories, migrate task and document IDs to immutable short hex IDs,
|
|
136
|
+
normalize `{sequence}-{slug}-{id}.md` filenames, repair duplicate sequence
|
|
137
|
+
prefixes by `createdAt`, rewrite repository text references atomically,
|
|
135
138
|
refresh data `.gitignore` rules for scoped generated output, remove legacy
|
|
136
139
|
global generated directories, then rebuild disposable generated views.
|
|
137
|
-
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
140
|
+
- The nearest `.taskset/` directory marks the repository root. Optional
|
|
141
|
+
`taskset.config.ts` at that root configures validated project metadata and
|
|
142
|
+
task creation defaults. Missing config uses built-in defaults. Config never
|
|
143
|
+
relocates canonical `.taskset/` data or becomes a second task store.
|
|
144
|
+
- Taskset is developed using its own `.taskset/` data, optional root config,
|
|
145
|
+
CLI, and canonical task files. Keep that dogfooding workflow operational when
|
|
146
|
+
changing core, CLI, workspace commands, or persisted contracts.
|
|
147
|
+
- Public docs split three audiences: humans (`docs/`), agents (`docs/agents/`
|
|
148
|
+
plus `skills/` and root `AGENTS.md`), and maintainers (`docs/maintainers/`).
|
|
143
149
|
|
|
144
150
|
## Organize by Ownership
|
|
145
151
|
|
|
@@ -31,7 +31,9 @@ Recommended website stack:
|
|
|
31
31
|
Register blog posts in the app-local post registry so static export can
|
|
32
32
|
enumerate `/posts/[slug]`. Keep blog posts in plain Markdown by default with
|
|
33
33
|
`title`, `description`, and `date` frontmatter. Do not merge docs and blog theme
|
|
34
|
-
wrappers in the global MDX component map.
|
|
34
|
+
wrappers in the global MDX component map. Agent operating pages live under
|
|
35
|
+
`docs/agents/` and appear in usage navigation; maintainer pages stay under
|
|
36
|
+
`/maintainers`.
|
|
35
37
|
|
|
36
38
|
Keep architectural decisions under
|
|
37
39
|
`docs/maintainers/architecture/decisions/`.
|
|
@@ -39,7 +39,8 @@ surfaces such as package names, the CLI command, `taskset.config.ts`, and
|
|
|
39
39
|
`.taskset/`.
|
|
40
40
|
|
|
41
41
|
Taskset dogfoods these boundaries. The root workspace installs core and CLI,
|
|
42
|
-
|
|
42
|
+
may load optional `taskset.config.ts`, and stores its own planned work in
|
|
43
|
+
`.taskset/tasks/`.
|
|
43
44
|
|
|
44
45
|
## Dependency Flow
|
|
45
46
|
|
|
@@ -4,13 +4,12 @@ Product direction and the canonical source-of-truth model.
|
|
|
4
4
|
|
|
5
5
|
## Product Direction
|
|
6
6
|
|
|
7
|
-
Taskset began as an offline, inline, AI-friendly, human-readable
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
Taskset began as an offline, inline, AI-friendly, human-readable delivery
|
|
8
|
+
workspace: not only tasks, but the plans, research, decisions, flows, and
|
|
9
|
+
runbooks that make delivery coherent.
|
|
10
10
|
|
|
11
|
-
It
|
|
12
|
-
|
|
13
|
-
live beside the code as human-readable Markdown.
|
|
11
|
+
It is a Git-native software delivery platform. Stories, flows, decisions,
|
|
12
|
+
research, runbooks, and tasks live beside the code as human-readable Markdown.
|
|
14
13
|
|
|
15
14
|
Vision: become the Git-native operating system for software delivery.
|
|
16
15
|
|
|
@@ -58,8 +57,10 @@ Canonical project state lives under `.taskset/`.
|
|
|
58
57
|
Rules:
|
|
59
58
|
|
|
60
59
|
- Entity Markdown files are authoritative persisted state.
|
|
61
|
-
-
|
|
62
|
-
|
|
60
|
+
- The nearest `.taskset/` directory is the discoverable repository marker.
|
|
61
|
+
Optional `taskset.config.ts` at that root overlays validated behavior and
|
|
62
|
+
defaults. Missing config uses built-in defaults. Config never owns entity
|
|
63
|
+
state.
|
|
63
64
|
- YAML frontmatter contains structured metadata. Markdown bodies contain
|
|
64
65
|
durable human context.
|
|
65
66
|
- Do not store the same field independently in frontmatter and body.
|
|
@@ -73,8 +74,8 @@ Rules:
|
|
|
73
74
|
state, or another hidden store as an undeclared authority.
|
|
74
75
|
- Git is the versioning and collaboration layer around the files. Do not assume
|
|
75
76
|
it provides database transactions or conflict-free identifiers.
|
|
76
|
-
- Repository discovery walks upward for
|
|
77
|
-
|
|
77
|
+
- Repository discovery walks upward for `.taskset/`; canonical storage remains
|
|
78
|
+
fixed under that directory.
|
|
78
79
|
|
|
79
80
|
Any persisted format change must define validation, compatibility, migration,
|
|
80
81
|
and failure behavior before implementation.
|
|
@@ -9,8 +9,8 @@ Storage, graph, and snapshot rules for canonical repository data.
|
|
|
9
9
|
expressions.
|
|
10
10
|
- Normalize stored code references to repository-relative POSIX paths.
|
|
11
11
|
- Reject paths that escape the repository or `.taskset/` ownership boundary.
|
|
12
|
-
- Keep IDs immutable
|
|
13
|
-
|
|
12
|
+
- Keep entity IDs immutable short hex values. Filename display sequences are
|
|
13
|
+
mutable maintenance metadata repaired by `sync`; they are not identity.
|
|
14
14
|
- Store one canonical direction for inverse relationships unless the schema
|
|
15
15
|
explicitly defines otherwise. Derive `blocks` from `dependsOn`, for example,
|
|
16
16
|
rather than allowing silent divergence.
|
|
@@ -55,7 +55,7 @@ taskset task list --file packages/core --impact
|
|
|
55
55
|
taskset context-bundle
|
|
56
56
|
```
|
|
57
57
|
|
|
58
|
-
|
|
58
|
+
Optional root usage configuration is exactly `taskset.config.ts`. Export a
|
|
59
59
|
versionless object, preferably through `defineConfig` from `@taskset/core`.
|
|
60
60
|
Keep configuration fields behavioral; never use config to redirect canonical
|
|
61
61
|
entity storage outside `.taskset/`.
|
|
@@ -8,7 +8,7 @@ Use YAML frontmatter for machine metadata and Markdown for human context:
|
|
|
8
8
|
|
|
9
9
|
```markdown
|
|
10
10
|
---
|
|
11
|
-
id:
|
|
11
|
+
id: a1b2c3
|
|
12
12
|
title: Add task validation
|
|
13
13
|
status: doing
|
|
14
14
|
priority: high
|
|
@@ -31,6 +31,8 @@ Describe why the work exists.
|
|
|
31
31
|
- [ ] Invalid statuses produce an actionable diagnostic.
|
|
32
32
|
```
|
|
33
33
|
|
|
34
|
+
Filename: `0000001-add-task-validation-a1b2c3.md`
|
|
35
|
+
|
|
34
36
|
Rules:
|
|
35
37
|
|
|
36
38
|
- Require `id`, `title`, `status`, `createdAt`, and `updatedAt`.
|
|
@@ -53,9 +55,12 @@ Rules:
|
|
|
53
55
|
reading the documented legacy ISO 8601 UTC form until a compatibility change
|
|
54
56
|
explicitly removes it.
|
|
55
57
|
- Keep IDs immutable and compare them exactly.
|
|
56
|
-
- Format new task IDs as
|
|
57
|
-
|
|
58
|
-
and
|
|
58
|
+
- Format new task and document IDs as 5-6 character lowercase hex values.
|
|
59
|
+
Store display order in the filename as `{sequence}-{slug}-{id}.md`. Keep
|
|
60
|
+
legacy `TS-` ULIDs and sequential `0000001-title` IDs readable only so
|
|
61
|
+
`sync` / `task migrate-ids` can rewrite them, normalize filenames, repair
|
|
62
|
+
duplicate sequence prefixes by `createdAt`, and update canonical
|
|
63
|
+
relationships atomically.
|
|
59
64
|
- Preserve user-authored body text and meaningful list order.
|
|
60
65
|
- Use stable key ordering and one final newline in generated output.
|
|
61
66
|
- Generated metadata indexes cover supported non-ID metadata fields, group
|
|
@@ -96,9 +96,10 @@ must remain available. Root-only architecture tests run once after Turbo rather
|
|
|
96
96
|
than being duplicated inside every package. There is no `transit` script;
|
|
97
97
|
Turbo's dependency traversal is orchestration, not another test suite.
|
|
98
98
|
|
|
99
|
-
`taskset.config.ts` is loaded as trusted project code using Node's
|
|
100
|
-
erasable TypeScript support. Keep it free of syntax that
|
|
101
|
-
code generation.
|
|
99
|
+
Optional `taskset.config.ts` is loaded as trusted project code using Node's
|
|
100
|
+
native erasable TypeScript support when present. Keep it free of syntax that
|
|
101
|
+
requires TypeScript code generation. Repository discovery uses `.taskset/`, not
|
|
102
|
+
the config file.
|
|
102
103
|
|
|
103
104
|
If Turbo reports duplicate workspace names, fix the incorrect package manifest.
|
|
104
105
|
Do not work around the graph with directory filters or aliases.
|
package/src/cli.ts
CHANGED
|
@@ -60,7 +60,7 @@ import {
|
|
|
60
60
|
import * as z from 'zod'
|
|
61
61
|
|
|
62
62
|
const USAGE = `Usage:
|
|
63
|
-
taskset init [--cwd <path>]
|
|
63
|
+
taskset init [--config] [--cwd <path>]
|
|
64
64
|
taskset config [--json] [--cwd <path>]
|
|
65
65
|
taskset doctor [--json] [--cwd <path>]
|
|
66
66
|
taskset generate [--json] [--cwd <path>]
|
|
@@ -139,6 +139,11 @@ const CommonValuesSchema = z.strictObject({
|
|
|
139
139
|
json: JsonSchema,
|
|
140
140
|
})
|
|
141
141
|
|
|
142
|
+
const InitValuesSchema = z.strictObject({
|
|
143
|
+
cwd: CwdSchema,
|
|
144
|
+
config: z.boolean().optional(),
|
|
145
|
+
})
|
|
146
|
+
|
|
142
147
|
const ConcurrencySchema = z.coerce.number().int().min(1).max(32).optional()
|
|
143
148
|
const DocumentKindInputSchema = TrimmedStringSchema.transform((value, context) => {
|
|
144
149
|
try {
|
|
@@ -866,6 +871,24 @@ export async function runCli(args: readonly string[], context: CliContext = {}):
|
|
|
866
871
|
}
|
|
867
872
|
|
|
868
873
|
if (command === 'init' || command === 'config' || command === 'doctor') {
|
|
874
|
+
if (command === 'init') {
|
|
875
|
+
const parsed = parseArgs({
|
|
876
|
+
args: commandArgs,
|
|
877
|
+
allowPositionals: false,
|
|
878
|
+
options: {
|
|
879
|
+
cwd: { type: 'string' },
|
|
880
|
+
config: { type: 'boolean' },
|
|
881
|
+
},
|
|
882
|
+
})
|
|
883
|
+
const values = parseSchema(InitValuesSchema, parsed.values, 'init options')
|
|
884
|
+
const commandCwd = resolveCommandCwd(cwd, values.cwd)
|
|
885
|
+
const repository = await initializeRepository(commandCwd, {
|
|
886
|
+
writeConfig: values.config === true,
|
|
887
|
+
})
|
|
888
|
+
stdout(`Initialized Taskset in ${repository.rootDirectory}\n`)
|
|
889
|
+
return 0
|
|
890
|
+
}
|
|
891
|
+
|
|
869
892
|
const parsed = parseArgs({
|
|
870
893
|
args: commandArgs,
|
|
871
894
|
allowPositionals: false,
|
|
@@ -873,13 +896,6 @@ export async function runCli(args: readonly string[], context: CliContext = {}):
|
|
|
873
896
|
})
|
|
874
897
|
const values = parseSchema(CommonValuesSchema, parsed.values, `${command} options`)
|
|
875
898
|
const commandCwd = resolveCommandCwd(cwd, values.cwd)
|
|
876
|
-
|
|
877
|
-
if (command === 'init') {
|
|
878
|
-
const repository = await initializeRepository(commandCwd)
|
|
879
|
-
stdout(`Initialized Taskset in ${repository.rootDirectory}\n`)
|
|
880
|
-
return 0
|
|
881
|
-
}
|
|
882
|
-
|
|
883
899
|
const repository = await discoverRepository(commandCwd)
|
|
884
900
|
|
|
885
901
|
if (command === 'config') {
|
|
@@ -889,6 +905,7 @@ export async function runCli(args: readonly string[], context: CliContext = {}):
|
|
|
889
905
|
{
|
|
890
906
|
rootDirectory: repository.rootDirectory,
|
|
891
907
|
configPath: repository.configPath,
|
|
908
|
+
hasConfig: repository.hasConfig,
|
|
892
909
|
dataDirectory: repository.dataDirectory,
|
|
893
910
|
config: repository.config,
|
|
894
911
|
},
|
|
@@ -896,8 +913,10 @@ export async function runCli(args: readonly string[], context: CliContext = {}):
|
|
|
896
913
|
2,
|
|
897
914
|
)}\n`,
|
|
898
915
|
)
|
|
899
|
-
} else {
|
|
916
|
+
} else if (repository.hasConfig) {
|
|
900
917
|
stdout(`${repository.configPath}\n`)
|
|
918
|
+
} else {
|
|
919
|
+
stdout(`defaults (${repository.rootDirectory})\n`)
|
|
901
920
|
}
|
|
902
921
|
return 0
|
|
903
922
|
}
|
|
@@ -958,7 +977,7 @@ export async function runCli(args: readonly string[], context: CliContext = {}):
|
|
|
958
977
|
stdout(
|
|
959
978
|
values.json
|
|
960
979
|
? `${JSON.stringify(result, null, 2)}\n`
|
|
961
|
-
: `Synced ${result.migrations.length} migrations and generated views\n`,
|
|
980
|
+
: `Synced ${result.migrations.length + result.documentMigrations.length} migrations and generated views\n`,
|
|
962
981
|
)
|
|
963
982
|
return 0
|
|
964
983
|
}
|