atdd 0.2.1__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.
- atdd/__init__.py +6 -0
- atdd/__main__.py +4 -0
- atdd/cli.py +404 -0
- atdd/coach/__init__.py +0 -0
- atdd/coach/commands/__init__.py +0 -0
- atdd/coach/commands/add_persistence_metadata.py +215 -0
- atdd/coach/commands/analyze_migrations.py +188 -0
- atdd/coach/commands/consumers.py +720 -0
- atdd/coach/commands/infer_governance_status.py +149 -0
- atdd/coach/commands/initializer.py +177 -0
- atdd/coach/commands/interface.py +1078 -0
- atdd/coach/commands/inventory.py +565 -0
- atdd/coach/commands/migration.py +240 -0
- atdd/coach/commands/registry.py +1560 -0
- atdd/coach/commands/session.py +430 -0
- atdd/coach/commands/sync.py +405 -0
- atdd/coach/commands/test_interface.py +399 -0
- atdd/coach/commands/test_runner.py +141 -0
- atdd/coach/commands/tests/__init__.py +1 -0
- atdd/coach/commands/tests/test_telemetry_array_validation.py +235 -0
- atdd/coach/commands/traceability.py +4264 -0
- atdd/coach/conventions/session.convention.yaml +754 -0
- atdd/coach/overlays/__init__.py +2 -0
- atdd/coach/overlays/claude.md +2 -0
- atdd/coach/schemas/config.schema.json +34 -0
- atdd/coach/schemas/manifest.schema.json +101 -0
- atdd/coach/templates/ATDD.md +282 -0
- atdd/coach/templates/SESSION-TEMPLATE.md +327 -0
- atdd/coach/utils/__init__.py +0 -0
- atdd/coach/utils/graph/__init__.py +0 -0
- atdd/coach/utils/graph/urn.py +875 -0
- atdd/coach/validators/__init__.py +0 -0
- atdd/coach/validators/shared_fixtures.py +365 -0
- atdd/coach/validators/test_enrich_wagon_registry.py +167 -0
- atdd/coach/validators/test_registry.py +575 -0
- atdd/coach/validators/test_session_validation.py +1183 -0
- atdd/coach/validators/test_traceability.py +448 -0
- atdd/coach/validators/test_update_feature_paths.py +108 -0
- atdd/coach/validators/test_validate_contract_consumers.py +297 -0
- atdd/coder/__init__.py +1 -0
- atdd/coder/conventions/adapter.recipe.yaml +88 -0
- atdd/coder/conventions/backend.convention.yaml +460 -0
- atdd/coder/conventions/boundaries.convention.yaml +666 -0
- atdd/coder/conventions/commons.convention.yaml +460 -0
- atdd/coder/conventions/complexity.recipe.yaml +109 -0
- atdd/coder/conventions/component-naming.convention.yaml +178 -0
- atdd/coder/conventions/design.convention.yaml +327 -0
- atdd/coder/conventions/design.recipe.yaml +273 -0
- atdd/coder/conventions/dto.convention.yaml +660 -0
- atdd/coder/conventions/frontend.convention.yaml +542 -0
- atdd/coder/conventions/green.convention.yaml +1012 -0
- atdd/coder/conventions/presentation.convention.yaml +587 -0
- atdd/coder/conventions/refactor.convention.yaml +535 -0
- atdd/coder/conventions/technology.convention.yaml +206 -0
- atdd/coder/conventions/tests/__init__.py +0 -0
- atdd/coder/conventions/tests/test_adapter_recipe.py +302 -0
- atdd/coder/conventions/tests/test_complexity_recipe.py +289 -0
- atdd/coder/conventions/tests/test_component_taxonomy.py +278 -0
- atdd/coder/conventions/tests/test_component_urn_naming.py +165 -0
- atdd/coder/conventions/tests/test_thinness_recipe.py +286 -0
- atdd/coder/conventions/thinness.recipe.yaml +82 -0
- atdd/coder/conventions/train.convention.yaml +325 -0
- atdd/coder/conventions/verification.protocol.yaml +53 -0
- atdd/coder/schemas/design_system.schema.json +361 -0
- atdd/coder/validators/__init__.py +0 -0
- atdd/coder/validators/test_commons_structure.py +485 -0
- atdd/coder/validators/test_complexity.py +416 -0
- atdd/coder/validators/test_cross_language_consistency.py +431 -0
- atdd/coder/validators/test_design_system_compliance.py +413 -0
- atdd/coder/validators/test_dto_testing_patterns.py +268 -0
- atdd/coder/validators/test_green_cross_stack_layers.py +168 -0
- atdd/coder/validators/test_green_layer_dependencies.py +148 -0
- atdd/coder/validators/test_green_python_layer_structure.py +103 -0
- atdd/coder/validators/test_green_supabase_layer_structure.py +103 -0
- atdd/coder/validators/test_import_boundaries.py +396 -0
- atdd/coder/validators/test_init_file_urns.py +593 -0
- atdd/coder/validators/test_preact_layer_boundaries.py +221 -0
- atdd/coder/validators/test_presentation_convention.py +260 -0
- atdd/coder/validators/test_python_architecture.py +674 -0
- atdd/coder/validators/test_quality_metrics.py +420 -0
- atdd/coder/validators/test_station_master_pattern.py +244 -0
- atdd/coder/validators/test_train_infrastructure.py +454 -0
- atdd/coder/validators/test_train_urns.py +293 -0
- atdd/coder/validators/test_typescript_architecture.py +616 -0
- atdd/coder/validators/test_usecase_structure.py +421 -0
- atdd/coder/validators/test_wagon_boundaries.py +586 -0
- atdd/conftest.py +126 -0
- atdd/planner/__init__.py +1 -0
- atdd/planner/conventions/acceptance.convention.yaml +538 -0
- atdd/planner/conventions/appendix.convention.yaml +187 -0
- atdd/planner/conventions/artifact-naming.convention.yaml +852 -0
- atdd/planner/conventions/component.convention.yaml +670 -0
- atdd/planner/conventions/criteria.convention.yaml +141 -0
- atdd/planner/conventions/feature.convention.yaml +371 -0
- atdd/planner/conventions/interface.convention.yaml +382 -0
- atdd/planner/conventions/steps.convention.yaml +141 -0
- atdd/planner/conventions/train.convention.yaml +552 -0
- atdd/planner/conventions/wagon.convention.yaml +275 -0
- atdd/planner/conventions/wmbt.convention.yaml +258 -0
- atdd/planner/schemas/acceptance.schema.json +336 -0
- atdd/planner/schemas/appendix.schema.json +78 -0
- atdd/planner/schemas/component.schema.json +114 -0
- atdd/planner/schemas/feature.schema.json +197 -0
- atdd/planner/schemas/train.schema.json +192 -0
- atdd/planner/schemas/wagon.schema.json +281 -0
- atdd/planner/schemas/wmbt.schema.json +59 -0
- atdd/planner/validators/__init__.py +0 -0
- atdd/planner/validators/conftest.py +5 -0
- atdd/planner/validators/test_draft_wagon_registry.py +374 -0
- atdd/planner/validators/test_plan_cross_refs.py +240 -0
- atdd/planner/validators/test_plan_uniqueness.py +224 -0
- atdd/planner/validators/test_plan_urn_resolution.py +268 -0
- atdd/planner/validators/test_plan_wagons.py +174 -0
- atdd/planner/validators/test_train_validation.py +514 -0
- atdd/planner/validators/test_wagon_urn_chain.py +648 -0
- atdd/planner/validators/test_wmbt_consistency.py +327 -0
- atdd/planner/validators/test_wmbt_vocabulary.py +632 -0
- atdd/tester/__init__.py +1 -0
- atdd/tester/conventions/artifact.convention.yaml +257 -0
- atdd/tester/conventions/contract.convention.yaml +1009 -0
- atdd/tester/conventions/filename.convention.yaml +555 -0
- atdd/tester/conventions/migration.convention.yaml +509 -0
- atdd/tester/conventions/red.convention.yaml +797 -0
- atdd/tester/conventions/routing.convention.yaml +51 -0
- atdd/tester/conventions/telemetry.convention.yaml +458 -0
- atdd/tester/schemas/a11y.tmpl.json +17 -0
- atdd/tester/schemas/artifact.schema.json +189 -0
- atdd/tester/schemas/contract.schema.json +591 -0
- atdd/tester/schemas/contract.tmpl.json +95 -0
- atdd/tester/schemas/db.tmpl.json +20 -0
- atdd/tester/schemas/e2e.tmpl.json +17 -0
- atdd/tester/schemas/edge_function.tmpl.json +17 -0
- atdd/tester/schemas/event.tmpl.json +17 -0
- atdd/tester/schemas/http.tmpl.json +19 -0
- atdd/tester/schemas/job.tmpl.json +18 -0
- atdd/tester/schemas/load.tmpl.json +21 -0
- atdd/tester/schemas/metric.tmpl.json +19 -0
- atdd/tester/schemas/pack.schema.json +139 -0
- atdd/tester/schemas/realtime.tmpl.json +20 -0
- atdd/tester/schemas/rls.tmpl.json +18 -0
- atdd/tester/schemas/script.tmpl.json +16 -0
- atdd/tester/schemas/sec.tmpl.json +18 -0
- atdd/tester/schemas/storage.tmpl.json +18 -0
- atdd/tester/schemas/telemetry.schema.json +128 -0
- atdd/tester/schemas/telemetry_tracking_manifest.schema.json +143 -0
- atdd/tester/schemas/test_filename.schema.json +194 -0
- atdd/tester/schemas/test_intent.schema.json +179 -0
- atdd/tester/schemas/unit.tmpl.json +18 -0
- atdd/tester/schemas/visual.tmpl.json +18 -0
- atdd/tester/schemas/ws.tmpl.json +17 -0
- atdd/tester/utils/__init__.py +0 -0
- atdd/tester/utils/filename.py +300 -0
- atdd/tester/validators/__init__.py +0 -0
- atdd/tester/validators/cleanup_duplicate_headers.py +116 -0
- atdd/tester/validators/cleanup_duplicate_headers_v2.py +135 -0
- atdd/tester/validators/conftest.py +5 -0
- atdd/tester/validators/coverage_gap_report.py +321 -0
- atdd/tester/validators/fix_dual_ac_references.py +179 -0
- atdd/tester/validators/remove_duplicate_lines.py +93 -0
- atdd/tester/validators/test_acceptance_urn_filename_mapping.py +359 -0
- atdd/tester/validators/test_acceptance_urn_separator.py +166 -0
- atdd/tester/validators/test_artifact_naming_category.py +307 -0
- atdd/tester/validators/test_contract_schema_compliance.py +706 -0
- atdd/tester/validators/test_contracts_structure.py +200 -0
- atdd/tester/validators/test_coverage_adequacy.py +797 -0
- atdd/tester/validators/test_dual_ac_reference.py +225 -0
- atdd/tester/validators/test_fixture_validity.py +372 -0
- atdd/tester/validators/test_isolation.py +487 -0
- atdd/tester/validators/test_migration_coverage.py +204 -0
- atdd/tester/validators/test_migration_criteria.py +276 -0
- atdd/tester/validators/test_migration_generation.py +116 -0
- atdd/tester/validators/test_python_test_naming.py +410 -0
- atdd/tester/validators/test_red_layer_validation.py +95 -0
- atdd/tester/validators/test_red_python_layer_structure.py +87 -0
- atdd/tester/validators/test_red_supabase_layer_structure.py +90 -0
- atdd/tester/validators/test_telemetry_structure.py +634 -0
- atdd/tester/validators/test_typescript_test_naming.py +301 -0
- atdd/tester/validators/test_typescript_test_structure.py +84 -0
- atdd-0.2.1.dist-info/METADATA +221 -0
- atdd-0.2.1.dist-info/RECORD +184 -0
- atdd-0.2.1.dist-info/WHEEL +5 -0
- atdd-0.2.1.dist-info/entry_points.txt +2 -0
- atdd-0.2.1.dist-info/licenses/LICENSE +674 -0
- atdd-0.2.1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,460 @@
|
|
|
1
|
+
version: "1.0"
|
|
2
|
+
name: "Backend Component Convention"
|
|
3
|
+
description: "Layer catalog and component suffixes for backend implementation."
|
|
4
|
+
|
|
5
|
+
backend:
|
|
6
|
+
layers:
|
|
7
|
+
presentation:
|
|
8
|
+
description: "External interface adapters exposed to clients"
|
|
9
|
+
component_types:
|
|
10
|
+
- name: controllers
|
|
11
|
+
description: "Request/response handlers for external interfaces"
|
|
12
|
+
suffix:
|
|
13
|
+
python: "*_controller.py"
|
|
14
|
+
typescript: "*-controller.ts"
|
|
15
|
+
dart: "*_controller.dart"
|
|
16
|
+
examples:
|
|
17
|
+
- "HTTP REST endpoint handlers"
|
|
18
|
+
- "GraphQL resolvers"
|
|
19
|
+
- "gRPC service implementations"
|
|
20
|
+
- "CLI command handlers"
|
|
21
|
+
- "WebSocket message handlers"
|
|
22
|
+
|
|
23
|
+
- name: routes
|
|
24
|
+
description: "Routing configuration and endpoint definitions"
|
|
25
|
+
suffix:
|
|
26
|
+
python: "*_routes.py"
|
|
27
|
+
typescript: "*-routes.ts"
|
|
28
|
+
examples:
|
|
29
|
+
- "URL path definitions"
|
|
30
|
+
- "Route-to-controller bindings"
|
|
31
|
+
- "API versioning routes"
|
|
32
|
+
|
|
33
|
+
- name: serializers
|
|
34
|
+
description: "Input/output data serialization and formatting"
|
|
35
|
+
suffix:
|
|
36
|
+
python: "*_serializer.py"
|
|
37
|
+
typescript: "*-serializer.ts"
|
|
38
|
+
dart: "*_serializer.dart"
|
|
39
|
+
examples:
|
|
40
|
+
- "Request DTOs and deserialization"
|
|
41
|
+
- "Response DTOs and formatting"
|
|
42
|
+
- "JSON/XML/Protobuf serialization"
|
|
43
|
+
- "Content negotiation"
|
|
44
|
+
|
|
45
|
+
- name: validators
|
|
46
|
+
description: "Input validation at the edge"
|
|
47
|
+
suffix:
|
|
48
|
+
python: "*_validator.py"
|
|
49
|
+
typescript: "*-validator.ts"
|
|
50
|
+
examples:
|
|
51
|
+
- "Schema validation (JSON Schema, Pydantic)"
|
|
52
|
+
- "Business rule validation at API boundary"
|
|
53
|
+
- "Security input sanitization"
|
|
54
|
+
|
|
55
|
+
- name: middleware
|
|
56
|
+
description: "Cross-cutting request/response processing"
|
|
57
|
+
suffix:
|
|
58
|
+
python: "*_middleware.py"
|
|
59
|
+
typescript: "*-middleware.ts"
|
|
60
|
+
examples:
|
|
61
|
+
- "Logging and tracing"
|
|
62
|
+
- "Error handling and formatting"
|
|
63
|
+
- "CORS and security headers"
|
|
64
|
+
- "Rate limiting"
|
|
65
|
+
- "Request/response transformation"
|
|
66
|
+
|
|
67
|
+
- name: guards
|
|
68
|
+
description: "Authentication and authorization at transport layer"
|
|
69
|
+
suffix:
|
|
70
|
+
python: "*_guard.py"
|
|
71
|
+
typescript: "*-guard.ts"
|
|
72
|
+
examples:
|
|
73
|
+
- "JWT validation"
|
|
74
|
+
- "API key verification"
|
|
75
|
+
- "Role-based access control"
|
|
76
|
+
- "OAuth2 flow handlers"
|
|
77
|
+
|
|
78
|
+
- name: views
|
|
79
|
+
description: "Server-side rendered templates and UI components"
|
|
80
|
+
suffix:
|
|
81
|
+
python: "*_view.py"
|
|
82
|
+
typescript: "*-view.ts"
|
|
83
|
+
examples:
|
|
84
|
+
- "HTML templates"
|
|
85
|
+
- "SSR components"
|
|
86
|
+
- "Email templates"
|
|
87
|
+
|
|
88
|
+
application:
|
|
89
|
+
description: "Business use cases and orchestration - coordinates domain and ports"
|
|
90
|
+
component_types:
|
|
91
|
+
- name: use_cases
|
|
92
|
+
description: "Application-specific business workflows"
|
|
93
|
+
suffix:
|
|
94
|
+
python: "*_use_case.py"
|
|
95
|
+
typescript: "*-use-case.ts"
|
|
96
|
+
dart: "*_use_case.dart"
|
|
97
|
+
examples:
|
|
98
|
+
- "Create order workflow"
|
|
99
|
+
- "User registration flow"
|
|
100
|
+
- "Score domain based on choice"
|
|
101
|
+
- "Process payment"
|
|
102
|
+
|
|
103
|
+
- name: handlers
|
|
104
|
+
description: "Command, query, and event processing"
|
|
105
|
+
suffix:
|
|
106
|
+
python: "*_handler.py"
|
|
107
|
+
typescript: "*-handler.ts"
|
|
108
|
+
examples:
|
|
109
|
+
- "CQRS command handlers"
|
|
110
|
+
- "CQRS query handlers"
|
|
111
|
+
- "Domain event handlers"
|
|
112
|
+
- "Application event handlers"
|
|
113
|
+
- "Message queue consumers"
|
|
114
|
+
|
|
115
|
+
- name: ports
|
|
116
|
+
description: "Interfaces and protocols for integration layer"
|
|
117
|
+
suffix:
|
|
118
|
+
python: "protocols.py, *_port.py"
|
|
119
|
+
typescript: "*-port.ts, *-interface.ts"
|
|
120
|
+
dart: "*_port.dart"
|
|
121
|
+
examples:
|
|
122
|
+
- "Repository interfaces"
|
|
123
|
+
- "External service interfaces"
|
|
124
|
+
- "Event publisher interfaces"
|
|
125
|
+
- "Cache interfaces"
|
|
126
|
+
|
|
127
|
+
- name: dtos
|
|
128
|
+
description: "Data transfer objects between layers"
|
|
129
|
+
suffix:
|
|
130
|
+
python: "*_dto.py"
|
|
131
|
+
typescript: "*-dto.ts"
|
|
132
|
+
dart: "*_dto.dart"
|
|
133
|
+
examples:
|
|
134
|
+
- "Application-internal payloads"
|
|
135
|
+
- "Cross-layer data structures"
|
|
136
|
+
- "Integration messages"
|
|
137
|
+
note: "Keep separate from domain entities and API serializers"
|
|
138
|
+
|
|
139
|
+
- name: policies
|
|
140
|
+
description: "Application-level business policies and rules"
|
|
141
|
+
suffix:
|
|
142
|
+
python: "*_policy.py"
|
|
143
|
+
typescript: "*-policy.ts"
|
|
144
|
+
examples:
|
|
145
|
+
- "Authorization policies"
|
|
146
|
+
- "Rate limiting policies"
|
|
147
|
+
- "Retry policies"
|
|
148
|
+
- "Idempotency rules"
|
|
149
|
+
|
|
150
|
+
- name: workflows
|
|
151
|
+
description: "Long-running processes and orchestrations"
|
|
152
|
+
suffix:
|
|
153
|
+
python: "*_workflow.py, *_saga.py"
|
|
154
|
+
typescript: "*-workflow.ts, *-saga.ts"
|
|
155
|
+
examples:
|
|
156
|
+
- "Sagas (distributed transactions)"
|
|
157
|
+
- "Process managers"
|
|
158
|
+
- "Compensation logic"
|
|
159
|
+
- "Multi-step orchestrations"
|
|
160
|
+
|
|
161
|
+
domain:
|
|
162
|
+
description: "Pure business logic - framework-agnostic"
|
|
163
|
+
component_types:
|
|
164
|
+
- name: entities
|
|
165
|
+
description: "Core business objects with identity and lifecycle"
|
|
166
|
+
suffix:
|
|
167
|
+
python: "*.py"
|
|
168
|
+
typescript: "*.ts"
|
|
169
|
+
dart: "*.dart"
|
|
170
|
+
examples:
|
|
171
|
+
- "User, Order, Product (e-commerce)"
|
|
172
|
+
- "Dilemma, Statement, Choice (your domain)"
|
|
173
|
+
- "Invoice, Transaction (finance)"
|
|
174
|
+
note: "Use plain filenames (user.py, not user_entity.py) - context is clear from directory"
|
|
175
|
+
|
|
176
|
+
- name: value_objects
|
|
177
|
+
description: "Immutable types with equality-by-value semantics"
|
|
178
|
+
suffix:
|
|
179
|
+
python: "*_vo.py, *.py"
|
|
180
|
+
typescript: "*-vo.ts, *.ts"
|
|
181
|
+
examples:
|
|
182
|
+
- "Money, Email, Phone, Address"
|
|
183
|
+
- "DateRange, Coordinates"
|
|
184
|
+
- "DomainScore, CellID"
|
|
185
|
+
|
|
186
|
+
- name: aggregates
|
|
187
|
+
description: "Transactional consistency boundaries"
|
|
188
|
+
suffix:
|
|
189
|
+
python: "*_aggregate.py, *.py"
|
|
190
|
+
typescript: "*-aggregate.ts"
|
|
191
|
+
examples:
|
|
192
|
+
- "Order aggregate (Order + LineItems)"
|
|
193
|
+
- "Cart aggregate (Cart + CartItems)"
|
|
194
|
+
- "DomainProfile aggregate"
|
|
195
|
+
note: "Often aggregates are just entities with child entity management"
|
|
196
|
+
|
|
197
|
+
- name: services
|
|
198
|
+
description: "Domain services for cross-entity business logic"
|
|
199
|
+
suffix:
|
|
200
|
+
python: "*_service.py"
|
|
201
|
+
typescript: "*-service.ts"
|
|
202
|
+
dart: "*_service.dart"
|
|
203
|
+
examples:
|
|
204
|
+
- "Pricing calculation across products"
|
|
205
|
+
- "Transfer funds between accounts"
|
|
206
|
+
- "Domain scoring logic"
|
|
207
|
+
- "Conflict resolution"
|
|
208
|
+
|
|
209
|
+
- name: specifications
|
|
210
|
+
description: "Composable business rules and predicates"
|
|
211
|
+
suffix:
|
|
212
|
+
python: "*_spec.py"
|
|
213
|
+
typescript: "*-spec.ts"
|
|
214
|
+
examples:
|
|
215
|
+
- "IsEligibleForDiscount"
|
|
216
|
+
- "IsValidCellID"
|
|
217
|
+
- "HasSufficientBalance"
|
|
218
|
+
- "Composite specifications (AND, OR, NOT)"
|
|
219
|
+
|
|
220
|
+
- name: events
|
|
221
|
+
description: "Domain events representing facts that happened"
|
|
222
|
+
suffix:
|
|
223
|
+
python: "*_event.py"
|
|
224
|
+
typescript: "*-event.ts"
|
|
225
|
+
examples:
|
|
226
|
+
- "OrderPlaced, PaymentReceived"
|
|
227
|
+
- "UserRegistered, ProfileUpdated"
|
|
228
|
+
- "ChoiceMade, DomainScored"
|
|
229
|
+
|
|
230
|
+
- name: exceptions
|
|
231
|
+
description: "Domain-specific errors and invariant violations"
|
|
232
|
+
suffix:
|
|
233
|
+
python: "*_exception.py, exceptions.py, errors.py"
|
|
234
|
+
typescript: "*-exception.ts, exceptions.ts, errors.ts"
|
|
235
|
+
examples:
|
|
236
|
+
- "InsufficientFundsError"
|
|
237
|
+
- "InvalidDomainError"
|
|
238
|
+
- "BusinessRuleViolation"
|
|
239
|
+
|
|
240
|
+
integration:
|
|
241
|
+
description: "External systems, persistence, and adapters implementing ports"
|
|
242
|
+
component_types:
|
|
243
|
+
- name: repositories
|
|
244
|
+
description: "Data persistence and retrieval adapters"
|
|
245
|
+
suffix:
|
|
246
|
+
python: "*_repository.py"
|
|
247
|
+
typescript: "*-repository.ts"
|
|
248
|
+
dart: "*_repository.dart"
|
|
249
|
+
examples:
|
|
250
|
+
- "SQL database repositories (PostgreSQL, MySQL)"
|
|
251
|
+
- "NoSQL repositories (MongoDB, DynamoDB)"
|
|
252
|
+
- "File-based repositories (JSON, YAML, CSV)"
|
|
253
|
+
- "In-memory repositories (testing)"
|
|
254
|
+
- "Graph database repositories (Neo4j)"
|
|
255
|
+
|
|
256
|
+
- name: clients
|
|
257
|
+
description: "External API and service clients"
|
|
258
|
+
suffix:
|
|
259
|
+
python: "*_client.py"
|
|
260
|
+
typescript: "*-client.ts"
|
|
261
|
+
dart: "*_client.dart"
|
|
262
|
+
examples:
|
|
263
|
+
- "REST API clients (HTTP)"
|
|
264
|
+
- "GraphQL clients"
|
|
265
|
+
- "gRPC clients"
|
|
266
|
+
- "SOAP clients"
|
|
267
|
+
- "Third-party service SDKs (Stripe, Twilio, AWS)"
|
|
268
|
+
|
|
269
|
+
# Station Master Pattern: Direct vs HTTP adapters
|
|
270
|
+
adapter_variants:
|
|
271
|
+
description: |
|
|
272
|
+
Cross-wagon clients have multiple implementations based on deployment:
|
|
273
|
+
- HttpXXXClient: Makes HTTP calls (microservices architecture)
|
|
274
|
+
- DirectXXXClient: Reads from shared memory (monolith architecture)
|
|
275
|
+
- FakeXXXClient: Returns mock data (testing)
|
|
276
|
+
|
|
277
|
+
http_adapter:
|
|
278
|
+
pattern: "http_*_client.py or *_client.py"
|
|
279
|
+
use_when: "Wagon runs as separate service (microservices)"
|
|
280
|
+
example: "HttpCommitStateClient calls GET /api/v1/matches/{id}/state/domains"
|
|
281
|
+
|
|
282
|
+
direct_adapter:
|
|
283
|
+
pattern: "direct_*_client.py"
|
|
284
|
+
use_when: "Wagons run in same process (monolith via game.py)"
|
|
285
|
+
example: "DirectCommitStateClient reads from shared StateRepository"
|
|
286
|
+
benefits:
|
|
287
|
+
- "No network latency"
|
|
288
|
+
- "Works in containers (no localhost issues)"
|
|
289
|
+
- "Shared memory consistency"
|
|
290
|
+
|
|
291
|
+
fake_adapter:
|
|
292
|
+
pattern: "fake_*_client.py"
|
|
293
|
+
use_when: "Unit testing, standalone wagon development"
|
|
294
|
+
example: "FakeCommitStateClient returns mock 25-cell grid"
|
|
295
|
+
|
|
296
|
+
selection_logic: |
|
|
297
|
+
# In composition.py wire_api_dependencies():
|
|
298
|
+
if state_repository is not None:
|
|
299
|
+
client = DirectCommitStateClient(state_repository) # Monolith
|
|
300
|
+
elif os.getenv("CLIENT_MODE") == "http":
|
|
301
|
+
client = HttpCommitStateClient(base_url) # Microservices
|
|
302
|
+
else:
|
|
303
|
+
client = FakeCommitStateClient() # Testing
|
|
304
|
+
|
|
305
|
+
- name: caches
|
|
306
|
+
description: "Caching implementations"
|
|
307
|
+
suffix:
|
|
308
|
+
python: "*_cache.py"
|
|
309
|
+
typescript: "*-cache.ts"
|
|
310
|
+
examples:
|
|
311
|
+
- "Redis cache"
|
|
312
|
+
- "Memcached"
|
|
313
|
+
- "In-memory LRU cache"
|
|
314
|
+
- "CDN cache integration"
|
|
315
|
+
- "HTTP cache"
|
|
316
|
+
|
|
317
|
+
- name: engines
|
|
318
|
+
description: "Computational and processing engines"
|
|
319
|
+
suffix:
|
|
320
|
+
python: "*_engine.py, *_analyzer.py, *_processor.py"
|
|
321
|
+
typescript: "*-engine.ts, *-analyzer.ts"
|
|
322
|
+
examples:
|
|
323
|
+
- "Graph algorithms (PageRank, clustering, pathfinding)"
|
|
324
|
+
- "Machine learning (training, inference, feature extraction)"
|
|
325
|
+
- "Statistical analysis (regression, time-series)"
|
|
326
|
+
- "Optimization solvers (linear programming)"
|
|
327
|
+
- "Rules engines"
|
|
328
|
+
- "Search engines (Elasticsearch, Algolia)"
|
|
329
|
+
|
|
330
|
+
- name: formatters
|
|
331
|
+
description: "Output formatting and rendering services"
|
|
332
|
+
suffix:
|
|
333
|
+
python: "*_formatter.py, *_renderer.py, *_generator.py"
|
|
334
|
+
typescript: "*-formatter.ts, *-renderer.ts"
|
|
335
|
+
examples:
|
|
336
|
+
- "Chart and graph rendering (matplotlib, D3)"
|
|
337
|
+
- "PDF generation"
|
|
338
|
+
- "Excel/CSV export"
|
|
339
|
+
- "Report generation"
|
|
340
|
+
- "Image rendering"
|
|
341
|
+
- "Template rendering"
|
|
342
|
+
|
|
343
|
+
- name: notifiers
|
|
344
|
+
description: "Communication and notification services"
|
|
345
|
+
suffix:
|
|
346
|
+
python: "*_notifier.py, *_sender.py"
|
|
347
|
+
typescript: "*-notifier.ts, *-sender.ts"
|
|
348
|
+
examples:
|
|
349
|
+
- "Email services (SMTP, SendGrid, AWS SES)"
|
|
350
|
+
- "SMS services (Twilio, Nexmo)"
|
|
351
|
+
- "Push notifications (FCM, APNs)"
|
|
352
|
+
- "Webhooks (outbound events)"
|
|
353
|
+
- "In-app notifications"
|
|
354
|
+
|
|
355
|
+
- name: queues
|
|
356
|
+
description: "Message queue and event streaming clients"
|
|
357
|
+
suffix:
|
|
358
|
+
python: "*_queue.py, *_publisher.py, *_subscriber.py"
|
|
359
|
+
typescript: "*-queue.ts, *-publisher.ts"
|
|
360
|
+
examples:
|
|
361
|
+
- "Kafka producers/consumers"
|
|
362
|
+
- "RabbitMQ publishers/subscribers"
|
|
363
|
+
- "AWS SQS/SNS"
|
|
364
|
+
- "Redis Pub/Sub"
|
|
365
|
+
- "NATS"
|
|
366
|
+
|
|
367
|
+
- name: stores
|
|
368
|
+
description: "File and object storage adapters"
|
|
369
|
+
suffix:
|
|
370
|
+
python: "*_store.py, *_storage.py"
|
|
371
|
+
typescript: "*-store.ts, *-storage.ts"
|
|
372
|
+
examples:
|
|
373
|
+
- "AWS S3"
|
|
374
|
+
- "Google Cloud Storage"
|
|
375
|
+
- "Azure Blob Storage"
|
|
376
|
+
- "Local filesystem"
|
|
377
|
+
- "FTP/SFTP"
|
|
378
|
+
|
|
379
|
+
- name: mappers
|
|
380
|
+
description: "Data transformation and mapping between layers"
|
|
381
|
+
suffix:
|
|
382
|
+
python: "*_mapper.py"
|
|
383
|
+
typescript: "*-mapper.ts"
|
|
384
|
+
examples:
|
|
385
|
+
- "Entity ↔ ORM model mapping"
|
|
386
|
+
- "Domain ↔ DTO mapping"
|
|
387
|
+
- "API response ↔ Entity mapping"
|
|
388
|
+
- "Data normalization/denormalization"
|
|
389
|
+
|
|
390
|
+
- name: schedulers
|
|
391
|
+
description: "Background tasks and scheduled jobs"
|
|
392
|
+
suffix:
|
|
393
|
+
python: "*_scheduler.py, *_job.py, *_task.py"
|
|
394
|
+
typescript: "*-scheduler.ts, *-job.ts"
|
|
395
|
+
examples:
|
|
396
|
+
- "Cron jobs"
|
|
397
|
+
- "Celery tasks"
|
|
398
|
+
- "Background workers"
|
|
399
|
+
- "Periodic cleanup jobs"
|
|
400
|
+
- "Data synchronization jobs"
|
|
401
|
+
|
|
402
|
+
- name: monitors
|
|
403
|
+
description: "Observability and infrastructure monitoring"
|
|
404
|
+
suffix:
|
|
405
|
+
python: "*_monitor.py, *_tracker.py"
|
|
406
|
+
typescript: "*-monitor.ts"
|
|
407
|
+
examples:
|
|
408
|
+
- "Metrics exporters (Prometheus, StatsD)"
|
|
409
|
+
- "Distributed tracing (Jaeger, OpenTelemetry)"
|
|
410
|
+
- "Logging aggregation"
|
|
411
|
+
- "Health checks"
|
|
412
|
+
- "Performance monitoring"
|
|
413
|
+
|
|
414
|
+
structure:
|
|
415
|
+
python:
|
|
416
|
+
src_path_pattern: "python/{wagon}/{feature}/src/{layer}/"
|
|
417
|
+
layers: [presentation, application, domain, integration]
|
|
418
|
+
|
|
419
|
+
typescript:
|
|
420
|
+
src_path_pattern: "supabase/functions/{wagon}/{feature}/{layer}/"
|
|
421
|
+
layers: [presentation, application, domain, integration]
|
|
422
|
+
|
|
423
|
+
supabase:
|
|
424
|
+
src_path_pattern: "supabase/functions/{wagon}/{feature}/{layer}/"
|
|
425
|
+
layers: [presentation, application, domain, integration]
|
|
426
|
+
entrypoint_rules:
|
|
427
|
+
index_ts:
|
|
428
|
+
role: "thin_adapter"
|
|
429
|
+
allowed_imports: ["./presentation", "presentation"]
|
|
430
|
+
no_business_logic: true
|
|
431
|
+
|
|
432
|
+
dependency:
|
|
433
|
+
allowed_edges:
|
|
434
|
+
- from: presentation
|
|
435
|
+
to: [application, domain]
|
|
436
|
+
- from: application
|
|
437
|
+
to: [domain]
|
|
438
|
+
- from: integration
|
|
439
|
+
to: [application, domain]
|
|
440
|
+
forbidden_examples:
|
|
441
|
+
- "domain → application"
|
|
442
|
+
- "domain → presentation"
|
|
443
|
+
- "application → presentation"
|
|
444
|
+
- "presentation → integration (bypass application)"
|
|
445
|
+
|
|
446
|
+
ci_enforcement:
|
|
447
|
+
checks:
|
|
448
|
+
- name: "arch_import_rules"
|
|
449
|
+
description: "Verify imports follow dependency_rules."
|
|
450
|
+
- name: "suffix_placement"
|
|
451
|
+
description: "Verify files live in layer matching suffix."
|
|
452
|
+
- name: "no_cross_feature_imports"
|
|
453
|
+
description: "Features cannot import other features' internals."
|
|
454
|
+
- name: "dto_boundary"
|
|
455
|
+
description: "Ensure DTOs are not imported in domain."
|
|
456
|
+
- name: "test_coverage_threshold"
|
|
457
|
+
description: "Min coverage for layers (configurable)."
|
|
458
|
+
tools:
|
|
459
|
+
- "eslint/depcruiser or ArchUnit (per stack)"
|
|
460
|
+
failure_policy: "block_on_violation"
|