atdd 0.1.0__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.
Files changed (183) hide show
  1. atdd/__init__.py +0 -0
  2. atdd/cli.py +404 -0
  3. atdd/coach/__init__.py +0 -0
  4. atdd/coach/commands/__init__.py +0 -0
  5. atdd/coach/commands/add_persistence_metadata.py +215 -0
  6. atdd/coach/commands/analyze_migrations.py +188 -0
  7. atdd/coach/commands/consumers.py +720 -0
  8. atdd/coach/commands/infer_governance_status.py +149 -0
  9. atdd/coach/commands/initializer.py +177 -0
  10. atdd/coach/commands/interface.py +1078 -0
  11. atdd/coach/commands/inventory.py +565 -0
  12. atdd/coach/commands/migration.py +240 -0
  13. atdd/coach/commands/registry.py +1560 -0
  14. atdd/coach/commands/session.py +430 -0
  15. atdd/coach/commands/sync.py +405 -0
  16. atdd/coach/commands/test_interface.py +399 -0
  17. atdd/coach/commands/test_runner.py +141 -0
  18. atdd/coach/commands/tests/__init__.py +1 -0
  19. atdd/coach/commands/tests/test_telemetry_array_validation.py +235 -0
  20. atdd/coach/commands/traceability.py +4264 -0
  21. atdd/coach/conventions/session.convention.yaml +754 -0
  22. atdd/coach/overlays/__init__.py +2 -0
  23. atdd/coach/overlays/claude.md +2 -0
  24. atdd/coach/schemas/config.schema.json +34 -0
  25. atdd/coach/schemas/manifest.schema.json +101 -0
  26. atdd/coach/templates/ATDD.md +282 -0
  27. atdd/coach/templates/SESSION-TEMPLATE.md +327 -0
  28. atdd/coach/utils/__init__.py +0 -0
  29. atdd/coach/utils/graph/__init__.py +0 -0
  30. atdd/coach/utils/graph/urn.py +875 -0
  31. atdd/coach/validators/__init__.py +0 -0
  32. atdd/coach/validators/shared_fixtures.py +365 -0
  33. atdd/coach/validators/test_enrich_wagon_registry.py +167 -0
  34. atdd/coach/validators/test_registry.py +575 -0
  35. atdd/coach/validators/test_session_validation.py +1183 -0
  36. atdd/coach/validators/test_traceability.py +448 -0
  37. atdd/coach/validators/test_update_feature_paths.py +108 -0
  38. atdd/coach/validators/test_validate_contract_consumers.py +297 -0
  39. atdd/coder/__init__.py +1 -0
  40. atdd/coder/conventions/adapter.recipe.yaml +88 -0
  41. atdd/coder/conventions/backend.convention.yaml +460 -0
  42. atdd/coder/conventions/boundaries.convention.yaml +666 -0
  43. atdd/coder/conventions/commons.convention.yaml +460 -0
  44. atdd/coder/conventions/complexity.recipe.yaml +109 -0
  45. atdd/coder/conventions/component-naming.convention.yaml +178 -0
  46. atdd/coder/conventions/design.convention.yaml +327 -0
  47. atdd/coder/conventions/design.recipe.yaml +273 -0
  48. atdd/coder/conventions/dto.convention.yaml +660 -0
  49. atdd/coder/conventions/frontend.convention.yaml +542 -0
  50. atdd/coder/conventions/green.convention.yaml +1012 -0
  51. atdd/coder/conventions/presentation.convention.yaml +587 -0
  52. atdd/coder/conventions/refactor.convention.yaml +535 -0
  53. atdd/coder/conventions/technology.convention.yaml +206 -0
  54. atdd/coder/conventions/tests/__init__.py +0 -0
  55. atdd/coder/conventions/tests/test_adapter_recipe.py +302 -0
  56. atdd/coder/conventions/tests/test_complexity_recipe.py +289 -0
  57. atdd/coder/conventions/tests/test_component_taxonomy.py +278 -0
  58. atdd/coder/conventions/tests/test_component_urn_naming.py +165 -0
  59. atdd/coder/conventions/tests/test_thinness_recipe.py +286 -0
  60. atdd/coder/conventions/thinness.recipe.yaml +82 -0
  61. atdd/coder/conventions/train.convention.yaml +325 -0
  62. atdd/coder/conventions/verification.protocol.yaml +53 -0
  63. atdd/coder/schemas/design_system.schema.json +361 -0
  64. atdd/coder/validators/__init__.py +0 -0
  65. atdd/coder/validators/test_commons_structure.py +485 -0
  66. atdd/coder/validators/test_complexity.py +416 -0
  67. atdd/coder/validators/test_cross_language_consistency.py +431 -0
  68. atdd/coder/validators/test_design_system_compliance.py +413 -0
  69. atdd/coder/validators/test_dto_testing_patterns.py +268 -0
  70. atdd/coder/validators/test_green_cross_stack_layers.py +168 -0
  71. atdd/coder/validators/test_green_layer_dependencies.py +148 -0
  72. atdd/coder/validators/test_green_python_layer_structure.py +103 -0
  73. atdd/coder/validators/test_green_supabase_layer_structure.py +103 -0
  74. atdd/coder/validators/test_import_boundaries.py +396 -0
  75. atdd/coder/validators/test_init_file_urns.py +593 -0
  76. atdd/coder/validators/test_preact_layer_boundaries.py +221 -0
  77. atdd/coder/validators/test_presentation_convention.py +260 -0
  78. atdd/coder/validators/test_python_architecture.py +674 -0
  79. atdd/coder/validators/test_quality_metrics.py +420 -0
  80. atdd/coder/validators/test_station_master_pattern.py +244 -0
  81. atdd/coder/validators/test_train_infrastructure.py +454 -0
  82. atdd/coder/validators/test_train_urns.py +293 -0
  83. atdd/coder/validators/test_typescript_architecture.py +616 -0
  84. atdd/coder/validators/test_usecase_structure.py +421 -0
  85. atdd/coder/validators/test_wagon_boundaries.py +586 -0
  86. atdd/conftest.py +126 -0
  87. atdd/planner/__init__.py +1 -0
  88. atdd/planner/conventions/acceptance.convention.yaml +538 -0
  89. atdd/planner/conventions/appendix.convention.yaml +187 -0
  90. atdd/planner/conventions/artifact-naming.convention.yaml +852 -0
  91. atdd/planner/conventions/component.convention.yaml +670 -0
  92. atdd/planner/conventions/criteria.convention.yaml +141 -0
  93. atdd/planner/conventions/feature.convention.yaml +371 -0
  94. atdd/planner/conventions/interface.convention.yaml +382 -0
  95. atdd/planner/conventions/steps.convention.yaml +141 -0
  96. atdd/planner/conventions/train.convention.yaml +552 -0
  97. atdd/planner/conventions/wagon.convention.yaml +275 -0
  98. atdd/planner/conventions/wmbt.convention.yaml +258 -0
  99. atdd/planner/schemas/acceptance.schema.json +336 -0
  100. atdd/planner/schemas/appendix.schema.json +78 -0
  101. atdd/planner/schemas/component.schema.json +114 -0
  102. atdd/planner/schemas/feature.schema.json +197 -0
  103. atdd/planner/schemas/train.schema.json +192 -0
  104. atdd/planner/schemas/wagon.schema.json +281 -0
  105. atdd/planner/schemas/wmbt.schema.json +59 -0
  106. atdd/planner/validators/__init__.py +0 -0
  107. atdd/planner/validators/conftest.py +5 -0
  108. atdd/planner/validators/test_draft_wagon_registry.py +374 -0
  109. atdd/planner/validators/test_plan_cross_refs.py +240 -0
  110. atdd/planner/validators/test_plan_uniqueness.py +224 -0
  111. atdd/planner/validators/test_plan_urn_resolution.py +268 -0
  112. atdd/planner/validators/test_plan_wagons.py +174 -0
  113. atdd/planner/validators/test_train_validation.py +514 -0
  114. atdd/planner/validators/test_wagon_urn_chain.py +648 -0
  115. atdd/planner/validators/test_wmbt_consistency.py +327 -0
  116. atdd/planner/validators/test_wmbt_vocabulary.py +632 -0
  117. atdd/tester/__init__.py +1 -0
  118. atdd/tester/conventions/artifact.convention.yaml +257 -0
  119. atdd/tester/conventions/contract.convention.yaml +1009 -0
  120. atdd/tester/conventions/filename.convention.yaml +555 -0
  121. atdd/tester/conventions/migration.convention.yaml +509 -0
  122. atdd/tester/conventions/red.convention.yaml +797 -0
  123. atdd/tester/conventions/routing.convention.yaml +51 -0
  124. atdd/tester/conventions/telemetry.convention.yaml +458 -0
  125. atdd/tester/schemas/a11y.tmpl.json +17 -0
  126. atdd/tester/schemas/artifact.schema.json +189 -0
  127. atdd/tester/schemas/contract.schema.json +591 -0
  128. atdd/tester/schemas/contract.tmpl.json +95 -0
  129. atdd/tester/schemas/db.tmpl.json +20 -0
  130. atdd/tester/schemas/e2e.tmpl.json +17 -0
  131. atdd/tester/schemas/edge_function.tmpl.json +17 -0
  132. atdd/tester/schemas/event.tmpl.json +17 -0
  133. atdd/tester/schemas/http.tmpl.json +19 -0
  134. atdd/tester/schemas/job.tmpl.json +18 -0
  135. atdd/tester/schemas/load.tmpl.json +21 -0
  136. atdd/tester/schemas/metric.tmpl.json +19 -0
  137. atdd/tester/schemas/pack.schema.json +139 -0
  138. atdd/tester/schemas/realtime.tmpl.json +20 -0
  139. atdd/tester/schemas/rls.tmpl.json +18 -0
  140. atdd/tester/schemas/script.tmpl.json +16 -0
  141. atdd/tester/schemas/sec.tmpl.json +18 -0
  142. atdd/tester/schemas/storage.tmpl.json +18 -0
  143. atdd/tester/schemas/telemetry.schema.json +128 -0
  144. atdd/tester/schemas/telemetry_tracking_manifest.schema.json +143 -0
  145. atdd/tester/schemas/test_filename.schema.json +194 -0
  146. atdd/tester/schemas/test_intent.schema.json +179 -0
  147. atdd/tester/schemas/unit.tmpl.json +18 -0
  148. atdd/tester/schemas/visual.tmpl.json +18 -0
  149. atdd/tester/schemas/ws.tmpl.json +17 -0
  150. atdd/tester/utils/__init__.py +0 -0
  151. atdd/tester/utils/filename.py +300 -0
  152. atdd/tester/validators/__init__.py +0 -0
  153. atdd/tester/validators/cleanup_duplicate_headers.py +116 -0
  154. atdd/tester/validators/cleanup_duplicate_headers_v2.py +135 -0
  155. atdd/tester/validators/conftest.py +5 -0
  156. atdd/tester/validators/coverage_gap_report.py +321 -0
  157. atdd/tester/validators/fix_dual_ac_references.py +179 -0
  158. atdd/tester/validators/remove_duplicate_lines.py +93 -0
  159. atdd/tester/validators/test_acceptance_urn_filename_mapping.py +359 -0
  160. atdd/tester/validators/test_acceptance_urn_separator.py +166 -0
  161. atdd/tester/validators/test_artifact_naming_category.py +307 -0
  162. atdd/tester/validators/test_contract_schema_compliance.py +706 -0
  163. atdd/tester/validators/test_contracts_structure.py +200 -0
  164. atdd/tester/validators/test_coverage_adequacy.py +797 -0
  165. atdd/tester/validators/test_dual_ac_reference.py +225 -0
  166. atdd/tester/validators/test_fixture_validity.py +372 -0
  167. atdd/tester/validators/test_isolation.py +487 -0
  168. atdd/tester/validators/test_migration_coverage.py +204 -0
  169. atdd/tester/validators/test_migration_criteria.py +276 -0
  170. atdd/tester/validators/test_migration_generation.py +116 -0
  171. atdd/tester/validators/test_python_test_naming.py +410 -0
  172. atdd/tester/validators/test_red_layer_validation.py +95 -0
  173. atdd/tester/validators/test_red_python_layer_structure.py +87 -0
  174. atdd/tester/validators/test_red_supabase_layer_structure.py +90 -0
  175. atdd/tester/validators/test_telemetry_structure.py +634 -0
  176. atdd/tester/validators/test_typescript_test_naming.py +301 -0
  177. atdd/tester/validators/test_typescript_test_structure.py +84 -0
  178. atdd-0.1.0.dist-info/METADATA +191 -0
  179. atdd-0.1.0.dist-info/RECORD +183 -0
  180. atdd-0.1.0.dist-info/WHEEL +5 -0
  181. atdd-0.1.0.dist-info/entry_points.txt +2 -0
  182. atdd-0.1.0.dist-info/licenses/LICENSE +674 -0
  183. atdd-0.1.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,336 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "Acceptance Schema (V2)",
4
+ "description": "Validates acceptance criteria in WMBT files. Used by both planner (generates) and tester (consumes).",
5
+ "type": "object",
6
+ "required": ["identity", "harness", "given", "when", "then", "signal", "metadata"],
7
+ "additionalProperties": false,
8
+ "properties": {
9
+ "identity": {
10
+ "type": "object",
11
+ "required": ["urn", "id", "purpose", "phase"],
12
+ "additionalProperties": false,
13
+ "properties": {
14
+ "urn": {
15
+ "type": "string",
16
+ "pattern": "^acc:[a-z][a-z0-9-]*:[DLPCEMYRK][0-9]{3}-(UNIT|HTTP|EVENT|WS|E2E|A11Y|VIS|METRIC|JOB|DB|SEC|LOAD|SCRIPT|WIDGET|GOLDEN|BLOC|INTEGRATION|RLS|EDGE|REALTIME|STORAGE)-[0-9]{3}(?:-[a-z0-9-]+)?$",
17
+ "description": "Acceptance URN format: acc:{wagon}:{wmbt_id}-{harness}-{NNN}[-{slug}]"
18
+ },
19
+ "id": {
20
+ "type": "string",
21
+ "pattern": "^AC-(HTTP|UNIT|EVENT|WS|E2E|A11Y|VISUAL|METRIC|JOB|DB|SEC|LOAD|SCRIPT|WIDGET|GOLDEN|BLOC|INTEGRATION|RLS|EDGE_FUNCTION|REALTIME|STORAGE)-[0-9]{3}$"
22
+ },
23
+ "purpose": {
24
+ "type": "string",
25
+ "minLength": 3
26
+ },
27
+ "phase": {
28
+ "type": "string",
29
+ "enum": ["RED", "GREEN", "REFACTOR"]
30
+ }
31
+ }
32
+ },
33
+
34
+ "harness": {
35
+ "type": "object",
36
+ "required": ["type", "category"],
37
+ "additionalProperties": false,
38
+ "properties": {
39
+ "type": {
40
+ "type": "string",
41
+ "enum": ["unit", "http", "event", "ws", "e2e", "a11y", "visual", "metric", "job", "db", "sec", "load", "script", "widget", "golden", "bloc", "integration", "rls", "edge_function", "realtime", "storage"]
42
+ },
43
+ "category": {
44
+ "type": "string",
45
+ "enum": ["frontend", "backend", "integration"]
46
+ },
47
+ "language_hint": {
48
+ "type": "string",
49
+ "enum": ["dart", "typescript", "python", "go", "auto"]
50
+ }
51
+ }
52
+ },
53
+
54
+ "given": {
55
+ "type": "object",
56
+ "required": ["abstract"],
57
+ "additionalProperties": false,
58
+ "properties": {
59
+ "abstract": {
60
+ "type": "array",
61
+ "minItems": 1,
62
+ "items": {
63
+ "type": "string"
64
+ },
65
+ "description": "Human-readable Gherkin Given statements for stakeholder readability"
66
+ },
67
+ "auth": {
68
+ "type": "object",
69
+ "properties": {
70
+ "required": {"type": "boolean"},
71
+ "type": {"type": "string"},
72
+ "scopes": {"type": "array", "items": {"type": "string"}}
73
+ }
74
+ },
75
+ "data": {
76
+ "type": "array",
77
+ "items": {"type": "object"}
78
+ },
79
+ "environment": {
80
+ "type": "object"
81
+ },
82
+ "stubs": {
83
+ "type": "object"
84
+ },
85
+ "custom": {
86
+ "type": "object"
87
+ }
88
+ }
89
+ },
90
+
91
+ "when": {
92
+ "type": "object",
93
+ "required": ["abstract", "action"],
94
+ "additionalProperties": false,
95
+ "properties": {
96
+ "abstract": {
97
+ "type": "string",
98
+ "minLength": 5,
99
+ "description": "Human-readable Gherkin When statement for stakeholder readability"
100
+ },
101
+ "action": {
102
+ "type": "string",
103
+ "enum": ["request", "invoke", "emit", "connect", "navigate", "query", "measure", "render", "mutate"]
104
+ },
105
+ "target": {
106
+ "type": "string"
107
+ },
108
+ "parameters": {
109
+ "type": "object"
110
+ }
111
+ }
112
+ },
113
+
114
+ "then": {
115
+ "type": "object",
116
+ "required": ["abstract", "assertions"],
117
+ "additionalProperties": false,
118
+ "properties": {
119
+ "abstract": {
120
+ "type": "array",
121
+ "minItems": 1,
122
+ "items": {
123
+ "type": "string"
124
+ },
125
+ "description": "Human-readable Gherkin Then statements for stakeholder readability"
126
+ },
127
+ "assertions": {
128
+ "type": "array",
129
+ "minItems": 1,
130
+ "items": {
131
+ "type": "object",
132
+ "required": ["type"],
133
+ "properties": {
134
+ "type": {
135
+ "type": "string",
136
+ "enum": ["equals", "contains", "matches", "exists", "count", "performance"]
137
+ },
138
+ "target": {"type": "string"},
139
+ "value": {},
140
+ "tolerance": {"type": "object"}
141
+ }
142
+ }
143
+ },
144
+ "count": {
145
+ "type": "integer",
146
+ "minimum": 1
147
+ },
148
+ "red_strategy": {
149
+ "type": "string",
150
+ "enum": ["not_implemented", "expect_false", "throw_error", "timeout"]
151
+ }
152
+ }
153
+ },
154
+
155
+ "signal": {
156
+ "type": "object",
157
+ "description": "Telemetry signals following OpenTelemetry (metrics, traces, logs) + analytics events",
158
+ "additionalProperties": false,
159
+ "properties": {
160
+ "metrics": {
161
+ "type": "array",
162
+ "description": "OpenTelemetry metrics for observability",
163
+ "items": {
164
+ "type": "object",
165
+ "required": ["name", "type", "threshold"],
166
+ "additionalProperties": false,
167
+ "properties": {
168
+ "name": {
169
+ "type": "string",
170
+ "pattern": "^telemetry:metric:(ui|ux|be|nw|db|st|tm|sc|au|fn|if):[a-z][a-z0-9-]*:[a-z][a-z0-9-]*(?:-[a-z][a-z0-9-]*)?:(latency|duration|throughput|error_rate|success_rate|count|size|age|staleness|freshness)$",
171
+ "description": "Metric URN: telemetry:metric:{plane}:{domain}:{resource}:{measure}. Artifact (domain:resource) must exist in contracts/_artifacts.yaml. No operation/wagon names in URN."
172
+ },
173
+ "type": {
174
+ "type": "string",
175
+ "enum": ["counter", "gauge", "histogram", "summary"],
176
+ "description": "OpenTelemetry metric instrument type"
177
+ },
178
+ "unit": {
179
+ "type": "string",
180
+ "description": "Unit (ms, s, bytes, percent, count) per OpenTelemetry semantic conventions"
181
+ },
182
+ "description": {
183
+ "type": "string",
184
+ "description": "Human-readable metric description"
185
+ },
186
+ "aggregation": {
187
+ "type": "string",
188
+ "enum": ["p50", "p95", "p99", "mean", "sum", "count", "rate", "max", "min"],
189
+ "description": "Aggregation method for metric (query-time, not OTel core but practical)"
190
+ },
191
+ "threshold": {
192
+ "oneOf": [
193
+ {"type": "number"},
194
+ {"type": "string", "pattern": "^[0-9]+(ms|s|%|MB|GB|bytes)$"}
195
+ ],
196
+ "description": "Expected threshold from acceptance (for alerting/testing)"
197
+ },
198
+ "attributes": {
199
+ "type": "array",
200
+ "items": {"type": "string"},
201
+ "description": "Metric attributes/dimensions (OTel terminology)"
202
+ }
203
+ }
204
+ }
205
+ },
206
+ "traces": {
207
+ "type": "array",
208
+ "description": "OpenTelemetry trace spans expected during execution",
209
+ "items": {
210
+ "type": "object",
211
+ "required": ["name"],
212
+ "additionalProperties": false,
213
+ "properties": {
214
+ "name": {
215
+ "type": "string",
216
+ "pattern": "^telemetry:trace:(ui|ux|be|nw|db|st|tm|sc|au|fn|if):[a-z][a-z0-9-]*:[a-z][a-z0-9-]*(?:-[a-z][a-z0-9-]*)?$",
217
+ "description": "Trace URN: telemetry:trace:{plane}:{domain}:{resource}. Artifact must exist in contracts/_artifacts.yaml. No measure segment for traces."
218
+ },
219
+ "kind": {
220
+ "type": "string",
221
+ "enum": ["server", "client", "producer", "consumer", "internal"],
222
+ "description": "Span kind per OpenTelemetry spec"
223
+ },
224
+ "attributes": {
225
+ "type": "array",
226
+ "items": {"type": "string"},
227
+ "description": "Required span attributes"
228
+ },
229
+ "parent": {
230
+ "type": "string",
231
+ "description": "Parent span name (for nested spans)"
232
+ }
233
+ }
234
+ }
235
+ },
236
+ "logs": {
237
+ "type": "array",
238
+ "description": "OpenTelemetry log records expected during execution",
239
+ "items": {
240
+ "type": "object",
241
+ "required": ["body"],
242
+ "additionalProperties": false,
243
+ "properties": {
244
+ "body": {
245
+ "type": "string",
246
+ "description": "Log message body (can include {placeholders})"
247
+ },
248
+ "severity": {
249
+ "type": "string",
250
+ "enum": ["trace", "debug", "info", "warn", "error", "fatal"],
251
+ "description": "Log severity per OpenTelemetry spec"
252
+ },
253
+ "attributes": {
254
+ "type": "object",
255
+ "description": "Structured log attributes"
256
+ },
257
+ "name": {
258
+ "type": "string",
259
+ "pattern": "^telemetry:log:(ui|ux|be|nw|db|st|tm|sc|au|fn|if):[a-z][a-z0-9-]*:[a-z][a-z0-9-]*(?:-[a-z][a-z0-9-]*)?$",
260
+ "description": "Log URN (optional): telemetry:log:{plane}:{domain}:{resource}. Artifact must exist in contracts/_artifacts.yaml."
261
+ }
262
+ }
263
+ }
264
+ },
265
+ "events": {
266
+ "type": "array",
267
+ "description": "Analytics events (product tracking via Segment/Mixpanel/Amplitude)",
268
+ "items": {
269
+ "type": "object",
270
+ "required": ["name"],
271
+ "additionalProperties": false,
272
+ "properties": {
273
+ "name": {
274
+ "oneOf": [
275
+ {
276
+ "type": "string",
277
+ "pattern": "^telemetry:event:(ui|ux|be|nw|db|st|tm|sc|au|fn|if):[a-z][a-z0-9-]*:[a-z][a-z0-9-]*(?:-[a-z][a-z0-9-]*)?$",
278
+ "description": "Event URN: telemetry:event:{plane}:{domain}:{resource}. Resource must be past-tense verb from lexicon."
279
+ },
280
+ {
281
+ "type": "string",
282
+ "pattern": "^[A-Z][a-zA-Z0-9 ]*$",
283
+ "description": "Analytics event name (e.g., 'Order Created')"
284
+ }
285
+ ],
286
+ "description": "Event name: telemetry URN for OTel events, or analytics convention for product events"
287
+ },
288
+ "properties": {
289
+ "type": "array",
290
+ "items": {"type": "string"},
291
+ "description": "Event properties to track"
292
+ },
293
+ "category": {
294
+ "type": "string",
295
+ "description": "Event category (conversion, engagement, etc.)"
296
+ },
297
+ "tracking_plan_ref": {
298
+ "type": "string",
299
+ "description": "Reference to analytics tracking plan"
300
+ }
301
+ }
302
+ }
303
+ }
304
+ }
305
+ },
306
+
307
+ "metadata": {
308
+ "type": "object",
309
+ "required": ["wagon"],
310
+ "additionalProperties": false,
311
+ "properties": {
312
+ "wagon": {"type": "string"},
313
+ "feature": {"type": "string"},
314
+ "route": {
315
+ "type": "object",
316
+ "properties": {
317
+ "layers": {"type": "array", "items": {"type": "string"}},
318
+ "sequence": {"type": "array", "items": {"type": "string"}}
319
+ }
320
+ },
321
+ "tags": {
322
+ "type": "array",
323
+ "items": {"type": "string"}
324
+ }
325
+ }
326
+ },
327
+
328
+ "appendices": {
329
+ "type": "array",
330
+ "description": "Supplementary files for this acceptance criterion",
331
+ "items": {
332
+ "$ref": "appendix.schema.json#/definitions/appendix_reference"
333
+ }
334
+ }
335
+ }
336
+ }
@@ -0,0 +1,78 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://wagons.dev/schemas/planner/appendix.schema.json",
4
+ "title": "Appendix Schema",
5
+ "description": "Schema for appendix references - supplementary multimodal content attached to planner outputs",
6
+ "definitions": {
7
+ "appendix_reference": {
8
+ "type": "object",
9
+ "description": "Reference to a supplementary file (mockup, diagram, document, etc.) that provides additional context",
10
+ "required": ["path", "type", "purpose", "title"],
11
+ "properties": {
12
+ "path": {
13
+ "type": "string",
14
+ "description": "Relative path to appendix file within artifact's appendices/ subdirectory",
15
+ "pattern": "^[a-zA-Z0-9_-]+_(mockup|spreadsheet|document|diagram|audio|video)_[a-zA-Z0-9_.-]+$",
16
+ "examples": [
17
+ "checkout-flow_mockup_payment-screen.png",
18
+ "E023_diagram_sequence.svg",
19
+ "payment-processing_spreadsheet_tax-rules.xlsx"
20
+ ]
21
+ },
22
+ "type": {
23
+ "type": "string",
24
+ "description": "Type of appendix content",
25
+ "enum": ["mockup", "spreadsheet", "document", "diagram", "audio", "video"]
26
+ },
27
+ "purpose": {
28
+ "type": "string",
29
+ "description": "Why this appendix is attached - what context does it provide?",
30
+ "minLength": 10,
31
+ "examples": [
32
+ "Visual flow of checkout screens showing payment validation",
33
+ "Complex tax calculation logic for pricing domain model",
34
+ "Entity-relationship diagram for authentication domain"
35
+ ]
36
+ },
37
+ "title": {
38
+ "type": "string",
39
+ "description": "Human-readable title for the appendix",
40
+ "minLength": 5,
41
+ "examples": [
42
+ "Checkout Payment Screen Mockup",
43
+ "Tax Calculation Rules Spreadsheet",
44
+ "Authentication Sequence Diagram"
45
+ ]
46
+ },
47
+ "metadata": {
48
+ "type": "object",
49
+ "description": "Optional metadata about the appendix",
50
+ "properties": {
51
+ "author": {
52
+ "type": "string",
53
+ "description": "Creator of the appendix"
54
+ },
55
+ "created_at": {
56
+ "type": "string",
57
+ "format": "date-time",
58
+ "description": "When appendix was created (ISO 8601 format)"
59
+ },
60
+ "source": {
61
+ "type": "string",
62
+ "description": "Where appendix originated (Figma, user research session, etc.)"
63
+ },
64
+ "tags": {
65
+ "type": "array",
66
+ "description": "Tags for categorization",
67
+ "items": {
68
+ "type": "string"
69
+ }
70
+ }
71
+ },
72
+ "additionalProperties": false
73
+ }
74
+ },
75
+ "additionalProperties": false
76
+ }
77
+ }
78
+ }
@@ -0,0 +1,114 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "Component Schema",
4
+ "description": "Schema for component YAML files",
5
+ "type": "object",
6
+ "required": ["urn", "parentFeature", "description"],
7
+ "properties": {
8
+ "urn": {
9
+ "type": "string",
10
+ "pattern": "^component:[a-z0-9]+(-[a-z0-9]+)*\\.[a-z0-9]+(-[a-z0-9]+)*\\.[a-zA-Z0-9]+\\.(frontend|backend)\\.(presentation|application|domain|integration)$",
11
+ "description": "Component URN: component:{wagon}.{feature}.{objectCamelCase}.{layer}"
12
+ },
13
+ "parentFeature": {
14
+ "type": "string",
15
+ "pattern": "^feature:[a-z0-9]+(-[a-z0-9]+)*\\.[a-z0-9]+(-[a-z0-9]+)*$",
16
+ "description": "Parent feature URN"
17
+ },
18
+ "description": {
19
+ "type": "string",
20
+ "minLength": 10,
21
+ "maxLength": 200,
22
+ "description": "Purpose of the component"
23
+ },
24
+ "inputs": {
25
+ "type": "array",
26
+ "description": "Component inputs with references to feature ioSeeds",
27
+ "items": {
28
+ "type": "object",
29
+ "required": ["name", "urn"],
30
+ "additionalProperties": false,
31
+ "properties": {
32
+ "name": {
33
+ "type": "string",
34
+ "pattern": "^[a-z]+:[a-z][a-z0-9-]*$",
35
+ "description": "Input name in typed format"
36
+ },
37
+ "urn": {
38
+ "type": "string",
39
+ "pattern": "^feature:[a-z0-9-]+\\.[a-z0-9-]+#[a-z]+:[a-z][a-z0-9-]*$",
40
+ "description": "Reference to feature ioSeed URN (feature:wagon.feature#name:item)"
41
+ }
42
+ }
43
+ }
44
+ },
45
+ "outputs": {
46
+ "type": "array",
47
+ "description": "Component outputs with references to feature ioSeeds",
48
+ "items": {"$ref": "#/properties/inputs/items"}
49
+ },
50
+ "dependencies": {
51
+ "type": "array",
52
+ "items": {
53
+ "type": "string",
54
+ "pattern": "^component:[a-z0-9]+(-[a-z0-9]+)*\\.[a-z0-9]+(-[a-z0-9]+)*\\.[a-zA-Z0-9]+\\.(frontend|backend)\\.(presentation|application|domain|integration)$"
55
+ },
56
+ "description": "Component dependencies"
57
+ },
58
+ "events": {
59
+ "type": "object",
60
+ "properties": {
61
+ "consumes": {
62
+ "type": "array",
63
+ "items": {
64
+ "type": "object",
65
+ "required": ["event"],
66
+ "properties": {
67
+ "event": {
68
+ "type": "string",
69
+ "description": "Event name"
70
+ }
71
+ }
72
+ },
73
+ "maxItems": 3,
74
+ "description": "Events this component consumes"
75
+ },
76
+ "produces": {
77
+ "type": "array",
78
+ "items": {
79
+ "type": "object",
80
+ "required": ["event"],
81
+ "properties": {
82
+ "event": {
83
+ "type": "string",
84
+ "description": "Event name"
85
+ }
86
+ }
87
+ },
88
+ "maxItems": 3,
89
+ "description": "Events this component produces"
90
+ }
91
+ }
92
+ },
93
+
94
+ "componentType": {
95
+ "type": "string",
96
+ "description": "Component type from coder conventions catalog",
97
+ "enum": [
98
+ "controllers", "routes", "serializers", "validators", "middleware", "guards", "views",
99
+ "use_cases", "handlers", "ports", "dtos", "policies", "workflows",
100
+ "entities", "value_objects", "aggregates", "services", "specifications", "events", "exceptions",
101
+ "repositories", "clients", "caches", "engines", "formatters", "notifiers", "queues", "stores", "mappers", "schedulers", "monitors",
102
+ "components", "containers", "layouts", "styles", "animations", "forms", "hooks", "directives", "filters",
103
+ "interceptors", "synchronizers", "validators", "workers", "connectors"
104
+ ]
105
+ },
106
+ "appendices": {
107
+ "type": "array",
108
+ "description": "Supplementary files for this component",
109
+ "items": {
110
+ "$ref": "appendix.schema.json#/definitions/appendix_reference"
111
+ }
112
+ }
113
+ }
114
+ }