@taskset/cli 6.0.0 → 6.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,107 @@
1
+ ---
2
+ title: Track security and compliance in Taskset
3
+ description: Model ADR programs, audits, residual risk, and continuous inventories with concerns, lessons, and program rollups.
4
+ contentType: How-to
5
+ navLabel: Security Tracking
6
+ ---
7
+
8
+ # Track security and compliance in Taskset
9
+
10
+ Use Taskset’s operational memory kinds for security programs without a second tracker.
11
+
12
+ ## Model
13
+
14
+ | Artifact | Kind | Role |
15
+ | --- | --- | --- |
16
+ | Program root | Parent task (optional `program` label/project) | Rollup + closeout owner |
17
+ | Workstreams | Child tasks | Independently trackable delivery |
18
+ | Design choices | `decision` / `adr` | Lasting accepted choices |
19
+ | Spot checks | `audit` | Inventory / matrix pass-fail evidence |
20
+ | Residual risk | `concern` | Living open-risk register |
21
+ | Recurring failure modes | `lesson` | Prevent rediscovery |
22
+
23
+ ## Create a concern
24
+
25
+ ```bash
26
+ taskset document create concern \
27
+ --title "Telegram capability must not grant CASL" \
28
+ --class authz \
29
+ --cadence on-release \
30
+ --label security \
31
+ --directory apps/bot \
32
+ --related <task-id> \
33
+ --json
34
+ ```
35
+
36
+ Concern statuses:
37
+
38
+ - open work → `draft` / `ready` / `active`
39
+ - mitigated or formally accepted → `accepted`
40
+ - replaced → `superseded`
41
+ - retired → `archived`
42
+
43
+ ## Create a lesson
44
+
45
+ ```bash
46
+ taskset document create lesson \
47
+ --title "Capability flags are enablement only" \
48
+ --severity high \
49
+ --related-skill .agents/skills/security/SKILL.md \
50
+ --pack security \
51
+ --related <concern-or-task-id> \
52
+ --json
53
+ ```
54
+
55
+ When `--related-skill` is present, agents should update that skill in the same change. Taskset stores the evidence and pattern; it does not auto-edit the skill.
56
+
57
+ ## Audits
58
+
59
+ Prefer the `audit` kind for structured inventories:
60
+
61
+ ```bash
62
+ taskset document create audit --title "Public route inventory" --related <program-task-id> --json
63
+ ```
64
+
65
+ Template covers scope, method, findings (`pass` | `fail` | `residual`), residual items, required follow-ups, and next due date.
66
+
67
+ ## Program health and closeout
68
+
69
+ ```bash
70
+ taskset task program <parent-id> --json
71
+ taskset doctor --json
72
+ ```
73
+
74
+ Optional closeout gates in `taskset.config.ts` (default off):
75
+
76
+ ```typescript
77
+ import { defineConfig } from '@taskset/cli'
78
+
79
+ export default defineConfig({
80
+ closeout: {
81
+ enforceChildCompletion: true,
82
+ blockDoneWithOpenConcerns: true,
83
+ requireLessonWhenLabeled: ['requires-lesson'],
84
+ },
85
+ taxonomy: {
86
+ labels: ['security', 'trust-boundary', 'public-ingress', 'authz', 'concurrency'],
87
+ projects: ['platform', 'bot'],
88
+ concernClasses: ['security', 'privacy', 'authz', 'concurrency', 'ops', 'compliance'],
89
+ mode: 'error',
90
+ },
91
+ doctor: {
92
+ activeConcernRequiresOwner: true,
93
+ staleResearchDays: 14,
94
+ },
95
+ })
96
+ ```
97
+
98
+ ## Example label set
99
+
100
+ Reuse stable taxonomy instead of inventing labels each task:
101
+
102
+ - `trust-boundary`
103
+ - `public-ingress`
104
+ - `authz`
105
+ - `concurrency`
106
+ - `adr-NNNN` (link-style labels for named ADRs)
107
+ - `requires-lesson` (closeout gate trigger when configured)
@@ -7,7 +7,7 @@ navLabel: Task Files
7
7
 
8
8
  # Understand Taskset task files
9
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.
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, runbooks, lessons, concerns, and audits](document-types.md) when the surrounding memory should stay durable. For multi-task programs, use `taskset task program <parent-id> --json`.
11
11
 
12
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
13
 
@@ -0,0 +1,59 @@
1
+ ---
2
+ title: Control Taskset taxonomy
3
+ description: Allowlists for labels, projects, and concern classes with doctor enforcement.
4
+ contentType: How-to
5
+ navLabel: Taxonomy Cookbook
6
+ ---
7
+
8
+ # Control Taskset taxonomy
9
+
10
+ Without allowlists, Taskset accepts any trimmed label, project, or concern class from the built-in concern vocabulary. Configure allowlists when discovery drift becomes expensive.
11
+
12
+ ## Config
13
+
14
+ ```typescript
15
+ import { defineConfig } from '@taskset/cli'
16
+
17
+ export default defineConfig({
18
+ taxonomy: {
19
+ labels: [
20
+ 'security',
21
+ 'trust-boundary',
22
+ 'public-ingress',
23
+ 'authz',
24
+ 'concurrency',
25
+ 'requires-lesson',
26
+ 'program',
27
+ ],
28
+ projects: ['platform', 'bot', 'wallet'],
29
+ concernClasses: ['security', 'privacy', 'authz', 'concurrency', 'ops', 'compliance', 'money'],
30
+ mode: 'error', // or 'warn'
31
+ },
32
+ })
33
+ ```
34
+
35
+ Rules:
36
+
37
+ - Empty / omitted allowlists keep permissive behavior.
38
+ - `concernClasses` values must be from the canonical set: `security`, `privacy`, `money`, `authz`, `concurrency`, `ops`, `compliance`, `other`.
39
+ - `mode: 'error'` rejects create/update mutations with unknown values and fails doctor.
40
+ - `mode: 'warn'` allows mutations; doctor reports `unknown-taxonomy` warnings and still exits `0` when no errors exist.
41
+
42
+ ## Example security taxonomy
43
+
44
+ | Label / class | Use for |
45
+ | --- | --- |
46
+ | `trust-boundary` | Cross-plane trust assumptions |
47
+ | `public-ingress` | Unauthenticated or internet-facing entry |
48
+ | `authz` | Authorization grants and checks |
49
+ | `concurrency` | Race / idempotency hazards |
50
+ | `adr-NNNN` | Work tied to a named ADR |
51
+ | `requires-lesson` | Closeout must produce a related `lesson` when closeout config enables it |
52
+
53
+ ## Doctor
54
+
55
+ ```bash
56
+ taskset doctor --json
57
+ ```
58
+
59
+ Look for `unknown-taxonomy`, `missing-template-heading`, `missing-reference`, `closeout-gap`, `missing-owner`, and `stale-research` diagnostics.
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@taskset/cli",
3
3
  "type": "module",
4
4
  "private": false,
5
- "version": "6.0.0",
5
+ "version": "6.1.0",
6
6
  "description": "CLI for Taskset: plan, research, decide, operate, and track repository work as Markdown.",
7
7
  "license": "MIT",
8
8
  "author": {
@@ -46,8 +46,8 @@
46
46
  },
47
47
  "dependencies": {
48
48
  "zod": "4.6.5",
49
- "@taskset/contracts": "6.0.0",
50
- "@taskset/core": "6.0.0"
49
+ "@taskset/core": "6.1.0",
50
+ "@taskset/contracts": "6.1.0"
51
51
  },
52
52
  "devDependencies": {
53
53
  "@types/node": "^26.6.3",
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: taskset
3
- description: Taskset workflow guidance for agents that plan, research, decide, operate, and track delivery with stories, flows, research, decisions, runbooks, and tasks stored in .taskset/, including batch imports and cross-package monorepo work. While executing work, agents must create follow-up tasks or subtasks (Taskset child tasks or body checklist items) for newly discovered work, keep parent and subtask progress current mid-work, mark every finished subtask done or checked, create Taskset documents (research, decision, runbook, story, or flow) when work produces reusable evidence, lasting choices, or procedures, link them with --related, and update the session or repository primary skill when lasting lessons should prevent future failures.
3
+ description: Taskset workflow guidance for agents that plan, research, decide, operate, and track delivery with stories, flows, research, decisions, runbooks, lessons, concerns, audits, and tasks stored in .taskset/, including batch imports and cross-package monorepo work. While executing work, agents must create follow-up tasks or subtasks (Taskset child tasks or body checklist items) for newly discovered work, keep parent and subtask progress current mid-work, mark every finished subtask done or checked, create Taskset documents (research, decision, runbook, story, flow, lesson, concern, or audit) when work produces reusable evidence, lasting choices, procedures, recurring patterns, or residual risks, link them with --related, and update the session or repository primary skill when lasting lessons should prevent future failures (especially when a lesson declares --related-skill).
4
4
  ---
5
5
 
6
6
  # Taskset
@@ -18,8 +18,8 @@ treat those paths as the detailed offline reference set:
18
18
  | `node_modules/@taskset/cli/skills/taskset/SKILL.md` | This skill (agent workflow for tasks and documents) |
19
19
  | `node_modules/@taskset/cli/skills/taskset/references/` | Task modeling, document modeling, monorepo, and Changesets examples |
20
20
  | `node_modules/@taskset/cli/skills/taskset-implement/` | Engineering standards used while developing Taskset itself |
21
- | `node_modules/@taskset/cli/docs/` | Human docs: getting started, configuration, CLI reference, task files, document types |
22
- | `node_modules/@taskset/cli/docs/agents/` | Agent docs: workflows, command contracts, discovery index |
21
+ | `node_modules/@taskset/cli/docs/` | Human docs: getting started, configuration, CLI reference, task files, document types, memory model, closeout, taxonomy |
22
+ | `node_modules/@taskset/cli/docs/agents/` | Agent docs: workflows, command contracts, query recipes, discovery index |
23
23
  | `node_modules/@taskset/cli/docs/maintainers/` | Architecture, ADRs, testing, and maintainer workflows |
24
24
 
25
25
  In the Taskset repository itself, prefer the workspace copies at `skills/` and
@@ -28,13 +28,16 @@ In the Taskset repository itself, prefer the workspace copies at `skills/` and
28
28
  under `node_modules/@taskset/cli/` before inventing workflow or command
29
29
  behavior. Useful deep links from an installed package:
30
30
 
31
- - CLI contracts: `node_modules/@taskset/cli/docs/cli-reference.md`
32
- - Document kinds and commands: `node_modules/@taskset/cli/docs/document-types.md`
33
- - Task file shape: `node_modules/@taskset/cli/docs/task-files.md`
34
- - Task modeling examples: `node_modules/@taskset/cli/skills/taskset/references/task-modeling-examples.md`
35
- - Document modeling examples: `node_modules/@taskset/cli/skills/taskset/references/document-modeling-examples.md`
36
- - Monorepo modeling: `node_modules/@taskset/cli/skills/taskset/references/monorepo-task-modeling.md`
37
- - Changesets examples: `node_modules/@taskset/cli/skills/taskset/references/changesets-examples.md`
31
+ - CLI contracts: [`docs/cli-reference.md`](../../docs/cli-reference.md) (installed: `node_modules/@taskset/cli/docs/cli-reference.md`)
32
+ - Document kinds: [`docs/document-types.md`](../../docs/document-types.md)
33
+ - Memory model: [`docs/memory-model.md`](../../docs/memory-model.md)
34
+ - Query recipes: [`docs/agents/query-recipes.md`](../../docs/agents/query-recipes.md)
35
+ - Agent closeout: [`docs/agent-closeout.md`](../../docs/agent-closeout.md)
36
+ - Task file shape: [`docs/task-files.md`](../../docs/task-files.md)
37
+ - Task modeling examples: [references/task-modeling-examples.md](references/task-modeling-examples.md)
38
+ - Document modeling examples: [references/document-modeling-examples.md](references/document-modeling-examples.md)
39
+ - Monorepo modeling: [references/monorepo-task-modeling.md](references/monorepo-task-modeling.md)
40
+ - Changesets examples: [references/changesets-examples.md](references/changesets-examples.md)
38
41
 
39
42
  Relative links inside the packaged skill still resolve against the packaged
40
43
  `docs/` and `skills/` trees because both directories sit at the `@taskset/cli`
@@ -55,8 +58,8 @@ package root.
55
58
  require `pnpm taskset`.
56
59
  - 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.
57
60
  - 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.
58
- - While executing a task, agents MUST create a Taskset document in the same change when work produces reusable evidence (`research`), a lasting choice (`decision` / `adr`), an operational procedure (`runbook`), or durable product context (`story` / `flow`). Link the document and originating task with `--related`. Do not leave that material only in chat, memory, or a closed task body. Short scratch notes and one-off checklist steps stay in the task body.
59
- - 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.
61
+ - 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`), durable product context (`story` / `flow`), a recurring mistake or correct pattern (`lesson`), an open residual risk (`concern`), or structured spot-check evidence (`audit`). 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.
62
+ - 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—create a `lesson` document and update that primary skill (and its relevant references) in the same change so the failure is not rediscovered later. If the lesson uses `--related-skill`, update those skill paths in the same change. Prefer skills for lasting how-to; prefer research/decision documents for what was learned or chosen; prefer `lesson` for recurring incorrect/correct patterns. Taskset never auto-edits skills. Do not leave durable guidance only in a closed task body or chat transcript.
60
63
 
61
64
  ## Recommended Workflow
62
65
 
@@ -93,11 +96,15 @@ taskset task list --search "multiple terms" --json
93
96
  taskset task list --file packages/core --impact --json
94
97
  taskset document create story --title "Describe the user outcome"
95
98
  taskset document create research --title "Evaluate options" --related your_task_id_here
99
+ taskset document create lesson --title "Capability flags are enablement only" --severity high --related your_task_id_here
100
+ taskset document create concern --title "Open authz residual risk" --class authz --related your_task_id_here
96
101
  taskset document update your_document_id_here --status ready --type research
97
102
  taskset document list research --search "queue" --impact --json
103
+ taskset document list concern --directory apps/foo --status active --json
98
104
  taskset document show your_document_id_here --type research --include-derived --json
99
105
  taskset document import docs/adr/0001-example.md --type adr --move
100
106
  taskset document batch taskset-documents.json --concurrency 4 --json
107
+ taskset task program your_parent_task_id_here --json
101
108
  taskset sync --json
102
109
  ```
103
110
 
@@ -119,13 +126,16 @@ taskset sync --json
119
126
  status, update, and delete commands as tasks. Document statuses remain
120
127
  `draft`, `ready`, `active`, `accepted`, `superseded`, and `archived`.
121
128
  - Use `document create` for stories, flows, decisions (`decision`, `adr`, and
122
- `dr` are aliases), research, and runbooks. Use `document import` to preserve
123
- an existing Markdown body in canonical frontmatter; add `--move` only when
124
- the source should be removed after a successful canonical write.
129
+ `dr` are aliases), research, runbooks, lessons (`antipattern` alias),
130
+ concerns, and audits. Use `document import` to preserve an existing Markdown
131
+ body in canonical frontmatter; add `--move` only when the source should be
132
+ removed after a successful canonical write.
125
133
  - Pick the kind by purpose: stories capture user value and acceptance criteria;
126
134
  flows describe journeys and failure variants; decisions preserve rationale
127
135
  and consequences; research records evidence and recommendations; runbooks
128
- make repeatable operations and recovery safe.
136
+ make repeatable operations and recovery safe; lessons capture recurring
137
+ incorrect/correct patterns; concerns track open residual risk; audits store
138
+ structured inventory or spot-check evidence.
129
139
  - Use `document batch <manifest.json>` for repeatable multi-document create,
130
140
  import, update, and export jobs. Progress belongs on stderr and `--json`
131
141
  output on stdout. Use `sync` after upgrades to ensure canonical directories,
@@ -135,12 +145,14 @@ taskset sync --json
135
145
  - Disposable metadata indexes live beside each entity folder
136
146
  (`.taskset/tasks/.generated/`, `.taskset/stories/.generated/`, and the other
137
147
  document-kind folders), not under a global `.taskset/generated/`.
138
- - New task and document IDs are immutable 5-6 character lowercase hex values
139
- such as `a1b2c3`. Filenames use `{sequence}-{slug}-{id}.md`. Agents MUST
140
- reference the short `id` in commands, relationships, and handoffs—never the
141
- mutable filename sequence prefix. Use `sync` or `task migrate-ids` for legacy
142
- repositories; do not rename entity files by hand because canonical
143
- relationships must be rewritten together.
148
+ - New task and document IDs are immutable 5-6 character lowercase hex values
149
+ such as `a1b2c3`. Filenames use `{sequence}-{slug}-{id}.md`. Agents MUST use
150
+ the short `id` in commands, frontmatter relationships, and JSON
151
+ handoffs—never the mutable filename sequence prefix alone. When linking to
152
+ the file in Markdown prose, use the full repository-relative filepath so the
153
+ link is clickable. Use `sync` or `task migrate-ids` for legacy repositories;
154
+ do not rename entity files by hand because canonical relationships must be
155
+ rewritten together.
144
156
  - When a task change affects repository behavior, follow up with the relevant tests, docs, and `git diff --check`.
145
157
 
146
158
  ## Task Modeling
@@ -171,24 +183,27 @@ For multi-task prompts or uncertainty about task granularity and relationships,
171
183
 
172
184
  ## Document Modeling
173
185
 
174
- - Prefer the five document kinds that already exist. Do not invent notes, specs,
186
+ - Prefer the document kinds that already exist. Do not invent notes, specs,
175
187
  epics, or RFCs as new kinds: investigation is `research`, lasting choices are
176
- `decision`, product context is `story` or `flow`, and recovery procedures are
177
- `runbook`. Keep short scratch in the task body.
188
+ `decision`, product context is `story` or `flow`, recovery procedures are
189
+ `runbook`, recurring mistakes are `lesson`, residual risks are `concern`, and
190
+ spot-check inventories are `audit`. Keep short scratch in the task body.
178
191
  - Search existing documents before creating new ones. Update or `--related` a
179
192
  matching document instead of duplicating it.
180
- - Create documents mid-work as soon as the evidence, decision, or procedure is
181
- clear enough to reuse. Link both sides with `--related` to the originating
182
- task when practical.
183
- - Status habits: start research and stories as `draft`; move them to `ready` or
184
- `accepted` when the recommendation or criteria stabilize; record decided ADRs
185
- as `accepted` (the create default); keep usable runbooks `active`.
193
+ - Create documents mid-work as soon as the evidence, decision, procedure,
194
+ lesson, or risk is clear enough to reuse. Link both sides with `--related` to
195
+ the originating task when practical.
196
+ - Status habits: start research, stories, and audits as `draft`; move them to
197
+ `ready` or `accepted` when they stabilize; record decided ADRs as `accepted`
198
+ (the create default); keep usable runbooks, lessons, and open concerns
199
+ `active`; move mitigated concerns to `accepted` and obsolete lessons to
200
+ `superseded` or `archived`.
186
201
  - Attach owner, assignees, labels, projects, files, and directories when they help
187
202
  discovery the same way they do on tasks. Use `--depends-on` and `--parent`
188
203
  only for real document-to-document prerequisites within Taskset documents.
189
204
  - Do not dump raw research into a primary skill. Capture the evidence in a
190
- research document, the choice in a decision document, and only the lasting
191
- how-to in the skill.
205
+ research document, the choice in a decision document, the recurring pattern in
206
+ a lesson, and only the lasting how-to in the skill.
192
207
 
193
208
  For paired good and bad examples, read [document-modeling examples](references/document-modeling-examples.md).
194
209
 
@@ -227,14 +242,18 @@ For paired examples of required, multi-package, and unnecessary changesets, read
227
242
  - Read the task and the surrounding repository context first.
228
243
  - Before mutating or executing a task, compare its owner and assignees with the current Git user and obtain confirmation when another person is responsible.
229
244
  - 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.
230
- - While executing, create research, decision, runbook, story, or flow documents for reusable evidence, lasting choices, procedures, or product context; link them with `--related`.
231
- - 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.
232
- - 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.
245
+ - While executing, create research, decision, runbook, story, flow, lesson, concern, or audit documents for reusable evidence, lasting choices, procedures, product context, recurring patterns, or residual risks; link them with `--related`.
246
+ - 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. Use `taskset task program <parent-id> --json` for multi-task program health.
247
+ - When lasting lessons emerge, create a `lesson` and update any primary or `--related-skill` skill so future sessions avoid the same tool-choice, bug-fix, repeated-failure, or architecture mistake.
233
248
  - In monorepos, verify affected packages and consumers against the workspace and task-runner graphs rather than relying only on the initially named directory.
234
249
  - In repositories using Changesets, reconcile the task's declared Changeset requirement with the actual affected packages before completion.
235
250
  - Prefer the smallest Taskset command that proves the intended state.
236
- - Cite tasks and documents by their short hex `id` (`a1b2c3`), not by filename
237
- sequence numbers. Use that `id` with `task show`, `task update`, `--related`,
238
- `--depends-on`, and `--parent`.
251
+ - Use short hex `id` values (`a1b2c3`) with `task show`, `task update`,
252
+ `--related`, `--depends-on`, and `--parent`. Filename sequence prefixes are
253
+ display metadata only—never identity and never Markdown link targets.
254
+ - When writing a Markdown hyperlink to a Taskset entity, doc, or skill file,
255
+ use the repository-relative filepath (for example
256
+ `.taskset/lessons/0000001-…-a1b2c3.md` or `docs/memory-model.md`). Inline
257
+ mentions may still show the short `id` for humans and CLI copy-paste.
239
258
  - Avoid editing generated output, caches, or any non-canonical `.taskset/` artifacts.
240
259
  - Report validation failures plainly and only claim success after the command has run.
@@ -12,10 +12,14 @@ Good: create a research document, keep the task focused on the delivery outcome,
12
12
  and link both.
13
13
 
14
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>
15
+ taskset document create research --title "Evaluate queue providers" --related <task-id>
16
+ taskset task update <task-id> --related <research-id>
17
17
  ```
18
18
 
19
+ In Markdown prose, link the created file by filepath (for example
20
+ `.taskset/research/0000001-evaluate-queue-providers-<research-id>.md`), not by
21
+ a bare hex id as the link target.
22
+
19
23
  ## Decision Versus Research
20
24
 
21
25
  Bad: write an ADR before evidence exists, or leave a chosen architecture only as
@@ -61,3 +65,50 @@ implementation tasks that `--related` that document and carry the code work.
61
65
  pnpm taskset document create story --title "Member signs in via SSO"
62
66
  pnpm taskset task create --title "Add SSO callback handler" --related <story-id> --file packages/api/src/auth.ts
63
67
  ```
68
+
69
+ ## Lesson Versus Closed Task Note
70
+
71
+ Bad: rediscover “channel capability ≠ authz grant” in chat after the fixing task
72
+ is already `done`, or paste the pattern only into a skill with no Taskset trail.
73
+
74
+ Good: create a `lesson` with trigger, incorrect pattern, correct pattern,
75
+ severity, prevention, and evidence; relate the originating task/concern; and if
76
+ `--related-skill` is set, update that skill in the same change.
77
+
78
+ ```bash
79
+ pnpm taskset document create lesson \
80
+ --title "Capability flags are enablement only" \
81
+ --severity high \
82
+ --related-skill .agents/skills/security/SKILL.md \
83
+ --related <task-id>
84
+ ```
85
+
86
+ ## Concern Versus ADR Or Runbook
87
+
88
+ Bad: leave residual authz risk as an unfinished checklist forever, or write an
89
+ ADR that only says “still risky” with no review cadence.
90
+
91
+ Good: create a `concern` for living open/residual risk (class, trust boundary,
92
+ evidence, residual risk, mitigation/acceptance, cadence). Use `decision` for the
93
+ chosen design and `runbook` for recovery steps.
94
+
95
+ ```bash
96
+ pnpm taskset document create concern \
97
+ --title "Telegram capability must not grant CASL" \
98
+ --class authz \
99
+ --cadence on-release \
100
+ --related <task-id>
101
+ ```
102
+
103
+ ## Audit Versus Informal Research Dump
104
+
105
+ Bad: paste a route inventory into a research body with no findings status or
106
+ follow-ups.
107
+
108
+ Good: use `audit` for structured spot-checks with scope, method, findings
109
+ (`pass` | `fail` | `residual`), residual items, required follow-ups, and next
110
+ due date.
111
+
112
+ ```bash
113
+ pnpm taskset document create audit --title "Public route inventory" --related <program-task-id>
114
+ ```
@@ -117,12 +117,15 @@ Non-negotiable rules:
117
117
  - Canonical task files use one strict versionless metadata shape. Versioned
118
118
  task frontmatter and unknown fields are rejected.
119
119
  - Canonical supporting documents live in kind-specific `.taskset/` directories:
120
- stories, flows, decisions, research, and runbooks. Use their shared strict
121
- metadata (aligned with task planning, people, path, and relationship fields)
122
- and kind-specific body templates instead of modeling every durable document
123
- as a task. Documents expose the same create, update, status, delete, list
124
- query, search, impact, and derived-relationship operations as tasks, with
125
- document-specific statuses.
120
+ stories, flows, decisions, research, runbooks, lessons, concerns, and audits.
121
+ Use their shared strict metadata (aligned with task planning, people, path,
122
+ and relationship fields), kind-specific optional fields (`severity` /
123
+ `relatedSkills` / `packs` for lessons; `class` / `cadence` for concerns), and
124
+ kind-specific body templates instead of modeling every durable document as a
125
+ task. Documents expose the same create, update, status, delete, list query,
126
+ search, impact, and derived-relationship operations as tasks, with
127
+ document-specific statuses. Optional closeout gates, taxonomy allowlists, and
128
+ `taskset task program` rollups extend delivery without a second tracker.
126
129
  - Document mutations, imports, exports, and batches belong to core. The CLI
127
130
  validates manifests and renders output only. Use TanStack Pacer for bounded
128
131
  heavy batches and migrations, emit count and percentage progress, preserve
@@ -9,7 +9,8 @@ workspace: not only tasks, but the plans, research, decisions, flows, and
9
9
  runbooks that make delivery coherent.
10
10
 
11
11
  It is a Git-native software delivery platform. Stories, flows, decisions,
12
- research, runbooks, and tasks live beside the code as human-readable Markdown.
12
+ research, runbooks, lessons, concerns, audits, and tasks live beside the code as
13
+ human-readable Markdown.
13
14
 
14
15
  Vision: become the Git-native operating system for software delivery.
15
16
 
@@ -30,7 +31,10 @@ Design for:
30
31
  repositories
31
32
 
32
33
  Near-term work should keep the task and supporting-document workflows coherent
33
- before inventing additional entity kinds or investing heavily in new interfaces.
34
+ before inventing freeform kinds (`note`, `rfc`, `epic`, `spec`) or investing
35
+ heavily in new interfaces. Operational memory kinds (`lesson`, `concern`,
36
+ `audit`) are first-class document kinds under the existing document command
37
+ surface.
34
38
 
35
39
  ## Source-of-Truth Model
36
40
 
@@ -50,6 +54,12 @@ Canonical project state lives under `.taskset/`.
50
54
  │ └── .generated/
51
55
  ├── runbooks/
52
56
  │ └── .generated/
57
+ ├── lessons/
58
+ │ └── .generated/
59
+ ├── concerns/
60
+ │ └── .generated/
61
+ ├── audits/
62
+ │ └── .generated/
53
63
  ├── snapshots/
54
64
  └── cache/
55
65
  ```
@@ -9,8 +9,11 @@ Storage, graph, and snapshot rules for canonical repository data.
9
9
  expressions.
10
10
  - Normalize stored code references to repository-relative POSIX paths.
11
11
  - Reject paths that escape the repository or `.taskset/` ownership boundary.
12
- - Keep entity IDs immutable short hex values. Filename display sequences are
13
- mutable maintenance metadata repaired by `sync`; they are not identity.
12
+ - Keep entity IDs immutable short hex values for commands and canonical
13
+ relationships. Filename display sequences are mutable maintenance metadata
14
+ repaired by `sync`; they are not identity. Markdown hyperlinks to entity or
15
+ documentation files must use repository-relative filepaths, not bare hex ids
16
+ or sequence prefixes.
14
17
  - Store one canonical direction for inverse relationships unless the schema
15
18
  explicitly defines otherwise. Derive `blocks` from `dependsOn`, for example,
16
19
  rather than allowing silent divergence.