@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.
Files changed (32) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +21 -22
  3. package/dist/cli.d.ts.map +1 -1
  4. package/dist/cli.js +28 -8
  5. package/docs/_meta.ts +1 -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 +23 -23
  12. package/docs/configuration.md +33 -31
  13. package/docs/document-types.md +20 -17
  14. package/docs/getting-started.md +56 -49
  15. package/docs/index.md +31 -25
  16. package/docs/maintainers/architecture/decisions/0001-documentation-platform.md +21 -47
  17. package/docs/maintainers/development/contributing.md +2 -3
  18. package/docs/maintainers/development/documentation.md +32 -49
  19. package/docs/maintainers/index.md +1 -3
  20. package/docs/maintainers/product/vision.md +25 -33
  21. package/docs/task-files.md +19 -13
  22. package/package.json +4 -4
  23. package/skills/taskset/SKILL.md +43 -30
  24. package/skills/taskset-implement/SKILL.md +17 -11
  25. package/skills/taskset-implement/references/architecture/documentation-and-generated.md +3 -1
  26. package/skills/taskset-implement/references/architecture/ownership-and-dependencies.md +2 -1
  27. package/skills/taskset-implement/references/architecture/product-and-source.md +11 -10
  28. package/skills/taskset-implement/references/architecture/storage-and-snapshots.md +2 -2
  29. package/skills/taskset-implement/references/conventions/naming-and-packages.md +1 -1
  30. package/skills/taskset-implement/references/conventions/task-files.md +9 -4
  31. package/skills/taskset-implement/references/workflows/environment-and-pnpm.md +4 -3
  32. package/src/cli.ts +29 -10
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @taskset/cli
2
2
 
3
+ ## 6.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - 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.
8
+ - 89c31c3: Replace sequential and ULID entity IDs with immutable 5-6 character lowercase hex IDs.
9
+
10
+ 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.
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies
15
+ - Updated dependencies [89c31c3]
16
+ - @taskset/core@6.0.0
17
+ - @taskset/contracts@6.0.0
18
+
3
19
  ## 5.1.0
4
20
 
5
21
  ### 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 available at
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, 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), and [agent guide](./docs/agents/index.md).
6
4
 
7
- The published package also ships the repository `docs/` tree and `skills/` tree
8
- beside the CLI so installed projects can load offline references from
9
- `node_modules/@taskset/cli/docs` and `node_modules/@taskset/cli/skills`.
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
- pnpm taskset init
14
- pnpm taskset task create --title "Document the release"
13
+ npm install --global @taskset/cli
15
14
  ```
16
15
 
17
- The package owns argument tokenization, Zod-backed command validation, output,
18
- and exit-code mapping. Repository behavior is delegated to `@taskset/core`.
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
- Supported command groups:
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
- Use `task list --file <path> --impact` for direct and transitive code-impact
28
- queries. Repeated path values use OR, distinct filter categories use AND,
29
- repeated labels require every label, and planning or timestamp ranges are
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, and runbooks 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
- Exit code `0` means success, `1` means a repository or domain failure, and `2`
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":"AAuGA,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;AAwuBD,wBAAsB,MAAM,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,OAAO,GAAE,UAAe,GAAG,OAAO,CAAC,MAAM,CAAC,CAy4B/F"}
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAuGA,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;AA6uBD,wBAAsB,MAAM,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,OAAO,GAAE,UAAe,GAAG,OAAO,CAAC,MAAM,CAAC,CAu5B/F"}
package/dist/cli.js CHANGED
@@ -5,7 +5,7 @@ import { DocumentIdSchema, DocumentStatusSchema, DocumentTimestampSchema, TaskId
5
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';
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>]
@@ -67,6 +67,10 @@ const CommonValuesSchema = z.strictObject({
67
67
  cwd: CwdSchema,
68
68
  json: JsonSchema,
69
69
  });
70
+ const InitValuesSchema = z.strictObject({
71
+ cwd: CwdSchema,
72
+ config: z.boolean().optional(),
73
+ });
70
74
  const ConcurrencySchema = z.coerce.number().int().min(1).max(32).optional();
71
75
  const DocumentKindInputSchema = TrimmedStringSchema.transform((value, context) => {
72
76
  try {
@@ -724,6 +728,23 @@ export async function runCli(args, context = {}) {
724
728
  return 0;
725
729
  }
726
730
  if (command === 'init' || command === 'config' || command === 'doctor') {
731
+ if (command === 'init') {
732
+ const parsed = parseArgs({
733
+ args: commandArgs,
734
+ allowPositionals: false,
735
+ options: {
736
+ cwd: { type: 'string' },
737
+ config: { type: 'boolean' },
738
+ },
739
+ });
740
+ const values = parseSchema(InitValuesSchema, parsed.values, 'init options');
741
+ const commandCwd = resolveCommandCwd(cwd, values.cwd);
742
+ const repository = await initializeRepository(commandCwd, {
743
+ writeConfig: values.config === true,
744
+ });
745
+ stdout(`Initialized Taskset in ${repository.rootDirectory}\n`);
746
+ return 0;
747
+ }
727
748
  const parsed = parseArgs({
728
749
  args: commandArgs,
729
750
  allowPositionals: false,
@@ -731,24 +752,23 @@ export async function runCli(args, context = {}) {
731
752
  });
732
753
  const values = parseSchema(CommonValuesSchema, parsed.values, `${command} options`);
733
754
  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
755
  const repository = await discoverRepository(commandCwd);
740
756
  if (command === 'config') {
741
757
  if (values.json) {
742
758
  stdout(`${JSON.stringify({
743
759
  rootDirectory: repository.rootDirectory,
744
760
  configPath: repository.configPath,
761
+ hasConfig: repository.hasConfig,
745
762
  dataDirectory: repository.dataDirectory,
746
763
  config: repository.config,
747
764
  }, null, 2)}\n`);
748
765
  }
749
- else {
766
+ else if (repository.hasConfig) {
750
767
  stdout(`${repository.configPath}\n`);
751
768
  }
769
+ else {
770
+ stdout(`defaults (${repository.rootDirectory})\n`);
771
+ }
752
772
  return 0;
753
773
  }
754
774
  const result = await diagnoseRepository(repository);
@@ -793,7 +813,7 @@ export async function runCli(args, context = {}) {
793
813
  });
794
814
  stdout(values.json
795
815
  ? `${JSON.stringify(result, null, 2)}\n`
796
- : `Synced ${result.migrations.length} migrations and generated views\n`);
816
+ : `Synced ${result.migrations.length + result.documentMigrations.length} migrations and generated views\n`);
797
817
  return 0;
798
818
  }
799
819
  if (command === 'snapshot') {
package/docs/_meta.ts CHANGED
@@ -5,4 +5,5 @@ export default {
5
5
  'cli-reference': 'CLI Reference',
6
6
  'task-files': 'Task Files',
7
7
  'document-types': 'Document Types',
8
+ agents: 'For Agents',
8
9
  }
@@ -0,0 +1,5 @@
1
+ export default {
2
+ index: 'For Agents',
3
+ workflows: 'Agent Workflows',
4
+ commands: 'Agent Commands',
5
+ }
@@ -0,0 +1,70 @@
1
+ ---
2
+ title: Use Taskset command contracts
3
+ description: Machine-oriented contracts for discovery, JSON output, clear flags, search, and identifiers.
4
+ contentType: Reference
5
+ navLabel: Agent Commands
6
+ ---
7
+
8
+ # Use Taskset command contracts
9
+
10
+ This page quotes the contracts agents should rely on. For the full human reference, see [CLI reference](../cli-reference.md).
11
+
12
+ ## Discovery and defaults
13
+
14
+ | Fact | Contract |
15
+ | --- | --- |
16
+ | Repository marker | Nearest ancestor `.taskset/` directory |
17
+ | Optional config | `taskset.config.ts` beside that root |
18
+ | Missing config | Built-in statuses, priorities, and defaults |
19
+ | `taskset config --json` | Includes `rootDirectory`, `configPath`, `hasConfig`, `dataDirectory`, `config` |
20
+ | `taskset init` | Creates `.taskset/`; `--config` writes optional config |
21
+
22
+ ## Output and exit codes
23
+
24
+ - Stdout carries requested output
25
+ - Stderr carries diagnostics and generation warnings
26
+ - Exit `0` means success
27
+ - Exit `1` means repository or domain failure
28
+ - Exit `2` means usage or validation failure
29
+
30
+ ## Identifiers
31
+
32
+ - Entity `id` values are immutable 5–6 character lowercase hex strings
33
+ - Filenames are `{sequence}-{slug}-{id}.md`
34
+ - Commands and relationships must use the short `id`
35
+ - Never cite the mutable sequence prefix as identity
36
+
37
+ ## Array updates and clear flags
38
+
39
+ Array options replace the whole stored array. Repeat the singular option once per desired value. Clear with the exact plural flag:
40
+
41
+ - `--clear-dependencies`
42
+ - `--clear-labels`
43
+ - `--clear-assignees`
44
+ - `--clear-reviewers`
45
+ - `--clear-related`
46
+ - `--clear-files`
47
+ - `--clear-directories`
48
+ - `--clear-projects`
49
+ - `--clear-parent`
50
+ - `--clear-owner`
51
+
52
+ Do not guess a clear flag from the singular setter name.
53
+
54
+ ## Search and impact
55
+
56
+ - `--search` is token-aware: every normalized term must match title or body
57
+ - Terms may appear in any order
58
+ - `--impact` expands file, directory, or dependency matches to dependent work
59
+
60
+ ## Document kinds
61
+
62
+ Use only these kinds:
63
+
64
+ - `story`
65
+ - `flow`
66
+ - `decision` (`adr`, `dr` aliases)
67
+ - `research`
68
+ - `runbook`
69
+
70
+ Document statuses are `draft`, `ready`, `active`, `accepted`, `superseded`, and `archived`.
@@ -0,0 +1,99 @@
1
+ ---
2
+ title: Operate Taskset as an agent
3
+ description: Plan, research, decide, and track repository work with the Taskset CLI, skill, and JSON contracts.
4
+ contentType: How-to
5
+ navLabel: For Agents
6
+ ---
7
+
8
+ # Operate Taskset as an agent
9
+
10
+ Use this page when you are an agent operating Taskset in a repository. Humans should start with [Getting started](../getting-started.md). Maintainer architecture lives under [Maintainer docs](../maintainers/index.md).
11
+
12
+ Taskset is not only a task tracker. You use it to capture plans, research, decisions, flows, runbooks, and the tasks that execute them in one Git-native graph.
13
+
14
+ ## Load the skill first
15
+
16
+ Prefer the packaged skill before inventing workflow:
17
+
18
+ ```bash
19
+ npx skills add FalseFoundation/taskset --skill taskset
20
+ ```
21
+
22
+ Project and global skill installs both work. After a project npm install, offline copies also live at `node_modules/@taskset/cli/skills/taskset/SKILL.md`.
23
+
24
+ ## Invoke the CLI
25
+
26
+ Do not assume `pnpm taskset`. Use whichever runner the environment provides:
27
+
28
+ ```bash
29
+ npx @taskset/cli document list --json
30
+ npx @taskset/cli task list --json
31
+ pnpm dlx @taskset/cli doctor --json
32
+ yarn dlx @taskset/cli document show your_document_id_here --json
33
+ bunx @taskset/cli sync --json
34
+ taskset task list --json
35
+ ```
36
+
37
+ ## Discover the repository
38
+
39
+ 1. Walk upward for `.taskset/`
40
+ 2. Load optional `taskset.config.ts` at that root when present
41
+ 3. Otherwise use built-in defaults
42
+
43
+ No config file is required. `taskset init` creates `.taskset/` only. Pass `--config` when the repository wants an optional TypeScript overlay.
44
+
45
+ ## Choose the right artifact
46
+
47
+ | If the work produces… | Create… |
48
+ | --- | --- |
49
+ | A user outcome or acceptance criteria | `story` |
50
+ | A journey with variants and checks | `flow` |
51
+ | Evidence, options, or a recommendation | `research` |
52
+ | A lasting architectural or product choice | `decision` / `adr` |
53
+ | A repeatable recovery or ops procedure | `runbook` |
54
+ | Scoped execution with status and owners | `task` |
55
+
56
+ Link documents and tasks with `--related`. Keep one-off scratch in the task body.
57
+
58
+ ## Core operating rules
59
+
60
+ - Treat `.taskset/tasks/` and kind-specific document directories as the source of truth
61
+ - Mutate through CLI commands when a command exists
62
+ - Cite short hex ids such as `a1b2c3`, never filename sequence prefixes
63
+ - Prefer `--json` for handoffs
64
+ - Create follow-up tasks or checklist subtasks for newly discovered work
65
+ - Create research, decision, runbook, story, or flow documents when work produces reusable evidence or lasting choices
66
+ - Keep statuses current mid-work
67
+
68
+ ## Command map
69
+
70
+ | Goal | Command |
71
+ | --- | --- |
72
+ | Inspect root and defaults | `taskset config --json` |
73
+ | Validate repository | `taskset doctor --json` |
74
+ | List or search tasks | `taskset task list --search "terms" --json` |
75
+ | List or search documents | `taskset document list research --search "terms" --json` |
76
+ | Show one entity | `taskset task show your_task_id_here --json` |
77
+ | Create executable work | `taskset task create --title "Describe the work"` |
78
+ | Create durable memory | `taskset document create research --title "Evaluate options" --related your_task_id_here` |
79
+ | Change status | `taskset task status your_task_id_here doing` |
80
+ | Impact query | `taskset task list --file path/or/dir --impact --json` |
81
+ | Repair and rebuild | `taskset sync --json` |
82
+
83
+ Full contracts: [CLI reference](../cli-reference.md) and [Agent command contracts](commands.md).
84
+
85
+ ## Workflow checklist
86
+
87
+ 1. Confirm the repository root with `taskset config --json`
88
+ 2. Search existing tasks and documents before creating duplicates
89
+ 3. Capture durable evidence or decisions as documents mid-work
90
+ 4. Create or update tasks for executable delivery
91
+ 5. Resolve ownership before mutating assigned work
92
+ 6. Keep statuses current, then re-validate after edits
93
+
94
+ ## Related pages
95
+
96
+ - [Agent workflows](workflows.md)
97
+ - [Agent command contracts](commands.md)
98
+ - [Document types](../document-types.md)
99
+ - [Task files](../task-files.md)
@@ -0,0 +1,28 @@
1
+ # Taskset
2
+
3
+ > Git-native Markdown workspace for planning, research, decisions, operations, and delivery.
4
+
5
+ Taskset stores stories, flows, research, decisions, runbooks, and tasks under `.taskset/`. The CLI is published as `@taskset/cli` and runs through package runners or a global install. Config files are optional.
6
+
7
+ ## For agents
8
+
9
+ - [Operate Taskset as an agent](https://taskset.false.foundation/docs/agents)
10
+ - [Follow agent workflows](https://taskset.false.foundation/docs/agents/workflows)
11
+ - [Use Taskset command contracts](https://taskset.false.foundation/docs/agents/commands)
12
+ - [Choose a document type](https://taskset.false.foundation/docs/document-types)
13
+ - [Understand task files](https://taskset.false.foundation/docs/task-files)
14
+ - [CLI reference](https://taskset.false.foundation/docs/cli-reference)
15
+
16
+ ## For humans
17
+
18
+ - [Keep the whole delivery story beside the code](https://taskset.false.foundation/docs)
19
+ - [Start a Taskset repository](https://taskset.false.foundation/docs/getting-started)
20
+ - [Configure Taskset defaults](https://taskset.false.foundation/docs/configuration)
21
+
22
+ ## Optional offline skill
23
+
24
+ After install, load `node_modules/@taskset/cli/skills/taskset/SKILL.md`, or install with:
25
+
26
+ ```text
27
+ npx skills add FalseFoundation/taskset --skill taskset
28
+ ```
@@ -0,0 +1,50 @@
1
+ ---
2
+ title: Follow agent workflows in Taskset
3
+ description: Ownership checks, mid-work updates, documents, and monorepo habits for agent operators.
4
+ contentType: How-to
5
+ navLabel: Agent Workflows
6
+ ---
7
+
8
+ # Follow agent workflows in Taskset
9
+
10
+ These workflows assume the CLI is available and `.taskset/` already exists. Initialize with `taskset init` when it does not. Use documents for durable memory and tasks for execution; link them so later agents inherit the full story.
11
+
12
+ ## Before you execute a task
13
+
14
+ 1. Run `taskset task show your_task_id_here --json`
15
+ 2. Resolve `git config --get user.name`
16
+ 3. Compare owner and assignees with that identity
17
+ 4. Pause for confirmation when another person owns or is exclusively assigned the task
18
+ 5. Check unresolved dependencies and blockers before status changes
19
+
20
+ Matching ownership does not override blockers. A generic instruction such as “work on the next task” does not override another person’s assignment.
21
+
22
+ ## While you execute
23
+
24
+ - Set the active task to `doing` when work starts
25
+ - Create child tasks (`--parent`) or checklist items (`- [ ]`) for newly discovered work
26
+ - Check off finished checklist items as `- [x]`
27
+ - Mark finished child tasks `done`
28
+ - Create research, decision, runbook, story, or flow documents when evidence or lasting choices appear
29
+ - Link documents and tasks with `--related`
30
+ - Update a primary skill when the session designates one and a lasting lesson emerges
31
+
32
+ Do not leave discovered work only in chat.
33
+
34
+ ## Close-out
35
+
36
+ 1. Confirm acceptance criteria are met
37
+ 2. Confirm every tracked subtask is finished or intentionally resolved
38
+ 3. Set the parent task to `done`
39
+ 4. Run the repository’s relevant tests or `taskset doctor --json` when the change touched contracts or many files
40
+
41
+ ## Monorepo habits
42
+
43
+ - Prefer declared package names and existing Taskset projects over directory-name guesses
44
+ - Record `--depends-on` only for real execution prerequisites
45
+ - Attach the narrowest accurate `--file` or `--directory` scopes
46
+ - Validate the changed package and affected dependents
47
+
48
+ ## Batch and sync
49
+
50
+ Use `taskset document batch manifest.json --json` for multi-document jobs. Use `taskset sync --json` after upgrades or when filenames, ids, or generated views need repair.
@@ -1,16 +1,15 @@
1
1
  ---
2
- title: CLI Reference
2
+ title: Look up Taskset CLI commands
3
3
  description: Complete reference for the taskset command-line interface.
4
+ contentType: Reference
5
+ navLabel: CLI Reference
4
6
  ---
5
7
 
6
- # CLI Reference
8
+ # Look up Taskset CLI commands
7
9
 
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.
10
+ The `taskset` command is a thin adapter over `@taskset/core` for the full Taskset surface: stories, flows, research, decisions, runbooks, and tasks. It parses arguments, validates options, calls core operations, and renders human or JSON output.
11
11
 
12
- Use `pnpm taskset <command>` when Taskset is installed as a project
13
- dependency. The examples below use `taskset` directly for brevity.
12
+ Invoke it with `npx @taskset/cli`, `pnpm dlx @taskset/cli`, `yarn dlx @taskset/cli`, `bunx @taskset/cli`, a project binary, or a global install. Examples below use `taskset` directly.
14
13
 
15
14
  ## Common Behavior
16
15
 
@@ -46,12 +45,10 @@ Exit codes:
46
45
  ### `init`
47
46
 
48
47
  ```bash
49
- taskset init [--cwd <path>]
48
+ taskset init [--config] [--cwd <path>]
50
49
  ```
51
50
 
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.
51
+ Initializes a Taskset repository. The command resolves a root from an existing `.taskset/`, Git or workspace markers, or the working directory, then creates `.taskset/` task and document directories plus `.taskset/.gitignore` when they do not already exist. Pass `--config` to also write optional `taskset.config.ts`.
55
52
 
56
53
  Human output:
57
54
 
@@ -65,15 +62,15 @@ Initialized Taskset in <root-directory>
65
62
  taskset config [--json] [--cwd <path>]
66
63
  ```
67
64
 
68
- Discovers the nearest `taskset.config.ts` by walking upward from the working
69
- directory.
65
+ Discovers the nearest `.taskset/` directory by walking upward from the working directory. Optional `taskset.config.ts` at that root overlays defaults when present.
70
66
 
71
- Human output is the config file path. JSON output contains:
67
+ Human output is the config file path when a config exists, or `defaults (<root-directory>)` when it does not. JSON output contains:
72
68
 
73
69
  ```json
74
70
  {
75
71
  "rootDirectory": "...",
76
72
  "configPath": "...",
73
+ "hasConfig": false,
77
74
  "dataDirectory": "...",
78
75
  "config": {}
79
76
  }
@@ -311,7 +308,7 @@ Human output is the serialized task Markdown. JSON output contains:
311
308
 
312
309
  ```json
313
310
  {
314
- "relativePath": ".taskset/tasks/0000001-short-title.md",
311
+ "relativePath": ".taskset/tasks/0000001-short-title-a1b2c3.md",
315
312
  "metadata": {},
316
313
  "body": "...",
317
314
  "derived": {}
@@ -384,11 +381,12 @@ alongside the deleted task record.
384
381
  taskset task migrate-ids [--json] [--cwd <path>]
385
382
  ```
386
383
 
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.
384
+ Atomically converts legacy `TS-` and sequential task IDs to immutable short hex
385
+ IDs, normalizes filenames to `{sequence}-{slug}-{id}.md`, repairs duplicate
386
+ sequence prefixes by `createdAt`, and rewrites canonical relationships plus
387
+ references in repository text files. Dependencies, Git internals, build output,
388
+ caches, generated views, indexes, and snapshots are excluded. Human output is a
389
+ tab-separated old-to-new mapping; JSON emits the same mapping as objects.
392
390
 
393
391
  ### `sync`
394
392
 
@@ -396,9 +394,11 @@ old-to-new mapping; JSON emits the same mapping as objects.
396
394
  taskset sync [--concurrency <count>] [--json] [--cwd <path>]
397
395
  ```
398
396
 
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.
397
+ Ensures every canonical document directory exists under `.taskset`, migrates
398
+ legacy task and document IDs to short hex IDs, normalizes filenames, repairs
399
+ duplicate sequence prefixes by `createdAt`, rewrites repository text
400
+ references, and rebuilds generated views. Progress counts and percentages are
401
+ sent to stderr.
402
402
 
403
403
  ## Document Commands
404
404
 
@@ -1,13 +1,29 @@
1
1
  ---
2
- title: Configuration
3
- description: How taskset.config.ts identifies and configures a Taskset repository.
2
+ title: Configure Taskset defaults
3
+ description: Optionally add taskset.config.ts to overlay defaults and vocabulary on a `.taskset/` repository.
4
+ contentType: How-to
5
+ navLabel: Configuration
4
6
  ---
5
7
 
6
- # Configuration
8
+ # Configure Taskset defaults
7
9
 
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.
10
+ Taskset repositories are identified by a `.taskset/` directory. `taskset.config.ts` is optional. When the file is absent, built-in statuses, priorities, and creation defaults apply.
11
+
12
+ ## When to add a config file
13
+
14
+ Add `taskset.config.ts` when you need at least one of these:
15
+
16
+ - A repository `project.name`
17
+ - Different task creation defaults
18
+ - A reduced or reordered status or priority vocabulary
19
+
20
+ Create one during init:
21
+
22
+ ```bash
23
+ taskset init --config
24
+ ```
25
+
26
+ Or author the file beside `.taskset/`:
11
27
 
12
28
  ```typescript
13
29
  import { defineConfig } from '@taskset/cli'
@@ -30,32 +46,18 @@ export default defineConfig({
30
46
 
31
47
  ## Contract
32
48
 
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.
49
+ - `project.name` is optional repository metadata
50
+ - `tasks.defaults.status`, `priority`, and `labels` are optional creation defaults
51
+ - `tasks.statuses` selects and orders the active status vocabulary from Taskset’s canonical values
52
+ - `tasks.priorities` selects and orders the active priority vocabulary from Taskset’s canonical values
53
+ - `urgent` is the highest supported priority
54
+ - Unknown fields, invalid enum values, empty names, and duplicate default labels or vocabulary values are rejected
55
+ - The config file is trusted project TypeScript and may use erasable syntax supported by your Node version
56
+
57
+ The config identifies behavior. It is not task storage. Canonical task state remains under `.taskset/tasks/`.
53
58
 
54
59
  ## Discovery
55
60
 
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.
61
+ Commands started in nested directories walk upward until they find `.taskset/`. If `taskset.config.ts` exists at that root, Taskset loads and validates it. Otherwise it uses built-in defaults.
59
62
 
60
- Use `taskset config --json` to inspect the discovered root and resolved
61
- defaults.
63
+ Use `taskset config --json` to inspect the discovered root, whether a config file is present, and the resolved defaults.