@nexural/schema 0.1.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.
@@ -0,0 +1,61 @@
1
+ {
2
+ "$ref": "#/definitions/adr-frontmatter",
3
+ "definitions": {
4
+ "adr-frontmatter": {
5
+ "type": "object",
6
+ "properties": {
7
+ "number": {
8
+ "type": "integer",
9
+ "exclusiveMinimum": 0
10
+ },
11
+ "title": {
12
+ "type": "string",
13
+ "minLength": 5,
14
+ "maxLength": 120
15
+ },
16
+ "status": {
17
+ "type": "string",
18
+ "enum": [
19
+ "proposed",
20
+ "accepted",
21
+ "superseded",
22
+ "deprecated"
23
+ ]
24
+ },
25
+ "supersedes": {
26
+ "type": "integer",
27
+ "exclusiveMinimum": 0
28
+ },
29
+ "superseded_by": {
30
+ "type": "integer",
31
+ "exclusiveMinimum": 0
32
+ },
33
+ "date": {
34
+ "type": "string",
35
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
36
+ },
37
+ "deciders": {
38
+ "type": "array",
39
+ "items": {
40
+ "type": "string"
41
+ },
42
+ "minItems": 1
43
+ },
44
+ "soak_until": {
45
+ "type": "string",
46
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
47
+ }
48
+ },
49
+ "required": [
50
+ "number",
51
+ "title",
52
+ "status",
53
+ "date",
54
+ "deciders",
55
+ "soak_until"
56
+ ],
57
+ "additionalProperties": false
58
+ }
59
+ },
60
+ "$schema": "http://json-schema.org/draft-07/schema#"
61
+ }
@@ -0,0 +1,166 @@
1
+ {
2
+ "$ref": "#/definitions/content-frontmatter",
3
+ "definitions": {
4
+ "content-frontmatter": {
5
+ "type": "object",
6
+ "properties": {
7
+ "schema_version": {
8
+ "type": "number",
9
+ "const": 1
10
+ },
11
+ "id": {
12
+ "anyOf": [
13
+ {
14
+ "type": "string",
15
+ "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
16
+ },
17
+ {
18
+ "type": "string",
19
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
20
+ }
21
+ ]
22
+ },
23
+ "title": {
24
+ "type": "string",
25
+ "minLength": 3,
26
+ "maxLength": 200
27
+ },
28
+ "summary": {
29
+ "type": "string",
30
+ "minLength": 20,
31
+ "maxLength": 500
32
+ },
33
+ "tags": {
34
+ "type": "array",
35
+ "items": {
36
+ "type": "string",
37
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
38
+ },
39
+ "maxItems": 20
40
+ },
41
+ "created": {
42
+ "type": "string",
43
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
44
+ },
45
+ "updated": {
46
+ "type": "string",
47
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
48
+ },
49
+ "last_reviewed": {
50
+ "type": "string",
51
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
52
+ },
53
+ "decay_rate_days": {
54
+ "type": "integer",
55
+ "exclusiveMinimum": 0,
56
+ "maximum": 3650
57
+ },
58
+ "status": {
59
+ "type": "string",
60
+ "enum": [
61
+ "draft",
62
+ "active",
63
+ "archived",
64
+ "deprecated"
65
+ ]
66
+ },
67
+ "authors": {
68
+ "type": "array",
69
+ "items": {
70
+ "type": "string"
71
+ },
72
+ "minItems": 1
73
+ },
74
+ "source_type": {
75
+ "type": "string",
76
+ "enum": [
77
+ "principle",
78
+ "playbook",
79
+ "framework",
80
+ "template",
81
+ "case-study",
82
+ "decision",
83
+ "reference",
84
+ "snippet",
85
+ "checklist",
86
+ "rubric",
87
+ "post-mortem"
88
+ ]
89
+ },
90
+ "related": {
91
+ "type": "array",
92
+ "items": {
93
+ "type": "object",
94
+ "properties": {
95
+ "warehouse": {
96
+ "type": "string",
97
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
98
+ },
99
+ "id": {
100
+ "anyOf": [
101
+ {
102
+ "type": "string",
103
+ "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
104
+ },
105
+ {
106
+ "type": "string",
107
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
108
+ }
109
+ ]
110
+ },
111
+ "relation": {
112
+ "type": "string",
113
+ "enum": [
114
+ "extends",
115
+ "supersedes",
116
+ "informs",
117
+ "contradicts",
118
+ "cites"
119
+ ]
120
+ }
121
+ },
122
+ "required": [
123
+ "warehouse",
124
+ "id",
125
+ "relation"
126
+ ],
127
+ "additionalProperties": false
128
+ },
129
+ "default": []
130
+ },
131
+ "visibility": {
132
+ "type": "object",
133
+ "properties": {
134
+ "public_via_mcp": {
135
+ "type": "boolean"
136
+ },
137
+ "embedding_eligible": {
138
+ "type": "boolean"
139
+ }
140
+ },
141
+ "required": [
142
+ "public_via_mcp",
143
+ "embedding_eligible"
144
+ ],
145
+ "additionalProperties": false
146
+ }
147
+ },
148
+ "required": [
149
+ "schema_version",
150
+ "id",
151
+ "title",
152
+ "summary",
153
+ "tags",
154
+ "created",
155
+ "updated",
156
+ "last_reviewed",
157
+ "status",
158
+ "authors",
159
+ "source_type",
160
+ "visibility"
161
+ ],
162
+ "additionalProperties": false
163
+ }
164
+ },
165
+ "$schema": "http://json-schema.org/draft-07/schema#"
166
+ }
@@ -0,0 +1,53 @@
1
+ {
2
+ "$ref": "#/definitions/cost-envelope",
3
+ "definitions": {
4
+ "cost-envelope": {
5
+ "type": "object",
6
+ "properties": {
7
+ "per_request_p50_usd": {
8
+ "type": "number",
9
+ "minimum": 0
10
+ },
11
+ "per_request_p99_usd": {
12
+ "type": "number",
13
+ "minimum": 0
14
+ },
15
+ "monthly_baseline_usd": {
16
+ "type": "number",
17
+ "minimum": 0
18
+ },
19
+ "hard_caps": {
20
+ "type": "object",
21
+ "properties": {
22
+ "per_request_usd": {
23
+ "type": "number",
24
+ "exclusiveMinimum": 0
25
+ },
26
+ "per_user_per_day_usd": {
27
+ "type": "number",
28
+ "exclusiveMinimum": 0
29
+ },
30
+ "per_app_per_day_usd": {
31
+ "type": "number",
32
+ "exclusiveMinimum": 0
33
+ }
34
+ },
35
+ "required": [
36
+ "per_request_usd",
37
+ "per_user_per_day_usd",
38
+ "per_app_per_day_usd"
39
+ ],
40
+ "additionalProperties": false
41
+ }
42
+ },
43
+ "required": [
44
+ "per_request_p50_usd",
45
+ "per_request_p99_usd",
46
+ "monthly_baseline_usd",
47
+ "hard_caps"
48
+ ],
49
+ "additionalProperties": false
50
+ }
51
+ },
52
+ "$schema": "http://json-schema.org/draft-07/schema#"
53
+ }
@@ -0,0 +1,110 @@
1
+ {
2
+ "$ref": "#/definitions/cross-ref-report",
3
+ "definitions": {
4
+ "cross-ref-report": {
5
+ "type": "object",
6
+ "properties": {
7
+ "schema_version": {
8
+ "type": "number",
9
+ "const": 1
10
+ },
11
+ "generated_at": {
12
+ "type": "string",
13
+ "format": "date-time"
14
+ },
15
+ "links": {
16
+ "type": "array",
17
+ "items": {
18
+ "type": "object",
19
+ "properties": {
20
+ "from_warehouse": {
21
+ "type": "string",
22
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
23
+ },
24
+ "from_id": {
25
+ "anyOf": [
26
+ {
27
+ "type": "string",
28
+ "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
29
+ },
30
+ {
31
+ "type": "string",
32
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
33
+ }
34
+ ]
35
+ },
36
+ "to_warehouse": {
37
+ "type": "string",
38
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
39
+ },
40
+ "to_id": {
41
+ "anyOf": [
42
+ {
43
+ "type": "string",
44
+ "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
45
+ },
46
+ {
47
+ "type": "string",
48
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
49
+ }
50
+ ]
51
+ },
52
+ "relation": {
53
+ "type": "string"
54
+ },
55
+ "valid": {
56
+ "type": "boolean"
57
+ },
58
+ "reason": {
59
+ "type": "string"
60
+ }
61
+ },
62
+ "required": [
63
+ "from_warehouse",
64
+ "from_id",
65
+ "to_warehouse",
66
+ "to_id",
67
+ "relation",
68
+ "valid"
69
+ ],
70
+ "additionalProperties": false
71
+ }
72
+ },
73
+ "summary": {
74
+ "type": "object",
75
+ "properties": {
76
+ "total": {
77
+ "type": "integer",
78
+ "minimum": 0
79
+ },
80
+ "broken": {
81
+ "type": "integer",
82
+ "minimum": 0
83
+ },
84
+ "orphan_warehouses": {
85
+ "type": "array",
86
+ "items": {
87
+ "type": "string",
88
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
89
+ }
90
+ }
91
+ },
92
+ "required": [
93
+ "total",
94
+ "broken",
95
+ "orphan_warehouses"
96
+ ],
97
+ "additionalProperties": false
98
+ }
99
+ },
100
+ "required": [
101
+ "schema_version",
102
+ "generated_at",
103
+ "links",
104
+ "summary"
105
+ ],
106
+ "additionalProperties": false
107
+ }
108
+ },
109
+ "$schema": "http://json-schema.org/draft-07/schema#"
110
+ }
@@ -0,0 +1,72 @@
1
+ {
2
+ "$ref": "#/definitions/decay-config",
3
+ "definitions": {
4
+ "decay-config": {
5
+ "type": "object",
6
+ "properties": {
7
+ "schema_version": {
8
+ "type": "number",
9
+ "const": 1
10
+ },
11
+ "default_days": {
12
+ "type": "integer",
13
+ "exclusiveMinimum": 0,
14
+ "maximum": 3650
15
+ },
16
+ "overrides": {
17
+ "type": "array",
18
+ "items": {
19
+ "type": "object",
20
+ "properties": {
21
+ "match": {
22
+ "type": "object",
23
+ "properties": {
24
+ "tag": {
25
+ "type": "string",
26
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
27
+ },
28
+ "source_type": {
29
+ "type": "string",
30
+ "enum": [
31
+ "principle",
32
+ "playbook",
33
+ "framework",
34
+ "template",
35
+ "case-study",
36
+ "decision",
37
+ "reference",
38
+ "snippet",
39
+ "checklist",
40
+ "rubric",
41
+ "post-mortem"
42
+ ]
43
+ },
44
+ "path_glob": {
45
+ "type": "string"
46
+ }
47
+ },
48
+ "additionalProperties": false
49
+ },
50
+ "decay_days": {
51
+ "type": "integer",
52
+ "exclusiveMinimum": 0,
53
+ "maximum": 3650
54
+ }
55
+ },
56
+ "required": [
57
+ "match",
58
+ "decay_days"
59
+ ],
60
+ "additionalProperties": false
61
+ },
62
+ "default": []
63
+ }
64
+ },
65
+ "required": [
66
+ "schema_version"
67
+ ],
68
+ "additionalProperties": false
69
+ }
70
+ },
71
+ "$schema": "http://json-schema.org/draft-07/schema#"
72
+ }
@@ -0,0 +1,102 @@
1
+ {
2
+ "$ref": "#/definitions/external-mcp-endpoint",
3
+ "definitions": {
4
+ "external-mcp-endpoint": {
5
+ "type": "object",
6
+ "properties": {
7
+ "schema_version": {
8
+ "type": "number",
9
+ "const": 1
10
+ },
11
+ "name": {
12
+ "type": "string",
13
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
14
+ },
15
+ "type": {
16
+ "type": "string",
17
+ "const": "external"
18
+ },
19
+ "transport": {
20
+ "type": "string",
21
+ "enum": [
22
+ "stdio",
23
+ "http",
24
+ "websocket"
25
+ ]
26
+ },
27
+ "command": {
28
+ "type": "array",
29
+ "items": {
30
+ "type": "string"
31
+ }
32
+ },
33
+ "url": {
34
+ "type": "string",
35
+ "format": "uri"
36
+ },
37
+ "tool_prefix": {
38
+ "type": "string",
39
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
40
+ },
41
+ "schema_compatibility": {
42
+ "type": "string",
43
+ "enum": [
44
+ "nexural-1",
45
+ "external"
46
+ ]
47
+ },
48
+ "federations": {
49
+ "type": "array",
50
+ "items": {
51
+ "type": "string",
52
+ "enum": [
53
+ "factory",
54
+ "lifeops"
55
+ ]
56
+ },
57
+ "minItems": 1
58
+ },
59
+ "quality_attestation": {
60
+ "type": "object",
61
+ "properties": {
62
+ "source": {
63
+ "type": "string"
64
+ },
65
+ "score": {
66
+ "type": "integer",
67
+ "minimum": 0,
68
+ "maximum": 100
69
+ },
70
+ "verified_at": {
71
+ "type": "string",
72
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
73
+ },
74
+ "next_review": {
75
+ "type": "string",
76
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
77
+ }
78
+ },
79
+ "required": [
80
+ "source",
81
+ "score",
82
+ "verified_at",
83
+ "next_review"
84
+ ],
85
+ "additionalProperties": false
86
+ }
87
+ },
88
+ "required": [
89
+ "schema_version",
90
+ "name",
91
+ "type",
92
+ "transport",
93
+ "tool_prefix",
94
+ "schema_compatibility",
95
+ "federations",
96
+ "quality_attestation"
97
+ ],
98
+ "additionalProperties": false
99
+ }
100
+ },
101
+ "$schema": "http://json-schema.org/draft-07/schema#"
102
+ }
@@ -0,0 +1,119 @@
1
+ {
2
+ "$ref": "#/definitions/external-mcp-registry",
3
+ "definitions": {
4
+ "external-mcp-registry": {
5
+ "type": "object",
6
+ "properties": {
7
+ "schema_version": {
8
+ "type": "number",
9
+ "const": 1
10
+ },
11
+ "endpoints": {
12
+ "type": "array",
13
+ "items": {
14
+ "type": "object",
15
+ "properties": {
16
+ "schema_version": {
17
+ "type": "number",
18
+ "const": 1
19
+ },
20
+ "name": {
21
+ "type": "string",
22
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
23
+ },
24
+ "type": {
25
+ "type": "string",
26
+ "const": "external"
27
+ },
28
+ "transport": {
29
+ "type": "string",
30
+ "enum": [
31
+ "stdio",
32
+ "http",
33
+ "websocket"
34
+ ]
35
+ },
36
+ "command": {
37
+ "type": "array",
38
+ "items": {
39
+ "type": "string"
40
+ }
41
+ },
42
+ "url": {
43
+ "type": "string",
44
+ "format": "uri"
45
+ },
46
+ "tool_prefix": {
47
+ "type": "string",
48
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
49
+ },
50
+ "schema_compatibility": {
51
+ "type": "string",
52
+ "enum": [
53
+ "nexural-1",
54
+ "external"
55
+ ]
56
+ },
57
+ "federations": {
58
+ "type": "array",
59
+ "items": {
60
+ "type": "string",
61
+ "enum": [
62
+ "factory",
63
+ "lifeops"
64
+ ]
65
+ },
66
+ "minItems": 1
67
+ },
68
+ "quality_attestation": {
69
+ "type": "object",
70
+ "properties": {
71
+ "source": {
72
+ "type": "string"
73
+ },
74
+ "score": {
75
+ "type": "integer",
76
+ "minimum": 0,
77
+ "maximum": 100
78
+ },
79
+ "verified_at": {
80
+ "type": "string",
81
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
82
+ },
83
+ "next_review": {
84
+ "type": "string",
85
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
86
+ }
87
+ },
88
+ "required": [
89
+ "source",
90
+ "score",
91
+ "verified_at",
92
+ "next_review"
93
+ ],
94
+ "additionalProperties": false
95
+ }
96
+ },
97
+ "required": [
98
+ "schema_version",
99
+ "name",
100
+ "type",
101
+ "transport",
102
+ "tool_prefix",
103
+ "schema_compatibility",
104
+ "federations",
105
+ "quality_attestation"
106
+ ],
107
+ "additionalProperties": false
108
+ }
109
+ }
110
+ },
111
+ "required": [
112
+ "schema_version",
113
+ "endpoints"
114
+ ],
115
+ "additionalProperties": false
116
+ }
117
+ },
118
+ "$schema": "http://json-schema.org/draft-07/schema#"
119
+ }