mdld-parse 0.9.1 → 0.9.3

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 (59) hide show
  1. package/README.md +34 -1
  2. package/dist/.nojekyll +0 -0
  3. package/dist/CNAME +1 -0
  4. package/dist/README.md +425 -0
  5. package/dist/docs/API.md +397 -0
  6. package/dist/docs/Architecture.md +190 -0
  7. package/dist/docs/Guide.md +322 -0
  8. package/dist/docs/LLM-MDLD-Inducer.md +550 -0
  9. package/dist/docs/Parser.md +654 -0
  10. package/dist/docs/Performance.md +238 -0
  11. package/dist/docs/Spec-render.md +1439 -0
  12. package/dist/docs/Subject.md +180 -0
  13. package/dist/docs/Syntax.md +463 -0
  14. package/dist/docs/TodoList.md +215 -0
  15. package/dist/docs/Use-Cases.md +354 -0
  16. package/dist/docs/index.html +108 -0
  17. package/dist/docs/index.md +56 -0
  18. package/dist/docs/origin.md +459 -0
  19. package/dist/docs/polarity.md +586 -0
  20. package/dist/docs/primary-subject.md +199 -0
  21. package/dist/docs/statements.md +226 -0
  22. package/dist/docs/tokenization-performance-report.md +164 -0
  23. package/dist/examples/Cookbook.md +32 -0
  24. package/dist/examples/Status-SHACL.md +33 -0
  25. package/dist/examples/demo/index.md +35 -0
  26. package/dist/examples/demo/journal.md +18 -0
  27. package/dist/examples/demo/minimal.md +11 -0
  28. package/dist/examples/demo/project.md +15 -0
  29. package/dist/examples/demo/recipe.md +31 -0
  30. package/dist/examples/demo/research.md +46 -0
  31. package/dist/examples/demo/space-mission.md +48 -0
  32. package/dist/examples/dogfood.md +288 -0
  33. package/dist/examples/few-shot.md +309 -0
  34. package/dist/examples/graph/rdf-graph.html +473 -0
  35. package/dist/examples/graph/rdf_force_graph_web_component.html +506 -0
  36. package/dist/examples/index.md +45 -0
  37. package/dist/examples/llm-time-workflow.md +173 -0
  38. package/dist/examples/prov-o.md +2367 -0
  39. package/dist/examples/rdf.md +827 -0
  40. package/dist/examples/shacl.md +3399 -0
  41. package/dist/examples/statements.md +43 -0
  42. package/dist/examples/workflow.md +150 -0
  43. package/dist/index.html +2827 -0
  44. package/dist/index.js +1548 -0
  45. package/dist/logo.svg +7 -0
  46. package/dist/spec/Spec-compact.md +363 -0
  47. package/dist/spec/Spec-ultra.md +221 -0
  48. package/dist/spec/Spec.md +1068 -0
  49. package/dist/spec/index.md +46 -0
  50. package/package.json +13 -8
  51. package/src/constants.js +0 -31
  52. package/src/generate.js +0 -245
  53. package/src/index.js +0 -13
  54. package/src/locate.js +0 -23
  55. package/src/merge.js +0 -157
  56. package/src/parse.js +0 -765
  57. package/src/render.js +0 -576
  58. package/src/shared.js +0 -577
  59. package/src/utils.js +0 -430
@@ -0,0 +1,43 @@
1
+ # MD-LD Elevated Statements Examples
2
+
3
+ This document demonstrates various use cases for elevated statements with PROV-O provenance tracking on level 1 and factual statements on level 2.
4
+
5
+ ---
6
+
7
+ ## Research Project Documentation
8
+
9
+ [my] <tag:research@example.com,2026:>
10
+ [foaf] <http://xmlns.com/foaf/0.1/>
11
+ [ex] <http://example.org/ontology/>
12
+
13
+ ### 2026-03-26T09:00:00Z {=my:research-project .prov:Activity prov:startedAtTime ^^xsd:dateTime}
14
+
15
+ I am leading a **Data Analysis** {=my:research-project .prov:Activity ex:projectType} about semantic web technologies.
16
+
17
+ #### Research Team {=my:team .prov:Collection}
18
+
19
+ Our team includes **Dr. Sarah Chen** {+my:sarah ?member .foaf:Person foaf:name} as the principal investigator, and **Mike Johnson** {+my:mike ?member .foaf:Person foaf:name} as the research assistant.
20
+
21
+ ## Project Kickoff Meeting Documented {=my:kickoff-meeting .rdf:Statement}
22
+ **Dr. Chen** {+my:sarah ?rdf:subject} *led* {+prov:wasAssociatedWith ?rdf:predicate} **the kickoff meeting** {rdf:object} on March 26th.
23
+
24
+ ## Team Formation Established {=my:team-formation .rdf:Statement}
25
+ **Our research project** {+my:research-project ?rdf:subject} *involved* {+prov:hadMember ?rdf:predicate} **Dr. Chen** {+my:sarah ?rdf:object}
26
+
27
+ ---
28
+
29
+ ## Data Collection Phase
30
+
31
+ ### 2026-03-26T10:30:00Z {=my:literature-review .prov:Activity prov:startedAtTime ^^xsd:dateTime}
32
+
33
+ We began reviewing existing literature on **"Semantic Web"** {+my:topic .ex:ResearchTopic ex:domain}.
34
+
35
+ #### Key Findings {=my:findings .prov:Entity}
36
+
37
+ The literature revealed **Limited provenance tracking in current systems** {+my:gap .ex:ResearchGap ex:description} in current provenance tracking systems.
38
+
39
+ ## Literature Review Completed {=my:review-completed .rdf:Statement}
40
+ **Dr. Chen** {+my:sarah ?rdf:subject} *completed* {+prov:generated ?rdf:predicate} **the literature review** {+my:findings ?rdf:object}.
41
+
42
+ ## Research Gap Identified {=my:gap-identified .rdf:Statement}
43
+ **Our literature review** {+my:findings ?rdf:subject} *identified* {+prov:identified ?rdf:predicate} **significant research gaps** {+my:gap ?rdf:object}.
@@ -0,0 +1,150 @@
1
+ [wf] <tag:mdld.workflow.example,2026:>
2
+
3
+ # MDLD Minimal Research Workflow {=wf:workflow .prov:Entity}
4
+
5
+ This document records the full research workflow that produced a
6
+ minimal SHACL validation model for MDLD workspaces.
7
+
8
+ The workflow is self-contained and reproducible.
9
+ Every step is represented as a provenance activity that consumes
10
+ entities and generates new entities.
11
+
12
+ The goal is to produce a minimal SHACL shape set capable of validating
13
+ core MDLD semantics.
14
+
15
+ ---
16
+
17
+ ## Research Plan {=nih:sha-256-128;4889b626d88785b4eed19b2aa6e5ca24;8 .prov:Plan label}
18
+
19
+ ~~~~~~ {prov:value}
20
+ Research goal:
21
+ Define a minimal SHACL validation model for MDLD documents.
22
+
23
+ Steps:
24
+
25
+ 1. Identify the minimal semantic primitives of MDLD.
26
+ 2. Map those primitives to PROV concepts.
27
+ 3. Determine which invariants must be enforced by validation.
28
+ 4. Encode these invariants as SHACL shapes.
29
+ 5. Produce a minimal reusable SHACL schema.
30
+
31
+ Success criteria:
32
+
33
+ - shapes validate core MDLD constructs
34
+ - shapes remain ontology-minimal
35
+ - shapes rely only on RDF, PROV and SHACL
36
+
37
+ Outcome:
38
+
39
+ A portable SHACL shape set usable by MDLD parsers and verification tools.
40
+ ~~~~~~
41
+
42
+ ---
43
+
44
+ ## Exploration Activity {=wf:exploration .prov:Activity}
45
+
46
+ This step explores MDLD semantics and identifies the minimal set
47
+ of primitives required for a functional system.
48
+
49
+ Uses plan
50
+ [research plan] {+nih:sha-256-128;4889b626d88785b4eed19b2aa6e5ca24;8 ?prov:hadPlan}
51
+
52
+ ## Exploration notes {=nih:sha-256-128;aaa55e922921171296c05b322320bc7e;5 .prov:Entity ?prov:generated}
53
+
54
+ ~~~~~~ {prov:value}
55
+ Core MDLD primitives identified:
56
+
57
+ 1. Entity
58
+ 2. Activity
59
+ 3. Plan
60
+ 4. Content-addressed value
61
+ 5. Location-based artifact
62
+ 6. Provenance links
63
+
64
+ Integrity model:
65
+
66
+ - ni hash IRIs identify immutable entities
67
+ - prov:value represents inline artifacts
68
+ - prov:atLocation represents external artifacts
69
+ - prov:used and prov:generated describe workflows
70
+
71
+ Validation requirements:
72
+
73
+ - entities with ni identifiers must match content hash
74
+ - prov:value must appear only once per entity
75
+ - prov:Activity must connect inputs and outputs
76
+ - plans must exist when referenced
77
+ ~~~~~~
78
+
79
+ ---
80
+
81
+ # Shape Design Activity {=wf:shapeDesign .prov:Activity}
82
+
83
+ This activity formalizes the exploration notes into SHACL validation rules.
84
+
85
+ Uses plan
86
+ [research plan] {+nih:sha-256-128;4889b626d88785b4eed19b2aa6e5ca24;8 ?prov:hadPlan}
87
+
88
+ Uses exploration results
89
+ [exploration notes] {+nih:sha-256-128;aaa55e922921171296c05b322320bc7e;5 ?prov:used}
90
+
91
+ This activity was informed by the exploration step.
92
+
93
+ [drafting phase] {+wf:exploration ?prov:wasInformedBy}
94
+
95
+ Generated draft shape model:
96
+
97
+ ## Draft Shape model {=nih:sha-256-128;776aee4fd5e0fe3cf808e5895a12dfb2;9 .prov:Entity ?prov:generated label}
98
+
99
+ ~~~~~~ {prov:value}
100
+ Initial validation concepts:
101
+
102
+ Entity integrity rule
103
+ Activity connectivity rule
104
+ Plan presence rule
105
+ Artifact content rule
106
+
107
+ Shape design principle:
108
+
109
+ validate graph structure
110
+ avoid imposing domain semantics
111
+ keep shapes minimal and composable
112
+ ~~~~~~
113
+
114
+ ---
115
+
116
+ # Validation Activity {=wf:shapeValidation .prov:Activity}
117
+
118
+ This activity refines the shape draft into the final validation schema.
119
+
120
+ Uses plan
121
+ [research plan] {+nih:sha-256-128;4889b626d88785b4eed19b2aa6e5ca24;8 ?prov:hadPlan}
122
+
123
+ Uses draft shapes
124
+ [draft shape model] {+nih:sha-256-128;776aee4fd5e0fe3cf808e5895a12dfb2;9 ?prov:used}
125
+
126
+ This activity was informed by the shape design step.
127
+
128
+ [shape design] {+wf:shapeDesign ?prov:wasInformedBy}
129
+
130
+ Generated final SHACL schema:
131
+
132
+ [./shapes.ttl] {+nih:sha-256-128;4594cd6cd9079dad278ba99078437888;4 prov:atLocation .prov:Entity ?prov:generated}
133
+
134
+ ---
135
+
136
+ # Completion
137
+
138
+ The research workflow produced a minimal SHACL validation schema.
139
+
140
+ The provenance chain is:
141
+
142
+ plan → exploration activity → exploration notes
143
+ plan + exploration → shape design activity → draft shapes
144
+ plan + draft shapes → validation activity → final SHACL schema
145
+
146
+ Because every artifact is content-addressed, the workflow and its
147
+ outputs remain reproducible and verifiable.
148
+
149
+ This document therefore records both the research process and
150
+ its resulting validation model in a single MDLD workflow artifact.