@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.
- package/API.md +300 -0
- package/README.md +34 -175
- package/dist/blocks.d.ts +11 -0
- package/dist/blocks.d.ts.map +1 -0
- package/dist/blocks.js +62 -0
- package/dist/condition.d.ts +137 -0
- package/dist/condition.d.ts.map +1 -0
- package/dist/condition.js +394 -0
- package/dist/definition.d.ts +42 -25
- package/dist/definition.d.ts.map +1 -1
- package/dist/definition.js +473 -146
- package/dist/divide.d.ts +3 -0
- package/dist/divide.d.ts.map +1 -0
- package/dist/divide.js +310 -0
- package/dist/document.d.ts +2 -0
- package/dist/document.d.ts.map +1 -1
- package/dist/document.js +89 -120
- package/dist/fields.d.ts +4 -0
- package/dist/fields.d.ts.map +1 -0
- package/dist/fields.js +3 -0
- package/dist/index.d.ts +9 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -3
- package/dist/links.d.ts +1 -0
- package/dist/links.d.ts.map +1 -1
- package/dist/links.js +618 -224
- package/dist/paths.d.ts +2 -3
- package/dist/paths.d.ts.map +1 -1
- package/dist/paths.js +27 -37
- package/dist/profile.js +1 -3
- package/dist/project.d.ts +19 -1
- package/dist/project.d.ts.map +1 -1
- package/dist/project.js +82 -73
- package/dist/refuse.d.ts.map +1 -1
- package/dist/refuse.js +2 -10
- package/dist/schema.d.ts +7 -5
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +156 -41
- package/dist/sections.d.ts +2 -1
- package/dist/sections.d.ts.map +1 -1
- package/dist/sections.js +45 -67
- package/dist/types.d.ts +30 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +1 -3
- package/dist/validate.d.ts +3 -2
- package/dist/validate.d.ts.map +1 -1
- package/dist/validate.js +138 -136
- package/dist/version.d.ts +1 -1
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +1 -3
- package/dist/yaml.d.ts +2 -0
- package/dist/yaml.d.ts.map +1 -1
- package/dist/yaml.js +255 -191
- package/fixtures/README.md +85 -55
- package/fixtures/cases/absent-optional-field/library/companies/acme.md +4 -0
- package/fixtures/cases/absent-optional-field/library/deals/lead.md +6 -0
- package/fixtures/cases/absent-optional-field/schema.yaml +56 -0
- package/fixtures/cases/binary-any-reference/expected.json +1 -2
- package/fixtures/cases/binary-any-reference/schema.yaml +4 -0
- package/fixtures/cases/binary-document-collision/expected.json +1 -2
- package/fixtures/cases/binary-document-collision/schema.yaml +1 -0
- package/fixtures/cases/binary-link-outside-collection/expected.json +1 -2
- package/fixtures/cases/binary-link-outside-collection/schema.yaml +1 -0
- package/fixtures/cases/binary-prototype-reference/expected.json +1 -2
- package/fixtures/cases/binary-prototype-reference/schema.yaml +4 -0
- package/fixtures/cases/binary-typed-reference/expected.json +1 -2
- package/fixtures/cases/binary-typed-reference/schema.yaml +5 -0
- package/fixtures/cases/boolean-field/context.json +1 -0
- package/fixtures/cases/boolean-field/expected.json +6 -0
- package/fixtures/cases/boolean-field/library/companies/acme.md +4 -0
- package/fixtures/cases/boolean-field/library/deals/renewal.md +31 -0
- package/fixtures/cases/boolean-field/schema.yaml +56 -0
- package/fixtures/cases/bracketed-link-definition/schema.yaml +6 -0
- package/fixtures/cases/closed-nested-object/context.json +1 -0
- package/fixtures/cases/closed-nested-object/expected.json +6 -0
- package/fixtures/cases/closed-nested-object/library/companies/acme.md +4 -0
- package/fixtures/cases/closed-nested-object/library/deals/renewal.md +32 -0
- package/fixtures/cases/closed-nested-object/schema.yaml +56 -0
- package/fixtures/cases/composed-root-reference/context.json +1 -0
- package/fixtures/cases/composed-root-reference/expected.json +6 -0
- package/fixtures/cases/composed-root-reference/library/a.md +5 -0
- package/fixtures/cases/composed-root-reference/schema.yaml +13 -0
- package/fixtures/cases/date-time-format/context.json +1 -0
- package/fixtures/cases/date-time-format/expected.json +6 -0
- package/fixtures/cases/date-time-format/library/companies/acme.md +4 -0
- package/fixtures/cases/date-time-format/library/deals/renewal.md +31 -0
- package/fixtures/cases/date-time-format/schema.yaml +56 -0
- package/fixtures/cases/declared-binary-links/schema.yaml +1 -0
- package/fixtures/cases/default-unfilled/context.json +1 -0
- package/fixtures/cases/default-unfilled/expected.json +6 -0
- package/fixtures/cases/default-unfilled/library/companies/acme.md +4 -0
- package/fixtures/cases/default-unfilled/library/deals/renewal.md +29 -0
- package/fixtures/cases/default-unfilled/schema.yaml +56 -0
- package/fixtures/cases/defs-pattern/context.json +1 -0
- package/fixtures/cases/defs-pattern/expected.json +6 -0
- package/fixtures/cases/defs-pattern/library/companies/acme.md +4 -0
- package/fixtures/cases/defs-pattern/library/deals/renewal.md +31 -0
- package/fixtures/cases/defs-pattern/schema.yaml +56 -0
- package/fixtures/cases/dependent-rule/context.json +1 -0
- package/fixtures/cases/dependent-rule/expected.json +6 -0
- package/fixtures/cases/dependent-rule/library/companies/acme.md +4 -0
- package/fixtures/cases/dependent-rule/library/deals/renewal.md +30 -0
- package/fixtures/cases/dependent-rule/schema.yaml +56 -0
- package/fixtures/cases/duplicate-link-definition/schema.yaml +6 -0
- package/fixtures/cases/email-format/context.json +1 -0
- package/fixtures/cases/email-format/expected.json +6 -0
- package/fixtures/cases/email-format/library/companies/acme.md +4 -0
- package/fixtures/cases/email-format/library/deals/renewal.md +31 -0
- package/fixtures/cases/email-format/schema.yaml +56 -0
- package/fixtures/cases/fenced-link-definition/schema.yaml +6 -0
- package/fixtures/cases/field-enum/expected.json +2 -3
- package/fixtures/cases/field-enum/schema.yaml +7 -0
- package/fixtures/cases/frontmatter-schema/context.json +1 -0
- package/fixtures/cases/frontmatter-schema/expected.json +5 -0
- package/fixtures/cases/frontmatter-schema/schema.yaml +5 -0
- package/fixtures/cases/integer-field/context.json +1 -0
- package/fixtures/cases/integer-field/expected.json +6 -0
- package/fixtures/cases/integer-field/library/companies/acme.md +4 -0
- package/fixtures/cases/integer-field/library/deals/renewal.md +31 -0
- package/fixtures/cases/integer-field/schema.yaml +56 -0
- package/fixtures/cases/interrupted-link-definition/schema.yaml +1 -0
- package/fixtures/cases/json-schema-constructs/context.json +1 -0
- package/fixtures/cases/json-schema-constructs/expected.json +1 -0
- package/fixtures/cases/json-schema-constructs/library/companies/acme.md +4 -0
- package/fixtures/cases/json-schema-constructs/library/deals/renewal.md +31 -0
- package/fixtures/cases/json-schema-constructs/schema.yaml +56 -0
- package/fixtures/cases/list-of-objects-closed/context.json +1 -0
- package/fixtures/cases/list-of-objects-closed/expected.json +6 -0
- package/fixtures/cases/list-of-objects-closed/library/companies/acme.md +4 -0
- package/fixtures/cases/list-of-objects-closed/library/deals/renewal.md +32 -0
- package/fixtures/cases/list-of-objects-closed/schema.yaml +56 -0
- package/fixtures/cases/list-of-objects-item/context.json +1 -0
- package/fixtures/cases/list-of-objects-item/expected.json +6 -0
- package/fixtures/cases/list-of-objects-item/library/companies/acme.md +4 -0
- package/fixtures/cases/list-of-objects-item/library/deals/renewal.md +31 -0
- package/fixtures/cases/list-of-objects-item/schema.yaml +56 -0
- package/fixtures/cases/list-size/context.json +1 -0
- package/fixtures/cases/list-size/expected.json +6 -0
- package/fixtures/cases/list-size/library/companies/acme.md +4 -0
- package/fixtures/cases/list-size/library/deals/renewal.md +31 -0
- package/fixtures/cases/list-size/schema.yaml +56 -0
- package/fixtures/cases/long-fence-link-definition/schema.yaml +1 -0
- package/fixtures/cases/malformed-definition/expected.json +2 -4
- package/fixtures/cases/malformed-definition/schema.yaml +3 -0
- package/fixtures/cases/member-document/context.json +1 -0
- package/fixtures/cases/member-document/expected.json +1 -0
- package/fixtures/cases/member-document/library/people/ana.md +5 -0
- package/fixtures/cases/member-document/schema.yaml +5 -0
- package/fixtures/cases/missing-binary-image/expected.json +1 -2
- package/fixtures/cases/missing-binary-image/schema.yaml +1 -0
- package/fixtures/cases/missing-binary-link/expected.json +1 -2
- package/fixtures/cases/missing-binary-link/schema.yaml +1 -0
- package/fixtures/cases/missing-required-field/expected.json +2 -3
- package/fixtures/cases/missing-required-field/schema.yaml +7 -0
- package/fixtures/cases/missing-section-item-kind/context.json +1 -0
- package/fixtures/cases/missing-section-item-kind/expected.json +5 -0
- package/fixtures/cases/missing-section-item-kind/schema.yaml +6 -0
- package/fixtures/cases/misspelled-key/context.json +1 -0
- package/fixtures/cases/misspelled-key/expected.json +6 -0
- package/fixtures/cases/misspelled-key/library/companies/acme.md +4 -0
- package/fixtures/cases/misspelled-key/library/deals/renewal.md +32 -0
- package/fixtures/cases/misspelled-key/schema.yaml +56 -0
- package/fixtures/cases/nested-defs/context.json +1 -0
- package/fixtures/cases/nested-defs/expected.json +6 -0
- package/fixtures/cases/nested-defs/library/deal.md +6 -0
- package/fixtures/cases/nested-defs/schema.yaml +11 -0
- package/fixtures/cases/nested-required-field/context.json +1 -0
- package/fixtures/cases/nested-required-field/expected.json +6 -0
- package/fixtures/cases/nested-required-field/library/companies/acme.md +4 -0
- package/fixtures/cases/nested-required-field/library/deals/renewal.md +30 -0
- package/fixtures/cases/nested-required-field/schema.yaml +56 -0
- package/fixtures/cases/null-refused/context.json +1 -0
- package/fixtures/cases/null-refused/expected.json +6 -0
- package/fixtures/cases/null-refused/library/companies/acme.md +4 -0
- package/fixtures/cases/null-refused/library/deals/renewal.md +31 -0
- package/fixtures/cases/null-refused/schema.yaml +56 -0
- package/fixtures/cases/numeric-range/context.json +1 -0
- package/fixtures/cases/numeric-range/expected.json +6 -0
- package/fixtures/cases/numeric-range/library/companies/acme.md +4 -0
- package/fixtures/cases/numeric-range/library/deals/renewal.md +31 -0
- package/fixtures/cases/numeric-range/schema.yaml +56 -0
- package/fixtures/cases/one-of-variant/context.json +1 -0
- package/fixtures/cases/one-of-variant/expected.json +6 -0
- package/fixtures/cases/one-of-variant/library/companies/acme.md +4 -0
- package/fixtures/cases/one-of-variant/library/deals/renewal.md +31 -0
- package/fixtures/cases/one-of-variant/schema.yaml +56 -0
- package/fixtures/cases/open-map-value/context.json +1 -0
- package/fixtures/cases/open-map-value/expected.json +6 -0
- package/fixtures/cases/open-map-value/library/companies/acme.md +4 -0
- package/fixtures/cases/open-map-value/library/deals/renewal.md +31 -0
- package/fixtures/cases/open-map-value/schema.yaml +56 -0
- package/fixtures/cases/paragraph-link-definition/schema.yaml +1 -0
- package/fixtures/cases/prototype-field/context.json +1 -0
- package/fixtures/cases/prototype-field/expected.json +6 -0
- package/fixtures/cases/prototype-field/library/item.md +9 -0
- package/fixtures/cases/prototype-field/schema.yaml +6 -0
- package/fixtures/cases/quoted-link-definition/expected.json +1 -2
- package/fixtures/cases/quoted-link-definition/schema.yaml +1 -0
- package/fixtures/cases/referenced-missing-file/expected.json +0 -1
- package/fixtures/cases/referenced-missing-file/schema.yaml +11 -0
- package/fixtures/cases/remote-ref/context.json +1 -0
- package/fixtures/cases/remote-ref/expected.json +5 -0
- package/fixtures/cases/remote-ref/schema.yaml +3 -0
- package/fixtures/cases/second-member-document/context.json +1 -0
- package/fixtures/cases/second-member-document/expected.json +5 -0
- package/fixtures/cases/second-member-document/schema.yaml +4 -0
- package/fixtures/cases/section-item-enum/context.json +1 -0
- package/fixtures/cases/section-item-enum/expected.json +6 -0
- package/fixtures/cases/section-item-enum/library/task.md +8 -0
- package/fixtures/cases/section-item-enum/schema.yaml +3 -0
- package/fixtures/cases/section-item-kind/context.json +1 -0
- package/fixtures/cases/section-item-kind/expected.json +6 -0
- package/fixtures/cases/section-item-kind/library/task.md +8 -0
- package/fixtures/cases/section-item-kind/schema.yaml +3 -0
- package/fixtures/cases/section-items/context.json +1 -0
- package/fixtures/cases/section-items/expected.json +1 -0
- package/fixtures/cases/section-items/library/other.md +3 -0
- package/fixtures/cases/section-items/library/page.md +42 -0
- package/fixtures/cases/section-items/schema.yaml +10 -0
- package/fixtures/cases/section-reference-path/context.json +1 -0
- package/fixtures/cases/section-reference-path/expected.json +6 -0
- package/fixtures/cases/section-reference-path/library/other.md +3 -0
- package/fixtures/cases/section-reference-path/library/page.md +7 -0
- package/fixtures/cases/section-reference-path/schema.yaml +3 -0
- package/fixtures/cases/section-reference-type/context.json +1 -0
- package/fixtures/cases/section-reference-type/expected.json +6 -0
- package/fixtures/cases/section-reference-type/library/note.md +1 -0
- package/fixtures/cases/section-reference-type/library/page.md +7 -0
- package/fixtures/cases/section-reference-type/schema.yaml +3 -0
- package/fixtures/cases/shortcut-reference-link/context.json +1 -0
- package/fixtures/cases/shortcut-reference-link/expected.json +5 -0
- package/fixtures/cases/shortcut-reference-link/library/item.md +10 -0
- package/fixtures/cases/shortcut-reference-link/schema.yaml +6 -0
- package/fixtures/cases/string-length/context.json +1 -0
- package/fixtures/cases/string-length/expected.json +6 -0
- package/fixtures/cases/string-length/library/companies/acme.md +4 -0
- package/fixtures/cases/string-length/library/deals/renewal.md +31 -0
- package/fixtures/cases/string-length/schema.yaml +56 -0
- package/fixtures/cases/structured-section/expected.json +1 -2
- package/fixtures/cases/structured-section/schema.yaml +7 -0
- package/fixtures/cases/submission-keys/context.json +1 -0
- package/fixtures/cases/submission-keys/expected.json +1 -0
- package/fixtures/cases/submission-keys/library/notes/visitor.md +8 -0
- package/fixtures/cases/submission-keys/schema.yaml +4 -0
- package/fixtures/cases/text-field-kind/context.json +1 -0
- package/fixtures/cases/text-field-kind/expected.json +6 -0
- package/fixtures/cases/text-field-kind/library/page.md +4 -0
- package/fixtures/cases/text-field-kind/schema.yaml +4 -0
- package/fixtures/cases/truncated-link-definition/expected.json +1 -2
- package/fixtures/cases/truncated-link-definition/schema.yaml +1 -0
- package/fixtures/cases/types-folder-content/context.json +1 -0
- package/fixtures/cases/types-folder-content/expected.json +1 -0
- package/fixtures/cases/types-folder-content/library/types/task.md +4 -0
- package/fixtures/cases/types-folder-content/schema.yaml +4 -0
- package/fixtures/cases/unclosed-frontmatter/expected.json +1 -2
- package/fixtures/cases/undeclared-field/context.json +1 -0
- package/fixtures/cases/undeclared-field/expected.json +6 -0
- package/fixtures/cases/undeclared-field/library/item.md +9 -0
- package/fixtures/cases/undeclared-field/schema.yaml +6 -0
- package/fixtures/cases/unevaluated-items-closed/context.json +1 -0
- package/fixtures/cases/unevaluated-items-closed/expected.json +6 -0
- package/fixtures/cases/unevaluated-items-closed/library/trip.md +6 -0
- package/fixtures/cases/unevaluated-items-closed/schema.yaml +10 -0
- package/fixtures/cases/unknown-type/context.json +1 -0
- package/fixtures/cases/unknown-type/expected.json +6 -0
- package/fixtures/cases/unknown-type/library/item.md +3 -0
- package/fixtures/cases/unknown-type/schema.yaml +3 -0
- package/fixtures/cases/unlisted-reference-type/context.json +1 -0
- package/fixtures/cases/unlisted-reference-type/expected.json +5 -0
- package/fixtures/cases/unlisted-reference-type/schema.yaml +3 -0
- package/fixtures/cases/unresolved-link/expected.json +1 -2
- package/fixtures/cases/unresolved-link/schema.yaml +6 -0
- package/fixtures/cases/valid-typed-document/library/tasks/one.md +1 -0
- package/fixtures/cases/valid-typed-document/schema.yaml +16 -0
- package/fixtures/cases/wide-item-fence-link/schema.yaml +1 -0
- package/fixtures/division.json +409 -0
- package/fixtures/projection.json +109 -28
- package/package.json +3 -12
- package/dist/definition.js.map +0 -1
- package/dist/document.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/links.js.map +0 -1
- package/dist/paths.js.map +0 -1
- package/dist/profile.js.map +0 -1
- package/dist/project.js.map +0 -1
- package/dist/refuse.js.map +0 -1
- package/dist/schema.js.map +0 -1
- package/dist/sections.js.map +0 -1
- package/dist/types.js.map +0 -1
- package/dist/validate.js.map +0 -1
- package/dist/version.js.map +0 -1
- package/dist/yaml.js.map +0 -1
- package/fixtures/cases/binary-any-reference/library/types/note.md +0 -5
- package/fixtures/cases/binary-document-collision/library/types/note.md +0 -3
- package/fixtures/cases/binary-link-outside-collection/library/types/note.md +0 -3
- package/fixtures/cases/binary-prototype-reference/library/types/note.md +0 -5
- package/fixtures/cases/binary-typed-reference/library/types/note.md +0 -5
- package/fixtures/cases/binary-typed-reference/library/types/person.md +0 -3
- package/fixtures/cases/bracketed-link-definition/library/types/task.md +0 -7
- package/fixtures/cases/declared-binary-links/library/types/note.md +0 -3
- package/fixtures/cases/duplicate-link-definition/library/types/task.md +0 -7
- package/fixtures/cases/fenced-link-definition/library/types/task.md +0 -7
- package/fixtures/cases/field-enum/library/types/task.md +0 -8
- package/fixtures/cases/interrupted-link-definition/library/types/note.md +0 -3
- package/fixtures/cases/long-fence-link-definition/library/types/note.md +0 -3
- package/fixtures/cases/malformed-definition/library/types/task.md +0 -5
- package/fixtures/cases/missing-binary-image/library/types/note.md +0 -3
- package/fixtures/cases/missing-binary-link/library/types/note.md +0 -3
- package/fixtures/cases/missing-required-field/library/types/task.md +0 -8
- package/fixtures/cases/paragraph-link-definition/library/types/note.md +0 -3
- package/fixtures/cases/prd-definition/library/types/task.md +0 -15
- package/fixtures/cases/quoted-link-definition/library/types/note.md +0 -3
- package/fixtures/cases/referenced-missing-file/library/types/person.md +0 -5
- package/fixtures/cases/referenced-missing-file/library/types/task.md +0 -8
- package/fixtures/cases/structured-section/library/types/task.md +0 -8
- package/fixtures/cases/truncated-link-definition/library/types/note.md +0 -3
- package/fixtures/cases/unresolved-link/library/types/task.md +0 -7
- package/fixtures/cases/valid-typed-document/library/types/person.md +0 -5
- package/fixtures/cases/valid-typed-document/library/types/task.md +0 -12
- package/fixtures/cases/wide-item-fence-link/library/types/note.md +0 -3
- package/markdown-syntax-profile.md +0 -9
- /package/fixtures/cases/{prd-definition → absent-optional-field}/context.json +0 -0
- /package/fixtures/cases/{prd-definition → absent-optional-field}/expected.json +0 -0
|
@@ -0,0 +1,409 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "task:\n type: object\n properties:\n name: { type: string }\n status: { enum: [open, done] }\n required: [status]\n sections:\n Description: { kind: text, required: true }\n Acceptance: { kind: list, items: { type: string, reference: person } }\nperson: {}\n",
|
|
3
|
+
"cases": [
|
|
4
|
+
{
|
|
5
|
+
"name": "a Document whose whole input fits the budget is one Span carrying its projection",
|
|
6
|
+
"file": "tasks/one.md",
|
|
7
|
+
"source": "---\ntype: task\nname: Ship the release\nstatus: open\n---\n\nPreamble prose.\n\n## Description\n\nBody of the description.\n\n## Acceptance\n\n- people/ana.md\n",
|
|
8
|
+
"documentTargets": [],
|
|
9
|
+
"definition": "task",
|
|
10
|
+
"budget": 4096,
|
|
11
|
+
"expected": {
|
|
12
|
+
"ok": true,
|
|
13
|
+
"spans": [
|
|
14
|
+
{
|
|
15
|
+
"text": "Ship the release\n\n\nPreamble prose.\n\n## Description\n\nBody of the description.\n\n",
|
|
16
|
+
"source": "Ship the release\nstatus: open\n---\n\nPreamble prose.\n\n## Description\n\nBody of the description.\n\n"
|
|
17
|
+
}
|
|
18
|
+
]
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"name": "an input over the budget descends to whole heading nodes and packs adjacent siblings",
|
|
23
|
+
"file": "tasks/one.md",
|
|
24
|
+
"source": "---\ntype: task\nname: Ship the release\nstatus: open\n---\n\nPreamble prose.\n\n## Description\n\nBody of the description.\n\n## Notes\n\nNotes prose.\n\n## Acceptance\n\n- people/ana.md\n",
|
|
25
|
+
"documentTargets": [],
|
|
26
|
+
"definition": "task",
|
|
27
|
+
"budget": 45,
|
|
28
|
+
"expected": {
|
|
29
|
+
"ok": true,
|
|
30
|
+
"spans": [
|
|
31
|
+
{
|
|
32
|
+
"text": "Ship the release\n\n\nPreamble prose.\n\n",
|
|
33
|
+
"source": "Ship the release\nstatus: open\n---\n\nPreamble prose.\n\n"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"text": "## Description\n\nBody of the description.\n\n",
|
|
37
|
+
"source": "## Description\n\nBody of the description.\n\n"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"text": "## Notes\n\nNotes prose.\n\n",
|
|
41
|
+
"source": "## Notes\n\nNotes prose.\n\n"
|
|
42
|
+
}
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"name": "a heading node over the budget divides into adjacent blocks carrying its own heading",
|
|
48
|
+
"file": "tasks/one.md",
|
|
49
|
+
"source": "---\ntype: task\nname: Task\nstatus: open\n---\n\n## Overview\n\nFirst paragraph of the overview.\n\nSecond paragraph of the overview.\n\n## Notes\n\nShort note.\n",
|
|
50
|
+
"documentTargets": [],
|
|
51
|
+
"definition": "task",
|
|
52
|
+
"budget": 50,
|
|
53
|
+
"expected": {
|
|
54
|
+
"ok": true,
|
|
55
|
+
"spans": [
|
|
56
|
+
{
|
|
57
|
+
"text": "Task\n\n\n",
|
|
58
|
+
"source": "Task\nstatus: open\n---\n\n"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"text": "## Overview\n\nFirst paragraph of the overview.\n\n",
|
|
62
|
+
"source": "## Overview\n\nFirst paragraph of the overview.\n\n"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"text": "## Overview\n\nSecond paragraph of the overview.\n\n",
|
|
66
|
+
"source": "Second paragraph of the overview.\n\n"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"text": "## Notes\n\nShort note.\n",
|
|
70
|
+
"source": "## Notes\n\nShort note.\n"
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"name": "a node continuation and the next whole sibling stay in their own Spans",
|
|
77
|
+
"file": "tasks/one.md",
|
|
78
|
+
"source": "---\ntype: task\nname: Task\nstatus: open\n---\n\n## Overview\n\nFirst paragraph of the overview.\n\nSecond paragraph of the overview.\n\n## Notes\n\nShort note.\n",
|
|
79
|
+
"documentTargets": [],
|
|
80
|
+
"definition": "task",
|
|
81
|
+
"budget": 75,
|
|
82
|
+
"expected": {
|
|
83
|
+
"ok": true,
|
|
84
|
+
"spans": [
|
|
85
|
+
{
|
|
86
|
+
"text": "Task\n\n\n",
|
|
87
|
+
"source": "Task\nstatus: open\n---\n\n"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"text": "## Overview\n\nFirst paragraph of the overview.\n\n",
|
|
91
|
+
"source": "## Overview\n\nFirst paragraph of the overview.\n\n"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"text": "## Overview\n\nSecond paragraph of the overview.\n\n",
|
|
95
|
+
"source": "Second paragraph of the overview.\n\n"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"text": "## Notes\n\nShort note.\n",
|
|
99
|
+
"source": "## Notes\n\nShort note.\n"
|
|
100
|
+
}
|
|
101
|
+
]
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"name": "a continuation Span carries its own node heading and never an ancestor heading",
|
|
106
|
+
"file": "tasks/one.md",
|
|
107
|
+
"source": "---\ntype: task\nname: Task\nstatus: open\n---\n\n## Overview\n\nIntro line.\n\n### Detail\n\nDetail paragraph one.\n\nDetail paragraph two.\n",
|
|
108
|
+
"documentTargets": [],
|
|
109
|
+
"definition": "task",
|
|
110
|
+
"budget": 40,
|
|
111
|
+
"expected": {
|
|
112
|
+
"ok": true,
|
|
113
|
+
"spans": [
|
|
114
|
+
{
|
|
115
|
+
"text": "Task\n\n\n",
|
|
116
|
+
"source": "Task\nstatus: open\n---\n\n"
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"text": "## Overview\n\nIntro line.\n\n",
|
|
120
|
+
"source": "## Overview\n\nIntro line.\n\n"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"text": "### Detail\n\nDetail paragraph one.\n\n",
|
|
124
|
+
"source": "### Detail\n\nDetail paragraph one.\n\n"
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"text": "### Detail\n\nDetail paragraph two.\n",
|
|
128
|
+
"source": "Detail paragraph two.\n"
|
|
129
|
+
}
|
|
130
|
+
]
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"name": "a block over the budget divides into sentences that repeat their predecessor",
|
|
135
|
+
"file": "tasks/one.md",
|
|
136
|
+
"source": "---\ntype: task\nname: Task\nstatus: open\n---\n\n## Overview\n\nOne. Two. Three. Four.\n",
|
|
137
|
+
"documentTargets": [],
|
|
138
|
+
"definition": "task",
|
|
139
|
+
"budget": 30,
|
|
140
|
+
"expected": {
|
|
141
|
+
"ok": true,
|
|
142
|
+
"spans": [
|
|
143
|
+
{
|
|
144
|
+
"text": "Task\n\n\n",
|
|
145
|
+
"source": "Task\nstatus: open\n---\n\n"
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"text": "## Overview\n\nOne. Two. Three. ",
|
|
149
|
+
"source": "## Overview\n\nOne. Two. Three. "
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"text": "## Overview\n\nThree. Four.\n",
|
|
153
|
+
"source": "Three. Four.\n"
|
|
154
|
+
}
|
|
155
|
+
]
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"name": "a single sentence over the budget divides at a bound cut inside it",
|
|
160
|
+
"file": "tasks/one.md",
|
|
161
|
+
"source": "---\ntype: task\nname: Task\nstatus: open\n---\n\n## Overview\n\naaaa bbbb cccc dddd eeee\n",
|
|
162
|
+
"documentTargets": [],
|
|
163
|
+
"definition": "task",
|
|
164
|
+
"budget": 20,
|
|
165
|
+
"expected": {
|
|
166
|
+
"ok": true,
|
|
167
|
+
"spans": [
|
|
168
|
+
{
|
|
169
|
+
"text": "Task\n\n\n",
|
|
170
|
+
"source": "Task\nstatus: open\n---\n\n"
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"text": "## Overview\n\naaaa",
|
|
174
|
+
"source": "## Overview\n\naaaa"
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"text": "## Overview\n\n bbbb",
|
|
178
|
+
"source": " bbbb"
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
"text": "## Overview\n\n cccc",
|
|
182
|
+
"source": " cccc"
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"text": "## Overview\n\n dddd",
|
|
186
|
+
"source": " dddd"
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"text": "## Overview\n\n eeee\n",
|
|
190
|
+
"source": " eeee\n"
|
|
191
|
+
}
|
|
192
|
+
]
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"name": "an untyped input with no definition descends the same ladder",
|
|
197
|
+
"file": "notes/one.md",
|
|
198
|
+
"source": "# Title\n\nIntro paragraph about the whole thing.\n\n## Alpha\n\nAlpha one. Alpha two.\n\n### Deep\n\nDeep prose here.\n\n## Beta\n\nBeta prose.\n",
|
|
199
|
+
"documentTargets": [],
|
|
200
|
+
"definition": null,
|
|
201
|
+
"budget": 60,
|
|
202
|
+
"expected": {
|
|
203
|
+
"ok": true,
|
|
204
|
+
"spans": [
|
|
205
|
+
{
|
|
206
|
+
"text": "# Title\n\nIntro paragraph about the whole thing.\n\n",
|
|
207
|
+
"source": "# Title\n\nIntro paragraph about the whole thing.\n\n"
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
"text": "## Alpha\n\nAlpha one. Alpha two.\n\n",
|
|
211
|
+
"source": "## Alpha\n\nAlpha one. Alpha two.\n\n"
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
"text": "### Deep\n\nDeep prose here.\n\n",
|
|
215
|
+
"source": "### Deep\n\nDeep prose here.\n\n"
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
"text": "## Beta\n\nBeta prose.\n",
|
|
219
|
+
"source": "## Beta\n\nBeta prose.\n"
|
|
220
|
+
}
|
|
221
|
+
]
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
"name": "a Document that declares the built-in any type divides its body after the fence",
|
|
226
|
+
"file": "notes/two.md",
|
|
227
|
+
"source": "---\ntype: any\ntitle: Note\n---\n\n## Notes\n\nRead it.\n",
|
|
228
|
+
"documentTargets": [],
|
|
229
|
+
"definition": null,
|
|
230
|
+
"budget": 4096,
|
|
231
|
+
"expected": {
|
|
232
|
+
"ok": true,
|
|
233
|
+
"spans": [
|
|
234
|
+
{
|
|
235
|
+
"text": "\n## Notes\n\nRead it.\n",
|
|
236
|
+
"source": "\n## Notes\n\nRead it.\n"
|
|
237
|
+
}
|
|
238
|
+
]
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
"name": "an internal link embeds its label and addresses the destination the author wrote",
|
|
243
|
+
"file": "tasks/one.md",
|
|
244
|
+
"source": "---\ntype: task\nname: Task\nstatus: open\n---\n\n## Overview\n\nRead [the plan](../plans/q3.md) before starting.\n\n## Notes\n\nShort note.\n",
|
|
245
|
+
"documentTargets": [
|
|
246
|
+
"plans/q3.md"
|
|
247
|
+
],
|
|
248
|
+
"definition": "task",
|
|
249
|
+
"budget": 50,
|
|
250
|
+
"expected": {
|
|
251
|
+
"ok": true,
|
|
252
|
+
"spans": [
|
|
253
|
+
{
|
|
254
|
+
"text": "Task\n\n\n",
|
|
255
|
+
"source": "Task\nstatus: open\n---\n\n"
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
"text": "## Overview\n\nRead the plan before starting.\n\n",
|
|
259
|
+
"source": "## Overview\n\nRead [the plan](../plans/q3.md) before starting.\n\n"
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
"text": "## Notes\n\nShort note.\n",
|
|
263
|
+
"source": "## Notes\n\nShort note.\n"
|
|
264
|
+
}
|
|
265
|
+
]
|
|
266
|
+
}
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
"name": "a declared structured section stays outside the text and inside the extent",
|
|
270
|
+
"file": "tasks/one.md",
|
|
271
|
+
"source": "---\ntype: task\nname: Task\nstatus: open\n---\n\nPreamble prose.\n\n## Acceptance\n\n- people/ana.md\n\n## Notes\n\nShort note.\n",
|
|
272
|
+
"documentTargets": [],
|
|
273
|
+
"definition": "task",
|
|
274
|
+
"budget": 4096,
|
|
275
|
+
"expected": {
|
|
276
|
+
"ok": true,
|
|
277
|
+
"spans": [
|
|
278
|
+
{
|
|
279
|
+
"text": "Task\n\n\nPreamble prose.\n\n## Notes\n\nShort note.\n",
|
|
280
|
+
"source": "Task\nstatus: open\n---\n\nPreamble prose.\n\n## Acceptance\n\n- people/ana.md\n\n## Notes\n\nShort note.\n"
|
|
281
|
+
}
|
|
282
|
+
]
|
|
283
|
+
}
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
"name": "a Document that declares a type the caller supplies no definition for is refused",
|
|
287
|
+
"file": "tasks/one.md",
|
|
288
|
+
"source": "---\ntype: task\nname: Ship the release\nstatus: open\n---\n\nPreamble prose.\n\n## Description\n\nBody of the description.\n\n## Acceptance\n\n- people/ana.md\n",
|
|
289
|
+
"documentTargets": [],
|
|
290
|
+
"definition": null,
|
|
291
|
+
"budget": 4096,
|
|
292
|
+
"expected": {
|
|
293
|
+
"ok": false,
|
|
294
|
+
"refusal": {
|
|
295
|
+
"file": "tasks/one.md",
|
|
296
|
+
"rule": "unknown-type",
|
|
297
|
+
"location": "type"
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
"name": "a budget that cannot hold one whole character is refused before any division",
|
|
303
|
+
"file": "notes/one.md",
|
|
304
|
+
"source": "## Notes\n\nShort note.\n",
|
|
305
|
+
"documentTargets": [],
|
|
306
|
+
"definition": null,
|
|
307
|
+
"budget": 1,
|
|
308
|
+
"expected": {
|
|
309
|
+
"ok": false,
|
|
310
|
+
"refusal": {
|
|
311
|
+
"file": "notes/one.md",
|
|
312
|
+
"rule": "division-budget"
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
"name": "a free-text value the author quoted embeds bare and addresses the quotes it was written with",
|
|
318
|
+
"file": "tasks/one.md",
|
|
319
|
+
"source": "---\ntype: task\nname: \"Ship: the release\"\nstatus: open\n---\n\nBody prose.\n",
|
|
320
|
+
"documentTargets": [],
|
|
321
|
+
"definition": "task",
|
|
322
|
+
"budget": 4096,
|
|
323
|
+
"expected": {
|
|
324
|
+
"ok": true,
|
|
325
|
+
"spans": [
|
|
326
|
+
{
|
|
327
|
+
"text": "Ship: the release\n\n\nBody prose.\n",
|
|
328
|
+
"source": "\"Ship: the release\"\nstatus: open\n---\n\nBody prose.\n"
|
|
329
|
+
}
|
|
330
|
+
]
|
|
331
|
+
}
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
"name": "sentence division reads every terminator and closer and drops a carry the budget cannot hold",
|
|
335
|
+
"file": "notes/three.md",
|
|
336
|
+
"source": "## Ask\n\nReady? Go! He said \"no.\" Then (silence.) Done.\n",
|
|
337
|
+
"documentTargets": [],
|
|
338
|
+
"definition": null,
|
|
339
|
+
"budget": 30,
|
|
340
|
+
"expected": {
|
|
341
|
+
"ok": true,
|
|
342
|
+
"spans": [
|
|
343
|
+
{
|
|
344
|
+
"text": "## Ask\n\nReady? Go! ",
|
|
345
|
+
"source": "## Ask\n\nReady? Go! "
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
"text": "## Ask\n\nGo! He said \"no.\" ",
|
|
349
|
+
"source": "Go! He said \"no.\" "
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
"text": "## Ask\n\nThen (silence.) Done.\n",
|
|
353
|
+
"source": "Then (silence.) Done.\n"
|
|
354
|
+
}
|
|
355
|
+
]
|
|
356
|
+
}
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
"name": "a heading with no body of its own leads the first child node instead of standing alone",
|
|
360
|
+
"file": "notes/four.md",
|
|
361
|
+
"source": "## Part\n\n### Alpha\n\nAlpha prose that is long enough to matter.\n\n### Beta\n\nBeta prose.\n",
|
|
362
|
+
"documentTargets": [],
|
|
363
|
+
"definition": null,
|
|
364
|
+
"budget": 70,
|
|
365
|
+
"expected": {
|
|
366
|
+
"ok": true,
|
|
367
|
+
"spans": [
|
|
368
|
+
{
|
|
369
|
+
"text": "## Part\n\n### Alpha\n\nAlpha prose that is long enough to matter.\n\n",
|
|
370
|
+
"source": "## Part\n\n### Alpha\n\nAlpha prose that is long enough to matter.\n\n"
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
"text": "### Beta\n\nBeta prose.\n",
|
|
374
|
+
"source": "### Beta\n\nBeta prose.\n"
|
|
375
|
+
}
|
|
376
|
+
]
|
|
377
|
+
}
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
"name": "a heading the budget cannot hold beside any text is not repeated",
|
|
381
|
+
"file": "notes/five.md",
|
|
382
|
+
"source": "## An overview of the release\n\nFirst paragraph here.\n\nSecond paragraph here.\n",
|
|
383
|
+
"documentTargets": [],
|
|
384
|
+
"definition": null,
|
|
385
|
+
"budget": 25,
|
|
386
|
+
"expected": {
|
|
387
|
+
"ok": true,
|
|
388
|
+
"spans": [
|
|
389
|
+
{
|
|
390
|
+
"text": "## An overview of the",
|
|
391
|
+
"source": "## An overview of the"
|
|
392
|
+
},
|
|
393
|
+
{
|
|
394
|
+
"text": " release\n\nFirst paragraph",
|
|
395
|
+
"source": " release\n\nFirst paragraph"
|
|
396
|
+
},
|
|
397
|
+
{
|
|
398
|
+
"text": " here.\n\n",
|
|
399
|
+
"source": " here.\n\n"
|
|
400
|
+
},
|
|
401
|
+
{
|
|
402
|
+
"text": "Second paragraph here.\n",
|
|
403
|
+
"source": "Second paragraph here.\n"
|
|
404
|
+
}
|
|
405
|
+
]
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
]
|
|
409
|
+
}
|
package/fixtures/projection.json
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
"task": "---\ntype: definition\nfields:\n title: { kind: string, required: true }\n status: { kind: enum, values: [open, done], required: true }\n owner: { kind: reference, to: person }\nsections:\n Description: { kind: text, required: true }\n Acceptance: { kind: list }\n---\n",
|
|
4
|
-
"unreadable-task": "---\ntype: definition\nsections:\n Description: { kind: prose }\n---\n"
|
|
5
|
-
},
|
|
2
|
+
"schema": "$defs:\n line: { type: string }\ntask:\n type: object\n properties:\n name: { type: string }\n aliases: { type: array, items: { type: string } }\n title: { type: string, pattern: '\\S' }\n status: { enum: [open, done] }\n owner: { type: string, reference: person }\n reviewers: { type: array, items: { type: string, reference: person } }\n due: { type: string, format: date }\n estimate: { type: number }\n labels: { type: array, items: { type: string, pattern: '^[a-z]+$' } }\n contact:\n type: object\n properties:\n note: { type: string }\n email: { type: string, format: email }\n notes: { type: object, additionalProperties: { type: string } }\n backup: { $ref: '#/$defs/line', format: email }\n memo: { type: [string, 'null'] }\n steps:\n type: array\n items:\n type: object\n properties:\n title: { type: string }\n done: { type: boolean }\n required: [name, title, status]\n sections:\n Description: { kind: text, required: true }\n Acceptance: { kind: list, items: { type: string, reference: person } }\n Checklist: { kind: list, items: { type: string } }\nperson: {}\n",
|
|
6
3
|
"cases": [
|
|
7
4
|
{
|
|
8
5
|
"name": "any body keeps labels and leaves every unsupplied destination authored",
|
|
@@ -59,9 +56,53 @@
|
|
|
59
56
|
}
|
|
60
57
|
},
|
|
61
58
|
{
|
|
62
|
-
"name": "typed Document
|
|
59
|
+
"name": "a typed Document projects its free-text field values as bare values and no other kind",
|
|
60
|
+
"file": "tasks/four.md",
|
|
61
|
+
"source": "---\ntype: task\nname: Ship the release\naliases: [\"Launch day\", Cutover]\ntitle: Ship it\nstatus: open\nowner: ../people/ana.md\ndue: 2026-09-30\nestimate: 3\nlabels: [core, urgent]\n---\n",
|
|
62
|
+
"documentTargets": [],
|
|
63
|
+
"definition": "task",
|
|
64
|
+
"move": null,
|
|
65
|
+
"expected": {
|
|
66
|
+
"ok": true,
|
|
67
|
+
"text": "Ship the release\n\nLaunch day\n\nCutover\n\n"
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"name": "a typed Document projects its prose at any depth in document order and leaves every filtered value out",
|
|
72
|
+
"file": "tasks/twelve.md",
|
|
73
|
+
"source": "---\ntype: task\nname: Ship the release\ntitle: Ship it\nstatus: open\nowner: ../people/ana.md\nreviewers: [../people/bo.md]\ndue: 2026-09-30\ncontact:\n note: Call before noon\n email: ana@example.com\nsteps:\n - title: Tag the build\n done: true\n - title: Announce it\n done: false\n---\n\n## Description\n\nCut the release.\n\n## Acceptance\n\n- [Ana](../people/ana.md)\n\n## Checklist\n\n- Notes written\n",
|
|
74
|
+
"documentTargets": [],
|
|
75
|
+
"definition": "task",
|
|
76
|
+
"move": null,
|
|
77
|
+
"filtered": {
|
|
78
|
+
"field": "status",
|
|
79
|
+
"value": "done"
|
|
80
|
+
},
|
|
81
|
+
"expected": {
|
|
82
|
+
"ok": true,
|
|
83
|
+
"text": "Ship the release\n\nCall before noon\n\nTag the build\n\nAnnounce it\n\n\n## Description\n\nCut the release.\n\n## Checklist\n\n- Notes written\n"
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"name": "a typed Document projects the prose of an open map and a nullable string and leaves a formatted $ref out",
|
|
88
|
+
"file": "tasks/launch.md",
|
|
89
|
+
"source": "---\ntype: task\nname: Plan the launch\ntitle: Plan\nstatus: open\nnotes:\n monday: Book the room\n friday: Send the invite\nbackup: ana@example.com\nmemo: Bring slides\n---\n\n## Description\n\nLaunch.\n",
|
|
90
|
+
"documentTargets": [],
|
|
91
|
+
"definition": "task",
|
|
92
|
+
"move": null,
|
|
93
|
+
"filtered": {
|
|
94
|
+
"field": "backup",
|
|
95
|
+
"value": "bo@example.com"
|
|
96
|
+
},
|
|
97
|
+
"expected": {
|
|
98
|
+
"ok": true,
|
|
99
|
+
"text": "Plan the launch\n\nBook the room\n\nSend the invite\n\nBring slides\n\n\n## Description\n\nLaunch.\n"
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"name": "a typed Document projects its preamble and every section its type does not declare as structure",
|
|
63
104
|
"file": "tasks/one.md",
|
|
64
|
-
"source": "---\ntype: task\ntitle: Ship it\nstatus: open\nowner: ../people/ana.md\n---\n\nPreamble prose that mentions [the plan](../plans/q3.md).\n\n## Description\n\nFollow [the plan][plan] and [the plan][plan] again, then [read it][].\n\n[plan]: ../plans/q3.md \"Plan\"\n[read it]: ../plans/q3.md\n\n## Acceptance\n\n- [the plan](../plans/q3.md) is linked\n\n## Notes\n\nUndeclared prose about [the plan](../plans/q3.md).\n",
|
|
105
|
+
"source": "---\ntype: task\nname: Shipping the release\ntitle: Ship it\nstatus: open\nowner: ../people/ana.md\n---\n\nPreamble prose that mentions [the plan](../plans/q3.md).\n\n## Description\n\nFollow [the plan][plan] and [the plan][plan] again, then [read it][].\n\n[plan]: ../plans/q3.md \"Plan\"\n[read it]: ../plans/q3.md\n\n## Acceptance\n\n- [the plan](../plans/q3.md) is linked\n\n## Checklist\n\n- [the plan](../plans/q3.md) is read\n\n## Notes\n\nUndeclared prose about [the plan](../plans/q3.md).\n",
|
|
65
106
|
"documentTargets": [
|
|
66
107
|
"plans/q3.md",
|
|
67
108
|
"plans/2026-q3.md"
|
|
@@ -71,13 +112,21 @@
|
|
|
71
112
|
"href": "../plans/q3.md",
|
|
72
113
|
"to": "../plans/2026-q3.md"
|
|
73
114
|
},
|
|
115
|
+
"relabel": {
|
|
116
|
+
"from": "[the plan][plan] and",
|
|
117
|
+
"to": "[the roadmap][plan] and",
|
|
118
|
+
"expected": {
|
|
119
|
+
"ok": true,
|
|
120
|
+
"text": "Shipping the release\n\n\nPreamble prose that mentions the plan.\n\n## Description\n\nFollow the roadmap and the plan again, then read it.\n\n\n## Checklist\n\n- the plan is read\n\n## Notes\n\nUndeclared prose about the plan.\n"
|
|
121
|
+
}
|
|
122
|
+
},
|
|
74
123
|
"expected": {
|
|
75
124
|
"ok": true,
|
|
76
|
-
"text": "## Description\n\nFollow the plan and the plan again, then read it.\n\n\n"
|
|
125
|
+
"text": "Shipping the release\n\n\nPreamble prose that mentions the plan.\n\n## Description\n\nFollow the plan and the plan again, then read it.\n\n\n## Checklist\n\n- the plan is read\n\n## Notes\n\nUndeclared prose about the plan.\n"
|
|
77
126
|
}
|
|
78
127
|
},
|
|
79
128
|
{
|
|
80
|
-
"name": "a link definition
|
|
129
|
+
"name": "a link definition in another section resolves its use and leaves the projection",
|
|
81
130
|
"file": "tasks/two.md",
|
|
82
131
|
"source": "---\ntype: task\ntitle: Ship it\nstatus: open\n---\n\n## Description\n\nFollow [the plan][plan].\n\n## Notes\n\n[plan]: ../plans/q3.md\n",
|
|
83
132
|
"documentTargets": [
|
|
@@ -91,7 +140,7 @@
|
|
|
91
140
|
},
|
|
92
141
|
"expected": {
|
|
93
142
|
"ok": true,
|
|
94
|
-
"text": "## Description\n\nFollow the plan.\n\n"
|
|
143
|
+
"text": "\n## Description\n\nFollow the plan.\n\n## Notes\n\n"
|
|
95
144
|
}
|
|
96
145
|
},
|
|
97
146
|
{
|
|
@@ -109,13 +158,13 @@
|
|
|
109
158
|
},
|
|
110
159
|
"expected": {
|
|
111
160
|
"ok": true,
|
|
112
|
-
"text": "## Description\n\nFirst plan.\n\n## Description\n\nSecond note.\n"
|
|
161
|
+
"text": "\n## Description\n\nFirst plan.\n\n## Description\n\nSecond note.\n"
|
|
113
162
|
}
|
|
114
163
|
},
|
|
115
164
|
{
|
|
116
165
|
"name": "a declared type the caller does not supply is refused",
|
|
117
166
|
"file": "tasks/one.md",
|
|
118
|
-
"source": "---\ntype: task\ntitle: Ship it\nstatus: open\nowner: ../people/ana.md\n---\n\nPreamble prose that mentions [the plan](../plans/q3.md).\n\n## Description\n\nFollow [the plan][plan] and [the plan][plan] again, then [read it][].\n\n[plan]: ../plans/q3.md \"Plan\"\n[read it]: ../plans/q3.md\n\n## Acceptance\n\n- [the plan](../plans/q3.md) is linked\n\n## Notes\n\nUndeclared prose about [the plan](../plans/q3.md).\n",
|
|
167
|
+
"source": "---\ntype: task\nname: Shipping the release\ntitle: Ship it\nstatus: open\nowner: ../people/ana.md\n---\n\nPreamble prose that mentions [the plan](../plans/q3.md).\n\n## Description\n\nFollow [the plan][plan] and [the plan][plan] again, then [read it][].\n\n[plan]: ../plans/q3.md \"Plan\"\n[read it]: ../plans/q3.md\n\n## Acceptance\n\n- [the plan](../plans/q3.md) is linked\n\n## Checklist\n\n- [the plan](../plans/q3.md) is read\n\n## Notes\n\nUndeclared prose about [the plan](../plans/q3.md).\n",
|
|
119
168
|
"documentTargets": [
|
|
120
169
|
"plans/q3.md",
|
|
121
170
|
"plans/2026-q3.md"
|
|
@@ -127,35 +176,32 @@
|
|
|
127
176
|
"refusal": {
|
|
128
177
|
"file": "tasks/one.md",
|
|
129
178
|
"rule": "unknown-type",
|
|
130
|
-
"version": "<package-version>",
|
|
131
179
|
"location": "type"
|
|
132
180
|
}
|
|
133
181
|
}
|
|
134
182
|
},
|
|
135
183
|
{
|
|
136
|
-
"name": "a
|
|
137
|
-
"file": "
|
|
138
|
-
"source": "
|
|
184
|
+
"name": "an image at a supplied Markdown document target is projected like its link",
|
|
185
|
+
"file": "notes/four.md",
|
|
186
|
+
"source": "Read [the plan](../plans/q3.md) and .\nAlso [the plan][plan] and ![the chart][plan].\n\n[plan]: ../plans/q3.md\n",
|
|
139
187
|
"documentTargets": [
|
|
140
188
|
"plans/q3.md",
|
|
141
189
|
"plans/2026-q3.md"
|
|
142
190
|
],
|
|
143
|
-
"definition":
|
|
144
|
-
"move":
|
|
191
|
+
"definition": null,
|
|
192
|
+
"move": {
|
|
193
|
+
"href": "../plans/q3.md",
|
|
194
|
+
"to": "../plans/2026-q3.md"
|
|
195
|
+
},
|
|
145
196
|
"expected": {
|
|
146
|
-
"ok":
|
|
147
|
-
"
|
|
148
|
-
"file": "types/task.md",
|
|
149
|
-
"rule": "definition-section-kind",
|
|
150
|
-
"version": "<package-version>",
|
|
151
|
-
"location": "Description"
|
|
152
|
-
}
|
|
197
|
+
"ok": true,
|
|
198
|
+
"text": "Read the plan and the chart.\nAlso the plan and the chart.\n\n"
|
|
153
199
|
}
|
|
154
200
|
},
|
|
155
201
|
{
|
|
156
|
-
"name": "
|
|
157
|
-
"file": "notes/
|
|
158
|
-
"source": "Read [
|
|
202
|
+
"name": "a shortcut reference link projects its label and its definition leaves the projection",
|
|
203
|
+
"file": "notes/five.md",
|
|
204
|
+
"source": "Read [Plan] and [the draft], then [plan](not a link).\nAlso [[Plan]], [ plan ], \\[Plan] and [Release plan].\n\n[plan]: ../plans/q3.md\n[release plan]: ../plans/q3.md\n",
|
|
159
205
|
"documentTargets": [
|
|
160
206
|
"plans/q3.md",
|
|
161
207
|
"plans/2026-q3.md"
|
|
@@ -165,9 +211,44 @@
|
|
|
165
211
|
"href": "../plans/q3.md",
|
|
166
212
|
"to": "../plans/2026-q3.md"
|
|
167
213
|
},
|
|
214
|
+
"links": [
|
|
215
|
+
{
|
|
216
|
+
"href": "../plans/q3.md",
|
|
217
|
+
"target": "plans/q3.md"
|
|
218
|
+
}
|
|
219
|
+
],
|
|
168
220
|
"expected": {
|
|
169
221
|
"ok": true,
|
|
170
|
-
"text": "Read the plan
|
|
222
|
+
"text": "Read Plan and [the draft], then plan(not a link).\nAlso [Plan], plan , \\[Plan] and Release plan.\n\n"
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
"name": "an image whose description holds a link projects both labels",
|
|
227
|
+
"file": "notes/six.md",
|
|
228
|
+
"source": "Read ](../plans/q4.md).\n",
|
|
229
|
+
"documentTargets": [
|
|
230
|
+
"plans/q3.md",
|
|
231
|
+
"plans/2026-q3.md",
|
|
232
|
+
"plans/q4.md"
|
|
233
|
+
],
|
|
234
|
+
"definition": null,
|
|
235
|
+
"move": {
|
|
236
|
+
"href": "../plans/q3.md",
|
|
237
|
+
"to": "../plans/2026-q3.md"
|
|
238
|
+
},
|
|
239
|
+
"links": [
|
|
240
|
+
{
|
|
241
|
+
"href": "../plans/q3.md",
|
|
242
|
+
"target": "plans/q3.md"
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
"href": "../plans/q4.md",
|
|
246
|
+
"target": "plans/q4.md"
|
|
247
|
+
}
|
|
248
|
+
],
|
|
249
|
+
"expected": {
|
|
250
|
+
"ok": true,
|
|
251
|
+
"text": "Read outer Plan.\n"
|
|
171
252
|
}
|
|
172
253
|
}
|
|
173
254
|
]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentshouse/mdmodel",
|
|
3
|
-
"version": "0.1.0-
|
|
3
|
+
"version": "0.1.0-c68e2039f1ca8",
|
|
4
4
|
"description": "MD Type language, parser, validator, structured change application, Markdown syntax profile, and conformance fixtures",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -21,19 +21,10 @@
|
|
|
21
21
|
"files": [
|
|
22
22
|
"dist",
|
|
23
23
|
"fixtures",
|
|
24
|
+
"API.md",
|
|
24
25
|
"LICENSE",
|
|
25
|
-
"README.md"
|
|
26
|
-
"markdown-syntax-profile.md"
|
|
26
|
+
"README.md"
|
|
27
27
|
],
|
|
28
|
-
"repository": {
|
|
29
|
-
"type": "git",
|
|
30
|
-
"url": "git+https://github.com/agentshouse/mdmodel.git",
|
|
31
|
-
"directory": "packages/mdmodel"
|
|
32
|
-
},
|
|
33
|
-
"homepage": "https://github.com/agentshouse/mdmodel#readme",
|
|
34
|
-
"bugs": {
|
|
35
|
-
"url": "https://github.com/agentshouse/mdmodel/issues"
|
|
36
|
-
},
|
|
37
28
|
"dependencies": {
|
|
38
29
|
"@cfworker/json-schema": "4.1.1"
|
|
39
30
|
}
|