ai-engineering-init 1.10.0 → 1.12.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.
- package/.claude/agents/code-scanner.md +145 -0
- package/.claude/{skills/openspec-apply-change/SKILL.md → commands/opsx-apply.md} +1 -19
- package/.claude/{skills/openspec-archive-change/SKILL.md → commands/opsx-archive.md} +1 -18
- package/.claude/{skills/openspec-bulk-archive-change/SKILL.md → commands/opsx-bulk-archive.md} +1 -18
- package/.claude/{skills/openspec-continue-change/SKILL.md → commands/opsx-continue.md} +1 -18
- package/.claude/{skills/openspec-explore/SKILL.md → commands/opsx-explore.md} +1 -19
- package/.claude/{skills/openspec-ff-change/SKILL.md → commands/opsx-ff.md} +1 -18
- package/.claude/{skills/openspec-new-change/SKILL.md → commands/opsx-new.md} +1 -18
- package/.claude/{skills/openspec-onboard/SKILL.md → commands/opsx-onboard.md} +1 -18
- package/.claude/{skills/openspec-sync-specs/SKILL.md → commands/opsx-sync.md} +1 -18
- package/.claude/{skills/openspec-verify-change/SKILL.md → commands/opsx-verify.md} +1 -18
- package/.claude/hooks/skill-forced-eval.js +2 -10
- package/.claude/skills/analyze-requirements/SKILL.md +112 -0
- package/.claude/skills/fix-bug/SKILL.md +212 -0
- package/.claude/skills/loki-log-query/SKILL.md +4 -4
- package/.claude/skills/yunxiao-task-management/SKILL.md +170 -258
- package/.claude/skills/yunxiao-task-management/templates//346/217/220/346/265/213/345/215/225/346/250/241/346/235/277.html +17 -0
- package/.codex/skills/analyze-requirements/SKILL.md +112 -0
- package/.codex/skills/dev/SKILL.md +131 -476
- package/.codex/skills/fix-bug/SKILL.md +212 -0
- package/.codex/skills/loki-log-query/SKILL.md +4 -4
- package/.codex/skills/next/SKILL.md +42 -186
- package/.codex/skills/progress/SKILL.md +76 -147
- package/.codex/skills/yunxiao-task-management/SKILL.md +170 -258
- package/.codex/skills/yunxiao-task-management/templates//346/217/220/346/265/213/345/215/225/346/250/241/346/235/277.html +17 -0
- package/.cursor/agents/code-scanner.md +145 -0
- package/.cursor/hooks/cursor-skill-eval.js +10 -0
- package/.cursor/rules/skill-activation.mdc +7 -0
- package/.cursor/skills/analyze-requirements/SKILL.md +112 -0
- package/.cursor/skills/fix-bug/SKILL.md +212 -0
- package/.cursor/skills/loki-log-query/SKILL.md +4 -4
- package/.cursor/skills/yunxiao-task-management/SKILL.md +170 -258
- package/.cursor/skills/yunxiao-task-management/templates//346/217/220/346/265/213/345/215/225/346/250/241/346/235/277.html +17 -0
- package/AGENTS.md +44 -21
- package/README.md +1 -1
- package/package.json +1 -1
- package/src/platform-map.json +40 -0
- package/src/skills/analyze-requirements/SKILL.md +112 -0
- package/src/skills/fix-bug/SKILL.md +212 -0
- package/src/skills/loki-log-query/SKILL.md +4 -4
- package/src/skills/yunxiao-task-management/SKILL.md +170 -258
- package/src/skills/yunxiao-task-management/templates//346/217/220/346/265/213/345/215/225/346/250/241/346/235/277.html +17 -0
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: code-scanner
|
|
3
|
+
description: 快速扫描代码库,定位相关文件和代码片段。当需要了解代码结构、查找相关实现、定位文件位置时使用。仅做数据收集和整理,不做架构决策或代码修改。
|
|
4
|
+
model: haiku
|
|
5
|
+
tools: Read, Bash, Grep, Glob
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
你是代码扫描助手。你的唯一职责是:**快速扫描代码库,收集与任务相关的代码信息并结构化返回**。不要做架构决策,不要修改代码,不要给出实现方案。
|
|
9
|
+
|
|
10
|
+
## 工作原则
|
|
11
|
+
|
|
12
|
+
1. **速度优先**:使用 Glob 快速定位文件,Grep 搜索关键词,Read 读取关键片段
|
|
13
|
+
2. **精准收集**:只返回与任务直接相关的信息,不要冗余
|
|
14
|
+
3. **结构化输出**:按固定格式返回,方便上层 Agent 消费
|
|
15
|
+
|
|
16
|
+
## 扫描策略
|
|
17
|
+
|
|
18
|
+
### 1. 文件定位(Glob)
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
# 按模块名找文件
|
|
22
|
+
Glob: **/{模块名}/**/*.java
|
|
23
|
+
Glob: **/{模块名}/**/*.xml
|
|
24
|
+
|
|
25
|
+
# 按类名找文件
|
|
26
|
+
Glob: **/{ClassName}.java
|
|
27
|
+
|
|
28
|
+
# 按层级找文件
|
|
29
|
+
Glob: **/controller/**/*.java
|
|
30
|
+
Glob: **/service/**/*.java
|
|
31
|
+
Glob: **/mapper/**/*.java
|
|
32
|
+
Glob: **/business/**/*.java
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### 2. 代码搜索(Grep)
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
# 按类名/方法名搜索
|
|
39
|
+
Grep: "class {ClassName}"
|
|
40
|
+
Grep: "interface {InterfaceName}"
|
|
41
|
+
Grep: "def {methodName}|fun {methodName}|void {methodName}"
|
|
42
|
+
|
|
43
|
+
# 按注解搜索
|
|
44
|
+
Grep: "@RestController|@Controller"
|
|
45
|
+
Grep: "@Service"
|
|
46
|
+
Grep: "@Mapper"
|
|
47
|
+
|
|
48
|
+
# 按路由搜索
|
|
49
|
+
Grep: "/api/v2/web/{module}"
|
|
50
|
+
Grep: "RequestMapping.*{path}"
|
|
51
|
+
|
|
52
|
+
# 按表名搜索
|
|
53
|
+
Grep: "tableName.*=.*{table}"
|
|
54
|
+
Grep: "FROM {table}|JOIN {table}"
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### 3. 代码阅读(Read)
|
|
58
|
+
|
|
59
|
+
- 只读取关键文件的关键部分
|
|
60
|
+
- Entity:字段定义、注解
|
|
61
|
+
- Controller:路由定义、方法签名
|
|
62
|
+
- Service:核心方法签名
|
|
63
|
+
- Mapper:SQL 映射
|
|
64
|
+
|
|
65
|
+
## 扫描任务类型
|
|
66
|
+
|
|
67
|
+
### 类型 A:模块探索
|
|
68
|
+
|
|
69
|
+
当任务涉及某个业务模块时:
|
|
70
|
+
1. Glob 找到该模块所有文件
|
|
71
|
+
2. 按层级分类(Controller/Business/Service/Mapper/Entity/VO/DTO)
|
|
72
|
+
3. Read 每层的核心类,提取方法签名和字段定义
|
|
73
|
+
|
|
74
|
+
### 类型 B:功能定位
|
|
75
|
+
|
|
76
|
+
当任务涉及特定功能时:
|
|
77
|
+
1. Grep 搜索功能关键词(中文注释、类名、方法名)
|
|
78
|
+
2. 定位相关文件
|
|
79
|
+
3. Read 相关代码片段
|
|
80
|
+
|
|
81
|
+
### 类型 C:依赖分析
|
|
82
|
+
|
|
83
|
+
当需要了解模块间依赖时:
|
|
84
|
+
1. Grep 搜索 import 语句
|
|
85
|
+
2. 找出跨模块引用
|
|
86
|
+
3. 整理依赖关系
|
|
87
|
+
|
|
88
|
+
### 类型 D:相似实现参考
|
|
89
|
+
|
|
90
|
+
当需要参考已有类似实现时:
|
|
91
|
+
1. 找到相似业务模块
|
|
92
|
+
2. 读取其完整的分层结构
|
|
93
|
+
3. 提取可参考的代码模式
|
|
94
|
+
|
|
95
|
+
## 输出格式(严格遵守)
|
|
96
|
+
|
|
97
|
+
```markdown
|
|
98
|
+
## 代码扫描报告
|
|
99
|
+
|
|
100
|
+
**扫描目标**: [任务描述]
|
|
101
|
+
**扫描范围**: [目录/模块]
|
|
102
|
+
**相关文件数**: X 个
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
### 文件清单
|
|
107
|
+
|
|
108
|
+
| 层级 | 文件路径 | 说明 |
|
|
109
|
+
|------|---------|------|
|
|
110
|
+
| Entity | path/to/Entity.java | 核心实体,X 个字段 |
|
|
111
|
+
| Controller | path/to/Controller.java | X 个接口 |
|
|
112
|
+
| Service | path/to/Service.java | X 个方法 |
|
|
113
|
+
| Mapper | path/to/Mapper.java | X 个 SQL |
|
|
114
|
+
|
|
115
|
+
### 关键代码片段
|
|
116
|
+
|
|
117
|
+
#### [文件名]:[行号范围]
|
|
118
|
+
```java
|
|
119
|
+
// 相关代码片段
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
#### [文件名]:[行号范围]
|
|
123
|
+
```java
|
|
124
|
+
// 相关代码片段
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### 发现的关键信息
|
|
128
|
+
|
|
129
|
+
- [信息1:如表名、字段、枚举值等]
|
|
130
|
+
- [信息2:如已有的相似实现]
|
|
131
|
+
- [信息3:如依赖关系]
|
|
132
|
+
|
|
133
|
+
### 相关模块/文件(可能需要关注)
|
|
134
|
+
|
|
135
|
+
- [路径1] - 原因
|
|
136
|
+
- [路径2] - 原因
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
## 约束
|
|
140
|
+
|
|
141
|
+
- 只收集数据,不分析架构
|
|
142
|
+
- 只读取代码,不修改文件
|
|
143
|
+
- 只整理信息,不给实现建议
|
|
144
|
+
- 遇到大文件时只读取关键部分(方法签名、字段定义),不要全量读取
|
|
145
|
+
- 并行使用 Glob 和 Grep 提高扫描速度
|
|
@@ -1,22 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
name: openspec-apply-change
|
|
3
|
-
description: |
|
|
4
|
-
Implement tasks from an OpenSpec change. Use when the user wants to start implementing, continue implementation, or work through tasks.
|
|
5
|
-
|
|
6
|
-
触发场景:
|
|
7
|
-
- 需要实现 OpenSpec 变更中的任务
|
|
8
|
-
- 执行变更制品中定义的实现步骤
|
|
9
|
-
- 将规格和设计转化为实际代码
|
|
10
|
-
- 逐个完成 tasks.md 中的待办事项
|
|
11
|
-
|
|
12
|
-
触发词:实现任务、开始实现、opsx:apply、openspec apply、执行变更、开始编码、实现变更
|
|
13
|
-
license: MIT
|
|
14
|
-
compatibility: Requires openspec CLI.
|
|
15
|
-
metadata:
|
|
16
|
-
author: openspec
|
|
17
|
-
version: "1.0"
|
|
18
|
-
generatedBy: "1.1.1"
|
|
19
|
-
---
|
|
1
|
+
# /opsx-apply - 实现 OpenSpec 变更任务
|
|
20
2
|
|
|
21
3
|
Implement tasks from an OpenSpec change.
|
|
22
4
|
|
|
@@ -1,21 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
name: openspec-archive-change
|
|
3
|
-
description: |
|
|
4
|
-
Archive a completed change in the experimental workflow. Use when the user wants to finalize and archive a change after implementation is complete.
|
|
5
|
-
|
|
6
|
-
触发场景:
|
|
7
|
-
- 变更实现完毕,需要归档保存
|
|
8
|
-
- 完成的变更需要移入 archive 目录
|
|
9
|
-
- 项目决策记录需要持久化保存
|
|
10
|
-
|
|
11
|
-
触发词:归档变更、归档、opsx:archive、openspec archive、完成变更、存档、归档完成
|
|
12
|
-
license: MIT
|
|
13
|
-
compatibility: Requires openspec CLI.
|
|
14
|
-
metadata:
|
|
15
|
-
author: openspec
|
|
16
|
-
version: "1.0"
|
|
17
|
-
generatedBy: "1.1.1"
|
|
18
|
-
---
|
|
1
|
+
# /opsx-archive - 归档 OpenSpec 变更
|
|
19
2
|
|
|
20
3
|
Archive a completed change in the experimental workflow.
|
|
21
4
|
|
package/.claude/{skills/openspec-bulk-archive-change/SKILL.md → commands/opsx-bulk-archive.md}
RENAMED
|
@@ -1,21 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
name: openspec-bulk-archive-change
|
|
3
|
-
description: |
|
|
4
|
-
Archive multiple completed changes at once. Use when archiving several parallel changes.
|
|
5
|
-
|
|
6
|
-
触发场景:
|
|
7
|
-
- 多个变更同时完成,需要批量归档
|
|
8
|
-
- 清理多个已完成的并行变更
|
|
9
|
-
- 需要处理多个变更之间的规格冲突后统一归档
|
|
10
|
-
|
|
11
|
-
触发词:批量归档、全部归档、opsx:bulk-archive、一起归档、归档所有变更、批量存档
|
|
12
|
-
license: MIT
|
|
13
|
-
compatibility: Requires openspec CLI.
|
|
14
|
-
metadata:
|
|
15
|
-
author: openspec
|
|
16
|
-
version: "1.0"
|
|
17
|
-
generatedBy: "1.1.1"
|
|
18
|
-
---
|
|
1
|
+
# /opsx-bulk-archive - 批量归档 OpenSpec 变更
|
|
19
2
|
|
|
20
3
|
Archive multiple completed changes in a single operation.
|
|
21
4
|
|
|
@@ -1,21 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
name: openspec-continue-change
|
|
3
|
-
description: |
|
|
4
|
-
Continue working on an OpenSpec change by creating the next artifact. Use when the user wants to progress their change, create the next artifact, or continue their workflow.
|
|
5
|
-
|
|
6
|
-
触发场景:
|
|
7
|
-
- 需要继续推进已有变更的下一个制品
|
|
8
|
-
- 上次中断后恢复变更工作
|
|
9
|
-
- 逐步创建变更的 proposal/specs/design/tasks
|
|
10
|
-
|
|
11
|
-
触发词:继续变更、继续、opsx:continue、openspec continue、下一步、推进变更、继续工作
|
|
12
|
-
license: MIT
|
|
13
|
-
compatibility: Requires openspec CLI.
|
|
14
|
-
metadata:
|
|
15
|
-
author: openspec
|
|
16
|
-
version: "1.0"
|
|
17
|
-
generatedBy: "1.1.1"
|
|
18
|
-
---
|
|
1
|
+
# /opsx-continue - 继续 OpenSpec 变更
|
|
19
2
|
|
|
20
3
|
Continue working on a change by creating the next artifact.
|
|
21
4
|
|
|
@@ -1,22 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
name: openspec-explore
|
|
3
|
-
description: |
|
|
4
|
-
Enter explore mode - a thinking partner for exploring ideas, investigating problems, and clarifying requirements. Use when the user wants to think through something before or during a change.
|
|
5
|
-
|
|
6
|
-
触发场景:
|
|
7
|
-
- 需要在实现前先探索和思考问题
|
|
8
|
-
- 比较多种技术方案的优劣
|
|
9
|
-
- 调查代码库中的现有架构和模式
|
|
10
|
-
- 在变更实现过程中遇到困惑需要深入分析
|
|
11
|
-
|
|
12
|
-
触发词:探索、opsx:explore、openspec explore、想一想、分析问题、调研方案、头脑风暴
|
|
13
|
-
license: MIT
|
|
14
|
-
compatibility: Requires openspec CLI.
|
|
15
|
-
metadata:
|
|
16
|
-
author: openspec
|
|
17
|
-
version: "1.0"
|
|
18
|
-
generatedBy: "1.1.1"
|
|
19
|
-
---
|
|
1
|
+
# /opsx-explore - OpenSpec 探索模式
|
|
20
2
|
|
|
21
3
|
Enter explore mode. Think deeply. Visualize freely. Follow the conversation wherever it goes.
|
|
22
4
|
|
|
@@ -1,21 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
name: openspec-ff-change
|
|
3
|
-
description: |
|
|
4
|
-
Fast-forward through OpenSpec artifact creation. Use when the user wants to quickly create all artifacts needed for implementation without stepping through each one individually.
|
|
5
|
-
|
|
6
|
-
触发场景:
|
|
7
|
-
- 需要快速一次性生成所有变更制品
|
|
8
|
-
- 跳过逐步创建,直接生成 proposal/specs/design/tasks
|
|
9
|
-
- 想快速启动一个变更并立即进入实现阶段
|
|
10
|
-
|
|
11
|
-
触发词:快速创建、快进、opsx:ff、openspec ff、一键生成、快速开始、fast forward
|
|
12
|
-
license: MIT
|
|
13
|
-
compatibility: Requires openspec CLI.
|
|
14
|
-
metadata:
|
|
15
|
-
author: openspec
|
|
16
|
-
version: "1.0"
|
|
17
|
-
generatedBy: "1.1.1"
|
|
18
|
-
---
|
|
1
|
+
# /opsx-ff - 快速推进 OpenSpec 变更
|
|
19
2
|
|
|
20
3
|
Fast-forward through artifact creation - generate everything needed to start implementation in one go.
|
|
21
4
|
|
|
@@ -1,21 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
name: openspec-new-change
|
|
3
|
-
description: |
|
|
4
|
-
Start a new OpenSpec change using the experimental artifact workflow. Use when the user wants to create a new feature, fix, or modification with a structured step-by-step approach.
|
|
5
|
-
|
|
6
|
-
触发场景:
|
|
7
|
-
- 需要创建一个新的 OpenSpec 变更
|
|
8
|
-
- 开始一个新功能或修复的结构化工作流
|
|
9
|
-
- 初始化变更目录并查看第一个制品模板
|
|
10
|
-
|
|
11
|
-
触发词:新建变更、新变更、opsx:new、openspec new、创建变更、开始新功能、新增变更
|
|
12
|
-
license: MIT
|
|
13
|
-
compatibility: Requires openspec CLI.
|
|
14
|
-
metadata:
|
|
15
|
-
author: openspec
|
|
16
|
-
version: "1.0"
|
|
17
|
-
generatedBy: "1.1.1"
|
|
18
|
-
---
|
|
1
|
+
# /opsx-new - 新建 OpenSpec 变更
|
|
19
2
|
|
|
20
3
|
Start a new change using the experimental artifact-driven approach.
|
|
21
4
|
|
|
@@ -1,21 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
name: openspec-onboard
|
|
3
|
-
description: |
|
|
4
|
-
Guided onboarding for OpenSpec - walk through a complete workflow cycle with narration and real codebase work.
|
|
5
|
-
|
|
6
|
-
触发场景:
|
|
7
|
-
- 首次使用 OpenSpec,需要引导式教学
|
|
8
|
-
- 想通过实际操作学习 OpenSpec 完整工作流
|
|
9
|
-
- 需要了解 OpenSpec 的所有命令和流程
|
|
10
|
-
|
|
11
|
-
触发词:入门、onboard、opsx:onboard、openspec 教程、学习 openspec、新手引导、openspec 入门
|
|
12
|
-
license: MIT
|
|
13
|
-
compatibility: Requires openspec CLI.
|
|
14
|
-
metadata:
|
|
15
|
-
author: openspec
|
|
16
|
-
version: "1.0"
|
|
17
|
-
generatedBy: "1.1.1"
|
|
18
|
-
---
|
|
1
|
+
# /opsx-onboard - OpenSpec 新手引导
|
|
19
2
|
|
|
20
3
|
Guide the user through their first complete OpenSpec workflow cycle. This is a teaching experience—you'll do real work in their codebase while explaining each step.
|
|
21
4
|
|
|
@@ -1,21 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
name: openspec-sync-specs
|
|
3
|
-
description: |
|
|
4
|
-
Sync delta specs from a change to main specs. Use when the user wants to update main specs with changes from a delta spec, without archiving the change.
|
|
5
|
-
|
|
6
|
-
触发场景:
|
|
7
|
-
- 需要将变更中的增量规格同步到主规格
|
|
8
|
-
- 变更的 delta spec 需要合并到 openspec/specs 目录
|
|
9
|
-
- 在归档前手动同步规格变更
|
|
10
|
-
|
|
11
|
-
触发词:同步规格、同步specs、opsx:sync、openspec sync、合并规格、同步变更规格
|
|
12
|
-
license: MIT
|
|
13
|
-
compatibility: Requires openspec CLI.
|
|
14
|
-
metadata:
|
|
15
|
-
author: openspec
|
|
16
|
-
version: "1.0"
|
|
17
|
-
generatedBy: "1.1.1"
|
|
18
|
-
---
|
|
1
|
+
# /opsx-sync - 同步 OpenSpec 规格
|
|
19
2
|
|
|
20
3
|
Sync delta specs from a change to main specs.
|
|
21
4
|
|
|
@@ -1,21 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
name: openspec-verify-change
|
|
3
|
-
description: |
|
|
4
|
-
Verify implementation matches change artifacts. Use when the user wants to validate that implementation is complete, correct, and coherent before archiving.
|
|
5
|
-
|
|
6
|
-
触发场景:
|
|
7
|
-
- 实现完成后需要验证是否与规格一致
|
|
8
|
-
- 归档前检查任务完成度和代码正确性
|
|
9
|
-
- 需要生成变更的完整性/正确性/一致性报告
|
|
10
|
-
|
|
11
|
-
触发词:验证变更、验证、opsx:verify、openspec verify、检查实现、校验变更、验收
|
|
12
|
-
license: MIT
|
|
13
|
-
compatibility: Requires openspec CLI.
|
|
14
|
-
metadata:
|
|
15
|
-
author: openspec
|
|
16
|
-
version: "1.0"
|
|
17
|
-
generatedBy: "1.1.1"
|
|
18
|
-
---
|
|
1
|
+
# /opsx-verify - 验证 OpenSpec 变更
|
|
19
2
|
|
|
20
3
|
Verify that an implementation matches the change artifacts (specs, tasks, design).
|
|
21
4
|
|
|
@@ -68,6 +68,8 @@ const instructions = `## 强制技能激活流程(必须执行)
|
|
|
68
68
|
- backend-annotations: 注解/限流/防重复/脱敏/加密
|
|
69
69
|
- utils-toolkit: 工具类/对象转换/字符串/集合/日期
|
|
70
70
|
- file-oss-management: 文件上传/OSS/云存储
|
|
71
|
+
- analyze-requirements: 分析需求/需求分析/原型分析/需求拆解/分析原型图
|
|
72
|
+
- fix-bug: 修复bug/fix bug/排查修复/线上修复/bug修复
|
|
71
73
|
- bug-detective: Bug/报错/异常/不工作
|
|
72
74
|
- error-handler: 异常处理/全局异常/业务异常
|
|
73
75
|
- performance-doctor: 性能/慢查询/优化/缓存
|
|
@@ -94,16 +96,6 @@ const instructions = `## 强制技能激活流程(必须执行)
|
|
|
94
96
|
- sms-mail: 短信/邮件/SMS/验证码/通知
|
|
95
97
|
- social-login: 第三方登录/OAuth/OAuth2/社交登录/授权登录
|
|
96
98
|
- tenant-management: 多租户/租户隔离/SaaS/数据隔离
|
|
97
|
-
- openspec-new-change: 新建变更/开始新功能/opsx:new/openspec new
|
|
98
|
-
- openspec-ff-change: 快速推进/opsx:ff/openspec ff/fast-forward
|
|
99
|
-
- openspec-apply-change: 实现任务/opsx:apply/openspec apply
|
|
100
|
-
- openspec-continue-change: 继续变更/opsx:continue/openspec continue
|
|
101
|
-
- openspec-archive-change: 归档变更/opsx:archive/openspec archive
|
|
102
|
-
- openspec-bulk-archive-change: 批量归档/opsx:bulk-archive
|
|
103
|
-
- openspec-explore: 探索模式/opsx:explore/openspec explore
|
|
104
|
-
- openspec-onboard: 新手引导/opsx:onboard/openspec onboard
|
|
105
|
-
- openspec-sync-specs: 同步规格/opsx:sync/openspec sync
|
|
106
|
-
- openspec-verify-change: 验证变更/opsx:verify/openspec verify
|
|
107
99
|
- ui-pc: 前端组件/Element UI/页面开发
|
|
108
100
|
- store-pc: Vuex/状态管理/store模块
|
|
109
101
|
- mysql-debug: MySQL调试/查数据库/执行SQL/数据库排查
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: analyze-requirements
|
|
3
|
+
description: |
|
|
4
|
+
需求分析全流程编排。根据输入类型自动调度 Agent 获取数据,输出结构化需求报告和开发任务清单。
|
|
5
|
+
|
|
6
|
+
触发场景:
|
|
7
|
+
- 收到 Axure 原型截图需要分析需求
|
|
8
|
+
- 需要将产品需求转化为开发任务
|
|
9
|
+
- 云效任务需要拆解为开发步骤
|
|
10
|
+
- 需求评审前需要结构化分析
|
|
11
|
+
|
|
12
|
+
触发词:分析需求、需求分析、原型分析、需求拆解、分析原型图
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# 需求分析全流程
|
|
16
|
+
|
|
17
|
+
## 核心原则
|
|
18
|
+
|
|
19
|
+
**先判断复杂度,简单需求直接分析,复杂需求走 Agent 编排。分析完成后推荐开发流程。**
|
|
20
|
+
|
|
21
|
+
## 步骤 0:复杂度判断(必须先做)
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
用户提供需求线索
|
|
25
|
+
│
|
|
26
|
+
├─ 简单需求? ──→ 快速路径(直接分析输出任务清单)
|
|
27
|
+
│ - 纯文字描述,功能明确
|
|
28
|
+
│ - 单表 CRUD,无需看原型图
|
|
29
|
+
│ - 用户已给出完整字段列表
|
|
30
|
+
│
|
|
31
|
+
└─ 复杂需求? ──→ Agent 路径(启动 requirements-analyzer)
|
|
32
|
+
- 提供了 Axure 原型截图
|
|
33
|
+
- 提供了云效任务编号
|
|
34
|
+
- 多页面/多模块联动
|
|
35
|
+
- 业务流程复杂,需要状态流转设计
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## 快速路径(简单需求)
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
理解需求 → 设计表结构 → 列出接口清单 → 输出任务清单 → 推荐 /crud 或 /dev
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
不启动 Agent,直接在主对话中完成。输出格式参考下方"输出规范"。
|
|
45
|
+
|
|
46
|
+
## Agent 路径(复杂需求)
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
步骤 1:收集信息(从用户消息中提取)
|
|
50
|
+
- Axure 原型截图路径
|
|
51
|
+
- 云效任务编号
|
|
52
|
+
- 需求描述文字
|
|
53
|
+
- 关联模块信息
|
|
54
|
+
|
|
55
|
+
步骤 2:启动 requirements-analyzer Agent
|
|
56
|
+
└── requirements-analyzer(Opus) 内部自动编排:
|
|
57
|
+
├── image-reader(Haiku) × N张 → 提取原型图结构(有截图时)
|
|
58
|
+
├── task-fetcher(Haiku) → 获取云效任务详情(有任务号时)
|
|
59
|
+
└── 汇总分析 → 输出需求报告 + 任务清单
|
|
60
|
+
|
|
61
|
+
步骤 3:Opus 主会话接收报告 → 推荐开发流程
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Agent 启动规则
|
|
65
|
+
|
|
66
|
+
### 按信息量决定启动方式
|
|
67
|
+
|
|
68
|
+
| 用户提供的信息 | 启动方式 |
|
|
69
|
+
|---------------|---------|
|
|
70
|
+
| 只有文字描述 | 快速路径(不启动 Agent) |
|
|
71
|
+
| 文字 + 原型截图 | requirements-analyzer → 内部调 image-reader |
|
|
72
|
+
| 文字 + 云效任务号 | requirements-analyzer → 内部调 task-fetcher |
|
|
73
|
+
| 原型截图 + 云效任务号 | requirements-analyzer → 内部并行调 image-reader + task-fetcher |
|
|
74
|
+
|
|
75
|
+
### 启动示例
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
# 有原型截图
|
|
79
|
+
Agent(subagent_type="requirements-analyzer",
|
|
80
|
+
prompt="分析以下 Axure 原型截图,输出需求分析报告和开发任务清单:
|
|
81
|
+
截图路径:/path/to/image1.png, /path/to/image2.png
|
|
82
|
+
需求描述:xxx")
|
|
83
|
+
|
|
84
|
+
# 有云效任务
|
|
85
|
+
Agent(subagent_type="requirements-analyzer",
|
|
86
|
+
prompt="获取云效任务 SARW-456 的详情,结合以下需求描述分析:xxx")
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## 输出规范
|
|
90
|
+
|
|
91
|
+
无论走快速路径还是 Agent 路径,最终输出必须包含:
|
|
92
|
+
|
|
93
|
+
1. **业务概述** — 一段话描述需求
|
|
94
|
+
2. **数据库设计** — 建表 SQL(遵循项目规范)
|
|
95
|
+
3. **接口清单** — 路由 + 方法 + 说明
|
|
96
|
+
4. **开发任务拆解** — 按依赖排序的任务列表
|
|
97
|
+
5. **推荐开发流程** — 根据复杂度推荐
|
|
98
|
+
|
|
99
|
+
### 复杂度 → 开发流程推荐
|
|
100
|
+
|
|
101
|
+
| 复杂度 | 推荐流程 |
|
|
102
|
+
|--------|---------|
|
|
103
|
+
| 轻量(单表 CRUD) | `/crud` 生成 + `/dev` 补充 |
|
|
104
|
+
| 中等(2-3 表联动) | `/dev` 按任务逐步开发 |
|
|
105
|
+
| 复杂(多模块协作) | OpenSpec `/opsx:new` → `/opsx:ff` → `/opsx:apply` |
|
|
106
|
+
|
|
107
|
+
## 注意
|
|
108
|
+
|
|
109
|
+
- 简单需求不要过度编排,直接分析就行
|
|
110
|
+
- 与 `bug-detective` / `fix-bug` 的区别:本技能面向**新功能开发前的需求分析**,不涉及 Bug 排查
|
|
111
|
+
- 数据库设计必须遵循项目规范(雪花 ID、审计字段、del_flag=2 正常)
|
|
112
|
+
- 如果需求信息不完整,主动列出需要确认的点,而不是猜测
|