You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+58-19Lines changed: 58 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,58 @@
1
1
# structured-context
2
2
3
-
Tools for working with Opportunity Solution Tree structures and other product management and strategy frameworks
3
+
Keep your content clean and your thinking clear.
4
+
5
+
`structured-context` provides assistive tools for working with structured content, including knowledge wikis (a la [Karpathy](https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f)), product/strategy frameworks (like [Teresa Torres' Opportunity Solution Trees](https://www.producttalk.org/opportunity-solution-trees/) and [Martin et al's strategy cascade](https://rogerlmartin.com/thought-pillars/strategy), and more. Great for flat sets of documents, hierarchical or layered context trees, or any kind of knowledge graph.
6
+
7
+
Assign a schema to your markdown content to give humans and AI agents consistent structure and content guidelines.
8
+
9
+
In Claude Code:
10
+
```
11
+
❯ Use /structured-context to configure 'my-research' as a knowledge wiki, then organise it
12
+
13
+
⏺ Skill(structured-context)
14
+
⎿ Successfully loaded skill
15
+
16
+
...
17
+
18
+
```
19
+
20
+
Command line tools:
21
+
```
22
+
> sctx validate strategy
23
+
24
+
Space Validation Results
25
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
26
+
Content and structure
27
+
Valid 16
28
+
Schema validation errors 0
29
+
Broken links 1
30
+
Duplicate keys 0
31
+
Rule violations 2
32
+
Hierarchy violations 0
33
+
Orphans (hierarchy nodes - no parent) 1
34
+
Ignored during parsing 0
35
+
36
+
Orphans (hierarchy nodes - no parent):
37
+
Solution looking for a problem.md
38
+
39
+
Broken links:
40
+
Steal underpants.md: [[Gnome goals]] → Link target "Gnome goals" in field "related" not found
41
+
42
+
Rule violations:
43
+
workflow (1):
44
+
Build Death Star.md: Opportunities should contribute to at least one Outcome
45
+
46
+
best-practice (1):
47
+
High tech juice press.md: Explore multiple candidate solutions (aim for at least three) for an active target opportunity
4.`./config.json` in the current working directory
44
93
45
-
See `config.example.json` for the full structure. The config maps space names to paths, with optional Miro integration fields and global defaults. Paths in config files are resolved relative to the config file.
94
+
See `config.example.json` for the full structure. The config maps space names to paths, with optional additional configuration options for parsing and integrations. Paths in config files are resolved relative to the config file.
46
95
47
96
**Including spaces from other configs:** Use `includeSpacesFrom` to import space definitions from other config files. This is useful for aggregating spaces from multiple projects into a central config, reducing the need to specify `--config` on CLI commands. Duplicate space names are not allowed.
48
97
49
98
**Plugins and markdown plugin config:** See `sctx docs config` for the full reference including `fieldMap`, `typeInference`, `templateDir`, filter views, and plugin loading rules.
50
99
51
-
### Spaces
52
-
53
-
A space is a named directory or single file registered in the config. Spaces let you reference content by name instead of path:
54
-
55
-
```bash
56
-
sctx validate ProductX
57
-
```
58
-
59
100
### Schemas
60
101
61
102
Schemas define the structure and rules for the entities in a space, allowing customisation and extension to different models.
62
103
63
-
Two schemas (`general`and `strict_ost`) are included. The general schema combines a basic vision/mission/goals hierarchy with a hierarchy loosely based on Opportunity Solution Trees. It is intentionally flexible to support rapid initial adoption. The strict OST schema has a narrower scope, and reflects Teresa Torres' specific recommendations for Opportunity Solution Trees more closely.
104
+
Several schemas (`strict_ost`, `knowledge_wiki`and `general`) are included. The general (strategy) schema combines a basic vision/mission/goals hierarchy with a hierarchy loosely based on Opportunity Solution Trees. It is intentionally flexible to support rapid initial adoption. The strict OST schema has a narrower scope, and reflects Teresa Torres' specific recommendations for Opportunity Solution Trees more closely. The knowledge wiki schema defines a flatter set of types used for knowledge bases.
64
105
65
-
sctx schemas use a metaschema based on JSON Schema Draft-07 that adds a top-level `$metadata` block:
106
+
structured-context schemas use a metaschema based on JSON Schema Draft-07 that adds a top-level `$metadata` block:
66
107
67
108
```json5
68
109
"$metadata": {
@@ -91,8 +132,6 @@ sctx schemas use a metaschema based on JSON Schema Draft-07 that adds a top-leve
91
132
}
92
133
```
93
134
94
-
Rules are a flat array (`rules[]`) with per-rule `category`.
95
-
96
135
Schema hierarchy levels support DAG (multi-parent) relationships via configurable edge fields. Each entry in `$metadata.hierarchy.levels` can be a plain type name string (defaults to `parent` field on child nodes) or an object:
0 commit comments