@yaks/task 0.0.0-stage → 0.2.36

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 (68) hide show
  1. package/DecisionForm.js +118 -0
  2. package/DecisionForm.js.map +1 -0
  3. package/DecisionForm.ts +211 -0
  4. package/LICENSE +202 -0
  5. package/README.md +389 -2
  6. package/_dist/DecisionForm.d.ts +25 -0
  7. package/_dist/DecisionForm.d.ts.map +1 -0
  8. package/_dist/comp.d.ts +20 -0
  9. package/_dist/comp.d.ts.map +1 -0
  10. package/_dist/decision.d.ts +41 -0
  11. package/_dist/decision.d.ts.map +1 -0
  12. package/_dist/deps.d.ts +58 -0
  13. package/_dist/deps.d.ts.map +1 -0
  14. package/_dist/graph.d.ts +3 -0
  15. package/_dist/graph.d.ts.map +1 -0
  16. package/_dist/mod.d.ts +71 -0
  17. package/_dist/mod.d.ts.map +1 -0
  18. package/_dist/plugin.d.ts +28 -0
  19. package/_dist/plugin.d.ts.map +1 -0
  20. package/_dist/text.d.ts +5 -0
  21. package/_dist/text.d.ts.map +1 -0
  22. package/_dist/tools.d.ts +20 -0
  23. package/_dist/tools.d.ts.map +1 -0
  24. package/_dist/views.d.ts +6 -0
  25. package/_dist/views.d.ts.map +1 -0
  26. package/_dist/vocab.d.ts +7 -0
  27. package/_dist/vocab.d.ts.map +1 -0
  28. package/_dist/words.d.ts +28 -0
  29. package/_dist/words.d.ts.map +1 -0
  30. package/comp.js +66 -0
  31. package/comp.js.map +1 -0
  32. package/comp.ts +77 -0
  33. package/decision.js +156 -0
  34. package/decision.js.map +1 -0
  35. package/decision.ts +174 -0
  36. package/deno.json +1 -0
  37. package/deps.js +127 -0
  38. package/deps.js.map +1 -0
  39. package/deps.ts +163 -0
  40. package/graph.js +9 -0
  41. package/graph.js.map +1 -0
  42. package/graph.ts +10 -0
  43. package/inspect.js +131 -0
  44. package/inspect.js.map +1 -0
  45. package/inspect.ts +144 -0
  46. package/mod.js +71 -0
  47. package/mod.js.map +1 -0
  48. package/mod.ts +83 -0
  49. package/package.json +53 -4
  50. package/plugin.js +46 -0
  51. package/plugin.js.map +1 -0
  52. package/plugin.ts +40 -0
  53. package/text.js +22 -0
  54. package/text.js.map +1 -0
  55. package/text.ts +30 -0
  56. package/tools.js +303 -0
  57. package/tools.js.map +1 -0
  58. package/tools.ts +282 -0
  59. package/views.js +35 -0
  60. package/views.js.map +1 -0
  61. package/views.ts +39 -0
  62. package/vocab.js +18 -0
  63. package/vocab.js.map +1 -0
  64. package/vocab.json +860 -0
  65. package/vocab.ts +20 -0
  66. package/words.js +46 -0
  67. package/words.js.map +1 -0
  68. package/words.ts +57 -0
package/vocab.json ADDED
@@ -0,0 +1,860 @@
1
+ {
2
+ "$id": "urn:uuid:5a9bfb85-c15f-4167-9de5-ffc8ef86a06c",
3
+ "$vocabulary": {
4
+ "https://yak.sh/vocab/core": true,
5
+ "https://yak.sh/vocab/id": true,
6
+ "https://yak.sh/vocab/edge": true,
7
+ "https://yak.sh/vocab/blob": true,
8
+ "https://yak.sh/vocab/kernel": true
9
+ },
10
+ "title": "task",
11
+ "$defs": {
12
+ "accept": {
13
+ "$id": "urn:uuid:27039c57-9725-424a-a94b-a79becdbd84c",
14
+ "component": true,
15
+ "type": "object",
16
+ "properties": {
17
+ "body": {
18
+ "$id": "urn:uuid:1eb66fd6-7efc-4a41-baee-d6bf4ed4bd5b",
19
+ "type": "string",
20
+ "store": "blob",
21
+ "description": "the conditions, in prose"
22
+ }
23
+ },
24
+ "description": "what finishing this means — written when the work is asked for, not after"
25
+ },
26
+ "blocked": {
27
+ "$id": "urn:uuid:5db71c1a-e774-405d-9724-08e22455308c",
28
+ "component": true,
29
+ "type": "object",
30
+ "description": "something outside the graph is in the way. Not a status: a blocked task is still open work.",
31
+ "properties": {
32
+ "on": {
33
+ "$id": "urn:uuid:a8ec2593-cf9b-4af4-88b7-806fce191eeb",
34
+ "type": "string",
35
+ "description": "what it is waiting on, in words"
36
+ },
37
+ "since": {
38
+ "$id": "urn:uuid:30b0890c-09bf-48e8-bf9e-64b3b9ed99af",
39
+ "type": "string",
40
+ "format": "date-time",
41
+ "stamped": true
42
+ }
43
+ }
44
+ },
45
+ "started": {
46
+ "$id": "urn:uuid:88f4a8e8-a09c-45e7-bc6a-5292bc87c8f0",
47
+ "component": true,
48
+ "type": "object",
49
+ "description": "the mark on a task somebody said they are working on: a person's wip, where a session's is its claim",
50
+ "properties": {
51
+ "at": {
52
+ "$id": "urn:uuid:74dec5c7-6d72-457a-b15d-3f2f85c113d2",
53
+ "type": "string",
54
+ "format": "date-time",
55
+ "description": "when it was started",
56
+ "stamped": true
57
+ },
58
+ "by": {
59
+ "$id": "urn:uuid:33ba2622-55d3-4e4e-90f6-fc79e56bfa84",
60
+ "type": "string",
61
+ "ref": "entity",
62
+ "death": "keep",
63
+ "description": "who started it — kept as history when that entity is deleted",
64
+ "stamped": true
65
+ },
66
+ "via": {
67
+ "$id": "urn:uuid:b9083ee2-9469-449e-8994-376560ffc9e9",
68
+ "type": "string",
69
+ "ref": "entity",
70
+ "death": "keep",
71
+ "stamped": true,
72
+ "description": "what the write came in through — the session or client that made it"
73
+ }
74
+ }
75
+ },
76
+ "contains": {
77
+ "$id": "urn:uuid:60bb43e3-fd78-4fa5-a4cd-81609da61bc2",
78
+ "component": true,
79
+ "type": "object",
80
+ "edge": "contains",
81
+ "reversed": "contained by",
82
+ "description": "that task is part of this one",
83
+ "properties": {}
84
+ },
85
+ "requires": {
86
+ "$id": "urn:uuid:3290cf06-32d5-4037-996f-3b6972ec1fd4",
87
+ "component": true,
88
+ "type": "object",
89
+ "edge": "requires",
90
+ "reversed": "required by",
91
+ "description": "this task waits for that one",
92
+ "properties": {}
93
+ },
94
+ "task": {
95
+ "$id": "urn:uuid:c1a80ff2-0ba3-450f-8931-993669a0a1f3",
96
+ "component": true,
97
+ "type": "object",
98
+ "governed": true,
99
+ "description": "a thing to do",
100
+ "status": {
101
+ "cancelled": "cancelled",
102
+ "completed": "done",
103
+ "started": "wip",
104
+ "default": "open"
105
+ },
106
+ "properties": {}
107
+ },
108
+ "task_new": {
109
+ "tool": true,
110
+ "destructive": false,
111
+ "noun": "task",
112
+ "verb": "new",
113
+ "title": "Create a task",
114
+ "step": {
115
+ "doing": "Adding to its to-do list…",
116
+ "done": "Added to its to-do list"
117
+ },
118
+ "description": "Create one task or atomic batch. Rows inherit filing; id ($name), parent and requires connect trees/dependencies. check previews without saving. Returns applied bundles.",
119
+ "input": {
120
+ "title": {
121
+ "type": "string",
122
+ "description": "Short, one-line summary of the work."
123
+ },
124
+ "body": {
125
+ "type": "string",
126
+ "description": "Full request and details as Markdown. Include the original words when filing a task from a message.",
127
+ "short": "b"
128
+ },
129
+ "project": {
130
+ "type": "string",
131
+ "ref": "project",
132
+ "description": "Project: its id (P-3), #… handle, eid or exact title (\"Card box\"); a space/app path names no project.",
133
+ "short": "p"
134
+ },
135
+ "priority": {
136
+ "type": "number",
137
+ "description": "Queue order; lower is more urgent."
138
+ },
139
+ "assignee": {
140
+ "type": "string",
141
+ "ref": "entity",
142
+ "description": "Assignee: a person or agent by id (U-4), #… handle, eid or exact name."
143
+ },
144
+ "domain": {
145
+ "type": "string",
146
+ "description": "Area of work."
147
+ },
148
+ "check": {
149
+ "type": "boolean",
150
+ "description": "Preview without saving."
151
+ },
152
+ "accept": {
153
+ "type": [
154
+ "string",
155
+ "null"
156
+ ],
157
+ "description": "Completion conditions; null clears."
158
+ },
159
+ "blocked": {
160
+ "type": [
161
+ "string",
162
+ "null"
163
+ ],
164
+ "description": "External obstacle; null clears."
165
+ },
166
+ "parent": {
167
+ "type": "string",
168
+ "description": "Containing entity id, or $id in tasks."
169
+ },
170
+ "requires": {
171
+ "type": "array",
172
+ "items": {
173
+ "type": "string"
174
+ },
175
+ "description": "Prerequisite ids, including $ids in tasks."
176
+ },
177
+ "tasks": {
178
+ "type": "array",
179
+ "minItems": 1,
180
+ "items": {
181
+ "type": "object",
182
+ "properties": {
183
+ "id": {
184
+ "type": "string",
185
+ "pattern": "^\\$",
186
+ "description": "Local $name for sibling links; optional."
187
+ },
188
+ "title": {
189
+ "type": "string"
190
+ },
191
+ "body": {
192
+ "type": "string"
193
+ },
194
+ "project": {
195
+ "type": "string",
196
+ "ref": "project",
197
+ "description": "Project: its id (P-3), #… handle, eid or exact title (\"Card box\"); a space/app path names no project."
198
+ },
199
+ "priority": {
200
+ "type": "number"
201
+ },
202
+ "assignee": {
203
+ "type": "string",
204
+ "ref": "entity"
205
+ },
206
+ "domain": {
207
+ "type": "string"
208
+ },
209
+ "accept": {
210
+ "type": [
211
+ "string",
212
+ "null"
213
+ ]
214
+ },
215
+ "blocked": {
216
+ "type": [
217
+ "string",
218
+ "null"
219
+ ]
220
+ },
221
+ "parent": {
222
+ "type": "string"
223
+ },
224
+ "requires": {
225
+ "type": "array",
226
+ "items": {
227
+ "type": "string"
228
+ }
229
+ }
230
+ },
231
+ "required": [
232
+ "title"
233
+ ],
234
+ "additionalProperties": false
235
+ },
236
+ "description": "Tasks to create together; shared top-level fields are defaults."
237
+ }
238
+ },
239
+ "positional": [
240
+ "title",
241
+ "body"
242
+ ]
243
+ },
244
+ "task_list": {
245
+ "tool": true,
246
+ "noun": "task",
247
+ "verb": "list",
248
+ "title": "List tasks",
249
+ "step": {
250
+ "doing": "Checking its to-do list…",
251
+ "done": "Checked its to-do list"
252
+ },
253
+ "description": "Return whole tasks matching query, always narrowed by .task. Without a query, selects .task.status=open. Filters use .component.property=value; bare words search text.",
254
+ "input": {
255
+ "query": {
256
+ "type": "string",
257
+ "description": "Query narrowed by .task."
258
+ },
259
+ "limit": {
260
+ "type": "number",
261
+ "description": "Maximum results.",
262
+ "short": "n"
263
+ }
264
+ },
265
+ "watch": [
266
+ ".task",
267
+ ["%{query}", ".task.status=open"],
268
+ ".limit=%{limit}",
269
+ "*"
270
+ ],
271
+ "readOnly": true,
272
+ "positional": [
273
+ "query"
274
+ ]
275
+ },
276
+ "task_update": {
277
+ "tool": true,
278
+ "destructive": false,
279
+ "noun": "task",
280
+ "verb": "update",
281
+ "title": "Update a task",
282
+ "step": {
283
+ "doing": "Updating this task…",
284
+ "done": "Updated this task",
285
+ "by": {
286
+ "status": {
287
+ "done": {
288
+ "doing": "Marking this task done…",
289
+ "done": "Marked this task done"
290
+ }
291
+ }
292
+ }
293
+ },
294
+ "description": "Patch one task or atomic updates; rows inherit top-level fields. Omitted fields stay; null clears. status writes started/completion/cancellation marks. requires links the task to prerequisites it waits for. edit replaces, appends or prepends body text with a concurrency guard; body with was checks the supplied read token. Returns applied bundles.",
295
+ "input": {
296
+ "task": {
297
+ "type": "string",
298
+ "ref": "task",
299
+ "description": "Task: its id (T-12), #… handle, eid or exact title."
300
+ },
301
+ "status": {
302
+ "type": "string",
303
+ "enum": [
304
+ "open",
305
+ "wip",
306
+ "done",
307
+ "cancelled"
308
+ ],
309
+ "description": "Resulting status.",
310
+ "short": "s"
311
+ },
312
+ "title": {
313
+ "type": [
314
+ "string",
315
+ "null"
316
+ ],
317
+ "description": "Replacement title."
318
+ },
319
+ "body": {
320
+ "type": [
321
+ "string",
322
+ "null"
323
+ ],
324
+ "description": "Replacement body, as Markdown: steps a numbered list, several items a bulleted list."
325
+ },
326
+ "was": {
327
+ "type": [
328
+ "string",
329
+ "null"
330
+ ],
331
+ "description": "Read token from task_list or graph_show at $was.doc.body; body refuses if changed since that read."
332
+ },
333
+ "project": {
334
+ "type": [
335
+ "string",
336
+ "null"
337
+ ],
338
+ "ref": "project",
339
+ "description": "Project: its id (P-3), #… handle, eid or exact title (\"Card box\"); a space/app path names no project.",
340
+ "short": "p"
341
+ },
342
+ "priority": {
343
+ "type": [
344
+ "number",
345
+ "null"
346
+ ],
347
+ "description": "Queue order; lower is more urgent."
348
+ },
349
+ "assignee": {
350
+ "type": [
351
+ "string",
352
+ "null"
353
+ ],
354
+ "ref": "entity",
355
+ "description": "Assignee: a person or agent by id (U-4), #… handle, eid or exact name."
356
+ },
357
+ "domain": {
358
+ "type": [
359
+ "string",
360
+ "null"
361
+ ],
362
+ "description": "Area of work."
363
+ },
364
+ "accept": {
365
+ "type": [
366
+ "string",
367
+ "null"
368
+ ],
369
+ "description": "Completion conditions; null clears."
370
+ },
371
+ "blocked": {
372
+ "type": [
373
+ "string",
374
+ "null"
375
+ ],
376
+ "description": "External obstacle; null clears."
377
+ },
378
+ "requires": {
379
+ "type": "array",
380
+ "items": {
381
+ "type": "string"
382
+ },
383
+ "description": "Prerequisite ids: each becomes a requires link from the task, which waits for them."
384
+ },
385
+ "reason": {
386
+ "type": [
387
+ "string",
388
+ "null"
389
+ ],
390
+ "description": "Why the task is cancelled; pass it with status cancelled."
391
+ },
392
+ "edit": {
393
+ "type": "object",
394
+ "properties": {
395
+ "find": {
396
+ "type": "string"
397
+ },
398
+ "replace": {
399
+ "type": "string"
400
+ },
401
+ "append": {
402
+ "type": "string"
403
+ },
404
+ "prepend": {
405
+ "type": "string"
406
+ },
407
+ "all": {
408
+ "type": "boolean"
409
+ },
410
+ "was": {
411
+ "type": [
412
+ "string",
413
+ "null"
414
+ ]
415
+ }
416
+ },
417
+ "additionalProperties": false,
418
+ "description": "Edit doc.body; find must match once unless all. Append/prepend are literal."
419
+ },
420
+ "updates": {
421
+ "type": "array",
422
+ "minItems": 1,
423
+ "items": {
424
+ "type": "object",
425
+ "properties": {
426
+ "task": {
427
+ "type": "string",
428
+ "ref": "task",
429
+ "description": "Task: its id (T-12), #… handle, eid or exact title."
430
+ },
431
+ "status": {
432
+ "type": "string",
433
+ "enum": [
434
+ "open",
435
+ "wip",
436
+ "done",
437
+ "cancelled"
438
+ ]
439
+ },
440
+ "title": {
441
+ "type": [
442
+ "string",
443
+ "null"
444
+ ]
445
+ },
446
+ "body": {
447
+ "type": [
448
+ "string",
449
+ "null"
450
+ ]
451
+ },
452
+ "was": {
453
+ "type": [
454
+ "string",
455
+ "null"
456
+ ]
457
+ },
458
+ "project": {
459
+ "type": [
460
+ "string",
461
+ "null"
462
+ ],
463
+ "ref": "project",
464
+ "description": "Project: its id (P-3), #… handle, eid or exact title (\"Card box\"); a space/app path names no project."
465
+ },
466
+ "priority": {
467
+ "type": [
468
+ "number",
469
+ "null"
470
+ ]
471
+ },
472
+ "assignee": {
473
+ "type": [
474
+ "string",
475
+ "null"
476
+ ],
477
+ "ref": "entity"
478
+ },
479
+ "domain": {
480
+ "type": [
481
+ "string",
482
+ "null"
483
+ ]
484
+ },
485
+ "accept": {
486
+ "type": [
487
+ "string",
488
+ "null"
489
+ ]
490
+ },
491
+ "blocked": {
492
+ "type": [
493
+ "string",
494
+ "null"
495
+ ]
496
+ },
497
+ "requires": {
498
+ "type": "array",
499
+ "items": {
500
+ "type": "string"
501
+ }
502
+ },
503
+ "reason": {
504
+ "type": [
505
+ "string",
506
+ "null"
507
+ ]
508
+ },
509
+ "edit": {
510
+ "type": "object",
511
+ "properties": {
512
+ "find": {
513
+ "type": "string"
514
+ },
515
+ "replace": {
516
+ "type": "string"
517
+ },
518
+ "append": {
519
+ "type": "string"
520
+ },
521
+ "prepend": {
522
+ "type": "string"
523
+ },
524
+ "all": {
525
+ "type": "boolean"
526
+ },
527
+ "was": {
528
+ "type": [
529
+ "string",
530
+ "null"
531
+ ]
532
+ }
533
+ },
534
+ "additionalProperties": false
535
+ }
536
+ },
537
+ "required": [
538
+ "task"
539
+ ],
540
+ "additionalProperties": false
541
+ },
542
+ "description": "Per-task patches; top-level fields supply defaults."
543
+ }
544
+ },
545
+ "idempotent": true,
546
+ "positional": [
547
+ "task",
548
+ "status"
549
+ ]
550
+ },
551
+ "shows": {
552
+ "$id": "urn:uuid:4f5dd093-a1a2-40e8-a4e7-b89a487c4705",
553
+ "component": true,
554
+ "type": "object",
555
+ "edge": "shows",
556
+ "reversed": "shown in",
557
+ "description": "this decision presents that entity under one of its choices: an image, prose, or a page such as a draft of an app",
558
+ "properties": {
559
+ "choice": {
560
+ "$id": "urn:uuid:6857bdf6-1e39-4fe5-8999-394d07fd8f09",
561
+ "type": "string",
562
+ "minLength": 1,
563
+ "description": "The label of the choice that presents it."
564
+ }
565
+ },
566
+ "required": [
567
+ "choice"
568
+ ]
569
+ },
570
+ "decision": {
571
+ "$id": "urn:uuid:c9d19446-9a71-4d45-b316-fe3b83234617",
572
+ "component": true,
573
+ "type": "object",
574
+ "description": "A task asking a question, with choices and the asker’s recommendation. Open work requiring it makes it blocking; no such edge makes it eventual.",
575
+ "properties": {
576
+ "question": {
577
+ "$id": "urn:uuid:b3e277ec-f00e-43d1-9a69-8156d027929c",
578
+ "type": "string",
579
+ "minLength": 1,
580
+ "search": true
581
+ },
582
+ "choices": {
583
+ "$id": "urn:uuid:f565248e-ccda-470d-b97e-1ef4628aeb0a",
584
+ "type": "array",
585
+ "minItems": 2,
586
+ "maxItems": 4,
587
+ "items": {
588
+ "type": "object",
589
+ "properties": {
590
+ "label": {
591
+ "type": "string",
592
+ "minLength": 1
593
+ },
594
+ "description": {
595
+ "type": "string",
596
+ "minLength": 1
597
+ }
598
+ },
599
+ "required": [
600
+ "label",
601
+ "description"
602
+ ],
603
+ "additionalProperties": false
604
+ },
605
+ "description": "Two to four choices, each a label and a line saying what it means."
606
+ },
607
+ "recommended": {
608
+ "$id": "urn:uuid:bebf0d40-8279-4600-8672-5e56f0c64417",
609
+ "type": "string",
610
+ "description": "The label of the choice the asker recommends."
611
+ }
612
+ }
613
+ },
614
+ "decision_new": {
615
+ "tool": true,
616
+ "destructive": false,
617
+ "noun": "decision",
618
+ "verb": "new",
619
+ "title": "Ask a decision",
620
+ "step": {
621
+ "doing": "Asking you to decide…",
622
+ "done": "Asked you to decide"
623
+ },
624
+ "description": "Ask a task question with 2–4 choices and a recommended label; a choice may show an image, prose or a draft by its id. Assign the person being asked. Requiring work waits for its answer. Returns applied bundles.",
625
+ "input": {
626
+ "question": {
627
+ "type": "string",
628
+ "minLength": 1
629
+ },
630
+ "choices": {
631
+ "type": "array",
632
+ "minItems": 2,
633
+ "maxItems": 4,
634
+ "items": {
635
+ "type": "object",
636
+ "properties": {
637
+ "label": {
638
+ "type": "string",
639
+ "minLength": 1
640
+ },
641
+ "description": {
642
+ "type": "string",
643
+ "minLength": 1
644
+ },
645
+ "shows": {
646
+ "type": "string",
647
+ "minLength": 1,
648
+ "description": "Id of an entity the choice presents, drawn beside it: an image (an artifact), prose (a doc), or a page (a draft of an app)."
649
+ }
650
+ },
651
+ "required": [
652
+ "label",
653
+ "description"
654
+ ],
655
+ "additionalProperties": false
656
+ },
657
+ "description": "Each choice has a label and a description, and may show an entity."
658
+ },
659
+ "recommended": {
660
+ "type": "string"
661
+ },
662
+ "project": {
663
+ "type": "string",
664
+ "ref": "project",
665
+ "description": "Project: its id (P-3), #… handle, eid or exact title (\"Card box\"); a space/app path names no project."
666
+ },
667
+ "priority": {
668
+ "type": "number",
669
+ "description": "Queue order; lower is more urgent."
670
+ },
671
+ "assignee": {
672
+ "type": "string",
673
+ "ref": "entity",
674
+ "description": "Assignee: a person or agent by id (U-4), #… handle, eid or exact name."
675
+ },
676
+ "domain": {
677
+ "type": "string",
678
+ "description": "Area of work."
679
+ }
680
+ },
681
+ "required": [
682
+ "question",
683
+ "choices",
684
+ "recommended"
685
+ ],
686
+ "positional": [
687
+ "question"
688
+ ]
689
+ },
690
+ "decision_answer": {
691
+ "tool": true,
692
+ "destructive": false,
693
+ "noun": "decision",
694
+ "verb": "answer",
695
+ "title": "Answer a decision",
696
+ "step": {
697
+ "doing": "Answering a question…",
698
+ "done": "Answered a question"
699
+ },
700
+ "description": "Answer with a listed choice’s label or your own words. Records decided{choice} attributed to the caller, completes the task, and releases work requiring it. An answered or cancelled decision refuses another answer. Returns applied bundles.",
701
+ "input": {
702
+ "decision": {
703
+ "type": "string",
704
+ "ref": "decision",
705
+ "description": "Decision task: its id (T-12), #… handle, eid or exact title."
706
+ },
707
+ "choice": {
708
+ "type": "string",
709
+ "minLength": 1,
710
+ "description": "A listed label or a custom answer."
711
+ },
712
+ "by": {
713
+ "type": "string",
714
+ "ref": "entity",
715
+ "description": "Person whose explicit answer is recorded."
716
+ }
717
+ },
718
+ "required": [
719
+ "decision",
720
+ "choice"
721
+ ],
722
+ "positional": [
723
+ "decision",
724
+ "choice"
725
+ ]
726
+ },
727
+ "decision_record": {
728
+ "tool": true,
729
+ "destructive": false,
730
+ "noun": "decision",
731
+ "verb": "record",
732
+ "title": "Record a decision you made",
733
+ "step": {
734
+ "doing": "Noting a choice…",
735
+ "done": "Noted a choice"
736
+ },
737
+ "description": "Record a choice you made yourself between 2–4 options, the one you took and why, so it can be read later beside the work it shaped. It asks nobody, is answered as yours, and is done at once. Returns applied bundles.",
738
+ "input": {
739
+ "question": {
740
+ "type": "string",
741
+ "minLength": 1,
742
+ "description": "What was chosen, as a question: “How does the game look?”"
743
+ },
744
+ "choices": {
745
+ "type": "array",
746
+ "minItems": 2,
747
+ "maxItems": 4,
748
+ "items": {
749
+ "type": "object",
750
+ "properties": {
751
+ "label": {
752
+ "type": "string",
753
+ "minLength": 1
754
+ },
755
+ "description": {
756
+ "type": "string",
757
+ "minLength": 1
758
+ },
759
+ "shows": {
760
+ "type": "string",
761
+ "minLength": 1,
762
+ "description": "Id of an entity the choice presents, drawn beside it: an image (an artifact), prose (a doc), or a page (a draft of an app)."
763
+ }
764
+ },
765
+ "required": [
766
+ "label",
767
+ "description"
768
+ ],
769
+ "additionalProperties": false
770
+ },
771
+ "description": "The options you weighed, each a label and a line saying what it means."
772
+ },
773
+ "chose": {
774
+ "type": "string",
775
+ "minLength": 1,
776
+ "description": "The label of the option you took."
777
+ },
778
+ "why": {
779
+ "type": "string",
780
+ "minLength": 1,
781
+ "description": "Why you took it, in a line."
782
+ },
783
+ "project": {
784
+ "type": "string",
785
+ "ref": "project",
786
+ "description": "Project: its id (P-3), #… handle, eid or exact title (\"Card box\"); a space/app path names no project."
787
+ }
788
+ },
789
+ "required": [
790
+ "question",
791
+ "choices",
792
+ "chose",
793
+ "why"
794
+ ],
795
+ "positional": [
796
+ "question"
797
+ ]
798
+ },
799
+ "decision_answered": {
800
+ "rule": true,
801
+ "match": ".task .decision .decided !cancelled, +!completed",
802
+ "description": "An answered decision finishes its task, so work requiring it can proceed."
803
+ }
804
+ },
805
+ "kinds": {
806
+ "task": {
807
+ "$id": "urn:uuid:c1a80ff2-0ba3-450f-8931-993669a0a1f3",
808
+ "description": "a thing to do",
809
+ "with": {
810
+ "doc": true
811
+ },
812
+ "before": [
813
+ "claim"
814
+ ],
815
+ "prefix": "T",
816
+ "examples": [
817
+ {
818
+ "task": {},
819
+ "doc": {
820
+ "title": "Name the decision kind",
821
+ "body": "A task carrying a decision"
822
+ }
823
+ }
824
+ ]
825
+ },
826
+ "decision": {
827
+ "$id": "urn:uuid:0752fc4c-be85-4d55-8f02-8958ea829d09",
828
+ "description": "a question somebody answers: a task carrying the choices and the asker’s recommendation",
829
+ "is": [
830
+ "task",
831
+ "decision"
832
+ ],
833
+ "with": {
834
+ "doc": true
835
+ },
836
+ "examples": [
837
+ {
838
+ "task": {},
839
+ "decision": {
840
+ "question": "Which name?",
841
+ "choices": [
842
+ {
843
+ "label": "decision",
844
+ "description": "the word the tools use"
845
+ },
846
+ {
847
+ "label": "question",
848
+ "description": "what it asks"
849
+ }
850
+ ],
851
+ "recommended": "decision"
852
+ },
853
+ "doc": {
854
+ "title": "Which name?"
855
+ }
856
+ }
857
+ ]
858
+ }
859
+ }
860
+ }