atdd 0.7.2__py3-none-any.whl → 0.7.4__py3-none-any.whl

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.
@@ -1,68 +1,76 @@
1
1
  # Artifact Convention
2
2
  # Defines naming, versioning, organization, and API mapping rules for artifact-centric contracts
3
+ # Aligned with canonical artifact-naming.convention.yaml v2.1
3
4
 
4
- description: "Artifact-centric contract system uses shared schemas organized by domain"
5
+ description: "Artifact-centric contract system using theme-based hierarchical taxonomy with variant facets"
5
6
 
6
7
  naming:
7
- logical_pattern: "{domain}:{resource}[.{category}]"
8
- physical_pattern: "contracts/{domain}/{resource}[/{category}].json"
9
- rationale: "Domain-based organization enables REST API mapping and clear ownership. Colon separator denotes hierarchy (domain:resource), dot separator denotes facet (resource.category). Optional category facet supports nested resources like ux:foundations.colors."
8
+ logical_pattern: "{theme}(:{category})*:{aspect}(.{variant})?"
9
+ physical_pattern: "contracts/{theme}/{segments}/{aspect}[/{variant}].schema.json"
10
+ rationale: "Theme-based organization enables clear architectural boundaries. Colon separator denotes hierarchical descent (unlimited depth), dot separator denotes lateral variant (typically 0-1). Each segment becomes a directory level."
10
11
 
11
12
  examples:
12
- - logical: "ux:foundations"
13
- physical: "contracts/commons/ux/foundations.json"
13
+ - logical: "commons:ux:foundations"
14
+ physical: "contracts/commons/ux/foundations.schema.json"
14
15
 
15
- - logical: "ux:foundations.colors"
16
- physical: "contracts/commons/ux/foundations/colors.json"
16
+ - logical: "commons:ux:foundations:color"
17
+ physical: "contracts/commons/ux/foundations/color.schema.json"
17
18
 
18
19
  - logical: "mechanic:decision.choice"
19
- physical: "contracts/decision/choice.json"
20
+ physical: "contracts/mechanic/decision/choice.schema.json"
20
21
 
21
22
  - logical: "match:result"
22
- physical: "contracts/match/result.json"
23
+ physical: "contracts/match/result.schema.json"
24
+
25
+ - logical: "sensory:gesture.raw"
26
+ physical: "contracts/sensory/gesture/raw.schema.json"
23
27
 
24
28
  versioning:
25
- location: "$id field"
26
- filename_pattern: "{domain}/{resource}[/{category}].json"
27
- id_pattern: "{domain}:{resource}[.{category}]:{version}"
28
- rationale: "Version tracked in $id field, not filename. Supports monolithic deployment with coordinated releases. Breaking changes require coordinated updates across all consumers. Category facet preserved in ID with dot separator."
29
+ location: "Separate version field"
30
+ filename_pattern: "{segments}.schema.json"
31
+ id_pattern: "{artifact_name}"
32
+ version_field: "version"
33
+ rationale: "Version tracked in separate 'version' field, NOT embedded in $id. Allows artifact identity to remain stable across versions. Supports monolithic deployment with coordinated releases."
29
34
 
30
35
  examples:
31
- - artifact: "ux/foundations.json"
32
- id_field: "ux:foundations:v1"
33
- version_field: "1.0.0"
34
-
35
- - artifact: "ux/foundations/colors.json"
36
- id_field: "ux:foundations.colors:v1"
36
+ - artifact: "commons/ux/foundations/color.schema.json"
37
+ id_field: "commons:ux:foundations:color"
37
38
  version_field: "1.0.0"
38
39
 
39
- - artifact: "decision/choice.json"
40
- id_field: "mechanic:decision.choice:v1"
40
+ - artifact: "mechanic/decision/choice.schema.json"
41
+ id_field: "mechanic:decision.choice"
41
42
  version_field: "1.0.0"
42
43
 
43
- - artifact: "match/result.json"
44
- id_field: "match:result:v1"
44
+ - artifact: "match/result.schema.json"
45
+ id_field: "match:result"
45
46
  version_field: "1.2.3"
46
47
 
48
+ - artifact: "sensory/gesture/raw.schema.json"
49
+ id_field: "sensory:gesture.raw"
50
+ version_field: "1.0.0"
51
+
47
52
  organization:
48
- strategy: "by_domain"
49
- directory_structure: "contracts/{domain}/"
50
- rationale: "Domain-based directories enable natural mapping to REST API endpoints. Each domain represents a resource collection with multiple artifact types (new, result, updated, config, etc.). Category facets create nested directories when present."
53
+ strategy: "by_theme"
54
+ directory_structure: "contracts/{theme}/"
55
+ rationale: "Theme-based directories enable clear architectural boundaries. Each theme represents a bounded context. Unlimited hierarchical depth supported via colons."
51
56
 
52
57
  structure:
53
58
  root: "contracts/"
54
- domains:
55
- - "ux/"
56
- - "decision/"
59
+ themes:
60
+ - "commons/"
57
61
  - "match/"
62
+ - "mechanic/"
63
+ - "sensory/"
58
64
  - "player/"
59
- - "session/"
60
- - "dilemma/"
61
- - "pacing/"
65
+ - "scenario/"
66
+ - "partnership/"
67
+ - "league/"
68
+ - "audience/"
69
+ - "monetization/"
62
70
 
63
71
  api_mapping:
64
- description: "Artifact names map to REST API endpoints for external consumption. Category facets add path segments."
65
- pattern: "/{domain}s/{id}/{resource}[/{category}]"
72
+ description: "Artifact names map to REST API endpoints for external consumption. Hierarchy levels add path segments, variants treated as resources."
73
+ pattern: "/{theme}s/{id}/{segments}[/{variant}]"
66
74
 
67
75
  methods:
68
76
  new: POST
@@ -82,12 +90,12 @@ api_mapping:
82
90
  deleted: DELETE
83
91
 
84
92
  examples:
85
- - artifact: "ux:foundations"
86
- endpoint: "GET /uxs/{id}/foundations"
93
+ - artifact: "commons:ux:foundations"
94
+ endpoint: "GET /commons/{id}/ux/foundations"
87
95
  description: "Retrieve UX foundations"
88
96
 
89
- - artifact: "ux:foundations.colors"
90
- endpoint: "GET /uxs/{id}/foundations/colors"
97
+ - artifact: "commons:ux:foundations:color"
98
+ endpoint: "GET /commons/{id}/ux/foundations/color"
91
99
  description: "Retrieve UX color foundations"
92
100
 
93
101
  - artifact: "match:result"
@@ -129,15 +137,16 @@ metadata:
129
137
  description: "Artifact schemas include x-artifact-metadata for tooling and API generation"
130
138
 
131
139
  fields:
132
- domain: "Resource collection (match, player, session)"
133
- resource: "Specific artifact type (result, new, updated)"
140
+ theme: "Architectural theme (commons, match, mechanic, etc.)"
141
+ aspect: "Final leaf resource noun"
142
+ variant: "Optional lateral variation"
134
143
  api:
135
144
  method: "HTTP method (GET, POST, PUT, DELETE)"
136
145
  path: "REST endpoint path"
137
146
 
138
147
  example:
139
- domain: "match"
140
- resource: "result"
148
+ theme: "match"
149
+ aspect: "result"
141
150
  api:
142
151
  method: "GET"
143
152
  path: "/matches/{id}/result"
@@ -145,66 +154,75 @@ metadata:
145
154
  validation:
146
155
  required_fields: ["$schema", "$id", "version", "title", "type", "properties"]
147
156
  schema_compliance: "JSON Schema Draft-07"
148
- id_pattern: "^[a-z]+:[a-z][a-z0-9-]+(?:\\.[a-z0-9-]+)*:v\\d+$"
157
+ id_pattern: "^[a-z]+(?::[a-z][a-z0-9-]*)+(?:\\.[a-z][a-z0-9-]*)?$"
149
158
  version_pattern: "^\\d+\\.\\d+\\.\\d+$"
150
159
 
151
160
  artifact_urns:
152
161
  urn_pattern:
153
- format: "contract:{domain}:{resource}[.{category}]"
154
- conversion_rule: "Keep colon for hierarchy (domain:resource); append category as a dot facet when present (resource.category)."
162
+ format: "contract:{artifact_name}"
163
+ conversion_rule: "URN exactly matches artifact name - preserves colons for hierarchy and dots for variants. Pattern: contract:{theme}(:{category})*:{aspect}(.{variant})?"
155
164
 
156
165
  examples:
157
166
  artifact_to_urn:
158
- - artifact_name: "ux:foundations"
159
- urn: "contract:ux:foundations"
167
+ - artifact_name: "commons:ux:foundations"
168
+ urn: "contract:commons:ux:foundations"
160
169
 
161
- - artifact_name: "ux:foundations.colors"
162
- urn: "contract:ux:foundations.colors"
170
+ - artifact_name: "commons:ux:foundations:color"
171
+ urn: "contract:commons:ux:foundations:color"
163
172
 
164
173
  - artifact_name: "mechanic:decision.choice"
165
174
  urn: "contract:mechanic:decision.choice"
166
175
 
176
+ - artifact_name: "sensory:gesture.raw"
177
+ urn: "contract:sensory:gesture.raw"
178
+
167
179
  bidirectional_linkage:
168
- validation: "URN must resolve to a contract in the registry (including optional .category facet)."
180
+ validation: "URN must resolve to a contract in the registry. All colons and dots preserved."
169
181
 
170
182
  migration_strategy:
171
- refactor_note: "Legacy URNs contract:{domain}.{resource} contract:{domain}:{resource}; category stays as a dot facet: contract:{domain}:{resource}.{category}"
183
+ refactor_note: "Legacy URNs contract:{domain}:{resource}[.{category}] migrate to contract:{theme}(:{category})*:{aspect}(.{variant})?. Version suffix removed from $id."
172
184
 
173
185
  wagon_artifacts:
174
186
  produce_example:
175
187
  wagon: "maintain-ux"
176
188
  produce:
177
- - name: "ux:foundations"
178
- urn: "contract:ux:foundations"
189
+ - name: "commons:ux:foundations"
190
+ urn: "contract:commons:ux:foundations"
179
191
  to: "external"
180
192
 
181
- - name: "ux:foundations.colors"
182
- urn: "contract:ux:foundations.colors"
193
+ - name: "commons:ux:foundations:color"
194
+ urn: "contract:commons:ux:foundations:color"
183
195
  to: "external"
184
196
 
185
197
  consume_example:
186
198
  wagon: "stage-characters"
187
199
  consume:
188
- - name: "ux:foundations"
189
- urn: "contract:ux:foundations"
200
+ - name: "commons:ux:foundations"
201
+ urn: "contract:commons:ux:foundations"
190
202
  from: "wagon:maintain-ux"
191
203
 
192
204
  contract_artifacts:
193
- id_field: "id: {domain}:{resource}[.{category}]:v{version}"
194
- urn_mapping: "URN contract:{domain}:{resource}[.{category}] maps to any version of id {domain}:{resource}[.{category}]:v*"
205
+ id_field: "id: {artifact_name}"
206
+ urn_mapping: "URN contract:{artifact_name} maps directly to $id {artifact_name}"
195
207
 
196
208
  example:
197
- - id: "ux:foundations:v1"
209
+ - id: "commons:ux:foundations"
198
210
  version: "1.0.0"
199
- path: "ux/foundations.json"
211
+ path: "commons/ux/foundations.schema.json"
200
212
  producer: "wagon:maintain-ux"
201
- urn_match: "contract:ux:foundations"
213
+ urn_match: "contract:commons:ux:foundations"
202
214
 
203
- - id: "ux:foundations.colors:v1"
215
+ - id: "commons:ux:foundations:color"
204
216
  version: "1.0.0"
205
- path: "ux/foundations/colors.json"
217
+ path: "commons/ux/foundations/color.schema.json"
206
218
  producer: "wagon:maintain-ux"
207
- urn_match: "contract:ux:foundations.colors"
219
+ urn_match: "contract:commons:ux:foundations:color"
220
+
221
+ - id: "mechanic:decision.choice"
222
+ version: "1.0.0"
223
+ path: "mechanic/decision/choice.schema.json"
224
+ producer: "wagon:resolve-dilemmas"
225
+ urn_match: "contract:mechanic:decision.choice"
208
226
 
209
227
  demo_mode:
210
228
  description: "Artifacts write to demo/contracts/artifacts/ when mode_demo: true"
@@ -217,24 +235,25 @@ examples:
217
235
  produce:
218
236
  - name: mechanic:decision.choice
219
237
  to: external
220
- contract: contracts/artifacts/decision/choice.json
238
+ contract: contracts/mechanic/decision/choice.schema.json
221
239
 
222
240
  - step: "Tester agent classifies artifact ownership"
223
- result: "producer: true, path: decision/choice.json"
241
+ result: "producer: true, path: mechanic/decision/choice.schema.json"
224
242
 
225
243
  - step: "Schema generation creates artifact"
226
- output: "contracts/artifacts/decision/choice.json"
244
+ output: "contracts/mechanic/decision/choice.schema.json"
227
245
  content: |
228
246
  {
229
247
  "$schema": "http://json-schema.org/draft-07/schema#",
230
- "$id": "mechanic:decision.choice:v1",
248
+ "$id": "mechanic:decision.choice",
231
249
  "version": "1.0.0",
232
250
  "title": "Decision Choice",
233
251
  "type": "object",
234
252
  "properties": {...},
235
253
  "x-artifact-metadata": {
236
- "domain": "decision",
237
- "resource": "choice",
254
+ "theme": "mechanic",
255
+ "aspect": "decision",
256
+ "variant": "choice",
238
257
  "api": {
239
258
  "method": "POST",
240
259
  "path": "/decisions"
@@ -247,11 +266,11 @@ examples:
247
266
  consume:
248
267
  - name: mechanic:decision.choice
249
268
  from: wagon:resolve-dilemmas
250
- contract: contracts/artifacts/decision/choice.json
269
+ contract: contracts/mechanic/decision/choice.schema.json
251
270
 
252
271
  - step: "Pack generation references (not embeds) artifact"
253
272
  pack_manifest: |
254
273
  produce:
255
274
  - artifact: mechanic:decision.choice
256
- contract: ../artifacts/decision/choice.json
275
+ contract: ../artifacts/mechanic/decision/choice.schema.json
257
276
  owner: true