@taskset/cli 4.0.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.
Files changed (63) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/README.md +23 -20
  3. package/dist/cli.d.ts.map +1 -1
  4. package/dist/cli.js +538 -71
  5. package/docs/_meta.ts +9 -0
  6. package/docs/agents/_meta.ts +5 -0
  7. package/docs/agents/commands.md +70 -0
  8. package/docs/agents/index.md +99 -0
  9. package/docs/agents/llms.txt +28 -0
  10. package/docs/agents/workflows.md +50 -0
  11. package/docs/cli-reference.md +461 -0
  12. package/docs/configuration.md +63 -0
  13. package/docs/document-types.md +103 -0
  14. package/docs/getting-started.md +106 -0
  15. package/docs/index.md +43 -0
  16. package/docs/maintainers/_meta.ts +7 -0
  17. package/docs/maintainers/architecture/_meta.ts +5 -0
  18. package/docs/maintainers/architecture/decisions/0001-documentation-platform.md +44 -0
  19. package/docs/maintainers/architecture/decisions/0002-code-architecture.md +31 -0
  20. package/docs/maintainers/architecture/decisions/0003-snapshot-policy.md +31 -0
  21. package/docs/maintainers/architecture/decisions/_meta.ts +5 -0
  22. package/docs/maintainers/architecture/overview.md +111 -0
  23. package/docs/maintainers/architecture/synchronization.md +56 -0
  24. package/docs/maintainers/development/_meta.ts +6 -0
  25. package/docs/maintainers/development/contributing.md +58 -0
  26. package/docs/maintainers/development/documentation.md +52 -0
  27. package/docs/maintainers/development/engineering.md +59 -0
  28. package/docs/maintainers/development/testing.md +89 -0
  29. package/docs/maintainers/index.md +20 -0
  30. package/docs/maintainers/product/_meta.ts +3 -0
  31. package/docs/maintainers/product/vision.md +68 -0
  32. package/docs/maintainers/technology.md +55 -0
  33. package/docs/task-files.md +180 -0
  34. package/package.json +8 -6
  35. package/skills/taskset/SKILL.md +240 -0
  36. package/skills/taskset/references/changesets-examples.md +97 -0
  37. package/skills/taskset/references/document-modeling-examples.md +63 -0
  38. package/skills/taskset/references/monorepo-task-modeling.md +125 -0
  39. package/skills/taskset/references/task-modeling-examples.md +249 -0
  40. package/skills/taskset-implement/SKILL.md +240 -0
  41. package/skills/taskset-implement/agents/openai.yaml +4 -0
  42. package/skills/taskset-implement/references/architecture/client-and-server.md +69 -0
  43. package/skills/taskset-implement/references/architecture/documentation-and-generated.md +72 -0
  44. package/skills/taskset-implement/references/architecture/ownership-and-dependencies.md +108 -0
  45. package/skills/taskset-implement/references/architecture/product-and-source.md +81 -0
  46. package/skills/taskset-implement/references/architecture/storage-and-snapshots.md +45 -0
  47. package/skills/taskset-implement/references/architecture.md +34 -0
  48. package/skills/taskset-implement/references/conventions/backend-and-tooling.md +33 -0
  49. package/skills/taskset-implement/references/conventions/design.md +38 -0
  50. package/skills/taskset-implement/references/conventions/interfaces-and-ui.md +50 -0
  51. package/skills/taskset-implement/references/conventions/naming-and-packages.md +64 -0
  52. package/skills/taskset-implement/references/conventions/task-files.md +94 -0
  53. package/skills/taskset-implement/references/conventions/tests-and-docs.md +55 -0
  54. package/skills/taskset-implement/references/conventions/typescript-and-exports.md +41 -0
  55. package/skills/taskset-implement/references/conventions.md +40 -0
  56. package/skills/taskset-implement/references/release.md +135 -0
  57. package/skills/taskset-implement/references/workflows/dependencies-and-docs-site.md +54 -0
  58. package/skills/taskset-implement/references/workflows/environment-and-pnpm.md +109 -0
  59. package/skills/taskset-implement/references/workflows/persisted-data-and-git.md +30 -0
  60. package/skills/taskset-implement/references/workflows/validation.md +34 -0
  61. package/skills/taskset-implement/references/workflows/vitest-and-test-strategy.md +82 -0
  62. package/skills/taskset-implement/references/workflows.md +33 -0
  63. package/src/cli.ts +640 -87
@@ -0,0 +1,89 @@
1
+ ---
2
+ title: Testing
3
+ description: Maintainer test strategy, Vitest usage, and pragmatic TDD guidance.
4
+ ---
5
+
6
+ # Testing
7
+
8
+ Taskset uses Vitest for TypeScript unit and integration tests. The root
9
+ configuration is shared by package-local suites. Turbo runs each owning
10
+ package's Vitest task and the root workspace architecture suite.
11
+ Vitest already provides the Vite-powered test pipeline; the Node library and
12
+ CLI packages use TypeScript directly for builds, so they do not need a separate
13
+ Vite build configuration.
14
+
15
+ ```bash
16
+ pnpm test
17
+ pnpm test:architecture
18
+ pnpm test:watch
19
+ pnpm check
20
+ ```
21
+
22
+ Use filtered package tests for focused work:
23
+
24
+ ```bash
25
+ pnpm --filter @taskset/core test
26
+ pnpm --filter @taskset/cli test
27
+ ```
28
+
29
+ Package-local test scripts are intentional. Turbo and filtered pnpm commands
30
+ execute scripts owned by each workspace; the root script cannot replace those
31
+ entrypoints. `test:architecture` names the separate root-only package-boundary
32
+ suite. There is no `transit` command in the repository.
33
+
34
+ ## TDD Policy
35
+
36
+ Prefer a red-green-refactor loop for:
37
+
38
+ - domain invariants
39
+ - parser and serializer behavior
40
+ - lifecycle transitions
41
+ - graph rules
42
+ - migrations
43
+ - bug fixes
44
+
45
+ Do not force test-first ceremony for documentation, formatting, generated
46
+ configuration, or exploratory spikes. Convert a successful spike into tested
47
+ production behavior before merging it.
48
+
49
+ ## Test Layers
50
+
51
+ ### Unit
52
+
53
+ Test pure schemas, value objects, state transitions, graph algorithms, filters,
54
+ and serialization rules.
55
+
56
+ ### Integration
57
+
58
+ Use temporary fixture repositories to test filesystem behavior, Git discovery,
59
+ atomic writes, path safety, monorepo discovery, and package impact.
60
+
61
+ ### Contract
62
+
63
+ Verify CLI exit codes and output, MCP schemas, package exports, and persisted
64
+ Markdown compatibility.
65
+
66
+ ### UI
67
+
68
+ Test feature behavior and accessibility in the owning interface. Add browser
69
+ projects only when UI packages exist.
70
+
71
+ ### End to end
72
+
73
+ Keep a small number of workflows that create a fixture repository and exercise
74
+ the public CLI or hosted interface. Do not duplicate every unit case at this
75
+ level.
76
+
77
+ ## Important Cases
78
+
79
+ - malformed YAML and unknown fields
80
+ - CRLF, Unicode, and empty Markdown bodies
81
+ - parse and serialize round trips
82
+ - duplicate IDs and branch-safe identity
83
+ - path traversal and symlink boundaries
84
+ - broken graph references and cycles
85
+ - interrupted writes and stale updates
86
+ - old-format fixtures and compatibility rollback behavior
87
+
88
+ Vitest code snapshots are acceptable for small stable serialized output or
89
+ diagnostics. They are unrelated to Taskset safety snapshots.
@@ -0,0 +1,20 @@
1
+ ---
2
+ title: Maintainers
3
+ description: Repository maintenance documentation for Taskset contributors.
4
+ ---
5
+
6
+ # Taskset Maintainer Documentation
7
+
8
+ This section contains repository maintenance material for the Taskset delivery workspace. It stays separate from the primary human and agent guides while remaining available in the same Nextra documentation site.
9
+
10
+ ## Contents
11
+
12
+ - `product/`: product direction and scope
13
+ - `architecture/`: system boundaries and accepted decisions
14
+ - `development/`: contribution, engineering, testing, and documentation
15
+ workflows
16
+ - `technology.md`: preferred frontend, backend, language, and database choices
17
+
18
+ Contributors should start with the root `CONTRIBUTING.md`, then read the
19
+ relevant maintainer document before changing architecture, tooling, or
20
+ repository workflows.
@@ -0,0 +1,3 @@
1
+ export default {
2
+ vision: 'Vision',
3
+ }
@@ -0,0 +1,68 @@
1
+ ---
2
+ title: Product Vision
3
+ description: Maintainer-facing product direction for Taskset.
4
+ ---
5
+
6
+ # Product Vision
7
+
8
+ ## Origin
9
+
10
+ Taskset began from a need to keep delivery context offline and inline with the code. Tasks alone were not enough. Teams and agents also needed stories, research, decisions, flows, and runbooks that travel with the repository instead of living in a disconnected project-management database.
11
+
12
+ ## Vision
13
+
14
+ Taskset aims to become the Git-native operating system for software delivery.
15
+
16
+ ## Mission
17
+
18
+ Store planning, learning, decisions, operations, and execution as human-readable repository files, then provide focused interfaces over that shared work graph.
19
+
20
+ ## Product Goals
21
+
22
+ - Accelerate delivery by reducing context switching
23
+ - Give developers immediate awareness of related tasks, dependencies, specs, decisions, and releases
24
+ - Give AI systems direct, structured, reviewable project context across plans and execution
25
+ - Make monorepos, packages, applications, and code paths first-class
26
+ - Let managers and stakeholders view repository-backed information without creating another source of truth
27
+
28
+ ## Principles
29
+
30
+ ### Offline first
31
+
32
+ Core workflows must work from a local repository without a network service.
33
+
34
+ ### Inline with code
35
+
36
+ Project context belongs beside the code it affects and travels with the repository.
37
+
38
+ ### Human and AI readable
39
+
40
+ Markdown carries durable prose. Structured frontmatter carries data that tools can validate and query.
41
+
42
+ ### Git native
43
+
44
+ Commits, branches, pull requests, diffs, and reviews are normal collaboration mechanisms.
45
+
46
+ ### One source of truth
47
+
48
+ Every interface reads and changes the same canonical `.taskset/` files through the same domain rules.
49
+
50
+ ### Agent first, human readable
51
+
52
+ Taskset optimizes distribution, discovery, and docs for agent operators while keeping Markdown reviewable by humans.
53
+
54
+ ### Memory and execution together
55
+
56
+ Documents preserve product and engineering memory. Tasks carry ownership, status, and delivery. Relationships bind them into one graph.
57
+
58
+ ## Current product surface
59
+
60
+ The current surface includes:
61
+
62
+ - repository initialization and optional configuration
63
+ - tasks with lifecycle, dependencies, search, and impact queries
64
+ - stories, flows, decisions, research, and runbooks with the same query and mutation family
65
+ - validation, diagnostics, generated views, snapshots, and sync
66
+ - packaged agent skills and dual-audience documentation
67
+
68
+ TUI, MCP, extension, Kanban, Office, and integrations build on the same file and core contracts.
@@ -0,0 +1,55 @@
1
+ ---
2
+ title: Technology Preferences
3
+ description: Preferred frontend, backend, language, and database choices for Taskset.
4
+ ---
5
+
6
+ # Technology Preferences
7
+
8
+ These are defaults for new Taskset implementation work. They guide choices
9
+ when requirements do not demand a different tool; they are not a requirement
10
+ to install every library in every package.
11
+
12
+ ## Frontend
13
+
14
+ Use TypeScript and React for web interfaces. Prefer the TanStack ecosystem for
15
+ headless application behavior:
16
+
17
+ - TanStack Query for server-state fetching, caching, and mutations
18
+ - TanStack Form for complex validated forms
19
+ - TanStack Table for data grids and tabular state
20
+ - TanStack Hotkeys for keyboard command handling
21
+ - TanStack Pacer for debouncing, throttling, queuing, and rate control
22
+ - TanStack Virtual for large virtualized lists and grids
23
+ - TanStack DB when a client-side reactive data layer is justified
24
+ - TanStack Devtools and library-specific devtools during development
25
+
26
+ Adopt these tools by demonstrated feature need. Do not add speculative
27
+ dependencies to scaffolds or force TanStack abstractions around simple local
28
+ state.
29
+
30
+ ## Backend
31
+
32
+ Prefer TypeScript for services and hosted adapters.
33
+
34
+ - Start with a small framework-independent composition root where practical.
35
+ - Use NestJS when dependency injection, modules, guards, transport adapters, or
36
+ a larger service boundary justify the framework.
37
+ - In NestJS applications, prefer `class-transformer` and `class-validator` for
38
+ transport DTO transformation and validation.
39
+ - Prefer TypeORM when a relational object mapper is appropriate.
40
+ - Keep Taskset domain rules in `@taskset/core`; server frameworks own transport,
41
+ authentication, persistence adapters, and process lifecycle.
42
+
43
+ Use Rust for components where systems-level performance, memory control,
44
+ portability, concurrency, or a standalone native executable provides a clear
45
+ advantage. Keep language boundaries explicit and narrow.
46
+
47
+ ## Databases
48
+
49
+ - Prefer MariaDB for smaller conventional hosted applications.
50
+ - Prefer PostgreSQL for larger systems, advanced relational workloads, and
51
+ features that benefit from its ecosystem.
52
+ - Do not introduce a database as an authority for canonical Taskset entities;
53
+ `.taskset/` Markdown remains the product source of truth.
54
+ - Document schema ownership, migrations, backup, and consistency behavior
55
+ before adding a database-backed adapter.
@@ -0,0 +1,180 @@
1
+ ---
2
+ title: Understand Taskset task files
3
+ description: The canonical Markdown representation for Taskset work items.
4
+ contentType: Conceptual
5
+ navLabel: Task Files
6
+ ---
7
+
8
+ # Understand Taskset task files
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.
13
+
14
+ ```markdown
15
+ ---
16
+ id: a1b2c3
17
+ title: Add task validation
18
+ status: doing
19
+ priority: high
20
+ order: 10
21
+ owner: platform
22
+ assignees:
23
+ - maintainer
24
+ reviewers:
25
+ - reviewer
26
+ team: core
27
+ estimate: 90
28
+ effort: 3
29
+ risk: high
30
+ dueDate: 2026-06-30
31
+ createdAt: 2026-06-12
32
+ updatedAt: 2026-06-12 09:30 UTC
33
+ labels:
34
+ - core
35
+ dependsOn: []
36
+ related: []
37
+ duplicates: []
38
+ files:
39
+ - packages/core/src/tasks/taskFile.ts
40
+ directories:
41
+ - packages/core
42
+ projects:
43
+ - taskset
44
+ ---
45
+
46
+ # Context
47
+
48
+ Explain why the task exists.
49
+ ```
50
+
51
+ ## Canonical Data
52
+
53
+ Required fields are `id`, `title`, `status`, `createdAt`, and `updatedAt`.
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.
58
+
59
+ Task files use one strict versionless metadata shape. Optional fields:
60
+
61
+ - Planning: `priority`, `order`, `estimate` in integer minutes, `effort` as a
62
+ finite nonnegative number, `risk`, and `dueDate`
63
+ - People: `owner`, `assignees`, `reviewers`, and `team`
64
+ - Relationships: `dependsOn`, `related`, `duplicates`, and `parent`
65
+ - Scope: `labels`, `files`, `directories`, and `projects`
66
+
67
+ People and project values are trimmed free-form strings. Arrays must not
68
+ contain duplicates. Paths are normalized repository-relative POSIX paths.
69
+ Dates use `YYYY-MM-DD` or `YYYY-MM-DD HH:mm UTC`; documented legacy
70
+ millisecond ISO UTC timestamps remain readable.
71
+
72
+ Unknown fields, invalid enum values, self-links, duplicate list values, path
73
+ traversal, and an `updatedAt` earlier than `createdAt` are rejected.
74
+
75
+ `order` is the optional user-controlled sequence. Lower order values sort
76
+ first. Missing values sort after ordered tasks, and duplicate order values fall
77
+ back to deterministic task ID ordering.
78
+
79
+ ## Compatibility Cutover
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.
87
+
88
+ Task metadata is versionless. Versioned task frontmatter is invalid input and
89
+ fails with a schema diagnostic rather than being silently rewritten.
90
+ Repositories created with earlier Taskset releases must convert task files by
91
+ removing only the legacy version field from task frontmatter while preserving
92
+ all other metadata and Markdown body content. Take a Git commit or
93
+ `taskset snapshot create` checkpoint before converting existing repositories.
94
+
95
+ ## Relationships
96
+
97
+ `dependsOn`, `related`, `duplicates`, and `parent` are canonical. Taskset
98
+ derives:
99
+
100
+ - `blockedBy`: direct dependencies
101
+ - `blocks`: direct inverse dependencies
102
+ - `children`: direct inverse parents
103
+ - `subtasks`: all transitive descendants
104
+
105
+ Use `--include-derived` with task list or JSON task show output. Derived values
106
+ are never written to canonical Markdown. The graph validates missing targets,
107
+ self-links, dependency cycles, and parent cycles.
108
+
109
+ ## Writes And Lifecycle
110
+
111
+ Taskset serializes fields deterministically, normalizes line endings to LF,
112
+ preserves the Markdown body, and emits one final newline. Canonical mutations
113
+ use failure-safe file operations.
114
+
115
+ Allowed lifecycle transitions are:
116
+
117
+ - `todo` to `doing`, `blocked`, or `canceled`
118
+ - `doing` to `todo`, `blocked`, `done`, or `canceled`
119
+ - `blocked` to `todo`, `doing`, or `canceled`
120
+ - `done` and `canceled` are terminal
121
+
122
+ Deletion is rejected while another task has an inbound canonical relationship
123
+ to the target. `--remove-dependencies` repairs those references and removes the
124
+ target in one transaction.
125
+
126
+ ## Queries And Derived State
127
+
128
+ `task list` supports metadata, relationship, planning range, timestamp range,
129
+ text, file, and directory filters. Numeric and timestamp ranges are inclusive:
130
+
131
+ ```bash
132
+ taskset task list --file packages/core --impact --json
133
+ taskset task list --sort order
134
+ taskset task list --estimate-min 30 --estimate-max 120 --risk high
135
+ taskset task list --duplicate a1b2c3
136
+ ```
137
+
138
+ Repeated enum, person, project, file, and directory values use OR within the
139
+ same option. Repeated labels require every requested label. Different filter
140
+ categories compose with AND. For example, two `--file` values match either
141
+ path, while adding `--owner` requires both the path match and owner match.
142
+ `--file` is the unified containment query over task files and task directories;
143
+ `--directory` matches only canonical directory metadata. All path inputs are
144
+ normalized relative to the repository before matching.
145
+
146
+ Planning filters are `--estimate-min`, `--estimate-max`, `--effort-min`, and
147
+ `--effort-max`. Timestamp filters are `--due-before`, `--due-after`,
148
+ `--created-before`, `--created-after`, `--updated-before`, and
149
+ `--updated-after`. Title and Markdown body use case-insensitive `--search`;
150
+ every whitespace-separated search term must occur somewhere in those fields,
151
+ but terms need not be adjacent or ordered. Exact task IDs use `task show` or
152
+ relationship filters rather than a redundant list ID filter.
153
+
154
+ With `--impact`, every direct filter is applied first, then the graph adds tasks
155
+ that transitively depend on those direct matches. JSON output uses
156
+ `{ "direct": [...], "impacted": [...] }`; `--include-derived` adds relationship
157
+ projections to records in both groups.
158
+
159
+ `.taskset/cache/` and each entity folder's `.generated/` directory are disposable.
160
+ Generated metadata
161
+ indexes are deterministic projections for supported non-ID task metadata fields
162
+ and refresh on a best-effort basis after canonical mutations. Date and
163
+ timestamp metadata is grouped by calendar date only. Generated filenames remain
164
+ human-readable: spaces are preserved and path separators are displayed with
165
+ `∕` instead of URL-encoded text. Generated views sort tasks by `order` when
166
+ present and display ordered rows with the order value.
167
+
168
+ ## Snapshots
169
+
170
+ Git remains the normal history. `.taskset/snapshots/` contains immutable,
171
+ non-authoritative safety checkpoints:
172
+
173
+ ```bash
174
+ taskset snapshot create
175
+ taskset snapshot list
176
+ taskset snapshot restore <snapshot-id>
177
+ taskset snapshot restore <snapshot-id> --apply
178
+ ```
179
+
180
+ Restore previews by default and requires `--apply` to mutate canonical tasks.
package/package.json CHANGED
@@ -2,8 +2,8 @@
2
2
  "name": "@taskset/cli",
3
3
  "type": "module",
4
4
  "private": false,
5
- "version": "4.0.0",
6
- "description": "The scriptable command-line interface for Taskset.",
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",
@@ -23,6 +23,8 @@
23
23
  "dist",
24
24
  "src",
25
25
  "!src/**/*.test.ts",
26
+ "docs",
27
+ "skills",
26
28
  "README.md",
27
29
  "CHANGELOG.md"
28
30
  ],
@@ -44,8 +46,8 @@
44
46
  },
45
47
  "dependencies": {
46
48
  "zod": "4.6.5",
47
- "@taskset/contracts": "4.0.0",
48
- "@taskset/core": "4.0.0"
49
+ "@taskset/contracts": "6.0.0",
50
+ "@taskset/core": "6.0.0"
49
51
  },
50
52
  "devDependencies": {
51
53
  "@types/node": "^26.6.3",
@@ -54,8 +56,8 @@
54
56
  "@taskset/configs": "0.1.1"
55
57
  },
56
58
  "scripts": {
57
- "build": "pnpm clean && tsc",
58
- "clean": "node --eval \"import { rmSync } from 'node:fs'; rmSync('dist', { recursive: true, force: true })\"",
59
+ "build": "pnpm clean && tsc && node ./scripts/copy-package-assets.mjs",
60
+ "clean": "node --eval \"import { rmSync } from 'node:fs'; for (const name of ['dist', 'docs', 'skills']) rmSync(name, { recursive: true, force: true })\"",
59
61
  "test": "vitest run --root ../.. packages/cli/src",
60
62
  "test:watch": "vitest --root ../.. packages/cli/src"
61
63
  }