sdd-full 4.6.2 → 4.8.0

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 (173) hide show
  1. package/bin.js +1 -1
  2. package/package.json +1 -1
  3. package/skills/.agents/skills/flutter-add-integration-test/SKILL.md +165 -0
  4. package/skills/.agents/skills/flutter-add-widget-preview/SKILL.md +147 -0
  5. package/skills/.agents/skills/flutter-add-widget-test/SKILL.md +156 -0
  6. package/skills/.agents/skills/flutter-apply-architecture-best-practices/SKILL.md +164 -0
  7. package/skills/.agents/skills/flutter-build-responsive-layout/SKILL.md +141 -0
  8. package/skills/.agents/skills/flutter-fix-layout-issues/SKILL.md +132 -0
  9. package/skills/.agents/skills/flutter-implement-json-serialization/SKILL.md +155 -0
  10. package/skills/.agents/skills/flutter-setup-declarative-routing/SKILL.md +257 -0
  11. package/skills/.agents/skills/flutter-setup-localization/SKILL.md +212 -0
  12. package/skills/.agents/skills/flutter-use-http-package/SKILL.md +177 -0
  13. package/skills/VERSION.md +176 -62
  14. package/skills/design-planning/ai-coding-rules/SKILL.md +5 -13
  15. package/skills/design-planning/design-to-code/SKILL.md +5 -14
  16. package/skills/design-planning/enterprise-spec/SKILL.md +5 -13
  17. package/skills/design-planning/flutter-av/SKILL.md +5 -16
  18. package/skills/design-planning/flutter-map/SKILL.md +5 -14
  19. package/skills/design-planning/function-sdd/SKILL.md +5 -13
  20. package/skills/design-planning/global-overlay-stack-standard/SKILL.md +73 -0
  21. package/skills/design-planning/ui-motion-interaction-standard/SKILL.md +69 -0
  22. package/skills/design-planning/ui-sdd-specialized/SKILL.md +5 -14
  23. package/skills/development-execution/flutter-errors/SKILL.md +5 -15
  24. package/skills/flutter-skills/.github/dependabot.yaml +15 -0
  25. package/skills/flutter-skills/.github/workflows/dart_skills_lint_workflow.yaml +68 -0
  26. package/skills/flutter-skills/.github/workflows/skills_tool.yaml +51 -0
  27. package/skills/flutter-skills/CODE_OF_CONDUCT.md +3 -0
  28. package/skills/flutter-skills/CONTRIBUTING.md +36 -0
  29. package/skills/flutter-skills/LICENSE +26 -0
  30. package/skills/flutter-skills/README.md +50 -0
  31. package/skills/flutter-skills/pubspec.yaml +9 -0
  32. package/skills/flutter-skills/resources/flutter_skills.yaml +434 -0
  33. package/skills/flutter-skills/skills/flutter-add-integration-test/SKILL.md +163 -0
  34. package/skills/flutter-skills/skills/flutter-add-widget-preview/SKILL.md +145 -0
  35. package/skills/flutter-skills/skills/flutter-add-widget-test/SKILL.md +154 -0
  36. package/skills/flutter-skills/skills/flutter-apply-architecture-best-practices/SKILL.md +162 -0
  37. package/skills/flutter-skills/skills/flutter-build-responsive-layout/SKILL.md +139 -0
  38. package/skills/flutter-skills/skills/flutter-fix-layout-issues/SKILL.md +130 -0
  39. package/skills/flutter-skills/skills/flutter-implement-json-serialization/SKILL.md +153 -0
  40. package/skills/flutter-skills/skills/flutter-setup-declarative-routing/SKILL.md +255 -0
  41. package/skills/flutter-skills/skills/flutter-setup-localization/SKILL.md +210 -0
  42. package/skills/flutter-skills/skills/flutter-use-http-package/SKILL.md +175 -0
  43. package/skills/flutter-skills/tool/dart_skills_lint/.agents/skills/add-dart-lint-validation-rule/SKILL.md +196 -0
  44. package/skills/flutter-skills/tool/dart_skills_lint/.agents/skills/dart-best-practices/SKILL.md +65 -0
  45. package/skills/flutter-skills/tool/dart_skills_lint/.agents/skills/dart-checks-migration/SKILL.md +158 -0
  46. package/skills/flutter-skills/tool/dart_skills_lint/.agents/skills/dart-cli-app-best-practices/SKILL.md +168 -0
  47. package/skills/flutter-skills/tool/dart_skills_lint/.agents/skills/dart-doc-validation/SKILL.md +87 -0
  48. package/skills/flutter-skills/tool/dart_skills_lint/.agents/skills/dart-long-lines/SKILL.md +101 -0
  49. package/skills/flutter-skills/tool/dart_skills_lint/.agents/skills/dart-matcher-best-practices/SKILL.md +136 -0
  50. package/skills/flutter-skills/tool/dart_skills_lint/.agents/skills/dart-modern-features/SKILL.md +266 -0
  51. package/skills/flutter-skills/tool/dart_skills_lint/.agents/skills/dart-package-maintenance/SKILL.md +92 -0
  52. package/skills/flutter-skills/tool/dart_skills_lint/.agents/skills/dart-test-coverage/SKILL.md +92 -0
  53. package/skills/flutter-skills/tool/dart_skills_lint/.agents/skills/dart-test-coverage/example/lib/src/calculator.dart +7 -0
  54. package/skills/flutter-skills/tool/dart_skills_lint/.agents/skills/dart-test-coverage/example/pubspec.yaml +8 -0
  55. package/skills/flutter-skills/tool/dart_skills_lint/.agents/skills/dart-test-coverage/example/test/calculator_test.dart +11 -0
  56. package/skills/flutter-skills/tool/dart_skills_lint/.agents/skills/dart-test-coverage/scripts/interpret_coverage.dart +95 -0
  57. package/skills/flutter-skills/tool/dart_skills_lint/.agents/skills/dart-test-coverage/scripts/pubspec.yaml +6 -0
  58. package/skills/flutter-skills/tool/dart_skills_lint/.agents/skills/dart-test-coverage/scripts/test/interpret_coverage_test.dart +93 -0
  59. package/skills/flutter-skills/tool/dart_skills_lint/.agents/skills/dart-test-fundamentals/SKILL.md +173 -0
  60. package/skills/flutter-skills/tool/dart_skills_lint/.agents/skills/definition-of-done/SKILL.md +27 -0
  61. package/skills/flutter-skills/tool/dart_skills_lint/.agents/skills/flutter_skills_ignore.json +3 -0
  62. package/skills/flutter-skills/tool/dart_skills_lint/.agents/skills/grill-me/SKILL.md +10 -0
  63. package/skills/flutter-skills/tool/dart_skills_lint/.agents/skills/ignore.json +3 -0
  64. package/skills/flutter-skills/tool/dart_skills_lint/.agents/skills/test-driven-development/SKILL.md +371 -0
  65. package/skills/flutter-skills/tool/dart_skills_lint/.agents/skills/test-driven-development/testing-anti-patterns.md +299 -0
  66. package/skills/flutter-skills/tool/dart_skills_lint/AUTHORS +7 -0
  67. package/skills/flutter-skills/tool/dart_skills_lint/CHANGELOG.md +12 -0
  68. package/skills/flutter-skills/tool/dart_skills_lint/CONTRIBUTING.md +51 -0
  69. package/skills/flutter-skills/tool/dart_skills_lint/LICENSE +27 -0
  70. package/skills/flutter-skills/tool/dart_skills_lint/README.md +203 -0
  71. package/skills/flutter-skills/tool/dart_skills_lint/analysis_options.yaml +296 -0
  72. package/skills/flutter-skills/tool/dart_skills_lint/bench/README.md +23 -0
  73. package/skills/flutter-skills/tool/dart_skills_lint/bench/baseline_throughput.dart +230 -0
  74. package/skills/flutter-skills/tool/dart_skills_lint/bin/cli.dart +10 -0
  75. package/skills/flutter-skills/tool/dart_skills_lint/dart_skills_lint.yaml +14 -0
  76. package/skills/flutter-skills/tool/dart_skills_lint/documentation/feature_design_docs/PRODUCTION_READYNESS.md +48 -0
  77. package/skills/flutter-skills/tool/dart_skills_lint/documentation/feature_design_docs/completion_migration_plan.md +99 -0
  78. package/skills/flutter-skills/tool/dart_skills_lint/documentation/feature_design_docs/legacy_patterns_report.md +110 -0
  79. package/skills/flutter-skills/tool/dart_skills_lint/documentation/feature_design_docs/pub_vs_skill_report.md +56 -0
  80. package/skills/flutter-skills/tool/dart_skills_lint/documentation/knowledge/SPECIFICATION.md +79 -0
  81. package/skills/flutter-skills/tool/dart_skills_lint/documentation/knowledge/architecture_overview.md +64 -0
  82. package/skills/flutter-skills/tool/dart_skills_lint/lib/dart_skills_lint.dart +11 -0
  83. package/skills/flutter-skills/tool/dart_skills_lint/lib/src/config_parser.dart +156 -0
  84. package/skills/flutter-skills/tool/dart_skills_lint/lib/src/entry_point.dart +354 -0
  85. package/skills/flutter-skills/tool/dart_skills_lint/lib/src/fixable_rule.dart +20 -0
  86. package/skills/flutter-skills/tool/dart_skills_lint/lib/src/models/analysis_severity.dart +15 -0
  87. package/skills/flutter-skills/tool/dart_skills_lint/lib/src/models/check_type.dart +17 -0
  88. package/skills/flutter-skills/tool/dart_skills_lint/lib/src/models/ignore_entry.dart +34 -0
  89. package/skills/flutter-skills/tool/dart_skills_lint/lib/src/models/ignore_entry.g.dart +19 -0
  90. package/skills/flutter-skills/tool/dart_skills_lint/lib/src/models/skill_context.dart +27 -0
  91. package/skills/flutter-skills/tool/dart_skills_lint/lib/src/models/skill_rule.dart +27 -0
  92. package/skills/flutter-skills/tool/dart_skills_lint/lib/src/models/skills_ignores.dart +26 -0
  93. package/skills/flutter-skills/tool/dart_skills_lint/lib/src/models/skills_ignores.g.dart +24 -0
  94. package/skills/flutter-skills/tool/dart_skills_lint/lib/src/models/validation_error.dart +31 -0
  95. package/skills/flutter-skills/tool/dart_skills_lint/lib/src/rule_registry.dart +79 -0
  96. package/skills/flutter-skills/tool/dart_skills_lint/lib/src/rules/absolute_paths_rule.dart +74 -0
  97. package/skills/flutter-skills/tool/dart_skills_lint/lib/src/rules/description_length_rule.dart +49 -0
  98. package/skills/flutter-skills/tool/dart_skills_lint/lib/src/rules/disallowed_field_rule.dart +61 -0
  99. package/skills/flutter-skills/tool/dart_skills_lint/lib/src/rules/name_format_rule.dart +167 -0
  100. package/skills/flutter-skills/tool/dart_skills_lint/lib/src/rules/relative_paths_rule.dart +72 -0
  101. package/skills/flutter-skills/tool/dart_skills_lint/lib/src/rules/trailing_whitespace_rule.dart +93 -0
  102. package/skills/flutter-skills/tool/dart_skills_lint/lib/src/rules/valid_yaml_metadata_rule.dart +74 -0
  103. package/skills/flutter-skills/tool/dart_skills_lint/lib/src/skills_ignores_storage.dart +36 -0
  104. package/skills/flutter-skills/tool/dart_skills_lint/lib/src/validation_session.dart +559 -0
  105. package/skills/flutter-skills/tool/dart_skills_lint/lib/src/validator.dart +238 -0
  106. package/skills/flutter-skills/tool/dart_skills_lint/pubspec.yaml +28 -0
  107. package/skills/flutter-skills/tool/dart_skills_lint/skills/README.md +10 -0
  108. package/skills/flutter-skills/tool/dart_skills_lint/skills/dart-skills-lint-validation/SKILL.md +195 -0
  109. package/skills/flutter-skills/tool/dart_skills_lint/skills-lock.json +75 -0
  110. package/skills/flutter-skills/tool/dart_skills_lint/test/absolute_paths_test.dart +167 -0
  111. package/skills/flutter-skills/tool/dart_skills_lint/test/cli_integration_test.dart +683 -0
  112. package/skills/flutter-skills/tool/dart_skills_lint/test/config_file_test.dart +292 -0
  113. package/skills/flutter-skills/tool/dart_skills_lint/test/custom_rule_test.dart +122 -0
  114. package/skills/flutter-skills/tool/dart_skills_lint/test/directory_structure_test.dart +163 -0
  115. package/skills/flutter-skills/tool/dart_skills_lint/test/field_constraints_test.dart +178 -0
  116. package/skills/flutter-skills/tool/dart_skills_lint/test/fixer_test.dart +172 -0
  117. package/skills/flutter-skills/tool/dart_skills_lint/test/ignore_models_test.dart +63 -0
  118. package/skills/flutter-skills/tool/dart_skills_lint/test/metadata_validation_test.dart +116 -0
  119. package/skills/flutter-skills/tool/dart_skills_lint/test/relative_path_flag_test.dart +70 -0
  120. package/skills/flutter-skills/tool/dart_skills_lint/test/relative_paths_test.dart +172 -0
  121. package/skills/flutter-skills/tool/dart_skills_lint/test/resolve_rules_test.dart +82 -0
  122. package/skills/flutter-skills/tool/dart_skills_lint/test/rule_naming_test.dart +29 -0
  123. package/skills/flutter-skills/tool/dart_skills_lint/test/skills_ignores_storage_test.dart +89 -0
  124. package/skills/flutter-skills/tool/dart_skills_lint/test/test_utils.dart +19 -0
  125. package/skills/flutter-skills/tool/dart_skills_lint/test/trailing_whitespace_test.dart +152 -0
  126. package/skills/flutter-skills/tool/generator/README.md +150 -0
  127. package/skills/flutter-skills/tool/generator/analysis_options.yaml +143 -0
  128. package/skills/flutter-skills/tool/generator/bin/skills.dart +73 -0
  129. package/skills/flutter-skills/tool/generator/lib/src/commands/base_skill_command.dart +87 -0
  130. package/skills/flutter-skills/tool/generator/lib/src/commands/base_yaml_command.dart +83 -0
  131. package/skills/flutter-skills/tool/generator/lib/src/commands/generate_skill_command.dart +92 -0
  132. package/skills/flutter-skills/tool/generator/lib/src/commands/update_readme_command.dart +150 -0
  133. package/skills/flutter-skills/tool/generator/lib/src/commands/update_skill_command.dart +97 -0
  134. package/skills/flutter-skills/tool/generator/lib/src/commands/validate_skill_command.dart +284 -0
  135. package/skills/flutter-skills/tool/generator/lib/src/models/skill_params.dart +41 -0
  136. package/skills/flutter-skills/tool/generator/lib/src/services/gemini_service.dart +310 -0
  137. package/skills/flutter-skills/tool/generator/lib/src/services/markdown_converter.dart +226 -0
  138. package/skills/flutter-skills/tool/generator/lib/src/services/prompts.dart +72 -0
  139. package/skills/flutter-skills/tool/generator/lib/src/services/resource_fetcher_service.dart +84 -0
  140. package/skills/flutter-skills/tool/generator/lib/src/services/skill_instructions.dart +30 -0
  141. package/skills/flutter-skills/tool/generator/pubspec.yaml +32 -0
  142. package/skills/flutter-skills/tool/generator/test/commands/base_skill_command_test.dart +131 -0
  143. package/skills/flutter-skills/tool/generator/test/commands/validate_skills_input_test.dart +263 -0
  144. package/skills/flutter-skills/tool/generator/test/custom_skill_rules/last_modified_rule.dart +32 -0
  145. package/skills/flutter-skills/tool/generator/test/generate_skills_retry_test.dart +105 -0
  146. package/skills/flutter-skills/tool/generator/test/generate_skills_test.dart +519 -0
  147. package/skills/flutter-skills/tool/generator/test/lint_skills_test.dart +34 -0
  148. package/skills/flutter-skills/tool/generator/test/markdown_converter_test.dart +103 -0
  149. package/skills/flutter-skills/tool/generator/test/markdown_table_test.dart +131 -0
  150. package/skills/flutter-skills/tool/generator/test/models/skill_params_test.dart +37 -0
  151. package/skills/flutter-skills/tool/generator/test/services/gemini_service_test.dart +291 -0
  152. package/skills/flutter-skills/tool/generator/test/services/markdown_converter_test.dart +156 -0
  153. package/skills/flutter-skills/tool/generator/test/services/resource_fetcher_service_test.dart +188 -0
  154. package/skills/flutter-skills/tool/generator/test/update_skills_test.dart +241 -0
  155. package/skills/flutter-skills/tool/generator/test/validate_skills_test.dart +728 -0
  156. package/skills/quality-assurance/bdd-acceptance/SKILL.md +5 -14
  157. package/skills/quality-assurance/flutter-test/SKILL.md +5 -16
  158. package/skills/rules/project_rules.md +538 -127
  159. package/skills/special-tools/env-check/SKILL.md +5 -13
  160. package/skills/special-tools/ios-full-auto-debug/SKILL.md +5 -15
  161. package/skills/writing-skills/SKILL.md +654 -0
  162. package/skills/writing-skills/anthropic-best-practices.md +1149 -0
  163. package/skills/writing-skills/examples/CLAUDE_MD_TESTING.md +189 -0
  164. package/skills/writing-skills/graphviz-conventions.dot +172 -0
  165. package/skills/writing-skills/persuasion-principles.md +187 -0
  166. package/skills/writing-skills/render-graphs.js +168 -0
  167. package/skills/writing-skills/testing-skills-with-subagents.md +384 -0
  168. package/skills/checklist.md +0 -154
  169. package/skills/rules/user_rules.md +0 -263
  170. package/skills//345/256/214/346/225/264/345/274/200/345/217/221/346/265/201/347/250/213/346/211/213/345/206/214.md +0 -454
  171. package/skills//346/212/200/350/203/275/344/275/223/347/263/273/345/256/214/345/226/204/345/273/272/350/256/256.md +0 -308
  172. package/skills//346/212/200/350/203/275/344/275/277/347/224/250/346/214/207/345/215/227.md +0 -309
  173. package/skills//346/212/200/350/203/275/345/206/263/347/255/226/346/240/221.md +0 -338
@@ -0,0 +1,212 @@
1
+ 【claude code调用标识:flutter-setup-localization】【trae调用标识:flutter-setup-localization+Flutter开发】【流程场景:1.完整3阶段SDD流程、3.小型功能迭代】
2
+
3
+ ---
4
+ name: flutter-setup-localization
5
+ description: Add `flutter_localizations` and `intl` dependencies, enable "generate true" in `pubspec.yaml`, and create an `l10n.yaml` configuration file. Use when initializing localization support for a new Flutter project.
6
+ metadata:
7
+ model: models/gemini-3.1-pro-preview
8
+ last_modified: Tue, 21 Apr 2026 21:27:35 GMT
9
+ ---
10
+ # Internationalizing Flutter Applications
11
+
12
+ ## Contents
13
+ - [Core Concepts](#core-concepts)
14
+ - [Setup Workflow](#setup-workflow)
15
+ - [Implementation Workflow](#implementation-workflow)
16
+ - [Advanced Formatting](#advanced-formatting)
17
+ - [Examples](#examples)
18
+
19
+ ## Core Concepts
20
+ Flutter handles internationalization (i18n) and localization (l10n) via the `flutter_localizations` and `intl` packages. The standard approach uses App Resource Bundle (`.arb`) files to define localized strings, which are then compiled into a generated `AppLocalizations` class for type-safe access within the widget tree.
21
+
22
+ ## Setup Workflow
23
+
24
+ Copy and track this checklist when initializing internationalization in a Flutter project:
25
+
26
+ - [ ] **Task Progress**
27
+ - [ ] 1. Add dependencies to `pubspec.yaml`.
28
+ - [ ] 2. Enable the `generate` flag.
29
+ - [ ] 3. Create the `l10n.yaml` configuration file.
30
+ - [ ] 4. Configure `MaterialApp` or `CupertinoApp`.
31
+
32
+ ### 1. Add Dependencies
33
+ Add the required localization packages to the project. Execute the following commands in the terminal:
34
+ ```bash
35
+ flutter pub add flutter_localizations --sdk=flutter
36
+ flutter pub add intl:any
37
+ ```
38
+
39
+ Verify your `pubspec.yaml` includes the following under `dependencies`:
40
+ ```yaml
41
+ dependencies:
42
+ flutter:
43
+ sdk: flutter
44
+ flutter_localizations:
45
+ sdk: flutter
46
+ intl: any
47
+ ```
48
+
49
+ ### 2. Enable Code Generation
50
+ Open `pubspec.yaml` and enable the `generate` flag within the `flutter` section to automate localization tasks:
51
+ ```yaml
52
+ flutter:
53
+ generate: true
54
+ ```
55
+
56
+ ### 3. Create Configuration File
57
+ Create a new file named `l10n.yaml` in the root directory of the Flutter project. Define the input directory, template file, and output file:
58
+ ```yaml
59
+ arb-dir: lib/l10n
60
+ template-arb-file: app_en.arb
61
+ output-localization-file: app_localizations.dart
62
+ synthetic-package: true
63
+ ```
64
+
65
+ ### 4. Configure the App Entry Point
66
+ Import the generated localizations and the `flutter_localizations` library in your `main.dart`. Inject the delegates and supported locales into your `MaterialApp` or `CupertinoApp`.
67
+
68
+ ```dart
69
+ import 'package:flutter_localizations/flutter_localizations.dart';
70
+ import 'package:flutter_gen/gen_l10n/app_localizations.dart'; // Adjust path if synthetic-package is false
71
+
72
+ // ... inside build method
73
+ return MaterialApp(
74
+ localizationsDelegates: const [
75
+ AppLocalizations.delegate,
76
+ GlobalMaterialLocalizations.delegate,
77
+ GlobalWidgetsLocalizations.delegate,
78
+ GlobalCupertinoLocalizations.delegate,
79
+ ],
80
+ supportedLocales: const [
81
+ Locale('en'), // English
82
+ Locale('es'), // Spanish
83
+ ],
84
+ home: const MyHomePage(),
85
+ );
86
+ ```
87
+
88
+ ## Implementation Workflow
89
+
90
+ Follow this workflow when adding or modifying localized content.
91
+
92
+ ### 1. Define ARB Files
93
+ * **If creating NEW content:** Add the base string to the template file (`lib/l10n/app_en.arb`). Include a description for context.
94
+ * **If EDITING existing content:** Locate the key in all supported `.arb` files and update the values.
95
+
96
+ ```json
97
+ {
98
+ "helloWorld": "Hello World!",
99
+ "@helloWorld": {
100
+ "description": "The conventional newborn programmer greeting"
101
+ }
102
+ }
103
+ ```
104
+
105
+ Create corresponding files for other locales (e.g., `app_es.arb`):
106
+ ```json
107
+ {
108
+ "helloWorld": "¡Hola Mundo!"
109
+ }
110
+ ```
111
+
112
+ ### 2. Generate Localization Classes
113
+ Run the following command to trigger code generation:
114
+ ```bash
115
+ flutter pub get
116
+ ```
117
+ *Feedback Loop:* Run validator -> review terminal output for ARB syntax errors -> fix missing commas or mismatched placeholders -> re-run `flutter pub get`.
118
+
119
+ ### 3. Consume Localized Strings
120
+ Access the localized strings in your widget tree using `AppLocalizations.of(context)`. Ensure the widget calling this is a descendant of `MaterialApp`.
121
+
122
+ ```dart
123
+ Text(AppLocalizations.of(context)!.helloWorld)
124
+ ```
125
+
126
+ ## Advanced Formatting
127
+
128
+ Use placeholders for dynamic data, plurals, and conditional selects.
129
+
130
+ ### Placeholders
131
+ Define parameters within curly braces and specify their type in the metadata object.
132
+ ```json
133
+ "hello": "Hello {userName}",
134
+ "@hello": {
135
+ "description": "A message with a single parameter",
136
+ "placeholders": {
137
+ "userName": {
138
+ "type": "String",
139
+ "example": "Bob"
140
+ }
141
+ }
142
+ }
143
+ ```
144
+
145
+ ### Plurals
146
+ Use the `plural` syntax to handle quantity-based string variations. The `other` case is mandatory.
147
+ ```json
148
+ "nWombats": "{count, plural, =0{no wombats} =1{1 wombat} other{{count} wombats}}",
149
+ "@nWombats": {
150
+ "description": "A plural message",
151
+ "placeholders": {
152
+ "count": {
153
+ "type": "num",
154
+ "format": "compact"
155
+ }
156
+ }
157
+ }
158
+ ```
159
+
160
+ ### Selects
161
+ Use the `select` syntax for conditional strings, such as gendered text.
162
+ ```json
163
+ "pronoun": "{gender, select, male{he} female{she} other{they}}",
164
+ "@pronoun": {
165
+ "description": "A gendered message",
166
+ "placeholders": {
167
+ "gender": {
168
+ "type": "String"
169
+ }
170
+ }
171
+ }
172
+ ```
173
+
174
+ ## Examples
175
+
176
+ ### Complete `l10n.yaml`
177
+ ```yaml
178
+ arb-dir: lib/l10n
179
+ template-arb-file: app_en.arb
180
+ output-localization-file: app_localizations.dart
181
+ synthetic-package: true
182
+ use-escaping: true
183
+ ```
184
+
185
+ ### Complete Widget Implementation
186
+ ```dart
187
+ import 'package:flutter/material.dart';
188
+ import 'package:flutter_gen/gen_l10n/app_localizations.dart';
189
+
190
+ class GreetingWidget extends StatelessWidget {
191
+ final String userName;
192
+ final int notificationCount;
193
+
194
+ const GreetingWidget({
195
+ super.key,
196
+ required this.userName,
197
+ required this.notificationCount,
198
+ });
199
+
200
+ @override
201
+ Widget build(BuildContext context) {
202
+ final l10n = AppLocalizations.of(context)!;
203
+
204
+ return Column(
205
+ children: [
206
+ Text(l10n.hello(userName)),
207
+ Text(l10n.nWombats(notificationCount)),
208
+ ],
209
+ );
210
+ }
211
+ }
212
+ ```
@@ -0,0 +1,177 @@
1
+ 【claude code调用标识:flutter-use-http-package】【trae调用标识:flutter-use-http-package+Flutter开发】【流程场景:1.完整3阶段SDD流程、3.小型功能迭代】
2
+
3
+ ---
4
+ name: flutter-use-http-package
5
+ description: Use the `http` package to execute GET, POST, PUT, or DELETE requests. Use when you need to fetch from or send data to a REST API.
6
+ metadata:
7
+ model: models/gemini-3.1-pro-preview
8
+ last_modified: Tue, 21 Apr 2026 21:36:42 GMT
9
+ ---
10
+ # Implementing Flutter Networking
11
+
12
+ ## Contents
13
+ - [Configuration & Permissions](#configuration--permissions)
14
+ - [Request Execution & Response Handling](#request-execution--response-handling)
15
+ - [Background Parsing](#background-parsing)
16
+ - [Workflow: Executing Network Operations](#workflow-executing-network-operations)
17
+ - [Examples](#examples)
18
+
19
+ ## Configuration & Permissions
20
+
21
+ Configure the environment and platform-specific permissions required for network access.
22
+
23
+ 1. Add the `http` package dependency via the terminal:
24
+ ```bash
25
+ flutter pub add http
26
+ ```
27
+ 2. Import the package in your Dart files:
28
+ ```dart
29
+ import 'package:http/http.dart' as http;
30
+ ```
31
+ 3. Configure Android permissions by adding the Internet permission to `android/app/src/main/AndroidManifest.xml`:
32
+ ```xml
33
+ <uses-permission android:name="android.permission.INTERNET" />
34
+ ```
35
+ 4. Configure macOS entitlements by adding the network client key to both `macos/Runner/DebugProfile.entitlements` and `macos/Runner/Release.entitlements`:
36
+ ```xml
37
+ <key>com.apple.security.network.client</key>
38
+ <true/>
39
+ ```
40
+
41
+ ## Request Execution & Response Handling
42
+
43
+ Execute HTTP operations and map responses to strongly typed Dart objects.
44
+
45
+ * **URIs:** Always parse URL strings using `Uri.parse('your_url')`.
46
+ * **Headers:** Inject authorization and content-type headers via the `headers` parameter map. Use `HttpHeaders.authorizationHeader` for auth tokens.
47
+ * **Payloads:** For POST and PUT requests, encode the body using `jsonEncode()` from `dart:convert`.
48
+ * **Status Validation:** Evaluate `response.statusCode`. Treat `200 OK` (GET/PUT/DELETE) and `201 CREATED` (POST) as success.
49
+ * **Error Handling:** Throw explicit exceptions for non-success status codes. Never return `null` on failure, as this prevents `FutureBuilder` from triggering its error state and causes infinite loading indicators.
50
+ * **Deserialization:** Parse the raw string using `jsonDecode(response.body)` and map it to a custom Dart object using a factory constructor (e.g., `fromJson`).
51
+
52
+ ## Background Parsing
53
+
54
+ Offload expensive JSON parsing to a separate Isolate to prevent UI jank (frame drops).
55
+
56
+ * Import `package:flutter/foundation.dart`.
57
+ * Use the `compute()` function to run the parsing logic in a background isolate.
58
+ * Ensure the parsing function passed to `compute()` is a top-level function or a static method, as closures or instance methods cannot be passed across isolates.
59
+
60
+ ## Workflow: Executing Network Operations
61
+
62
+ Use the following checklist to implement and validate network operations.
63
+
64
+ **Task Progress:**
65
+ - [ ] 1. Define the strongly typed Dart model with a `fromJson` factory constructor.
66
+ - [ ] 2. Implement the network request method returning a `Future<Model>`.
67
+ - [ ] 3. Apply conditional logic based on the operation type:
68
+ - **If fetching data (GET):** Append query parameters to the URI.
69
+ - **If mutating data (POST/PUT):** Set `'Content-Type': 'application/json; charset=UTF-8'` and attach the `jsonEncode` body.
70
+ - **If deleting data (DELETE):** Return an empty model instance on success (`200 OK`).
71
+ - [ ] 4. Validate the `statusCode` and throw an `Exception` on failure.
72
+ - [ ] 5. Integrate the `Future` into the UI using `FutureBuilder`.
73
+ - [ ] 6. Handle `snapshot.hasData`, `snapshot.hasError`, and default to a `CircularProgressIndicator`.
74
+ - [ ] 7. **Feedback Loop:** Run the app -> trigger the network request -> review console for unhandled exceptions -> fix parsing or permission errors.
75
+
76
+ ## Examples
77
+
78
+ ### High-Fidelity Implementation: Fetching and Parsing in the Background
79
+
80
+ ```dart
81
+ import 'dart:async';
82
+ import 'dart:convert';
83
+ import 'dart:io';
84
+ import 'package:flutter/foundation.dart';
85
+ import 'package:flutter/material.dart';
86
+ import 'package:http/http.dart' as http;
87
+
88
+ // 1. Top-level parsing function for Isolate
89
+ List<Photo> parsePhotos(String responseBody) {
90
+ final parsed = (jsonDecode(responseBody) as List<Object?>)
91
+ .cast<Map<String, Object?>>();
92
+ return parsed.map<Photo>(Photo.fromJson).toList();
93
+ }
94
+
95
+ // 2. Network execution with background parsing
96
+ Future<List<Photo>> fetchPhotos() async {
97
+ final response = await http.get(
98
+ Uri.parse('https://jsonplaceholder.typicode.com/photos'),
99
+ headers: {
100
+ HttpHeaders.authorizationHeader: 'Bearer your_token_here',
101
+ HttpHeaders.acceptHeader: 'application/json',
102
+ },
103
+ );
104
+
105
+ if (response.statusCode == 200) {
106
+ // Offload heavy parsing to a background isolate
107
+ return compute(parsePhotos, response.body);
108
+ } else {
109
+ throw Exception('Failed to load photos. Status: ${response.statusCode}');
110
+ }
111
+ }
112
+ }
113
+
114
+ // 3. Strongly typed model
115
+ class Photo {
116
+ final int id;
117
+ final String title;
118
+ final String thumbnailUrl;
119
+
120
+ const Photo({
121
+ required this.id,
122
+ required this.title,
123
+ required this.thumbnailUrl,
124
+ });
125
+
126
+ factory Photo.fromJson(Map<String, dynamic> json) {
127
+ return Photo(
128
+ id: json['id'] as int,
129
+ title: json['title'] as String,
130
+ thumbnailUrl: json['thumbnailUrl'] as String,
131
+ );
132
+ }
133
+ }
134
+
135
+ // 4. UI Integration
136
+ class PhotoGallery extends StatefulWidget {
137
+ const PhotoGallery({super.key});
138
+
139
+ @override
140
+ State<PhotoGallery> createState() => _PhotoGalleryState();
141
+ }
142
+
143
+ class _PhotoGalleryState extends State<PhotoGallery> {
144
+ late Future<List<Photo>> _futurePhotos;
145
+
146
+ @override
147
+ void initState() {
148
+ super.initState();
149
+ // Initialize Future once to prevent re-fetching on rebuilds
150
+ _futurePhotos = fetchPhotos();
151
+ }
152
+
153
+ @override
154
+ Widget build(BuildContext context) {
155
+ return FutureBuilder<List<Photo>>(
156
+ future: _futurePhotos,
157
+ builder: (context, snapshot) {
158
+ if (snapshot.hasData) {
159
+ final photos = snapshot.data!;
160
+ return ListView.builder(
161
+ itemCount: photos.length,
162
+ itemBuilder: (context, index) => ListTile(
163
+ leading: Image.network(photos[index].thumbnailUrl),
164
+ title: Text(photos[index].title),
165
+ ),
166
+ );
167
+ } else if (snapshot.hasError) {
168
+ return Center(child: Text('Error: ${snapshot.error}'));
169
+ }
170
+
171
+ // Default loading state
172
+ return const Center(child: CircularProgressIndicator());
173
+ },
174
+ );
175
+ }
176
+ }
177
+ ```
package/skills/VERSION.md CHANGED
@@ -1,23 +1,40 @@
1
1
  # SDD Full 技能包版本
2
2
 
3
- **版本**: 4.6.2
4
- **发布日期**: 2026-05-06
5
- **更新时间**: 2026-05-06 21:05:00
3
+ **版本**: 4.8.0
4
+ **发布日期**: 2026-05-08
5
+ **更新时间**: 2026-05-08 22:30:00
6
6
 
7
7
  ---
8
8
 
9
9
  ## 版本说明
10
10
 
11
- 本技能包是一个完整的 SDD(Software Design Document)全流程开发技能体系,包含从需求分析到发布运维的全流程技能。
11
+ 本技能包是一个完整的 SDD(Software Design Document)全流程开发技能体系,包含从需求分析到发布运维的全流程技能,支持Trae和Claude Code双调用机制,融入ui-motion-interaction-standard技能规范动效交互、enterprise-spec(企业级全栈工程规范SDD)统一定制全流程标准。
12
12
 
13
13
  ---
14
14
 
15
15
  ## 技能包概览
16
16
 
17
- - **技能数量**: 40+ 个技能
18
- - **分层结构**: 7 个层级
17
+ - **技能数量**: 50+ 个技能
18
+ - **分层结构**: 8 个层级(需求分析、设计规划、开发执行、Flutter专项、质量保障、发布运维、知识沉淀、专项工具)
19
19
  - **SDD 模板**: 11 种标准化模板
20
- - **规则文件**: 2 个项目级规则
20
+ - **规则文件**: 2 个项目级规则(project_rules.md、user_rules.md)
21
+
22
+ ---
23
+
24
+ ## 核心流程概述
25
+
26
+ ### 完整SDD+Figma Make闭环流程(7阶段)
27
+ ```
28
+ 阶段1:需求分析 → 阶段2:设计规划 → 阶段3:Figma Make执行 → 阶段4:设计转开发+后端开发
29
+ → 阶段5:开发执行+四类全自动测试 → 阶段6:质量保障 → 阶段7:发布运维
30
+ ```
31
+
32
+ ### 核心原则
33
+ - ✅ **SDD为唯一真源头**:所有需求、设计、开发、测试均以SDD为依据
34
+ - ✅ **四类全自动测试必走**:所有需求添加流程必须执行四类测试
35
+ - ✅ **Bug修复前置检查**:测试不通过必须先执行环境检测和包兼容性检查
36
+ - ✅ **UI动效标准化**:所有动效必须符合 ui-motion-interaction-standard
37
+ - ✅ **企业级规范对齐**:全流程遵循 enterprise-spec 标准
21
38
 
22
39
  ---
23
40
 
@@ -26,12 +43,13 @@
26
43
  ```
27
44
  skills/
28
45
  ├── requirement-analysis/ # 需求分析层(7个技能)
29
- ├── design-planning/ # 设计规划层(14个技能)
46
+ ├── design-planning/ # 设计规划层(15个技能)
30
47
  ├── development-execution/ # 开发执行层(7个技能)
48
+ ├── flutter-specialized/ # Flutter专项层(10个技能)
31
49
  ├── quality-assurance/ # 质量保障层(4个技能)
32
50
  ├── release-ops/ # 发布运维层(2个技能)
33
51
  ├── knowledge-precipitation/ # 知识沉淀层(2个技能)
34
- ├── special-tools/ # 专项工具层(4个技能)
52
+ ├── special-tools/ # 专项工具层(5个技能)
35
53
  ├── call-adaptation/ # 调用机制适配(1个)
36
54
  ├── templates/ # 模板库索引(1个)
37
55
  ├── rules/ # 规则文件(2个)
@@ -43,61 +61,87 @@ skills/
43
61
  ## 详细技能列表
44
62
 
45
63
  ### 1. 需求分析层
46
- - brainstorming
47
- - market-research
48
- - competitive-brief
49
- - prd-write
50
- - requirement-completion-officer
51
- - sdd
52
- - sdd-full
64
+ - brainstorming - 头脑风暴
65
+ - market-research - 市场调研
66
+ - competitive-brief - 竞品分析
67
+ - prd-write - PRD编写
68
+ - requirement-completion-officer - 需求补全
69
+ - sdd - SDD拆分
70
+ - sdd-full - 完整SDD流程
53
71
 
54
72
  ### 2. 设计规划层
55
- - ui-sdd
56
- - ui-sdd-specialized
57
- - sdd-code
58
- - function-sdd
59
- - sdd-test
60
- - sdd-deploy
61
- - sdd-ops
62
- - writing-plans
63
- - ai-coding-rules
64
- - design-to-code
65
- - enterprise-spec
66
- - flutter-map
67
- - flutter-av
68
- - bug-reproduction-confirm
73
+ - ui-sdd - UI交互SDD
74
+ - ui-sdd-specialized - 复杂UI场景规范
75
+ - ui-motion-interaction-standard - UI动效交互标准
76
+ - function-sdd - 单一功能SDD
77
+ - sdd-code - 代码实现SDD
78
+ - sdd-test - 测试设计SDD
79
+ - sdd-deploy - 部署设计SDD
80
+ - sdd-ops - 运维设计SDD
81
+ - writing-plans - 制定计划
82
+ - ai-coding-rules - AI编码规则
83
+ - design-to-code - 设计转代码
84
+ - enterprise-spec - 企业级全栈工程规范
85
+ - flutter-map - Flutter地图导航
86
+ - flutter-av - Flutter音视频
87
+ - global-overlay-stack-standard - 全局Overlay栈标准
69
88
 
70
89
  ### 3. 开发执行层
71
- - sdd-add
72
- - test-driven-development
73
- - systematic-debugging
74
- - verification-before-completion
75
- - performance-optimize
76
- - flutter-errors
77
- - finishing-a-development-branch
78
-
79
- ### 4. 质量保障层
80
- - quality-gate
81
- - security-audit
82
- - bdd-acceptance
83
- - flutter-test
84
-
85
- ### 5. 发布运维层
86
- - release-flow
87
-
88
- ### 6. 知识沉淀层
89
- - claudeception
90
- - mempalace-auto-saver
91
-
92
- ### 7. 专项工具层
93
- - using-superpowers
94
- - requesting-code-review
95
- - receiving-code-review
96
- - env-check
90
+ - sdd-add - 快速开发
91
+ - test-driven-development - TDD开发
92
+ - systematic-debugging - 系统化调试
93
+ - verification-before-completion - 完成前验证
94
+ - bug-reproduction-confirm - Bug复现确认
95
+ - performance-optimize - 性能优化
96
+ - flutter-errors - Flutter专项错误处理
97
+
98
+ ### 4. Flutter专项层
99
+ - flutter-apply-architecture-best-practices - Flutter架构适配
100
+ - flutter-build-responsive-layout - 响应式布局
101
+ - flutter-setup-declarative-routing - 声明式路由配置
102
+ - flutter-implement-json-serialization - JSON序列化
103
+ - flutter-use-http-package - HTTP请求
104
+ - flutter-fix-layout-issues - 布局修复
105
+ - flutter-add-widget-test - Widget测试
106
+ - flutter-add-integration-test - 集成测试
107
+ - flutter-add-widget-preview - Widget预览
108
+ - flutter-setup-localization - 国际化配置
109
+
110
+ ### 5. 质量保障层
111
+ - quality-gate - 质量门禁
112
+ - security-audit - 安全审计
113
+ - bdd-acceptance - BDD验收
114
+ - flutter-test - Flutter测试策略
115
+
116
+ ### 6. 发布运维层
117
+ - finishing-a-development-branch - 开发分支完成
118
+ - release-flow - 发布流程管理
119
+
120
+ ### 7. 知识沉淀层
121
+ - claudeception - 经验沉淀
122
+ - mempalace-auto-saver - 自动存档
123
+
124
+ ### 8. 专项工具层
125
+ - using-superpowers - 全流程自动化
126
+ - requesting-code-review - 请求代码审查
127
+ - receiving-code-review - 接收代码审查
128
+ - env-check - 环境检查
129
+ - ios-full-auto-debug - iOS真机调试
130
+
131
+ ---
132
+
133
+ ## 四类全自动测试流程
134
+
135
+ | 测试类型 | 技能支撑 | 测试内容 | 触发时机 |
136
+ |---------|---------|---------|---------|
137
+ | 前端UI全量测试 | flutter-test | Widget测试、E2E测试、UI布局校验、动效验证 | 前端开发完成后 |
138
+ | 用户故事流程测试 | bdd-acceptance | 基于SDD用户故事的功能验收 | 功能开发完成后 |
139
+ | 后端全量测试 | security-audit、flutter-test | 接口校验、数据处理、安全审计 | 后端开发完成后 |
140
+ | Bug修复流程 | bug-reproduction-confirm、systematic-debugging | 前置检查、Bug复现、修复验证 | 测试不通过时 |
97
141
 
98
142
  ---
99
143
 
100
- ## SDD 模板列表
144
+ ## SDD模板列表
101
145
 
102
146
  1. **Base-SDD** - 全局通用基线规范
103
147
  2. **Brain-SDD** - 头脑风暴文档
@@ -113,12 +157,42 @@ skills/
113
157
 
114
158
  ---
115
159
 
116
- ## 本次更新内容 (v4.6.2)
160
+ ## 本次更新内容 (v4.8.0)
117
161
 
118
162
  ### 主要更新
119
- - ✅ **新增版本文件** - 添加 VERSION.md,安装后可查看技能版本
120
- - ✅ **优化安装输出** - 显示版本信息和版本文件位置
121
- - ✅ **完善技能清单** - 列出所有技能和模板
163
+ - ✅ **完整更新项目规则** - 详细包含核心流程和功能添加流程的所有细节
164
+ - ✅ **完整更新个人规则** - 详细技能地图、调用决策树、快捷触发关键词
165
+ - ✅ **完善7阶段闭环流程** - 需求分析→设计规划→Figma Make→设计转开发→开发执行→质量保障→发布运维
166
+ - ✅ **详细四类全自动测试流程** - 前端UI测试、用户故事测试、后端测试、Bug修复流程
167
+ - ✅ **详细Bug修复流程** - 包含前置检查(env-check+包兼容性检查)
168
+ - ✅ **集成ui-motion-interaction-standard** - 动效交互标准规范
169
+ - ✅ **集成enterprise-spec** - 企业级全栈工程规范SDD
170
+ - ✅ **完善技能分类** - 8个层级,50+个技能
171
+ - ✅ **新增流程场景参数** - 5大流程场景定义及适用技能
172
+ - ✅ **新增功能添加流程闭环** - 完整的功能添加流程说明
173
+
174
+ ### v4.7.0 历史更新
175
+ - ✅ 更新项目规则和个人规则,同步核心流程文档
176
+ - ✅ 新增四类全自动测试流程
177
+ - ✅ 新增Bug修复前置检查流程
178
+ - ✅ 集成ui-motion-interaction-standard和enterprise-spec规范
179
+ - ✅ 新增Flutter专项技能层(10个技能)
180
+ - ✅ 完善技能映射和触发关键词
181
+
182
+ ### v4.6.2 历史更新
183
+ - ✅ 同步 VERSION.md 版本号至 4.6.2
184
+ - ✅ 修正版本号同步遗漏问题
185
+ - ✅ 完善版本信息一致性
186
+
187
+ ### v4.6.1 历史更新
188
+ - ✅ 同步 VERSION.md 版本号至 4.6.1
189
+ - ✅ 同步 package.json 和 bin.js 版本号
190
+ - ✅ 修复技能目录结构,优化技能映射表
191
+
192
+ ### v4.6.0 历史更新
193
+ - ✅ 新增 VERSION.md 版本文件
194
+ - ✅ 优化安装输出,显示版本信息
195
+ - ✅ 完善技能清单和模板列表
122
196
 
123
197
  ### v4.5.0 历史更新
124
198
  - ✅ 新增 **bug-reproduction-confirm** 技能 - Bug复现确认
@@ -136,6 +210,30 @@ skills/
136
210
 
137
211
  ---
138
212
 
213
+ ## 功能添加流程闭环(必走)
214
+
215
+ ```
216
+ SDD(功能需求拆分)
217
+
218
+ 设计规划(ui-sdd → ui-motion-interaction-standard → function-sdd → sdd-code → writing-plans → enterprise-spec)
219
+
220
+ Figma Make执行(UI产出)
221
+
222
+ 前后端代码实现(design-to-code → flutter-apply-architecture-best-practices → sdd-code → 后端实现)
223
+
224
+ 四类全自动测试(前端UI测试 → 用户故事测试 → 后端测试 → Bug修复流程)
225
+
226
+ SDD校验(验证代码与SDD一致性)
227
+
228
+ 质量门禁(quality-gate)
229
+
230
+ 发布(release-flow → finishing-a-development-branch)
231
+
232
+ 经验沉淀(claudeception)
233
+ ```
234
+
235
+ ---
236
+
139
237
  ## 使用说明
140
238
 
141
239
  ### 安装命令
@@ -167,6 +265,22 @@ npx sdd-full --help
167
265
 
168
266
  ## 更新历史
169
267
 
268
+ ### v4.8.0 (2026-05-08)
269
+ - 完整更新项目规则和个人规则,详细包含核心流程和功能添加流程
270
+ - 完善7阶段闭环流程说明
271
+ - 详细四类全自动测试流程
272
+ - 详细Bug修复流程(含前置检查)
273
+ - 集成ui-motion-interaction-standard和enterprise-spec规范
274
+ - 完善技能分类和调用决策树
275
+
276
+ ### v4.7.0 (2026-05-08)
277
+ - 更新项目规则和个人规则,同步核心流程文档
278
+ - 新增四类全自动测试流程
279
+ - 新增Bug修复前置检查流程
280
+ - 集成ui-motion-interaction-standard和enterprise-spec规范
281
+ - 新增Flutter专项技能层(10个技能)
282
+ - 完善技能映射和触发关键词
283
+
170
284
  ### v4.6.2 (2026-05-06)
171
285
  - 同步 VERSION.md 版本号至 4.6.2
172
286
  - 修正版本号同步遗漏问题
@@ -193,4 +307,4 @@ npx sdd-full --help
193
307
  - 添加规则文件
194
308
 
195
309
  ### v4.3.0 (2026-05-06)
196
- - 初始版本发布
310
+ - 初始版本发布