mta-mcp 1.0.0 → 1.0.1

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.
@@ -142,52 +142,70 @@ get_standard_by_id({ ids: ['flutter', 'flutter-ui-system'] })
142
142
 
143
143
  ### 🔴 全局样式优先(最高优先级)
144
144
 
145
- **在还原任何 UI 前,必须首先检查是否存在全局样式规范!**
146
-
147
- #### 强制检查流程
148
-
149
- 1. **圆角** - 优先使用 `DesignRadius` 中的标准值:
150
- | 设计值 | 使用常量 | 用途 |
151
- |--------|----------|------|
152
- | 20px | `DesignRadius.xl` | 大统计卡片 |
153
- | 16px | `DesignRadius.lg` | 通用卡片、CTA按钮 |
154
- | 14px | `DesignRadius.md` | Tab、选择框 |
155
- | 12px | `DesignRadius.base` | 图标背景、中型按钮 |
156
- | 10px | `DesignRadius.sm` | 小按钮 |
157
- | 8px | `DesignRadius.xs` | 输入框 |
158
-
159
- 2. **按钮高度** - 优先使用 `DesignButtonSizes`:
160
- | 设计值 | 使用常量 | 用途 |
161
- |--------|----------|------|
162
- | 56px | `DesignButtonSizes.heightCTA` | 主CTA按钮 |
163
- | 40px | `DesignButtonSizes.heightMedium` | 标准按钮 |
164
- | 36px | `DesignButtonSizes.heightIcon` | 图标按钮 |
165
- | 32px | `DesignButtonSizes.heightSmall` | 小按钮 |
166
- | 28px | `DesignButtonSizes.heightWarning` | 警告按钮 |
167
-
168
- 3. **阴影** - 优先使用 `DesignShadows`:
169
- | 模式 | 使用常量 | 用途 |
170
- |------|----------|------|
171
- | (4,4,8) | `DesignShadows.raised` | 按钮、小卡片 |
172
- | (6,6,12) | `DesignShadows.card` | 普通卡片 |
173
- | (8,8,20) | `DesignShadows.elevated` | 大卡片 |
174
- | CTA红色 | `DesignShadows.cta` | 主操作按钮 |
175
-
176
- 4. **颜色** - 优先使用 `DesignColors`:
177
- | 颜色 | 使用常量 |
178
- |------|----------|
179
- | #1C2B45 | `DesignColors.textPrimary` |
180
- | #1C2B4599 | `DesignColors.textSecondary.withOpacity(0.6)` |
181
- | #E8EDF5 | `DesignColors.pageBackground` |
182
- | #EEF3FA→#D9E0EB | `DesignColors.cardGradient` |
183
- | #D0121B | `DesignColors.primary` |
184
- | #FF9800 | `DesignColors.warning` |
185
-
186
- #### 禁止事项
187
- - ❌ 硬编码 `BorderRadius.circular(16)` - 应使用 `DesignRadius.lg`
188
- - ❌ 硬编码 `height: 56` - 应使用 `DesignButtonSizes.heightCTA`
189
- - ❌ 硬编码 `Color(0xFF1C2B45)` - 应使用 `DesignColors.textPrimary`
190
- - 手写阴影参数 - 应使用 `DesignShadows` 预设
145
+ **在还原任何 UI 前,必须首先通过项目搜索检查是否存在全局样式规范!**
146
+
147
+ #### 强制检查流程(搜索发现法)
148
+
149
+ **核心原则**:不假设任何固定值,通过搜索项目代码发现现有规范
150
+
151
+ ##### 1. 圆角检查
152
+
153
+ ```bash
154
+ # 搜索圆角定义
155
+ grep -r "radius\|Radius\|RADIUS\|borderRadius" lib/ --include="*.dart"
156
+ ```
157
+
158
+ **寻找模式**:
159
+ - `DesignRadius` / `AppRadius` / `Radius` 类定义
160
+ - `BorderRadius.circular(数字)` 的常量定义
161
+ - 查看最常用的数值(如 12、16、20)
162
+
163
+ **使用优先级**:
164
+ 1. 项目已有的 Radius 类常量(如 `DesignRadius.lg`)
165
+ 2. 查看现有组件中使用频率最高的值
166
+ 3. 如无规范,则直接使用设计稿数值,待后续统一
167
+
168
+ ##### 2. 按钮高度检查
169
+
170
+ ```bash
171
+ # 搜索按钮高度定义
172
+ grep -r "ButtonSize\|buttonHeight\|height.*button" lib/ --include="*.dart"
173
+ ```
174
+
175
+ **寻找模式**:
176
+ - `DesignButtonSizes` / `AppButtonSizes`
177
+ - `Container(height: 常量)` 包裹的 Button
178
+ - 查看主 CTA、标准按钮、小按钮的高度
179
+
180
+ ##### 3. 阴影检查
181
+
182
+ ```bash
183
+ # 搜索阴影定义
184
+ grep -r "Shadow\|boxShadow\|elevation" lib/ --include="*.dart"
185
+ ```
186
+
187
+ **寻找模式**:
188
+ - `DesignShadows` / `AppShadows`
189
+ - `BoxShadow` 配置(offset、blur、color)
190
+ - Neumorphism 阴影模式
191
+
192
+ ##### 4. 颜色检查
193
+
194
+ ```bash
195
+ # 搜索颜色定义
196
+ grep -r "Colors\|AppColors\|DesignColors\|Color(0x" lib/ --include="*.dart"
197
+ ```
198
+
199
+ **寻找模式**:
200
+ - 颜色类定义(通常在 `lib/core/themes/` 或 `lib/constants/`)
201
+ - 查看主色、文字色、背景色的命名规范
202
+ - 渐变色定义(`LinearGradient`)
203
+
204
+ #### 通用禁止事项
205
+
206
+ - ❌ **直接硬编码数值** - 应先搜索项目规范
207
+ - ❌ **假设特定类名** - 不同项目命名不同(AppColors vs DesignColors)
208
+ - ❌ **跳过搜索步骤** - 即使觉得"简单"也必须先搜索
191
209
 
192
210
  ### 强制要求:完整读取选中元素及其所有子集
193
211
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mta-mcp",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "MTA - 智能项目分析与编码规范管理 MCP 服务器",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",