@zeyue0329/xiaoma-cli 1.0.47 → 1.0.49
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 +5 -2
- package/dist/agents/analyst.txt +273 -21
- package/dist/agents/architect.txt +1135 -0
- package/dist/agents/dev.txt +606 -2
- package/dist/agents/pm.txt +854 -0
- package/dist/agents/sm.txt +986 -3
- package/dist/teams/team-all.txt +3944 -116
- package/dist/teams/team-fullstack-with-database.txt +4060 -232
- package/dist/teams/team-fullstack.txt +2295 -54
- package/dist/teams/team-ide-minimal.txt +1592 -5
- package/dist/teams/team-no-ui.txt +2295 -54
- package/package.json +1 -1
- package/xiaoma-core/agents/architect.md +3 -0
- package/xiaoma-core/agents/dev.md +67 -2
- package/xiaoma-core/agents/pm.md +3 -0
- package/xiaoma-core/agents/sm.md +61 -3
- package/xiaoma-core/tasks/create-incremental-architecture.md +525 -0
- package/xiaoma-core/tasks/create-prd-from-rag.md +435 -0
- package/xiaoma-core/tasks/create-story-with-rag.md +559 -0
- package/xiaoma-core/tasks/develop-story-with-rag.md +536 -0
- package/xiaoma-core/tasks/requirement-analysis-with-rag.md +273 -21
- package/xiaoma-core/templates/incremental-architecture-tmpl.yaml +601 -0
- package/xiaoma-core/templates/prd-from-rag-tmpl.yaml +410 -0
- package/xiaoma-core/templates/story-with-rag-tmpl.yaml +360 -0
|
@@ -79,6 +79,7 @@ commands:
|
|
|
79
79
|
- create-brownfield-architecture: 使用 create-doc 和 brownfield-architecture-tmpl.yaml
|
|
80
80
|
- create-front-end-architecture: 使用 create-doc 和 front-end-architecture-tmpl.yaml
|
|
81
81
|
- create-full-stack-architecture: 使用 create-doc 和 fullstack-architecture-tmpl.yaml
|
|
82
|
+
- create-incremental-architecture: 基于知识库和PRD进行架构增量设计 (任务 create-incremental-architecture.md,模板 incremental-architecture-tmpl.yaml)
|
|
82
83
|
- doc-out: 将完整文档输出到当前目标文件
|
|
83
84
|
- document-project: 执行任务 document-project.md
|
|
84
85
|
- execute-checklist {checklist}: 运行任务 execute-checklist (默认为->architect-checklist)
|
|
@@ -95,6 +96,7 @@ dependencies:
|
|
|
95
96
|
tasks:
|
|
96
97
|
- create-deep-research-prompt.md
|
|
97
98
|
- create-doc.md
|
|
99
|
+
- create-incremental-architecture.md
|
|
98
100
|
- document-project.md
|
|
99
101
|
- execute-checklist.md
|
|
100
102
|
- shard-doc.md
|
|
@@ -103,6 +105,7 @@ dependencies:
|
|
|
103
105
|
- brownfield-architecture-tmpl.yaml
|
|
104
106
|
- front-end-architecture-tmpl.yaml
|
|
105
107
|
- fullstack-architecture-tmpl.yaml
|
|
108
|
+
- incremental-architecture-tmpl.yaml
|
|
106
109
|
```
|
|
107
110
|
==================== END: .xiaoma-core/agents/architect.md ====================
|
|
108
111
|
|
|
@@ -495,6 +498,534 @@ User can type `#yolo` to toggle to YOLO mode (process all sections at once).
|
|
|
495
498
|
- End with "Select 1-9 or just type your question/feedback:"
|
|
496
499
|
==================== END: .xiaoma-core/tasks/create-doc.md ====================
|
|
497
500
|
|
|
501
|
+
==================== START: .xiaoma-core/tasks/create-incremental-architecture.md ====================
|
|
502
|
+
# 基于知识库的架构增量设计任务
|
|
503
|
+
|
|
504
|
+
## Purpose
|
|
505
|
+
|
|
506
|
+
基于 Analyst 智能体的技术知识库产出(`docs/rag/technical/`)和 PM 智能体生成的 PRD/Epic 文档,进行架构增量设计。通过对比现有技术架构与新需求,识别技术变动点,生成架构增量设计文档。
|
|
507
|
+
|
|
508
|
+
## 上游交接物
|
|
509
|
+
|
|
510
|
+
```yaml
|
|
511
|
+
必需输入:
|
|
512
|
+
PRD/Epic文档:
|
|
513
|
+
- docs/prd.md # PM生成的PRD文档
|
|
514
|
+
- 或 docs/epic-{name}.md # PM生成的Epic文档
|
|
515
|
+
|
|
516
|
+
技术知识库:
|
|
517
|
+
- docs/rag/technical/architecture.md # 现有技术架构
|
|
518
|
+
- docs/rag/technical/tech-stack.md # 技术栈详情
|
|
519
|
+
- docs/rag/technical/module-structure.md # 模块结构
|
|
520
|
+
- docs/rag/technical/data-model.md # 数据模型
|
|
521
|
+
|
|
522
|
+
可选输入:
|
|
523
|
+
分析报告:
|
|
524
|
+
- docs/rag/_analysis-report.md # 需求分析报告(技术分析章节)
|
|
525
|
+
|
|
526
|
+
编码规范:
|
|
527
|
+
- docs/rag/technical/coding-standards/ # 编码规范目录
|
|
528
|
+
- docs/rag/technical/middleware/ # 中间件规范目录
|
|
529
|
+
|
|
530
|
+
约束条件:
|
|
531
|
+
- docs/rag/constraints/security.md # 安全要求
|
|
532
|
+
- docs/rag/constraints/performance.md # 性能要求
|
|
533
|
+
```
|
|
534
|
+
|
|
535
|
+
## Workflow Overview
|
|
536
|
+
|
|
537
|
+
```
|
|
538
|
+
技术知识库 + PRD → 架构差异分析 → 变动点识别 → 增量设计 → 影响评估 → 架构增量文档
|
|
539
|
+
```
|
|
540
|
+
|
|
541
|
+
---
|
|
542
|
+
|
|
543
|
+
## Phase 1: 输入验证与上下文加载
|
|
544
|
+
|
|
545
|
+
### 1.1 验证上游交接物
|
|
546
|
+
|
|
547
|
+
```yaml
|
|
548
|
+
执行步骤:
|
|
549
|
+
步骤1_检查PRD文档:
|
|
550
|
+
动作: 检查 docs/prd.md 或 docs/epic-{name}.md 是否存在
|
|
551
|
+
缺失处理: |
|
|
552
|
+
如果缺失PRD文档,提示用户:
|
|
553
|
+
"未找到PRD文档。请先执行 PM 智能体的 *create-prd-from-rag 命令生成PRD。"
|
|
554
|
+
|
|
555
|
+
步骤2_检查技术知识库:
|
|
556
|
+
动作: 检查 docs/rag/technical/ 目录是否存在核心文件
|
|
557
|
+
核心文件:
|
|
558
|
+
- architecture.md (现有架构)
|
|
559
|
+
- data-model.md (数据模型)
|
|
560
|
+
缺失处理: |
|
|
561
|
+
如果技术知识库不完整,提示用户:
|
|
562
|
+
"技术知识库不完整。建议先执行 Analyst 智能体完善技术知识:
|
|
563
|
+
- 缺少 architecture.md:需要补充整体技术架构信息
|
|
564
|
+
- 缺少 data-model.md:需要补充现有数据模型信息"
|
|
565
|
+
|
|
566
|
+
步骤3_加载现有架构:
|
|
567
|
+
动作: 读取并解析技术知识库
|
|
568
|
+
提取内容:
|
|
569
|
+
- 整体架构模式(单体/微服务/DDD等)
|
|
570
|
+
- 技术栈详情(框架、数据库、中间件)
|
|
571
|
+
- 模块结构(包结构、分层规范)
|
|
572
|
+
- 现有数据模型(表结构、实体关系)
|
|
573
|
+
- 编码规范(命名、注释、异常处理)
|
|
574
|
+
- 中间件使用方式(Redis、MQ、ES等)
|
|
575
|
+
|
|
576
|
+
步骤4_加载PRD需求:
|
|
577
|
+
动作: 读取并解析PRD文档
|
|
578
|
+
提取内容:
|
|
579
|
+
- 功能性需求(FR列表)
|
|
580
|
+
- 非功能性需求(NFR列表)
|
|
581
|
+
- 数据实体与关系
|
|
582
|
+
- 技术约束
|
|
583
|
+
- Epic/Story结构
|
|
584
|
+
```
|
|
585
|
+
|
|
586
|
+
### 1.2 上下文整合视图
|
|
587
|
+
|
|
588
|
+
```yaml
|
|
589
|
+
整合输出:
|
|
590
|
+
现有架构视图:
|
|
591
|
+
架构模式: {从architecture.md提取}
|
|
592
|
+
技术栈:
|
|
593
|
+
后端: {框架、版本}
|
|
594
|
+
数据库: {类型、版本}
|
|
595
|
+
缓存: {类型、用途}
|
|
596
|
+
消息队列: {类型、用途}
|
|
597
|
+
模块结构: {包结构、分层}
|
|
598
|
+
数据模型: {现有实体、关系}
|
|
599
|
+
|
|
600
|
+
新需求视图:
|
|
601
|
+
功能需求: {FR列表}
|
|
602
|
+
数据需求: {新增/修改实体}
|
|
603
|
+
性能需求: {NFR中的性能要求}
|
|
604
|
+
安全需求: {NFR中的安全要求}
|
|
605
|
+
```
|
|
606
|
+
|
|
607
|
+
---
|
|
608
|
+
|
|
609
|
+
## Phase 2: 架构差异分析
|
|
610
|
+
|
|
611
|
+
### 2.1 技术变动检测
|
|
612
|
+
|
|
613
|
+
```yaml
|
|
614
|
+
检测维度:
|
|
615
|
+
架构层面变动:
|
|
616
|
+
检测项:
|
|
617
|
+
- 是否需要新增模块/服务
|
|
618
|
+
- 是否需要调整分层结构
|
|
619
|
+
- 是否需要引入新的架构模式
|
|
620
|
+
判定标准:
|
|
621
|
+
无变动: 完全遵循现有模块结构
|
|
622
|
+
小变动: 在现有模块内新增包/类
|
|
623
|
+
中变动: 新增独立模块
|
|
624
|
+
大变动: 需要调整整体架构
|
|
625
|
+
|
|
626
|
+
技术栈变动:
|
|
627
|
+
检测项:
|
|
628
|
+
- 是否需要引入新框架/库
|
|
629
|
+
- 是否需要升级现有依赖版本
|
|
630
|
+
- 是否需要新增中间件
|
|
631
|
+
判定标准:
|
|
632
|
+
无变动: 使用现有技术栈
|
|
633
|
+
小变动: 新增工具类库
|
|
634
|
+
中变动: 引入新中间件
|
|
635
|
+
大变动: 核心框架变更
|
|
636
|
+
|
|
637
|
+
数据模型变动:
|
|
638
|
+
检测项:
|
|
639
|
+
- 新增数据实体
|
|
640
|
+
- 修改现有实体(字段增减)
|
|
641
|
+
- 新增实体关系
|
|
642
|
+
- 索引变更
|
|
643
|
+
判定标准:
|
|
644
|
+
无变动: 完全使用现有表结构
|
|
645
|
+
小变动: 现有表新增字段
|
|
646
|
+
中变动: 新增表/修改关联关系
|
|
647
|
+
大变动: 数据模型重构
|
|
648
|
+
|
|
649
|
+
接口变动:
|
|
650
|
+
检测项:
|
|
651
|
+
- 新增API端点
|
|
652
|
+
- 修改现有API
|
|
653
|
+
- 新增外部系统集成
|
|
654
|
+
判定标准:
|
|
655
|
+
无变动: 无接口变更
|
|
656
|
+
小变动: 新增内部API
|
|
657
|
+
中变动: 修改公开API/新增集成
|
|
658
|
+
大变动: API版本升级
|
|
659
|
+
|
|
660
|
+
中间件变动:
|
|
661
|
+
检测项:
|
|
662
|
+
- Redis使用变化(新增key类型、缓存策略)
|
|
663
|
+
- MQ使用变化(新增Topic/Queue)
|
|
664
|
+
- 定时任务变化
|
|
665
|
+
- ES索引变化
|
|
666
|
+
判定标准:
|
|
667
|
+
无变动: 遵循现有使用方式
|
|
668
|
+
小变动: 新增使用场景
|
|
669
|
+
中变动: 新增配置/调整策略
|
|
670
|
+
大变动: 中间件架构调整
|
|
671
|
+
```
|
|
672
|
+
|
|
673
|
+
### 2.2 变动分析报告
|
|
674
|
+
|
|
675
|
+
```yaml
|
|
676
|
+
分析输出格式:
|
|
677
|
+
变动总览:
|
|
678
|
+
总体变动等级: 无/小/中/大
|
|
679
|
+
主要变动领域: [列表]
|
|
680
|
+
风险等级: 低/中/高
|
|
681
|
+
|
|
682
|
+
详细变动清单:
|
|
683
|
+
- 变动ID: CHG-001
|
|
684
|
+
领域: 数据模型
|
|
685
|
+
类型: 新增
|
|
686
|
+
描述: 新增订单实体
|
|
687
|
+
影响范围: order模块
|
|
688
|
+
关联需求: FR1, FR2
|
|
689
|
+
风险等级: 低
|
|
690
|
+
|
|
691
|
+
兼容性分析:
|
|
692
|
+
向后兼容: 是/否
|
|
693
|
+
需要迁移: 是/否
|
|
694
|
+
影响范围: [受影响的模块/服务]
|
|
695
|
+
```
|
|
696
|
+
|
|
697
|
+
---
|
|
698
|
+
|
|
699
|
+
## Phase 3: 架构增量设计
|
|
700
|
+
|
|
701
|
+
### 3.1 设计原则
|
|
702
|
+
|
|
703
|
+
```yaml
|
|
704
|
+
设计原则:
|
|
705
|
+
最小变动原则:
|
|
706
|
+
- 优先在现有架构内扩展
|
|
707
|
+
- 避免不必要的重构
|
|
708
|
+
- 保持与现有代码风格一致
|
|
709
|
+
|
|
710
|
+
渐进演进原则:
|
|
711
|
+
- 设计可分阶段实施的方案
|
|
712
|
+
- 支持增量部署和回滚
|
|
713
|
+
- 考虑向后兼容性
|
|
714
|
+
|
|
715
|
+
知识复用原则:
|
|
716
|
+
- 复用知识库中的编码规范
|
|
717
|
+
- 遵循现有中间件使用模式
|
|
718
|
+
- 参考已有代码示例
|
|
719
|
+
```
|
|
720
|
+
|
|
721
|
+
### 3.2 增量设计内容
|
|
722
|
+
|
|
723
|
+
```yaml
|
|
724
|
+
设计内容:
|
|
725
|
+
模块增量设计:
|
|
726
|
+
新增模块:
|
|
727
|
+
- 模块名称
|
|
728
|
+
- 职责描述
|
|
729
|
+
- 包结构(遵循现有规范)
|
|
730
|
+
- 与现有模块的关系
|
|
731
|
+
修改模块:
|
|
732
|
+
- 模块名称
|
|
733
|
+
- 修改内容
|
|
734
|
+
- 修改理由
|
|
735
|
+
- 影响评估
|
|
736
|
+
|
|
737
|
+
数据模型增量设计:
|
|
738
|
+
新增实体:
|
|
739
|
+
- 实体名称
|
|
740
|
+
- 表名(遵循命名规范)
|
|
741
|
+
- 字段定义(遵循字段规范)
|
|
742
|
+
- 索引设计
|
|
743
|
+
- DDL语句
|
|
744
|
+
修改实体:
|
|
745
|
+
- 实体名称
|
|
746
|
+
- 修改字段
|
|
747
|
+
- 迁移脚本
|
|
748
|
+
- 兼容性说明
|
|
749
|
+
|
|
750
|
+
接口增量设计:
|
|
751
|
+
新增API:
|
|
752
|
+
- 接口路径(遵循URL规范)
|
|
753
|
+
- 请求方法
|
|
754
|
+
- 请求参数(遵循参数规范)
|
|
755
|
+
- 响应格式(遵循响应规范)
|
|
756
|
+
- 错误码定义
|
|
757
|
+
修改API:
|
|
758
|
+
- 接口路径
|
|
759
|
+
- 变更内容
|
|
760
|
+
- 版本策略
|
|
761
|
+
- 兼容性说明
|
|
762
|
+
|
|
763
|
+
中间件增量设计:
|
|
764
|
+
Redis:
|
|
765
|
+
- 新增Key定义(遵循Key命名规范)
|
|
766
|
+
- 数据结构选择
|
|
767
|
+
- 过期策略
|
|
768
|
+
- 代码示例(参考知识库)
|
|
769
|
+
MQ:
|
|
770
|
+
- 新增Topic/Queue
|
|
771
|
+
- 消息格式
|
|
772
|
+
- 消费者配置
|
|
773
|
+
- 代码示例(参考知识库)
|
|
774
|
+
定时任务:
|
|
775
|
+
- 任务名称
|
|
776
|
+
- 执行周期
|
|
777
|
+
- 实现方式
|
|
778
|
+
- 代码示例(参考知识库)
|
|
779
|
+
```
|
|
780
|
+
|
|
781
|
+
### 3.3 知识库规范引用
|
|
782
|
+
|
|
783
|
+
```yaml
|
|
784
|
+
规范引用:
|
|
785
|
+
编码规范引用:
|
|
786
|
+
来源: docs/rag/technical/coding-standards/
|
|
787
|
+
引用内容:
|
|
788
|
+
- 命名规范 → 类/方法/变量命名
|
|
789
|
+
- 分层规范 → Controller/Service/DAO实现
|
|
790
|
+
- 异常处理 → 错误处理方式
|
|
791
|
+
- 日志规范 → 日志打印方式
|
|
792
|
+
|
|
793
|
+
中间件规范引用:
|
|
794
|
+
来源: docs/rag/technical/middleware/
|
|
795
|
+
引用内容:
|
|
796
|
+
- Redis规范 → 缓存实现参考
|
|
797
|
+
- MQ规范 → 消息处理参考
|
|
798
|
+
- 定时任务规范 → 任务实现参考
|
|
799
|
+
|
|
800
|
+
SQL规范引用:
|
|
801
|
+
来源: docs/rag/technical/sql-standards/
|
|
802
|
+
引用内容:
|
|
803
|
+
- 表设计规范 → DDL编写
|
|
804
|
+
- 查询规范 → SQL编写
|
|
805
|
+
- 性能规范 → 索引设计
|
|
806
|
+
```
|
|
807
|
+
|
|
808
|
+
---
|
|
809
|
+
|
|
810
|
+
## Phase 4: 影响评估与风险分析
|
|
811
|
+
|
|
812
|
+
### 4.1 影响评估
|
|
813
|
+
|
|
814
|
+
```yaml
|
|
815
|
+
评估维度:
|
|
816
|
+
代码影响:
|
|
817
|
+
- 新增代码量估算
|
|
818
|
+
- 修改代码范围
|
|
819
|
+
- 测试代码需求
|
|
820
|
+
|
|
821
|
+
数据影响:
|
|
822
|
+
- 数据迁移需求
|
|
823
|
+
- 数据一致性风险
|
|
824
|
+
- 备份恢复策略
|
|
825
|
+
|
|
826
|
+
性能影响:
|
|
827
|
+
- 新增负载评估
|
|
828
|
+
- 资源需求变化
|
|
829
|
+
- 性能测试要求
|
|
830
|
+
|
|
831
|
+
部署影响:
|
|
832
|
+
- 部署步骤变更
|
|
833
|
+
- 配置变更
|
|
834
|
+
- 回滚方案
|
|
835
|
+
```
|
|
836
|
+
|
|
837
|
+
### 4.2 风险分析
|
|
838
|
+
|
|
839
|
+
```yaml
|
|
840
|
+
风险分析:
|
|
841
|
+
技术风险:
|
|
842
|
+
- 新技术引入风险
|
|
843
|
+
- 兼容性风险
|
|
844
|
+
- 性能风险
|
|
845
|
+
|
|
846
|
+
业务风险:
|
|
847
|
+
- 功能影响范围
|
|
848
|
+
- 数据安全风险
|
|
849
|
+
- 服务可用性风险
|
|
850
|
+
|
|
851
|
+
实施风险:
|
|
852
|
+
- 实施复杂度
|
|
853
|
+
- 团队技能匹配
|
|
854
|
+
- 时间约束
|
|
855
|
+
|
|
856
|
+
缓解措施:
|
|
857
|
+
- 每个风险的缓解方案
|
|
858
|
+
- 监控和告警策略
|
|
859
|
+
- 应急预案
|
|
860
|
+
```
|
|
861
|
+
|
|
862
|
+
---
|
|
863
|
+
|
|
864
|
+
## Phase 5: 输出架构增量文档
|
|
865
|
+
|
|
866
|
+
### 5.1 文档结构
|
|
867
|
+
|
|
868
|
+
```yaml
|
|
869
|
+
文档结构:
|
|
870
|
+
元信息:
|
|
871
|
+
- 文档版本
|
|
872
|
+
- 生成时间
|
|
873
|
+
- 关联PRD
|
|
874
|
+
- 关联知识库版本
|
|
875
|
+
|
|
876
|
+
变动总览:
|
|
877
|
+
- 变动等级
|
|
878
|
+
- 主要变动领域
|
|
879
|
+
- 风险等级
|
|
880
|
+
|
|
881
|
+
详细设计:
|
|
882
|
+
- 模块增量设计
|
|
883
|
+
- 数据模型增量设计
|
|
884
|
+
- 接口增量设计
|
|
885
|
+
- 中间件增量设计
|
|
886
|
+
|
|
887
|
+
实施指南:
|
|
888
|
+
- 实施顺序
|
|
889
|
+
- 依赖关系
|
|
890
|
+
- 检查点
|
|
891
|
+
|
|
892
|
+
知识引用:
|
|
893
|
+
- 引用的规范文档
|
|
894
|
+
- 代码示例来源
|
|
895
|
+
|
|
896
|
+
下游交接:
|
|
897
|
+
- 开发者交接
|
|
898
|
+
- QA交接
|
|
899
|
+
```
|
|
900
|
+
|
|
901
|
+
### 5.2 输出文件
|
|
902
|
+
|
|
903
|
+
```yaml
|
|
904
|
+
主输出:
|
|
905
|
+
架构增量文档:
|
|
906
|
+
路径: docs/architecture-increment.md
|
|
907
|
+
格式: Markdown
|
|
908
|
+
|
|
909
|
+
辅助输出:
|
|
910
|
+
变动清单:
|
|
911
|
+
路径: docs/architecture-changes.yaml
|
|
912
|
+
格式: YAML
|
|
913
|
+
内容: 结构化的变动清单,便于追踪
|
|
914
|
+
|
|
915
|
+
DDL脚本:
|
|
916
|
+
路径: docs/ddl/
|
|
917
|
+
格式: SQL
|
|
918
|
+
内容: 数据库变更脚本
|
|
919
|
+
|
|
920
|
+
知识引用索引:
|
|
921
|
+
路径: docs/architecture-knowledge-refs.md
|
|
922
|
+
内容: 设计中引用的知识库文档清单
|
|
923
|
+
```
|
|
924
|
+
|
|
925
|
+
---
|
|
926
|
+
|
|
927
|
+
## Phase 6: 下游交接
|
|
928
|
+
|
|
929
|
+
### 6.1 交接给开发者
|
|
930
|
+
|
|
931
|
+
```yaml
|
|
932
|
+
开发者交接:
|
|
933
|
+
必读文件:
|
|
934
|
+
- docs/architecture-increment.md # 架构增量设计
|
|
935
|
+
- docs/prd.md # PRD文档
|
|
936
|
+
- docs/rag/technical/coding-standards/ # 编码规范
|
|
937
|
+
|
|
938
|
+
关注点:
|
|
939
|
+
- 新增模块的包结构
|
|
940
|
+
- 数据模型变更
|
|
941
|
+
- 中间件使用方式(含代码示例)
|
|
942
|
+
- 接口设计规范
|
|
943
|
+
|
|
944
|
+
建议命令: "*start-development docs/architecture-increment.md"
|
|
945
|
+
```
|
|
946
|
+
|
|
947
|
+
### 6.2 交接给QA
|
|
948
|
+
|
|
949
|
+
```yaml
|
|
950
|
+
QA交接:
|
|
951
|
+
必读文件:
|
|
952
|
+
- docs/architecture-increment.md # 架构增量设计(测试策略章节)
|
|
953
|
+
- docs/prd.md # PRD文档(验收标准)
|
|
954
|
+
|
|
955
|
+
关注点:
|
|
956
|
+
- 功能测试范围
|
|
957
|
+
- 集成测试要求
|
|
958
|
+
- 回归测试范围
|
|
959
|
+
- 性能测试要求
|
|
960
|
+
|
|
961
|
+
建议命令: "*create-test-plan docs/architecture-increment.md"
|
|
962
|
+
```
|
|
963
|
+
|
|
964
|
+
---
|
|
965
|
+
|
|
966
|
+
## 使用说明
|
|
967
|
+
|
|
968
|
+
### 激活命令
|
|
969
|
+
|
|
970
|
+
```
|
|
971
|
+
*create-incremental-architecture [prd_path] [rag_path]
|
|
972
|
+
```
|
|
973
|
+
|
|
974
|
+
### 执行参数
|
|
975
|
+
|
|
976
|
+
```yaml
|
|
977
|
+
参数:
|
|
978
|
+
prd_path: PRD文档路径 (默认: docs/prd.md)
|
|
979
|
+
rag_path: RAG知识目录路径 (默认: docs/rag/)
|
|
980
|
+
output_path: 输出路径 (默认: docs/architecture-increment.md)
|
|
981
|
+
interactive: 交互模式 (默认: true)
|
|
982
|
+
```
|
|
983
|
+
|
|
984
|
+
### 交互模式流程
|
|
985
|
+
|
|
986
|
+
1. **验证阶段**: 检查上游交接物完整性
|
|
987
|
+
2. **分析阶段**: 展示架构差异分析结果,确认变动点
|
|
988
|
+
3. **设计阶段**: 逐模块进行增量设计,关键节点请求确认
|
|
989
|
+
4. **评估阶段**: 展示影响评估和风险分析
|
|
990
|
+
5. **输出阶段**: 生成架构增量文档,提示下游交接
|
|
991
|
+
|
|
992
|
+
### YOLO模式
|
|
993
|
+
|
|
994
|
+
通过 `*yolo` 命令切换YOLO模式,一次性完成所有步骤,跳过中间确认环节。
|
|
995
|
+
|
|
996
|
+
---
|
|
997
|
+
|
|
998
|
+
## 任务完成标志
|
|
999
|
+
|
|
1000
|
+
```yaml
|
|
1001
|
+
完成条件:
|
|
1002
|
+
必要输出:
|
|
1003
|
+
- docs/architecture-increment.md
|
|
1004
|
+
|
|
1005
|
+
完成提示: |
|
|
1006
|
+
✅ 架构增量设计完成!
|
|
1007
|
+
|
|
1008
|
+
📄 输出文件: docs/architecture-increment.md
|
|
1009
|
+
📊 变动等级: {change_level}
|
|
1010
|
+
⚠️ 风险等级: {risk_level}
|
|
1011
|
+
|
|
1012
|
+
📋 变动摘要:
|
|
1013
|
+
- 模块变动: {module_changes}
|
|
1014
|
+
- 数据模型变动: {data_model_changes}
|
|
1015
|
+
- 接口变动: {api_changes}
|
|
1016
|
+
- 中间件变动: {middleware_changes}
|
|
1017
|
+
|
|
1018
|
+
🔄 下一步建议:
|
|
1019
|
+
- 开发实施: *start-development docs/architecture-increment.md
|
|
1020
|
+
- 测试计划: *create-test-plan docs/architecture-increment.md
|
|
1021
|
+
|
|
1022
|
+
💡 请在开发前确认架构设计,特别关注:
|
|
1023
|
+
- 风险清单中的高风险项
|
|
1024
|
+
- 数据迁移方案
|
|
1025
|
+
- 回滚策略
|
|
1026
|
+
```
|
|
1027
|
+
==================== END: .xiaoma-core/tasks/create-incremental-architecture.md ====================
|
|
1028
|
+
|
|
498
1029
|
==================== START: .xiaoma-core/tasks/document-project.md ====================
|
|
499
1030
|
<!-- Powered by XiaoMa™ Core -->
|
|
500
1031
|
|
|
@@ -3459,6 +3990,610 @@ sections:
|
|
|
3459
3990
|
instruction: 在运行检查清单前,提议输出完整的架构文档。一旦用户确认,执行 architect-checklist 并在此处填充结果。
|
|
3460
3991
|
==================== END: .xiaoma-core/templates/fullstack-architecture-tmpl.yaml ====================
|
|
3461
3992
|
|
|
3993
|
+
==================== START: .xiaoma-core/templates/incremental-architecture-tmpl.yaml ====================
|
|
3994
|
+
template:
|
|
3995
|
+
id: incremental-architecture-template-v1
|
|
3996
|
+
name: 架构增量设计文档
|
|
3997
|
+
version: 1.0
|
|
3998
|
+
description: 基于知识库和PRD进行架构增量设计,识别技术变动并生成增量架构文档
|
|
3999
|
+
output:
|
|
4000
|
+
format: markdown
|
|
4001
|
+
filename: docs/architecture-increment.md
|
|
4002
|
+
title: "{{project_name}} 架构增量设计文档"
|
|
4003
|
+
|
|
4004
|
+
workflow:
|
|
4005
|
+
mode: interactive
|
|
4006
|
+
elicitation: advanced-elicitation
|
|
4007
|
+
upstream:
|
|
4008
|
+
agents:
|
|
4009
|
+
- analyst # 提供技术知识库
|
|
4010
|
+
- pm # 提供PRD文档
|
|
4011
|
+
required_files:
|
|
4012
|
+
- docs/prd.md
|
|
4013
|
+
- docs/rag/technical/architecture.md
|
|
4014
|
+
optional_files:
|
|
4015
|
+
- docs/rag/technical/tech-stack.md
|
|
4016
|
+
- docs/rag/technical/data-model.md
|
|
4017
|
+
- docs/rag/technical/module-structure.md
|
|
4018
|
+
- docs/rag/technical/coding-standards/*
|
|
4019
|
+
- docs/rag/technical/middleware/*
|
|
4020
|
+
- docs/rag/constraints/*
|
|
4021
|
+
|
|
4022
|
+
sections:
|
|
4023
|
+
- id: input-validation
|
|
4024
|
+
title: 输入验证
|
|
4025
|
+
internal: true
|
|
4026
|
+
instruction: |
|
|
4027
|
+
在开始架构设计之前,执行以下验证:
|
|
4028
|
+
|
|
4029
|
+
1. **检查PRD文档**:
|
|
4030
|
+
- docs/prd.md 或 docs/epic-{name}.md 是否存在
|
|
4031
|
+
- 提取功能需求(FR)、非功能需求(NFR)、数据实体、技术约束
|
|
4032
|
+
|
|
4033
|
+
2. **检查技术知识库**:
|
|
4034
|
+
- docs/rag/technical/architecture.md (现有架构)
|
|
4035
|
+
- docs/rag/technical/data-model.md (现有数据模型)
|
|
4036
|
+
- docs/rag/technical/coding-standards/ (编码规范)
|
|
4037
|
+
- docs/rag/technical/middleware/ (中间件规范)
|
|
4038
|
+
|
|
4039
|
+
3. **加载现有架构信息**:
|
|
4040
|
+
- 架构模式、技术栈、模块结构
|
|
4041
|
+
- 现有数据实体和关系
|
|
4042
|
+
- 编码规范和中间件使用方式
|
|
4043
|
+
|
|
4044
|
+
如果缺少必需文件,提示:
|
|
4045
|
+
"⚠️ 缺少必需的输入文件:
|
|
4046
|
+
- PRD文档:请先执行 PM 智能体 *create-prd-from-rag
|
|
4047
|
+
- 技术知识库:请先执行 Analyst 智能体完善技术知识"
|
|
4048
|
+
|
|
4049
|
+
- id: document-header
|
|
4050
|
+
title: 文档信息
|
|
4051
|
+
sections:
|
|
4052
|
+
- id: meta-info
|
|
4053
|
+
title: 元信息
|
|
4054
|
+
template: |
|
|
4055
|
+
| 属性 | 值 |
|
|
4056
|
+
|------|-----|
|
|
4057
|
+
| 文档版本 | {{version}} |
|
|
4058
|
+
| 生成时间 | {{timestamp}} |
|
|
4059
|
+
| 关联PRD | {{prd_path}} |
|
|
4060
|
+
| 技术知识库版本 | {{rag_version}} |
|
|
4061
|
+
| 架构师 | Architect Agent |
|
|
4062
|
+
- id: changelog
|
|
4063
|
+
title: 变更日志
|
|
4064
|
+
type: table
|
|
4065
|
+
columns: [日期, 版本, 变更内容, 作者]
|
|
4066
|
+
|
|
4067
|
+
- id: existing-architecture-summary
|
|
4068
|
+
title: 现有架构概要
|
|
4069
|
+
instruction: |
|
|
4070
|
+
从技术知识库提取现有架构信息,作为增量设计的基线。
|
|
4071
|
+
|
|
4072
|
+
**来源**:
|
|
4073
|
+
- docs/rag/technical/architecture.md
|
|
4074
|
+
- docs/rag/technical/tech-stack.md
|
|
4075
|
+
- docs/rag/technical/module-structure.md
|
|
4076
|
+
sections:
|
|
4077
|
+
- id: architecture-pattern
|
|
4078
|
+
title: 架构模式
|
|
4079
|
+
instruction: 从 architecture.md 提取架构模式描述
|
|
4080
|
+
template: |
|
|
4081
|
+
**架构类型**: {{architecture_type}}
|
|
4082
|
+
**分层结构**: {{layer_structure}}
|
|
4083
|
+
**关键特征**: {{key_characteristics}}
|
|
4084
|
+
- id: tech-stack-baseline
|
|
4085
|
+
title: 技术栈基线
|
|
4086
|
+
type: table
|
|
4087
|
+
columns: [类别, 技术, 版本, 用途]
|
|
4088
|
+
instruction: 从 tech-stack.md 提取当前技术栈
|
|
4089
|
+
- id: module-structure-baseline
|
|
4090
|
+
title: 模块结构基线
|
|
4091
|
+
instruction: 从 module-structure.md 提取现有模块结构
|
|
4092
|
+
type: code
|
|
4093
|
+
language: plaintext
|
|
4094
|
+
- id: data-model-baseline
|
|
4095
|
+
title: 数据模型基线
|
|
4096
|
+
instruction: |
|
|
4097
|
+
从 data-model.md 提取现有数据实体清单。
|
|
4098
|
+
使用Mermaid ER图展示核心实体关系。
|
|
4099
|
+
|
|
4100
|
+
- id: requirement-extraction
|
|
4101
|
+
title: 需求提取
|
|
4102
|
+
instruction: |
|
|
4103
|
+
从PRD文档提取与架构相关的需求。
|
|
4104
|
+
|
|
4105
|
+
**来源**:
|
|
4106
|
+
- docs/prd.md 或 docs/epic-{name}.md
|
|
4107
|
+
sections:
|
|
4108
|
+
- id: functional-requirements
|
|
4109
|
+
title: 功能性需求摘要
|
|
4110
|
+
type: table
|
|
4111
|
+
columns: [需求ID, 需求描述, 架构影响, 优先级]
|
|
4112
|
+
instruction: |
|
|
4113
|
+
提取PRD中的功能性需求(FR),评估每个需求的架构影响:
|
|
4114
|
+
- 无影响:完全在现有架构内实现
|
|
4115
|
+
- 小影响:需要新增类/方法
|
|
4116
|
+
- 中影响:需要新增模块/表
|
|
4117
|
+
- 大影响:需要架构调整
|
|
4118
|
+
- id: non-functional-requirements
|
|
4119
|
+
title: 非功能性需求摘要
|
|
4120
|
+
type: table
|
|
4121
|
+
columns: [需求ID, 需求描述, 约束类型, 架构影响]
|
|
4122
|
+
instruction: 提取PRD中的非功能性需求(NFR),特别关注性能、安全、可用性约束
|
|
4123
|
+
- id: data-requirements
|
|
4124
|
+
title: 数据需求摘要
|
|
4125
|
+
type: table
|
|
4126
|
+
columns: [实体名称, 操作类型, 核心属性, 关联实体]
|
|
4127
|
+
instruction: |
|
|
4128
|
+
从PRD中提取数据实体需求,标注:
|
|
4129
|
+
- 新增:PRD中定义的新实体
|
|
4130
|
+
- 修改:需要变更的现有实体
|
|
4131
|
+
- 复用:直接使用的现有实体
|
|
4132
|
+
|
|
4133
|
+
- id: change-analysis
|
|
4134
|
+
title: 架构变动分析
|
|
4135
|
+
instruction: |
|
|
4136
|
+
对比现有架构与新需求,识别所有技术变动点。
|
|
4137
|
+
|
|
4138
|
+
**分析维度**:
|
|
4139
|
+
1. 架构层面变动
|
|
4140
|
+
2. 技术栈变动
|
|
4141
|
+
3. 数据模型变动
|
|
4142
|
+
4. 接口变动
|
|
4143
|
+
5. 中间件变动
|
|
4144
|
+
|
|
4145
|
+
展示分析结果,请用户确认变动识别是否准确。
|
|
4146
|
+
elicit: true
|
|
4147
|
+
sections:
|
|
4148
|
+
- id: change-overview
|
|
4149
|
+
title: 变动总览
|
|
4150
|
+
template: |
|
|
4151
|
+
| 维度 | 变动等级 | 变动数量 | 主要变动 |
|
|
4152
|
+
|------|----------|----------|----------|
|
|
4153
|
+
| 架构层面 | {{arch_level}} | {{arch_count}} | {{arch_main}} |
|
|
4154
|
+
| 技术栈 | {{tech_level}} | {{tech_count}} | {{tech_main}} |
|
|
4155
|
+
| 数据模型 | {{data_level}} | {{data_count}} | {{data_main}} |
|
|
4156
|
+
| 接口 | {{api_level}} | {{api_count}} | {{api_main}} |
|
|
4157
|
+
| 中间件 | {{mw_level}} | {{mw_count}} | {{mw_main}} |
|
|
4158
|
+
|
|
4159
|
+
**总体变动等级**: {{overall_level}}
|
|
4160
|
+
**风险等级**: {{risk_level}}
|
|
4161
|
+
- id: architecture-changes
|
|
4162
|
+
title: 架构层面变动
|
|
4163
|
+
condition: 存在架构层面变动
|
|
4164
|
+
sections:
|
|
4165
|
+
- id: new-modules
|
|
4166
|
+
title: 新增模块
|
|
4167
|
+
type: table
|
|
4168
|
+
columns: [模块名称, 职责, 所属层, 关联需求]
|
|
4169
|
+
- id: modified-modules
|
|
4170
|
+
title: 修改模块
|
|
4171
|
+
type: table
|
|
4172
|
+
columns: [模块名称, 变更内容, 变更原因, 关联需求]
|
|
4173
|
+
- id: tech-stack-changes
|
|
4174
|
+
title: 技术栈变动
|
|
4175
|
+
condition: 存在技术栈变动
|
|
4176
|
+
sections:
|
|
4177
|
+
- id: new-technologies
|
|
4178
|
+
title: 新增技术
|
|
4179
|
+
type: table
|
|
4180
|
+
columns: [技术名称, 版本, 用途, 引入理由, 替代方案]
|
|
4181
|
+
- id: version-upgrades
|
|
4182
|
+
title: 版本升级
|
|
4183
|
+
type: table
|
|
4184
|
+
columns: [技术名称, 当前版本, 目标版本, 升级原因, 兼容性风险]
|
|
4185
|
+
- id: data-model-changes
|
|
4186
|
+
title: 数据模型变动
|
|
4187
|
+
sections:
|
|
4188
|
+
- id: new-entities
|
|
4189
|
+
title: 新增实体
|
|
4190
|
+
type: table
|
|
4191
|
+
columns: [实体名称, 表名, 核心字段, 关联实体, 关联需求]
|
|
4192
|
+
- id: modified-entities
|
|
4193
|
+
title: 修改实体
|
|
4194
|
+
type: table
|
|
4195
|
+
columns: [实体名称, 变更字段, 变更类型, 兼容性, 关联需求]
|
|
4196
|
+
- id: new-relationships
|
|
4197
|
+
title: 新增关系
|
|
4198
|
+
type: table
|
|
4199
|
+
columns: [源实体, 目标实体, 关系类型, 关联字段, 关联需求]
|
|
4200
|
+
- id: api-changes
|
|
4201
|
+
title: 接口变动
|
|
4202
|
+
condition: 存在接口变动
|
|
4203
|
+
sections:
|
|
4204
|
+
- id: new-apis
|
|
4205
|
+
title: 新增API
|
|
4206
|
+
type: table
|
|
4207
|
+
columns: [接口路径, 方法, 功能描述, 关联需求]
|
|
4208
|
+
- id: modified-apis
|
|
4209
|
+
title: 修改API
|
|
4210
|
+
type: table
|
|
4211
|
+
columns: [接口路径, 变更内容, 兼容性策略, 关联需求]
|
|
4212
|
+
- id: middleware-changes
|
|
4213
|
+
title: 中间件变动
|
|
4214
|
+
condition: 存在中间件变动
|
|
4215
|
+
sections:
|
|
4216
|
+
- id: redis-changes
|
|
4217
|
+
title: Redis变动
|
|
4218
|
+
type: table
|
|
4219
|
+
columns: [Key名称, 数据结构, 用途, 过期策略, 关联需求]
|
|
4220
|
+
- id: mq-changes
|
|
4221
|
+
title: 消息队列变动
|
|
4222
|
+
type: table
|
|
4223
|
+
columns: [Topic/Queue, 消息类型, 生产者, 消费者, 关联需求]
|
|
4224
|
+
- id: scheduler-changes
|
|
4225
|
+
title: 定时任务变动
|
|
4226
|
+
type: table
|
|
4227
|
+
columns: [任务名称, 执行周期, 功能描述, 关联需求]
|
|
4228
|
+
|
|
4229
|
+
- id: incremental-design
|
|
4230
|
+
title: 增量设计详情
|
|
4231
|
+
instruction: |
|
|
4232
|
+
为每个变动点提供详细的增量设计方案。
|
|
4233
|
+
设计必须遵循知识库中的编码规范和中间件使用规范。
|
|
4234
|
+
elicit: true
|
|
4235
|
+
sections:
|
|
4236
|
+
- id: module-design
|
|
4237
|
+
title: 模块增量设计
|
|
4238
|
+
repeatable: true
|
|
4239
|
+
instruction: |
|
|
4240
|
+
为每个新增/修改的模块提供详细设计。
|
|
4241
|
+
包结构必须遵循 docs/rag/technical/module-structure.md 中的规范。
|
|
4242
|
+
sections:
|
|
4243
|
+
- id: module-detail
|
|
4244
|
+
title: "{{module_name}}"
|
|
4245
|
+
template: |
|
|
4246
|
+
**模块类型**: 新增 / 修改
|
|
4247
|
+
**职责描述**: {{responsibility}}
|
|
4248
|
+
**所属层**: {{layer}}
|
|
4249
|
+
**关联需求**: {{related_requirements}}
|
|
4250
|
+
sections:
|
|
4251
|
+
- id: package-structure
|
|
4252
|
+
title: 包结构设计
|
|
4253
|
+
instruction: 遵循现有模块结构规范设计包结构
|
|
4254
|
+
type: code
|
|
4255
|
+
language: plaintext
|
|
4256
|
+
- id: class-design
|
|
4257
|
+
title: 核心类设计
|
|
4258
|
+
instruction: |
|
|
4259
|
+
列出核心类及其职责,命名遵循编码规范:
|
|
4260
|
+
- Controller: {Module}Controller
|
|
4261
|
+
- Service: {Module}Service / {Module}ServiceImpl
|
|
4262
|
+
- DAO: {Module}Mapper / {Module}Repository
|
|
4263
|
+
type: table
|
|
4264
|
+
columns: [类名, 类型, 职责, 依赖]
|
|
4265
|
+
- id: integration-points
|
|
4266
|
+
title: 集成点
|
|
4267
|
+
instruction: 描述与现有模块的集成方式
|
|
4268
|
+
type: bullet-list
|
|
4269
|
+
|
|
4270
|
+
- id: data-model-design
|
|
4271
|
+
title: 数据模型增量设计
|
|
4272
|
+
repeatable: true
|
|
4273
|
+
instruction: |
|
|
4274
|
+
为每个新增/修改的数据实体提供详细设计。
|
|
4275
|
+
设计必须遵循 docs/rag/technical/sql-standards/ 中的规范。
|
|
4276
|
+
sections:
|
|
4277
|
+
- id: entity-detail
|
|
4278
|
+
title: "{{entity_name}}"
|
|
4279
|
+
template: |
|
|
4280
|
+
**操作类型**: 新增 / 修改
|
|
4281
|
+
**表名**: {{table_name}}
|
|
4282
|
+
**关联需求**: {{related_requirements}}
|
|
4283
|
+
sections:
|
|
4284
|
+
- id: field-design
|
|
4285
|
+
title: 字段设计
|
|
4286
|
+
type: table
|
|
4287
|
+
columns: [字段名, 类型, 长度, 约束, 默认值, 说明]
|
|
4288
|
+
instruction: 字段命名遵循数据库命名规范
|
|
4289
|
+
- id: index-design
|
|
4290
|
+
title: 索引设计
|
|
4291
|
+
type: table
|
|
4292
|
+
columns: [索引名, 类型, 字段, 用途]
|
|
4293
|
+
instruction: 索引命名遵循 idx_{表名}_{字段} 规范
|
|
4294
|
+
- id: ddl-script
|
|
4295
|
+
title: DDL脚本
|
|
4296
|
+
type: code
|
|
4297
|
+
language: sql
|
|
4298
|
+
instruction: |
|
|
4299
|
+
生成DDL脚本,遵循SQL规范:
|
|
4300
|
+
- 包含完整的字段定义
|
|
4301
|
+
- 包含索引创建
|
|
4302
|
+
- 包含注释
|
|
4303
|
+
- id: migration-script
|
|
4304
|
+
title: 迁移脚本
|
|
4305
|
+
condition: 修改现有表
|
|
4306
|
+
type: code
|
|
4307
|
+
language: sql
|
|
4308
|
+
instruction: 生成安全的迁移脚本,考虑向后兼容性
|
|
4309
|
+
|
|
4310
|
+
- id: api-design
|
|
4311
|
+
title: 接口增量设计
|
|
4312
|
+
repeatable: true
|
|
4313
|
+
condition: 存在接口变动
|
|
4314
|
+
instruction: |
|
|
4315
|
+
为每个新增/修改的API提供详细设计。
|
|
4316
|
+
设计必须遵循现有API规范。
|
|
4317
|
+
sections:
|
|
4318
|
+
- id: api-detail
|
|
4319
|
+
title: "{{api_name}}"
|
|
4320
|
+
template: |
|
|
4321
|
+
**操作类型**: 新增 / 修改
|
|
4322
|
+
**接口路径**: {{api_path}}
|
|
4323
|
+
**请求方法**: {{http_method}}
|
|
4324
|
+
**功能描述**: {{description}}
|
|
4325
|
+
**关联需求**: {{related_requirements}}
|
|
4326
|
+
sections:
|
|
4327
|
+
- id: request-design
|
|
4328
|
+
title: 请求设计
|
|
4329
|
+
sections:
|
|
4330
|
+
- id: request-params
|
|
4331
|
+
title: 请求参数
|
|
4332
|
+
type: table
|
|
4333
|
+
columns: [参数名, 类型, 必填, 说明, 示例]
|
|
4334
|
+
- id: request-body
|
|
4335
|
+
title: 请求体
|
|
4336
|
+
type: code
|
|
4337
|
+
language: json
|
|
4338
|
+
- id: response-design
|
|
4339
|
+
title: 响应设计
|
|
4340
|
+
sections:
|
|
4341
|
+
- id: success-response
|
|
4342
|
+
title: 成功响应
|
|
4343
|
+
type: code
|
|
4344
|
+
language: json
|
|
4345
|
+
- id: error-codes
|
|
4346
|
+
title: 错误码
|
|
4347
|
+
type: table
|
|
4348
|
+
columns: [错误码, 错误信息, 触发场景]
|
|
4349
|
+
- id: controller-skeleton
|
|
4350
|
+
title: Controller骨架代码
|
|
4351
|
+
type: code
|
|
4352
|
+
language: java
|
|
4353
|
+
instruction: |
|
|
4354
|
+
生成Controller骨架代码,遵循编码规范:
|
|
4355
|
+
- 使用正确的注解
|
|
4356
|
+
- 参数校验
|
|
4357
|
+
- 统一响应格式
|
|
4358
|
+
|
|
4359
|
+
- id: middleware-design
|
|
4360
|
+
title: 中间件增量设计
|
|
4361
|
+
condition: 存在中间件变动
|
|
4362
|
+
instruction: |
|
|
4363
|
+
为中间件使用提供详细设计。
|
|
4364
|
+
必须参考 docs/rag/technical/middleware/ 中的规范和代码示例。
|
|
4365
|
+
sections:
|
|
4366
|
+
- id: redis-design
|
|
4367
|
+
title: Redis设计
|
|
4368
|
+
condition: 存在Redis变动
|
|
4369
|
+
repeatable: true
|
|
4370
|
+
sections:
|
|
4371
|
+
- id: redis-detail
|
|
4372
|
+
title: "{{redis_key_name}}"
|
|
4373
|
+
template: |
|
|
4374
|
+
**Key模式**: {{key_pattern}}
|
|
4375
|
+
**数据结构**: {{data_structure}}
|
|
4376
|
+
**用途**: {{purpose}}
|
|
4377
|
+
**过期策略**: {{expiration}}
|
|
4378
|
+
**关联需求**: {{related_requirements}}
|
|
4379
|
+
sections:
|
|
4380
|
+
- id: redis-code-example
|
|
4381
|
+
title: 代码示例
|
|
4382
|
+
type: code
|
|
4383
|
+
language: java
|
|
4384
|
+
instruction: 参考 docs/rag/technical/middleware/redis.md 中的代码示例
|
|
4385
|
+
- id: mq-design
|
|
4386
|
+
title: 消息队列设计
|
|
4387
|
+
condition: 存在MQ变动
|
|
4388
|
+
repeatable: true
|
|
4389
|
+
sections:
|
|
4390
|
+
- id: mq-detail
|
|
4391
|
+
title: "{{topic_name}}"
|
|
4392
|
+
template: |
|
|
4393
|
+
**Topic/Queue**: {{topic_queue}}
|
|
4394
|
+
**消息类型**: {{message_type}}
|
|
4395
|
+
**生产者**: {{producer}}
|
|
4396
|
+
**消费者**: {{consumer}}
|
|
4397
|
+
**关联需求**: {{related_requirements}}
|
|
4398
|
+
sections:
|
|
4399
|
+
- id: message-schema
|
|
4400
|
+
title: 消息格式
|
|
4401
|
+
type: code
|
|
4402
|
+
language: json
|
|
4403
|
+
- id: producer-code
|
|
4404
|
+
title: 生产者代码示例
|
|
4405
|
+
type: code
|
|
4406
|
+
language: java
|
|
4407
|
+
instruction: 参考 docs/rag/technical/middleware/mq.md 中的代码示例
|
|
4408
|
+
- id: consumer-code
|
|
4409
|
+
title: 消费者代码示例
|
|
4410
|
+
type: code
|
|
4411
|
+
language: java
|
|
4412
|
+
- id: scheduler-design
|
|
4413
|
+
title: 定时任务设计
|
|
4414
|
+
condition: 存在定时任务变动
|
|
4415
|
+
repeatable: true
|
|
4416
|
+
sections:
|
|
4417
|
+
- id: scheduler-detail
|
|
4418
|
+
title: "{{task_name}}"
|
|
4419
|
+
template: |
|
|
4420
|
+
**任务名称**: {{task_name}}
|
|
4421
|
+
**执行周期**: {{cron_expression}}
|
|
4422
|
+
**功能描述**: {{description}}
|
|
4423
|
+
**关联需求**: {{related_requirements}}
|
|
4424
|
+
sections:
|
|
4425
|
+
- id: scheduler-code
|
|
4426
|
+
title: 任务代码示例
|
|
4427
|
+
type: code
|
|
4428
|
+
language: java
|
|
4429
|
+
instruction: 参考 docs/rag/technical/middleware/scheduler.md 中的代码示例
|
|
4430
|
+
|
|
4431
|
+
- id: impact-assessment
|
|
4432
|
+
title: 影响评估
|
|
4433
|
+
instruction: 评估架构变动的影响范围和风险
|
|
4434
|
+
elicit: true
|
|
4435
|
+
sections:
|
|
4436
|
+
- id: code-impact
|
|
4437
|
+
title: 代码影响
|
|
4438
|
+
template: |
|
|
4439
|
+
**新增代码量估算**: {{new_code_estimate}}
|
|
4440
|
+
**修改代码范围**: {{modified_code_scope}}
|
|
4441
|
+
**测试代码需求**: {{test_code_requirement}}
|
|
4442
|
+
- id: data-impact
|
|
4443
|
+
title: 数据影响
|
|
4444
|
+
template: |
|
|
4445
|
+
**数据迁移需求**: {{migration_requirement}}
|
|
4446
|
+
**数据一致性风险**: {{consistency_risk}}
|
|
4447
|
+
**备份恢复策略**: {{backup_strategy}}
|
|
4448
|
+
- id: performance-impact
|
|
4449
|
+
title: 性能影响
|
|
4450
|
+
template: |
|
|
4451
|
+
**新增负载评估**: {{load_estimate}}
|
|
4452
|
+
**资源需求变化**: {{resource_change}}
|
|
4453
|
+
**性能测试要求**: {{performance_test_requirement}}
|
|
4454
|
+
- id: deployment-impact
|
|
4455
|
+
title: 部署影响
|
|
4456
|
+
template: |
|
|
4457
|
+
**部署步骤变更**: {{deployment_change}}
|
|
4458
|
+
**配置变更**: {{config_change}}
|
|
4459
|
+
**回滚方案**: {{rollback_plan}}
|
|
4460
|
+
|
|
4461
|
+
- id: risk-analysis
|
|
4462
|
+
title: 风险分析
|
|
4463
|
+
sections:
|
|
4464
|
+
- id: risk-list
|
|
4465
|
+
title: 风险清单
|
|
4466
|
+
type: table
|
|
4467
|
+
columns: [风险ID, 风险类型, 风险描述, 可能性, 影响, 缓解措施]
|
|
4468
|
+
instruction: |
|
|
4469
|
+
识别所有风险,类型包括:
|
|
4470
|
+
- 技术风险:新技术引入、兼容性、性能
|
|
4471
|
+
- 业务风险:功能影响、数据安全、服务可用性
|
|
4472
|
+
- 实施风险:复杂度、技能匹配、时间约束
|
|
4473
|
+
- id: critical-risks
|
|
4474
|
+
title: 关键风险详述
|
|
4475
|
+
instruction: 对高风险项提供详细分析和缓解方案
|
|
4476
|
+
repeatable: true
|
|
4477
|
+
template: |
|
|
4478
|
+
### {{risk_name}}
|
|
4479
|
+
|
|
4480
|
+
**风险描述**: {{description}}
|
|
4481
|
+
**可能性**: {{probability}}
|
|
4482
|
+
**影响程度**: {{impact}}
|
|
4483
|
+
|
|
4484
|
+
**根因分析**: {{root_cause}}
|
|
4485
|
+
|
|
4486
|
+
**缓解措施**:
|
|
4487
|
+
{{mitigation_measures}}
|
|
4488
|
+
|
|
4489
|
+
**应急预案**:
|
|
4490
|
+
{{contingency_plan}}
|
|
4491
|
+
|
|
4492
|
+
**监控指标**:
|
|
4493
|
+
{{monitoring_metrics}}
|
|
4494
|
+
|
|
4495
|
+
- id: implementation-guide
|
|
4496
|
+
title: 实施指南
|
|
4497
|
+
sections:
|
|
4498
|
+
- id: implementation-sequence
|
|
4499
|
+
title: 实施顺序
|
|
4500
|
+
instruction: |
|
|
4501
|
+
基于依赖关系,规划实施顺序。
|
|
4502
|
+
每个阶段对应PRD中的Epic/Story。
|
|
4503
|
+
type: numbered-list
|
|
4504
|
+
template: |
|
|
4505
|
+
1. **阶段1: {{phase1_name}}**
|
|
4506
|
+
- Story: {{story_refs}}
|
|
4507
|
+
- 前置条件: {{prerequisites}}
|
|
4508
|
+
- 产出物: {{deliverables}}
|
|
4509
|
+
- 检查点: {{checkpoints}}
|
|
4510
|
+
- id: dependency-diagram
|
|
4511
|
+
title: 依赖关系图
|
|
4512
|
+
type: mermaid
|
|
4513
|
+
mermaid_type: graph
|
|
4514
|
+
instruction: 使用Mermaid图展示实施依赖关系
|
|
4515
|
+
- id: checkpoints
|
|
4516
|
+
title: 关键检查点
|
|
4517
|
+
type: table
|
|
4518
|
+
columns: [检查点, 阶段, 验证内容, 负责人]
|
|
4519
|
+
|
|
4520
|
+
- id: knowledge-references
|
|
4521
|
+
title: 知识引用索引
|
|
4522
|
+
instruction: 列出设计中引用的所有知识库文档
|
|
4523
|
+
sections:
|
|
4524
|
+
- id: architecture-refs
|
|
4525
|
+
title: 架构知识引用
|
|
4526
|
+
type: table
|
|
4527
|
+
columns: [文件路径, 引用章节, 引用内容]
|
|
4528
|
+
- id: coding-standard-refs
|
|
4529
|
+
title: 编码规范引用
|
|
4530
|
+
type: table
|
|
4531
|
+
columns: [文件路径, 引用规范, 应用位置]
|
|
4532
|
+
- id: middleware-refs
|
|
4533
|
+
title: 中间件规范引用
|
|
4534
|
+
type: table
|
|
4535
|
+
columns: [文件路径, 引用示例, 应用位置]
|
|
4536
|
+
|
|
4537
|
+
- id: next-steps
|
|
4538
|
+
title: 后续步骤
|
|
4539
|
+
sections:
|
|
4540
|
+
- id: developer-handoff
|
|
4541
|
+
title: 开发者交接
|
|
4542
|
+
instruction: |
|
|
4543
|
+
生成给开发者的交接提示,包含:
|
|
4544
|
+
- 需要阅读的文档清单
|
|
4545
|
+
- 编码规范要点
|
|
4546
|
+
- 实施注意事项
|
|
4547
|
+
template: |
|
|
4548
|
+
**交接给开发者**
|
|
4549
|
+
|
|
4550
|
+
请基于本架构增量设计文档进行开发:
|
|
4551
|
+
|
|
4552
|
+
**必读文档**:
|
|
4553
|
+
- 架构增量设计: docs/architecture-increment.md
|
|
4554
|
+
- PRD文档: {{prd_path}}
|
|
4555
|
+
- 编码规范: docs/rag/technical/coding-standards/
|
|
4556
|
+
|
|
4557
|
+
**开发重点**:
|
|
4558
|
+
- 变动模块: {{changed_modules}}
|
|
4559
|
+
- 数据模型变更: {{data_changes}}
|
|
4560
|
+
- 接口变更: {{api_changes}}
|
|
4561
|
+
|
|
4562
|
+
**注意事项**:
|
|
4563
|
+
- 严格遵循编码规范
|
|
4564
|
+
- 参考中间件代码示例
|
|
4565
|
+
- 每个Story完成后进行集成验证
|
|
4566
|
+
|
|
4567
|
+
**执行命令**: *start-development docs/architecture-increment.md
|
|
4568
|
+
- id: qa-handoff
|
|
4569
|
+
title: QA交接
|
|
4570
|
+
instruction: |
|
|
4571
|
+
生成给QA的交接提示,包含:
|
|
4572
|
+
- 测试范围
|
|
4573
|
+
- 重点测试项
|
|
4574
|
+
- 回归测试要求
|
|
4575
|
+
template: |
|
|
4576
|
+
**交接给QA**
|
|
4577
|
+
|
|
4578
|
+
请基于本架构增量设计制定测试计划:
|
|
4579
|
+
|
|
4580
|
+
**必读文档**:
|
|
4581
|
+
- 架构增量设计: docs/architecture-increment.md (影响评估章节)
|
|
4582
|
+
- PRD文档: {{prd_path}} (验收标准)
|
|
4583
|
+
|
|
4584
|
+
**测试范围**:
|
|
4585
|
+
- 新增功能: {{new_features}}
|
|
4586
|
+
- 修改功能: {{modified_features}}
|
|
4587
|
+
- 回归范围: {{regression_scope}}
|
|
4588
|
+
|
|
4589
|
+
**重点关注**:
|
|
4590
|
+
- 数据迁移验证
|
|
4591
|
+
- 接口兼容性测试
|
|
4592
|
+
- 性能影响验证
|
|
4593
|
+
|
|
4594
|
+
**执行命令**: *create-test-plan docs/architecture-increment.md
|
|
4595
|
+
==================== END: .xiaoma-core/templates/incremental-architecture-tmpl.yaml ====================
|
|
4596
|
+
|
|
3462
4597
|
==================== START: .xiaoma-core/checklists/architect-checklist.md ====================
|
|
3463
4598
|
<!-- Powered by XiaoMa™ Core -->
|
|
3464
4599
|
|