@agentshouse/mdmodel 0.1.0-alpha.8 → 0.1.0-c68e2039f1ca8

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 (323) hide show
  1. package/API.md +300 -0
  2. package/README.md +34 -175
  3. package/dist/blocks.d.ts +11 -0
  4. package/dist/blocks.d.ts.map +1 -0
  5. package/dist/blocks.js +62 -0
  6. package/dist/condition.d.ts +137 -0
  7. package/dist/condition.d.ts.map +1 -0
  8. package/dist/condition.js +394 -0
  9. package/dist/definition.d.ts +42 -25
  10. package/dist/definition.d.ts.map +1 -1
  11. package/dist/definition.js +473 -146
  12. package/dist/divide.d.ts +3 -0
  13. package/dist/divide.d.ts.map +1 -0
  14. package/dist/divide.js +310 -0
  15. package/dist/document.d.ts +2 -0
  16. package/dist/document.d.ts.map +1 -1
  17. package/dist/document.js +89 -120
  18. package/dist/fields.d.ts +4 -0
  19. package/dist/fields.d.ts.map +1 -0
  20. package/dist/fields.js +3 -0
  21. package/dist/index.d.ts +9 -2
  22. package/dist/index.d.ts.map +1 -1
  23. package/dist/index.js +6 -3
  24. package/dist/links.d.ts +1 -0
  25. package/dist/links.d.ts.map +1 -1
  26. package/dist/links.js +618 -224
  27. package/dist/paths.d.ts +2 -3
  28. package/dist/paths.d.ts.map +1 -1
  29. package/dist/paths.js +27 -37
  30. package/dist/profile.js +1 -3
  31. package/dist/project.d.ts +19 -1
  32. package/dist/project.d.ts.map +1 -1
  33. package/dist/project.js +82 -73
  34. package/dist/refuse.d.ts.map +1 -1
  35. package/dist/refuse.js +2 -10
  36. package/dist/schema.d.ts +7 -5
  37. package/dist/schema.d.ts.map +1 -1
  38. package/dist/schema.js +156 -41
  39. package/dist/sections.d.ts +2 -1
  40. package/dist/sections.d.ts.map +1 -1
  41. package/dist/sections.js +45 -67
  42. package/dist/types.d.ts +30 -2
  43. package/dist/types.d.ts.map +1 -1
  44. package/dist/types.js +1 -3
  45. package/dist/validate.d.ts +3 -2
  46. package/dist/validate.d.ts.map +1 -1
  47. package/dist/validate.js +138 -136
  48. package/dist/version.d.ts +1 -1
  49. package/dist/version.d.ts.map +1 -1
  50. package/dist/version.js +1 -3
  51. package/dist/yaml.d.ts +2 -0
  52. package/dist/yaml.d.ts.map +1 -1
  53. package/dist/yaml.js +255 -191
  54. package/fixtures/README.md +85 -55
  55. package/fixtures/cases/absent-optional-field/library/companies/acme.md +4 -0
  56. package/fixtures/cases/absent-optional-field/library/deals/lead.md +6 -0
  57. package/fixtures/cases/absent-optional-field/schema.yaml +56 -0
  58. package/fixtures/cases/binary-any-reference/expected.json +1 -2
  59. package/fixtures/cases/binary-any-reference/schema.yaml +4 -0
  60. package/fixtures/cases/binary-document-collision/expected.json +1 -2
  61. package/fixtures/cases/binary-document-collision/schema.yaml +1 -0
  62. package/fixtures/cases/binary-link-outside-collection/expected.json +1 -2
  63. package/fixtures/cases/binary-link-outside-collection/schema.yaml +1 -0
  64. package/fixtures/cases/binary-prototype-reference/expected.json +1 -2
  65. package/fixtures/cases/binary-prototype-reference/schema.yaml +4 -0
  66. package/fixtures/cases/binary-typed-reference/expected.json +1 -2
  67. package/fixtures/cases/binary-typed-reference/schema.yaml +5 -0
  68. package/fixtures/cases/boolean-field/context.json +1 -0
  69. package/fixtures/cases/boolean-field/expected.json +6 -0
  70. package/fixtures/cases/boolean-field/library/companies/acme.md +4 -0
  71. package/fixtures/cases/boolean-field/library/deals/renewal.md +31 -0
  72. package/fixtures/cases/boolean-field/schema.yaml +56 -0
  73. package/fixtures/cases/bracketed-link-definition/schema.yaml +6 -0
  74. package/fixtures/cases/closed-nested-object/context.json +1 -0
  75. package/fixtures/cases/closed-nested-object/expected.json +6 -0
  76. package/fixtures/cases/closed-nested-object/library/companies/acme.md +4 -0
  77. package/fixtures/cases/closed-nested-object/library/deals/renewal.md +32 -0
  78. package/fixtures/cases/closed-nested-object/schema.yaml +56 -0
  79. package/fixtures/cases/composed-root-reference/context.json +1 -0
  80. package/fixtures/cases/composed-root-reference/expected.json +6 -0
  81. package/fixtures/cases/composed-root-reference/library/a.md +5 -0
  82. package/fixtures/cases/composed-root-reference/schema.yaml +13 -0
  83. package/fixtures/cases/date-time-format/context.json +1 -0
  84. package/fixtures/cases/date-time-format/expected.json +6 -0
  85. package/fixtures/cases/date-time-format/library/companies/acme.md +4 -0
  86. package/fixtures/cases/date-time-format/library/deals/renewal.md +31 -0
  87. package/fixtures/cases/date-time-format/schema.yaml +56 -0
  88. package/fixtures/cases/declared-binary-links/schema.yaml +1 -0
  89. package/fixtures/cases/default-unfilled/context.json +1 -0
  90. package/fixtures/cases/default-unfilled/expected.json +6 -0
  91. package/fixtures/cases/default-unfilled/library/companies/acme.md +4 -0
  92. package/fixtures/cases/default-unfilled/library/deals/renewal.md +29 -0
  93. package/fixtures/cases/default-unfilled/schema.yaml +56 -0
  94. package/fixtures/cases/defs-pattern/context.json +1 -0
  95. package/fixtures/cases/defs-pattern/expected.json +6 -0
  96. package/fixtures/cases/defs-pattern/library/companies/acme.md +4 -0
  97. package/fixtures/cases/defs-pattern/library/deals/renewal.md +31 -0
  98. package/fixtures/cases/defs-pattern/schema.yaml +56 -0
  99. package/fixtures/cases/dependent-rule/context.json +1 -0
  100. package/fixtures/cases/dependent-rule/expected.json +6 -0
  101. package/fixtures/cases/dependent-rule/library/companies/acme.md +4 -0
  102. package/fixtures/cases/dependent-rule/library/deals/renewal.md +30 -0
  103. package/fixtures/cases/dependent-rule/schema.yaml +56 -0
  104. package/fixtures/cases/duplicate-link-definition/schema.yaml +6 -0
  105. package/fixtures/cases/email-format/context.json +1 -0
  106. package/fixtures/cases/email-format/expected.json +6 -0
  107. package/fixtures/cases/email-format/library/companies/acme.md +4 -0
  108. package/fixtures/cases/email-format/library/deals/renewal.md +31 -0
  109. package/fixtures/cases/email-format/schema.yaml +56 -0
  110. package/fixtures/cases/fenced-link-definition/schema.yaml +6 -0
  111. package/fixtures/cases/field-enum/expected.json +2 -3
  112. package/fixtures/cases/field-enum/schema.yaml +7 -0
  113. package/fixtures/cases/frontmatter-schema/context.json +1 -0
  114. package/fixtures/cases/frontmatter-schema/expected.json +5 -0
  115. package/fixtures/cases/frontmatter-schema/schema.yaml +5 -0
  116. package/fixtures/cases/integer-field/context.json +1 -0
  117. package/fixtures/cases/integer-field/expected.json +6 -0
  118. package/fixtures/cases/integer-field/library/companies/acme.md +4 -0
  119. package/fixtures/cases/integer-field/library/deals/renewal.md +31 -0
  120. package/fixtures/cases/integer-field/schema.yaml +56 -0
  121. package/fixtures/cases/interrupted-link-definition/schema.yaml +1 -0
  122. package/fixtures/cases/json-schema-constructs/context.json +1 -0
  123. package/fixtures/cases/json-schema-constructs/expected.json +1 -0
  124. package/fixtures/cases/json-schema-constructs/library/companies/acme.md +4 -0
  125. package/fixtures/cases/json-schema-constructs/library/deals/renewal.md +31 -0
  126. package/fixtures/cases/json-schema-constructs/schema.yaml +56 -0
  127. package/fixtures/cases/list-of-objects-closed/context.json +1 -0
  128. package/fixtures/cases/list-of-objects-closed/expected.json +6 -0
  129. package/fixtures/cases/list-of-objects-closed/library/companies/acme.md +4 -0
  130. package/fixtures/cases/list-of-objects-closed/library/deals/renewal.md +32 -0
  131. package/fixtures/cases/list-of-objects-closed/schema.yaml +56 -0
  132. package/fixtures/cases/list-of-objects-item/context.json +1 -0
  133. package/fixtures/cases/list-of-objects-item/expected.json +6 -0
  134. package/fixtures/cases/list-of-objects-item/library/companies/acme.md +4 -0
  135. package/fixtures/cases/list-of-objects-item/library/deals/renewal.md +31 -0
  136. package/fixtures/cases/list-of-objects-item/schema.yaml +56 -0
  137. package/fixtures/cases/list-size/context.json +1 -0
  138. package/fixtures/cases/list-size/expected.json +6 -0
  139. package/fixtures/cases/list-size/library/companies/acme.md +4 -0
  140. package/fixtures/cases/list-size/library/deals/renewal.md +31 -0
  141. package/fixtures/cases/list-size/schema.yaml +56 -0
  142. package/fixtures/cases/long-fence-link-definition/schema.yaml +1 -0
  143. package/fixtures/cases/malformed-definition/expected.json +2 -4
  144. package/fixtures/cases/malformed-definition/schema.yaml +3 -0
  145. package/fixtures/cases/member-document/context.json +1 -0
  146. package/fixtures/cases/member-document/expected.json +1 -0
  147. package/fixtures/cases/member-document/library/people/ana.md +5 -0
  148. package/fixtures/cases/member-document/schema.yaml +5 -0
  149. package/fixtures/cases/missing-binary-image/expected.json +1 -2
  150. package/fixtures/cases/missing-binary-image/schema.yaml +1 -0
  151. package/fixtures/cases/missing-binary-link/expected.json +1 -2
  152. package/fixtures/cases/missing-binary-link/schema.yaml +1 -0
  153. package/fixtures/cases/missing-required-field/expected.json +2 -3
  154. package/fixtures/cases/missing-required-field/schema.yaml +7 -0
  155. package/fixtures/cases/missing-section-item-kind/context.json +1 -0
  156. package/fixtures/cases/missing-section-item-kind/expected.json +5 -0
  157. package/fixtures/cases/missing-section-item-kind/schema.yaml +6 -0
  158. package/fixtures/cases/misspelled-key/context.json +1 -0
  159. package/fixtures/cases/misspelled-key/expected.json +6 -0
  160. package/fixtures/cases/misspelled-key/library/companies/acme.md +4 -0
  161. package/fixtures/cases/misspelled-key/library/deals/renewal.md +32 -0
  162. package/fixtures/cases/misspelled-key/schema.yaml +56 -0
  163. package/fixtures/cases/nested-defs/context.json +1 -0
  164. package/fixtures/cases/nested-defs/expected.json +6 -0
  165. package/fixtures/cases/nested-defs/library/deal.md +6 -0
  166. package/fixtures/cases/nested-defs/schema.yaml +11 -0
  167. package/fixtures/cases/nested-required-field/context.json +1 -0
  168. package/fixtures/cases/nested-required-field/expected.json +6 -0
  169. package/fixtures/cases/nested-required-field/library/companies/acme.md +4 -0
  170. package/fixtures/cases/nested-required-field/library/deals/renewal.md +30 -0
  171. package/fixtures/cases/nested-required-field/schema.yaml +56 -0
  172. package/fixtures/cases/null-refused/context.json +1 -0
  173. package/fixtures/cases/null-refused/expected.json +6 -0
  174. package/fixtures/cases/null-refused/library/companies/acme.md +4 -0
  175. package/fixtures/cases/null-refused/library/deals/renewal.md +31 -0
  176. package/fixtures/cases/null-refused/schema.yaml +56 -0
  177. package/fixtures/cases/numeric-range/context.json +1 -0
  178. package/fixtures/cases/numeric-range/expected.json +6 -0
  179. package/fixtures/cases/numeric-range/library/companies/acme.md +4 -0
  180. package/fixtures/cases/numeric-range/library/deals/renewal.md +31 -0
  181. package/fixtures/cases/numeric-range/schema.yaml +56 -0
  182. package/fixtures/cases/one-of-variant/context.json +1 -0
  183. package/fixtures/cases/one-of-variant/expected.json +6 -0
  184. package/fixtures/cases/one-of-variant/library/companies/acme.md +4 -0
  185. package/fixtures/cases/one-of-variant/library/deals/renewal.md +31 -0
  186. package/fixtures/cases/one-of-variant/schema.yaml +56 -0
  187. package/fixtures/cases/open-map-value/context.json +1 -0
  188. package/fixtures/cases/open-map-value/expected.json +6 -0
  189. package/fixtures/cases/open-map-value/library/companies/acme.md +4 -0
  190. package/fixtures/cases/open-map-value/library/deals/renewal.md +31 -0
  191. package/fixtures/cases/open-map-value/schema.yaml +56 -0
  192. package/fixtures/cases/paragraph-link-definition/schema.yaml +1 -0
  193. package/fixtures/cases/prototype-field/context.json +1 -0
  194. package/fixtures/cases/prototype-field/expected.json +6 -0
  195. package/fixtures/cases/prototype-field/library/item.md +9 -0
  196. package/fixtures/cases/prototype-field/schema.yaml +6 -0
  197. package/fixtures/cases/quoted-link-definition/expected.json +1 -2
  198. package/fixtures/cases/quoted-link-definition/schema.yaml +1 -0
  199. package/fixtures/cases/referenced-missing-file/expected.json +0 -1
  200. package/fixtures/cases/referenced-missing-file/schema.yaml +11 -0
  201. package/fixtures/cases/remote-ref/context.json +1 -0
  202. package/fixtures/cases/remote-ref/expected.json +5 -0
  203. package/fixtures/cases/remote-ref/schema.yaml +3 -0
  204. package/fixtures/cases/second-member-document/context.json +1 -0
  205. package/fixtures/cases/second-member-document/expected.json +5 -0
  206. package/fixtures/cases/second-member-document/schema.yaml +4 -0
  207. package/fixtures/cases/section-item-enum/context.json +1 -0
  208. package/fixtures/cases/section-item-enum/expected.json +6 -0
  209. package/fixtures/cases/section-item-enum/library/task.md +8 -0
  210. package/fixtures/cases/section-item-enum/schema.yaml +3 -0
  211. package/fixtures/cases/section-item-kind/context.json +1 -0
  212. package/fixtures/cases/section-item-kind/expected.json +6 -0
  213. package/fixtures/cases/section-item-kind/library/task.md +8 -0
  214. package/fixtures/cases/section-item-kind/schema.yaml +3 -0
  215. package/fixtures/cases/section-items/context.json +1 -0
  216. package/fixtures/cases/section-items/expected.json +1 -0
  217. package/fixtures/cases/section-items/library/other.md +3 -0
  218. package/fixtures/cases/section-items/library/page.md +42 -0
  219. package/fixtures/cases/section-items/schema.yaml +10 -0
  220. package/fixtures/cases/section-reference-path/context.json +1 -0
  221. package/fixtures/cases/section-reference-path/expected.json +6 -0
  222. package/fixtures/cases/section-reference-path/library/other.md +3 -0
  223. package/fixtures/cases/section-reference-path/library/page.md +7 -0
  224. package/fixtures/cases/section-reference-path/schema.yaml +3 -0
  225. package/fixtures/cases/section-reference-type/context.json +1 -0
  226. package/fixtures/cases/section-reference-type/expected.json +6 -0
  227. package/fixtures/cases/section-reference-type/library/note.md +1 -0
  228. package/fixtures/cases/section-reference-type/library/page.md +7 -0
  229. package/fixtures/cases/section-reference-type/schema.yaml +3 -0
  230. package/fixtures/cases/shortcut-reference-link/context.json +1 -0
  231. package/fixtures/cases/shortcut-reference-link/expected.json +5 -0
  232. package/fixtures/cases/shortcut-reference-link/library/item.md +10 -0
  233. package/fixtures/cases/shortcut-reference-link/schema.yaml +6 -0
  234. package/fixtures/cases/string-length/context.json +1 -0
  235. package/fixtures/cases/string-length/expected.json +6 -0
  236. package/fixtures/cases/string-length/library/companies/acme.md +4 -0
  237. package/fixtures/cases/string-length/library/deals/renewal.md +31 -0
  238. package/fixtures/cases/string-length/schema.yaml +56 -0
  239. package/fixtures/cases/structured-section/expected.json +1 -2
  240. package/fixtures/cases/structured-section/schema.yaml +7 -0
  241. package/fixtures/cases/submission-keys/context.json +1 -0
  242. package/fixtures/cases/submission-keys/expected.json +1 -0
  243. package/fixtures/cases/submission-keys/library/notes/visitor.md +8 -0
  244. package/fixtures/cases/submission-keys/schema.yaml +4 -0
  245. package/fixtures/cases/text-field-kind/context.json +1 -0
  246. package/fixtures/cases/text-field-kind/expected.json +6 -0
  247. package/fixtures/cases/text-field-kind/library/page.md +4 -0
  248. package/fixtures/cases/text-field-kind/schema.yaml +4 -0
  249. package/fixtures/cases/truncated-link-definition/expected.json +1 -2
  250. package/fixtures/cases/truncated-link-definition/schema.yaml +1 -0
  251. package/fixtures/cases/types-folder-content/context.json +1 -0
  252. package/fixtures/cases/types-folder-content/expected.json +1 -0
  253. package/fixtures/cases/types-folder-content/library/types/task.md +4 -0
  254. package/fixtures/cases/types-folder-content/schema.yaml +4 -0
  255. package/fixtures/cases/unclosed-frontmatter/expected.json +1 -2
  256. package/fixtures/cases/undeclared-field/context.json +1 -0
  257. package/fixtures/cases/undeclared-field/expected.json +6 -0
  258. package/fixtures/cases/undeclared-field/library/item.md +9 -0
  259. package/fixtures/cases/undeclared-field/schema.yaml +6 -0
  260. package/fixtures/cases/unevaluated-items-closed/context.json +1 -0
  261. package/fixtures/cases/unevaluated-items-closed/expected.json +6 -0
  262. package/fixtures/cases/unevaluated-items-closed/library/trip.md +6 -0
  263. package/fixtures/cases/unevaluated-items-closed/schema.yaml +10 -0
  264. package/fixtures/cases/unknown-type/context.json +1 -0
  265. package/fixtures/cases/unknown-type/expected.json +6 -0
  266. package/fixtures/cases/unknown-type/library/item.md +3 -0
  267. package/fixtures/cases/unknown-type/schema.yaml +3 -0
  268. package/fixtures/cases/unlisted-reference-type/context.json +1 -0
  269. package/fixtures/cases/unlisted-reference-type/expected.json +5 -0
  270. package/fixtures/cases/unlisted-reference-type/schema.yaml +3 -0
  271. package/fixtures/cases/unresolved-link/expected.json +1 -2
  272. package/fixtures/cases/unresolved-link/schema.yaml +6 -0
  273. package/fixtures/cases/valid-typed-document/library/tasks/one.md +1 -0
  274. package/fixtures/cases/valid-typed-document/schema.yaml +16 -0
  275. package/fixtures/cases/wide-item-fence-link/schema.yaml +1 -0
  276. package/fixtures/division.json +409 -0
  277. package/fixtures/projection.json +109 -28
  278. package/package.json +3 -12
  279. package/dist/definition.js.map +0 -1
  280. package/dist/document.js.map +0 -1
  281. package/dist/index.js.map +0 -1
  282. package/dist/links.js.map +0 -1
  283. package/dist/paths.js.map +0 -1
  284. package/dist/profile.js.map +0 -1
  285. package/dist/project.js.map +0 -1
  286. package/dist/refuse.js.map +0 -1
  287. package/dist/schema.js.map +0 -1
  288. package/dist/sections.js.map +0 -1
  289. package/dist/types.js.map +0 -1
  290. package/dist/validate.js.map +0 -1
  291. package/dist/version.js.map +0 -1
  292. package/dist/yaml.js.map +0 -1
  293. package/fixtures/cases/binary-any-reference/library/types/note.md +0 -5
  294. package/fixtures/cases/binary-document-collision/library/types/note.md +0 -3
  295. package/fixtures/cases/binary-link-outside-collection/library/types/note.md +0 -3
  296. package/fixtures/cases/binary-prototype-reference/library/types/note.md +0 -5
  297. package/fixtures/cases/binary-typed-reference/library/types/note.md +0 -5
  298. package/fixtures/cases/binary-typed-reference/library/types/person.md +0 -3
  299. package/fixtures/cases/bracketed-link-definition/library/types/task.md +0 -7
  300. package/fixtures/cases/declared-binary-links/library/types/note.md +0 -3
  301. package/fixtures/cases/duplicate-link-definition/library/types/task.md +0 -7
  302. package/fixtures/cases/fenced-link-definition/library/types/task.md +0 -7
  303. package/fixtures/cases/field-enum/library/types/task.md +0 -8
  304. package/fixtures/cases/interrupted-link-definition/library/types/note.md +0 -3
  305. package/fixtures/cases/long-fence-link-definition/library/types/note.md +0 -3
  306. package/fixtures/cases/malformed-definition/library/types/task.md +0 -5
  307. package/fixtures/cases/missing-binary-image/library/types/note.md +0 -3
  308. package/fixtures/cases/missing-binary-link/library/types/note.md +0 -3
  309. package/fixtures/cases/missing-required-field/library/types/task.md +0 -8
  310. package/fixtures/cases/paragraph-link-definition/library/types/note.md +0 -3
  311. package/fixtures/cases/prd-definition/library/types/task.md +0 -15
  312. package/fixtures/cases/quoted-link-definition/library/types/note.md +0 -3
  313. package/fixtures/cases/referenced-missing-file/library/types/person.md +0 -5
  314. package/fixtures/cases/referenced-missing-file/library/types/task.md +0 -8
  315. package/fixtures/cases/structured-section/library/types/task.md +0 -8
  316. package/fixtures/cases/truncated-link-definition/library/types/note.md +0 -3
  317. package/fixtures/cases/unresolved-link/library/types/task.md +0 -7
  318. package/fixtures/cases/valid-typed-document/library/types/person.md +0 -5
  319. package/fixtures/cases/valid-typed-document/library/types/task.md +0 -12
  320. package/fixtures/cases/wide-item-fence-link/library/types/note.md +0 -3
  321. package/markdown-syntax-profile.md +0 -9
  322. /package/fixtures/cases/{prd-definition → absent-optional-field}/context.json +0 -0
  323. /package/fixtures/cases/{prd-definition → absent-optional-field}/expected.json +0 -0
@@ -0,0 +1,30 @@
1
+ ---
2
+ type: deal
3
+ title: Renewal
4
+ company: ../companies/acme.md
5
+ stage: won
6
+ amount: 1200
7
+ probability: 0.5
8
+ open: false
9
+ closes_at: 2026-10-10T09:30:00Z
10
+ contact_email: ana@example.com
11
+ note: null
12
+ shipping:
13
+ country: FR
14
+ tags: [renewal, priority]
15
+ lines:
16
+ - product: seats
17
+ quantity: 10
18
+ - product: support
19
+ quantity: 1
20
+ blocks:
21
+ - kind: paragraph
22
+ text: Signed.
23
+ - { kind: quiz, question: Renew next year? }
24
+ attributes:
25
+ region: emea
26
+ ---
27
+
28
+ ## Description
29
+
30
+ The yearly renewal.
@@ -0,0 +1,56 @@
1
+ $defs:
2
+ address:
3
+ type: object
4
+ properties:
5
+ city: { type: string }
6
+ country: { type: string, pattern: '^[A-Z]{2}$' }
7
+ required: [city]
8
+ company:
9
+ properties:
10
+ name: { type: string }
11
+ deal:
12
+ type: object
13
+ properties:
14
+ title: { type: string, minLength: 1, maxLength: 40 }
15
+ company: { type: string, reference: company }
16
+ stage: { enum: [lead, proposal, won, lost], default: lead }
17
+ amount: { type: integer, minimum: 0 }
18
+ probability: { type: number, minimum: 0, maximum: 1 }
19
+ open: { type: boolean }
20
+ closes_at: { type: string, format: date-time }
21
+ contact_email: { type: string, format: email }
22
+ note: { type: [string, 'null'] }
23
+ shipping: { $ref: '#/$defs/address' }
24
+ tags: { type: array, items: { type: string }, maxItems: 3 }
25
+ lines:
26
+ type: array
27
+ items:
28
+ type: object
29
+ properties:
30
+ product: { type: string }
31
+ quantity: { type: integer, minimum: 1 }
32
+ required: [product, quantity]
33
+ blocks:
34
+ type: array
35
+ items:
36
+ oneOf:
37
+ - properties:
38
+ kind: { const: paragraph }
39
+ text: { type: string }
40
+ required: [kind, text]
41
+ - properties:
42
+ kind: { const: quiz }
43
+ question: { type: string }
44
+ required: [kind, question]
45
+ attributes:
46
+ type: object
47
+ additionalProperties: { type: string }
48
+ required: [title, company, stage]
49
+ if:
50
+ properties:
51
+ stage: { const: won }
52
+ required: [stage]
53
+ then:
54
+ required: [amount]
55
+ sections:
56
+ Description: { kind: text }
@@ -0,0 +1 @@
1
+ { "binaryTargets": [] }
@@ -0,0 +1,6 @@
1
+ {
2
+ "verdict": "refuse",
3
+ "file": "deals/renewal.md",
4
+ "location": "/title",
5
+ "rule": "type"
6
+ }
@@ -0,0 +1,4 @@
1
+ ---
2
+ type: company
3
+ name: Acme
4
+ ---
@@ -0,0 +1,31 @@
1
+ ---
2
+ type: deal
3
+ title: null
4
+ company: ../companies/acme.md
5
+ stage: won
6
+ amount: 1200
7
+ probability: 0.5
8
+ open: false
9
+ closes_at: 2026-10-10T09:30:00Z
10
+ contact_email: ana@example.com
11
+ note: null
12
+ shipping:
13
+ city: Paris
14
+ country: FR
15
+ tags: [renewal, priority]
16
+ lines:
17
+ - product: seats
18
+ quantity: 10
19
+ - product: support
20
+ quantity: 1
21
+ blocks:
22
+ - kind: paragraph
23
+ text: Signed.
24
+ - { kind: quiz, question: Renew next year? }
25
+ attributes:
26
+ region: emea
27
+ ---
28
+
29
+ ## Description
30
+
31
+ The yearly renewal.
@@ -0,0 +1,56 @@
1
+ $defs:
2
+ address:
3
+ type: object
4
+ properties:
5
+ city: { type: string }
6
+ country: { type: string, pattern: '^[A-Z]{2}$' }
7
+ required: [city]
8
+ company:
9
+ properties:
10
+ name: { type: string }
11
+ deal:
12
+ type: object
13
+ properties:
14
+ title: { type: string, minLength: 1, maxLength: 40 }
15
+ company: { type: string, reference: company }
16
+ stage: { enum: [lead, proposal, won, lost], default: lead }
17
+ amount: { type: integer, minimum: 0 }
18
+ probability: { type: number, minimum: 0, maximum: 1 }
19
+ open: { type: boolean }
20
+ closes_at: { type: string, format: date-time }
21
+ contact_email: { type: string, format: email }
22
+ note: { type: [string, 'null'] }
23
+ shipping: { $ref: '#/$defs/address' }
24
+ tags: { type: array, items: { type: string }, maxItems: 3 }
25
+ lines:
26
+ type: array
27
+ items:
28
+ type: object
29
+ properties:
30
+ product: { type: string }
31
+ quantity: { type: integer, minimum: 1 }
32
+ required: [product, quantity]
33
+ blocks:
34
+ type: array
35
+ items:
36
+ oneOf:
37
+ - properties:
38
+ kind: { const: paragraph }
39
+ text: { type: string }
40
+ required: [kind, text]
41
+ - properties:
42
+ kind: { const: quiz }
43
+ question: { type: string }
44
+ required: [kind, question]
45
+ attributes:
46
+ type: object
47
+ additionalProperties: { type: string }
48
+ required: [title, company, stage]
49
+ if:
50
+ properties:
51
+ stage: { const: won }
52
+ required: [stage]
53
+ then:
54
+ required: [amount]
55
+ sections:
56
+ Description: { kind: text }
@@ -0,0 +1 @@
1
+ { "binaryTargets": [] }
@@ -0,0 +1,6 @@
1
+ {
2
+ "verdict": "refuse",
3
+ "file": "deals/renewal.md",
4
+ "location": "/probability",
5
+ "rule": "maximum"
6
+ }
@@ -0,0 +1,4 @@
1
+ ---
2
+ type: company
3
+ name: Acme
4
+ ---
@@ -0,0 +1,31 @@
1
+ ---
2
+ type: deal
3
+ title: Renewal
4
+ company: ../companies/acme.md
5
+ stage: won
6
+ amount: 1200
7
+ probability: 1.5
8
+ open: false
9
+ closes_at: 2026-10-10T09:30:00Z
10
+ contact_email: ana@example.com
11
+ note: null
12
+ shipping:
13
+ city: Paris
14
+ country: FR
15
+ tags: [renewal, priority]
16
+ lines:
17
+ - product: seats
18
+ quantity: 10
19
+ - product: support
20
+ quantity: 1
21
+ blocks:
22
+ - kind: paragraph
23
+ text: Signed.
24
+ - { kind: quiz, question: Renew next year? }
25
+ attributes:
26
+ region: emea
27
+ ---
28
+
29
+ ## Description
30
+
31
+ The yearly renewal.
@@ -0,0 +1,56 @@
1
+ $defs:
2
+ address:
3
+ type: object
4
+ properties:
5
+ city: { type: string }
6
+ country: { type: string, pattern: '^[A-Z]{2}$' }
7
+ required: [city]
8
+ company:
9
+ properties:
10
+ name: { type: string }
11
+ deal:
12
+ type: object
13
+ properties:
14
+ title: { type: string, minLength: 1, maxLength: 40 }
15
+ company: { type: string, reference: company }
16
+ stage: { enum: [lead, proposal, won, lost], default: lead }
17
+ amount: { type: integer, minimum: 0 }
18
+ probability: { type: number, minimum: 0, maximum: 1 }
19
+ open: { type: boolean }
20
+ closes_at: { type: string, format: date-time }
21
+ contact_email: { type: string, format: email }
22
+ note: { type: [string, 'null'] }
23
+ shipping: { $ref: '#/$defs/address' }
24
+ tags: { type: array, items: { type: string }, maxItems: 3 }
25
+ lines:
26
+ type: array
27
+ items:
28
+ type: object
29
+ properties:
30
+ product: { type: string }
31
+ quantity: { type: integer, minimum: 1 }
32
+ required: [product, quantity]
33
+ blocks:
34
+ type: array
35
+ items:
36
+ oneOf:
37
+ - properties:
38
+ kind: { const: paragraph }
39
+ text: { type: string }
40
+ required: [kind, text]
41
+ - properties:
42
+ kind: { const: quiz }
43
+ question: { type: string }
44
+ required: [kind, question]
45
+ attributes:
46
+ type: object
47
+ additionalProperties: { type: string }
48
+ required: [title, company, stage]
49
+ if:
50
+ properties:
51
+ stage: { const: won }
52
+ required: [stage]
53
+ then:
54
+ required: [amount]
55
+ sections:
56
+ Description: { kind: text }
@@ -0,0 +1 @@
1
+ { "binaryTargets": [] }
@@ -0,0 +1,6 @@
1
+ {
2
+ "verdict": "refuse",
3
+ "file": "deals/renewal.md",
4
+ "location": "/blocks/1",
5
+ "rule": "oneOf"
6
+ }
@@ -0,0 +1,4 @@
1
+ ---
2
+ type: company
3
+ name: Acme
4
+ ---
@@ -0,0 +1,31 @@
1
+ ---
2
+ type: deal
3
+ title: Renewal
4
+ company: ../companies/acme.md
5
+ stage: won
6
+ amount: 1200
7
+ probability: 0.5
8
+ open: false
9
+ closes_at: 2026-10-10T09:30:00Z
10
+ contact_email: ana@example.com
11
+ note: null
12
+ shipping:
13
+ city: Paris
14
+ country: FR
15
+ tags: [renewal, priority]
16
+ lines:
17
+ - product: seats
18
+ quantity: 10
19
+ - product: support
20
+ quantity: 1
21
+ blocks:
22
+ - kind: paragraph
23
+ text: Signed.
24
+ - { kind: quiz, text: Renew next year? }
25
+ attributes:
26
+ region: emea
27
+ ---
28
+
29
+ ## Description
30
+
31
+ The yearly renewal.
@@ -0,0 +1,56 @@
1
+ $defs:
2
+ address:
3
+ type: object
4
+ properties:
5
+ city: { type: string }
6
+ country: { type: string, pattern: '^[A-Z]{2}$' }
7
+ required: [city]
8
+ company:
9
+ properties:
10
+ name: { type: string }
11
+ deal:
12
+ type: object
13
+ properties:
14
+ title: { type: string, minLength: 1, maxLength: 40 }
15
+ company: { type: string, reference: company }
16
+ stage: { enum: [lead, proposal, won, lost], default: lead }
17
+ amount: { type: integer, minimum: 0 }
18
+ probability: { type: number, minimum: 0, maximum: 1 }
19
+ open: { type: boolean }
20
+ closes_at: { type: string, format: date-time }
21
+ contact_email: { type: string, format: email }
22
+ note: { type: [string, 'null'] }
23
+ shipping: { $ref: '#/$defs/address' }
24
+ tags: { type: array, items: { type: string }, maxItems: 3 }
25
+ lines:
26
+ type: array
27
+ items:
28
+ type: object
29
+ properties:
30
+ product: { type: string }
31
+ quantity: { type: integer, minimum: 1 }
32
+ required: [product, quantity]
33
+ blocks:
34
+ type: array
35
+ items:
36
+ oneOf:
37
+ - properties:
38
+ kind: { const: paragraph }
39
+ text: { type: string }
40
+ required: [kind, text]
41
+ - properties:
42
+ kind: { const: quiz }
43
+ question: { type: string }
44
+ required: [kind, question]
45
+ attributes:
46
+ type: object
47
+ additionalProperties: { type: string }
48
+ required: [title, company, stage]
49
+ if:
50
+ properties:
51
+ stage: { const: won }
52
+ required: [stage]
53
+ then:
54
+ required: [amount]
55
+ sections:
56
+ Description: { kind: text }
@@ -0,0 +1 @@
1
+ { "binaryTargets": [] }
@@ -0,0 +1,6 @@
1
+ {
2
+ "verdict": "refuse",
3
+ "file": "deals/renewal.md",
4
+ "location": "/attributes/region",
5
+ "rule": "type"
6
+ }
@@ -0,0 +1,4 @@
1
+ ---
2
+ type: company
3
+ name: Acme
4
+ ---
@@ -0,0 +1,31 @@
1
+ ---
2
+ type: deal
3
+ title: Renewal
4
+ company: ../companies/acme.md
5
+ stage: won
6
+ amount: 1200
7
+ probability: 0.5
8
+ open: false
9
+ closes_at: 2026-10-10T09:30:00Z
10
+ contact_email: ana@example.com
11
+ note: null
12
+ shipping:
13
+ city: Paris
14
+ country: FR
15
+ tags: [renewal, priority]
16
+ lines:
17
+ - product: seats
18
+ quantity: 10
19
+ - product: support
20
+ quantity: 1
21
+ blocks:
22
+ - kind: paragraph
23
+ text: Signed.
24
+ - { kind: quiz, question: Renew next year? }
25
+ attributes:
26
+ region: 3
27
+ ---
28
+
29
+ ## Description
30
+
31
+ The yearly renewal.
@@ -0,0 +1,56 @@
1
+ $defs:
2
+ address:
3
+ type: object
4
+ properties:
5
+ city: { type: string }
6
+ country: { type: string, pattern: '^[A-Z]{2}$' }
7
+ required: [city]
8
+ company:
9
+ properties:
10
+ name: { type: string }
11
+ deal:
12
+ type: object
13
+ properties:
14
+ title: { type: string, minLength: 1, maxLength: 40 }
15
+ company: { type: string, reference: company }
16
+ stage: { enum: [lead, proposal, won, lost], default: lead }
17
+ amount: { type: integer, minimum: 0 }
18
+ probability: { type: number, minimum: 0, maximum: 1 }
19
+ open: { type: boolean }
20
+ closes_at: { type: string, format: date-time }
21
+ contact_email: { type: string, format: email }
22
+ note: { type: [string, 'null'] }
23
+ shipping: { $ref: '#/$defs/address' }
24
+ tags: { type: array, items: { type: string }, maxItems: 3 }
25
+ lines:
26
+ type: array
27
+ items:
28
+ type: object
29
+ properties:
30
+ product: { type: string }
31
+ quantity: { type: integer, minimum: 1 }
32
+ required: [product, quantity]
33
+ blocks:
34
+ type: array
35
+ items:
36
+ oneOf:
37
+ - properties:
38
+ kind: { const: paragraph }
39
+ text: { type: string }
40
+ required: [kind, text]
41
+ - properties:
42
+ kind: { const: quiz }
43
+ question: { type: string }
44
+ required: [kind, question]
45
+ attributes:
46
+ type: object
47
+ additionalProperties: { type: string }
48
+ required: [title, company, stage]
49
+ if:
50
+ properties:
51
+ stage: { const: won }
52
+ required: [stage]
53
+ then:
54
+ required: [amount]
55
+ sections:
56
+ Description: { kind: text }
@@ -0,0 +1 @@
1
+ { "binaryTargets": [] }
@@ -0,0 +1,6 @@
1
+ {
2
+ "verdict": "refuse",
3
+ "file": "item.md",
4
+ "location": "/__proto__",
5
+ "rule": "undeclared-field"
6
+ }
@@ -0,0 +1,9 @@
1
+ ---
2
+ type: task
3
+ title: Ship
4
+ __proto__: Ada
5
+ ---
6
+
7
+ ## Description
8
+
9
+ Go.
@@ -0,0 +1,6 @@
1
+ task:
2
+ properties:
3
+ title: { type: string }
4
+ required: [title]
5
+ sections:
6
+ Description: { kind: text, required: true }
@@ -1,6 +1,5 @@
1
1
  {
2
2
  "verdict": "refuse",
3
3
  "file": "notes/draft.md",
4
- "rule": "unresolved-link",
5
- "version": "<package-version>"
4
+ "rule": "unresolved-link"
6
5
  }
@@ -2,6 +2,5 @@
2
2
  "verdict": "refuse",
3
3
  "file": "people/ada.md",
4
4
  "rule": "referenced-missing-file",
5
- "version": "<package-version>",
6
5
  "referrers": ["a.md", "b.md"]
7
6
  }
@@ -0,0 +1,11 @@
1
+ person:
2
+ properties:
3
+ name: { type: string }
4
+ required: [name]
5
+ task:
6
+ properties:
7
+ title: { type: string }
8
+ owner: { type: string, reference: person }
9
+ required: [title, owner]
10
+ sections:
11
+ Description: { kind: text, required: true }
@@ -0,0 +1 @@
1
+ { "binaryTargets": [] }
@@ -0,0 +1,5 @@
1
+ {
2
+ "verdict": "refuse",
3
+ "location": "/deal/properties/shipping/$ref",
4
+ "rule": "$ref"
5
+ }
@@ -0,0 +1,3 @@
1
+ deal:
2
+ properties:
3
+ shipping: { $ref: 'https://example.com/address.json' }
@@ -0,0 +1 @@
1
+ { "binaryTargets": [] }
@@ -0,0 +1,5 @@
1
+ {
2
+ "verdict": "refuse",
3
+ "location": "/person/member_document",
4
+ "rule": "member_document"
5
+ }
@@ -0,0 +1,4 @@
1
+ contact:
2
+ member_document: true
3
+ person:
4
+ member_document: true
@@ -0,0 +1 @@
1
+ { "binaryTargets": [] }
@@ -0,0 +1,6 @@
1
+ {
2
+ "verdict": "refuse",
3
+ "file": "task.md",
4
+ "location": "Stages",
5
+ "rule": "structured-section"
6
+ }
@@ -0,0 +1,8 @@
1
+ ---
2
+ type: task
3
+ ---
4
+
5
+ ## Stages
6
+
7
+ - draft
8
+ - shipped
@@ -0,0 +1,3 @@
1
+ task:
2
+ sections:
3
+ Stages: { kind: list, items: { enum: [draft, done] } }
@@ -0,0 +1 @@
1
+ { "binaryTargets": [] }
@@ -0,0 +1,6 @@
1
+ {
2
+ "verdict": "refuse",
3
+ "file": "task.md",
4
+ "location": "Estimates",
5
+ "rule": "structured-section"
6
+ }
@@ -0,0 +1,8 @@
1
+ ---
2
+ type: task
3
+ ---
4
+
5
+ ## Estimates
6
+
7
+ - 3
8
+ - not a number
@@ -0,0 +1,3 @@
1
+ task:
2
+ sections:
3
+ Estimates: { kind: list, items: { type: number } }
@@ -0,0 +1 @@
1
+ { "binaryTargets": [] }
@@ -0,0 +1 @@
1
+ { "verdict": "accept" }
@@ -0,0 +1,3 @@
1
+ ---
2
+ type: page
3
+ ---