tasknotes-spec 0.2.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 (53) hide show
  1. package/00-overview.md +172 -0
  2. package/01-terminology.md +156 -0
  3. package/02-model-and-mapping.md +288 -0
  4. package/03-temporal-semantics.md +290 -0
  5. package/04-recurrence.md +398 -0
  6. package/05-operations.md +968 -0
  7. package/06-validation.md +267 -0
  8. package/07-conformance.md +292 -0
  9. package/08-compatibility-and-migrations.md +188 -0
  10. package/09-configuration.md +837 -0
  11. package/10-dependencies-and-reminders.md +266 -0
  12. package/11-links.md +373 -0
  13. package/CHANGELOG.md +25 -0
  14. package/README.md +80 -0
  15. package/conformance/README.md +31 -0
  16. package/conformance/adapters/mdbase-tasknotes.adapter.mjs +141 -0
  17. package/conformance/adapters/tasknotes-core/conformance.ts +2498 -0
  18. package/conformance/adapters/tasknotes-core/create-compat.ts +1 -0
  19. package/conformance/adapters/tasknotes-core/date.ts +12 -0
  20. package/conformance/adapters/tasknotes-core/field-mapping.ts +14 -0
  21. package/conformance/adapters/tasknotes-core/recurrence.ts +10 -0
  22. package/conformance/adapters/tasknotes-date-bridge.ts +20 -0
  23. package/conformance/adapters/tasknotes-runtime-bridge.ts +1107 -0
  24. package/conformance/adapters/tasknotes-runtime-obsidian-shim.ts +84 -0
  25. package/conformance/adapters/tasknotes-templating-bridge.ts +13 -0
  26. package/conformance/adapters/tasknotes.adapter.mjs +485 -0
  27. package/conformance/docs/ADAPTER_CONTRACT.md +245 -0
  28. package/conformance/docs/FIXTURE_FORMAT.md +247 -0
  29. package/conformance/docs/RUNNER_GUIDE.md +393 -0
  30. package/conformance/fixtures/config-schema.json +634 -0
  31. package/conformance/fixtures/config.json +18984 -0
  32. package/conformance/fixtures/conformance.json +444 -0
  33. package/conformance/fixtures/create-compat.json +18639 -0
  34. package/conformance/fixtures/date.json +25612 -0
  35. package/conformance/fixtures/dependencies.json +8647 -0
  36. package/conformance/fixtures/field-mapping.json +5406 -0
  37. package/conformance/fixtures/links.json +1127 -0
  38. package/conformance/fixtures/migrations.json +668 -0
  39. package/conformance/fixtures/operations.json +2761 -0
  40. package/conformance/fixtures/recurrence.json +22958 -0
  41. package/conformance/fixtures/reminders.json +13333 -0
  42. package/conformance/fixtures/templating.json +497 -0
  43. package/conformance/fixtures/validation.json +5308 -0
  44. package/conformance/lib/adapter-loader.mjs +23 -0
  45. package/conformance/lib/load-fixtures.mjs +43 -0
  46. package/conformance/lib/matchers.mjs +200 -0
  47. package/conformance/manifest.json +232 -0
  48. package/conformance/scripts/generate-fixtures.mjs +5239 -0
  49. package/conformance/scripts/package-fixtures.mjs +101 -0
  50. package/conformance/tests/coverage.test.mjs +213 -0
  51. package/conformance/tests/runner.test.mjs +102 -0
  52. package/conformance/tests/tasknotes-runtime-routing.test.mjs +64 -0
  53. package/package.json +49 -0
@@ -0,0 +1,634 @@
1
+ [
2
+ {
3
+ "id": "config_schema.0001",
4
+ "section": "§9.2.3",
5
+ "profile": "core-lite",
6
+ "operation": "config.provider_behavior",
7
+ "assertion": "envelope_error",
8
+ "requires": [
9
+ "config-lite"
10
+ ],
11
+ "input": {
12
+ "mode": "strict",
13
+ "providersReadable": false,
14
+ "hasRequiredKeys": false,
15
+ "shouldFail": true
16
+ },
17
+ "expect": {
18
+ "error": {
19
+ "$regex": "configuration|required effective keys|strict"
20
+ }
21
+ }
22
+ },
23
+ {
24
+ "id": "config_schema.0002",
25
+ "section": "§9.2.3",
26
+ "profile": "core-lite",
27
+ "operation": "config.provider_behavior",
28
+ "assertion": "envelope_equals",
29
+ "requires": [
30
+ "config-lite"
31
+ ],
32
+ "input": {
33
+ "mode": "permissive",
34
+ "providersReadable": false,
35
+ "hasRequiredKeys": false,
36
+ "shouldFail": false
37
+ },
38
+ "expect": {
39
+ "ok": true,
40
+ "result": {
41
+ "value": "accepted"
42
+ }
43
+ }
44
+ },
45
+ {
46
+ "id": "config_schema.0003",
47
+ "section": "§9.2.3",
48
+ "profile": "core-lite",
49
+ "operation": "config.provider_behavior",
50
+ "assertion": "envelope_equals",
51
+ "requires": [
52
+ "config-lite"
53
+ ],
54
+ "input": {
55
+ "mode": "strict",
56
+ "providersReadable": true,
57
+ "hasRequiredKeys": true,
58
+ "shouldFail": false
59
+ },
60
+ "expect": {
61
+ "ok": true,
62
+ "result": {
63
+ "value": "accepted"
64
+ }
65
+ }
66
+ },
67
+ {
68
+ "id": "config_schema.0004",
69
+ "section": "§9",
70
+ "profile": "core-lite",
71
+ "operation": "config.validate_schema",
72
+ "assertion": "envelope_equals",
73
+ "requires": [
74
+ "config-lite"
75
+ ],
76
+ "input": {
77
+ "value": {
78
+ "mode": "strict",
79
+ "reject_unknown_fields": false
80
+ },
81
+ "kind": "validation"
82
+ },
83
+ "expect": {
84
+ "ok": true,
85
+ "result": {
86
+ "value": "valid"
87
+ }
88
+ }
89
+ },
90
+ {
91
+ "id": "config_schema.0005",
92
+ "section": "§9",
93
+ "profile": "core-lite",
94
+ "operation": "config.validate_schema",
95
+ "assertion": "envelope_equals",
96
+ "requires": [
97
+ "config-lite"
98
+ ],
99
+ "input": {
100
+ "value": {
101
+ "storage": "frontmatter",
102
+ "filename_format": "custom",
103
+ "custom_filename_template": "{{title}}"
104
+ },
105
+ "kind": "title"
106
+ },
107
+ "expect": {
108
+ "ok": true,
109
+ "result": {
110
+ "value": "valid"
111
+ }
112
+ }
113
+ },
114
+ {
115
+ "id": "config_schema.0006",
116
+ "section": "§9",
117
+ "profile": "core-lite",
118
+ "operation": "config.validate_schema",
119
+ "assertion": "envelope_equals",
120
+ "requires": [
121
+ "config-lite"
122
+ ],
123
+ "input": {
124
+ "value": {
125
+ "enabled": true,
126
+ "template_path": "Templates/Task.md",
127
+ "failure_mode": "warning_fallback",
128
+ "unknown_variable_policy": "preserve"
129
+ },
130
+ "kind": "templating"
131
+ },
132
+ "expect": {
133
+ "ok": true,
134
+ "result": {
135
+ "value": "valid"
136
+ }
137
+ }
138
+ },
139
+ {
140
+ "id": "config_schema.0007",
141
+ "section": "§9",
142
+ "profile": "core-lite",
143
+ "operation": "config.validate_schema",
144
+ "assertion": "envelope_equals",
145
+ "requires": [
146
+ "config-lite"
147
+ ],
148
+ "input": {
149
+ "value": {
150
+ "date_only_anchor_time": "09:30",
151
+ "apply_defaults_when_explicit": false
152
+ },
153
+ "kind": "reminders"
154
+ },
155
+ "expect": {
156
+ "ok": true,
157
+ "result": {
158
+ "value": "valid"
159
+ }
160
+ }
161
+ },
162
+ {
163
+ "id": "config_schema.0008",
164
+ "section": "§9",
165
+ "profile": "core-lite",
166
+ "operation": "config.validate_schema",
167
+ "assertion": "envelope_equals",
168
+ "requires": [
169
+ "config-lite"
170
+ ],
171
+ "input": {
172
+ "value": {
173
+ "auto_stop_on_complete": true,
174
+ "auto_stop_notification": false
175
+ },
176
+ "kind": "time_tracking"
177
+ },
178
+ "expect": {
179
+ "ok": true,
180
+ "result": {
181
+ "value": "valid"
182
+ }
183
+ }
184
+ },
185
+ {
186
+ "id": "config_schema.0009",
187
+ "section": "§9",
188
+ "profile": "core-lite",
189
+ "operation": "config.validate_schema",
190
+ "assertion": "envelope_equals",
191
+ "requires": [
192
+ "config-lite"
193
+ ],
194
+ "input": {
195
+ "value": {
196
+ "values": [
197
+ "open",
198
+ "done"
199
+ ],
200
+ "default": "open",
201
+ "completed_values": [
202
+ "done"
203
+ ]
204
+ },
205
+ "kind": "status"
206
+ },
207
+ "expect": {
208
+ "ok": true,
209
+ "result": {
210
+ "value": "valid"
211
+ }
212
+ }
213
+ },
214
+ {
215
+ "id": "config_schema.0010",
216
+ "section": "§9",
217
+ "profile": "core-lite",
218
+ "operation": "config.validate_schema",
219
+ "assertion": "envelope_equals",
220
+ "requires": [
221
+ "config-lite"
222
+ ],
223
+ "input": {
224
+ "value": {
225
+ "method": "tag",
226
+ "tag": "task",
227
+ "combine": "or"
228
+ },
229
+ "kind": "task_detection"
230
+ },
231
+ "expect": {
232
+ "ok": true,
233
+ "result": {
234
+ "value": "valid"
235
+ }
236
+ }
237
+ },
238
+ {
239
+ "id": "config_schema.0011",
240
+ "section": "§9",
241
+ "profile": "core-lite",
242
+ "operation": "config.validate_schema",
243
+ "assertion": "envelope_equals",
244
+ "requires": [
245
+ "config-lite"
246
+ ],
247
+ "input": {
248
+ "value": {
249
+ "default_reltype": "FINISHTOSTART",
250
+ "unresolved_target_severity": "warning"
251
+ },
252
+ "kind": "dependencies"
253
+ },
254
+ "expect": {
255
+ "ok": true,
256
+ "result": {
257
+ "value": "valid"
258
+ }
259
+ }
260
+ },
261
+ {
262
+ "id": "config_schema.0012",
263
+ "section": "§9",
264
+ "profile": "core-lite",
265
+ "operation": "config.validate_schema",
266
+ "assertion": "envelope_equals",
267
+ "requires": [
268
+ "config-lite"
269
+ ],
270
+ "input": {
271
+ "value": {
272
+ "extensions": [
273
+ ".md"
274
+ ],
275
+ "unresolved_default_severity": "warning"
276
+ },
277
+ "kind": "links"
278
+ },
279
+ "expect": {
280
+ "ok": true,
281
+ "result": {
282
+ "value": "valid"
283
+ }
284
+ }
285
+ },
286
+ {
287
+ "id": "config_schema.0013",
288
+ "section": "§9.19",
289
+ "profile": "core-lite",
290
+ "operation": "config.validate_schema",
291
+ "assertion": "envelope_error",
292
+ "requires": [
293
+ "config-lite"
294
+ ],
295
+ "input": {
296
+ "kind": "validation",
297
+ "value": {
298
+ "mode": "invalid"
299
+ },
300
+ "regex": "validation.mode|unsupported"
301
+ },
302
+ "expect": {
303
+ "error": {
304
+ "$regex": "validation.mode|unsupported"
305
+ }
306
+ }
307
+ },
308
+ {
309
+ "id": "config_schema.0014",
310
+ "section": "§9.19",
311
+ "profile": "core-lite",
312
+ "operation": "config.validate_schema",
313
+ "assertion": "envelope_error",
314
+ "requires": [
315
+ "config-lite"
316
+ ],
317
+ "input": {
318
+ "kind": "title",
319
+ "value": {
320
+ "storage": "invalid"
321
+ },
322
+ "regex": "title.storage|invalid"
323
+ },
324
+ "expect": {
325
+ "error": {
326
+ "$regex": "title.storage|invalid"
327
+ }
328
+ }
329
+ },
330
+ {
331
+ "id": "config_schema.0015",
332
+ "section": "§9.19",
333
+ "profile": "core-lite",
334
+ "operation": "config.validate_schema",
335
+ "assertion": "envelope_error",
336
+ "requires": [
337
+ "config-lite"
338
+ ],
339
+ "input": {
340
+ "kind": "title",
341
+ "value": {
342
+ "storage": "frontmatter",
343
+ "filename_format": "custom"
344
+ },
345
+ "regex": "custom_filename_template"
346
+ },
347
+ "expect": {
348
+ "error": {
349
+ "$regex": "custom_filename_template"
350
+ }
351
+ }
352
+ },
353
+ {
354
+ "id": "config_schema.0016",
355
+ "section": "§9.19",
356
+ "profile": "core-lite",
357
+ "operation": "config.validate_schema",
358
+ "assertion": "envelope_error",
359
+ "requires": [
360
+ "config-lite"
361
+ ],
362
+ "input": {
363
+ "kind": "templating",
364
+ "value": {
365
+ "enabled": true,
366
+ "template_path": ""
367
+ },
368
+ "regex": "templating.template_path|missing"
369
+ },
370
+ "expect": {
371
+ "error": {
372
+ "$regex": "templating.template_path|missing"
373
+ }
374
+ }
375
+ },
376
+ {
377
+ "id": "config_schema.0017",
378
+ "section": "§9.19",
379
+ "profile": "core-lite",
380
+ "operation": "config.validate_schema",
381
+ "assertion": "envelope_error",
382
+ "requires": [
383
+ "config-lite"
384
+ ],
385
+ "input": {
386
+ "kind": "templating",
387
+ "value": {
388
+ "enabled": true,
389
+ "template_path": "x",
390
+ "failure_mode": "bad"
391
+ },
392
+ "regex": "templating.failure_mode|invalid"
393
+ },
394
+ "expect": {
395
+ "error": {
396
+ "$regex": "templating.failure_mode|invalid"
397
+ }
398
+ }
399
+ },
400
+ {
401
+ "id": "config_schema.0018",
402
+ "section": "§9.19",
403
+ "profile": "core-lite",
404
+ "operation": "config.validate_schema",
405
+ "assertion": "envelope_error",
406
+ "requires": [
407
+ "config-lite"
408
+ ],
409
+ "input": {
410
+ "kind": "templating",
411
+ "value": {
412
+ "enabled": true,
413
+ "template_path": "x",
414
+ "unknown_variable_policy": "bad"
415
+ },
416
+ "regex": "templating.unknown_variable_policy|invalid"
417
+ },
418
+ "expect": {
419
+ "error": {
420
+ "$regex": "templating.unknown_variable_policy|invalid"
421
+ }
422
+ }
423
+ },
424
+ {
425
+ "id": "config_schema.0019",
426
+ "section": "§9.19",
427
+ "profile": "core-lite",
428
+ "operation": "config.validate_schema",
429
+ "assertion": "envelope_error",
430
+ "requires": [
431
+ "config-lite"
432
+ ],
433
+ "input": {
434
+ "kind": "reminders",
435
+ "value": {
436
+ "date_only_anchor_time": "24:10"
437
+ },
438
+ "regex": "reminders.date_only_anchor_time|invalid"
439
+ },
440
+ "expect": {
441
+ "error": {
442
+ "$regex": "reminders.date_only_anchor_time|invalid"
443
+ }
444
+ }
445
+ },
446
+ {
447
+ "id": "config_schema.0020",
448
+ "section": "§9.19",
449
+ "profile": "core-lite",
450
+ "operation": "config.validate_schema",
451
+ "assertion": "envelope_error",
452
+ "requires": [
453
+ "config-lite"
454
+ ],
455
+ "input": {
456
+ "kind": "time_tracking",
457
+ "value": {
458
+ "auto_stop_on_complete": "yes"
459
+ },
460
+ "regex": "time_tracking.auto_stop_on_complete|invalid"
461
+ },
462
+ "expect": {
463
+ "error": {
464
+ "$regex": "time_tracking.auto_stop_on_complete|invalid"
465
+ }
466
+ }
467
+ },
468
+ {
469
+ "id": "config_schema.0021",
470
+ "section": "§9.19",
471
+ "profile": "core-lite",
472
+ "operation": "config.validate_schema",
473
+ "assertion": "envelope_error",
474
+ "requires": [
475
+ "config-lite"
476
+ ],
477
+ "input": {
478
+ "kind": "time_tracking",
479
+ "value": {
480
+ "auto_stop_notification": "no"
481
+ },
482
+ "regex": "time_tracking.auto_stop_notification|invalid"
483
+ },
484
+ "expect": {
485
+ "error": {
486
+ "$regex": "time_tracking.auto_stop_notification|invalid"
487
+ }
488
+ }
489
+ },
490
+ {
491
+ "id": "config_schema.0022",
492
+ "section": "§9.19",
493
+ "profile": "core-lite",
494
+ "operation": "config.validate_schema",
495
+ "assertion": "envelope_error",
496
+ "requires": [
497
+ "config-lite"
498
+ ],
499
+ "input": {
500
+ "kind": "status",
501
+ "value": {
502
+ "values": [
503
+ "open",
504
+ "done"
505
+ ],
506
+ "default": "todo",
507
+ "completed_values": [
508
+ "done"
509
+ ]
510
+ },
511
+ "regex": "status.default|values"
512
+ },
513
+ "expect": {
514
+ "error": {
515
+ "$regex": "status.default|values"
516
+ }
517
+ }
518
+ },
519
+ {
520
+ "id": "config_schema.0023",
521
+ "section": "§9.19",
522
+ "profile": "core-lite",
523
+ "operation": "config.validate_schema",
524
+ "assertion": "envelope_error",
525
+ "requires": [
526
+ "config-lite"
527
+ ],
528
+ "input": {
529
+ "kind": "status",
530
+ "value": {
531
+ "values": [
532
+ "open",
533
+ "done"
534
+ ],
535
+ "default": "open",
536
+ "completed_values": []
537
+ },
538
+ "regex": "status.completed_values|non-empty"
539
+ },
540
+ "expect": {
541
+ "error": {
542
+ "$regex": "status.completed_values|non-empty"
543
+ }
544
+ }
545
+ },
546
+ {
547
+ "id": "config_schema.0024",
548
+ "section": "§9.19",
549
+ "profile": "core-lite",
550
+ "operation": "config.validate_schema",
551
+ "assertion": "envelope_error",
552
+ "requires": [
553
+ "config-lite"
554
+ ],
555
+ "input": {
556
+ "kind": "task_detection",
557
+ "value": {
558
+ "combine": "xor"
559
+ },
560
+ "regex": "task_detection.combine|invalid"
561
+ },
562
+ "expect": {
563
+ "error": {
564
+ "$regex": "task_detection.combine|invalid"
565
+ }
566
+ }
567
+ },
568
+ {
569
+ "id": "config_schema.0025",
570
+ "section": "§9.19",
571
+ "profile": "core-lite",
572
+ "operation": "config.validate_schema",
573
+ "assertion": "envelope_error",
574
+ "requires": [
575
+ "config-lite"
576
+ ],
577
+ "input": {
578
+ "kind": "dependencies",
579
+ "value": {
580
+ "default_reltype": "BLOCKS"
581
+ },
582
+ "regex": "dependencies.default_reltype|invalid"
583
+ },
584
+ "expect": {
585
+ "error": {
586
+ "$regex": "dependencies.default_reltype|invalid"
587
+ }
588
+ }
589
+ },
590
+ {
591
+ "id": "config_schema.0026",
592
+ "section": "§9.19",
593
+ "profile": "core-lite",
594
+ "operation": "config.validate_schema",
595
+ "assertion": "envelope_error",
596
+ "requires": [
597
+ "config-lite"
598
+ ],
599
+ "input": {
600
+ "kind": "dependencies",
601
+ "value": {
602
+ "unresolved_target_severity": "fatal"
603
+ },
604
+ "regex": "dependencies.unresolved_target_severity|invalid"
605
+ },
606
+ "expect": {
607
+ "error": {
608
+ "$regex": "dependencies.unresolved_target_severity|invalid"
609
+ }
610
+ }
611
+ },
612
+ {
613
+ "id": "config_schema.0027",
614
+ "section": "§9.19",
615
+ "profile": "core-lite",
616
+ "operation": "config.validate_schema",
617
+ "assertion": "envelope_error",
618
+ "requires": [
619
+ "config-lite"
620
+ ],
621
+ "input": {
622
+ "kind": "links",
623
+ "value": {
624
+ "unresolved_default_severity": "fatal"
625
+ },
626
+ "regex": "links.unresolved_default_severity|invalid"
627
+ },
628
+ "expect": {
629
+ "error": {
630
+ "$regex": "links.unresolved_default_severity|invalid"
631
+ }
632
+ }
633
+ }
634
+ ]