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.
Files changed (112) hide show
  1. package/README.md +348 -0
  2. package/dist/commands/diagram.d.ts +5 -0
  3. package/dist/commands/diagram.js +12 -0
  4. package/dist/commands/docs.d.ts +1 -0
  5. package/dist/commands/docs.js +67 -0
  6. package/dist/commands/dump.d.ts +2 -0
  7. package/dist/commands/dump.js +6 -0
  8. package/dist/commands/plugins.d.ts +1 -0
  9. package/dist/commands/plugins.js +23 -0
  10. package/dist/commands/render.d.ts +6 -0
  11. package/dist/commands/render.js +35 -0
  12. package/dist/commands/schemas.d.ts +6 -0
  13. package/dist/commands/schemas.js +268 -0
  14. package/dist/commands/show.d.ts +4 -0
  15. package/dist/commands/show.js +7 -0
  16. package/dist/commands/spaces.d.ts +1 -0
  17. package/dist/commands/spaces.js +36 -0
  18. package/dist/commands/template-sync.d.ts +3 -0
  19. package/dist/commands/template-sync.js +13 -0
  20. package/dist/commands/validate-file.d.ts +28 -0
  21. package/dist/commands/validate-file.js +133 -0
  22. package/dist/commands/validate.d.ts +16 -0
  23. package/dist/commands/validate.js +349 -0
  24. package/dist/config.d.ts +38 -0
  25. package/dist/config.js +179 -0
  26. package/dist/constants.d.ts +6 -0
  27. package/dist/constants.js +6 -0
  28. package/dist/filter/augment-nodes.d.ts +23 -0
  29. package/dist/filter/augment-nodes.js +95 -0
  30. package/dist/filter/expand-include.d.ts +62 -0
  31. package/dist/filter/expand-include.js +181 -0
  32. package/dist/filter/filter-nodes.d.ts +21 -0
  33. package/dist/filter/filter-nodes.js +73 -0
  34. package/dist/filter/parse-expression.d.ts +20 -0
  35. package/dist/filter/parse-expression.js +60 -0
  36. package/dist/index.d.ts +3 -0
  37. package/dist/index.js +161 -0
  38. package/dist/integrations/miro/cache.d.ts +21 -0
  39. package/dist/integrations/miro/cache.js +55 -0
  40. package/dist/integrations/miro/client.d.ts +99 -0
  41. package/dist/integrations/miro/client.js +118 -0
  42. package/dist/integrations/miro/layout.d.ts +28 -0
  43. package/dist/integrations/miro/layout.js +72 -0
  44. package/dist/integrations/miro/styles.d.ts +11 -0
  45. package/dist/integrations/miro/styles.js +65 -0
  46. package/dist/integrations/miro/sync.d.ts +8 -0
  47. package/dist/integrations/miro/sync.js +347 -0
  48. package/dist/plugin-api.d.ts +12 -0
  49. package/dist/plugin-api.js +7 -0
  50. package/dist/plugins/index.d.ts +3 -0
  51. package/dist/plugins/index.js +3 -0
  52. package/dist/plugins/loader.d.ts +21 -0
  53. package/dist/plugins/loader.js +104 -0
  54. package/dist/plugins/markdown/index.d.ts +48 -0
  55. package/dist/plugins/markdown/index.js +51 -0
  56. package/dist/plugins/markdown/parse-embedded.d.ts +90 -0
  57. package/dist/plugins/markdown/parse-embedded.js +663 -0
  58. package/dist/plugins/markdown/read-space.d.ts +7 -0
  59. package/dist/plugins/markdown/read-space.js +89 -0
  60. package/dist/plugins/markdown/render-bullets.d.ts +2 -0
  61. package/dist/plugins/markdown/render-bullets.js +42 -0
  62. package/dist/plugins/markdown/render-mermaid.d.ts +2 -0
  63. package/dist/plugins/markdown/render-mermaid.js +57 -0
  64. package/dist/plugins/markdown/template-sync.d.ts +16 -0
  65. package/dist/plugins/markdown/template-sync.js +294 -0
  66. package/dist/plugins/markdown/util.d.ts +19 -0
  67. package/dist/plugins/markdown/util.js +80 -0
  68. package/dist/plugins/util.d.ts +60 -0
  69. package/dist/plugins/util.js +7 -0
  70. package/dist/read/read-space.d.ts +2 -0
  71. package/dist/read/read-space.js +22 -0
  72. package/dist/read/resolve-graph-edges.d.ts +11 -0
  73. package/dist/read/resolve-graph-edges.js +201 -0
  74. package/dist/read/wikilink-utils.d.ts +16 -0
  75. package/dist/read/wikilink-utils.js +38 -0
  76. package/dist/render/registry.d.ts +13 -0
  77. package/dist/render/registry.js +22 -0
  78. package/dist/render/render.d.ts +4 -0
  79. package/dist/render/render.js +28 -0
  80. package/dist/schema/evaluate-rule.d.ts +30 -0
  81. package/dist/schema/evaluate-rule.js +82 -0
  82. package/dist/schema/metadata-contract.d.ts +538 -0
  83. package/dist/schema/metadata-contract.js +115 -0
  84. package/dist/schema/schema-refs.d.ts +22 -0
  85. package/dist/schema/schema-refs.js +168 -0
  86. package/dist/schema/schema.d.ts +27 -0
  87. package/dist/schema/schema.js +378 -0
  88. package/dist/schema/validate-graph.d.ts +24 -0
  89. package/dist/schema/validate-graph.js +141 -0
  90. package/dist/schema/validate-rules.d.ts +10 -0
  91. package/dist/schema/validate-rules.js +51 -0
  92. package/dist/schemas/_ost_strict.json +81 -0
  93. package/dist/schemas/_sctx_base.json +72 -0
  94. package/dist/schemas/general.json +261 -0
  95. package/dist/schemas/generated/_structured_context_schema_meta.json +191 -0
  96. package/dist/schemas/knowledge_wiki.json +206 -0
  97. package/dist/schemas/strict_ost.json +97 -0
  98. package/dist/space-graph.d.ts +28 -0
  99. package/dist/space-graph.js +82 -0
  100. package/dist/types.d.ts +145 -0
  101. package/dist/types.js +0 -0
  102. package/docs/concepts.md +391 -0
  103. package/docs/config.md +140 -0
  104. package/docs/rules.md +120 -0
  105. package/docs/schemas.md +340 -0
  106. package/package.json +69 -0
  107. package/schemas/_ost_strict.json +81 -0
  108. package/schemas/_sctx_base.json +72 -0
  109. package/schemas/general.json +261 -0
  110. package/schemas/generated/_structured_context_schema_meta.json +191 -0
  111. package/schemas/knowledge_wiki.json +206 -0
  112. package/schemas/strict_ost.json +97 -0
@@ -0,0 +1,97 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/mindsocket/structured-context/main/schemas/generated/_structured_context_schema_meta.json",
3
+ "$id": "sctx://strict_ost",
4
+ "title": "Opportunity Solution Tree (Strict)",
5
+ // Follows Teresa Torres' 4-level OST structure as described in "Continuous Discovery Habits" (2021)
6
+ // and at producttalk.org.
7
+ // Structure: outcome → opportunity → solution → assumption test
8
+ "description": "Validates frontmatter for space node files following the canonical 4-level OST structure: outcome → opportunity → solution → assumption test",
9
+ "oneOf": [
10
+ {
11
+ "type": "object",
12
+ "allOf": [
13
+ { "$ref": "sctx://_sctx_base#/$defs/baseNodeProps" },
14
+ { "$ref": "sctx://_sctx_base#/$defs/ostEntityProps" },
15
+ { "$ref": "sctx://_ost_strict#/$defs/outcomeProps" }
16
+ ],
17
+ "properties": {
18
+ "type": { "const": "outcome" }
19
+ },
20
+ "required": ["type"],
21
+ "not": { "required": ["parent"] },
22
+ "additionalProperties": true,
23
+ "examples": [
24
+ {
25
+ "type": "outcome",
26
+ "status": "active",
27
+ "metric": "Increase % of first-time users who reach the aha moment"
28
+ }
29
+ ]
30
+ },
31
+ {
32
+ "type": "object",
33
+ "allOf": [
34
+ { "$ref": "sctx://_sctx_base#/$defs/baseNodeProps" },
35
+ { "$ref": "sctx://_sctx_base#/$defs/parentNodeProps" },
36
+ { "$ref": "sctx://_sctx_base#/$defs/ostEntityProps" },
37
+ { "$ref": "sctx://_ost_strict#/$defs/opportunityProps" }
38
+ ],
39
+ "properties": {
40
+ "type": { "const": "opportunity" }
41
+ },
42
+ "required": ["type"],
43
+ "additionalProperties": true,
44
+ "examples": [
45
+ {
46
+ "type": "opportunity",
47
+ "status": "active",
48
+ "parent": "[[Increase Trial Conversion]]",
49
+ "source": "Interview with Sarah, 2024-02-10 - mentioned she drops off during signup"
50
+ }
51
+ ]
52
+ },
53
+ {
54
+ "type": "object",
55
+ "allOf": [
56
+ { "$ref": "sctx://_sctx_base#/$defs/baseNodeProps" },
57
+ { "$ref": "sctx://_sctx_base#/$defs/parentNodeProps" },
58
+ { "$ref": "sctx://_sctx_base#/$defs/ostEntityProps" }
59
+ ],
60
+ "properties": {
61
+ "type": { "const": "solution" }
62
+ },
63
+ "required": ["type"],
64
+ "additionalProperties": true,
65
+ "examples": [
66
+ {
67
+ "type": "solution",
68
+ "status": "identified",
69
+ "parent": "[[Simplify Signup Flow]]"
70
+ }
71
+ ]
72
+ },
73
+ {
74
+ "type": "object",
75
+ "allOf": [
76
+ { "$ref": "sctx://_sctx_base#/$defs/baseNodeProps" },
77
+ { "$ref": "sctx://_sctx_base#/$defs/parentNodeProps" },
78
+ { "$ref": "sctx://_sctx_base#/$defs/ostEntityProps" },
79
+ { "$ref": "sctx://_ost_strict#/$defs/assumptionTestProps" }
80
+ ],
81
+ "properties": {
82
+ "type": { "const": "assumption_test" }
83
+ },
84
+ "required": ["type"],
85
+ "additionalProperties": true,
86
+ "examples": [
87
+ {
88
+ "type": "assumption_test",
89
+ "status": "exploring",
90
+ "parent": "[[Simplify Signup Flow]]",
91
+ "assumption": "Users can complete the simplified signup in under 2 minutes",
92
+ "category": "usability"
93
+ }
94
+ ]
95
+ }
96
+ ]
97
+ }