structured-context 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +348 -0
- package/dist/commands/diagram.d.ts +5 -0
- package/dist/commands/diagram.js +12 -0
- package/dist/commands/docs.d.ts +1 -0
- package/dist/commands/docs.js +67 -0
- package/dist/commands/dump.d.ts +2 -0
- package/dist/commands/dump.js +6 -0
- package/dist/commands/plugins.d.ts +1 -0
- package/dist/commands/plugins.js +23 -0
- package/dist/commands/render.d.ts +6 -0
- package/dist/commands/render.js +35 -0
- package/dist/commands/schemas.d.ts +6 -0
- package/dist/commands/schemas.js +268 -0
- package/dist/commands/show.d.ts +4 -0
- package/dist/commands/show.js +7 -0
- package/dist/commands/spaces.d.ts +1 -0
- package/dist/commands/spaces.js +36 -0
- package/dist/commands/template-sync.d.ts +3 -0
- package/dist/commands/template-sync.js +13 -0
- package/dist/commands/validate-file.d.ts +28 -0
- package/dist/commands/validate-file.js +133 -0
- package/dist/commands/validate.d.ts +16 -0
- package/dist/commands/validate.js +349 -0
- package/dist/config.d.ts +38 -0
- package/dist/config.js +179 -0
- package/dist/constants.d.ts +6 -0
- package/dist/constants.js +6 -0
- package/dist/filter/augment-nodes.d.ts +23 -0
- package/dist/filter/augment-nodes.js +95 -0
- package/dist/filter/expand-include.d.ts +62 -0
- package/dist/filter/expand-include.js +181 -0
- package/dist/filter/filter-nodes.d.ts +21 -0
- package/dist/filter/filter-nodes.js +73 -0
- package/dist/filter/parse-expression.d.ts +20 -0
- package/dist/filter/parse-expression.js +60 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +161 -0
- package/dist/integrations/miro/cache.d.ts +21 -0
- package/dist/integrations/miro/cache.js +55 -0
- package/dist/integrations/miro/client.d.ts +99 -0
- package/dist/integrations/miro/client.js +118 -0
- package/dist/integrations/miro/layout.d.ts +28 -0
- package/dist/integrations/miro/layout.js +72 -0
- package/dist/integrations/miro/styles.d.ts +11 -0
- package/dist/integrations/miro/styles.js +65 -0
- package/dist/integrations/miro/sync.d.ts +8 -0
- package/dist/integrations/miro/sync.js +347 -0
- package/dist/plugin-api.d.ts +12 -0
- package/dist/plugin-api.js +7 -0
- package/dist/plugins/index.d.ts +3 -0
- package/dist/plugins/index.js +3 -0
- package/dist/plugins/loader.d.ts +21 -0
- package/dist/plugins/loader.js +104 -0
- package/dist/plugins/markdown/index.d.ts +48 -0
- package/dist/plugins/markdown/index.js +51 -0
- package/dist/plugins/markdown/parse-embedded.d.ts +90 -0
- package/dist/plugins/markdown/parse-embedded.js +663 -0
- package/dist/plugins/markdown/read-space.d.ts +7 -0
- package/dist/plugins/markdown/read-space.js +89 -0
- package/dist/plugins/markdown/render-bullets.d.ts +2 -0
- package/dist/plugins/markdown/render-bullets.js +42 -0
- package/dist/plugins/markdown/render-mermaid.d.ts +2 -0
- package/dist/plugins/markdown/render-mermaid.js +57 -0
- package/dist/plugins/markdown/template-sync.d.ts +16 -0
- package/dist/plugins/markdown/template-sync.js +294 -0
- package/dist/plugins/markdown/util.d.ts +19 -0
- package/dist/plugins/markdown/util.js +80 -0
- package/dist/plugins/util.d.ts +60 -0
- package/dist/plugins/util.js +7 -0
- package/dist/read/read-space.d.ts +2 -0
- package/dist/read/read-space.js +22 -0
- package/dist/read/resolve-graph-edges.d.ts +11 -0
- package/dist/read/resolve-graph-edges.js +201 -0
- package/dist/read/wikilink-utils.d.ts +16 -0
- package/dist/read/wikilink-utils.js +38 -0
- package/dist/render/registry.d.ts +13 -0
- package/dist/render/registry.js +22 -0
- package/dist/render/render.d.ts +4 -0
- package/dist/render/render.js +28 -0
- package/dist/schema/evaluate-rule.d.ts +30 -0
- package/dist/schema/evaluate-rule.js +82 -0
- package/dist/schema/metadata-contract.d.ts +538 -0
- package/dist/schema/metadata-contract.js +115 -0
- package/dist/schema/schema-refs.d.ts +22 -0
- package/dist/schema/schema-refs.js +168 -0
- package/dist/schema/schema.d.ts +27 -0
- package/dist/schema/schema.js +378 -0
- package/dist/schema/validate-graph.d.ts +24 -0
- package/dist/schema/validate-graph.js +141 -0
- package/dist/schema/validate-rules.d.ts +10 -0
- package/dist/schema/validate-rules.js +51 -0
- package/dist/schemas/_ost_strict.json +81 -0
- package/dist/schemas/_sctx_base.json +72 -0
- package/dist/schemas/general.json +261 -0
- package/dist/schemas/generated/_structured_context_schema_meta.json +191 -0
- package/dist/schemas/knowledge_wiki.json +206 -0
- package/dist/schemas/strict_ost.json +97 -0
- package/dist/space-graph.d.ts +28 -0
- package/dist/space-graph.js +82 -0
- package/dist/types.d.ts +145 -0
- package/dist/types.js +0 -0
- package/docs/concepts.md +391 -0
- package/docs/config.md +140 -0
- package/docs/rules.md +120 -0
- package/docs/schemas.md +340 -0
- package/package.json +69 -0
- package/schemas/_ost_strict.json +81 -0
- package/schemas/_sctx_base.json +72 -0
- package/schemas/general.json +261 -0
- package/schemas/generated/_structured_context_schema_meta.json +191 -0
- package/schemas/knowledge_wiki.json +206 -0
- package/schemas/strict_ost.json +97 -0
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/mindsocket/structured-context/main/schemas/generated/_structured_context_schema_meta.json",
|
|
3
|
+
"$id": "sctx://general",
|
|
4
|
+
"title": "Strategy and opportunity ladder",
|
|
5
|
+
"description": "Validates frontmatter for space node files",
|
|
6
|
+
"$metadata": {
|
|
7
|
+
"hierarchy": {
|
|
8
|
+
"levels": [
|
|
9
|
+
"vision",
|
|
10
|
+
"mission",
|
|
11
|
+
{ "type": "goal", "selfRef": true, "matchers": ["Goals"] },
|
|
12
|
+
{ "type": "opportunity", "selfRef": true, "matchers": ["Opportunities"] },
|
|
13
|
+
{
|
|
14
|
+
"type": "solution",
|
|
15
|
+
"selfRef": true,
|
|
16
|
+
"matchers": ["Solutions", "Potential solutions", "Solutions considered", "Possible solutions"]
|
|
17
|
+
},
|
|
18
|
+
"experiment"
|
|
19
|
+
]
|
|
20
|
+
},
|
|
21
|
+
"aliases": {
|
|
22
|
+
"outcome": "goal",
|
|
23
|
+
"assumption_test": "experiment",
|
|
24
|
+
"test": "experiment"
|
|
25
|
+
},
|
|
26
|
+
"relationships": [
|
|
27
|
+
{
|
|
28
|
+
"parent": "opportunity",
|
|
29
|
+
"type": "problem_statement",
|
|
30
|
+
"templateFormat": "heading",
|
|
31
|
+
"matchers": ["Problem statement", "What problem are we solving?"],
|
|
32
|
+
"multiple": false
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"parent": "opportunity",
|
|
36
|
+
"type": "assumption",
|
|
37
|
+
"templateFormat": "table",
|
|
38
|
+
"matchers": ["Assumptions", "^Assumptions?$"],
|
|
39
|
+
"embeddedTemplateFields": ["assumption", "status", "confidence"],
|
|
40
|
+
"multiple": true
|
|
41
|
+
}
|
|
42
|
+
]
|
|
43
|
+
},
|
|
44
|
+
"oneOf": [
|
|
45
|
+
{
|
|
46
|
+
"type": "object",
|
|
47
|
+
"allOf": [{ "$ref": "sctx://_sctx_base#/$defs/baseNodeProps" }],
|
|
48
|
+
"properties": {
|
|
49
|
+
"type": { "const": "dashboard" }
|
|
50
|
+
},
|
|
51
|
+
"required": ["type"],
|
|
52
|
+
"additionalProperties": true
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"type": "object",
|
|
56
|
+
"allOf": [{ "$ref": "sctx://_sctx_base#/$defs/baseNodeProps" }],
|
|
57
|
+
"properties": {
|
|
58
|
+
"type": { "enum": ["ost_on_a_page", "space_on_a_page"] }
|
|
59
|
+
},
|
|
60
|
+
"required": ["type"],
|
|
61
|
+
"additionalProperties": true
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"type": "object",
|
|
65
|
+
"allOf": [
|
|
66
|
+
{ "$ref": "sctx://_sctx_base#/$defs/baseNodeProps" },
|
|
67
|
+
{ "$ref": "sctx://_sctx_base#/$defs/ostEntityProps" }
|
|
68
|
+
],
|
|
69
|
+
"properties": {
|
|
70
|
+
"type": { "const": "vision" }
|
|
71
|
+
},
|
|
72
|
+
"required": ["type"],
|
|
73
|
+
"not": { "required": ["parent"] },
|
|
74
|
+
"additionalProperties": true,
|
|
75
|
+
"examples": [
|
|
76
|
+
{
|
|
77
|
+
"type": "vision",
|
|
78
|
+
"status": "active"
|
|
79
|
+
}
|
|
80
|
+
]
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"type": "object",
|
|
84
|
+
"allOf": [
|
|
85
|
+
{ "$ref": "sctx://_sctx_base#/$defs/baseNodeProps" },
|
|
86
|
+
{ "$ref": "sctx://_sctx_base#/$defs/parentNodeProps" },
|
|
87
|
+
{ "$ref": "sctx://_sctx_base#/$defs/ostEntityProps" }
|
|
88
|
+
],
|
|
89
|
+
"properties": {
|
|
90
|
+
"type": { "const": "mission" }
|
|
91
|
+
},
|
|
92
|
+
"required": ["type"],
|
|
93
|
+
"additionalProperties": true,
|
|
94
|
+
"examples": [
|
|
95
|
+
{
|
|
96
|
+
"type": "mission",
|
|
97
|
+
"status": "active",
|
|
98
|
+
"parent": "[[Personal Vision]]"
|
|
99
|
+
}
|
|
100
|
+
]
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"type": "object",
|
|
104
|
+
"allOf": [
|
|
105
|
+
{ "$ref": "sctx://_sctx_base#/$defs/baseNodeProps" },
|
|
106
|
+
{ "$ref": "sctx://_sctx_base#/$defs/parentNodeProps" },
|
|
107
|
+
{ "$ref": "sctx://_sctx_base#/$defs/ostEntityProps" }
|
|
108
|
+
],
|
|
109
|
+
"properties": {
|
|
110
|
+
"type": { "enum": ["goal", "outcome"] },
|
|
111
|
+
"priority": { "$ref": "sctx://_sctx_base#/$defs/priority" }
|
|
112
|
+
},
|
|
113
|
+
"required": ["type"],
|
|
114
|
+
"additionalProperties": true,
|
|
115
|
+
"examples": [
|
|
116
|
+
{
|
|
117
|
+
"type": "goal",
|
|
118
|
+
"status": "active",
|
|
119
|
+
"parent": "[[My Mission (2026)]]",
|
|
120
|
+
"priority": "p2"
|
|
121
|
+
}
|
|
122
|
+
]
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"type": "object",
|
|
126
|
+
"allOf": [
|
|
127
|
+
{ "$ref": "sctx://_sctx_base#/$defs/baseNodeProps" },
|
|
128
|
+
{ "$ref": "sctx://_sctx_base#/$defs/parentNodeProps" },
|
|
129
|
+
{ "$ref": "sctx://_sctx_base#/$defs/ostEntityProps" }
|
|
130
|
+
],
|
|
131
|
+
"properties": {
|
|
132
|
+
"type": { "const": "opportunity" },
|
|
133
|
+
"priority": { "$ref": "sctx://_sctx_base#/$defs/priority" },
|
|
134
|
+
"impact": { "$ref": "sctx://_sctx_base#/$defs/assessment" },
|
|
135
|
+
"feasibility": { "$ref": "sctx://_sctx_base#/$defs/assessment" },
|
|
136
|
+
"resources": { "$ref": "sctx://_sctx_base#/$defs/assessment" },
|
|
137
|
+
"timeline": {
|
|
138
|
+
"type": "string",
|
|
139
|
+
"description": "Timeline estimate (e.g., S-M, M-L)"
|
|
140
|
+
},
|
|
141
|
+
"next_steps": {
|
|
142
|
+
"type": "string",
|
|
143
|
+
"description": "Next steps for this opportunity"
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
"required": ["type"],
|
|
147
|
+
"additionalProperties": true,
|
|
148
|
+
"examples": [
|
|
149
|
+
{
|
|
150
|
+
"type": "opportunity",
|
|
151
|
+
"status": "identified",
|
|
152
|
+
"parent": "[[Career Growth]]",
|
|
153
|
+
"priority": "p2"
|
|
154
|
+
}
|
|
155
|
+
]
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"type": "object",
|
|
159
|
+
"allOf": [
|
|
160
|
+
{ "$ref": "sctx://_sctx_base#/$defs/baseNodeProps" },
|
|
161
|
+
{ "$ref": "sctx://_sctx_base#/$defs/parentNodeProps" },
|
|
162
|
+
{ "$ref": "sctx://_sctx_base#/$defs/ostEntityProps" }
|
|
163
|
+
],
|
|
164
|
+
"properties": {
|
|
165
|
+
"type": { "const": "solution" },
|
|
166
|
+
"priority": { "$ref": "sctx://_sctx_base#/$defs/priority" },
|
|
167
|
+
"impact": { "$ref": "sctx://_sctx_base#/$defs/assessment" },
|
|
168
|
+
"feasibility": { "$ref": "sctx://_sctx_base#/$defs/assessment" },
|
|
169
|
+
"resources": { "$ref": "sctx://_sctx_base#/$defs/assessment" },
|
|
170
|
+
"timeline": {
|
|
171
|
+
"type": "string",
|
|
172
|
+
"description": "Timeline estimate (e.g., S-M, M-L)"
|
|
173
|
+
},
|
|
174
|
+
"next_steps": {
|
|
175
|
+
"type": "string",
|
|
176
|
+
"description": "Next steps for this solution"
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
"required": ["type"],
|
|
180
|
+
"additionalProperties": true,
|
|
181
|
+
"examples": [
|
|
182
|
+
{
|
|
183
|
+
"type": "solution",
|
|
184
|
+
"status": "identified",
|
|
185
|
+
"parent": "[[Some Opportunity]]",
|
|
186
|
+
"priority": "p3"
|
|
187
|
+
}
|
|
188
|
+
]
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"type": "object",
|
|
192
|
+
"allOf": [
|
|
193
|
+
{ "$ref": "sctx://_sctx_base#/$defs/baseNodeProps" },
|
|
194
|
+
{ "$ref": "sctx://_sctx_base#/$defs/parentNodeProps" },
|
|
195
|
+
{ "$ref": "sctx://_sctx_base#/$defs/ostEntityProps" }
|
|
196
|
+
],
|
|
197
|
+
"properties": {
|
|
198
|
+
"type": { "enum": ["experiment", "assumption_test", "test"] }
|
|
199
|
+
},
|
|
200
|
+
"required": ["type"],
|
|
201
|
+
"additionalProperties": true,
|
|
202
|
+
"examples": [
|
|
203
|
+
{
|
|
204
|
+
"type": "experiment",
|
|
205
|
+
"status": "exploring",
|
|
206
|
+
"parent": "[[Build a Side Project]]"
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
"type": "test",
|
|
210
|
+
"status": "active",
|
|
211
|
+
"parent": "[[Mobile App Solution]]"
|
|
212
|
+
}
|
|
213
|
+
]
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
"type": "object",
|
|
217
|
+
"allOf": [
|
|
218
|
+
{ "$ref": "sctx://_sctx_base#/$defs/baseNodeProps" },
|
|
219
|
+
{ "$ref": "sctx://_sctx_base#/$defs/parentNodeProps" },
|
|
220
|
+
{ "$ref": "sctx://_sctx_base#/$defs/ostEntityProps" }
|
|
221
|
+
],
|
|
222
|
+
"properties": {
|
|
223
|
+
"type": { "const": "assumption" },
|
|
224
|
+
"confidence": {
|
|
225
|
+
"type": "string",
|
|
226
|
+
"enum": ["low", "medium", "high"],
|
|
227
|
+
"description": "Confidence level in this assumption"
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
"required": ["type"],
|
|
231
|
+
"additionalProperties": true,
|
|
232
|
+
"examples": [
|
|
233
|
+
{
|
|
234
|
+
"type": "assumption",
|
|
235
|
+
"status": "identified",
|
|
236
|
+
"parent": "[[Some Opportunity]]",
|
|
237
|
+
"confidence": "medium"
|
|
238
|
+
}
|
|
239
|
+
]
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
"type": "object",
|
|
243
|
+
"allOf": [
|
|
244
|
+
{ "$ref": "sctx://_sctx_base#/$defs/baseNodeProps" },
|
|
245
|
+
{ "$ref": "sctx://_sctx_base#/$defs/parentNodeProps" },
|
|
246
|
+
{ "$ref": "sctx://_sctx_base#/$defs/ostEntityProps" }
|
|
247
|
+
],
|
|
248
|
+
"properties": {
|
|
249
|
+
"type": { "const": "problem_statement" }
|
|
250
|
+
},
|
|
251
|
+
"required": ["type"],
|
|
252
|
+
"additionalProperties": true,
|
|
253
|
+
"examples": [
|
|
254
|
+
{
|
|
255
|
+
"type": "problem_statement",
|
|
256
|
+
"status": "identified"
|
|
257
|
+
}
|
|
258
|
+
]
|
|
259
|
+
}
|
|
260
|
+
]
|
|
261
|
+
}
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/mindsocket/structured-context/main/schemas/generated/_structured_context_schema_meta.json",
|
|
4
|
+
"title": "structured-context schema dialect",
|
|
5
|
+
"description": "Extends JSON Schema Draft-07 with top-level $metadata for hierarchy and rule metadata.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"allOf": [
|
|
8
|
+
{
|
|
9
|
+
"$ref": "http://json-schema.org/draft-07/schema#"
|
|
10
|
+
}
|
|
11
|
+
],
|
|
12
|
+
"properties": {
|
|
13
|
+
"$metadata": {
|
|
14
|
+
"type": "object",
|
|
15
|
+
"properties": {
|
|
16
|
+
"hierarchy": {
|
|
17
|
+
"type": "object",
|
|
18
|
+
"properties": {
|
|
19
|
+
"levels": {
|
|
20
|
+
"type": "array",
|
|
21
|
+
"minItems": 1,
|
|
22
|
+
"items": {
|
|
23
|
+
"oneOf": [
|
|
24
|
+
{
|
|
25
|
+
"type": "string",
|
|
26
|
+
"minLength": 1
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"type": "object",
|
|
30
|
+
"properties": {
|
|
31
|
+
"type": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"minLength": 1
|
|
34
|
+
},
|
|
35
|
+
"field": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"minLength": 1
|
|
38
|
+
},
|
|
39
|
+
"fieldOn": {
|
|
40
|
+
"enum": ["child", "parent"]
|
|
41
|
+
},
|
|
42
|
+
"multiple": {
|
|
43
|
+
"type": "boolean"
|
|
44
|
+
},
|
|
45
|
+
"templateFormat": {
|
|
46
|
+
"enum": ["heading", "list", "table", "page"]
|
|
47
|
+
},
|
|
48
|
+
"matchers": {
|
|
49
|
+
"type": "array",
|
|
50
|
+
"items": {
|
|
51
|
+
"type": "string",
|
|
52
|
+
"minLength": 1
|
|
53
|
+
},
|
|
54
|
+
"minItems": 1
|
|
55
|
+
},
|
|
56
|
+
"embeddedTemplateFields": {
|
|
57
|
+
"type": "array",
|
|
58
|
+
"items": {
|
|
59
|
+
"type": "string",
|
|
60
|
+
"minLength": 1
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"selfRef": {
|
|
64
|
+
"type": "boolean"
|
|
65
|
+
},
|
|
66
|
+
"selfRefField": {
|
|
67
|
+
"type": "string",
|
|
68
|
+
"minLength": 1
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
"required": ["type"],
|
|
72
|
+
"additionalProperties": false
|
|
73
|
+
}
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"allowSkipLevels": {
|
|
78
|
+
"type": "boolean"
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"required": ["levels"],
|
|
82
|
+
"additionalProperties": false
|
|
83
|
+
},
|
|
84
|
+
"relationships": {
|
|
85
|
+
"type": "array",
|
|
86
|
+
"items": {
|
|
87
|
+
"type": "object",
|
|
88
|
+
"properties": {
|
|
89
|
+
"parent": {
|
|
90
|
+
"type": "string",
|
|
91
|
+
"minLength": 1
|
|
92
|
+
},
|
|
93
|
+
"type": {
|
|
94
|
+
"type": "string",
|
|
95
|
+
"minLength": 1
|
|
96
|
+
},
|
|
97
|
+
"field": {
|
|
98
|
+
"type": "string",
|
|
99
|
+
"minLength": 1
|
|
100
|
+
},
|
|
101
|
+
"fieldOn": {
|
|
102
|
+
"enum": ["child", "parent"]
|
|
103
|
+
},
|
|
104
|
+
"multiple": {
|
|
105
|
+
"type": "boolean"
|
|
106
|
+
},
|
|
107
|
+
"templateFormat": {
|
|
108
|
+
"enum": ["heading", "list", "table", "page"]
|
|
109
|
+
},
|
|
110
|
+
"matchers": {
|
|
111
|
+
"type": "array",
|
|
112
|
+
"items": {
|
|
113
|
+
"type": "string",
|
|
114
|
+
"minLength": 1
|
|
115
|
+
},
|
|
116
|
+
"minItems": 1
|
|
117
|
+
},
|
|
118
|
+
"embeddedTemplateFields": {
|
|
119
|
+
"type": "array",
|
|
120
|
+
"items": {
|
|
121
|
+
"type": "string",
|
|
122
|
+
"minLength": 1
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
"required": ["parent", "type"],
|
|
127
|
+
"additionalProperties": false
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
"aliases": {
|
|
131
|
+
"type": "object",
|
|
132
|
+
"additionalProperties": {
|
|
133
|
+
"type": "string",
|
|
134
|
+
"minLength": 1
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
"rules": {
|
|
138
|
+
"type": "array",
|
|
139
|
+
"items": {
|
|
140
|
+
"oneOf": [
|
|
141
|
+
{
|
|
142
|
+
"type": "object",
|
|
143
|
+
"properties": {
|
|
144
|
+
"id": {
|
|
145
|
+
"type": "string",
|
|
146
|
+
"minLength": 1
|
|
147
|
+
},
|
|
148
|
+
"category": {
|
|
149
|
+
"enum": ["validation", "coherence", "workflow", "best-practice"]
|
|
150
|
+
},
|
|
151
|
+
"description": {
|
|
152
|
+
"type": "string",
|
|
153
|
+
"minLength": 1
|
|
154
|
+
},
|
|
155
|
+
"check": {
|
|
156
|
+
"type": "string",
|
|
157
|
+
"minLength": 1
|
|
158
|
+
},
|
|
159
|
+
"type": {
|
|
160
|
+
"type": "string",
|
|
161
|
+
"minLength": 1
|
|
162
|
+
},
|
|
163
|
+
"scope": {
|
|
164
|
+
"enum": ["global"]
|
|
165
|
+
},
|
|
166
|
+
"override": {
|
|
167
|
+
"type": "boolean"
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
"required": ["id", "category", "description", "check"],
|
|
171
|
+
"additionalProperties": false
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"type": "object",
|
|
175
|
+
"properties": {
|
|
176
|
+
"$ref": {
|
|
177
|
+
"type": "string",
|
|
178
|
+
"minLength": 1
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
"required": ["$ref"],
|
|
182
|
+
"additionalProperties": false
|
|
183
|
+
}
|
|
184
|
+
]
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
"additionalProperties": false
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/mindsocket/structured-context/main/schemas/generated/_structured_context_schema_meta.json",
|
|
3
|
+
"$id": "sctx://knowledge_wiki",
|
|
4
|
+
"title": "Knowledge Wiki",
|
|
5
|
+
"description": "Lightweight schema for LLM-maintained knowledge wikis. Supports source pages, concept pages, syntheses, and notes. Designed for compounding knowledge bases where the LLM creates and maintains wiki pages from raw sources.\n\nFlat entity model — no hierarchy, no required parent links. Wikilinks between any pages are valid for arbitrary cross-referencing. The schema validates structure and provenance; it does not constrain meaning.\n\nBased on the pattern described in Karpathy's LLM Wiki (2026).",
|
|
6
|
+
"$metadata": {
|
|
7
|
+
"aliases": {
|
|
8
|
+
"source_summary": "source",
|
|
9
|
+
"study": "source",
|
|
10
|
+
"article": "source",
|
|
11
|
+
"paper": "source",
|
|
12
|
+
"research": "source"
|
|
13
|
+
},
|
|
14
|
+
"relationships": [
|
|
15
|
+
{
|
|
16
|
+
"parent": "source",
|
|
17
|
+
"type": "source",
|
|
18
|
+
"field": "sources",
|
|
19
|
+
"fieldOn": "child",
|
|
20
|
+
"multiple": true
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"parent": "source",
|
|
24
|
+
"type": "synthesis",
|
|
25
|
+
"field": "sources",
|
|
26
|
+
"fieldOn": "child",
|
|
27
|
+
"multiple": true
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"parent": "concept",
|
|
31
|
+
"type": "synthesis",
|
|
32
|
+
"field": "concepts",
|
|
33
|
+
"fieldOn": "child",
|
|
34
|
+
"multiple": true
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
"rules": [
|
|
38
|
+
{
|
|
39
|
+
"id": "synthesis-references-sources",
|
|
40
|
+
"category": "coherence",
|
|
41
|
+
"description": "Syntheses should reference at least one contributing source in their sources array",
|
|
42
|
+
"type": "synthesis",
|
|
43
|
+
"check": "$exists(current.sources) and $count(current.sources) >= 1"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"id": "concept-has-summary",
|
|
47
|
+
"category": "best-practice",
|
|
48
|
+
"description": "Concept pages should have a short summary for index discoverability",
|
|
49
|
+
"type": "concept",
|
|
50
|
+
"check": "$exists(current.summary) and $length(current.summary) > 0"
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
},
|
|
54
|
+
"oneOf": [
|
|
55
|
+
{
|
|
56
|
+
"type": "object",
|
|
57
|
+
"description": "A processed summary of a raw source (article, paper, book, video, thread, podcast, etc.). Captures key information from the source in structured form with provenance.",
|
|
58
|
+
"allOf": [{ "$ref": "sctx://_sctx_base#/$defs/baseNodeProps" }],
|
|
59
|
+
"properties": {
|
|
60
|
+
"type": { "const": "source" },
|
|
61
|
+
"summary": {
|
|
62
|
+
"$ref": "sctx://_sctx_base#/$defs/summary"
|
|
63
|
+
},
|
|
64
|
+
"url": {
|
|
65
|
+
"type": "string",
|
|
66
|
+
"description": "URL of the original source"
|
|
67
|
+
},
|
|
68
|
+
"local_copy": {
|
|
69
|
+
"$ref": "sctx://_sctx_base#/$defs/wikilink",
|
|
70
|
+
"description": "Wikilink to a local copy of the source (e.g. a saved PDF or clipped note)"
|
|
71
|
+
},
|
|
72
|
+
"author": {
|
|
73
|
+
"type": "string",
|
|
74
|
+
"description": "Author or creator of the source"
|
|
75
|
+
},
|
|
76
|
+
"book": {
|
|
77
|
+
"type": "string",
|
|
78
|
+
"description": "Book title and author if the source is a book"
|
|
79
|
+
},
|
|
80
|
+
"published_date": {
|
|
81
|
+
"type": "string",
|
|
82
|
+
"format": "date",
|
|
83
|
+
"description": "Original publication date"
|
|
84
|
+
},
|
|
85
|
+
"source_type": {
|
|
86
|
+
"type": "string",
|
|
87
|
+
"description": "Kind of source material. Free-form — common values include article, paper, book, video, podcast, thread, substack, tweet, website. Not enum-constrained to allow evolving vocabulary."
|
|
88
|
+
},
|
|
89
|
+
"sources": {
|
|
90
|
+
"type": "array",
|
|
91
|
+
"items": { "$ref": "sctx://_sctx_base#/$defs/wikilink" },
|
|
92
|
+
"description": "Wikilinks to other source pages that this one references or extends"
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
"required": ["type", "url"],
|
|
96
|
+
"additionalProperties": true,
|
|
97
|
+
"examples": [
|
|
98
|
+
{
|
|
99
|
+
"type": "source",
|
|
100
|
+
"author": "Joe Bloggs",
|
|
101
|
+
"url": "https://example.com/design-of-yesterday-things",
|
|
102
|
+
"source_type": "book",
|
|
103
|
+
"tags": ["design", "ux", "psychology"]
|
|
104
|
+
}
|
|
105
|
+
]
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"type": "object",
|
|
109
|
+
"description": "A concept or entity page — defines and frames a specific idea, mechanism, or domain term. May draw from multiple sources. The building blocks of the wiki's knowledge graph.",
|
|
110
|
+
"allOf": [{ "$ref": "sctx://_sctx_base#/$defs/baseNodeProps" }],
|
|
111
|
+
"properties": {
|
|
112
|
+
"type": { "const": "concept" },
|
|
113
|
+
"summary": {
|
|
114
|
+
"$ref": "sctx://_sctx_base#/$defs/summary"
|
|
115
|
+
},
|
|
116
|
+
"sources": {
|
|
117
|
+
"type": "array",
|
|
118
|
+
"items": { "$ref": "sctx://_sctx_base#/$defs/wikilink" },
|
|
119
|
+
"description": "Wikilinks to source pages that contributed to this concept"
|
|
120
|
+
},
|
|
121
|
+
"related": {
|
|
122
|
+
"type": "array",
|
|
123
|
+
"items": { "$ref": "sctx://_sctx_base#/$defs/wikilink" },
|
|
124
|
+
"description": "Wikilinks to related concept or synthesis pages"
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
"required": ["type"],
|
|
128
|
+
"additionalProperties": true,
|
|
129
|
+
"examples": [
|
|
130
|
+
{
|
|
131
|
+
"type": "concept",
|
|
132
|
+
"summary": "A property of an object that signals how it can be used, first described by Gibson and popularised in design by Norman",
|
|
133
|
+
"tags": ["design", "ux"]
|
|
134
|
+
}
|
|
135
|
+
]
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"type": "object",
|
|
139
|
+
"description": "A synthesis page — connects multiple concepts and sources into a coherent model, framework, or thesis. The highest-value pages in a knowledge wiki. Must reference contributing sources.",
|
|
140
|
+
"allOf": [{ "$ref": "sctx://_sctx_base#/$defs/baseNodeProps" }],
|
|
141
|
+
"properties": {
|
|
142
|
+
"type": { "const": "synthesis" },
|
|
143
|
+
"summary": {
|
|
144
|
+
"$ref": "sctx://_sctx_base#/$defs/summary"
|
|
145
|
+
},
|
|
146
|
+
"sources": {
|
|
147
|
+
"type": "array",
|
|
148
|
+
"items": { "$ref": "sctx://_sctx_base#/$defs/wikilink" },
|
|
149
|
+
"description": "Wikilinks to source pages this synthesis draws from"
|
|
150
|
+
},
|
|
151
|
+
"concepts": {
|
|
152
|
+
"type": "array",
|
|
153
|
+
"items": { "$ref": "sctx://_sctx_base#/$defs/wikilink" },
|
|
154
|
+
"description": "Wikilinks to concept pages this synthesis connects"
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
"required": ["type"],
|
|
158
|
+
"additionalProperties": true,
|
|
159
|
+
"examples": [
|
|
160
|
+
{
|
|
161
|
+
"type": "synthesis",
|
|
162
|
+
"summary": "How Norman's affordance model and feedback principles combine to explain intuitive vs confusing interfaces",
|
|
163
|
+
"sources": ["[[The Design of Everyday Things - Don Norman]]"],
|
|
164
|
+
"concepts": ["[[Affordance]]", "[[Feedback loop]]"]
|
|
165
|
+
}
|
|
166
|
+
]
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"type": "object",
|
|
170
|
+
"description": "Personal notes, journal entries, appointments, experiential records. Your own data about your journey — not sourced from external material.",
|
|
171
|
+
"allOf": [{ "$ref": "sctx://_sctx_base#/$defs/baseNodeProps" }],
|
|
172
|
+
"properties": {
|
|
173
|
+
"type": { "const": "note" },
|
|
174
|
+
"date": {
|
|
175
|
+
"type": "string",
|
|
176
|
+
"format": "date",
|
|
177
|
+
"description": "Date this entry was created or relates to"
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
"required": ["type"],
|
|
181
|
+
"additionalProperties": true,
|
|
182
|
+
"examples": [
|
|
183
|
+
{
|
|
184
|
+
"type": "note",
|
|
185
|
+
"date": "2024-03-15",
|
|
186
|
+
"tags": ["reading-log"]
|
|
187
|
+
}
|
|
188
|
+
]
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"type": "object",
|
|
192
|
+
"description": "The wiki index — a catalog of all pages with links, summaries, and metadata. Updated by the agent on ingest. Used as the primary navigation entry point.",
|
|
193
|
+
"allOf": [{ "$ref": "sctx://_sctx_base#/$defs/baseNodeProps" }],
|
|
194
|
+
"properties": {
|
|
195
|
+
"type": { "const": "index" }
|
|
196
|
+
},
|
|
197
|
+
"required": ["type"],
|
|
198
|
+
"additionalProperties": true,
|
|
199
|
+
"examples": [
|
|
200
|
+
{
|
|
201
|
+
"type": "index"
|
|
202
|
+
}
|
|
203
|
+
]
|
|
204
|
+
}
|
|
205
|
+
]
|
|
206
|
+
}
|