Repository navigation
Expand file tree
/
Copy pathpattern.json
More file actions
215 lines (215 loc) · 7.62 KB
/
Copy pathpattern.json
File metadata and controls
215 lines (215 loc) · 7.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://ethsystems.org/schemas/pattern.json",
"title": "EthSystems Pattern Frontmatter (v2)",
"description": "Schema for pattern document frontmatter in EthSystems Map. All v1 aliases have been removed. Structured context_differentiation, crops_context, post_quantum, related_patterns, open_source_implementations, and meta-pattern support are the canonical shape.",
"type": "object",
"required": ["title", "status", "maturity", "crops_profile"],
"properties": {
"title": {
"type": "string",
"pattern": "^Pattern:",
"description": "Pattern title, must start with 'Pattern:'"
},
"status": {
"type": "string",
"enum": ["draft", "ready"],
"description": "Document status"
},
"maturity": {
"type": "string",
"enum": ["research", "concept", "testnet", "production"],
"description": "Technology maturity. research (paper only), concept (spec, no code), testnet (PoC/pilot), production (mainnet with real usage)."
},
"type": {
"type": "string",
"enum": ["standard", "meta"],
"description": "Pattern kind. 'meta' patterns aggregate sub_patterns and may omit crops_profile, Protocol, and Example. Defaults to 'standard' when absent."
},
"layer": {
"type": "string",
"enum": ["L1", "L2", "offchain", "hybrid"],
"description": "Primary architectural layer"
},
"last_reviewed": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "Last review date in YYYY-MM-DD format"
},
"works-best-when": {
"oneOf": [
{ "type": "string" },
{ "type": "array", "items": { "type": "string" } }
],
"description": "Conditions when this pattern is optimal"
},
"avoid-when": {
"oneOf": [
{ "type": "string" },
{ "type": "array", "items": { "type": "string" } }
],
"description": "Conditions when to avoid this pattern"
},
"standards": {
"type": "array",
"items": { "type": "string" },
"description": "Standards this pattern relies on (ERC-20, EIP-7573, ISO-20022, etc.)."
},
"related_patterns": {
"type": "object",
"description": "Cross-references to other patterns. Slugs match patterns/pattern-<slug>.md.",
"properties": {
"requires": {
"type": "array",
"items": { "type": "string", "pattern": "^pattern-[a-z0-9-]+$" },
"description": "Hard dependencies. Can't implement this without them."
},
"composes_with": {
"type": "array",
"items": { "type": "string", "pattern": "^pattern-[a-z0-9-]+$" },
"description": "Works well together, optional."
},
"alternative_to": {
"type": "array",
"items": { "type": "string", "pattern": "^pattern-[a-z0-9-]+$" },
"description": "Competing approach to the same problem."
},
"see_also": {
"type": "array",
"items": { "type": "string", "pattern": "^pattern-[a-z0-9-]+$" },
"description": "Related for context."
}
},
"additionalProperties": false
},
"open_source_implementations": {
"type": "array",
"description": "Known open-source implementations. Plural, neutral.",
"items": {
"type": "object",
"required": ["url", "description"],
"properties": {
"url": { "type": "string", "format": "uri" },
"description": { "type": "string" },
"language": { "type": "string" }
},
"additionalProperties": false
}
},
"sub_patterns": {
"type": "array",
"description": "Children of a meta-pattern. Required when type: meta.",
"items": {
"type": "object",
"required": ["name", "pattern", "crops_summary"],
"properties": {
"name": { "type": "string" },
"pattern": {
"type": "string",
"pattern": "^pattern-[a-z0-9-]+$",
"description": "Slug resolved to patterns/pattern-<slug>.md"
},
"crops_summary": {
"type": "string",
"description": "One-line CROPS trade-off summary for this child"
}
},
"additionalProperties": false
}
},
"context": {
"type": "string",
"enum": ["i2i", "i2u", "both"],
"description": "Applicable relationship type"
},
"context_differentiation": {
"type": "object",
"description": "How the pattern applies differently in I2I vs I2U. Required when context: both (enforced by validator).",
"properties": {
"i2i": {
"type": "string",
"minLength": 1,
"description": "How this plays out between institutions"
},
"i2u": {
"type": "string",
"minLength": 1,
"description": "How this plays out for user-facing deployments; what extra protections are needed"
}
},
"additionalProperties": false
},
"crops_profile": {
"description": "CROPS dimension assessment. Use the string 'n/a' for meta/evaluation patterns that do not implement privacy directly.",
"oneOf": [
{
"type": "string",
"enum": ["n/a"]
},
{
"type": "object",
"required": ["cr", "o", "p", "s"],
"properties": {
"cr": {
"type": "string",
"enum": ["high", "medium", "low", "none"],
"description": "Censorship resistance"
},
"o": {
"type": "string",
"enum": ["yes", "partial", "no"],
"description": "Openness: source availability, open standards, exit paths, forkability. The 'O' in CROPS — broader than just open source."
},
"p": {
"type": "string",
"enum": ["full", "partial", "none"],
"description": "Privacy: full (private from everyone), partial (selective disclosure required), none (public or institution sees all)"
},
"s": {
"type": "string",
"enum": ["high", "medium", "low"],
"description": "Security: strength of guarantees (cryptographic assumptions, decentralization, trust model)"
}
},
"additionalProperties": false
}
]
},
"crops_context": {
"type": "object",
"description": "Narrative context for each CROPS dimension. Explains where the badges drift up or down in practice.",
"properties": {
"cr": { "type": "string" },
"o": { "type": "string" },
"p": { "type": "string" },
"s": { "type": "string" }
},
"additionalProperties": false
},
"visibility": {
"type": "object",
"description": "Optional four-slot visibility matrix for transaction-level patterns: who sees what.",
"properties": {
"counterparty": { "type": "array", "items": { "type": "string" } },
"chain": { "type": "array", "items": { "type": "string" } },
"regulator": { "type": "array", "items": { "type": "string" } },
"public": { "type": "array", "items": { "type": "string" } }
},
"additionalProperties": false
},
"post_quantum": {
"type": "object",
"description": "Post-quantum exposure summary.",
"properties": {
"risk": {
"type": "string",
"enum": ["high", "medium", "low"]
},
"vector": { "type": "string" },
"mitigation": { "type": "string" }
},
"additionalProperties": false
}
},
"additionalProperties": false
}