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,143 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "telemetry-tracking-manifest-schema",
4
+ "title": "Telemetry Tracking Manifest Schema",
5
+ "description": "Schema for telemetry/_tracking.yaml manifest file",
6
+ "type": "object",
7
+ "required": ["version", "planes", "measures", "artifacts"],
8
+ "properties": {
9
+ "version": {
10
+ "type": "string",
11
+ "pattern": "^\\d+\\.\\d+\\.\\d+$",
12
+ "description": "Semantic version of the manifest"
13
+ },
14
+ "planes": {
15
+ "type": "array",
16
+ "items": {
17
+ "type": "string",
18
+ "enum": ["ui", "ux", "be", "db", "nw", "st", "tm", "sc", "au", "fn", "if"]
19
+ },
20
+ "minItems": 1,
21
+ "uniqueItems": true,
22
+ "description": "Valid plane identifiers"
23
+ },
24
+ "measures": {
25
+ "type": "array",
26
+ "items": {
27
+ "type": "string",
28
+ "enum": [
29
+ "latency",
30
+ "duration",
31
+ "count",
32
+ "size",
33
+ "error_rate",
34
+ "success_rate",
35
+ "throughput"
36
+ ]
37
+ },
38
+ "minItems": 1,
39
+ "uniqueItems": true,
40
+ "description": "Valid measure types"
41
+ },
42
+ "artifacts": {
43
+ "type": "array",
44
+ "items": {
45
+ "$ref": "#/definitions/artifact_entry"
46
+ },
47
+ "minItems": 1,
48
+ "description": "Array of artifact signal declarations"
49
+ }
50
+ },
51
+ "definitions": {
52
+ "artifact_entry": {
53
+ "type": "object",
54
+ "required": ["artifact", "contract_ref", "signals"],
55
+ "properties": {
56
+ "artifact": {
57
+ "type": "string",
58
+ "pattern": "^[a-z_]+:[a-z_]+(\\.[a-z_]+)?$",
59
+ "description": "Artifact identifier in domain:resource[.category] format"
60
+ },
61
+ "contract_ref": {
62
+ "type": "string",
63
+ "pattern": "^contract:[a-z_]+:[a-z_]+(\\.[a-z_]+)?$",
64
+ "description": "Contract reference (supports category facets)"
65
+ },
66
+ "signals": {
67
+ "type": "array",
68
+ "items": {
69
+ "$ref": "#/definitions/signal_declaration"
70
+ },
71
+ "minItems": 1,
72
+ "description": "Array of signal declarations for this artifact"
73
+ }
74
+ },
75
+ "additionalProperties": false
76
+ },
77
+ "signal_declaration": {
78
+ "type": "object",
79
+ "required": ["type"],
80
+ "properties": {
81
+ "type": {
82
+ "type": "string",
83
+ "enum": ["event", "metric", "trace", "log"],
84
+ "description": "Signal type"
85
+ },
86
+ "plane": {
87
+ "type": "string",
88
+ "enum": ["ui", "ux", "be", "db", "nw", "st", "tm", "sc", "au", "fn", "if"],
89
+ "description": "Plane identifier (required for metric/trace)"
90
+ },
91
+ "measure": {
92
+ "type": "string",
93
+ "enum": [
94
+ "latency",
95
+ "duration",
96
+ "count",
97
+ "size",
98
+ "error_rate",
99
+ "success_rate",
100
+ "throughput"
101
+ ],
102
+ "description": "Measure type (required for metric)"
103
+ },
104
+ "unit": {
105
+ "type": "string",
106
+ "description": "Unit of measurement (e.g., ms, bytes, count)"
107
+ }
108
+ },
109
+ "allOf": [
110
+ {
111
+ "if": {
112
+ "properties": { "type": { "const": "metric" } }
113
+ },
114
+ "then": {
115
+ "required": ["plane", "measure"]
116
+ }
117
+ },
118
+ {
119
+ "if": {
120
+ "properties": { "type": { "const": "trace" } }
121
+ },
122
+ "then": {
123
+ "required": ["plane"]
124
+ }
125
+ },
126
+ {
127
+ "if": {
128
+ "properties": { "type": { "const": "event" } }
129
+ },
130
+ "then": {
131
+ "not": {
132
+ "anyOf": [
133
+ { "required": ["plane"] },
134
+ { "required": ["measure"] }
135
+ ]
136
+ }
137
+ }
138
+ }
139
+ ],
140
+ "additionalProperties": false
141
+ }
142
+ }
143
+ }
@@ -0,0 +1,194 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://wagons.dev/schemas/tester/test_filename.schema.json",
4
+ "title": "Test Filename Generation Schema",
5
+ "description": "Schema for test filename generation from acceptance URNs with language-specific conventions",
6
+ "type": "object",
7
+ "required": ["urn", "language"],
8
+ "properties": {
9
+ "urn": {
10
+ "type": "string",
11
+ "description": "Acceptance URN in format acc:{wagon}:{WMBT}-{HARNESS}-{NNN}[-{slug}]",
12
+ "pattern": "^acc:([a-z][a-z0-9-]*):([DLPCEMYRK][0-9]{3})-([A-Z0-9]+)-([0-9]{3})(?:-([a-z0-9-]+))?$",
13
+ "examples": [
14
+ "acc:maintain-ux:C004-E2E-019-user-connection",
15
+ "acc:pace-dilemmas:P003-UNIT-042",
16
+ "acc:commit-state:D001-HTTP-007"
17
+ ]
18
+ },
19
+ "language": {
20
+ "type": "string",
21
+ "description": "Target language for test filename generation",
22
+ "enum": ["dart", "typescript", "typescript_preact", "python", "go", "java", "kotlin"],
23
+ "examples": ["dart", "typescript", "typescript_preact"]
24
+ },
25
+ "filename": {
26
+ "type": "string",
27
+ "description": "Generated test filename following language conventions",
28
+ "examples": [
29
+ "C004_E2E_019_user_connection_test.dart",
30
+ "c004-e2e-019-user-connection.test.ts",
31
+ "C001_WIDGET_001_button.test.tsx",
32
+ "test_c004_e2e_019_user_connection.py"
33
+ ]
34
+ },
35
+ "components": {
36
+ "type": "object",
37
+ "description": "Parsed URN components",
38
+ "properties": {
39
+ "wagon": {
40
+ "type": "string",
41
+ "pattern": "^[a-z][a-z0-9-]*$",
42
+ "description": "Wagon identifier in kebab-case",
43
+ "examples": ["maintain-ux", "pace-dilemmas"]
44
+ },
45
+ "WMBT": {
46
+ "type": "string",
47
+ "pattern": "^[DLPCEMYRK][0-9]{3}$",
48
+ "description": "Step code + zero-padded WMBT sequence",
49
+ "examples": ["C004", "E019", "P003"]
50
+ },
51
+ "HARNESS": {
52
+ "type": "string",
53
+ "pattern": "^[A-Z0-9]+$",
54
+ "description": "Test harness code (uppercase)",
55
+ "examples": ["UNIT", "HTTP", "E2E", "EVENT", "WIDGET"]
56
+ },
57
+ "NNN": {
58
+ "type": "string",
59
+ "pattern": "^[0-9]{3}$",
60
+ "description": "Zero-padded 3-digit acceptance sequence",
61
+ "examples": ["001", "019", "042"]
62
+ },
63
+ "slug": {
64
+ "type": ["string", "null"],
65
+ "pattern": "^[a-z0-9-]+$",
66
+ "description": "Optional kebab-case descriptor",
67
+ "examples": ["user-connection", "primitive-endpoint", null]
68
+ }
69
+ },
70
+ "required": ["wagon", "WMBT", "HARNESS", "NNN"],
71
+ "additionalProperties": false
72
+ }
73
+ },
74
+ "definitions": {
75
+ "dart_filename": {
76
+ "type": "string",
77
+ "pattern": "^[A-Z][0-9]{3}_[A-Z0-9]+_[0-9]{3}(?:_[a-z0-9_]+)?_test\\.dart$",
78
+ "description": "Dart test filename pattern: {WMBT}_{HARNESS}_{NNN}[_{slug_snake}]_test.dart",
79
+ "examples": [
80
+ "C004_E2E_019_user_connection_test.dart",
81
+ "P003_UNIT_042_test.dart"
82
+ ]
83
+ },
84
+ "typescript_filename": {
85
+ "type": "string",
86
+ "pattern": "^[a-z][0-9]{3}-[a-z0-9]+-[0-9]{3}(?:-[a-z0-9-]+)?\\.test\\.ts$",
87
+ "description": "TypeScript test filename pattern: {wmbt_lower}-{harness_lower}-{nnn}[-{slug-kebab}].test.ts",
88
+ "examples": [
89
+ "c004-e2e-019-user-connection.test.ts",
90
+ "p003-unit-042.test.ts"
91
+ ]
92
+ },
93
+ "typescript_preact_filename": {
94
+ "type": "string",
95
+ "pattern": "^[A-Z][0-9]{3}_[A-Z0-9]+_[0-9]{3}(?:_[a-z0-9_]+)?\\.test\\.ts(x)?$",
96
+ "description": "Preact TypeScript test filename pattern: {WMBT}_{HARNESS}_{NNN}[_{slug_snake}].test.ts[x]",
97
+ "examples": [
98
+ "C004_E2E_019_user_connection.test.ts",
99
+ "C001_WIDGET_001_button.test.tsx"
100
+ ]
101
+ },
102
+ "python_filename": {
103
+ "type": "string",
104
+ "pattern": "^test_[a-z][0-9]{3}_[a-z0-9]+_[0-9]{3}(?:_[a-z0-9_]+)?\\.py$",
105
+ "description": "Python test filename pattern: test_{wmbt_lower}_{harness_lower}_{nnn}[_{slug_snake}].py",
106
+ "examples": [
107
+ "test_c004_e2e_019_user_connection.py",
108
+ "test_p003_unit_042.py"
109
+ ]
110
+ },
111
+ "go_filename": {
112
+ "type": "string",
113
+ "pattern": "^[a-z][0-9]{3}_[a-z0-9]+_[0-9]{3}(?:_[a-z0-9_]+)?_test\\.go$",
114
+ "description": "Go test filename pattern: {wmbt_lower}_{harness_lower}_{nnn}[_{slug_snake}]_test.go",
115
+ "examples": [
116
+ "c004_e2e_019_user_connection_test.go",
117
+ "p003_unit_042_test.go"
118
+ ]
119
+ },
120
+ "java_classname": {
121
+ "type": "string",
122
+ "pattern": "^[A-Z][0-9]{3}[A-Z0-9]+[0-9]{3}(?:[A-Z][a-zA-Z0-9]*)?Test$",
123
+ "description": "Java/Kotlin test classname pattern: {WMBT}{HARNESS}{NNN}{SlugPascal}Test",
124
+ "examples": [
125
+ "C004E2E019UserConnectionTest",
126
+ "P003UNIT042Test"
127
+ ]
128
+ },
129
+ "harness_code": {
130
+ "type": "string",
131
+ "enum": [
132
+ "UNIT", "HTTP", "EVENT", "WS", "E2E", "A11Y", "VIS",
133
+ "METRIC", "JOB", "DB", "SEC", "LOAD", "SCRIPT",
134
+ "WIDGET", "GOLDEN", "BLOC", "INTEGRATION", "RLS",
135
+ "EDGE", "REALTIME", "STORAGE"
136
+ ],
137
+ "description": "Valid test harness codes"
138
+ },
139
+ "wmbt_code": {
140
+ "type": "string",
141
+ "enum": ["D", "L", "P", "C", "E", "M", "Y", "R", "K"],
142
+ "description": "Valid WMBT step codes",
143
+ "x-descriptions": {
144
+ "D": "Derive (Derive Entities)",
145
+ "L": "Launch (Launch Cascade)",
146
+ "P": "Pace (Pace Dilemmas)",
147
+ "C": "Commit (Commit State)",
148
+ "E": "Evaluate (Evaluate Cascade)",
149
+ "M": "Match (Match Priorities)",
150
+ "Y": "Yield (Yield Options)",
151
+ "R": "Resolve (Resolve Dilemmas)",
152
+ "K": "Keep (Keep Momentum)"
153
+ }
154
+ }
155
+ },
156
+ "examples": [
157
+ {
158
+ "urn": "acc:maintain-ux:C004-E2E-019-user-connection",
159
+ "language": "dart",
160
+ "filename": "C004_E2E_019_user_connection_test.dart",
161
+ "components": {
162
+ "wagon": "maintain-ux",
163
+ "WMBT": "C004",
164
+ "HARNESS": "E2E",
165
+ "NNN": "019",
166
+ "slug": "user-connection"
167
+ }
168
+ },
169
+ {
170
+ "urn": "acc:pace-dilemmas:P003-UNIT-042",
171
+ "language": "python",
172
+ "filename": "test_p003_unit_042.py",
173
+ "components": {
174
+ "wagon": "pace-dilemmas",
175
+ "WMBT": "P003",
176
+ "HARNESS": "UNIT",
177
+ "NNN": "042",
178
+ "slug": null
179
+ }
180
+ },
181
+ {
182
+ "urn": "acc:commit-state:D001-HTTP-007-create-endpoint",
183
+ "language": "typescript",
184
+ "filename": "d001-http-007-create-endpoint.test.ts",
185
+ "components": {
186
+ "wagon": "commit-state",
187
+ "WMBT": "D001",
188
+ "HARNESS": "HTTP",
189
+ "NNN": "007",
190
+ "slug": "create-endpoint"
191
+ }
192
+ }
193
+ ]
194
+ }
@@ -0,0 +1,179 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "test_intent.schema.json",
4
+ "title": "Test Intent Structure",
5
+ "description": "Schema for test intent built from acceptance criteria during RED test generation",
6
+ "type": "object",
7
+ "required": [
8
+ "identity",
9
+ "harness",
10
+ "given",
11
+ "when",
12
+ "then",
13
+ "metadata",
14
+ "contract_schema"
15
+ ],
16
+ "properties": {
17
+ "identity": {
18
+ "type": "object",
19
+ "description": "Test identity information",
20
+ "required": ["urn", "id", "phase"],
21
+ "properties": {
22
+ "urn": {
23
+ "type": "string",
24
+ "description": "Unique resource name for the test",
25
+ "pattern": "^acc:"
26
+ },
27
+ "id": {
28
+ "type": "string",
29
+ "description": "Acceptance criteria ID"
30
+ },
31
+ "phase": {
32
+ "type": "string",
33
+ "description": "ATDD phase (RED, GREEN, REFACTOR)",
34
+ "enum": ["RED", "GREEN", "REFACTOR"]
35
+ }
36
+ }
37
+ },
38
+ "harness": {
39
+ "type": "object",
40
+ "description": "Test harness information",
41
+ "required": ["type", "category"],
42
+ "properties": {
43
+ "type": {
44
+ "type": "string",
45
+ "description": "Harness type",
46
+ "enum": [
47
+ "unit", "http", "event", "ws", "e2e", "db",
48
+ "widget", "bloc", "golden", "a11y", "visual",
49
+ "integration", "metric", "job", "load", "sec", "script",
50
+ "rls", "edge_function", "realtime", "storage"
51
+ ]
52
+ },
53
+ "category": {
54
+ "type": "string",
55
+ "description": "Harness category",
56
+ "enum": ["frontend", "backend", "integration"]
57
+ }
58
+ }
59
+ },
60
+ "given": {
61
+ "type": "object",
62
+ "description": "Test preconditions",
63
+ "properties": {
64
+ "auth": {
65
+ "type": ["object", "null"],
66
+ "description": "Authentication setup"
67
+ },
68
+ "data": {
69
+ "type": ["object", "array", "null"],
70
+ "description": "Initial data state"
71
+ },
72
+ "environment": {
73
+ "type": ["object", "null"],
74
+ "description": "Environment configuration"
75
+ }
76
+ }
77
+ },
78
+ "when": {
79
+ "type": "object",
80
+ "description": "Test action",
81
+ "required": ["action"],
82
+ "properties": {
83
+ "action": {
84
+ "type": "string",
85
+ "description": "Action to perform"
86
+ },
87
+ "target": {
88
+ "type": "string",
89
+ "description": "Action target (endpoint, function, component)"
90
+ },
91
+ "parameters": {
92
+ "type": ["object", "array", "null"],
93
+ "description": "Action parameters"
94
+ }
95
+ }
96
+ },
97
+ "then": {
98
+ "type": "object",
99
+ "description": "Expected outcomes",
100
+ "required": ["assertions"],
101
+ "properties": {
102
+ "assertions": {
103
+ "type": "array",
104
+ "description": "List of assertions to verify",
105
+ "items": {
106
+ "type": "string"
107
+ },
108
+ "minItems": 1
109
+ },
110
+ "red_strategy": {
111
+ "type": "string",
112
+ "description": "Strategy for ensuring RED state",
113
+ "enum": ["fail", "throw", "expect_false", "assert_false"]
114
+ }
115
+ }
116
+ },
117
+ "metadata": {
118
+ "type": "object",
119
+ "description": "Test metadata",
120
+ "required": ["wagon", "feature"],
121
+ "properties": {
122
+ "wagon": {
123
+ "type": "string",
124
+ "description": "Wagon name"
125
+ },
126
+ "feature": {
127
+ "type": "string",
128
+ "description": "Feature name"
129
+ },
130
+ "route": {
131
+ "type": "string",
132
+ "description": "Route hint for language detection"
133
+ },
134
+ "filename": {
135
+ "type": "object",
136
+ "description": "URN-based filename metadata (optional, for new approach)",
137
+ "properties": {
138
+ "urn": {
139
+ "type": "string",
140
+ "description": "Acceptance URN for filename generation",
141
+ "pattern": "^acc:([a-z][a-z0-9-]*):([DLPCEMYRK][0-9]{3})-([A-Z0-9]+)-([0-9]{3})(?:-([a-z0-9-]+))?$"
142
+ },
143
+ "language": {
144
+ "type": "string",
145
+ "description": "Target language for filename generation",
146
+ "enum": ["dart", "typescript", "python", "go", "java", "kotlin"]
147
+ },
148
+ "generated_filename": {
149
+ "type": "string",
150
+ "description": "Generated test filename following language conventions"
151
+ },
152
+ "convention_ref": {
153
+ "type": "string",
154
+ "description": "Reference to filename convention",
155
+ "const": "filename.convention.yaml"
156
+ }
157
+ }
158
+ }
159
+ }
160
+ },
161
+ "contract_schema": {
162
+ "type": "object",
163
+ "description": "Contract schema reference for I/O validation",
164
+ "required": ["schema_ref", "version"],
165
+ "properties": {
166
+ "schema_ref": {
167
+ "type": "string",
168
+ "description": "Path to contract schema file",
169
+ "pattern": "^contracts/"
170
+ },
171
+ "version": {
172
+ "type": "string",
173
+ "description": "Schema version",
174
+ "pattern": "^v\\d+$"
175
+ }
176
+ }
177
+ }
178
+ }
179
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "Unit Test Harness Template",
4
+ "description": "Template for unit/component tests",
5
+ "language": "typescript",
6
+ "framework": "vitest",
7
+ "category": "frontend",
8
+ "template": "\ndescribe('{test_name}', () => {{\n let component: {component_name};\n let mockDependencies: any;\n\n beforeEach(() => {{\n mockDependencies = {{\n {mock_setup}\n }};\n component = new {component_name}(mockDependencies);\n }});\n\n it('{acceptance_name}', async () => {{\n // Given\n {given_setup}\n\n // When\n {when_action}\n\n // Then\n {then_assertions}\n }});\n}});\n",
9
+ "variables": [
10
+ "test_name",
11
+ "component_name",
12
+ "mock_setup",
13
+ "acceptance_name",
14
+ "given_setup",
15
+ "when_action",
16
+ "then_assertions"
17
+ ]
18
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "Visual Regression Test Harness Template",
4
+ "description": "Template for visual regression tests",
5
+ "language": "typescript",
6
+ "framework": "playwright",
7
+ "category": "frontend",
8
+ "template": "\n// URN: {urn}\nimport {{ test, expect }} from '@playwright/test';\n\ntest('{test_name}', async ({{ page }}) => {{\n // Given\n await page.goto('{url}');\n {given_setup}\n\n // When\n await page.waitForLoadState('networkidle');\n {when_action}\n\n // Then\n await expect(page).toHaveScreenshot('{snapshot_name}.png', {{\n threshold: {threshold}\n }});\n}});\n",
9
+ "variables": [
10
+ "urn",
11
+ "test_name",
12
+ "url",
13
+ "given_setup",
14
+ "when_action",
15
+ "snapshot_name",
16
+ "threshold"
17
+ ]
18
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "WebSocket Test Harness Template",
4
+ "description": "Template for WebSocket/real-time connection tests",
5
+ "language": "typescript",
6
+ "framework": "ws",
7
+ "category": "backend",
8
+ "template": "\ndescribe('{test_name}', () => {{\n let wsClient: WebSocket;\n let messages: any[] = [];\n\n beforeEach(async () => {{\n wsClient = new WebSocket('{ws_url}');\n wsClient.on('message', (data) => messages.push(JSON.parse(data)));\n await waitForConnection(wsClient);\n }});\n\n afterEach(() => {{\n wsClient.close();\n }});\n\n it('{acceptance_name}', async () => {{\n // Given\n {given_setup}\n\n // When\n wsClient.send(JSON.stringify({ws_message}));\n await waitForMessages(1);\n\n // Then\n {then_assertions}\n }});\n}});\n",
9
+ "variables": [
10
+ "test_name",
11
+ "ws_url",
12
+ "acceptance_name",
13
+ "given_setup",
14
+ "ws_message",
15
+ "then_assertions"
16
+ ]
17
+ }
File without changes