structured-context 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.
@@ -0,0 +1,246 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/mindsocket/structured-context/main/schemas/generated/_structured_context_schema_meta.json",
3
+ "$id": "sctx://_knowledge_wiki",
4
+ // Shared entity definitions for knowledge wiki schemas.
5
+ // Provides aliases, relationships, rules, and entity type $defs.
6
+ // This partial has no hierarchy — wiki entities are flat with no required parent links.
7
+ "$metadata": {
8
+ "aliases": {
9
+ "source_summary": "source",
10
+ "study": "source",
11
+ "article": "source",
12
+ "paper": "source",
13
+ "research": "source",
14
+ "comparison": "synthesis",
15
+ "query": "synthesis"
16
+ },
17
+ "relationships": [
18
+ {
19
+ "parent": "source",
20
+ "type": "source",
21
+ "field": "sources",
22
+ "fieldOn": "child",
23
+ "multiple": true
24
+ },
25
+ {
26
+ "parent": "source",
27
+ "type": "synthesis",
28
+ "field": "sources",
29
+ "fieldOn": "child",
30
+ "multiple": true
31
+ },
32
+ {
33
+ "parent": "source",
34
+ "type": "entity",
35
+ "field": "sources",
36
+ "fieldOn": "child",
37
+ "multiple": true
38
+ },
39
+ {
40
+ "parent": "concept",
41
+ "type": "synthesis",
42
+ "field": "concepts",
43
+ "fieldOn": "child",
44
+ "multiple": true
45
+ }
46
+ ],
47
+ "rules": [
48
+ {
49
+ "id": "synthesis-references-sources",
50
+ "category": "coherence",
51
+ "description": "Syntheses should reference at least one contributing source in their sources array",
52
+ "type": "synthesis",
53
+ "check": "$exists(current.sources) and $count(current.sources) >= 1"
54
+ },
55
+ {
56
+ "id": "concept-has-summary",
57
+ "category": "best-practice",
58
+ "description": "Concept pages should have a short summary for index discoverability",
59
+ "type": "concept",
60
+ "check": "$exists(current.summary) and $length(current.summary) > 0"
61
+ }
62
+ ]
63
+ },
64
+ "$defs": {
65
+ "source": {
66
+ "type": "object",
67
+ "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.",
68
+ "allOf": [{ "$ref": "sctx://_sctx_base#/$defs/baseNodeProps" }],
69
+ "properties": {
70
+ "type": { "const": "source" },
71
+ "summary": {
72
+ "$ref": "sctx://_sctx_base#/$defs/summary"
73
+ },
74
+ "url": {
75
+ "type": "string",
76
+ "description": "URL of the original source"
77
+ },
78
+ "local_copy": {
79
+ "$ref": "sctx://_sctx_base#/$defs/wikilink",
80
+ "description": "Wikilink to a local copy of the source (e.g. a saved PDF or clipped note)"
81
+ },
82
+ "author": {
83
+ "type": "string",
84
+ "description": "Author or creator of the source"
85
+ },
86
+ "book": {
87
+ "type": "string",
88
+ "description": "Book title and author if the source is a book"
89
+ },
90
+ "published_date": {
91
+ "type": "string",
92
+ "format": "date",
93
+ "description": "Original publication date"
94
+ },
95
+ "source_type": {
96
+ "type": "string",
97
+ "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."
98
+ },
99
+ "sources": {
100
+ "type": "array",
101
+ "items": { "$ref": "sctx://_sctx_base#/$defs/wikilink" },
102
+ "description": "Wikilinks to other source pages that this one references or extends"
103
+ }
104
+ },
105
+ "required": ["type", "url"],
106
+ "additionalProperties": true,
107
+ "examples": [
108
+ {
109
+ "type": "source",
110
+ "author": "Joe Bloggs",
111
+ "url": "https://example.com/design-of-yesterday-things",
112
+ "source_type": "book",
113
+ "tags": ["design", "ux", "psychology"]
114
+ }
115
+ ]
116
+ },
117
+ "concept": {
118
+ "type": "object",
119
+ "description": "A concept 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.",
120
+ "allOf": [{ "$ref": "sctx://_sctx_base#/$defs/baseNodeProps" }],
121
+ "properties": {
122
+ "type": { "const": "concept" },
123
+ "summary": {
124
+ "$ref": "sctx://_sctx_base#/$defs/summary"
125
+ },
126
+ "sources": {
127
+ "type": "array",
128
+ "items": { "$ref": "sctx://_sctx_base#/$defs/wikilink" },
129
+ "description": "Wikilinks to source pages that contributed to this concept"
130
+ },
131
+ "related": {
132
+ "type": "array",
133
+ "items": { "$ref": "sctx://_sctx_base#/$defs/wikilink" },
134
+ "description": "Wikilinks to related concept or synthesis pages"
135
+ }
136
+ },
137
+ "required": ["type"],
138
+ "additionalProperties": true,
139
+ "examples": [
140
+ {
141
+ "type": "concept",
142
+ "summary": "A property of an object that signals how it can be used, first described by Gibson and popularised in design by Norman",
143
+ "tags": ["design", "ux"]
144
+ }
145
+ ]
146
+ },
147
+ "entity": {
148
+ "type": "object",
149
+ "description": "A concrete entity — a person, organisation, product, model, or other named thing. The building blocks of the wiki's knowledge graph alongside concepts. Entities are distinct from concepts: a concept frames an idea or mechanism; an entity is a specific, identifiable thing in the world.",
150
+ "allOf": [{ "$ref": "sctx://_sctx_base#/$defs/baseNodeProps" }],
151
+ "properties": {
152
+ "type": { "const": "entity" },
153
+ "summary": {
154
+ "$ref": "sctx://_sctx_base#/$defs/summary"
155
+ },
156
+ "sources": {
157
+ "type": "array",
158
+ "items": { "$ref": "sctx://_sctx_base#/$defs/wikilink" },
159
+ "description": "Wikilinks to source pages that contributed to this entity page"
160
+ },
161
+ "related": {
162
+ "type": "array",
163
+ "items": { "$ref": "sctx://_sctx_base#/$defs/wikilink" },
164
+ "description": "Wikilinks to related entity, concept, or synthesis pages"
165
+ }
166
+ },
167
+ "required": ["type"],
168
+ "additionalProperties": true,
169
+ "examples": [
170
+ {
171
+ "type": "entity",
172
+ "summary": "AI safety research lab founded by Dario Amodei and Daniela Amodei",
173
+ "tags": ["company", "ai", "safety"]
174
+ }
175
+ ]
176
+ },
177
+ "synthesis": {
178
+ "type": "object",
179
+ "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.",
180
+ "allOf": [{ "$ref": "sctx://_sctx_base#/$defs/baseNodeProps" }],
181
+ "properties": {
182
+ "type": { "const": "synthesis" },
183
+ "summary": {
184
+ "$ref": "sctx://_sctx_base#/$defs/summary"
185
+ },
186
+ "sources": {
187
+ "type": "array",
188
+ "items": { "$ref": "sctx://_sctx_base#/$defs/wikilink" },
189
+ "description": "Wikilinks to source pages this synthesis draws from"
190
+ },
191
+ "concepts": {
192
+ "type": "array",
193
+ "items": { "$ref": "sctx://_sctx_base#/$defs/wikilink" },
194
+ "description": "Wikilinks to concept pages this synthesis connects"
195
+ }
196
+ },
197
+ "required": ["type"],
198
+ "additionalProperties": true,
199
+ "examples": [
200
+ {
201
+ "type": "synthesis",
202
+ "summary": "How Norman's affordance model and feedback principles combine to explain intuitive vs confusing interfaces",
203
+ "sources": ["[[The Design of Everyday Things - Don Norman]]"],
204
+ "concepts": ["[[Affordance]]", "[[Feedback loop]]"]
205
+ }
206
+ ]
207
+ },
208
+ "note": {
209
+ "type": "object",
210
+ "description": "Personal notes, journal entries, appointments, experiential records. Your own data about your journey — not sourced from external material.",
211
+ "allOf": [{ "$ref": "sctx://_sctx_base#/$defs/baseNodeProps" }],
212
+ "properties": {
213
+ "type": { "const": "note" },
214
+ "date": {
215
+ "type": "string",
216
+ "format": "date",
217
+ "description": "Date this entry was created or relates to"
218
+ }
219
+ },
220
+ "required": ["type"],
221
+ "additionalProperties": true,
222
+ "examples": [
223
+ {
224
+ "type": "note",
225
+ "date": "2024-03-15",
226
+ "tags": ["reading-log"]
227
+ }
228
+ ]
229
+ },
230
+ "index": {
231
+ "type": "object",
232
+ "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.",
233
+ "allOf": [{ "$ref": "sctx://_sctx_base#/$defs/baseNodeProps" }],
234
+ "properties": {
235
+ "type": { "const": "index" }
236
+ },
237
+ "required": ["type"],
238
+ "additionalProperties": true,
239
+ "examples": [
240
+ {
241
+ "type": "index"
242
+ }
243
+ ]
244
+ }
245
+ }
246
+ }
@@ -1,8 +1,9 @@
1
1
  {
2
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",
3
+ "$id": "sctx://_strategy_general",
4
+ // Shared entity definitions for strategy-general schemas.
5
+ // Provides a default hierarchy, aliases, relationships, and entity type $defs.
6
+ // Composing schemas can override the hierarchy by defining their own.
6
7
  "$metadata": {
7
8
  "hierarchy": {
8
9
  "levels": [
@@ -41,8 +42,8 @@
41
42
  }
42
43
  ]
43
44
  },
44
- "oneOf": [
45
- {
45
+ "$defs": {
46
+ "dashboard": {
46
47
  "type": "object",
47
48
  "allOf": [{ "$ref": "sctx://_sctx_base#/$defs/baseNodeProps" }],
48
49
  "properties": {
@@ -51,7 +52,7 @@
51
52
  "required": ["type"],
52
53
  "additionalProperties": true
53
54
  },
54
- {
55
+ "ost_on_a_page": {
55
56
  "type": "object",
56
57
  "allOf": [{ "$ref": "sctx://_sctx_base#/$defs/baseNodeProps" }],
57
58
  "properties": {
@@ -60,7 +61,7 @@
60
61
  "required": ["type"],
61
62
  "additionalProperties": true
62
63
  },
63
- {
64
+ "vision": {
64
65
  "type": "object",
65
66
  "allOf": [
66
67
  { "$ref": "sctx://_sctx_base#/$defs/baseNodeProps" },
@@ -79,7 +80,7 @@
79
80
  }
80
81
  ]
81
82
  },
82
- {
83
+ "mission": {
83
84
  "type": "object",
84
85
  "allOf": [
85
86
  { "$ref": "sctx://_sctx_base#/$defs/baseNodeProps" },
@@ -99,7 +100,7 @@
99
100
  }
100
101
  ]
101
102
  },
102
- {
103
+ "goal": {
103
104
  "type": "object",
104
105
  "allOf": [
105
106
  { "$ref": "sctx://_sctx_base#/$defs/baseNodeProps" },
@@ -121,7 +122,7 @@
121
122
  }
122
123
  ]
123
124
  },
124
- {
125
+ "opportunity": {
125
126
  "type": "object",
126
127
  "allOf": [
127
128
  { "$ref": "sctx://_sctx_base#/$defs/baseNodeProps" },
@@ -154,7 +155,7 @@
154
155
  }
155
156
  ]
156
157
  },
157
- {
158
+ "solution": {
158
159
  "type": "object",
159
160
  "allOf": [
160
161
  { "$ref": "sctx://_sctx_base#/$defs/baseNodeProps" },
@@ -187,7 +188,7 @@
187
188
  }
188
189
  ]
189
190
  },
190
- {
191
+ "experiment": {
191
192
  "type": "object",
192
193
  "allOf": [
193
194
  { "$ref": "sctx://_sctx_base#/$defs/baseNodeProps" },
@@ -212,7 +213,7 @@
212
213
  }
213
214
  ]
214
215
  },
215
- {
216
+ "assumption": {
216
217
  "type": "object",
217
218
  "allOf": [
218
219
  { "$ref": "sctx://_sctx_base#/$defs/baseNodeProps" },
@@ -238,7 +239,7 @@
238
239
  }
239
240
  ]
240
241
  },
241
- {
242
+ "problem_statement": {
242
243
  "type": "object",
243
244
  "allOf": [
244
245
  { "$ref": "sctx://_sctx_base#/$defs/baseNodeProps" },
@@ -257,5 +258,5 @@
257
258
  }
258
259
  ]
259
260
  }
260
- ]
261
+ }
261
262
  }
@@ -3,243 +3,13 @@
3
3
  "$id": "sctx://knowledge_wiki",
4
4
  "title": "Knowledge Wiki",
5
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
- "comparison": "synthesis",
14
- "query": "synthesis"
15
- },
16
- "relationships": [
17
- {
18
- "parent": "source",
19
- "type": "source",
20
- "field": "sources",
21
- "fieldOn": "child",
22
- "multiple": true
23
- },
24
- {
25
- "parent": "source",
26
- "type": "synthesis",
27
- "field": "sources",
28
- "fieldOn": "child",
29
- "multiple": true
30
- },
31
- {
32
- "parent": "source",
33
- "type": "entity",
34
- "field": "sources",
35
- "fieldOn": "child",
36
- "multiple": true
37
- },
38
- {
39
- "parent": "concept",
40
- "type": "synthesis",
41
- "field": "concepts",
42
- "fieldOn": "child",
43
- "multiple": true
44
- }
45
- ],
46
- "rules": [
47
- {
48
- "id": "synthesis-references-sources",
49
- "category": "coherence",
50
- "description": "Syntheses should reference at least one contributing source in their sources array",
51
- "type": "synthesis",
52
- "check": "$exists(current.sources) and $count(current.sources) >= 1"
53
- },
54
- {
55
- "id": "concept-has-summary",
56
- "category": "best-practice",
57
- "description": "Concept pages should have a short summary for index discoverability",
58
- "type": "concept",
59
- "check": "$exists(current.summary) and $length(current.summary) > 0"
60
- }
61
- ]
62
- },
6
+ "allOf": [{ "$ref": "sctx://_knowledge_wiki" }],
63
7
  "oneOf": [
64
- {
65
- "type": "object",
66
- "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.",
67
- "allOf": [{ "$ref": "sctx://_sctx_base#/$defs/baseNodeProps" }],
68
- "properties": {
69
- "type": { "const": "source" },
70
- "summary": {
71
- "$ref": "sctx://_sctx_base#/$defs/summary"
72
- },
73
- "url": {
74
- "type": "string",
75
- "description": "URL of the original source"
76
- },
77
- "local_copy": {
78
- "$ref": "sctx://_sctx_base#/$defs/wikilink",
79
- "description": "Wikilink to a local copy of the source (e.g. a saved PDF or clipped note)"
80
- },
81
- "author": {
82
- "type": "string",
83
- "description": "Author or creator of the source"
84
- },
85
- "book": {
86
- "type": "string",
87
- "description": "Book title and author if the source is a book"
88
- },
89
- "published_date": {
90
- "type": "string",
91
- "format": "date",
92
- "description": "Original publication date"
93
- },
94
- "source_type": {
95
- "type": "string",
96
- "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."
97
- },
98
- "sources": {
99
- "type": "array",
100
- "items": { "$ref": "sctx://_sctx_base#/$defs/wikilink" },
101
- "description": "Wikilinks to other source pages that this one references or extends"
102
- }
103
- },
104
- "required": ["type", "url"],
105
- "additionalProperties": true,
106
- "examples": [
107
- {
108
- "type": "source",
109
- "author": "Joe Bloggs",
110
- "url": "https://example.com/design-of-yesterday-things",
111
- "source_type": "book",
112
- "tags": ["design", "ux", "psychology"]
113
- }
114
- ]
115
- },
116
- {
117
- "type": "object",
118
- "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.",
119
- "allOf": [{ "$ref": "sctx://_sctx_base#/$defs/baseNodeProps" }],
120
- "properties": {
121
- "type": { "const": "concept" },
122
- "summary": {
123
- "$ref": "sctx://_sctx_base#/$defs/summary"
124
- },
125
- "sources": {
126
- "type": "array",
127
- "items": { "$ref": "sctx://_sctx_base#/$defs/wikilink" },
128
- "description": "Wikilinks to source pages that contributed to this concept"
129
- },
130
- "related": {
131
- "type": "array",
132
- "items": { "$ref": "sctx://_sctx_base#/$defs/wikilink" },
133
- "description": "Wikilinks to related concept or synthesis pages"
134
- }
135
- },
136
- "required": ["type"],
137
- "additionalProperties": true,
138
- "examples": [
139
- {
140
- "type": "concept",
141
- "summary": "A property of an object that signals how it can be used, first described by Gibson and popularised in design by Norman",
142
- "tags": ["design", "ux"]
143
- }
144
- ]
145
- },
146
- {
147
- "type": "object",
148
- "description": "A concrete entity — a person, organisation, product, model, or other named thing. The building blocks of the wiki's knowledge graph alongside concepts. Entities are distinct from concepts: a concept frames an idea or mechanism; an entity is a specific, identifiable thing in the world.",
149
- "allOf": [{ "$ref": "sctx://_sctx_base#/$defs/baseNodeProps" }],
150
- "properties": {
151
- "type": { "const": "entity" },
152
- "summary": {
153
- "$ref": "sctx://_sctx_base#/$defs/summary"
154
- },
155
- "sources": {
156
- "type": "array",
157
- "items": { "$ref": "sctx://_sctx_base#/$defs/wikilink" },
158
- "description": "Wikilinks to source pages that contributed to this entity page"
159
- },
160
- "related": {
161
- "type": "array",
162
- "items": { "$ref": "sctx://_sctx_base#/$defs/wikilink" },
163
- "description": "Wikilinks to related entity, concept, or synthesis pages"
164
- }
165
- },
166
- "required": ["type"],
167
- "additionalProperties": true,
168
- "examples": [
169
- {
170
- "type": "entity",
171
- "summary": "AI safety research lab founded by Dario Amodei and Daniela Amodei",
172
- "tags": ["company", "ai", "safety"]
173
- }
174
- ]
175
- },
176
- {
177
- "type": "object",
178
- "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.",
179
- "allOf": [{ "$ref": "sctx://_sctx_base#/$defs/baseNodeProps" }],
180
- "properties": {
181
- "type": { "const": "synthesis" },
182
- "summary": {
183
- "$ref": "sctx://_sctx_base#/$defs/summary"
184
- },
185
- "sources": {
186
- "type": "array",
187
- "items": { "$ref": "sctx://_sctx_base#/$defs/wikilink" },
188
- "description": "Wikilinks to source pages this synthesis draws from"
189
- },
190
- "concepts": {
191
- "type": "array",
192
- "items": { "$ref": "sctx://_sctx_base#/$defs/wikilink" },
193
- "description": "Wikilinks to concept pages this synthesis connects"
194
- }
195
- },
196
- "required": ["type"],
197
- "additionalProperties": true,
198
- "examples": [
199
- {
200
- "type": "synthesis",
201
- "summary": "How Norman's affordance model and feedback principles combine to explain intuitive vs confusing interfaces",
202
- "sources": ["[[The Design of Everyday Things - Don Norman]]"],
203
- "concepts": ["[[Affordance]]", "[[Feedback loop]]"]
204
- }
205
- ]
206
- },
207
- {
208
- "type": "object",
209
- "description": "Personal notes, journal entries, appointments, experiential records. Your own data about your journey — not sourced from external material.",
210
- "allOf": [{ "$ref": "sctx://_sctx_base#/$defs/baseNodeProps" }],
211
- "properties": {
212
- "type": { "const": "note" },
213
- "date": {
214
- "type": "string",
215
- "format": "date",
216
- "description": "Date this entry was created or relates to"
217
- }
218
- },
219
- "required": ["type"],
220
- "additionalProperties": true,
221
- "examples": [
222
- {
223
- "type": "note",
224
- "date": "2024-03-15",
225
- "tags": ["reading-log"]
226
- }
227
- ]
228
- },
229
- {
230
- "type": "object",
231
- "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.",
232
- "allOf": [{ "$ref": "sctx://_sctx_base#/$defs/baseNodeProps" }],
233
- "properties": {
234
- "type": { "const": "index" }
235
- },
236
- "required": ["type"],
237
- "additionalProperties": true,
238
- "examples": [
239
- {
240
- "type": "index"
241
- }
242
- ]
243
- }
8
+ { "$ref": "sctx://_knowledge_wiki#/$defs/source" },
9
+ { "$ref": "sctx://_knowledge_wiki#/$defs/concept" },
10
+ { "$ref": "sctx://_knowledge_wiki#/$defs/entity" },
11
+ { "$ref": "sctx://_knowledge_wiki#/$defs/synthesis" },
12
+ { "$ref": "sctx://_knowledge_wiki#/$defs/note" },
13
+ { "$ref": "sctx://_knowledge_wiki#/$defs/index" }
244
14
  ]
245
15
  }
@@ -0,0 +1,19 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/mindsocket/structured-context/main/schemas/generated/_structured_context_schema_meta.json",
3
+ "$id": "sctx://strategy_general",
4
+ "title": "Strategy and opportunity ladder",
5
+ "description": "Validates frontmatter for space node files. Composes strategy_general entities from the bundled partial. Override the hierarchy in $metadata to customize the level structure.",
6
+ "allOf": [{ "$ref": "sctx://_strategy_general" }],
7
+ "oneOf": [
8
+ { "$ref": "sctx://_strategy_general#/$defs/dashboard" },
9
+ { "$ref": "sctx://_strategy_general#/$defs/ost_on_a_page" },
10
+ { "$ref": "sctx://_strategy_general#/$defs/vision" },
11
+ { "$ref": "sctx://_strategy_general#/$defs/mission" },
12
+ { "$ref": "sctx://_strategy_general#/$defs/goal" },
13
+ { "$ref": "sctx://_strategy_general#/$defs/opportunity" },
14
+ { "$ref": "sctx://_strategy_general#/$defs/solution" },
15
+ { "$ref": "sctx://_strategy_general#/$defs/experiment" },
16
+ { "$ref": "sctx://_strategy_general#/$defs/assumption" },
17
+ { "$ref": "sctx://_strategy_general#/$defs/problem_statement" }
18
+ ]
19
+ }