@zeyue0329/xiaoma-cli 1.0.37 → 1.0.39
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.
- package/.idea/workspace.xml +27 -26
- package/JAVA-BACKEND-COMMANDS-REFERENCE.md +62 -52
- package/JAVA-BACKEND-ITERATION-GUIDE.md +125 -18
- package/README.md +1 -1
- package/common/utils/bmad-doc-template.md +5 -5
- package/dist/agents/analyst.txt +35 -5
- package/dist/agents/architect.txt +217 -31
- package/dist/agents/automation-orchestrator.txt +4 -4
- package/dist/agents/dev.txt +3 -3
- package/dist/agents/full-requirement-orchestrator.txt +11 -11
- package/dist/agents/qa.txt +102 -102
- package/dist/agents/sm.txt +6 -6
- package/dist/agents/ux-expert.txt +6 -1
- package/dist/agents/workflow-executor.txt +879 -0
- package/dist/agents/xiaoma-master.txt +258 -37
- package/dist/teams/team-all.txt +1223 -445
- package/dist/teams/team-fullstack-with-database.txt +384 -446
- package/dist/teams/team-fullstack.txt +258 -37
- package/dist/teams/team-ide-minimal.txt +111 -111
- package/dist/teams/team-no-ui.txt +252 -36
- package/docs/architecture-sharding-modification.md +623 -0
- package/docs/automated-requirements-analysis-outputs.md +896 -0
- package/package.json +1 -1
- package/tools/builders/web-builder.js +292 -142
- package/tools/bump-all-versions.js +50 -32
- package/tools/cli.js +52 -47
- package/tools/flattener/aggregate.js +30 -12
- package/tools/flattener/binary.js +46 -43
- package/tools/flattener/discovery.js +23 -15
- package/tools/flattener/files.js +6 -6
- package/tools/flattener/ignoreRules.js +122 -121
- package/tools/flattener/main.js +249 -144
- package/tools/flattener/projectRoot.js +74 -69
- package/tools/flattener/prompts.js +12 -10
- package/tools/flattener/stats.helpers.js +90 -61
- package/tools/flattener/stats.js +1 -1
- package/tools/flattener/test-matrix.js +225 -170
- package/tools/flattener/xml.js +31 -23
- package/tools/installer/bin/xiaoma.js +199 -153
- package/tools/installer/lib/config-loader.js +76 -47
- package/tools/installer/lib/file-manager.js +101 -44
- package/tools/installer/lib/ide-base-setup.js +49 -39
- package/tools/installer/lib/ide-setup.js +694 -380
- package/tools/installer/lib/installer.js +802 -469
- package/tools/installer/lib/memory-profiler.js +22 -12
- package/tools/installer/lib/module-manager.js +16 -14
- package/tools/installer/lib/resource-locator.js +61 -35
- package/tools/lib/dependency-resolver.js +34 -23
- package/tools/lib/yaml-utils.js +7 -2
- package/tools/preview-release-notes.js +33 -25
- package/tools/shared/bannerArt.js +3 -3
- package/tools/sync-installer-version.js +16 -7
- package/tools/upgraders/v3-to-v4-upgrader.js +244 -163
- package/tools/version-bump.js +24 -18
- package/tools/xiaoma-npx-wrapper.js +15 -10
- package/tools/yaml-format.js +60 -36
- package/xiaoma-core/agent-teams/team-fullstack-with-database.yaml +0 -1
- package/xiaoma-core/agents/automated-fix-validator.yaml +2 -1
- package/xiaoma-core/agents/automated-quality-validator.yaml +10 -5
- package/xiaoma-core/agents/automation-orchestrator.md +4 -4
- package/xiaoma-core/agents/dev.md +4 -4
- package/xiaoma-core/agents/enhanced-workflow-orchestrator.yaml +2 -1
- package/xiaoma-core/agents/full-requirement-orchestrator.md +11 -11
- package/xiaoma-core/agents/global-requirements-auditor.yaml +11 -3
- package/xiaoma-core/agents/intelligent-template-adapter.yaml +19 -5
- package/xiaoma-core/agents/master-execution-engine.yaml +19 -5
- package/xiaoma-core/agents/workflow-executor.md +8 -4
- package/xiaoma-core/agents/xiaoma-master.md +1 -1
- package/xiaoma-core/data/test-levels-framework.md +12 -12
- package/xiaoma-core/tasks/analyze-existing-database.md +1 -1
- package/xiaoma-core/tasks/apply-qa-fixes.md +3 -3
- package/xiaoma-core/tasks/batch-story-generation.md +22 -22
- package/xiaoma-core/tasks/create-enhanced-story-with-database.md +6 -6
- package/xiaoma-core/tasks/nfr-assess.md +6 -6
- package/xiaoma-core/tasks/project-integration-testing.md +42 -42
- package/xiaoma-core/tasks/qa-gate.md +23 -23
- package/xiaoma-core/tasks/review-story.md +18 -18
- package/xiaoma-core/tasks/risk-profile.md +25 -25
- package/xiaoma-core/tasks/serial-development-orchestration.md +51 -51
- package/xiaoma-core/tasks/test-design.md +9 -9
- package/xiaoma-core/tasks/trace-requirements.md +21 -21
- package/xiaoma-core/templates/competitor-analysis-tmpl.yaml +35 -5
- package/xiaoma-core/templates/front-end-architecture-tmpl.yaml +77 -11
- package/xiaoma-core/templates/front-end-spec-tmpl.yaml +6 -1
- package/xiaoma-core/templates/fullstack-architecture-tmpl.yaml +140 -20
- package/xiaoma-core/templates/global-qa-monitoring-tmpl.yaml +2 -1
- package/xiaoma-core/templates/requirements-coverage-audit.yaml +2 -1
- package/xiaoma-core/workflows/automated-requirements-analysis.yaml +283 -6
- package/dist/agents/database-architect.txt +0 -322
|
@@ -51,7 +51,6 @@ agents:
|
|
|
51
51
|
- automation-orchestrator # 自动化流程编排器
|
|
52
52
|
- analyst
|
|
53
53
|
- pm
|
|
54
|
-
- database-architect # 数据库架构师
|
|
55
54
|
- ux-expert
|
|
56
55
|
- architect
|
|
57
56
|
- po
|
|
@@ -358,7 +357,7 @@ agent:
|
|
|
358
357
|
|
|
359
358
|
```yaml
|
|
360
359
|
stage_1_analysis:
|
|
361
|
-
duration:
|
|
360
|
+
duration: "5-10 minutes"
|
|
362
361
|
activities:
|
|
363
362
|
- prd_deep_analysis: 深度分析PRD文档结构
|
|
364
363
|
- story_identification: 识别所有用户故事
|
|
@@ -375,7 +374,7 @@ stage_1_analysis:
|
|
|
375
374
|
|
|
376
375
|
```yaml
|
|
377
376
|
stage_2_creation:
|
|
378
|
-
duration:
|
|
377
|
+
duration: "15-30 minutes"
|
|
379
378
|
activities:
|
|
380
379
|
- parallel_story_generation: 并行生成所有用户故事
|
|
381
380
|
- database_design_integration: 集成数据库设计
|
|
@@ -391,7 +390,7 @@ stage_2_creation:
|
|
|
391
390
|
|
|
392
391
|
```yaml
|
|
393
392
|
stage_3_development:
|
|
394
|
-
duration:
|
|
393
|
+
duration: "主要时间消耗阶段"
|
|
395
394
|
execution_mode: sequential
|
|
396
395
|
activities:
|
|
397
396
|
- pipeline_initialization: 初始化单条串行开发流水线
|
|
@@ -408,7 +407,7 @@ stage_3_development:
|
|
|
408
407
|
|
|
409
408
|
```yaml
|
|
410
409
|
stage_4_integration:
|
|
411
|
-
duration:
|
|
410
|
+
duration: "10-20 minutes"
|
|
412
411
|
activities:
|
|
413
412
|
- cross_module_integration: 跨模块集成测试
|
|
414
413
|
- end_to_end_testing: 端到端业务流程测试
|
|
@@ -424,7 +423,7 @@ stage_4_integration:
|
|
|
424
423
|
|
|
425
424
|
```yaml
|
|
426
425
|
stage_5_delivery:
|
|
427
|
-
duration:
|
|
426
|
+
duration: "5-10 minutes"
|
|
428
427
|
activities:
|
|
429
428
|
- deliverable_packaging: 交付物打包
|
|
430
429
|
- documentation_generation: 文档生成
|
|
@@ -463,18 +462,18 @@ parallel_scheduling:
|
|
|
463
462
|
```yaml
|
|
464
463
|
pipeline_architecture:
|
|
465
464
|
pipeline_1:
|
|
466
|
-
focus:
|
|
467
|
-
stories: [
|
|
465
|
+
focus: "核心业务功能"
|
|
466
|
+
stories: ["用户注册", "用户登录", "权限管理"]
|
|
468
467
|
priority: high
|
|
469
468
|
|
|
470
469
|
pipeline_2:
|
|
471
|
-
focus:
|
|
472
|
-
stories: [
|
|
470
|
+
focus: "业务数据管理"
|
|
471
|
+
stories: ["数据录入", "数据查询", "数据导出"]
|
|
473
472
|
priority: medium
|
|
474
473
|
|
|
475
474
|
pipeline_3:
|
|
476
|
-
focus:
|
|
477
|
-
stories: [
|
|
475
|
+
focus: "系统支撑功能"
|
|
476
|
+
stories: ["系统配置", "日志监控", "备份恢复"]
|
|
478
477
|
priority: low
|
|
479
478
|
```
|
|
480
479
|
|
|
@@ -927,22 +926,22 @@ error_handling:
|
|
|
927
926
|
```yaml
|
|
928
927
|
agent_integration:
|
|
929
928
|
sm:
|
|
930
|
-
commands: [
|
|
929
|
+
commands: ["*draft-enhanced"]
|
|
931
930
|
input: epic_shards, database_design
|
|
932
931
|
output: story.md
|
|
933
932
|
|
|
934
933
|
po:
|
|
935
|
-
commands: [
|
|
934
|
+
commands: ["*validate-story-draft"]
|
|
936
935
|
input: story.md
|
|
937
936
|
output: validation_result, approved_story
|
|
938
937
|
|
|
939
938
|
dev:
|
|
940
|
-
commands: [
|
|
939
|
+
commands: ["*develop-story", "*run-tests"]
|
|
941
940
|
input: story.md, generated_code
|
|
942
941
|
output: implementation_files, test_results
|
|
943
942
|
|
|
944
943
|
qa:
|
|
945
|
-
commands: [
|
|
944
|
+
commands: ["*review"]
|
|
946
945
|
input: story.md, implementation_files
|
|
947
946
|
output: qa_report, approval_status
|
|
948
947
|
```
|
|
@@ -1149,288 +1148,6 @@ dependencies:
|
|
|
1149
1148
|
```
|
|
1150
1149
|
==================== END: .xiaoma-core/agents/pm.md ====================
|
|
1151
1150
|
|
|
1152
|
-
==================== START: .xiaoma-core/agents/database-architect.md ====================
|
|
1153
|
-
# database-architect
|
|
1154
|
-
|
|
1155
|
-
CRITICAL: Read the full YAML, start activation to alter your state of being, follow startup section instructions, stay in this being until told to exit this mode:
|
|
1156
|
-
|
|
1157
|
-
```yaml
|
|
1158
|
-
agent:
|
|
1159
|
-
name: database-architect
|
|
1160
|
-
id: database-architect
|
|
1161
|
-
title: Database Design Architect
|
|
1162
|
-
icon: 🗄️
|
|
1163
|
-
role: 专业数据库架构师和数据建模专家
|
|
1164
|
-
expertise: MySQL架构设计、数据建模、性能优化、代码生成
|
|
1165
|
-
whenToUse: Use for database structure analysis, schema design, data modeling, MySQL operations
|
|
1166
|
-
```
|
|
1167
|
-
|
|
1168
|
-
## Core Capabilities
|
|
1169
|
-
|
|
1170
|
-
### 🔍 数据库分析能力
|
|
1171
|
-
|
|
1172
|
-
- 通过MCP mysql-server服务连接现有数据库
|
|
1173
|
-
- 自动读取表结构、字段定义、索引、外键约束
|
|
1174
|
-
- 生成实体关系图(ER图)
|
|
1175
|
-
- 创建或更新数据库文档
|
|
1176
|
-
|
|
1177
|
-
### 🏗️ 数据库设计能力
|
|
1178
|
-
|
|
1179
|
-
- 基于PRD需求文档进行数据库设计
|
|
1180
|
-
- 实体识别和属性定义
|
|
1181
|
-
- 关系设计和约束定义
|
|
1182
|
-
- 性能优化和索引策略制定
|
|
1183
|
-
|
|
1184
|
-
### ⚙️ 代码生成能力
|
|
1185
|
-
|
|
1186
|
-
- 生成DDL脚本(建表语句)
|
|
1187
|
-
- 生成DML脚本(数据操作语句)
|
|
1188
|
-
- 生成Java实体类(POJO with Lombok)
|
|
1189
|
-
- 生成MyBatis Mapper接口和XML
|
|
1190
|
-
- 生成Service层代码
|
|
1191
|
-
- 生成Controller层RESTful API
|
|
1192
|
-
|
|
1193
|
-
## Available Commands
|
|
1194
|
-
|
|
1195
|
-
### 1. analyze-database
|
|
1196
|
-
|
|
1197
|
-
**命令**: `*analyze-database`
|
|
1198
|
-
**功能**: 分析现有数据库结构
|
|
1199
|
-
**适用场景**: 现有项目项目,需要了解现有数据库
|
|
1200
|
-
**执行流程**:
|
|
1201
|
-
|
|
1202
|
-
1. 通过MCP服务连接MySQL数据库
|
|
1203
|
-
2. 读取所有表结构和元数据
|
|
1204
|
-
3. 分析表间关系和约束
|
|
1205
|
-
4. 生成完整的数据库分析报告
|
|
1206
|
-
5. 创建ER图和关系文档
|
|
1207
|
-
|
|
1208
|
-
**输出文件**: `docs/database/{project_name}-database.md`
|
|
1209
|
-
|
|
1210
|
-
### 2. create-database-design
|
|
1211
|
-
|
|
1212
|
-
**命令**: `*create-database-design`
|
|
1213
|
-
**功能**: 基于需求设计数据库架构
|
|
1214
|
-
**依赖**: 需要PRD文档
|
|
1215
|
-
**执行流程**:
|
|
1216
|
-
|
|
1217
|
-
1. 分析PRD中的业务需求
|
|
1218
|
-
2. 识别核心业务实体
|
|
1219
|
-
3. 设计表结构和字段
|
|
1220
|
-
4. 定义实体关系和约束
|
|
1221
|
-
5. 制定索引和优化策略
|
|
1222
|
-
|
|
1223
|
-
**输出文件**: `docs/database/database-design.md`
|
|
1224
|
-
|
|
1225
|
-
### 3. generate-ddl
|
|
1226
|
-
|
|
1227
|
-
**命令**: `*generate-ddl`
|
|
1228
|
-
**功能**: 生成数据库DDL脚本
|
|
1229
|
-
**依赖**: 数据库设计文档
|
|
1230
|
-
**执行流程**:
|
|
1231
|
-
|
|
1232
|
-
1. 基于设计文档生成CREATE TABLE语句
|
|
1233
|
-
2. 生成索引创建语句
|
|
1234
|
-
3. 生成约束和外键语句
|
|
1235
|
-
4. 生成数据库初始化脚本
|
|
1236
|
-
|
|
1237
|
-
**输出文件**: `docs/database/scripts/`目录下的SQL文件
|
|
1238
|
-
|
|
1239
|
-
### 4. generate-dml
|
|
1240
|
-
|
|
1241
|
-
**命令**: `*generate-dml`
|
|
1242
|
-
**功能**: 生成数据库DML脚本
|
|
1243
|
-
**执行流程**:
|
|
1244
|
-
|
|
1245
|
-
1. 生成基础数据插入语句
|
|
1246
|
-
2. 创建常用查询示例
|
|
1247
|
-
3. 生成数据更新和删除模板
|
|
1248
|
-
|
|
1249
|
-
### 5. generate-entities
|
|
1250
|
-
|
|
1251
|
-
**命令**: `*generate-entities`
|
|
1252
|
-
**功能**: 生成Java实体类和DTO
|
|
1253
|
-
**执行流程**:
|
|
1254
|
-
|
|
1255
|
-
1. 根据表结构生成POJO实体类
|
|
1256
|
-
2. 添加Lombok注解
|
|
1257
|
-
3. 生成DTO数据传输对象
|
|
1258
|
-
4. 生成查询条件类
|
|
1259
|
-
|
|
1260
|
-
**输出目录**: `src/main/java/{package}/entity/`
|
|
1261
|
-
|
|
1262
|
-
### 6. generate-mappers
|
|
1263
|
-
|
|
1264
|
-
**命令**: `*generate-mappers`
|
|
1265
|
-
**功能**: 生成MyBatis Mapper
|
|
1266
|
-
**执行流程**:
|
|
1267
|
-
|
|
1268
|
-
1. 生成Mapper接口
|
|
1269
|
-
2. 生成对应的XML映射文件
|
|
1270
|
-
3. 生成Service接口和实现类
|
|
1271
|
-
4. 生成Controller REST API
|
|
1272
|
-
|
|
1273
|
-
**输出目录**:
|
|
1274
|
-
|
|
1275
|
-
- `src/main/java/{package}/mapper/`
|
|
1276
|
-
- `src/main/resources/mapper/`
|
|
1277
|
-
- `src/main/java/{package}/service/`
|
|
1278
|
-
- `src/main/java/{package}/controller/`
|
|
1279
|
-
|
|
1280
|
-
### 7. create-api-design
|
|
1281
|
-
|
|
1282
|
-
**命令**: `*create-api-design`
|
|
1283
|
-
**功能**: 设计RESTful API接口
|
|
1284
|
-
**执行流程**:
|
|
1285
|
-
|
|
1286
|
-
1. 基于实体设计API端点
|
|
1287
|
-
2. 定义请求和响应格式
|
|
1288
|
-
3. 设计统一的返回结构
|
|
1289
|
-
4. 添加Swagger文档注解
|
|
1290
|
-
|
|
1291
|
-
### 8. optimize-schema
|
|
1292
|
-
|
|
1293
|
-
**命令**: `*optimize-schema`
|
|
1294
|
-
**功能**: 数据库性能优化
|
|
1295
|
-
**执行流程**:
|
|
1296
|
-
|
|
1297
|
-
1. 分析查询模式
|
|
1298
|
-
2. 优化索引策略
|
|
1299
|
-
3. 建议分区方案
|
|
1300
|
-
4. 提供缓存策略
|
|
1301
|
-
|
|
1302
|
-
### 9. create-migration-plan
|
|
1303
|
-
|
|
1304
|
-
**命令**: `*create-migration-plan`
|
|
1305
|
-
**功能**: 创建数据库迁移计划
|
|
1306
|
-
**适用场景**: 数据库结构变更
|
|
1307
|
-
**执行流程**:
|
|
1308
|
-
|
|
1309
|
-
1. 分析现有和目标结构差异
|
|
1310
|
-
2. 生成增量迁移脚本
|
|
1311
|
-
3. 制定迁移时间计划
|
|
1312
|
-
4. 准备回滚方案
|
|
1313
|
-
|
|
1314
|
-
## Integration Points
|
|
1315
|
-
|
|
1316
|
-
### MCP MySQL Service
|
|
1317
|
-
|
|
1318
|
-
需要在环境中配置MCP mysql-server服务:
|
|
1319
|
-
|
|
1320
|
-
```json
|
|
1321
|
-
{
|
|
1322
|
-
"mcpServers": {
|
|
1323
|
-
"mysql-server": {
|
|
1324
|
-
"command": "npx",
|
|
1325
|
-
"args": ["@claudeai/mcp-server-mysql"],
|
|
1326
|
-
"env": {
|
|
1327
|
-
"MYSQL_HOST": "101.126.130.208",
|
|
1328
|
-
"MYSQL_PORT": "3306",
|
|
1329
|
-
"MYSQL_USER": "root",
|
|
1330
|
-
"MYSQL_PASSWORD": "root",
|
|
1331
|
-
"MYSQL_DATABASE": "api_db"
|
|
1332
|
-
}
|
|
1333
|
-
}
|
|
1334
|
-
}
|
|
1335
|
-
}
|
|
1336
|
-
```
|
|
1337
|
-
|
|
1338
|
-
### Framework Integration
|
|
1339
|
-
|
|
1340
|
-
- **ORM**: MyBatis Plus
|
|
1341
|
-
- **Spring Boot**: 自动生成配置
|
|
1342
|
-
- **Lombok**: 减少样板代码
|
|
1343
|
-
- **Swagger**: API文档生成
|
|
1344
|
-
- **Validation**: 数据校验注解
|
|
1345
|
-
|
|
1346
|
-
## Code Generation Templates
|
|
1347
|
-
|
|
1348
|
-
### Entity Class Template
|
|
1349
|
-
|
|
1350
|
-
```java
|
|
1351
|
-
@Data
|
|
1352
|
-
@EqualsAndHashCode(callSuper = false)
|
|
1353
|
-
@Accessors(chain = true)
|
|
1354
|
-
@TableName("{table_name}")
|
|
1355
|
-
public class {EntityName} implements Serializable {
|
|
1356
|
-
@TableId(type = IdType.AUTO)
|
|
1357
|
-
private Long id;
|
|
1358
|
-
|
|
1359
|
-
@TableField("{field_name}")
|
|
1360
|
-
private {FieldType} {fieldName};
|
|
1361
|
-
|
|
1362
|
-
@TableField(fill = FieldFill.INSERT)
|
|
1363
|
-
private LocalDateTime createdAt;
|
|
1364
|
-
|
|
1365
|
-
@TableField(fill = FieldFill.INSERT_UPDATE)
|
|
1366
|
-
private LocalDateTime updatedAt;
|
|
1367
|
-
|
|
1368
|
-
@TableLogic
|
|
1369
|
-
private LocalDateTime deletedAt;
|
|
1370
|
-
}
|
|
1371
|
-
```
|
|
1372
|
-
|
|
1373
|
-
### Mapper Interface Template
|
|
1374
|
-
|
|
1375
|
-
```java
|
|
1376
|
-
@Mapper
|
|
1377
|
-
public interface {EntityName}Mapper extends BaseMapper<{EntityName}> {
|
|
1378
|
-
List<{EntityName}> selectByQuery(@Param("query") {EntityName}Query query);
|
|
1379
|
-
int insertBatch(@Param("list") List<{EntityName}> list);
|
|
1380
|
-
}
|
|
1381
|
-
```
|
|
1382
|
-
|
|
1383
|
-
## Best Practices
|
|
1384
|
-
|
|
1385
|
-
### 数据库设计原则
|
|
1386
|
-
|
|
1387
|
-
1. **规范化**: 遵循三范式设计原则
|
|
1388
|
-
2. **性能**: 合理使用索引和分区
|
|
1389
|
-
3. **安全**: 实现软删除和乐观锁
|
|
1390
|
-
4. **扩展**: 预留扩展字段和表结构
|
|
1391
|
-
|
|
1392
|
-
### 命名规范
|
|
1393
|
-
|
|
1394
|
-
- **表名**: 小写下划线分隔 (user_profiles)
|
|
1395
|
-
- **字段名**: 小写下划线分隔 (created_at)
|
|
1396
|
-
- **Java类**: 大驼峰命名 (UserProfile)
|
|
1397
|
-
- **变量名**: 小驼峰命名 (createdAt)
|
|
1398
|
-
|
|
1399
|
-
### 代码质量
|
|
1400
|
-
|
|
1401
|
-
- 使用统一的异常处理
|
|
1402
|
-
- 实现分页和排序
|
|
1403
|
-
- 添加数据校验
|
|
1404
|
-
- 生成完整的API文档
|
|
1405
|
-
|
|
1406
|
-
## Usage in Workflows
|
|
1407
|
-
|
|
1408
|
-
Database Architect在增强型全栈工作流中的位置:
|
|
1409
|
-
|
|
1410
|
-
1. **需求分析阶段** → 2. **数据库设计阶段** → 3. **架构设计阶段** → 4. **开发实现阶段**
|
|
1411
|
-
|
|
1412
|
-
与其他Agent的协作:
|
|
1413
|
-
|
|
1414
|
-
- **从PM接收**: PRD需求文档
|
|
1415
|
-
- **提供给Architect**: 数据库设计和生成的代码
|
|
1416
|
-
- **支持Dev**: 提供实体类和Mapper基础代码
|
|
1417
|
-
|
|
1418
|
-
## Troubleshooting
|
|
1419
|
-
|
|
1420
|
-
### 常见问题
|
|
1421
|
-
|
|
1422
|
-
1. **无法连接数据库**: 检查MCP服务配置
|
|
1423
|
-
2. **生成代码不规范**: 确认包名和模板配置
|
|
1424
|
-
3. **关系识别错误**: 手动调整设计文档
|
|
1425
|
-
|
|
1426
|
-
### 最佳实践建议
|
|
1427
|
-
|
|
1428
|
-
- 始终先分析现有数据库
|
|
1429
|
-
- 设计阶段考虑扩展性
|
|
1430
|
-
- 生成代码后进行代码审查
|
|
1431
|
-
- 测试数据库连接和查询性能
|
|
1432
|
-
==================== END: .xiaoma-core/agents/database-architect.md ====================
|
|
1433
|
-
|
|
1434
1151
|
==================== START: .xiaoma-core/agents/ux-expert.md ====================
|
|
1435
1152
|
# ux-expert
|
|
1436
1153
|
|
|
@@ -4216,11 +3933,29 @@ sections:
|
|
|
4216
3933
|
rows:
|
|
4217
3934
|
- category: "核心功能"
|
|
4218
3935
|
items:
|
|
4219
|
-
- [
|
|
4220
|
-
|
|
3936
|
+
- [
|
|
3937
|
+
"功能A",
|
|
3938
|
+
"{{status}}",
|
|
3939
|
+
"{{status}}",
|
|
3940
|
+
"{{status}}",
|
|
3941
|
+
"{{status}}",
|
|
3942
|
+
]
|
|
3943
|
+
- [
|
|
3944
|
+
"功能B",
|
|
3945
|
+
"{{status}}",
|
|
3946
|
+
"{{status}}",
|
|
3947
|
+
"{{status}}",
|
|
3948
|
+
"{{status}}",
|
|
3949
|
+
]
|
|
4221
3950
|
- category: "用户体验"
|
|
4222
3951
|
items:
|
|
4223
|
-
- [
|
|
3952
|
+
- [
|
|
3953
|
+
"移动应用",
|
|
3954
|
+
"{{rating}}",
|
|
3955
|
+
"{{rating}}",
|
|
3956
|
+
"{{rating}}",
|
|
3957
|
+
"{{rating}}",
|
|
3958
|
+
]
|
|
4224
3959
|
- ["上手时间", "{{time}}", "{{time}}", "{{time}}", "{{time}}"]
|
|
4225
3960
|
- category: "集成与生态系统"
|
|
4226
3961
|
items:
|
|
@@ -4231,11 +3966,23 @@ sections:
|
|
|
4231
3966
|
"{{availability}}",
|
|
4232
3967
|
"{{availability}}",
|
|
4233
3968
|
]
|
|
4234
|
-
- [
|
|
3969
|
+
- [
|
|
3970
|
+
"第三方集成",
|
|
3971
|
+
"{{number}}",
|
|
3972
|
+
"{{number}}",
|
|
3973
|
+
"{{number}}",
|
|
3974
|
+
"{{number}}",
|
|
3975
|
+
]
|
|
4235
3976
|
- category: "定价与计划"
|
|
4236
3977
|
items:
|
|
4237
3978
|
- ["起步价", "{{price}}", "{{price}}", "{{price}}", "{{price}}"]
|
|
4238
|
-
- [
|
|
3979
|
+
- [
|
|
3980
|
+
"免费套餐",
|
|
3981
|
+
"{{yes_no}}",
|
|
3982
|
+
"{{yes_no}}",
|
|
3983
|
+
"{{yes_no}}",
|
|
3984
|
+
"{{yes_no}}",
|
|
3985
|
+
]
|
|
4239
3986
|
- id: swot-comparison
|
|
4240
3987
|
title: SWOT 对比
|
|
4241
3988
|
instruction: 为你的解决方案与主要竞争对手创建 SWOT 分析
|
|
@@ -6959,7 +6706,12 @@ sections:
|
|
|
6959
6706
|
rows:
|
|
6960
6707
|
- ["移动端", "{{mobile_min}}", "{{mobile_max}}", "{{mobile_devices}}"]
|
|
6961
6708
|
- ["平板", "{{tablet_min}}", "{{tablet_max}}", "{{tablet_devices}}"]
|
|
6962
|
-
- [
|
|
6709
|
+
- [
|
|
6710
|
+
"桌面端",
|
|
6711
|
+
"{{desktop_min}}",
|
|
6712
|
+
"{{desktop_max}}",
|
|
6713
|
+
"{{desktop_devices}}",
|
|
6714
|
+
]
|
|
6963
6715
|
- ["宽屏", "{{wide_min}}", "-", "{{wide_devices}}"]
|
|
6964
6716
|
- id: adaptation-patterns
|
|
6965
6717
|
title: 适配模式
|
|
@@ -8237,17 +7989,83 @@ sections:
|
|
|
8237
7989
|
columns: [类别, 技术, 版本, 用途, 选型理由]
|
|
8238
7990
|
instruction: 根据所选框架和项目需求,填写适当的技术选型。
|
|
8239
7991
|
rows:
|
|
8240
|
-
- [
|
|
8241
|
-
|
|
8242
|
-
|
|
8243
|
-
|
|
8244
|
-
|
|
8245
|
-
|
|
8246
|
-
|
|
8247
|
-
- [
|
|
8248
|
-
|
|
8249
|
-
|
|
8250
|
-
|
|
7992
|
+
- [
|
|
7993
|
+
"框架",
|
|
7994
|
+
"{{framework}}",
|
|
7995
|
+
"{{version}}",
|
|
7996
|
+
"{{purpose}}",
|
|
7997
|
+
"{{why_chosen}}",
|
|
7998
|
+
]
|
|
7999
|
+
- [
|
|
8000
|
+
"UI 库",
|
|
8001
|
+
"{{ui_library}}",
|
|
8002
|
+
"{{version}}",
|
|
8003
|
+
"{{purpose}}",
|
|
8004
|
+
"{{why_chosen}}",
|
|
8005
|
+
]
|
|
8006
|
+
- [
|
|
8007
|
+
"状态管理",
|
|
8008
|
+
"{{state_management}}",
|
|
8009
|
+
"{{version}}",
|
|
8010
|
+
"{{purpose}}",
|
|
8011
|
+
"{{why_chosen}}",
|
|
8012
|
+
]
|
|
8013
|
+
- [
|
|
8014
|
+
"路由",
|
|
8015
|
+
"{{routing_library}}",
|
|
8016
|
+
"{{version}}",
|
|
8017
|
+
"{{purpose}}",
|
|
8018
|
+
"{{why_chosen}}",
|
|
8019
|
+
]
|
|
8020
|
+
- [
|
|
8021
|
+
"构建工具",
|
|
8022
|
+
"{{build_tool}}",
|
|
8023
|
+
"{{version}}",
|
|
8024
|
+
"{{purpose}}",
|
|
8025
|
+
"{{why_chosen}}",
|
|
8026
|
+
]
|
|
8027
|
+
- [
|
|
8028
|
+
"样式方案",
|
|
8029
|
+
"{{styling_solution}}",
|
|
8030
|
+
"{{version}}",
|
|
8031
|
+
"{{purpose}}",
|
|
8032
|
+
"{{why_chosen}}",
|
|
8033
|
+
]
|
|
8034
|
+
- [
|
|
8035
|
+
"测试",
|
|
8036
|
+
"{{test_framework}}",
|
|
8037
|
+
"{{version}}",
|
|
8038
|
+
"{{purpose}}",
|
|
8039
|
+
"{{why_chosen}}",
|
|
8040
|
+
]
|
|
8041
|
+
- [
|
|
8042
|
+
"组件库",
|
|
8043
|
+
"{{component_lib}}",
|
|
8044
|
+
"{{version}}",
|
|
8045
|
+
"{{purpose}}",
|
|
8046
|
+
"{{why_chosen}}",
|
|
8047
|
+
]
|
|
8048
|
+
- [
|
|
8049
|
+
"表单处理",
|
|
8050
|
+
"{{form_library}}",
|
|
8051
|
+
"{{version}}",
|
|
8052
|
+
"{{purpose}}",
|
|
8053
|
+
"{{why_chosen}}",
|
|
8054
|
+
]
|
|
8055
|
+
- [
|
|
8056
|
+
"动画",
|
|
8057
|
+
"{{animation_lib}}",
|
|
8058
|
+
"{{version}}",
|
|
8059
|
+
"{{purpose}}",
|
|
8060
|
+
"{{why_chosen}}",
|
|
8061
|
+
]
|
|
8062
|
+
- [
|
|
8063
|
+
"开发工具",
|
|
8064
|
+
"{{dev_tools}}",
|
|
8065
|
+
"{{version}}",
|
|
8066
|
+
"{{purpose}}",
|
|
8067
|
+
"{{why_chosen}}",
|
|
8068
|
+
]
|
|
8251
8069
|
|
|
8252
8070
|
- id: project-structure
|
|
8253
8071
|
title: 项目结构
|
|
@@ -8528,27 +8346,147 @@ sections:
|
|
|
8528
8346
|
type: table
|
|
8529
8347
|
columns: [类别, 技术, 版本, 用途, 理由]
|
|
8530
8348
|
rows:
|
|
8531
|
-
- [
|
|
8532
|
-
|
|
8533
|
-
|
|
8534
|
-
|
|
8535
|
-
|
|
8536
|
-
|
|
8537
|
-
|
|
8538
|
-
- [
|
|
8539
|
-
|
|
8540
|
-
|
|
8349
|
+
- [
|
|
8350
|
+
"前端语言",
|
|
8351
|
+
"{{fe_language}}",
|
|
8352
|
+
"{{version}}",
|
|
8353
|
+
"{{purpose}}",
|
|
8354
|
+
"{{why_chosen}}",
|
|
8355
|
+
]
|
|
8356
|
+
- [
|
|
8357
|
+
"前端框架",
|
|
8358
|
+
"{{fe_framework}}",
|
|
8359
|
+
"{{version}}",
|
|
8360
|
+
"{{purpose}}",
|
|
8361
|
+
"{{why_chosen}}",
|
|
8362
|
+
]
|
|
8363
|
+
- [
|
|
8364
|
+
"UI 组件库",
|
|
8365
|
+
"{{ui_library}}",
|
|
8366
|
+
"{{version}}",
|
|
8367
|
+
"{{purpose}}",
|
|
8368
|
+
"{{why_chosen}}",
|
|
8369
|
+
]
|
|
8370
|
+
- [
|
|
8371
|
+
"状态管理",
|
|
8372
|
+
"{{state_mgmt}}",
|
|
8373
|
+
"{{version}}",
|
|
8374
|
+
"{{purpose}}",
|
|
8375
|
+
"{{why_chosen}}",
|
|
8376
|
+
]
|
|
8377
|
+
- [
|
|
8378
|
+
"后端语言",
|
|
8379
|
+
"{{be_language}}",
|
|
8380
|
+
"{{version}}",
|
|
8381
|
+
"{{purpose}}",
|
|
8382
|
+
"{{why_chosen}}",
|
|
8383
|
+
]
|
|
8384
|
+
- [
|
|
8385
|
+
"后端框架",
|
|
8386
|
+
"{{be_framework}}",
|
|
8387
|
+
"{{version}}",
|
|
8388
|
+
"{{purpose}}",
|
|
8389
|
+
"{{why_chosen}}",
|
|
8390
|
+
]
|
|
8391
|
+
- [
|
|
8392
|
+
"API 风格",
|
|
8393
|
+
"{{api_style}}",
|
|
8394
|
+
"{{version}}",
|
|
8395
|
+
"{{purpose}}",
|
|
8396
|
+
"{{why_chosen}}",
|
|
8397
|
+
]
|
|
8398
|
+
- [
|
|
8399
|
+
"数据库",
|
|
8400
|
+
"{{database}}",
|
|
8401
|
+
"{{version}}",
|
|
8402
|
+
"{{purpose}}",
|
|
8403
|
+
"{{why_chosen}}",
|
|
8404
|
+
]
|
|
8405
|
+
- [
|
|
8406
|
+
"缓存",
|
|
8407
|
+
"{{cache}}",
|
|
8408
|
+
"{{version}}",
|
|
8409
|
+
"{{purpose}}",
|
|
8410
|
+
"{{why_chosen}}",
|
|
8411
|
+
]
|
|
8412
|
+
- [
|
|
8413
|
+
"文件存储",
|
|
8414
|
+
"{{storage}}",
|
|
8415
|
+
"{{version}}",
|
|
8416
|
+
"{{purpose}}",
|
|
8417
|
+
"{{why_chosen}}",
|
|
8418
|
+
]
|
|
8541
8419
|
- ["认证", "{{auth}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
|
|
8542
|
-
- [
|
|
8543
|
-
|
|
8544
|
-
|
|
8545
|
-
|
|
8546
|
-
|
|
8547
|
-
|
|
8548
|
-
|
|
8549
|
-
- [
|
|
8550
|
-
|
|
8551
|
-
|
|
8420
|
+
- [
|
|
8421
|
+
"前端测试",
|
|
8422
|
+
"{{fe_test}}",
|
|
8423
|
+
"{{version}}",
|
|
8424
|
+
"{{purpose}}",
|
|
8425
|
+
"{{why_chosen}}",
|
|
8426
|
+
]
|
|
8427
|
+
- [
|
|
8428
|
+
"后端测试",
|
|
8429
|
+
"{{be_test}}",
|
|
8430
|
+
"{{version}}",
|
|
8431
|
+
"{{purpose}}",
|
|
8432
|
+
"{{why_chosen}}",
|
|
8433
|
+
]
|
|
8434
|
+
- [
|
|
8435
|
+
"E2E 测试",
|
|
8436
|
+
"{{e2e_test}}",
|
|
8437
|
+
"{{version}}",
|
|
8438
|
+
"{{purpose}}",
|
|
8439
|
+
"{{why_chosen}}",
|
|
8440
|
+
]
|
|
8441
|
+
- [
|
|
8442
|
+
"构建工具",
|
|
8443
|
+
"{{build_tool}}",
|
|
8444
|
+
"{{version}}",
|
|
8445
|
+
"{{purpose}}",
|
|
8446
|
+
"{{why_chosen}}",
|
|
8447
|
+
]
|
|
8448
|
+
- [
|
|
8449
|
+
"打包工具",
|
|
8450
|
+
"{{bundler}}",
|
|
8451
|
+
"{{version}}",
|
|
8452
|
+
"{{purpose}}",
|
|
8453
|
+
"{{why_chosen}}",
|
|
8454
|
+
]
|
|
8455
|
+
- [
|
|
8456
|
+
"IaC 工具",
|
|
8457
|
+
"{{iac_tool}}",
|
|
8458
|
+
"{{version}}",
|
|
8459
|
+
"{{purpose}}",
|
|
8460
|
+
"{{why_chosen}}",
|
|
8461
|
+
]
|
|
8462
|
+
- [
|
|
8463
|
+
"CI/CD",
|
|
8464
|
+
"{{cicd}}",
|
|
8465
|
+
"{{version}}",
|
|
8466
|
+
"{{purpose}}",
|
|
8467
|
+
"{{why_chosen}}",
|
|
8468
|
+
]
|
|
8469
|
+
- [
|
|
8470
|
+
"监控",
|
|
8471
|
+
"{{monitoring}}",
|
|
8472
|
+
"{{version}}",
|
|
8473
|
+
"{{purpose}}",
|
|
8474
|
+
"{{why_chosen}}",
|
|
8475
|
+
]
|
|
8476
|
+
- [
|
|
8477
|
+
"日志",
|
|
8478
|
+
"{{logging}}",
|
|
8479
|
+
"{{version}}",
|
|
8480
|
+
"{{purpose}}",
|
|
8481
|
+
"{{why_chosen}}",
|
|
8482
|
+
]
|
|
8483
|
+
- [
|
|
8484
|
+
"CSS 框架",
|
|
8485
|
+
"{{css_framework}}",
|
|
8486
|
+
"{{version}}",
|
|
8487
|
+
"{{purpose}}",
|
|
8488
|
+
"{{why_chosen}}",
|
|
8489
|
+
]
|
|
8552
8490
|
|
|
8553
8491
|
- id: data-models
|
|
8554
8492
|
title: 数据模型
|
|
@@ -10506,12 +10444,12 @@ ALWAYS cite source documents: `[Source: architecture/{filename}.md#{section}]`
|
|
|
10506
10444
|
#### 2.1 基础信息填写
|
|
10507
10445
|
|
|
10508
10446
|
```yaml
|
|
10509
|
-
epic_num:
|
|
10510
|
-
story_num:
|
|
10511
|
-
story_title_short:
|
|
10512
|
-
role:
|
|
10513
|
-
action:
|
|
10514
|
-
benefit:
|
|
10447
|
+
epic_num: "{{epic_number}}"
|
|
10448
|
+
story_num: "{{story_number}}"
|
|
10449
|
+
story_title_short: "{{story_title}}"
|
|
10450
|
+
role: "{{user_role}}"
|
|
10451
|
+
action: "{{user_action}}"
|
|
10452
|
+
benefit: "{{user_benefit}}"
|
|
10515
10453
|
```
|
|
10516
10454
|
|
|
10517
10455
|
#### 2.2 数据库设计部分填写
|
|
@@ -12021,13 +11959,13 @@ Implement fixes based on QA results (gate and assessments) for a specific story.
|
|
|
12021
11959
|
|
|
12022
11960
|
```yaml
|
|
12023
11961
|
required:
|
|
12024
|
-
- story_id:
|
|
11962
|
+
- story_id: "{epic}.{story}" # e.g., "2.2"
|
|
12025
11963
|
- qa_root: from `xiaoma-core/core-config.yaml` key `qa.qaLocation` (e.g., `docs/project/qa`)
|
|
12026
11964
|
- story_root: from `xiaoma-core/core-config.yaml` key `devStoryLocation` (e.g., `docs/project/stories`)
|
|
12027
11965
|
|
|
12028
11966
|
optional:
|
|
12029
|
-
- story_title:
|
|
12030
|
-
- story_slug:
|
|
11967
|
+
- story_title: "{title}" # derive from story H1 if missing
|
|
11968
|
+
- story_slug: "{slug}" # derive from title (lowercase, hyphenated) if missing
|
|
12031
11969
|
```
|
|
12032
11970
|
|
|
12033
11971
|
## QA Sources to Read
|
|
@@ -12352,16 +12290,16 @@ nfr_validation:
|
|
|
12352
12290
|
_assessed: [security, performance, reliability, maintainability]
|
|
12353
12291
|
security:
|
|
12354
12292
|
status: CONCERNS
|
|
12355
|
-
notes:
|
|
12293
|
+
notes: "No rate limiting on auth endpoints"
|
|
12356
12294
|
performance:
|
|
12357
12295
|
status: PASS
|
|
12358
|
-
notes:
|
|
12296
|
+
notes: "Response times < 200ms verified"
|
|
12359
12297
|
reliability:
|
|
12360
12298
|
status: PASS
|
|
12361
|
-
notes:
|
|
12299
|
+
notes: "Error handling and retries implemented"
|
|
12362
12300
|
maintainability:
|
|
12363
12301
|
status: CONCERNS
|
|
12364
|
-
notes:
|
|
12302
|
+
notes: "Test coverage at 65%, target is 80%"
|
|
12365
12303
|
```
|
|
12366
12304
|
|
|
12367
12305
|
## Deterministic Status Rules
|
|
@@ -12591,10 +12529,10 @@ performance_deep_dive:
|
|
|
12591
12529
|
p99: 350ms
|
|
12592
12530
|
database:
|
|
12593
12531
|
slow_queries: 2
|
|
12594
|
-
missing_indexes: [
|
|
12532
|
+
missing_indexes: ["users.email", "orders.user_id"]
|
|
12595
12533
|
caching:
|
|
12596
12534
|
hit_rate: 0%
|
|
12597
|
-
recommendation:
|
|
12535
|
+
recommendation: "Add Redis for session data"
|
|
12598
12536
|
load_test:
|
|
12599
12537
|
max_rps: 150
|
|
12600
12538
|
breaking_point: 200 rps
|
|
@@ -12635,11 +12573,11 @@ Slug rules:
|
|
|
12635
12573
|
|
|
12636
12574
|
```yaml
|
|
12637
12575
|
schema: 1
|
|
12638
|
-
story:
|
|
12576
|
+
story: "{epic}.{story}"
|
|
12639
12577
|
gate: PASS|CONCERNS|FAIL|WAIVED
|
|
12640
|
-
status_reason:
|
|
12641
|
-
reviewer:
|
|
12642
|
-
updated:
|
|
12578
|
+
status_reason: "1-2 sentence explanation of gate decision"
|
|
12579
|
+
reviewer: "Quinn"
|
|
12580
|
+
updated: "{ISO-8601 timestamp}"
|
|
12643
12581
|
top_issues: [] # Empty array if no issues
|
|
12644
12582
|
waiver: { active: false } # Only set active: true if WAIVED
|
|
12645
12583
|
```
|
|
@@ -12648,20 +12586,20 @@ waiver: { active: false } # Only set active: true if WAIVED
|
|
|
12648
12586
|
|
|
12649
12587
|
```yaml
|
|
12650
12588
|
schema: 1
|
|
12651
|
-
story:
|
|
12589
|
+
story: "1.3"
|
|
12652
12590
|
gate: CONCERNS
|
|
12653
|
-
status_reason:
|
|
12654
|
-
reviewer:
|
|
12655
|
-
updated:
|
|
12591
|
+
status_reason: "Missing rate limiting on auth endpoints poses security risk."
|
|
12592
|
+
reviewer: "Quinn"
|
|
12593
|
+
updated: "2025-01-12T10:15:00Z"
|
|
12656
12594
|
top_issues:
|
|
12657
|
-
- id:
|
|
12595
|
+
- id: "SEC-001"
|
|
12658
12596
|
severity: high # ONLY: low|medium|high
|
|
12659
|
-
finding:
|
|
12660
|
-
suggested_action:
|
|
12661
|
-
- id:
|
|
12597
|
+
finding: "No rate limiting on login endpoint"
|
|
12598
|
+
suggested_action: "Add rate limiting middleware before production"
|
|
12599
|
+
- id: "TEST-001"
|
|
12662
12600
|
severity: medium
|
|
12663
|
-
finding:
|
|
12664
|
-
suggested_action:
|
|
12601
|
+
finding: "No integration tests for auth flow"
|
|
12602
|
+
suggested_action: "Add integration test coverage"
|
|
12665
12603
|
waiver: { active: false }
|
|
12666
12604
|
```
|
|
12667
12605
|
|
|
@@ -12669,20 +12607,20 @@ waiver: { active: false }
|
|
|
12669
12607
|
|
|
12670
12608
|
```yaml
|
|
12671
12609
|
schema: 1
|
|
12672
|
-
story:
|
|
12610
|
+
story: "1.3"
|
|
12673
12611
|
gate: WAIVED
|
|
12674
|
-
status_reason:
|
|
12675
|
-
reviewer:
|
|
12676
|
-
updated:
|
|
12612
|
+
status_reason: "Known issues accepted for MVP release."
|
|
12613
|
+
reviewer: "Quinn"
|
|
12614
|
+
updated: "2025-01-12T10:15:00Z"
|
|
12677
12615
|
top_issues:
|
|
12678
|
-
- id:
|
|
12616
|
+
- id: "PERF-001"
|
|
12679
12617
|
severity: low
|
|
12680
|
-
finding:
|
|
12681
|
-
suggested_action:
|
|
12618
|
+
finding: "Dashboard loads slowly with 1000+ items"
|
|
12619
|
+
suggested_action: "Implement pagination in next sprint"
|
|
12682
12620
|
waiver:
|
|
12683
12621
|
active: true
|
|
12684
|
-
reason:
|
|
12685
|
-
approved_by:
|
|
12622
|
+
reason: "MVP release - performance optimization deferred"
|
|
12623
|
+
approved_by: "Product Owner"
|
|
12686
12624
|
```
|
|
12687
12625
|
|
|
12688
12626
|
## Gate Decision Criteria
|
|
@@ -12780,10 +12718,10 @@ Perform a comprehensive test architecture review with quality gate decision. Thi
|
|
|
12780
12718
|
|
|
12781
12719
|
```yaml
|
|
12782
12720
|
required:
|
|
12783
|
-
- story_id:
|
|
12784
|
-
- story_path:
|
|
12785
|
-
- story_title:
|
|
12786
|
-
- story_slug:
|
|
12721
|
+
- story_id: "{epic}.{story}" # e.g., "1.3"
|
|
12722
|
+
- story_path: "{devStoryLocation}/{epic}.{story}.*.md" # Path from core-config.yaml
|
|
12723
|
+
- story_title: "{title}" # If missing, derive from story file H1
|
|
12724
|
+
- story_slug: "{slug}" # If missing, derive from title (lowercase, hyphenated)
|
|
12787
12725
|
```
|
|
12788
12726
|
|
|
12789
12727
|
## Prerequisites
|
|
@@ -12965,19 +12903,19 @@ Gate file structure:
|
|
|
12965
12903
|
|
|
12966
12904
|
```yaml
|
|
12967
12905
|
schema: 1
|
|
12968
|
-
story:
|
|
12969
|
-
story_title:
|
|
12906
|
+
story: "{epic}.{story}"
|
|
12907
|
+
story_title: "{story title}"
|
|
12970
12908
|
gate: PASS|CONCERNS|FAIL|WAIVED
|
|
12971
|
-
status_reason:
|
|
12972
|
-
reviewer:
|
|
12973
|
-
updated:
|
|
12909
|
+
status_reason: "1-2 sentence explanation of gate decision"
|
|
12910
|
+
reviewer: "Quinn (Test Architect)"
|
|
12911
|
+
updated: "{ISO-8601 timestamp}"
|
|
12974
12912
|
|
|
12975
12913
|
top_issues: [] # Empty if no issues
|
|
12976
12914
|
waiver: { active: false } # Set active: true only if WAIVED
|
|
12977
12915
|
|
|
12978
12916
|
# Extended fields (optional but recommended):
|
|
12979
12917
|
quality_score: 0-100 # 100 - (20*FAILs) - (10*CONCERNS) or use technical-preferences.md weights
|
|
12980
|
-
expires:
|
|
12918
|
+
expires: "{ISO-8601 timestamp}" # Typically 2 weeks from review
|
|
12981
12919
|
|
|
12982
12920
|
evidence:
|
|
12983
12921
|
tests_reviewed: { count }
|
|
@@ -12989,24 +12927,24 @@ evidence:
|
|
|
12989
12927
|
nfr_validation:
|
|
12990
12928
|
security:
|
|
12991
12929
|
status: PASS|CONCERNS|FAIL
|
|
12992
|
-
notes:
|
|
12930
|
+
notes: "Specific findings"
|
|
12993
12931
|
performance:
|
|
12994
12932
|
status: PASS|CONCERNS|FAIL
|
|
12995
|
-
notes:
|
|
12933
|
+
notes: "Specific findings"
|
|
12996
12934
|
reliability:
|
|
12997
12935
|
status: PASS|CONCERNS|FAIL
|
|
12998
|
-
notes:
|
|
12936
|
+
notes: "Specific findings"
|
|
12999
12937
|
maintainability:
|
|
13000
12938
|
status: PASS|CONCERNS|FAIL
|
|
13001
|
-
notes:
|
|
12939
|
+
notes: "Specific findings"
|
|
13002
12940
|
|
|
13003
12941
|
recommendations:
|
|
13004
12942
|
immediate: # Must fix before production
|
|
13005
|
-
- action:
|
|
13006
|
-
refs: [
|
|
12943
|
+
- action: "Add rate limiting"
|
|
12944
|
+
refs: ["api/auth/login.ts"]
|
|
13007
12945
|
future: # Can be addressed later
|
|
13008
|
-
- action:
|
|
13009
|
-
refs: [
|
|
12946
|
+
- action: "Consider caching"
|
|
12947
|
+
refs: ["services/data.ts"]
|
|
13010
12948
|
```
|
|
13011
12949
|
|
|
13012
12950
|
### Gate Decision Criteria
|
|
@@ -13099,10 +13037,10 @@ Generate a comprehensive risk assessment matrix for a story implementation using
|
|
|
13099
13037
|
|
|
13100
13038
|
```yaml
|
|
13101
13039
|
required:
|
|
13102
|
-
- story_id:
|
|
13103
|
-
- story_path:
|
|
13104
|
-
- story_title:
|
|
13105
|
-
- story_slug:
|
|
13040
|
+
- story_id: "{epic}.{story}" # e.g., "1.3"
|
|
13041
|
+
- story_path: "docs/stories/{epic}.{story}.*.md"
|
|
13042
|
+
- story_title: "{title}" # If missing, derive from story file H1
|
|
13043
|
+
- story_slug: "{slug}" # If missing, derive from title (lowercase, hyphenated)
|
|
13106
13044
|
```
|
|
13107
13045
|
|
|
13108
13046
|
## Purpose
|
|
@@ -13172,14 +13110,14 @@ For each category, identify specific risks:
|
|
|
13172
13110
|
|
|
13173
13111
|
```yaml
|
|
13174
13112
|
risk:
|
|
13175
|
-
id:
|
|
13113
|
+
id: "SEC-001" # Use prefixes: SEC, PERF, DATA, BUS, OPS, TECH
|
|
13176
13114
|
category: security
|
|
13177
|
-
title:
|
|
13178
|
-
description:
|
|
13115
|
+
title: "Insufficient input validation on user forms"
|
|
13116
|
+
description: "Form inputs not properly sanitized could lead to XSS attacks"
|
|
13179
13117
|
affected_components:
|
|
13180
|
-
-
|
|
13181
|
-
-
|
|
13182
|
-
detection_method:
|
|
13118
|
+
- "UserRegistrationForm"
|
|
13119
|
+
- "ProfileUpdateForm"
|
|
13120
|
+
detection_method: "Code review revealed missing validation"
|
|
13183
13121
|
```
|
|
13184
13122
|
|
|
13185
13123
|
### 2. Risk Assessment
|
|
@@ -13226,20 +13164,20 @@ For each identified risk, provide mitigation:
|
|
|
13226
13164
|
|
|
13227
13165
|
```yaml
|
|
13228
13166
|
mitigation:
|
|
13229
|
-
risk_id:
|
|
13230
|
-
strategy:
|
|
13167
|
+
risk_id: "SEC-001"
|
|
13168
|
+
strategy: "preventive" # preventive|detective|corrective
|
|
13231
13169
|
actions:
|
|
13232
|
-
-
|
|
13233
|
-
-
|
|
13234
|
-
-
|
|
13235
|
-
-
|
|
13170
|
+
- "Implement input validation library (e.g., validator.js)"
|
|
13171
|
+
- "Add CSP headers to prevent XSS execution"
|
|
13172
|
+
- "Sanitize all user inputs before storage"
|
|
13173
|
+
- "Escape all outputs in templates"
|
|
13236
13174
|
testing_requirements:
|
|
13237
|
-
-
|
|
13238
|
-
-
|
|
13239
|
-
-
|
|
13240
|
-
residual_risk:
|
|
13241
|
-
owner:
|
|
13242
|
-
timeline:
|
|
13175
|
+
- "Security testing with OWASP ZAP"
|
|
13176
|
+
- "Manual penetration testing of forms"
|
|
13177
|
+
- "Unit tests for validation functions"
|
|
13178
|
+
residual_risk: "Low - Some zero-day vulnerabilities may remain"
|
|
13179
|
+
owner: "dev"
|
|
13180
|
+
timeline: "Before deployment"
|
|
13243
13181
|
```
|
|
13244
13182
|
|
|
13245
13183
|
## Outputs
|
|
@@ -13265,12 +13203,12 @@ risk_summary:
|
|
|
13265
13203
|
highest:
|
|
13266
13204
|
id: SEC-001
|
|
13267
13205
|
score: 9
|
|
13268
|
-
title:
|
|
13206
|
+
title: "XSS on profile form"
|
|
13269
13207
|
recommendations:
|
|
13270
13208
|
must_fix:
|
|
13271
|
-
-
|
|
13209
|
+
- "Add input sanitization & CSP"
|
|
13272
13210
|
monitor:
|
|
13273
|
-
-
|
|
13211
|
+
- "Add security alerts for auth endpoints"
|
|
13274
13212
|
```
|
|
13275
13213
|
|
|
13276
13214
|
### Output 2: Markdown Report
|
|
@@ -13457,10 +13395,10 @@ Create comprehensive test scenarios with appropriate test level recommendations
|
|
|
13457
13395
|
|
|
13458
13396
|
```yaml
|
|
13459
13397
|
required:
|
|
13460
|
-
- story_id:
|
|
13461
|
-
- story_path:
|
|
13462
|
-
- story_title:
|
|
13463
|
-
- story_slug:
|
|
13398
|
+
- story_id: "{epic}.{story}" # e.g., "1.3"
|
|
13399
|
+
- story_path: "{devStoryLocation}/{epic}.{story}.*.md" # Path from core-config.yaml
|
|
13400
|
+
- story_title: "{title}" # If missing, derive from story file H1
|
|
13401
|
+
- story_slug: "{slug}" # If missing, derive from title (lowercase, hyphenated)
|
|
13464
13402
|
```
|
|
13465
13403
|
|
|
13466
13404
|
## Purpose
|
|
@@ -13513,13 +13451,13 @@ For each identified test need, create:
|
|
|
13513
13451
|
|
|
13514
13452
|
```yaml
|
|
13515
13453
|
test_scenario:
|
|
13516
|
-
id:
|
|
13517
|
-
requirement:
|
|
13454
|
+
id: "{epic}.{story}-{LEVEL}-{SEQ}"
|
|
13455
|
+
requirement: "AC reference"
|
|
13518
13456
|
priority: P0|P1|P2|P3
|
|
13519
13457
|
level: unit|integration|e2e
|
|
13520
|
-
description:
|
|
13521
|
-
justification:
|
|
13522
|
-
mitigates_risks: [
|
|
13458
|
+
description: "What is being tested"
|
|
13459
|
+
justification: "Why this level was chosen"
|
|
13460
|
+
mitigates_risks: ["RISK-001"] # If risk profile exists
|
|
13523
13461
|
```
|
|
13524
13462
|
|
|
13525
13463
|
### 5. Validate Coverage
|
|
@@ -13661,21 +13599,21 @@ Identify all testable requirements from:
|
|
|
13661
13599
|
For each requirement, document which tests validate it. Use Given-When-Then to describe what the test validates (not how it's written):
|
|
13662
13600
|
|
|
13663
13601
|
```yaml
|
|
13664
|
-
requirement:
|
|
13602
|
+
requirement: "AC1: User can login with valid credentials"
|
|
13665
13603
|
test_mappings:
|
|
13666
|
-
- test_file:
|
|
13667
|
-
test_case:
|
|
13604
|
+
- test_file: "auth/login.test.ts"
|
|
13605
|
+
test_case: "should successfully login with valid email and password"
|
|
13668
13606
|
# Given-When-Then describes WHAT the test validates, not HOW it's coded
|
|
13669
|
-
given:
|
|
13670
|
-
when:
|
|
13671
|
-
then:
|
|
13607
|
+
given: "A registered user with valid credentials"
|
|
13608
|
+
when: "They submit the login form"
|
|
13609
|
+
then: "They are redirected to dashboard and session is created"
|
|
13672
13610
|
coverage: full
|
|
13673
13611
|
|
|
13674
|
-
- test_file:
|
|
13675
|
-
test_case:
|
|
13676
|
-
given:
|
|
13677
|
-
when:
|
|
13678
|
-
then:
|
|
13612
|
+
- test_file: "e2e/auth-flow.test.ts"
|
|
13613
|
+
test_case: "complete login flow"
|
|
13614
|
+
given: "User on login page"
|
|
13615
|
+
when: "Entering valid credentials and submitting"
|
|
13616
|
+
then: "Dashboard loads with user data"
|
|
13679
13617
|
coverage: integration
|
|
13680
13618
|
```
|
|
13681
13619
|
|
|
@@ -13697,19 +13635,19 @@ Document any gaps found:
|
|
|
13697
13635
|
|
|
13698
13636
|
```yaml
|
|
13699
13637
|
coverage_gaps:
|
|
13700
|
-
- requirement:
|
|
13701
|
-
gap:
|
|
13638
|
+
- requirement: "AC3: Password reset email sent within 60 seconds"
|
|
13639
|
+
gap: "No test for email delivery timing"
|
|
13702
13640
|
severity: medium
|
|
13703
13641
|
suggested_test:
|
|
13704
13642
|
type: integration
|
|
13705
|
-
description:
|
|
13643
|
+
description: "Test email service SLA compliance"
|
|
13706
13644
|
|
|
13707
|
-
- requirement:
|
|
13708
|
-
gap:
|
|
13645
|
+
- requirement: "AC5: Support 1000 concurrent users"
|
|
13646
|
+
gap: "No load testing implemented"
|
|
13709
13647
|
severity: high
|
|
13710
13648
|
suggested_test:
|
|
13711
13649
|
type: performance
|
|
13712
|
-
description:
|
|
13650
|
+
description: "Load test with 1000 concurrent connections"
|
|
13713
13651
|
```
|
|
13714
13652
|
|
|
13715
13653
|
## Outputs
|
|
@@ -13725,11 +13663,11 @@ trace:
|
|
|
13725
13663
|
full: Y
|
|
13726
13664
|
partial: Z
|
|
13727
13665
|
none: W
|
|
13728
|
-
planning_ref:
|
|
13666
|
+
planning_ref: "qa.qaLocation/assessments/{epic}.{story}-test-design-{YYYYMMDD}.md"
|
|
13729
13667
|
uncovered:
|
|
13730
|
-
- ac:
|
|
13731
|
-
reason:
|
|
13732
|
-
notes:
|
|
13668
|
+
- ac: "AC3"
|
|
13669
|
+
reason: "No test found for password reset timing"
|
|
13670
|
+
notes: "See qa.qaLocation/assessments/{epic}.{story}-trace-{YYYYMMDD}.md"
|
|
13733
13671
|
```
|
|
13734
13672
|
|
|
13735
13673
|
### Output 2: Traceability Report
|