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.
- atdd/__init__.py +0 -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.1.0.dist-info/METADATA +191 -0
- atdd-0.1.0.dist-info/RECORD +183 -0
- atdd-0.1.0.dist-info/WHEEL +5 -0
- atdd-0.1.0.dist-info/entry_points.txt +2 -0
- atdd-0.1.0.dist-info/licenses/LICENSE +674 -0
- atdd-0.1.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
version: "1.0"
|
|
2
|
+
name: "Test Layer Convention"
|
|
3
|
+
description: "Test routing rules to determine which layer a test belongs to based on acceptance criteria keywords."
|
|
4
|
+
|
|
5
|
+
test_routing_rules:
|
|
6
|
+
backend:
|
|
7
|
+
presentation:
|
|
8
|
+
keywords: ["API", "endpoint", "HTTP", "status code", "request", "response", "version", "health", "OpenAPI", "CORS", "rate limit"]
|
|
9
|
+
patterns: ["returns {status}", "API responds", "endpoint accepts", "exposes /health", "publishes OpenAPI"]
|
|
10
|
+
application:
|
|
11
|
+
keywords: ["workflow", "orchestrate", "coordinate", "use case", "saga", "policy", "idempotent", "unit of work"]
|
|
12
|
+
patterns: ["coordinates multiple", "executes workflow", "processes request", "enforces policy", "idempotency"]
|
|
13
|
+
domain:
|
|
14
|
+
keywords: ["business rule", "validation", "calculation", "entity", "aggregate", "specification", "domain event"]
|
|
15
|
+
patterns: ["validates that", "calculates", "must satisfy", "emits event"]
|
|
16
|
+
integration:
|
|
17
|
+
keywords: ["database", "cache", "external service", "persistence", "storage", "queue", "outbox", "migration", "retry", "circuit"]
|
|
18
|
+
patterns: ["saves to", "retrieves from", "publishes event", "calls external", "applies retry"]
|
|
19
|
+
frontend:
|
|
20
|
+
presentation:
|
|
21
|
+
keywords: ["display", "renders", "button", "form", "UI", "i18n", "a11y", "navigation", "animation"]
|
|
22
|
+
patterns: ["displays", "user sees", "button enabled", "localized", "focus order"]
|
|
23
|
+
application:
|
|
24
|
+
keywords: ["use case", "state orchestration", "port", "repository interface", "policy"]
|
|
25
|
+
patterns: ["invokes use case", "maps view to port", "applies policy"]
|
|
26
|
+
domain:
|
|
27
|
+
keywords: ["client validation", "frontend rule", "pure function", "derive"]
|
|
28
|
+
patterns: ["validates locally", "derives value"]
|
|
29
|
+
integration:
|
|
30
|
+
keywords: ["API call", "local storage", "cache", "offline sync", "interceptor", "background task", "connectivity"]
|
|
31
|
+
patterns: ["fetches from API", "stores locally", "caches response", "syncs pending", "retries on failure"]
|
|
32
|
+
|
|
33
|
+
routing_examples:
|
|
34
|
+
backend:
|
|
35
|
+
- text: "Endpoint returns 200 and publishes OpenAPI"
|
|
36
|
+
routes_to: "presentation"
|
|
37
|
+
- text: "Use case coordinates payment then reserves stock"
|
|
38
|
+
routes_to: "application"
|
|
39
|
+
- text: "Aggregate decrements stock and emits DomainEvent"
|
|
40
|
+
routes_to: "domain"
|
|
41
|
+
- text: "Repository saves purchase and writes outbox message"
|
|
42
|
+
routes_to: "integration"
|
|
43
|
+
frontend:
|
|
44
|
+
- text: "Button is disabled while submitting"
|
|
45
|
+
routes_to: "presentation"
|
|
46
|
+
- text: "Bloc transitions from Idle → Loading → Success"
|
|
47
|
+
routes_to: "application"
|
|
48
|
+
- text: "Validate cart total against discount rules"
|
|
49
|
+
routes_to: "domain"
|
|
50
|
+
- text: "Client caches response and retries on offline"
|
|
51
|
+
routes_to: "integration"
|
|
@@ -0,0 +1,458 @@
|
|
|
1
|
+
version: "2.0"
|
|
2
|
+
name: "Unified Telemetry Convention"
|
|
3
|
+
description: "Universal tracking plan supporting dual-destination observability (OpenTelemetry) and analytics (PostHog)"
|
|
4
|
+
|
|
5
|
+
# Schema Reference
|
|
6
|
+
schema:
|
|
7
|
+
path: "atdd/tester/schemas/telemetry.schema.json"
|
|
8
|
+
version: "1.0.0"
|
|
9
|
+
title: "Unified Telemetry Signal"
|
|
10
|
+
description: "Single source of truth for both observability and analytics signals"
|
|
11
|
+
|
|
12
|
+
# Unified Telemetry Architecture
|
|
13
|
+
architecture:
|
|
14
|
+
observability:
|
|
15
|
+
standard: "OpenTelemetry"
|
|
16
|
+
modalities: ["metric", "trace", "log"]
|
|
17
|
+
destination: "OTel-compatible backends (Jaeger, Tempo, Prometheus, Grafana)"
|
|
18
|
+
sdk: "OpenTelemetry SDK (Python, Dart, TypeScript)"
|
|
19
|
+
|
|
20
|
+
analytics:
|
|
21
|
+
platform: "PostHog"
|
|
22
|
+
modalities: ["event"]
|
|
23
|
+
destination: "PostHog API"
|
|
24
|
+
sdk: "PostHog SDK (Python, Dart, TypeScript)"
|
|
25
|
+
|
|
26
|
+
dual_destination:
|
|
27
|
+
description: "Critical signals sent to BOTH observability and analytics"
|
|
28
|
+
use_case: "Business-critical events need trace correlation AND user impact analysis"
|
|
29
|
+
example: "Pool exhaustion → OTel trace (where failed) + PostHog event (user impact)"
|
|
30
|
+
|
|
31
|
+
plane_vs_deployment:
|
|
32
|
+
plane:
|
|
33
|
+
description: "Logical observability layer - WHAT kind of signal"
|
|
34
|
+
values: ["ui", "ux", "be", "db", "nw", "st", "tm", "sc", "au", "fn", "if"]
|
|
35
|
+
examples:
|
|
36
|
+
- "nw (network) for HTTP requests, regardless of WHERE they run"
|
|
37
|
+
- "db (database) for queries, whether in backend/edge/job"
|
|
38
|
+
- "ui (interface) for rendering, whether browser/mobile"
|
|
39
|
+
deployment:
|
|
40
|
+
description: "Runtime execution context - WHERE code runs"
|
|
41
|
+
values: ["frontend", "backend", "edge", "job", "mobile"]
|
|
42
|
+
examples:
|
|
43
|
+
- "backend = runs on server (Kubernetes pods, VMs)"
|
|
44
|
+
- "frontend = runs in browser (JavaScript/WASM)"
|
|
45
|
+
- "edge = runs on edge functions (Cloudflare Workers, Vercel Edge)"
|
|
46
|
+
- "job = runs as background job (cron, queue workers)"
|
|
47
|
+
- "mobile = runs in mobile app (iOS/Android native)"
|
|
48
|
+
|
|
49
|
+
# Required Fields for Unified Telemetry Signals
|
|
50
|
+
required_fields:
|
|
51
|
+
core:
|
|
52
|
+
- "$schema" # JSON Schema draft-07
|
|
53
|
+
- "$id" # Signal identifier (NO "telemetry:" prefix)
|
|
54
|
+
- "version" # Semantic version
|
|
55
|
+
- "type" # Signal type (event|metric|trace|log)
|
|
56
|
+
- "plane" # Logical layer (ui|ux|be|db|nw|st|tm|sc|au|fn|if)
|
|
57
|
+
- "artifact_ref" # Reference to contract schema
|
|
58
|
+
- "acceptance_criteria" # Array of acceptance URNs (at least 1)
|
|
59
|
+
- "properties" # JSON Schema properties object
|
|
60
|
+
- "required" # Array of required property names
|
|
61
|
+
|
|
62
|
+
conditional_required:
|
|
63
|
+
metric:
|
|
64
|
+
- "measure" # Required for metric signals
|
|
65
|
+
event:
|
|
66
|
+
- [] # No additional requirements
|
|
67
|
+
trace:
|
|
68
|
+
- [] # No additional requirements
|
|
69
|
+
log:
|
|
70
|
+
- [] # No additional requirements
|
|
71
|
+
|
|
72
|
+
rationale: |
|
|
73
|
+
All telemetry signals MUST have complete traceability to:
|
|
74
|
+
- Enable bidirectional navigation (signal → wagon → plan)
|
|
75
|
+
- Support impact analysis for metric/event changes
|
|
76
|
+
- Maintain observability governance and audit trails
|
|
77
|
+
- Link signals to acceptance criteria for validation
|
|
78
|
+
|
|
79
|
+
traceability:
|
|
80
|
+
acceptance_criteria:
|
|
81
|
+
description: "Signals reference acceptance criteria in content"
|
|
82
|
+
field: "acceptance_criteria"
|
|
83
|
+
format: "Array of acceptance URNs (at least 1 for non-placeholder signals)"
|
|
84
|
+
example: ["acc:resolve-dilemmas:M001-INTEGRATION-001"]
|
|
85
|
+
validation: "Platform test verifies URNs exist"
|
|
86
|
+
|
|
87
|
+
# Telemetry structure (tracking plans generated from signal field)
|
|
88
|
+
telemetry_structure:
|
|
89
|
+
output_location: "telemetry/"
|
|
90
|
+
|
|
91
|
+
# Metrics classification based on planes
|
|
92
|
+
metrics_by_plane:
|
|
93
|
+
ui:
|
|
94
|
+
typical_metrics:
|
|
95
|
+
- render_latency
|
|
96
|
+
- interaction_response_time
|
|
97
|
+
- animation_fps
|
|
98
|
+
collection: "Browser Performance API"
|
|
99
|
+
aggregations: ["p50", "p95", "p99"]
|
|
100
|
+
|
|
101
|
+
ux:
|
|
102
|
+
typical_metrics:
|
|
103
|
+
- user_steps_count
|
|
104
|
+
- time_to_complete
|
|
105
|
+
- error_recovery_time
|
|
106
|
+
collection: "User session tracking"
|
|
107
|
+
aggregations: ["mean", "median", "max"]
|
|
108
|
+
|
|
109
|
+
be:
|
|
110
|
+
typical_metrics:
|
|
111
|
+
- business_rule_execution_time
|
|
112
|
+
- validation_success_rate
|
|
113
|
+
- processing_throughput
|
|
114
|
+
collection: "Application metrics"
|
|
115
|
+
aggregations: ["p95", "success_rate", "ops_per_sec"]
|
|
116
|
+
|
|
117
|
+
nw:
|
|
118
|
+
typical_metrics:
|
|
119
|
+
- request_latency
|
|
120
|
+
- response_time
|
|
121
|
+
- timeout_rate
|
|
122
|
+
collection: "Network monitoring"
|
|
123
|
+
aggregations: ["p50", "p95", "p99", "error_rate"]
|
|
124
|
+
|
|
125
|
+
db:
|
|
126
|
+
typical_metrics:
|
|
127
|
+
- query_execution_time
|
|
128
|
+
- transaction_duration
|
|
129
|
+
- lock_wait_time
|
|
130
|
+
collection: "Database metrics"
|
|
131
|
+
aggregations: ["p95", "p99", "max"]
|
|
132
|
+
|
|
133
|
+
st:
|
|
134
|
+
typical_metrics:
|
|
135
|
+
- asset_load_time
|
|
136
|
+
- cache_hit_ratio
|
|
137
|
+
- storage_latency
|
|
138
|
+
collection: "Storage metrics"
|
|
139
|
+
aggregations: ["p95", "hit_rate", "bytes_per_sec"]
|
|
140
|
+
|
|
141
|
+
tm:
|
|
142
|
+
typical_metrics:
|
|
143
|
+
- event_ingestion_rate
|
|
144
|
+
- pipeline_lag
|
|
145
|
+
- drop_ratio
|
|
146
|
+
collection: "Telemetry pipeline metrics"
|
|
147
|
+
aggregations: ["rate", "p99", "loss_percentage"]
|
|
148
|
+
|
|
149
|
+
sc:
|
|
150
|
+
typical_metrics:
|
|
151
|
+
- schema_validation_errors
|
|
152
|
+
- contract_violations
|
|
153
|
+
- version_mismatches
|
|
154
|
+
collection: "Contract monitoring"
|
|
155
|
+
aggregations: ["count", "error_rate"]
|
|
156
|
+
|
|
157
|
+
au:
|
|
158
|
+
typical_metrics:
|
|
159
|
+
- auth_success_rate
|
|
160
|
+
- permission_check_latency
|
|
161
|
+
- rate_limit_hits
|
|
162
|
+
collection: "Auth metrics"
|
|
163
|
+
aggregations: ["success_rate", "p95", "throttle_rate"]
|
|
164
|
+
|
|
165
|
+
fn:
|
|
166
|
+
typical_metrics:
|
|
167
|
+
- transaction_value
|
|
168
|
+
- processing_cost
|
|
169
|
+
- margin_percentage
|
|
170
|
+
collection: "Financial metrics"
|
|
171
|
+
aggregations: ["sum", "mean", "percentile"]
|
|
172
|
+
|
|
173
|
+
if:
|
|
174
|
+
typical_metrics:
|
|
175
|
+
- cpu_utilization
|
|
176
|
+
- memory_usage
|
|
177
|
+
- pod_restart_count
|
|
178
|
+
collection: "Infrastructure metrics"
|
|
179
|
+
aggregations: ["p95", "max", "count"]
|
|
180
|
+
|
|
181
|
+
# Data source configuration
|
|
182
|
+
data_sources:
|
|
183
|
+
opentelemetry:
|
|
184
|
+
spans: "Distributed tracing"
|
|
185
|
+
metrics: "Time series data"
|
|
186
|
+
logs: "Structured logging"
|
|
187
|
+
|
|
188
|
+
prometheus:
|
|
189
|
+
scrape_interval: "15s"
|
|
190
|
+
retention: "15d"
|
|
191
|
+
|
|
192
|
+
custom:
|
|
193
|
+
application_metrics: "Custom business metrics"
|
|
194
|
+
user_analytics: "User behavior tracking"
|
|
195
|
+
|
|
196
|
+
# Window and aggregation rules
|
|
197
|
+
temporal_windows:
|
|
198
|
+
real_time: "1min"
|
|
199
|
+
near_real_time: "5min"
|
|
200
|
+
batch: "1hour"
|
|
201
|
+
daily: "24hour"
|
|
202
|
+
|
|
203
|
+
selection_criteria:
|
|
204
|
+
latency_metrics: "5min" # Balance between noise and responsiveness
|
|
205
|
+
throughput_metrics: "1hour" # Smooth out variations
|
|
206
|
+
error_metrics: "1min" # Quick detection
|
|
207
|
+
cost_metrics: "24hour" # Daily aggregation
|
|
208
|
+
|
|
209
|
+
# Adapter configuration for different harnesses
|
|
210
|
+
adapters:
|
|
211
|
+
http:
|
|
212
|
+
metrics: ["latency", "status_codes", "payload_size"]
|
|
213
|
+
source: "HTTP client instrumentation"
|
|
214
|
+
|
|
215
|
+
e2e:
|
|
216
|
+
metrics: ["user_journey_time", "interaction_count"]
|
|
217
|
+
source: "Browser automation framework"
|
|
218
|
+
|
|
219
|
+
db:
|
|
220
|
+
metrics: ["query_time", "row_count", "lock_duration"]
|
|
221
|
+
source: "Database query profiler"
|
|
222
|
+
|
|
223
|
+
event:
|
|
224
|
+
metrics: ["publish_latency", "consume_lag", "message_size"]
|
|
225
|
+
source: "Message broker metrics"
|
|
226
|
+
|
|
227
|
+
# Alert thresholds (defaults, overrideable per acceptance)
|
|
228
|
+
default_thresholds:
|
|
229
|
+
latency:
|
|
230
|
+
warning: "2x baseline"
|
|
231
|
+
critical: "5x baseline"
|
|
232
|
+
|
|
233
|
+
error_rate:
|
|
234
|
+
warning: "1%"
|
|
235
|
+
critical: "5%"
|
|
236
|
+
|
|
237
|
+
availability:
|
|
238
|
+
warning: "99.9%"
|
|
239
|
+
critical: "99%"
|
|
240
|
+
|
|
241
|
+
# Validation rules
|
|
242
|
+
validation_rules:
|
|
243
|
+
metric_naming:
|
|
244
|
+
pattern: "{plane}.{entity}.{operation}.{measure}"
|
|
245
|
+
example: "ui.login.form.submit.latency"
|
|
246
|
+
|
|
247
|
+
data_quality:
|
|
248
|
+
required_tags: ["wagon", "feature", "component", "environment"]
|
|
249
|
+
timestamp_precision: "milliseconds"
|
|
250
|
+
|
|
251
|
+
aggregation_compatibility:
|
|
252
|
+
percentiles: ["latency", "duration", "size"]
|
|
253
|
+
rates: ["throughput", "errors", "requests"]
|
|
254
|
+
counts: ["events", "users", "transactions"]
|
|
255
|
+
|
|
256
|
+
# Signal processing rules
|
|
257
|
+
classification:
|
|
258
|
+
signal_to_tracking_plan:
|
|
259
|
+
description: "Maps signal field to dual tracking plan (observability + analytics)"
|
|
260
|
+
|
|
261
|
+
metrics_to_observability:
|
|
262
|
+
description: "signal.metrics → OpenTelemetry tracking plan"
|
|
263
|
+
rules:
|
|
264
|
+
- "Extract metric name, type, threshold, aggregation"
|
|
265
|
+
- "Validate plane.component.operation.measure pattern"
|
|
266
|
+
- "Map to OpenTelemetry metric definition"
|
|
267
|
+
- "Generate threshold alerts (warning, critical)"
|
|
268
|
+
|
|
269
|
+
events_to_analytics:
|
|
270
|
+
description: "signal.events → Analytics tracking plan (Segment/Mixpanel)"
|
|
271
|
+
rules:
|
|
272
|
+
- "Extract event_name, properties"
|
|
273
|
+
- "Generate event schema with property types"
|
|
274
|
+
- "Link to tracking_plan_ref"
|
|
275
|
+
- "Map to analytics provider format"
|
|
276
|
+
|
|
277
|
+
signal_processing:
|
|
278
|
+
description: "Active derivation from acceptance.signal field"
|
|
279
|
+
|
|
280
|
+
validation_hierarchy:
|
|
281
|
+
1_parse_signal: "Extract signal.metrics and signal.events from acceptance"
|
|
282
|
+
2_classify: "Map metrics → observability, events → analytics"
|
|
283
|
+
3_derive_plane: "Use harness.type + metric name to determine plane"
|
|
284
|
+
4_generate_pack: "Create telemetry pack with both tracking plans"
|
|
285
|
+
5_validate: "Ensure pack consistency and schema compliance"
|
|
286
|
+
|
|
287
|
+
plane_derivation:
|
|
288
|
+
from_harness:
|
|
289
|
+
http: ["nw", "be"]
|
|
290
|
+
db: ["db", "st"]
|
|
291
|
+
event: ["tm", "be"]
|
|
292
|
+
e2e: ["ui", "ux"]
|
|
293
|
+
|
|
294
|
+
tracking_plan_structure:
|
|
295
|
+
manifest_pattern: "{wagon}.telemetry.pack.yaml"
|
|
296
|
+
required_fields:
|
|
297
|
+
- "wagon"
|
|
298
|
+
- "observability_metrics" # From signal.metrics
|
|
299
|
+
- "analytics_events" # From signal.events
|
|
300
|
+
- "acceptance_refs" # Traceability
|
|
301
|
+
|
|
302
|
+
# TODO: Sections to be filled later
|
|
303
|
+
correlation_rules:
|
|
304
|
+
# TODO: Define how metrics correlate across planes
|
|
305
|
+
placeholder: "Define metric correlation patterns"
|
|
306
|
+
|
|
307
|
+
synthetic_monitoring:
|
|
308
|
+
# TODO: Define synthetic test patterns
|
|
309
|
+
placeholder: "Define synthetic monitoring approach"
|
|
310
|
+
|
|
311
|
+
cost_tracking:
|
|
312
|
+
# TODO: Define cost attribution for telemetry
|
|
313
|
+
placeholder: "Define telemetry cost model"
|
|
314
|
+
|
|
315
|
+
# Artifact-centric tracking structure (v1.1.0 addition)
|
|
316
|
+
tracking_structure:
|
|
317
|
+
description: "Telemetry signals organized by artifact with contract references"
|
|
318
|
+
version: "1.1.0"
|
|
319
|
+
|
|
320
|
+
manifest:
|
|
321
|
+
location: "telemetry/_tracking.yaml"
|
|
322
|
+
format: "YAML"
|
|
323
|
+
purpose: "Central registry of all telemetry signals per artifact"
|
|
324
|
+
|
|
325
|
+
directory_pattern: "telemetry/{theme}/{domain}/"
|
|
326
|
+
file_pattern: "{aspect}.{signal-type}.{plane}[.{measure}].json"
|
|
327
|
+
note: "Mirrors contracts/ structure exactly - aspect is filename prefix, not folder"
|
|
328
|
+
|
|
329
|
+
structure_comparison:
|
|
330
|
+
contracts: "contracts/{theme}/{domain}/{aspect}.schema.json"
|
|
331
|
+
telemetry: "telemetry/{theme}/{domain}/{aspect}.{type}.{plane}[.{measure}].json"
|
|
332
|
+
example:
|
|
333
|
+
contracts: "contracts/match/dilemma/current.schema.json"
|
|
334
|
+
telemetry: "telemetry/match/dilemma/current.metric.be.selection-duration.json"
|
|
335
|
+
|
|
336
|
+
validation:
|
|
337
|
+
meta_validation:
|
|
338
|
+
structure_location: "atdd/tester/validators/test_telemetry_structure.py"
|
|
339
|
+
content_location: "atdd/tester/validators/test_telemetry_structure.py"
|
|
340
|
+
scope: "Platform-level structural and content validation"
|
|
341
|
+
type: "infrastructure"
|
|
342
|
+
urn_required: false
|
|
343
|
+
checks:
|
|
344
|
+
- "Directory structure (theme/domain hierarchy)"
|
|
345
|
+
- "File naming patterns (*.event|*.metric.*.json)"
|
|
346
|
+
- "JSON Schema Draft-07 compliance"
|
|
347
|
+
- "Required metadata ($schema, $id, version)"
|
|
348
|
+
- "Signal type/plane/measure validity"
|
|
349
|
+
- "Contract reference integrity"
|
|
350
|
+
- "Acceptance traceability (acceptance_criteria exist)"
|
|
351
|
+
- "Duplicate detection (unique $id)"
|
|
352
|
+
|
|
353
|
+
examples:
|
|
354
|
+
- path: "telemetry/match/dilemma/current.event.be.json"
|
|
355
|
+
urn: "telemetry:match:dilemma:current:event:be"
|
|
356
|
+
note: "aspect 'current' is filename prefix"
|
|
357
|
+
- path: "telemetry/match/dilemma/current.metric.be.selection-duration.json"
|
|
358
|
+
urn: "telemetry:match:dilemma:current:metric:be:selection-duration"
|
|
359
|
+
note: "aspect 'current' prefixes the metric signal"
|
|
360
|
+
- path: "telemetry/commons/ux/foundations.metric.nw.latency.json"
|
|
361
|
+
urn: "telemetry:commons:ux:foundations:metric:nw:latency"
|
|
362
|
+
note: "aspect 'foundations' prefixes the metric signal"
|
|
363
|
+
- path: "telemetry/match/dilemma/paired.metric.be.pairing-duration.json"
|
|
364
|
+
urn: "telemetry:match:dilemma:paired:metric:be:pairing-duration"
|
|
365
|
+
note: "Multiple aspects in same domain directory"
|
|
366
|
+
|
|
367
|
+
manifest_schema:
|
|
368
|
+
required_fields:
|
|
369
|
+
- version: "Manifest version"
|
|
370
|
+
- planes: "Array of valid plane identifiers [ui, ux, be, db, nw]"
|
|
371
|
+
- measures: "Array of valid measure types"
|
|
372
|
+
- artifacts: "Array of artifact signal declarations"
|
|
373
|
+
|
|
374
|
+
artifact_entry:
|
|
375
|
+
required:
|
|
376
|
+
- artifact: "Artifact identifier (domain:resource)"
|
|
377
|
+
- contract_ref: "Contract reference (contract:domain:resource)"
|
|
378
|
+
- signals: "Array of signal declarations"
|
|
379
|
+
|
|
380
|
+
signal_declaration:
|
|
381
|
+
type: "object"
|
|
382
|
+
required: ["type"]
|
|
383
|
+
optional: ["plane", "measure", "unit"]
|
|
384
|
+
examples:
|
|
385
|
+
- "{ type: event }"
|
|
386
|
+
- "{ type: metric, plane: be, measure: duration, unit: ms }"
|
|
387
|
+
|
|
388
|
+
signal_file_schema:
|
|
389
|
+
required_fields:
|
|
390
|
+
- "$schema": "http://json-schema.org/draft-07/schema#"
|
|
391
|
+
- "$id": "Signal identifier (NO 'telemetry:' prefix)"
|
|
392
|
+
- "version": "Signal schema version (semver)"
|
|
393
|
+
- "type": "Signal type (event|metric|trace|log)"
|
|
394
|
+
- "artifact_ref": "Contract reference (WITH 'contract:' prefix)"
|
|
395
|
+
- "acceptance_criteria": "Array of acceptance URNs for traceability"
|
|
396
|
+
- "properties": "JSON Schema properties object"
|
|
397
|
+
- "required": "Array of required property names"
|
|
398
|
+
|
|
399
|
+
id_vs_urn:
|
|
400
|
+
signal_id: "{theme}(:{path})*:{aspect}.{type}.{plane}[.{measure}]"
|
|
401
|
+
signal_id_examples:
|
|
402
|
+
- "commons:ux:foundations:color.metric.be.count"
|
|
403
|
+
- "match:dilemma:current.metric.be.selection_duration"
|
|
404
|
+
- "commons:ux:foundations:foundations.metric.be.error_rate"
|
|
405
|
+
urn: "telemetry:{theme}(:{path})*:{aspect}"
|
|
406
|
+
urn_examples:
|
|
407
|
+
- "telemetry:commons:ux:foundations"
|
|
408
|
+
- "telemetry:match:dilemma"
|
|
409
|
+
note: |
|
|
410
|
+
$id in signal file: NO "telemetry:" prefix (e.g., commons:ux:foundations:color.metric.be.count)
|
|
411
|
+
URN in wagon manifests: WITH "telemetry:" prefix (e.g., telemetry:commons:ux:foundations)
|
|
412
|
+
artifact_ref: WITH "contract:" prefix (e.g., contract:commons:ux:foundations:color)
|
|
413
|
+
|
|
414
|
+
Hierarchy (colons) for path segments, dots for signal facets (type.plane.measure).
|
|
415
|
+
Mirrors contract structure perfectly.
|
|
416
|
+
|
|
417
|
+
Examples:
|
|
418
|
+
File: telemetry/commons/ux/foundations/color.metric.be.count.json
|
|
419
|
+
$id: commons:ux:foundations:color.metric.be.count
|
|
420
|
+
Wagon URN: telemetry:commons:ux:foundations
|
|
421
|
+
artifact_ref: contract:commons:ux:foundations:color
|
|
422
|
+
|
|
423
|
+
urn_path_mapping:
|
|
424
|
+
pattern: "telemetry:{theme}(:{path})*:{aspect} (wagon manifest format)"
|
|
425
|
+
path_construction:
|
|
426
|
+
directory: "telemetry/{theme}/{path}/{aspect}/"
|
|
427
|
+
filename: "{resource}.{type}.{plane}[.{measure}].json"
|
|
428
|
+
round_trip: "URN ↔ path must be identity transformation"
|
|
429
|
+
note: "Directory structure mirrors contracts exactly - aspect is subdirectory, resource is filename prefix"
|
|
430
|
+
comparison:
|
|
431
|
+
contract_path: "contracts/commons/ux/foundations/color.schema.json"
|
|
432
|
+
contract_id: "commons:ux:foundations:color"
|
|
433
|
+
contract_urn: "contract:commons:ux:foundations:color"
|
|
434
|
+
telemetry_path: "telemetry/commons/ux/foundations/color.metric.be.count.json"
|
|
435
|
+
telemetry_id: "commons:ux:foundations:color.metric.be.count"
|
|
436
|
+
telemetry_urn: "telemetry:commons:ux:foundations"
|
|
437
|
+
|
|
438
|
+
artifact_naming_grammar:
|
|
439
|
+
pattern: "{theme}:{domain}:{aspect}"
|
|
440
|
+
structure: "Same as contracts - complete mirror"
|
|
441
|
+
examples:
|
|
442
|
+
- "match:dilemma:current"
|
|
443
|
+
- "commons:ux:foundations"
|
|
444
|
+
- "scenario:fragment:pool"
|
|
445
|
+
forbidden: "No wagon or operation segments"
|
|
446
|
+
|
|
447
|
+
validation_levels:
|
|
448
|
+
level_1: "Manifest structure validation"
|
|
449
|
+
level_2: "Filesystem structure validation"
|
|
450
|
+
level_3: "Signal file schema validation"
|
|
451
|
+
level_4: "Contract and acceptance reference validation"
|
|
452
|
+
level_5: "Cross-system synchronization validation"
|
|
453
|
+
|
|
454
|
+
testing:
|
|
455
|
+
location: "atdd/tester/validators/test_telemetry_structure.py"
|
|
456
|
+
framework: "pytest"
|
|
457
|
+
markers: ["telemetry", "validation"]
|
|
458
|
+
specs: "SPEC-TESTER-CONV-0050 through SPEC-TESTER-CONV-0058"
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "Accessibility Test Harness Template",
|
|
4
|
+
"description": "Template for accessibility tests using axe-core",
|
|
5
|
+
"language": "typescript",
|
|
6
|
+
"framework": "playwright",
|
|
7
|
+
"category": "frontend",
|
|
8
|
+
"template": "\n// URN: {urn}\nimport {{ test, expect }} from '@playwright/test';\nimport AxeBuilder from '@axe-core/playwright';\n\ntest('{test_name}', async ({{ page }}) => {{\n // Given\n await page.goto('{url}');\n {given_setup}\n\n // When\n const results = await new AxeBuilder({{ page }})\n {axe_ruleset_call}\n .analyze();\n\n // Then\n const critical = results.violations.filter(v => v.impact === 'critical');\n const ok = critical.length <= {max_critical};\n\n console.log(JSON.stringify({{\n urn: '{urn}',\n status: ok ? 'PASS' : 'FAIL',\n details: {{ critical: critical.length, violations: results.violations.length }}\n }}));\n\n expect(ok).toBeTruthy();\n}});\n",
|
|
9
|
+
"variables": [
|
|
10
|
+
"urn",
|
|
11
|
+
"test_name",
|
|
12
|
+
"url",
|
|
13
|
+
"given_setup",
|
|
14
|
+
"axe_ruleset_call",
|
|
15
|
+
"max_critical"
|
|
16
|
+
]
|
|
17
|
+
}
|