@taskset/cli 4.0.0 → 5.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/README.md +6 -2
  3. package/dist/cli.d.ts.map +1 -1
  4. package/dist/cli.js +510 -63
  5. package/docs/_meta.ts +8 -0
  6. package/docs/cli-reference.md +461 -0
  7. package/docs/configuration.md +61 -0
  8. package/docs/document-types.md +100 -0
  9. package/docs/getting-started.md +99 -0
  10. package/docs/index.md +37 -0
  11. package/docs/maintainers/_meta.ts +7 -0
  12. package/docs/maintainers/architecture/_meta.ts +5 -0
  13. package/docs/maintainers/architecture/decisions/0001-documentation-platform.md +70 -0
  14. package/docs/maintainers/architecture/decisions/0002-code-architecture.md +31 -0
  15. package/docs/maintainers/architecture/decisions/0003-snapshot-policy.md +31 -0
  16. package/docs/maintainers/architecture/decisions/_meta.ts +5 -0
  17. package/docs/maintainers/architecture/overview.md +111 -0
  18. package/docs/maintainers/architecture/synchronization.md +56 -0
  19. package/docs/maintainers/development/_meta.ts +6 -0
  20. package/docs/maintainers/development/contributing.md +59 -0
  21. package/docs/maintainers/development/documentation.md +69 -0
  22. package/docs/maintainers/development/engineering.md +59 -0
  23. package/docs/maintainers/development/testing.md +89 -0
  24. package/docs/maintainers/index.md +22 -0
  25. package/docs/maintainers/product/_meta.ts +3 -0
  26. package/docs/maintainers/product/vision.md +76 -0
  27. package/docs/maintainers/technology.md +55 -0
  28. package/docs/task-files.md +174 -0
  29. package/package.json +7 -5
  30. package/skills/taskset/SKILL.md +227 -0
  31. package/skills/taskset/references/changesets-examples.md +97 -0
  32. package/skills/taskset/references/document-modeling-examples.md +63 -0
  33. package/skills/taskset/references/monorepo-task-modeling.md +125 -0
  34. package/skills/taskset/references/task-modeling-examples.md +249 -0
  35. package/skills/taskset-implement/SKILL.md +234 -0
  36. package/skills/taskset-implement/agents/openai.yaml +4 -0
  37. package/skills/taskset-implement/references/architecture/client-and-server.md +69 -0
  38. package/skills/taskset-implement/references/architecture/documentation-and-generated.md +70 -0
  39. package/skills/taskset-implement/references/architecture/ownership-and-dependencies.md +107 -0
  40. package/skills/taskset-implement/references/architecture/product-and-source.md +80 -0
  41. package/skills/taskset-implement/references/architecture/storage-and-snapshots.md +45 -0
  42. package/skills/taskset-implement/references/architecture.md +34 -0
  43. package/skills/taskset-implement/references/conventions/backend-and-tooling.md +33 -0
  44. package/skills/taskset-implement/references/conventions/design.md +38 -0
  45. package/skills/taskset-implement/references/conventions/interfaces-and-ui.md +50 -0
  46. package/skills/taskset-implement/references/conventions/naming-and-packages.md +64 -0
  47. package/skills/taskset-implement/references/conventions/task-files.md +89 -0
  48. package/skills/taskset-implement/references/conventions/tests-and-docs.md +55 -0
  49. package/skills/taskset-implement/references/conventions/typescript-and-exports.md +41 -0
  50. package/skills/taskset-implement/references/conventions.md +40 -0
  51. package/skills/taskset-implement/references/release.md +135 -0
  52. package/skills/taskset-implement/references/workflows/dependencies-and-docs-site.md +54 -0
  53. package/skills/taskset-implement/references/workflows/environment-and-pnpm.md +108 -0
  54. package/skills/taskset-implement/references/workflows/persisted-data-and-git.md +30 -0
  55. package/skills/taskset-implement/references/workflows/validation.md +34 -0
  56. package/skills/taskset-implement/references/workflows/vitest-and-test-strategy.md +82 -0
  57. package/skills/taskset-implement/references/workflows.md +33 -0
  58. package/src/cli.ts +611 -77
@@ -0,0 +1,227 @@
1
+ ---
2
+ name: taskset
3
+ description: Taskset workflow guidance for agents that plan and track work with tasks, stories, user flows, decisions, research, and runbooks 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
+ ---
5
+
6
+ # Taskset
7
+
8
+ Use this skill when working in a repository that uses Taskset to store work as human-readable Markdown beside the code.
9
+
10
+ ## Packaged Docs And Skills
11
+
12
+ `@taskset/cli` publishes the repository `docs/` and `skills/` trees in the npm
13
+ tarball. After `pnpm add --save-dev @taskset/cli` (or an equivalent install),
14
+ treat those paths as the detailed offline reference set:
15
+
16
+ | Path | Contents |
17
+ | --- | --- |
18
+ | `node_modules/@taskset/cli/skills/taskset/SKILL.md` | This skill (agent workflow for tasks and documents) |
19
+ | `node_modules/@taskset/cli/skills/taskset/references/` | Task modeling, document modeling, monorepo, and Changesets examples |
20
+ | `node_modules/@taskset/cli/skills/taskset-implement/` | Engineering standards used while developing Taskset itself |
21
+ | `node_modules/@taskset/cli/docs/` | User docs: getting started, configuration, CLI reference, task files, document types |
22
+ | `node_modules/@taskset/cli/docs/maintainers/` | Architecture, ADRs, testing, and maintainer workflows |
23
+
24
+ In the Taskset repository itself, prefer the workspace copies at `skills/` and
25
+ `docs/`—they are the canonical sources that the package build copies into
26
+ `@taskset/cli`. When working in a consumer repository, load the installed copies
27
+ under `node_modules/@taskset/cli/` before inventing workflow or command
28
+ behavior. Useful deep links from an installed package:
29
+
30
+ - CLI contracts: `node_modules/@taskset/cli/docs/cli-reference.md`
31
+ - Document kinds and commands: `node_modules/@taskset/cli/docs/document-types.md`
32
+ - Task file shape: `node_modules/@taskset/cli/docs/task-files.md`
33
+ - Task modeling examples: `node_modules/@taskset/cli/skills/taskset/references/task-modeling-examples.md`
34
+ - Document modeling examples: `node_modules/@taskset/cli/skills/taskset/references/document-modeling-examples.md`
35
+ - Monorepo modeling: `node_modules/@taskset/cli/skills/taskset/references/monorepo-task-modeling.md`
36
+ - Changesets examples: `node_modules/@taskset/cli/skills/taskset/references/changesets-examples.md`
37
+
38
+ Relative links inside the packaged skill still resolve against the packaged
39
+ `docs/` and `skills/` trees because both directories sit at the `@taskset/cli`
40
+ package root.
41
+
42
+ ## Core Rules
43
+
44
+ - Treat `.taskset/tasks/` as the canonical task source of truth and the sibling
45
+ document-kind directories as the canonical durable project-document source.
46
+ - Treat `taskset.config.ts` as the repository entrypoint for Taskset behavior and defaults.
47
+ - Do not create a second task store, hidden database, or alternate sync layer.
48
+ - Use Taskset commands to inspect and mutate tasks instead of editing canonical task files by hand when a command exists.
49
+ - Prefer `pnpm taskset` in project repositories; use the repo root `pnpm taskset` script when available.
50
+ - 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
+ - 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
+ - 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.
53
+ - When the repository or current session designates one or more skills as primary, and task work surfaces a lesson that future agents should reuse—tool or command selection, a bug fix pattern, a repeated failure mode, or an architecture decision—update that primary skill (and its relevant references) in the same change so the failure is not rediscovered later. Prefer skills for lasting how-to; prefer research/decision documents for what was learned or chosen. Do not leave durable guidance only in a closed task body or chat transcript.
54
+
55
+ ## Recommended Workflow
56
+
57
+ 1. Confirm the repository root and Taskset config.
58
+ 2. Inspect repository health with `taskset config --json` and `taskset doctor`.
59
+ 3. List or show tasks and check their owner and assignees before changing or executing them.
60
+ 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
+ 5. Create, update, execute, or close tasks with Taskset commands.
62
+ 6. Re-run validation after edits and keep Git as the collaboration and history layer.
63
+
64
+ ## Before Executing a Task
65
+
66
+ - Show the task and resolve `git config --get user.name` before implementation, changing its status to `doing`, or modifying its ownership or assignment. Also check unresolved dependencies and other explicit blockers; matching ownership does not override them.
67
+ - The current Git user may proceed when they are an assignee, or when the task has no assignees and they are its owner. A different owner does not block an explicitly assigned executor.
68
+ - If another person is the explicit owner and the current Git user is not an assignee, or if the task is assigned only to other people, pause before mutation and ask the user to confirm execution or takeover. Read-only inspection and reporting may continue while awaiting that decision.
69
+ - A current instruction that explicitly identifies and authorizes executing that task counts as confirmation. A generic instruction such as “work on the next task,” task visibility, code ownership, or repository access does not override another person's assignment.
70
+ - Confirmation to help execute a task does not automatically transfer accountability. Preserve the owner unless reassignment is explicitly requested; update assignees only when the confirmation or repository workflow establishes who will now perform the work.
71
+ - If the Git identity is missing or cannot be matched reliably to task identities, state the ambiguity and request confirmation before taking work explicitly assigned to someone else. Do not guess identity from an email, commit history, or hosting-service handle without an established repository mapping.
72
+
73
+ For ownership-gate scenarios, read [owner and assignee examples](references/task-modeling-examples.md#pre-execution-ownership-check).
74
+
75
+ ## Common Commands
76
+
77
+ ```bash
78
+ pnpm taskset config --json
79
+ pnpm taskset doctor
80
+ pnpm taskset task list
81
+ pnpm taskset task show <task-id>
82
+ pnpm taskset task create --title "Describe the work"
83
+ pnpm taskset task update <task-id> --status doing
84
+ pnpm taskset task status <task-id> done
85
+ pnpm taskset task delete <task-id>
86
+ pnpm taskset task list --search "multiple terms"
87
+ pnpm taskset task list --file packages/core --impact
88
+ pnpm taskset document create story --title "Describe the user outcome"
89
+ pnpm taskset document create research --title "Evaluate options" --related <task-id>
90
+ pnpm taskset document update <document-id> --status ready --type research
91
+ pnpm taskset document list research --search "queue" --impact
92
+ pnpm taskset document show <document-id> --type research --include-derived --json
93
+ pnpm taskset document import docs/adr/0001-example.md --type adr --move
94
+ pnpm taskset document batch taskset-documents.json --concurrency 4 --json
95
+ pnpm taskset sync
96
+ ```
97
+
98
+ ## Practical Guidance
99
+
100
+ - Use `--json` for automation and agent handoffs.
101
+ - Array options replace the whole stored array on update; repeat the singular value option once per
102
+ desired value. To empty an array, use the CLI's exact plural clear flag:
103
+ `--clear-dependencies`, `--clear-labels`, `--clear-assignees`, `--clear-reviewers`,
104
+ `--clear-related`, `--clear-files`, `--clear-directories`, or `--clear-projects`.
105
+ Scalar relationships use `--clear-parent` and `--clear-owner`. Do not guess a clear flag from
106
+ the singular setter name or retry an update with an empty string.
107
+ - Use multi-term `--search` for discovery on both `task list` and `document list`; every
108
+ normalized term must match the title or body, but the terms may appear in any order or location.
109
+ - Use `task list --impact` or `document list --impact` when file, directory, or dependency
110
+ relationships should surface dependent work.
111
+ - Keep task and document metadata versionless and let Taskset validate schema and path rules.
112
+ - Documents support the same metadata options, clear flags, list filters, sort, search, impact,
113
+ status, update, and delete commands as tasks. Document statuses remain
114
+ `draft`, `ready`, `active`, `accepted`, `superseded`, and `archived`.
115
+ - Use `document create` for stories, flows, decisions (`decision`, `adr`, and
116
+ `dr` are aliases), research, and runbooks. Use `document import` to preserve
117
+ an existing Markdown body in canonical frontmatter; add `--move` only when
118
+ the source should be removed after a successful canonical write.
119
+ - Pick the kind by purpose: stories capture user value and acceptance criteria;
120
+ flows describe journeys and failure variants; decisions preserve rationale
121
+ and consequences; research records evidence and recommendations; runbooks
122
+ make repeatable operations and recovery safe.
123
+ - Use `document batch <manifest.json>` for repeatable multi-document create,
124
+ import, update, and export jobs. Progress belongs on stderr and `--json`
125
+ output on stdout. Use `sync` after upgrades to ensure canonical directories,
126
+ migrate legacy IDs and repository text references, refresh data `.gitignore`
127
+ patterns for scoped `.generated/` directories, and rebuild views.
128
+ - Disposable metadata indexes live beside each entity folder
129
+ (`.taskset/tasks/.generated/`, `.taskset/stories/.generated/`, and the other
130
+ document-kind folders), not under a global `.taskset/generated/`.
131
+ - New task and document IDs use `0000001-short-title` naming. Use
132
+ `task migrate-ids` for legacy task repositories; do not rename task files by
133
+ hand because canonical relationships must be rewritten together.
134
+ - When a task change affects repository behavior, follow up with the relevant tests, docs, and `git diff --check`.
135
+
136
+ ## Task Modeling
137
+
138
+ - Represent distinct deliverables as separate Taskset tasks instead of placing an entire plan in one raw-text task. Keep one task when the work is genuinely atomic or the items are only completion steps for the same outcome.
139
+ - Search existing open and recently completed tasks before creating new ones. Update or relate matching work instead of creating a duplicate; use `--duplicate` only when preserving a separately created duplicate is necessary.
140
+ - When a prompt contains many tasks, do not preserve its ordering blindly. Infer the work graph from the requested outcomes and repository context, then assign the appropriate existing labels and projects and record relationships such as `--depends-on`, `--related`, and `--parent`. A task that cannot start until another finishes must depend on that task; prompt order alone does not establish a dependency.
141
+ - Use `--depends-on` only for a real execution prerequisite and `--related` for useful context without blocking. Avoid dependency cycles and create prerequisites first when their generated IDs are needed by downstream tasks.
142
+ - Inspect existing tasks, labels, projects, and repository conventions before assigning metadata. Reuse established taxonomy and avoid inventing labels, projects, or relationships without supporting context.
143
+ - Resolve the active repository's Git identity with `git config --get user.name`. Use that current Git user as the default `--owner` for new tasks unless the prompt or established repository ownership identifies a more appropriate accountable owner. If no usable identity exists, do not invent one.
144
+ - Choose ownership and assignment deliberately: `owner` is the single person accountable for the outcome, while repeatable `--assignee` values identify the people expected to execute the work. Assign the current Git user when they are both accountable and executing; preserve a different explicit owner, and do not assign collaborators merely because they own related code or reviewed prior work.
145
+ - Re-evaluate owner and assignees when splitting tasks, creating child or follow-up work, or crossing team and package boundaries. Each independently tracked task may need different accountability; preserve existing assignments during unrelated updates.
146
+ - Attach known repository scope with `--file` or `--directory` so impact queries can find the task. Use the narrowest accurate paths and do not guess paths that have not been established.
147
+ - Model smaller steps within one task as Markdown checklist items beginning with `- [ ]` in the task body; those checklist items are subtasks for progress tracking. Use child tasks with `--parent` instead when a subtask needs its own status, ownership, dependencies, or tracking history.
148
+ - While working, when new deliverables, prerequisites, blockers, deferred scope, regressions, or verification gaps surface, create follow-up tasks, `--parent` child tasks, or checklist subtasks immediately. Relate Taskset tasks with `--depends-on`, `--related`, or `--parent` as appropriate. Do not finish or abandon the current task without recording that discovered work in Taskset.
149
+ - Update the active task's status and every subtask during execution, not only at the end. Set a Taskset task or child task to `doing` when starting it, check off checklist items as `- [x]` when finished, reflect blockers or pauses promptly, and mark each finished child task `done` before moving on. Close the parent only after its own acceptance criteria are met and every tracked subtask—checklist item or child task—is completed or otherwise intentionally resolved.
150
+ - When the repo or session has a primary skill (or a small set of them), prefer updating that skill after work that establishes lasting guidance: which tool or command to use, how a class of bugs was fixed, what repeatedly failed and how to avoid it, or an architecture decision that later tasks must honor. Keep the skill change minimal and decision-oriented; do not dump raw task notes into the skill.
151
+ - Give each task an outcome-oriented title and enough structured Markdown to make it executable: context or outcome, in-scope work, checklist when useful, observable acceptance criteria, and references. Avoid vague titles and undifferentiated text dumps.
152
+ - Preserve links, external URLs, named libraries, and other external mentions from the user's prompt in a `References` section in the relevant task body. Keep enough surrounding description to explain why each reference matters.
153
+ - Preserve user-supplied metadata when updating a task unless the requested change supersedes it. Keep the body, checklist state, status, dependencies, and scope consistent; do not mark a task done until its acceptance criteria are satisfied.
154
+ - For batch mutations, capture the IDs returned by each successful command and reconcile the current task list after any failure. Resume from the observed state instead of rerunning the whole batch and creating duplicates.
155
+ - Prefer closing completed or superseded work through status and relationships so history remains available. Delete a task only when removal is explicitly intended, after checking tasks that depend on it.
156
+ - If the prompt is ambiguous about scope or sequencing, record only relationships supported by evidence. Do not turn a guess into a dependency, owner, due date, estimate, or completion claim.
157
+ - After creating or changing several tasks, inspect them as a set and verify that identifiers, dependencies, parent-child links, related work, labels, projects, and checklist placement match the inferred work graph.
158
+ - During that set-level review, also verify that every task has the intended owner and only evidence-backed assignees.
159
+
160
+ For multi-task prompts or uncertainty about task granularity and relationships, read [good and bad task-modeling examples](references/task-modeling-examples.md).
161
+
162
+ ## Document Modeling
163
+
164
+ - Prefer the five document kinds that already exist. Do not invent notes, specs,
165
+ epics, or RFCs as new kinds: investigation is `research`, lasting choices are
166
+ `decision`, product context is `story` or `flow`, and recovery procedures are
167
+ `runbook`. Keep short scratch in the task body.
168
+ - Search existing documents before creating new ones. Update or `--related` a
169
+ matching document instead of duplicating it.
170
+ - Create documents mid-work as soon as the evidence, decision, or procedure is
171
+ clear enough to reuse. Link both sides with `--related` to the originating
172
+ task when practical.
173
+ - Status habits: start research and stories as `draft`; move them to `ready` or
174
+ `accepted` when the recommendation or criteria stabilize; record decided ADRs
175
+ as `accepted` (the create default); keep usable runbooks `active`.
176
+ - Attach owner, assignees, labels, projects, files, and directories when they help
177
+ discovery the same way they do on tasks. Use `--depends-on` and `--parent`
178
+ only for real document-to-document prerequisites within Taskset documents.
179
+ - Do not dump raw research into a primary skill. Capture the evidence in a
180
+ research document, the choice in a decision document, and only the lasting
181
+ how-to in the skill.
182
+
183
+ For paired good and bad examples, read [document-modeling examples](references/document-modeling-examples.md).
184
+
185
+ ## Monorepo Reasoning
186
+
187
+ When workspace configuration declares multiple apps or packages:
188
+
189
+ - Inspect the workspace manifest, relevant package manifests, package dependency graph, root and package-level task-runner configuration, and release configuration before decomposing work. Use declared package names and existing Taskset projects rather than inferring identity from directory names alone.
190
+ - Distinguish the workspace dependency graph, build-task graph, and Taskset work graph. A package dependency indicates possible impact but is not automatically a Taskset `--depends-on`; record a task dependency only when that concrete deliverable requires another task's output.
191
+ - Trace changes in shared packages outward to direct and transitive consumers. Include compatibility work and consumer validation in the originating task's scope, or create dependent tasks when those outcomes need separate ownership, status, release notes, or delivery.
192
+ - Split work by independently deliverable outcome, not mechanically by package. Keep one cross-package task when several package edits form one atomic capability; split it when packages can ship independently or require different owners, sequencing, acceptance criteria, or release treatment.
193
+ - Assign every affected workspace through existing `--project` values and attach the narrowest accurate `--file` or `--directory` scopes. Include root configuration only when the task actually changes repository-wide behavior.
194
+ - Put package-local implementation and scripts in the owning package. When a task runner such as Turborepo is present, describe task-pipeline or root configuration changes only when orchestration must change; do not compensate for undeclared workspace dependencies with ad hoc execution ordering.
195
+ - Make validation follow the impact graph: test the changed package, affected dependents, relevant integration boundaries, and any repository-wide configuration touched. Prefer the repository task runner's package filters or affected mode and record the intended commands or observable checks in acceptance criteria.
196
+ - Treat lockfiles, generated artifacts, workspace registration, exports, documentation, and Changesets as supporting parts of the owning outcome unless they are independently assignable deliverables. Do not create noisy standalone tasks for mechanical byproducts.
197
+ - Re-evaluate projects, file scopes, dependencies, validation, and Changesets whenever implementation crosses an unexpected package boundary. Record newly independent work as linked Taskset tasks before completing the current task.
198
+
199
+ For package-graph decomposition, cross-package validation, and new-package examples, read [monorepo task-modeling examples](references/monorepo-task-modeling.md).
200
+
201
+ ## Changesets in Monorepos
202
+
203
+ When the repository contains `.changeset/config.json`:
204
+
205
+ - Inspect the Changesets config and affected package manifests before modeling release impact. Follow repository policy for ignored packages, linked or fixed groups, internal dependency bumps, and the base branch.
206
+ - Every task that may change a releasable package must include a `Changeset` section in its body. State either the expected package names, SemVer bump levels, and release-note intent, or `Not required` with a concrete reason supported by repository convention.
207
+ - Treat the changeset as part of the implementation task's checklist and acceptance criteria unless authoring or coordinating releases is itself a separately owned deliverable. Do not create a detached bookkeeping task for every changeset.
208
+ - Base bump levels on externally observable package impact, not task size. Include every directly affected package and account for any internal-dependent bumps required by the repository config.
209
+ - Prefer one changeset for one coherent user-facing change, even when it spans multiple packages. Use separate changesets when the changes have independent release-note meaning or may ship separately.
210
+ - While executing, update the task's Changeset section if the affected packages or release impact changes. Before marking the task done, create the required changeset, verify its package names, bump levels, and summary, and run the repository's Changesets status or validation command.
211
+ - Do not invent a release note for work that repository policy excludes, such as non-published examples or test-only changes. Record the no-changeset rationale so omission is deliberate and reviewable.
212
+
213
+ For paired examples of required, multi-package, and unnecessary changesets, read [Changesets task examples](references/changesets-examples.md).
214
+
215
+ ## Agent Checklist
216
+
217
+ - Read the task and the surrounding repository context first.
218
+ - Before mutating or executing a task, compare its owner and assignees with the current Git user and obtain confirmation when another person is responsible.
219
+ - While executing, create follow-up tasks, child tasks, or checklist subtasks for every distinct piece of newly discovered work before moving on or closing the current task.
220
+ - While executing, create research, decision, runbook, story, or flow documents for reusable evidence, lasting choices, procedures, or product context; link them with `--related`.
221
+ - Keep parent status and every subtask current mid-work: check off finished checklist items, mark finished child tasks `done`, and only then close the parent.
222
+ - When lasting lessons emerge and a primary skill is in play, update that skill so future sessions avoid the same tool-choice, bug-fix, repeated-failure, or architecture mistake.
223
+ - In monorepos, verify affected packages and consumers against the workspace and task-runner graphs rather than relying only on the initially named directory.
224
+ - In repositories using Changesets, reconcile the task's declared Changeset requirement with the actual affected packages before completion.
225
+ - Prefer the smallest Taskset command that proves the intended state.
226
+ - Avoid editing generated output, caches, or any non-canonical `.taskset/` artifacts.
227
+ - Report validation failures plainly and only claim success after the command has run.
@@ -0,0 +1,97 @@
1
+ # Changesets Task Examples
2
+
3
+ Use these examples only when `.changeset/config.json` is present. Package names and bump levels must come from the target repository and the actual release impact.
4
+
5
+ ## Releasable Package Change
6
+
7
+ Bad:
8
+
9
+ ```markdown
10
+ Add cycle validation to the graph code.
11
+
12
+ - [ ] Implement it
13
+ - [ ] Add tests
14
+ ```
15
+
16
+ The task does not say whether the published package changes or what must appear in release notes.
17
+
18
+ Good:
19
+
20
+ ```markdown
21
+ Reject dependency cycles through the public task-graph validation API.
22
+
23
+ ## Checklist
24
+
25
+ - [ ] Implement cycle validation
26
+ - [ ] Add public-behavior tests
27
+ - [ ] Create and validate the required changeset
28
+
29
+ ## Acceptance criteria
30
+
31
+ - Cycles return the documented validation error.
32
+ - Existing acyclic graphs remain valid.
33
+ - Changesets status recognizes the new release entry.
34
+
35
+ ## Changeset
36
+
37
+ - Required package: `@taskset/core`
38
+ - Expected bump: minor
39
+ - Release-note intent: dependency graphs now reject cycles through the public validation API
40
+ ```
41
+
42
+ The final bump still needs to match the repository's SemVer policy. If the behavior is considered a correction to an already documented contract, the implementation may justify a patch instead.
43
+
44
+ ## One Change Across Multiple Packages
45
+
46
+ Bad: add unrelated changesets mechanically—one per touched package—or mention only the package where most code changed.
47
+
48
+ Good:
49
+
50
+ ```markdown
51
+ Expose dependency-cycle diagnostics through the core API and CLI.
52
+
53
+ ## Changeset
54
+
55
+ - Required packages:
56
+ - `@taskset/core` — minor
57
+ - `@taskset/cli` — minor
58
+ - Release-note intent: users can detect and inspect dependency cycles from both the API and CLI
59
+ - Use one changeset because both package updates deliver one user-facing capability.
60
+ ```
61
+
62
+ If repository config causes additional internal dependents to be bumped, verify those effects with Changesets rather than guessing them from workspace topology.
63
+
64
+ ## No Changeset Required
65
+
66
+ Bad: omit any mention of a changeset, leaving reviewers unable to tell whether it was forgotten.
67
+
68
+ Good:
69
+
70
+ ```markdown
71
+ Refactor dependency-cycle test fixtures without changing published behavior.
72
+
73
+ ## Changeset
74
+
75
+ Not required — test-only refactoring with no change to a published package's runtime behavior, types, or documented contract.
76
+ ```
77
+
78
+ “Not required” must be reconsidered if execution reveals a public behavior, type, dependency, or package metadata change.
79
+
80
+ ## Keep the Task and Changeset in Sync
81
+
82
+ Bad: the task predicts a patch for one package, implementation expands into a new public API across two packages, and the original changeset plan remains unchanged.
83
+
84
+ Good: update the task body as scope becomes known, create the changeset for the packages actually affected, and validate it before completion. A useful completion sequence is:
85
+
86
+ ```bash
87
+ pnpm exec changeset
88
+ pnpm exec changeset status --since=main
89
+ ```
90
+
91
+ Use the repository's package-manager command and configured base branch rather than copying these commands blindly.
92
+
93
+ ## Changeset Task or Checklist Item
94
+
95
+ Bad: create a separate “Add changeset” task for every implementation task, adding dependency noise without independent ownership or workflow.
96
+
97
+ Good: keep changeset creation in the implementation checklist. Create a separate Taskset task only when release-note authoring, coordinated versioning, or release preparation is independently assignable, blocked, or reviewed.
@@ -0,0 +1,63 @@
1
+ # Document Modeling Examples
2
+
3
+ Use these examples to choose document kinds and when to create them mid-work.
4
+ IDs in commands are placeholders for IDs returned by Taskset.
5
+
6
+ ## Research Versus Task Notes
7
+
8
+ Bad: while comparing queue providers, paste a long evidence dump into the task
9
+ body and leave the recommendation only in chat.
10
+
11
+ Good: create a research document, keep the task focused on the delivery outcome,
12
+ and link both.
13
+
14
+ ```bash
15
+ pnpm taskset document create research --title "Evaluate queue providers" --related <task-id>
16
+ pnpm taskset task update <task-id> --related <research-id>
17
+ ```
18
+
19
+ ## Decision Versus Research
20
+
21
+ Bad: write an ADR before evidence exists, or leave a chosen architecture only as
22
+ unchecked notes in a task checklist.
23
+
24
+ Good: capture investigation as `research` first when options are still open.
25
+ When the choice is made, create or update a `decision` (`adr`) with context,
26
+ alternatives, and consequences, then `--related` the research and the task.
27
+
28
+ ```bash
29
+ pnpm taskset document create adr --title "Use transactional outbox" --related <task-id> --related <research-id>
30
+ ```
31
+
32
+ ## Runbook Versus Checklist
33
+
34
+ Bad: discover a recovery procedure during an incident-fix task and leave the
35
+ steps as a one-off checklist that disappears when the task closes.
36
+
37
+ Good: create a `runbook` with symptoms, checks, actions, rollback, and
38
+ verification, keep it `active`, and relate it to the task that produced it.
39
+
40
+ ```bash
41
+ pnpm taskset document create runbook --title "Recover consumer lag" --related <task-id>
42
+ ```
43
+
44
+ ## Keep Scratch In The Task
45
+
46
+ Bad: create a research document for “rename helper and re-run tests”.
47
+
48
+ Good: keep tiny execution steps as checklist items on the task. Use documents
49
+ only when another person or future agent would reuse the material outside that
50
+ task’s completion.
51
+
52
+ ## Story Or Flow Versus Implementation Task
53
+
54
+ Bad: model “Member signs in via SSO” only as an implementation task with no
55
+ acceptance context.
56
+
57
+ Good: keep the user outcome in a `story` or journey in a `flow`, then create
58
+ implementation tasks that `--related` that document and carry the code work.
59
+
60
+ ```bash
61
+ pnpm taskset document create story --title "Member signs in via SSO"
62
+ pnpm taskset task create --title "Add SSO callback handler" --related <story-id> --file packages/api/src/auth.ts
63
+ ```
@@ -0,0 +1,125 @@
1
+ # Monorepo Task-Modeling Examples
2
+
3
+ Use these examples after inspecting the repository's actual workspace, package manifests, task runner, Taskset projects, and release configuration. Names and commands shown here are illustrative.
4
+
5
+ ## Reason Across the Package Graph
6
+
7
+ Prompt: “Add a task risk value to the CLI.” The CLI consumes core APIs and shared contracts.
8
+
9
+ Bad: create one CLI-only task scoped to `packages/cli` without checking where the data type and persistence behavior live.
10
+
11
+ Good: trace the capability through the workspace graph and model the outcomes that actually need separate tracking:
12
+
13
+ ```text
14
+ Define risk contract → persist/query risk in core → expose risk in CLI
15
+ ```
16
+
17
+ - Scope the contract task to the contracts package.
18
+ - Make the core task depend on the contract task if it needs the finalized type.
19
+ - Make the CLI task depend on the core capability when it cannot be completed against an agreed interface or mock.
20
+ - Relate rather than block tasks that can proceed independently against a stable contract.
21
+ - Validate the changed packages and their consumers, not just the CLI directory named in the prompt.
22
+
23
+ Do not copy the package graph directly into Taskset. For example, the CLI package depending on contracts does not make every CLI task depend on every contracts task.
24
+
25
+ ## Atomic Cross-Package Capability
26
+
27
+ Bad: create separate tasks for a two-line contract update, its core implementation, its CLI adapter, the lockfile, and the changeset even though one owner will deliver and review them together.
28
+
29
+ Good: use one task when all edits form one atomic user-facing capability:
30
+
31
+ ```markdown
32
+ Expose task risk filters through the public contract, core query API, and CLI.
33
+
34
+ ## Scope
35
+
36
+ - `@taskset/contracts`: define the filter field
37
+ - `@taskset/core`: apply the filter in task queries
38
+ - `@taskset/cli`: accept and serialize the option
39
+
40
+ ## Checklist
41
+
42
+ - [ ] Update the shared contract
43
+ - [ ] Implement core filtering
44
+ - [ ] Expose the CLI option
45
+ - [ ] Validate affected packages and dependents
46
+ - [ ] Create and validate the changeset
47
+
48
+ ## Acceptance criteria
49
+
50
+ - Contract, core, and CLI tests pass.
51
+ - Existing callers remain compatible.
52
+ - The changeset describes the coherent public capability and all releasable packages affected.
53
+ ```
54
+
55
+ Attach every established Taskset project and narrow package directory involved. Do not create a standalone lockfile or changeset task for this outcome.
56
+
57
+ ## When to Split Cross-Package Work
58
+
59
+ Bad: keep a migration, backend rollout, and independently deployed web adoption in one task even though they have different owners and the web work is blocked on rollout.
60
+
61
+ Good:
62
+
63
+ - Create a shared contract or migration task.
64
+ - Create an implementation/rollout task with the real prerequisite relationship.
65
+ - Create a consumer task that depends on rollout only if it cannot safely ship first.
66
+ - Give each task its own package scope, acceptance criteria, validation, and Changeset decision.
67
+
68
+ Package boundaries alone do not require splitting. Independent ownership, status, sequencing, deployment, or release meaning do.
69
+
70
+ ## Shared Package Impact
71
+
72
+ Bad: modify a shared package and validate only that package because its local tests pass.
73
+
74
+ Good: identify direct and transitive consumers, then record focused plus downstream validation. In a Turborepo workspace, a task might include:
75
+
76
+ ```bash
77
+ pnpm exec turbo run test --filter=...@taskset/contracts
78
+ pnpm exec turbo run build --filter=...@taskset/contracts
79
+ ```
80
+
81
+ Choose filter direction from the intended check: dependencies of a package and dependents of a package are different sets. Use the repository's supported commands and verify filters before putting them into a task body. Use `--affected` when branch-diff semantics match the task and its configured base branch.
82
+
83
+ ## Root Configuration Versus Package Work
84
+
85
+ Bad: put package-specific build logic in the root task merely because the repository is a monorepo, or add manual `cd package && build` chains to enforce ordering.
86
+
87
+ Good: keep scripts and implementation in the owning packages, declare workspace dependencies in package manifests, and let the task runner derive ordering. Scope a Taskset task to root files such as `turbo.json` or the workspace manifest only when orchestration, package discovery, shared inputs, or global policy truly changes.
88
+
89
+ For Turborepo, written scripts and CI should use `turbo run`; package dependencies must be declared for `^build` ordering to work.
90
+
91
+ ## Add a New Workspace Package
92
+
93
+ Bad: create a task that says only “Add package” and consider it complete when a directory exists.
94
+
95
+ Good: include the relevant repository integration points:
96
+
97
+ ```markdown
98
+ Add the publishable `@acme/events` workspace package.
99
+
100
+ ## Checklist
101
+
102
+ - [ ] Create the package manifest and public exports
103
+ - [ ] Register or verify workspace discovery
104
+ - [ ] Declare internal dependencies through workspace protocols
105
+ - [ ] Add package-local build, test, and type-check scripts
106
+ - [ ] Verify task-runner pipeline participation and cache outputs
107
+ - [ ] Add focused tests and consumer integration coverage
108
+ - [ ] Document intended consumers and package boundaries
109
+ - [ ] Create and validate the required changeset
110
+
111
+ ## Acceptance criteria
112
+
113
+ - The package is resolved by the workspace package manager.
114
+ - Its declared pipeline tasks run through the repository task runner.
115
+ - Consumers import public exports rather than package internals.
116
+ - Affected builds and tests pass.
117
+ ```
118
+
119
+ Only include publishing and Changesets requirements when the package is releasable under repository policy.
120
+
121
+ ## Unexpected Cross-Package Scope
122
+
123
+ Bad: begin an app-only task, discover that a shared package must change, silently expand the implementation, and leave the original task metadata, validation, and changeset plan untouched.
124
+
125
+ Good: reassess whether the shared change remains atomic. Update the current task's projects, paths, acceptance criteria, downstream validation, and Changeset section when it does. If it becomes an independently deliverable prerequisite or needs another owner, create a linked task and set the real dependency direction before proceeding.