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,273 @@
|
|
|
1
|
+
recipe: design
|
|
2
|
+
pattern: "Design System Build (Composite + Decorator + Strategy + Tokens)"
|
|
3
|
+
category: presentation_design_system
|
|
4
|
+
source: "Design system best practices"
|
|
5
|
+
utils: "design.py"
|
|
6
|
+
|
|
7
|
+
applies_when:
|
|
8
|
+
- "Frontend code with hardcoded spacing/colors/radii"
|
|
9
|
+
- "Repeated Container/button/card patterns detected"
|
|
10
|
+
|
|
11
|
+
smell_indicators:
|
|
12
|
+
- "EdgeInsets.all(16.0) instead of AppSpacing.m"
|
|
13
|
+
- "BorderRadius.circular(8.0) instead of AppRadii.m"
|
|
14
|
+
- "Color(0xFF3B82F6) instead of Theme.of(context).colorScheme.primary"
|
|
15
|
+
- "Repeated Container patterns (potential primitives)"
|
|
16
|
+
- "Repeated button-like widgets (potential components)"
|
|
17
|
+
- "Repeated page layouts (potential templates)"
|
|
18
|
+
|
|
19
|
+
refactoring_steps:
|
|
20
|
+
# STEP 1: Create full design_system structure
|
|
21
|
+
- step: 1
|
|
22
|
+
what: "Create design_system directory structure (all 4 levels)"
|
|
23
|
+
where: "lib/design_system/"
|
|
24
|
+
template: |
|
|
25
|
+
lib/design_system/
|
|
26
|
+
tokens/ # Design tokens (spacing, colors, radii, motion)
|
|
27
|
+
primitives/ # Basic UI elements (boxes, containers, text)
|
|
28
|
+
components/ # Reusable components (buttons, cards, inputs)
|
|
29
|
+
templates/ # Page templates (empty states, list views, detail views)
|
|
30
|
+
verify:
|
|
31
|
+
- run: pytest -xvs tests/design_system/
|
|
32
|
+
expect: GREEN
|
|
33
|
+
|
|
34
|
+
# STEP 2: Extract tokens from hardcoded values
|
|
35
|
+
- step: 2
|
|
36
|
+
what: "Extract hardcoded tokens to design_system/tokens/"
|
|
37
|
+
where: "lib/design_system/tokens/"
|
|
38
|
+
instruction: |
|
|
39
|
+
For each hardcoded value detected by scan_hardcoded_tokens():
|
|
40
|
+
|
|
41
|
+
1. Check if token already exists; if missing, create token file:
|
|
42
|
+
- spacing_tokens.dart: AppSpacing class (xxs, xs, s, m, l, xl, xxl)
|
|
43
|
+
- radii_tokens.dart: AppRadii class (s, m, l)
|
|
44
|
+
- motion_tokens.dart: AppMotion class (fast, base, slow)
|
|
45
|
+
|
|
46
|
+
3. Use semantic naming:
|
|
47
|
+
- 8.0 → AppSpacing.s (small)
|
|
48
|
+
- 16.0 → AppSpacing.m (medium)
|
|
49
|
+
- 24.0 → AppSpacing.l (large)
|
|
50
|
+
|
|
51
|
+
example: |
|
|
52
|
+
// spacing_tokens.dart
|
|
53
|
+
class AppSpacing {
|
|
54
|
+
static const double xxs = 2.0;
|
|
55
|
+
static const double xs = 4.0;
|
|
56
|
+
static const double s = 8.0;
|
|
57
|
+
static const double m = 16.0;
|
|
58
|
+
static const double l = 24.0;
|
|
59
|
+
static const double xl = 32.0;
|
|
60
|
+
static const double xxl = 48.0;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
verify:
|
|
64
|
+
- run: pytest -xvs tests/design_system/tokens/
|
|
65
|
+
expect: GREEN
|
|
66
|
+
|
|
67
|
+
# STEP 3: Detect and extract primitives
|
|
68
|
+
- step: 3
|
|
69
|
+
what: "Detect repeated Container patterns and extract primitives"
|
|
70
|
+
where: "lib/design_system/primitives/"
|
|
71
|
+
instruction: |
|
|
72
|
+
1. Identify repeated Container patterns (3+ occurrences) in the codebase.
|
|
73
|
+
|
|
74
|
+
2. For each candidate (e.g., "AppBox" from repeated styled Containers):
|
|
75
|
+
Create primitive in primitives/:
|
|
76
|
+
- AppBox: Styled Container using AppSpacing, AppRadii tokens
|
|
77
|
+
- AppText: Styled Text using typography tokens
|
|
78
|
+
- AppSpacer: Consistent spacing widget
|
|
79
|
+
|
|
80
|
+
3. Primitives MUST only import from tokens/ (hierarchy rule)
|
|
81
|
+
|
|
82
|
+
example: |
|
|
83
|
+
// app_box.dart
|
|
84
|
+
import '../tokens/spacing_tokens.dart';
|
|
85
|
+
import '../tokens/radii_tokens.dart';
|
|
86
|
+
|
|
87
|
+
class AppBox extends StatelessWidget {
|
|
88
|
+
final Widget child;
|
|
89
|
+
final EdgeInsets? padding;
|
|
90
|
+
final BorderRadius? borderRadius;
|
|
91
|
+
|
|
92
|
+
AppBox({required this.child, this.padding, this.borderRadius});
|
|
93
|
+
|
|
94
|
+
@override
|
|
95
|
+
Widget build(BuildContext context) {
|
|
96
|
+
return Container(
|
|
97
|
+
padding: padding ?? EdgeInsets.all(AppSpacing.m),
|
|
98
|
+
decoration: BoxDecoration(
|
|
99
|
+
borderRadius: borderRadius ?? BorderRadius.circular(AppRadii.m),
|
|
100
|
+
),
|
|
101
|
+
child: child,
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
verify:
|
|
107
|
+
- run: pytest -xvs tests/design_system/primitives/
|
|
108
|
+
expect: GREEN
|
|
109
|
+
|
|
110
|
+
# STEP 4: Detect and extract components
|
|
111
|
+
- step: 4
|
|
112
|
+
what: "Detect repeated button/card patterns and extract components"
|
|
113
|
+
where: "lib/design_system/components/"
|
|
114
|
+
instruction: |
|
|
115
|
+
1. Identify repeated button/card patterns (5+ occurrences) in the codebase.
|
|
116
|
+
|
|
117
|
+
2. For each candidate (e.g., "AppButton" from repeated button patterns):
|
|
118
|
+
Create component in components/:
|
|
119
|
+
- AppButton: Composed from AppBox + AppText + GestureDetector
|
|
120
|
+
- AppCard: Composed from AppBox with elevation/shadow
|
|
121
|
+
- AppInput: Composed from AppBox + TextField
|
|
122
|
+
|
|
123
|
+
3. Components SHOULD compose primitives (not raw widgets)
|
|
124
|
+
- Prefer: AppButton uses AppBox, AppText
|
|
125
|
+
- Avoid: AppButton uses Container, Text directly
|
|
126
|
+
|
|
127
|
+
example: |
|
|
128
|
+
// app_button.dart
|
|
129
|
+
import '../primitives/app_box.dart';
|
|
130
|
+
import '../primitives/app_text.dart';
|
|
131
|
+
|
|
132
|
+
class AppButton extends StatelessWidget {
|
|
133
|
+
final String label;
|
|
134
|
+
final VoidCallback onPressed;
|
|
135
|
+
|
|
136
|
+
AppButton({required this.label, required this.onPressed});
|
|
137
|
+
|
|
138
|
+
@override
|
|
139
|
+
Widget build(BuildContext context) {
|
|
140
|
+
return GestureDetector(
|
|
141
|
+
onTap: onPressed,
|
|
142
|
+
child: AppBox(
|
|
143
|
+
child: AppText(label),
|
|
144
|
+
),
|
|
145
|
+
);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
verify:
|
|
150
|
+
- run: pytest -xvs tests/design_system/components/
|
|
151
|
+
expect: GREEN
|
|
152
|
+
|
|
153
|
+
# STEP 5: Detect and extract templates
|
|
154
|
+
- step: 5
|
|
155
|
+
what: "Detect repeated page layouts and extract templates"
|
|
156
|
+
where: "lib/design_system/templates/"
|
|
157
|
+
instruction: |
|
|
158
|
+
1. Identify repeated multi-component layouts (Icon + Title + Description + Button).
|
|
159
|
+
|
|
160
|
+
2. For each candidate (e.g., "EmptyState" from repeated empty list patterns):
|
|
161
|
+
Create template in templates/:
|
|
162
|
+
- EmptyStateTemplate: Icon + Title + Description + Action button
|
|
163
|
+
- ListViewTemplate: Scrollable list with header/footer
|
|
164
|
+
- DetailViewTemplate: Hero image + content sections
|
|
165
|
+
|
|
166
|
+
3. Templates SHOULD compose components (not primitives directly)
|
|
167
|
+
- Prefer: EmptyState uses AppButton, AppText
|
|
168
|
+
- Avoid: EmptyState uses AppBox directly
|
|
169
|
+
|
|
170
|
+
example: |
|
|
171
|
+
// empty_state_template.dart
|
|
172
|
+
import '../components/app_button.dart';
|
|
173
|
+
import '../primitives/app_text.dart';
|
|
174
|
+
|
|
175
|
+
class EmptyStateTemplate extends StatelessWidget {
|
|
176
|
+
final IconData icon;
|
|
177
|
+
final String title;
|
|
178
|
+
final String description;
|
|
179
|
+
final String actionLabel;
|
|
180
|
+
final VoidCallback onAction;
|
|
181
|
+
|
|
182
|
+
EmptyStateTemplate({
|
|
183
|
+
required this.icon,
|
|
184
|
+
required this.title,
|
|
185
|
+
required this.description,
|
|
186
|
+
required this.actionLabel,
|
|
187
|
+
required this.onAction,
|
|
188
|
+
});
|
|
189
|
+
|
|
190
|
+
@override
|
|
191
|
+
Widget build(BuildContext context) {
|
|
192
|
+
return Column(
|
|
193
|
+
mainAxisAlignment: MainAxisAlignment.center,
|
|
194
|
+
children: [
|
|
195
|
+
Icon(icon, size: 64),
|
|
196
|
+
SizedBox(height: AppSpacing.l),
|
|
197
|
+
AppText(title, style: TitleStyle()),
|
|
198
|
+
SizedBox(height: AppSpacing.s),
|
|
199
|
+
AppText(description, style: BodyStyle()),
|
|
200
|
+
SizedBox(height: AppSpacing.l),
|
|
201
|
+
AppButton(label: actionLabel, onPressed: onAction),
|
|
202
|
+
],
|
|
203
|
+
);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
verify:
|
|
208
|
+
- run: pytest -xvs tests/design_system/templates/
|
|
209
|
+
expect: GREEN
|
|
210
|
+
|
|
211
|
+
# STEP 6: Refactor presentation to use design_system (all levels)
|
|
212
|
+
- step: 6
|
|
213
|
+
what: "Refactor presentation to use design_system (tokens, primitives, components, templates)"
|
|
214
|
+
where: "presentation/"
|
|
215
|
+
before: |
|
|
216
|
+
// Hardcoded values and duplicated widgets
|
|
217
|
+
Container(
|
|
218
|
+
padding: EdgeInsets.all(16.0),
|
|
219
|
+
decoration: BoxDecoration(
|
|
220
|
+
borderRadius: BorderRadius.circular(8.0),
|
|
221
|
+
),
|
|
222
|
+
child: Text("Hello"),
|
|
223
|
+
)
|
|
224
|
+
|
|
225
|
+
// Repeated button pattern
|
|
226
|
+
GestureDetector(
|
|
227
|
+
onTap: () {},
|
|
228
|
+
child: Container(/* styled */),
|
|
229
|
+
)
|
|
230
|
+
after: |
|
|
231
|
+
import 'package:app/design_system/primitives/app_box.dart';
|
|
232
|
+
import 'package:app/design_system/primitives/app_text.dart';
|
|
233
|
+
import 'package:app/design_system/components/app_button.dart';
|
|
234
|
+
import 'package:app/design_system/templates/empty_state_template.dart';
|
|
235
|
+
|
|
236
|
+
// Use primitives
|
|
237
|
+
AppBox(
|
|
238
|
+
child: AppText("Hello"),
|
|
239
|
+
)
|
|
240
|
+
|
|
241
|
+
// Use components
|
|
242
|
+
AppButton(label: "Click me", onPressed: () {})
|
|
243
|
+
|
|
244
|
+
// Use templates
|
|
245
|
+
EmptyStateTemplate(
|
|
246
|
+
icon: Icons.inbox,
|
|
247
|
+
title: "No items",
|
|
248
|
+
description: "Add your first item",
|
|
249
|
+
actionLabel: "Add Item",
|
|
250
|
+
onAction: () {},
|
|
251
|
+
)
|
|
252
|
+
verify:
|
|
253
|
+
- run: pytest -xvs
|
|
254
|
+
expect: GREEN
|
|
255
|
+
|
|
256
|
+
final_verify:
|
|
257
|
+
- "Hierarchy valid: tokens ← primitives ← components ← templates"
|
|
258
|
+
- "Wagons import from design_system only (no reverse imports)"
|
|
259
|
+
- "All tests GREEN"
|
|
260
|
+
- "Coverage maintained or improved"
|
|
261
|
+
- "Primitives use tokens (not hardcoded values)"
|
|
262
|
+
- "Components use primitives (not raw widgets)"
|
|
263
|
+
- "Templates use components (not primitives directly)"
|
|
264
|
+
|
|
265
|
+
related_patterns:
|
|
266
|
+
- "Composite: Hierarchical tree structure (tokens → primitives → components → templates)"
|
|
267
|
+
- "Strategy: Theme/variant selection (light/dark, responsive)"
|
|
268
|
+
- "Decorator: Behavior wrapping for styled components"
|
|
269
|
+
- "RF-DS-TOKEN (DS-001-004): Token detection and extraction"
|
|
270
|
+
- "RF-DS-PRIMITIVE (DS-005-007): Primitive detection and validation"
|
|
271
|
+
- "RF-DS-COMPONENT (DS-008-011): Component detection and composition"
|
|
272
|
+
- "RF-DS-TEMPLATE (DS-012-014): Template detection and composition"
|
|
273
|
+
- "RF-DS-HIERARCHY (DS-015-017): Hierarchy validation"
|