@agentshouse/mdmodel 0.1.0-c04c0d681d2d4 → 0.1.0-c08b2adadd2fe

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 (143) hide show
  1. package/API.md +150 -110
  2. package/README.md +8 -6
  3. package/dist/definition.d.ts +3 -1
  4. package/dist/definition.d.ts.map +1 -1
  5. package/dist/definition.js +138 -26
  6. package/dist/divide.d.ts.map +1 -1
  7. package/dist/divide.js +5 -4
  8. package/dist/document.d.ts +9 -5
  9. package/dist/document.d.ts.map +1 -1
  10. package/dist/document.js +169 -67
  11. package/dist/event.d.ts +78 -0
  12. package/dist/event.d.ts.map +1 -0
  13. package/dist/event.js +201 -0
  14. package/dist/facts.d.ts +15 -0
  15. package/dist/facts.d.ts.map +1 -0
  16. package/dist/facts.js +41 -0
  17. package/dist/index.d.ts +23 -10
  18. package/dist/index.d.ts.map +1 -1
  19. package/dist/index.js +14 -7
  20. package/dist/kinds.d.ts +18 -0
  21. package/dist/kinds.d.ts.map +1 -0
  22. package/dist/kinds.js +150 -0
  23. package/dist/markdown.d.ts +51 -0
  24. package/dist/markdown.d.ts.map +1 -0
  25. package/dist/markdown.js +271 -0
  26. package/dist/paths.d.ts.map +1 -1
  27. package/dist/paths.js +9 -2
  28. package/dist/pattern.d.ts +10 -0
  29. package/dist/pattern.d.ts.map +1 -0
  30. package/dist/pattern.js +356 -0
  31. package/dist/project.d.ts.map +1 -1
  32. package/dist/project.js +16 -21
  33. package/dist/query/language.d.ts +254 -0
  34. package/dist/query/language.d.ts.map +1 -0
  35. package/dist/query/language.js +620 -0
  36. package/dist/query/match.d.ts +14 -0
  37. package/dist/query/match.d.ts.map +1 -0
  38. package/dist/query/match.js +150 -0
  39. package/dist/query/rows.d.ts +32 -0
  40. package/dist/query/rows.d.ts.map +1 -0
  41. package/dist/query/rows.js +161 -0
  42. package/dist/query/sql.d.ts +39 -0
  43. package/dist/query/sql.d.ts.map +1 -0
  44. package/dist/query/sql.js +285 -0
  45. package/dist/reserved.d.ts +6 -0
  46. package/dist/reserved.d.ts.map +1 -0
  47. package/dist/reserved.js +21 -0
  48. package/dist/schema.d.ts +1 -0
  49. package/dist/schema.d.ts.map +1 -1
  50. package/dist/schema.js +55 -4
  51. package/dist/types.d.ts +19 -1
  52. package/dist/types.d.ts.map +1 -1
  53. package/dist/validate.d.ts +29 -5
  54. package/dist/validate.d.ts.map +1 -1
  55. package/dist/validate.js +327 -161
  56. package/dist/yaml.d.ts.map +1 -1
  57. package/dist/yaml.js +40 -14
  58. package/fixtures/README.md +25 -3
  59. package/fixtures/cases/conditional-section/context.json +1 -0
  60. package/fixtures/cases/conditional-section/expected.json +6 -0
  61. package/fixtures/cases/conditional-section/library/questions/hosting.md +9 -0
  62. package/fixtures/cases/conditional-section/library/questions/payments.md +12 -0
  63. package/fixtures/cases/conditional-section/schema.yaml +14 -0
  64. package/fixtures/cases/lazy-list-item/context.json +1 -0
  65. package/fixtures/cases/lazy-list-item/expected.json +3 -0
  66. package/fixtures/cases/lazy-list-item/library/item.md +8 -0
  67. package/fixtures/cases/lazy-list-item/schema.yaml +3 -0
  68. package/fixtures/cases/link-into-a-reserved-name/context.json +1 -0
  69. package/fixtures/cases/link-into-a-reserved-name/expected.json +5 -0
  70. package/fixtures/cases/link-into-a-reserved-name/library/notes/a.md +6 -0
  71. package/fixtures/cases/link-into-a-reserved-name/schema.yaml +3 -0
  72. package/fixtures/cases/link-into-a-reserved-name-from-an-untyped-document/context.json +1 -0
  73. package/fixtures/cases/link-into-a-reserved-name-from-an-untyped-document/expected.json +5 -0
  74. package/fixtures/cases/link-into-a-reserved-name-from-an-untyped-document/library/notes/b.md +5 -0
  75. package/fixtures/cases/member-on-an-untyped-document/context.json +1 -0
  76. package/fixtures/cases/member-on-an-untyped-document/expected.json +6 -0
  77. package/fixtures/cases/member-on-an-untyped-document/library/note.md +4 -0
  78. package/fixtures/cases/member-on-another-type/context.json +1 -0
  79. package/fixtures/cases/member-on-another-type/expected.json +6 -0
  80. package/fixtures/cases/member-on-another-type/library/note.md +4 -0
  81. package/fixtures/cases/member-on-another-type/schema.yaml +7 -0
  82. package/fixtures/cases/reference-into-a-reserved-name/context.json +1 -0
  83. package/fixtures/cases/reference-into-a-reserved-name/expected.json +6 -0
  84. package/fixtures/cases/reference-into-a-reserved-name/library/notes/a.md +4 -0
  85. package/fixtures/cases/reference-into-a-reserved-name/library/settings/brief.md +1 -0
  86. package/fixtures/cases/reference-into-a-reserved-name/schema.yaml +3 -0
  87. package/fixtures/cases/room-md-declares-a-type/context.json +1 -0
  88. package/fixtures/cases/room-md-declares-a-type/expected.json +6 -0
  89. package/fixtures/cases/room-md-declares-a-type/library/ROOM.md +5 -0
  90. package/fixtures/cases/thematic-break-in-a-list-section/context.json +1 -0
  91. package/fixtures/cases/thematic-break-in-a-list-section/expected.json +6 -0
  92. package/fixtures/cases/thematic-break-in-a-list-section/library/item.md +7 -0
  93. package/fixtures/cases/thematic-break-in-a-list-section/schema.yaml +3 -0
  94. package/fixtures/cases/typed-path-names-another-type/context.json +11 -0
  95. package/fixtures/cases/typed-path-names-another-type/expected.json +6 -0
  96. package/fixtures/cases/typed-path-names-another-type/library/settings/prefs/one.md +3 -0
  97. package/fixtures/cases/typed-path-names-another-type/schema.yaml +6 -0
  98. package/fixtures/cases/typed-path-names-its-type/context.json +11 -0
  99. package/fixtures/cases/typed-path-names-its-type/expected.json +3 -0
  100. package/fixtures/cases/typed-path-names-its-type/library/settings/prefs/deeper/two.md +1 -0
  101. package/fixtures/cases/typed-path-names-its-type/library/settings/prefs/one.md +4 -0
  102. package/fixtures/cases/typed-path-names-its-type/schema.yaml +6 -0
  103. package/fixtures/cases/typed-path-names-no-type/context.json +11 -0
  104. package/fixtures/cases/typed-path-names-no-type/expected.json +6 -0
  105. package/fixtures/cases/typed-path-names-no-type/library/settings/prefs/one.md +1 -0
  106. package/fixtures/cases/typed-path-names-no-type/schema.yaml +6 -0
  107. package/fixtures/cases/unnamed-typed-path-checks-its-fields/context.json +11 -0
  108. package/fixtures/cases/unnamed-typed-path-checks-its-fields/expected.json +6 -0
  109. package/fixtures/cases/unnamed-typed-path-checks-its-fields/library/rooms/team/tasks/plan.md +4 -0
  110. package/fixtures/cases/unnamed-typed-path-checks-its-fields/schema.yaml +5 -0
  111. package/fixtures/cases/unnamed-typed-path-names-a-type/context.json +11 -0
  112. package/fixtures/cases/unnamed-typed-path-names-a-type/expected.json +6 -0
  113. package/fixtures/cases/unnamed-typed-path-names-a-type/library/rooms/team/tasks/plan.md +6 -0
  114. package/fixtures/cases/unnamed-typed-path-names-a-type/schema.yaml +5 -0
  115. package/fixtures/cases/unnamed-typed-path-reads-its-type/context.json +11 -0
  116. package/fixtures/cases/unnamed-typed-path-reads-its-type/expected.json +3 -0
  117. package/fixtures/cases/unnamed-typed-path-reads-its-type/library/rooms/team/plan.md +1 -0
  118. package/fixtures/cases/unnamed-typed-path-reads-its-type/library/rooms/team/tasks/plan.md +5 -0
  119. package/fixtures/cases/unnamed-typed-path-reads-its-type/schema.yaml +5 -0
  120. package/fixtures/cases/unnamed-typed-path-without-a-body/context.json +11 -0
  121. package/fixtures/cases/unnamed-typed-path-without-a-body/expected.json +5 -0
  122. package/fixtures/cases/unnamed-typed-path-without-a-body/library/rooms/team/tasks/plan.md +5 -0
  123. package/fixtures/cases/unnamed-typed-path-without-a-body/schema.yaml +5 -0
  124. package/fixtures/division.json +47 -2
  125. package/fixtures/preamble.json +24 -3
  126. package/fixtures/projection.json +105 -2
  127. package/fixtures/queries.json +964 -0
  128. package/package.json +16 -2
  129. package/dist/blocks.d.ts +0 -11
  130. package/dist/blocks.d.ts.map +0 -1
  131. package/dist/blocks.js +0 -69
  132. package/dist/condition.d.ts +0 -162
  133. package/dist/condition.d.ts.map +0 -1
  134. package/dist/condition.js +0 -616
  135. package/dist/links.d.ts +0 -29
  136. package/dist/links.d.ts.map +0 -1
  137. package/dist/links.js +0 -788
  138. package/dist/profile.d.ts +0 -6
  139. package/dist/profile.d.ts.map +0 -1
  140. package/dist/profile.js +0 -5
  141. package/dist/sections.d.ts +0 -11
  142. package/dist/sections.d.ts.map +0 -1
  143. package/dist/sections.js +0 -57
package/dist/yaml.js CHANGED
@@ -1,11 +1,23 @@
1
1
  export class YamlError extends Error {
2
2
  offset;
3
3
  constructor(offset) {
4
- super('yaml');
4
+ super();
5
5
  this.offset = offset;
6
6
  this.name = 'YamlError';
7
7
  }
8
8
  }
9
+ const YAML_DEPTH_MAX = 64;
10
+ function nested(c, parse) {
11
+ if (c.depth >= YAML_DEPTH_MAX)
12
+ throw new YamlError(c.i);
13
+ c.depth += 1;
14
+ try {
15
+ return parse();
16
+ }
17
+ finally {
18
+ c.depth -= 1;
19
+ }
20
+ }
9
21
  function peek(c) {
10
22
  return c.i < c.end ? c.text[c.i] : '';
11
23
  }
@@ -70,7 +82,10 @@ function indentAt(c) {
70
82
  }
71
83
  return n;
72
84
  }
85
+ const UNHELD_TEXT = /[\0\ud800-\udfff]/u;
73
86
  function scalar(value, start, end) {
87
+ if (typeof value === 'string' && UNHELD_TEXT.test(value))
88
+ throw new YamlError(start);
74
89
  return { kind: 'scalar', value, start, end };
75
90
  }
76
91
  export function interpretPlain(text) {
@@ -202,9 +217,10 @@ function parseFlowValue(c) {
202
217
  return parseScalar(c, true);
203
218
  }
204
219
  function parseFlowMap(c) {
220
+ return nested(c, () => flowMap(c));
221
+ }
222
+ function flowMap(c) {
205
223
  const start = c.i;
206
- if (peek(c) !== '{')
207
- throw new YamlError(c.i);
208
224
  c.i += 1;
209
225
  skipFlowSpace(c);
210
226
  const entries = [];
@@ -240,9 +256,10 @@ function parseFlowMap(c) {
240
256
  throw new YamlError(c.i);
241
257
  }
242
258
  function parseFlowSeq(c) {
259
+ return nested(c, () => flowSeq(c));
260
+ }
261
+ function flowSeq(c) {
243
262
  const start = c.i;
244
- if (peek(c) !== '[')
245
- throw new YamlError(c.i);
246
263
  c.i += 1;
247
264
  skipFlowSpace(c);
248
265
  const items = [];
@@ -314,10 +331,8 @@ function mappingAhead(c) {
314
331
  const next = c.text[c.i + 1];
315
332
  return next === ' ' || next === '\n' || next === '\r' || c.i + 1 >= c.end;
316
333
  }
317
- catch (error) {
318
- if (error instanceof YamlError)
319
- return false;
320
- throw error;
334
+ catch {
335
+ return false;
321
336
  }
322
337
  finally {
323
338
  c.i = start;
@@ -336,6 +351,9 @@ function parseSeqItem(c, indent) {
336
351
  return parseValue(c, indent);
337
352
  }
338
353
  function parseBlockSeq(c, indent) {
354
+ return nested(c, () => blockSeq(c, indent));
355
+ }
356
+ function blockSeq(c, indent) {
339
357
  const start = c.i;
340
358
  const items = [];
341
359
  let end = start;
@@ -355,6 +373,9 @@ function parseBlockSeq(c, indent) {
355
373
  return { kind: 'seq', items, start, end };
356
374
  }
357
375
  function parseBlockMap(c, indent, inline = false) {
376
+ return nested(c, () => blockMap(c, indent, inline));
377
+ }
378
+ function blockMap(c, indent, inline) {
358
379
  const start = c.i;
359
380
  const entries = [];
360
381
  const seen = new Set();
@@ -387,7 +408,7 @@ function parseBlockMap(c, indent, inline = false) {
387
408
  return { kind: 'map', entries, start, end };
388
409
  }
389
410
  export function parseYamlMapping(text, start, end) {
390
- const c = { text, i: start, end };
411
+ const c = { text, i: start, end, depth: 0 };
391
412
  skipBlankAndComments(c);
392
413
  if (c.i >= end)
393
414
  return { kind: 'map', entries: [], start, end };
@@ -439,17 +460,23 @@ function listed(value) {
439
460
  return keys.length === value.length && keys.every((key, index) => key === String(index));
440
461
  }
441
462
  function heldWithin(value, within) {
442
- if (value === null || typeof value === 'string' || typeof value === 'boolean')
463
+ if (typeof value === 'string')
464
+ return !UNHELD_TEXT.test(value);
465
+ if (value === null || typeof value === 'boolean')
443
466
  return true;
444
467
  if (typeof value === 'number')
445
468
  return Number.isFinite(value);
446
469
  if (typeof value !== 'object' || within.includes(value))
447
470
  return false;
471
+ if (within.length + 1 >= YAML_DEPTH_MAX)
472
+ return false;
448
473
  const path = [...within, value];
449
474
  const held = (item) => heldWithin(item, path);
450
475
  if (Array.isArray(value))
451
476
  return listed(value) && value.every(held);
452
- return plain(value) && Object.values(value).every(held);
477
+ return (plain(value) &&
478
+ Object.keys(value).every((key) => !UNHELD_TEXT.test(key)) &&
479
+ Object.values(value).every(held));
453
480
  }
454
481
  export function frontmatterValue(value) {
455
482
  return heldWithin(value, []);
@@ -495,7 +522,7 @@ export function extractFrontmatter(content) {
495
522
  return { kind: 'unclosed' };
496
523
  const yamlStart = firstNl + 1;
497
524
  let i = yamlStart;
498
- while (i <= content.length) {
525
+ for (;;) {
499
526
  const nl = content.indexOf('\n', i);
500
527
  const lineEnd = nl === -1 ? content.length : nl;
501
528
  let line = content.slice(i, lineEnd);
@@ -507,7 +534,6 @@ export function extractFrontmatter(content) {
507
534
  return { kind: 'unclosed' };
508
535
  i = nl + 1;
509
536
  }
510
- return { kind: 'unclosed' };
511
537
  }
512
538
  export function equalValue(left, right) {
513
539
  if (left === right)
@@ -18,7 +18,9 @@ the validation Libraries. Each row carries `name`, exact `source`, expected
18
18
  the source, compare `Document.preamble`, apply
19
19
  `{ kind: 'preamble', prior: preamble, value }`, and compare the serialized result.
20
20
  These cases cover empty and heading-free Documents, frontmatter boundaries,
21
- fenced headings, newline/source preservation, and a moved-export link rewrite.
21
+ fenced headings and a heading an HTML block holds, setext, indented and empty
22
+ headings that open a section, newline/source preservation, and a moved-export
23
+ link rewrite.
22
24
 
23
25
  ## Projection
24
26
 
@@ -65,6 +67,19 @@ value one span carries part of. `start` and `end` are UTF-8 byte offsets into th
65
67
  source; every source in this corpus is ASCII, so a consumer compares the
66
68
  addressed `source` with an ordinary string slice.
67
69
 
70
+ ## Queries
71
+
72
+ `queries.json` is the one table of cases both query evaluators answer. It carries `schema`,
73
+ one schema text; `documents`, each named and carrying its `path`, the `type` a collection
74
+ stores for it (`any` for an untyped Markdown Document, `null` for one that is not Markdown),
75
+ its `fileId`, the `text` the device holds or `null`, and its `fields`; and `cases`, each with a
76
+ `name`, a `query` of filter parts, the `document` it names and whether it `matches`. Verify
77
+ the schema and plan `{ ...query, select: {} }` with `planOf` against its types. Then
78
+ `matches(plan, candidate)` over the named Document, given its type's definition, and the
79
+ condition `sql.tests` writes over a collection holding every Document of the table with the
80
+ values `indexed` derives from it must both answer `matches`. A new operator adds its cases
81
+ here first.
82
+
68
83
  ## Verdict format
69
84
 
70
85
  Acceptance:
@@ -107,6 +122,7 @@ schema text. The model's own rules:
107
122
  | `frontmatter-fence` | A present frontmatter fence does not parse as the accepted YAML subset |
108
123
  | `schema-yaml` | A schema text is not a mapping in the accepted YAML subset |
109
124
  | `schema-type-name` | A type name is empty, starts with `$`, or is `any` or `attachment` |
125
+ | `provided-type` | A schema names a type its caller provides with a key but its two role keywords |
110
126
  | `schema` | A type or subschema is neither a mapping nor a boolean |
111
127
  | `schema-keyword` | A schema carries a key that is no JSON Schema 2020-12 keyword the model admits |
112
128
  | `$defs` | `$defs` is not a mapping |
@@ -114,16 +130,22 @@ schema text. The model's own rules:
114
130
  | `reference` | `reference` is not on a string or names something but a type, `any`, `attachment` |
115
131
  | `sections` | A section is not `{ kind: text }` or `{ kind: list, items }` over one scalar |
116
132
  | `member_document` | The mark is not a boolean, or a second type carries it |
117
- | `unknown-type` | A file declares a type absent from the governing schema |
133
+ | `unknown-type` | A file declares a type absent from the governing schema, or other than its typed path requires it to name |
118
134
  | `undeclared-field` | A closed object carries a key it does not declare |
119
135
  | `required-section` | A required section heading is missing |
136
+ | `conditional-section` | A section its type's `if` branch requires is absent or holds no text |
120
137
  | `unresolved-reference` | A reference at any depth or a section item reaches no member it admits |
121
- | `unresolved-link` | A body link is an absolute path or leaves the collection |
138
+ | `unresolved-link` | A body link is an absolute path, leaves the collection or, from a typed Document at a document path, reaches a reserved name |
139
+ | `room-md-type` | `ROOM.md` declares a type |
140
+ | `required-body` | A file at a typed path that requires a body has a body holding no text |
122
141
  | `structured-section` | A declared list section is not a list of values of its item schema |
123
142
  | `referenced-missing-file` | Remaining files still reference an absent path |
124
143
  | `unwritable-link` | No Markdown destination form can carry a new link destination |
125
144
  | `division-bound` | A division bound is not a whole number of at least 2 |
126
145
 
146
+ A `then` or `else` of an `if` on a type, in its `allOf` or in such a branch may hold
147
+ `sections`, naming sections the type declares as the type declares them, else `sections`.
148
+
127
149
  `unwritable-link` is refused by `apply` and `division-bound` by `divide`, not
128
150
  by `validate`, so no case under `cases/` carries either.
129
151
 
@@ -0,0 +1 @@
1
+ { "binaryTargets": [] }
@@ -0,0 +1,6 @@
1
+ {
2
+ "verdict": "refuse",
3
+ "file": "questions/payments.md",
4
+ "location": "Answer",
5
+ "rule": "conditional-section"
6
+ }
@@ -0,0 +1,9 @@
1
+ ---
2
+ type: question
3
+ title: Where does it run
4
+ status: open
5
+ ---
6
+
7
+ ## Question
8
+
9
+ Which host runs the shop?
@@ -0,0 +1,12 @@
1
+ ---
2
+ type: question
3
+ title: Who takes payments
4
+ status: answered
5
+ ---
6
+
7
+ ## Question
8
+
9
+ Which provider takes card payments?
10
+
11
+ ## Answer
12
+
@@ -0,0 +1,14 @@
1
+ question:
2
+ properties:
3
+ title: { type: string }
4
+ status: { enum: [open, answered, withdrawn] }
5
+ required: [title, status]
6
+ sections:
7
+ Question: { kind: text, required: true }
8
+ Answer: { kind: text }
9
+ if:
10
+ properties:
11
+ status: { enum: [answered, withdrawn] }
12
+ then:
13
+ sections:
14
+ Answer: { kind: text, required: true }
@@ -0,0 +1 @@
1
+ { "binaryTargets": [] }
@@ -0,0 +1,3 @@
1
+ {
2
+ "verdict": "accept"
3
+ }
@@ -0,0 +1,8 @@
1
+ ---
2
+ type: task
3
+ ---
4
+
5
+ ## Acceptance
6
+
7
+ - Ship it
8
+ carried on as the same item
@@ -0,0 +1,3 @@
1
+ task:
2
+ sections:
3
+ Acceptance: { kind: list, items: { type: string } }
@@ -0,0 +1 @@
1
+ { "binaryTargets": [] }
@@ -0,0 +1,5 @@
1
+ {
2
+ "verdict": "refuse",
3
+ "file": "notes/a.md",
4
+ "rule": "unresolved-link"
5
+ }
@@ -0,0 +1,6 @@
1
+ ---
2
+ type: note
3
+ title: Plan
4
+ ---
5
+
6
+ See [the schema](../settings/schema.yaml).
@@ -0,0 +1,3 @@
1
+ note:
2
+ properties:
3
+ title: { type: string }
@@ -0,0 +1,5 @@
1
+ {
2
+ "verdict": "refuse",
3
+ "file": "notes/b.md",
4
+ "rule": "unresolved-link"
5
+ }
@@ -0,0 +1,5 @@
1
+ ---
2
+ type: any
3
+ ---
4
+
5
+ See [the Room](../Rooms/other/plan.md).
@@ -0,0 +1 @@
1
+ { "binaryTargets": [] }
@@ -0,0 +1,6 @@
1
+ {
2
+ "verdict": "refuse",
3
+ "file": "note.md",
4
+ "location": "/member",
5
+ "rule": "undeclared-field"
6
+ }
@@ -0,0 +1,4 @@
1
+ ---
2
+ member: ana@example.com
3
+ ---
4
+ # Ana
@@ -0,0 +1 @@
1
+ { "binaryTargets": [] }
@@ -0,0 +1,6 @@
1
+ {
2
+ "verdict": "refuse",
3
+ "file": "note.md",
4
+ "location": "/member",
5
+ "rule": "undeclared-field"
6
+ }
@@ -0,0 +1,4 @@
1
+ ---
2
+ type: note
3
+ member: ana@example.com
4
+ ---
@@ -0,0 +1,7 @@
1
+ contact:
2
+ member_document: true
3
+ properties:
4
+ name: { type: string }
5
+ note:
6
+ properties:
7
+ member: { type: string }
@@ -0,0 +1 @@
1
+ { "binaryTargets": [] }
@@ -0,0 +1,6 @@
1
+ {
2
+ "verdict": "refuse",
3
+ "file": "notes/a.md",
4
+ "rule": "unresolved-reference",
5
+ "location": "/brief"
6
+ }
@@ -0,0 +1,4 @@
1
+ ---
2
+ type: task
3
+ brief: ../settings/brief.md
4
+ ---
@@ -0,0 +1,3 @@
1
+ task:
2
+ properties:
3
+ brief: { type: string, reference: any }
@@ -0,0 +1 @@
1
+ { "binaryTargets": [] }
@@ -0,0 +1,6 @@
1
+ {
2
+ "verdict": "refuse",
3
+ "file": "ROOM.md",
4
+ "location": "/type",
5
+ "rule": "room-md-type"
6
+ }
@@ -0,0 +1,5 @@
1
+ ---
2
+ type: any
3
+ ---
4
+
5
+ # Research
@@ -0,0 +1 @@
1
+ { "binaryTargets": [] }
@@ -0,0 +1,6 @@
1
+ {
2
+ "verdict": "refuse",
3
+ "file": "item.md",
4
+ "location": "Acceptance",
5
+ "rule": "structured-section"
6
+ }
@@ -0,0 +1,7 @@
1
+ ---
2
+ type: task
3
+ ---
4
+
5
+ ## Acceptance
6
+
7
+ * * *
@@ -0,0 +1,3 @@
1
+ task:
2
+ sections:
3
+ Acceptance: { kind: list, items: { type: string } }
@@ -0,0 +1,11 @@
1
+ {
2
+ "binaryTargets": [],
3
+ "typedPaths": [
4
+ {
5
+ "path": "settings/prefs/*.md",
6
+ "type": "prefs",
7
+ "named": true,
8
+ "body": false
9
+ }
10
+ ]
11
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "verdict": "refuse",
3
+ "file": "settings/prefs/one.md",
4
+ "rule": "unknown-type",
5
+ "location": "/type"
6
+ }
@@ -0,0 +1,6 @@
1
+ prefs:
2
+ properties:
3
+ theme: { type: string }
4
+ note:
5
+ properties:
6
+ title: { type: string }
@@ -0,0 +1,11 @@
1
+ {
2
+ "binaryTargets": [],
3
+ "typedPaths": [
4
+ {
5
+ "path": "settings/prefs/*.md",
6
+ "type": "prefs",
7
+ "named": true,
8
+ "body": false
9
+ }
10
+ ]
11
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "verdict": "accept"
3
+ }
@@ -0,0 +1,4 @@
1
+ ---
2
+ type: prefs
3
+ theme: dark
4
+ ---
@@ -0,0 +1,6 @@
1
+ prefs:
2
+ properties:
3
+ theme: { type: string }
4
+ note:
5
+ properties:
6
+ title: { type: string }
@@ -0,0 +1,11 @@
1
+ {
2
+ "binaryTargets": [],
3
+ "typedPaths": [
4
+ {
5
+ "path": "settings/prefs/*.md",
6
+ "type": "prefs",
7
+ "named": true,
8
+ "body": false
9
+ }
10
+ ]
11
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "verdict": "refuse",
3
+ "file": "settings/prefs/one.md",
4
+ "rule": "unknown-type",
5
+ "location": "/type"
6
+ }
@@ -0,0 +1,6 @@
1
+ prefs:
2
+ properties:
3
+ theme: { type: string }
4
+ note:
5
+ properties:
6
+ title: { type: string }
@@ -0,0 +1,11 @@
1
+ {
2
+ "binaryTargets": [],
3
+ "typedPaths": [
4
+ {
5
+ "path": "rooms/*/tasks/*.md",
6
+ "type": "task",
7
+ "named": false,
8
+ "body": true
9
+ }
10
+ ]
11
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "verdict": "refuse",
3
+ "file": "rooms/team/tasks/plan.md",
4
+ "rule": "required",
5
+ "location": "/owner"
6
+ }
@@ -0,0 +1,4 @@
1
+ ---
2
+ title: Plan
3
+ ---
4
+ Write the plan.
@@ -0,0 +1,5 @@
1
+ task:
2
+ properties:
3
+ title: { type: string, maxLength: 20 }
4
+ owner: { type: string, format: uuid }
5
+ required: [title, owner]
@@ -0,0 +1,11 @@
1
+ {
2
+ "binaryTargets": [],
3
+ "typedPaths": [
4
+ {
5
+ "path": "rooms/*/tasks/*.md",
6
+ "type": "task",
7
+ "named": false,
8
+ "body": true
9
+ }
10
+ ]
11
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "verdict": "refuse",
3
+ "file": "rooms/team/tasks/plan.md",
4
+ "rule": "unknown-type",
5
+ "location": "/type"
6
+ }
@@ -0,0 +1,6 @@
1
+ ---
2
+ type: task
3
+ title: Plan
4
+ owner: 019a0000-0000-7000-8000-000000000001
5
+ ---
6
+ Write the plan.
@@ -0,0 +1,5 @@
1
+ task:
2
+ properties:
3
+ title: { type: string, maxLength: 20 }
4
+ owner: { type: string, format: uuid }
5
+ required: [title, owner]
@@ -0,0 +1,11 @@
1
+ {
2
+ "binaryTargets": [],
3
+ "typedPaths": [
4
+ {
5
+ "path": "rooms/*/tasks/*.md",
6
+ "type": "task",
7
+ "named": false,
8
+ "body": true
9
+ }
10
+ ]
11
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "verdict": "accept"
3
+ }
@@ -0,0 +1,5 @@
1
+ ---
2
+ title: Plan
3
+ owner: 019a0000-0000-7000-8000-000000000001
4
+ ---
5
+ Write the plan.
@@ -0,0 +1,5 @@
1
+ task:
2
+ properties:
3
+ title: { type: string, maxLength: 20 }
4
+ owner: { type: string, format: uuid }
5
+ required: [title, owner]