6a-spec-install 1.0.7-dev.1 → 1.0.8-dev.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/.6aspec/rules/{6A → green}/6A_code_implementation_sop.md +16 -16
- package/.6aspec/rules/{6A/6A_new_feature_sop.md → green/6A_design_sop.md} +17 -17
- package/.6aspec/rules/{6A → green}/6A_import_model_table_sop.md +5 -5
- package/.6aspec/rules/{6A → green}/6A_init_event_list_sop.md +1 -1
- package/.6aspec/rules/{6A → green}/6A_init_map_sop.md +2 -2
- package/.6aspec/rules/{6A → green}/6A_model_sop.md +6 -6
- package/.6aspec/rules/{6A/6A_task_sop.md → green/6A_tasks_sop.md} +16 -16
- package/.6aspec/rules/{6A → green}/6A_visual_logic_sop.md +7 -7
- package/.claude/commands/6aspec/green/design.md +8 -0
- package/.claude/commands/{6A/6A-execute-task.md → 6aspec/green/execute-task.md} +3 -3
- package/.claude/commands/6aspec/green/import-model-table.md +8 -0
- package/.claude/commands/{6A/6A-init.md → 6aspec/green/init.md} +2 -2
- package/.claude/commands/{6A/6A-model.md → 6aspec/green/model.md} +4 -4
- package/.claude/commands/6aspec/green/tasks.md +8 -0
- package/.claude/commands/6aspec/green/visual-logic.md +9 -0
- package/.claude/commands/opsx/apply.md +152 -0
- package/.claude/commands/opsx/archive.md +157 -0
- package/.claude/commands/opsx/bulk-archive.md +242 -0
- package/.claude/commands/opsx/continue.md +114 -0
- package/.claude/commands/opsx/explore.md +174 -0
- package/.claude/commands/opsx/ff.md +94 -0
- package/.claude/commands/opsx/new.md +69 -0
- package/.claude/commands/opsx/onboard.md +525 -0
- package/.claude/commands/opsx/sync.md +134 -0
- package/.claude/commands/opsx/verify.md +164 -0
- package/.claude/skills/openspec-apply-change/SKILL.md +156 -0
- package/.claude/skills/openspec-archive-change/SKILL.md +114 -0
- package/.claude/skills/openspec-bulk-archive-change/SKILL.md +246 -0
- package/.claude/skills/openspec-continue-change/SKILL.md +118 -0
- package/.claude/skills/openspec-explore/SKILL.md +290 -0
- package/.claude/skills/openspec-ff-change/SKILL.md +101 -0
- package/.claude/skills/openspec-new-change/SKILL.md +74 -0
- package/.claude/skills/openspec-onboard/SKILL.md +529 -0
- package/.claude/skills/openspec-sync-specs/SKILL.md +138 -0
- package/.claude/skills/openspec-verify-change/SKILL.md +168 -0
- package/.cursor/commands/6aspec/green/design.md +9 -0
- package/.cursor/commands/{6A-execute-task.md → 6aspec/green/execute-task.md} +3 -3
- package/.cursor/commands/6aspec/green/import-model-table.md +9 -0
- package/.cursor/commands/{6A-init.md → 6aspec/green/init.md} +2 -2
- package/.cursor/commands/{6A-model.md → 6aspec/green/model.md} +4 -4
- package/.cursor/commands/6aspec/green/tasks.md +9 -0
- package/.cursor/commands/6aspec/green/visual-logic.md +10 -0
- package/package.json +1 -1
- package/.claude/commands/6A/6A-import-model-table.md +0 -8
- package/.claude/commands/6A/6A-new.md +0 -8
- package/.claude/commands/6A/6A-task.md +0 -8
- package/.claude/commands/6A/6A-visual-logic.md +0 -10
- package/.cursor/commands/6A-import-model-table.md +0 -9
- package/.cursor/commands/6A-new.md +0 -9
- package/.cursor/commands/6A-task.md +0 -9
- package/.cursor/commands/6A-visual-logic.md +0 -11
- /package/.6aspec/rules/{6A → green}/6A_constitution.md +0 -0
|
@@ -3,19 +3,19 @@ description: 任务代码实现标准操作流程 (Code Implementation SOP)
|
|
|
3
3
|
alwaysApply: false
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
#
|
|
6
|
+
# execute-task: 任务代码实现标准操作流程
|
|
7
7
|
|
|
8
|
-
你现在是 **Senior Developer**,负责执行具体的开发任务。你的核心职责是将
|
|
8
|
+
你现在是 **Senior Developer**,负责执行具体的开发任务。你的核心职责是将 `6aspec/.../task/task_xxx.md` 转化为高质量、可运行的业务代码。
|
|
9
9
|
|
|
10
10
|
## 0. 执行协议 (Protocol) - 拒绝盲目编码
|
|
11
11
|
|
|
12
12
|
在开始编写代码前,**必须**执行以下上下文加载步骤(Context Loading):
|
|
13
13
|
|
|
14
|
-
1. **加载任务上下文**:读取用户指定的 `
|
|
14
|
+
1. **加载任务上下文**:读取用户指定的 `task-xxx.md` 文件。
|
|
15
15
|
2. **加载设计上下文**:
|
|
16
|
-
* 必须寻找并读取该任务所属功能的
|
|
17
|
-
* 必须读取 **API 定义文档** (`
|
|
18
|
-
* *Rationale*: 任务文件中只包含摘要,核心逻辑和 JSON
|
|
16
|
+
* 必须寻找并读取该任务所属功能的 **技术设计主文档** (`tech-design.md`)。
|
|
17
|
+
* 必须读取 **API 定义文档** (`api-definition.md`)(如果是 API 任务)。
|
|
18
|
+
* *Rationale*: 任务文件中只包含摘要,核心逻辑和 JSON 结构都在技术设计文档中,不读技术设计文档必写错。
|
|
19
19
|
3. **加载规范上下文**:
|
|
20
20
|
* 读取任务文件中指定的“规则文件”(如 `api_rule.md`)。
|
|
21
21
|
* 读取公共代码规约 `.6aspec/rules/biz/code.md` 和 `.6aspec/rules/biz/project-structure.md`。
|
|
@@ -26,7 +26,7 @@ alwaysApply: false
|
|
|
26
26
|
|
|
27
27
|
### Step 1: 领域对象与数据传输对象 (DTO/VO/Enum)
|
|
28
28
|
- 优先定义 Request/Response DTO、Enums、Events。
|
|
29
|
-
- **约束**:字段名称和类型必须严格匹配 `
|
|
29
|
+
- **约束**:字段名称和类型必须严格匹配 `api-definition.md` 和技术设计文档。
|
|
30
30
|
|
|
31
31
|
### Step 2: 基础设施层 (Repository/Gateway)
|
|
32
32
|
- 检查所需的 Repository 接口是否存在。
|
|
@@ -34,9 +34,9 @@ alwaysApply: false
|
|
|
34
34
|
|
|
35
35
|
### Step 3: 核心业务逻辑 (Service/Domain)
|
|
36
36
|
- 实现 Service 方法。
|
|
37
|
-
-
|
|
38
|
-
-
|
|
39
|
-
-
|
|
37
|
+
- **关键**:严格翻译技术设计文档中的"执行逻辑"和"核心技术决策"。
|
|
38
|
+
- 如果技术设计文档说要加锁,必须加锁。
|
|
39
|
+
- 如果技术设计文档说要抛特定异常,必须抛出。
|
|
40
40
|
|
|
41
41
|
### Step 4: 接口层 (Controller/Listener/Job)
|
|
42
42
|
- 组装 Service,暴露对外的入口。
|
|
@@ -53,15 +53,15 @@ alwaysApply: false
|
|
|
53
53
|
|
|
54
54
|
代码实现完成后,**必须**更新文档状态:
|
|
55
55
|
|
|
56
|
-
1. **更新任务文件** (`
|
|
56
|
+
1. **更新任务文件** (`task-xxx.md`):
|
|
57
57
|
- 将状态改为 `[已完成]`。
|
|
58
58
|
- 更新 `最后更新时间`。
|
|
59
|
-
2. **更新总览文件** (`
|
|
59
|
+
2. **更新总览文件** (`tasks/README.md`):
|
|
60
60
|
- 寻找该任务在列表中的行,将状态图标改为 ✅。
|
|
61
61
|
- 更新进度条和已完成工时统计。
|
|
62
62
|
|
|
63
63
|
## 异常处理
|
|
64
|
-
-
|
|
64
|
+
- 如果发现技术设计文档在代码层面无法实现(如循环依赖、技术设计文档参数缺失),**停止编码**,向用户报告并建议修改技术设计文档。
|
|
65
65
|
|
|
66
66
|
## 流程完成提示 (Workflow Progress)
|
|
67
67
|
|
|
@@ -71,13 +71,13 @@ alwaysApply: false
|
|
|
71
71
|
|
|
72
72
|
---
|
|
73
73
|
|
|
74
|
-
✅ **已完成:执行开发任务 (
|
|
74
|
+
✅ **已完成:执行开发任务 (execute-task)**
|
|
75
75
|
|
|
76
76
|
📊 **进度:4/4 (主流程) - 全部完成!🎉**
|
|
77
77
|
|
|
78
78
|
**任务状态:**
|
|
79
|
-
- 当前任务已完成,请检查 `
|
|
80
|
-
- 如还有未完成的任务,继续执行 `
|
|
79
|
+
- 当前任务已完成,请检查 `tasks/README.md` 查看整体进度
|
|
80
|
+
- 如还有未完成的任务,继续执行 `execute-task` 命令
|
|
81
81
|
- 如所有任务已完成,恭喜!整个开发流程已完成
|
|
82
82
|
|
|
83
83
|
**完整流程图:**
|
|
@@ -3,7 +3,7 @@ description: 新功能架构设计标准操作流程 (New Feature Architecture S
|
|
|
3
3
|
alwaysApply: false
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
#
|
|
6
|
+
# design: 新功能架构设计标准操作流程(精简版)
|
|
7
7
|
|
|
8
8
|
你现在是资深架构师(Senior Architect),负责在**数据库模型已确定**的前提下,输出具备“编码指导意义”的**TDD 技术设计文档**,确保开发者(或 AI 编码助手)可按此方案无偏差实现业务。
|
|
9
9
|
|
|
@@ -18,7 +18,7 @@ alwaysApply: false
|
|
|
18
18
|
|
|
19
19
|
1. **主动检索 (Active Retrieval)**:
|
|
20
20
|
* 不要被动等待。当用户给出功能名称时,优先使用工具(`file_search` 或 `read_file`)尝试读取以下关键文件:
|
|
21
|
-
*
|
|
21
|
+
* `./6aspec/{kebab-case-功能名称}/domain-model.md`
|
|
22
22
|
* `./.6aspec/biz/functional-capability-Map.md` (能力地图)
|
|
23
23
|
* `./.6aspec/biz/event-list.md` (事件清单,如涉及事件)
|
|
24
24
|
* 只有当无法读取这些文件时,才请求用户提供。
|
|
@@ -30,8 +30,8 @@ alwaysApply: false
|
|
|
30
30
|
|
|
31
31
|
3. **双文档交付 (Dual Output)**:
|
|
32
32
|
* 检查通过后,在同一个回复中,使用两个**带有文件路径**的独立代码块分别输出:
|
|
33
|
-
* 代码块 1:`
|
|
34
|
-
* 代码块 2:`
|
|
33
|
+
* 代码块 1:`tech-design.md` (设计主文档)
|
|
34
|
+
* 代码块 2:`api-definition.md` (API 详细定义)
|
|
35
35
|
|
|
36
36
|
## 核心原则(必须遵守)
|
|
37
37
|
1. **先审计,后设计**:若需求/模型缺失关键要素,必须中断并给出提问清单
|
|
@@ -53,7 +53,7 @@ alwaysApply: false
|
|
|
53
53
|
## 输入要求(你必须先检查)
|
|
54
54
|
你需要确保拥有以下输入(优先尝试主动读取):
|
|
55
55
|
- **必需输入 1**:PRD 文档或功能需求描述(通常由用户在对话中提供)
|
|
56
|
-
- **必需输入 2
|
|
56
|
+
- **必需输入 2**:数据模型设计文档:`./6aspec/{kebab-case-功能名称}/domain-model.md`
|
|
57
57
|
- **参考文档**:`./.6aspec/biz/functional-capability-Map.md`(能力地图)
|
|
58
58
|
|
|
59
59
|
## 第一阶段:需求完备性检查(Gatekeeping,必须先做)
|
|
@@ -62,7 +62,7 @@ alwaysApply: false
|
|
|
62
62
|
- [ ] **数据闭环**:新功能涉及字段是否都能落在模型中?
|
|
63
63
|
- [ ] **外部依赖**:是否需要调用其他模块 Facade?(参考能力地图)
|
|
64
64
|
- [ ] **异常覆盖**:失败、超时、并发、幂等等关键逻辑是否明确?
|
|
65
|
-
- [ ]
|
|
65
|
+
- [ ] **模型文档存在**:`./6aspec/{kebab-case-功能名称}/domain-model.md` 是否存在?
|
|
66
66
|
|
|
67
67
|
**若任意一项为 N:立即停止输出 TDD,改为输出“提问清单”。**
|
|
68
68
|
|
|
@@ -113,7 +113,7 @@ alwaysApply: false
|
|
|
113
113
|
### 1. 功能概述
|
|
114
114
|
- 目标与核心价值
|
|
115
115
|
- 功能范围(Scope)
|
|
116
|
-
- **相关文档**:[API 详细定义](./
|
|
116
|
+
- **相关文档**:[API 详细定义](./api-definition.md)
|
|
117
117
|
|
|
118
118
|
### 1.5 核心技术决策与权衡 (Key Technical Decisions)
|
|
119
119
|
**必须输出此章节**。你必须解释“为什么”采用某些关键技术手段,特别是针对幂等、并发和性能的设计。
|
|
@@ -128,7 +128,7 @@ alwaysApply: false
|
|
|
128
128
|
|
|
129
129
|
### 3. 接口/入口规范
|
|
130
130
|
|
|
131
|
-
> 📋 **API 详细定义**:所有接口的入参/出参 JSON 结构、字段说明、示例等详细信息,请参考 [
|
|
131
|
+
> 📋 **API 详细定义**:所有接口的入参/出参 JSON 结构、字段说明、示例等详细信息,请参考 [api-definition.md](./api-definition.md)
|
|
132
132
|
|
|
133
133
|
不同类型的入口必须分开说明,分别输出为不同小结与不同表格。**本需求未涉及的入口类型,小结/表格直接省略**。
|
|
134
134
|
|
|
@@ -154,24 +154,24 @@ alwaysApply: false
|
|
|
154
154
|
|
|
155
155
|
## 输出要求(硬性)
|
|
156
156
|
1. **格式**:Markdown 源码,使用代码块包裹。
|
|
157
|
-
2.
|
|
157
|
+
2. **位置**:`6aspec/{kebab-case-功能名称}/`(功能名称使用 kebab-case 命名,如:user-authentication)
|
|
158
158
|
3. **交付物格式**:
|
|
159
159
|
请严格按照以下格式在一次回复中输出两个代码块:
|
|
160
160
|
|
|
161
|
-
|
|
162
|
-
```markdown
|
|
163
|
-
(
|
|
161
|
+
这里是技术设计文档:
|
|
162
|
+
```markdown:6aspec/{kebab-case-功能名称}/tech-design.md
|
|
163
|
+
(技术设计文档内容...)
|
|
164
164
|
```
|
|
165
165
|
|
|
166
166
|
这里是 API 详细定义:
|
|
167
|
-
```markdown
|
|
167
|
+
```markdown:6aspec/{kebab-case-功能名称}/api-definition.md
|
|
168
168
|
(API 定义内容,包含详细 JSON 结构...)
|
|
169
169
|
```
|
|
170
170
|
4. **解耦**:不包含具体项目包路径,用逻辑层(service/repository/facade)描述
|
|
171
171
|
5. **禁止项**:不输出业务流程图/时序图/状态机图/可观测性/事务管理。
|
|
172
172
|
|
|
173
173
|
## 开始执行前
|
|
174
|
-
请先**主动检查**是否可读取 `
|
|
174
|
+
请先**主动检查**是否可读取 `domain-model.md`。若文件不存在或内容缺失,立即停止并输出"提问清单"。
|
|
175
175
|
|
|
176
176
|
## 流程完成提示 (Workflow Progress)
|
|
177
177
|
|
|
@@ -181,14 +181,14 @@ alwaysApply: false
|
|
|
181
181
|
|
|
182
182
|
---
|
|
183
183
|
|
|
184
|
-
✅ **已完成:技术方案设计 (
|
|
184
|
+
✅ **已完成:技术方案设计 (design)**
|
|
185
185
|
|
|
186
186
|
📊 **进度:2/4 (主流程)**
|
|
187
187
|
|
|
188
188
|
**下一步建议:**
|
|
189
|
-
- 【主流程】任务拆解:命令 `
|
|
189
|
+
- 【主流程】任务拆解:命令 `tasks`
|
|
190
190
|
将技术方案拆解为可执行的开发任务
|
|
191
|
-
- 【可选】生成可视化逻辑图:命令 `
|
|
191
|
+
- 【可选】生成可视化逻辑图:命令 `visual-logic`
|
|
192
192
|
基于TDD生成业务流程图、时序图、状态机图
|
|
193
193
|
|
|
194
194
|
**完整流程图:**
|
|
@@ -3,7 +3,7 @@ description: 模型导入标准操作流程 (Import Model Table SOP)
|
|
|
3
3
|
alwaysApply: false
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
#
|
|
6
|
+
# import-model-table: 模型导入标准操作流程 (Import Model Table SOP)
|
|
7
7
|
|
|
8
8
|
## 角色
|
|
9
9
|
你现在的角色是【DevOps 工程师 + 系统集成专家】,负责将设计好的 Markdown 数据模型导入到系统中。你需要精确地处理参数依赖,确保数据的一致性。
|
|
@@ -85,13 +85,13 @@ python .cursor/script/create_entities_from_markdown.py {markdown_file_path} -a {
|
|
|
85
85
|
|
|
86
86
|
## 示例对话
|
|
87
87
|
|
|
88
|
-
**User:** `
|
|
88
|
+
**User:** `import-model-table 6aspec/xxx/domain-model.md 890601`
|
|
89
89
|
|
|
90
90
|
**Assistant:**
|
|
91
91
|
1. 解析 Application: `8906`
|
|
92
92
|
2. 搜索 GUID: 在 `data/metadata/_metadata/8906/` 中搜索 `890601`...
|
|
93
93
|
3. 找到 GUID: `12345678-1234-1234-1234-1234567890ab`
|
|
94
|
-
4. 执行命令: `python .6aspec/script/create_entities_from_markdown.py
|
|
94
|
+
4. 执行命令: `python .6aspec/script/create_entities_from_markdown.py 6aspec/xxx/domain-model.md -a 8906 -g 12345678-1234-1234-1234-1234567890ab`
|
|
95
95
|
5. 反馈结果。
|
|
96
96
|
|
|
97
97
|
## 流程完成提示 (Workflow Progress)
|
|
@@ -102,12 +102,12 @@ python .cursor/script/create_entities_from_markdown.py {markdown_file_path} -a {
|
|
|
102
102
|
|
|
103
103
|
---
|
|
104
104
|
|
|
105
|
-
✅ **已完成:表导入建模平台 (
|
|
105
|
+
✅ **已完成:表导入建模平台 (import-model-table) - 可选流程**
|
|
106
106
|
|
|
107
107
|
📊 **进度:可选流程已完成**
|
|
108
108
|
|
|
109
109
|
**下一步建议:**
|
|
110
|
-
- 【主流程】技术方案设计:命令 `
|
|
110
|
+
- 【主流程】技术方案设计:命令 `design`
|
|
111
111
|
继续主流程,基于领域模型设计接口、事件、定时任务等技术方案
|
|
112
112
|
|
|
113
113
|
**完整流程图:**
|
|
@@ -3,7 +3,7 @@ description: 事件清单生成标准操作流程 (Event List Generation SOP)
|
|
|
3
3
|
alwaysApply: false
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
#
|
|
6
|
+
# event-list: 事件清单生成标准操作流程 (Event List Generation SOP)
|
|
7
7
|
|
|
8
8
|
## 1. 目标
|
|
9
9
|
扫描全项目中带有 `com.mysoft.framework.event.annotation.Event` 注解的 Java 类,生成一份详细的事件清单文档 `.6aspec/biz/event-list.md`。
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: 生成或更新项目功能能力地图 (Functional Capability Map) 的
|
|
2
|
+
description: 生成或更新项目功能能力地图 (Functional Capability Map) 的 SOP
|
|
3
3
|
alwaysApply: false
|
|
4
4
|
---
|
|
5
|
-
# 生成或更新项目功能能力地图 (Functional Capability Map) 的
|
|
5
|
+
# 生成或更新项目功能能力地图 (Functional Capability Map) 的 SOP
|
|
6
6
|
|
|
7
7
|
## Aim (目标)
|
|
8
8
|
生成一份精简、准确的面向 AI 设计者的《项目功能能力地图》,明确系统核心能力、数据资产与复用规则,辅助后续设计与开发。
|
|
@@ -3,7 +3,7 @@ description: 数据模型设计标准操作流程 (Data model design SOP)
|
|
|
3
3
|
alwaysApply: false
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
#
|
|
6
|
+
# model: 数据模型设计标准操作流程 (Data model design SOP)
|
|
7
7
|
|
|
8
8
|
## 角色色
|
|
9
9
|
你现在的角色是【领域架构师 + 数据建模专家】,负责在编写任何业务代码前,完成最核心的数据架构设计。你认为“数据模型是对业务本质的抽象”,因此你严控冗余,追求模型的高内聚与低耦合。
|
|
@@ -130,8 +130,8 @@ alwaysApply: false
|
|
|
130
130
|
|
|
131
131
|
## 输出要求:
|
|
132
132
|
1. 格式:Markdown 源码格式
|
|
133
|
-
2.
|
|
134
|
-
3. 文档命名:`
|
|
133
|
+
2. 文档位置:`6aspec/{kebab-case-功能名称}` 目录(功能名称使用 kebab-case 命名,如:user-authentication)
|
|
134
|
+
3. 文档命名:`domain-model.md`
|
|
135
135
|
4. 请务必检查下第三步的输出是否满足格式要求
|
|
136
136
|
|
|
137
137
|
## 注意
|
|
@@ -146,14 +146,14 @@ alwaysApply: false
|
|
|
146
146
|
|
|
147
147
|
---
|
|
148
148
|
|
|
149
|
-
✅ **已完成:领域建模 (
|
|
149
|
+
✅ **已完成:领域建模 (model)**
|
|
150
150
|
|
|
151
151
|
📊 **进度:1/4 (主流程)**
|
|
152
152
|
|
|
153
153
|
**下一步建议:**
|
|
154
|
-
- 【主流程】技术方案设计:命令 `
|
|
154
|
+
- 【主流程】技术方案设计:命令 `design`
|
|
155
155
|
基于领域模型设计接口、事件、定时任务等技术方案
|
|
156
|
-
- 【可选】表导入建模平台:命令 `
|
|
156
|
+
- 【可选】表导入建模平台:命令 `import-model-table`
|
|
157
157
|
将设计好的数据模型导入到建模平台
|
|
158
158
|
|
|
159
159
|
**完整流程图:**
|
|
@@ -3,18 +3,18 @@ description: 任务拆解标准操作流程 (Functional Entrypoint SOP)
|
|
|
3
3
|
alwaysApply: false
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
#
|
|
6
|
+
# tasks: 任务拆解标准操作流程 (Functional Entrypoint SOP)
|
|
7
7
|
|
|
8
8
|
## 工作流概述
|
|
9
9
|
|
|
10
|
-
当触发
|
|
10
|
+
当触发 tasks 工作流时,AI 需作为 **Lead Engineer / Project Manager**,基于已生成的 `tech-design.md` 文档,将架构设计转化为以**入口点(API/事件/定时任务)**为核心的原子开发任务。
|
|
11
11
|
|
|
12
12
|
## 0. 执行协议 (Protocol) - 必须遵守
|
|
13
13
|
|
|
14
14
|
你是一个**技术项目经理 (TPM)**。在执行任务拆解前,请严格遵守:
|
|
15
15
|
|
|
16
16
|
1. **主动检索 (Active Retrieval)**:
|
|
17
|
-
* 当用户指定 `{功能名称}` 时,优先尝试读取
|
|
17
|
+
* 当用户指定 `{功能名称}` 时,优先尝试读取 `6aspec/{kebab-case-功能名称}/tech-design.md`。
|
|
18
18
|
* 如果找不到 TDD 文档,**立即停止**并报错,提示用户先完成 TDD 设计。
|
|
19
19
|
|
|
20
20
|
2. **思维链门禁 (Chain of Thought Gatekeeping)**:
|
|
@@ -33,7 +33,7 @@ alwaysApply: false
|
|
|
33
33
|
3. **规约驱动**:不同类型的任务必须显式指定对应的编码规约文件
|
|
34
34
|
|
|
35
35
|
## 输入要求
|
|
36
|
-
- **必需输入**:已完成的 `
|
|
36
|
+
- **必需输入**:已完成的 `tech-design.md` 文档
|
|
37
37
|
- **关联规约**:
|
|
38
38
|
- API 任务:`./.6aspec/rules/biz/api_rule.md`
|
|
39
39
|
- 事件订阅任务:`./.6aspec/rules/biz/event_subscriber_rule.md`
|
|
@@ -55,11 +55,11 @@ alwaysApply: false
|
|
|
55
55
|
|
|
56
56
|
### 1. 目录结构
|
|
57
57
|
所有任务文件必须存储在以下路径:
|
|
58
|
-
-
|
|
58
|
+
- `6aspec/{kebab-case-功能名称}/tasks/`(功能名称使用 kebab-case 命名,如:user-authentication)
|
|
59
59
|
|
|
60
60
|
### 2. 文件命名规范
|
|
61
|
-
- 格式:`
|
|
62
|
-
- 示例:`
|
|
61
|
+
- 格式:`task-{序号}-{任务类型}-{功能简名}.md`
|
|
62
|
+
- 示例:`task-001-api-create-contract.md`, `task-002-event-contract-signed.md`
|
|
63
63
|
|
|
64
64
|
### 3. 任务文档模板 (Task Template)
|
|
65
65
|
每个生成的任务文件必须**严格包含**以下章节:
|
|
@@ -88,10 +88,10 @@ alwaysApply: false
|
|
|
88
88
|
- **依赖模块**:[UserFacade / PaymentService] (需调用的外部依赖)
|
|
89
89
|
|
|
90
90
|
### 3. 业务规则与实现细节
|
|
91
|
-
- **核心逻辑**:基于 TDD
|
|
91
|
+
- **核心逻辑**:基于 TDD 中的"执行逻辑"描述,详细说明 Service 层及领域层需处理的规则(如存在对应的可视化文档 `visual-logic.md`,可作为辅助参考,但不得脱离 TDD 自行补充规则)。
|
|
92
92
|
- **核心技术决策**:回顾 TDD 中的关键决策(如幂等方案),再次确认落实。
|
|
93
93
|
- **数据结构与契约 (Binding)**:
|
|
94
|
-
- **API 契约**:必须严格遵循 `
|
|
94
|
+
- **API 契约**:必须严格遵循 `api-definition.md` 中的 Request/Response 结构。
|
|
95
95
|
- **Entity 引用**:实体类与 Mapper 均已预生成,请在代码实现阶段搜索并复用(如 `MyEntity.java`, `MyEntityMapper.java`或者`MyEntityDao.java`),**严禁重复创建**。
|
|
96
96
|
- **状态流转**:若涉及状态变更,明确状态机逻辑。
|
|
97
97
|
- **数据结构**:涉及的 DTO、Command、Query 的定义要求
|
|
@@ -120,21 +120,21 @@ alwaysApply: false
|
|
|
120
120
|
2. **合并依赖项**:将该入口点涉及的所有业务逻辑(Service)、数据访问(Repository)、模型定义(DTO/VO/Enum)全部归入该入口点的原子任务中。
|
|
121
121
|
3. **排序与编排**:基于`<thinking>`中的依赖分析,对任务进行逻辑排序(先基础后上层,先前置后依赖)。
|
|
122
122
|
4. **生成文件**:为每个识别出的入口点生成独立的任务 Markdown 文件。
|
|
123
|
-
5. **生成总览**:任务拆解完成后,必须在
|
|
123
|
+
5. **生成总览**:任务拆解完成后,必须在 `6aspec/{kebab-case-功能名称}/tasks/README.md` 输出任务总览。
|
|
124
124
|
6. **状态维护(必须执行)**:后续每当完成一个任务,必须同步更新:
|
|
125
|
-
-
|
|
126
|
-
-
|
|
125
|
+
- 对应任务文件中的"任务状态"。
|
|
126
|
+
- `6aspec/{kebab-case-功能名称}/tasks/README.md` 中该任务的状态展示。
|
|
127
127
|
|
|
128
128
|
## 输出要求
|
|
129
129
|
1. **格式**:Markdown 源码格式。
|
|
130
130
|
2. **一致性**:任务中的类名、方法名和字段名必须与 TDD 保持完全一致。
|
|
131
131
|
3. **禁用范围**:不拆解前端任务、不拆解单纯的单元测试任务、不拆解 Entity/SQL 任务。
|
|
132
|
-
4. **总览 README(必须输出)**:在
|
|
132
|
+
4. **总览 README(必须输出)**:在 `6aspec/{kebab-case-功能名称}/tasks/README.md` 生成任务总览文件,必须包含:
|
|
133
133
|
- **项目进度看板**:任务总工时、已完成工时、进度条。
|
|
134
134
|
- **任务清单**:按推荐执行顺序排列,包含状态图标 (✅/🔄/⏳)。
|
|
135
135
|
- **开发阶段划分**:建议将任务划分为 Phase 1 (Core), Phase 2 (Extensions) 等阶段。
|
|
136
136
|
- **验收标准汇总**:从各任务 DoD 汇总,形成整体 DoD。
|
|
137
|
-
- **注意事项与相关文档链接**: 至少包含:
|
|
137
|
+
- **注意事项与相关文档链接**: 至少包含:tech-design.md、api-definition.md、如存在则包含 visual-logic.md 文档链接
|
|
138
138
|
|
|
139
139
|
## 流程完成提示 (Workflow Progress)
|
|
140
140
|
|
|
@@ -144,12 +144,12 @@ alwaysApply: false
|
|
|
144
144
|
|
|
145
145
|
---
|
|
146
146
|
|
|
147
|
-
✅ **已完成:任务拆解 (
|
|
147
|
+
✅ **已完成:任务拆解 (tasks)**
|
|
148
148
|
|
|
149
149
|
📊 **进度:3/4 (主流程)**
|
|
150
150
|
|
|
151
151
|
**下一步建议:**
|
|
152
|
-
- 【主流程】执行开发任务:命令 `
|
|
152
|
+
- 【主流程】执行开发任务:命令 `execute-task`
|
|
153
153
|
开始执行具体的开发任务,将设计转化为代码实现
|
|
154
154
|
|
|
155
155
|
**完整流程图:**
|
|
@@ -3,7 +3,7 @@ description: 基于TDD生成 Mermaid 流程图/交互时序图/状态机图的
|
|
|
3
3
|
alwaysApply: false
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
#
|
|
6
|
+
# visual-logic: 基于 TDD 生成 Mermaid 图表的标准操作流程(按需生成)
|
|
7
7
|
|
|
8
8
|
## 背景与原则
|
|
9
9
|
本 SOP 用于在“需要时”生成业务逻辑可视化图表。不是每次需求都复杂,也不是每个业务功能都需要图表,因此本 SOP 强制遵守:
|
|
@@ -21,14 +21,14 @@ alwaysApply: false
|
|
|
21
21
|
|
|
22
22
|
## 输入要求
|
|
23
23
|
### 必需输入
|
|
24
|
-
- **TDD
|
|
24
|
+
- **TDD 文档路径**:`6aspec/{kebab-case-功能名称}/tech-design.md`(功能名称使用 kebab-case 命名,如:user-authentication)
|
|
25
25
|
- **人类选择的生成范围(必须明确,否则中断提问)**:
|
|
26
26
|
- 需要生成的图表类型:Flowchart / Sequence / State(可多选)
|
|
27
27
|
- 覆盖范围:具体到“哪些入口/哪些业务流程/哪些对象”(例如:仅 `3.1` 中某个写 API;或某个事件订阅;或某个后台任务)
|
|
28
28
|
- 抽象层级:是否细到 service/repository/facade 级别(建议默认到 service/repository/facade)
|
|
29
29
|
|
|
30
30
|
### 可选输入(用于补齐 TDD 未显式写清的信息)
|
|
31
|
-
-
|
|
31
|
+
- 数据模型文档:`6aspec/{kebab-case-功能名称}/domain-model.md`
|
|
32
32
|
- PRD:`.prd/{功能名称}-prd.md`
|
|
33
33
|
- 事件清单:`./.6aspec/biz/event-list.md`(当涉及事件订阅/发布时)
|
|
34
34
|
- 能力地图:`./.6aspec/biz/functional-capability-Map.md`(当涉及跨模块 Facade 依赖时)
|
|
@@ -42,7 +42,7 @@ alwaysApply: false
|
|
|
42
42
|
|
|
43
43
|
## 输出要求
|
|
44
44
|
1. **输出格式**:Markdown 源码 + Mermaid 代码块(严禁截图)
|
|
45
|
-
2.
|
|
45
|
+
2. **输出位置**:`6aspec/{kebab-case-功能名称}/visual-logic.md`
|
|
46
46
|
3. **引用关系**:在输出文档开头必须写明:
|
|
47
47
|
- 输入 TDD 文档路径
|
|
48
48
|
- 本次选择生成的图表类型与覆盖范围
|
|
@@ -88,7 +88,7 @@ alwaysApply: false
|
|
|
88
88
|
- 迁移必须标注触发入口(API/事件/定时任务/后台任务)
|
|
89
89
|
|
|
90
90
|
### 第四步:输出文档并自检
|
|
91
|
-
1. 写入
|
|
91
|
+
1. 写入 `6aspec/{kebab-case-功能名称}/visual-logic.md`
|
|
92
92
|
2. 自检:
|
|
93
93
|
- Mermaid 语法是否完整
|
|
94
94
|
- 是否严格遵循"按需生成"与"范围约束"
|
|
@@ -102,12 +102,12 @@ alwaysApply: false
|
|
|
102
102
|
|
|
103
103
|
---
|
|
104
104
|
|
|
105
|
-
✅ **已完成:生成可视化逻辑图 (
|
|
105
|
+
✅ **已完成:生成可视化逻辑图 (visual-logic) - 可选流程**
|
|
106
106
|
|
|
107
107
|
📊 **进度:可选流程已完成**
|
|
108
108
|
|
|
109
109
|
**下一步建议:**
|
|
110
|
-
- 【主流程】任务拆解:命令 `
|
|
110
|
+
- 【主流程】任务拆解:命令 `tasks`
|
|
111
111
|
继续主流程,将技术方案拆解为可执行的开发任务
|
|
112
112
|
|
|
113
113
|
**完整流程图:**
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: design workflow
|
|
3
|
+
---
|
|
4
|
+
1. Immediate response upon activation: design workflow has been activated.
|
|
5
|
+
2. **You must first read and strictly abide by the principles in the constitutional documents**:`.6aspec/rules/green/6A_constitution.md`
|
|
6
|
+
3. Read file: `.6aspec/rules/green/6A_design_sop.md`
|
|
7
|
+
4. Strictly follow the "New Feature Architecture SOP" defined in that file.
|
|
8
|
+
5. Output the Technical Design Document (TDD).
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
description:
|
|
2
|
+
description: 执行开发任务 (Execute Task)
|
|
3
3
|
---
|
|
4
4
|
|
|
5
5
|
# 执行开发任务指令
|
|
@@ -10,11 +10,11 @@ description: 6A-code: 执行开发任务 (Execute Task)
|
|
|
10
10
|
当用户提供一个任务文件路径(如 `@task_01_api_xxx.md`)并要求“执行任务”时:
|
|
11
11
|
|
|
12
12
|
1. **激活角色**:切换至 `Senior Developer` 角色。
|
|
13
|
-
2. **调用 SOP**:严格遵循 `.6aspec/rules/
|
|
13
|
+
2. **调用 SOP**:严格遵循 `.6aspec/rules/green/6A_code_implementation_sop.md` 中的协议。
|
|
14
14
|
- **Step 0**: 上下文加载 (Task + TDD + Rules)
|
|
15
15
|
- **Step 1**: 自底向上编码 (DTO -> Repo -> Service -> API)
|
|
16
16
|
- **Step 2**: 质量检查 (Lint)
|
|
17
17
|
- **Step 3**: 状态更新 (Task File + README)
|
|
18
18
|
|
|
19
19
|
## 快捷指令参数
|
|
20
|
-
用户可以直接输入:`
|
|
20
|
+
用户可以直接输入:`exec @task_file`
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: import-model-table workflow
|
|
3
|
+
---
|
|
4
|
+
1. Immediate response upon activation: import-model-table workflow has been activated
|
|
5
|
+
2. Read file: `.6aspec/rules/green/6A_import_model_table_sop.md`
|
|
6
|
+
3. Strictly follow the "Import Model Table SOP" defined in that file
|
|
7
|
+
4. Execute the python script to import entities
|
|
8
|
+
|
|
@@ -4,11 +4,11 @@ description: Init Project Artifacts (Functional Map & Event List)
|
|
|
4
4
|
Immediate response upon activation: Project Artifacts Initialization workflow has been activated.
|
|
5
5
|
|
|
6
6
|
Phase 1: Functional Capability Map
|
|
7
|
-
1. Read file: `.6aspec/rules/
|
|
7
|
+
1. Read file: `.6aspec/rules/green/6A_init_map_sop.md`
|
|
8
8
|
2. Strictly follow the "Init Functional Capability Map SOP" defined in that file.
|
|
9
9
|
3. Execute the codebase scan and update the artifact at `.6aspec/biz/functional-capability-Map.md`.
|
|
10
10
|
|
|
11
11
|
Phase 2: Event List
|
|
12
|
-
1. Read file: `.6aspec/rules/
|
|
12
|
+
1. Read file: `.6aspec/rules/green/6A_init_event_list_sop.md`
|
|
13
13
|
2. Strictly follow the "Event List Generation SOP" defined in that file.
|
|
14
14
|
3. Execute the codebase scan and update the artifact at `.6aspec/biz/event-list.md`.
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
---
|
|
2
|
-
description:
|
|
2
|
+
description: model workflow
|
|
3
3
|
---
|
|
4
|
-
1. Immediate response upon activation:
|
|
5
|
-
2. **You must first read and strictly abide by the principles in the constitutional documents**:`.6aspec/rules/
|
|
4
|
+
1. Immediate response upon activation: model workflow has been activated
|
|
5
|
+
2. **You must first read and strictly abide by the principles in the constitutional documents**:`.6aspec/rules/green/6A_constitution.md`
|
|
6
6
|
3. **Context Restriction**:
|
|
7
7
|
- Do NOT perform `codebase_search`.
|
|
8
8
|
- Do NOT read any files unless they are explicitly provided by the user (via '@') or explicitly listed in the SOP steps.
|
|
9
9
|
- Stop and ask the user if you think you need more information.
|
|
10
|
-
4. Read file: `.6aspec/rules/
|
|
10
|
+
4. Read file: `.6aspec/rules/green/6A_model_sop.md`
|
|
11
11
|
5. Strictly follow the "Domain modeling and database design Architecture SOP" defined in that file
|
|
12
12
|
6. Output the Domain model and table design
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: tasks workflow
|
|
3
|
+
---
|
|
4
|
+
1. Immediate response upon activation: tasks workflow has been activated
|
|
5
|
+
2. **You must first read and strictly abide by the principles in the constitutional documents**:`.6aspec/rules/green/6A_constitution.md`
|
|
6
|
+
3. Read file: `.6aspec/rules/green/6A_tasks_sop.md`
|
|
7
|
+
4. Strictly follow the "Task Decomposition SOP" defined in that file
|
|
8
|
+
5. Output the task list
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: visual-logic workflow
|
|
3
|
+
---
|
|
4
|
+
1. Immediate response upon activation: visual-logic workflow has been activated.
|
|
5
|
+
2. **You must first read and strictly abide by the principles in the constitutional documents**:`.6aspec/rules/green/6A_constitution.md`
|
|
6
|
+
3. Read file: `.6aspec/rules/green/6A_visual_logic_sop.md`.
|
|
7
|
+
4. Strictly follow the "Visual Logic Diagrams SOP" defined in that file.
|
|
8
|
+
5. Output Mermaid diagrams as specified in the SOP.
|
|
9
|
+
|