6a-spec-install 1.0.1-dev.4 → 1.0.1-dev.8

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.
@@ -1,8 +1,15 @@
1
1
  ---
2
- description: Init Functional Capability Map workflow
2
+ description: Init Project Artifacts (Functional Map & Event List)
3
3
  alwaysApply: false
4
4
  ---
5
- 1. Immediate response upon activation: Init Functional Capability Map workflow has been activated.
6
- 2. Read file: `.cursor/rules/6A/6A_init_map_sop.md`
7
- 3. Strictly follow the "Init Functional Capability Map SOP" defined in that file.
8
- 4. Execute the codebase scan and update the artifact at `.6A-spec/biz/functional-capability-Map.md`.
5
+ Immediate response upon activation: Project Artifacts Initialization workflow has been activated.
6
+
7
+ Phase 1: Functional Capability Map
8
+ 1. Read file: `.cursor/rules/6A/6A_init_map_sop.md`
9
+ 2. Strictly follow the "Init Functional Capability Map SOP" defined in that file.
10
+ 3. Execute the codebase scan and update the artifact at `.6A-spec/biz/functional-capability-Map.md`.
11
+
12
+ Phase 2: Event List
13
+ 1. Read file: `.cursor/rules/6A/6A_init_event_list_sop.md`
14
+ 2. Strictly follow the "Event List Generation SOP" defined in that file.
15
+ 3. Execute the codebase scan and update the artifact at `.6A-spec/biz/event-list.md`.
@@ -0,0 +1,62 @@
1
+ ---
2
+ description: 事件清单生成标准操作流程 (Event List Generation SOP)
3
+ alwaysApply: false
4
+ ---
5
+
6
+ # 6A-event-list: 事件清单生成标准操作流程 (Event List Generation SOP)
7
+
8
+ ## 1. 目标
9
+ 扫描全项目中带有 `com.mysoft.framework.event.annotation.Event` 注解的 Java 类,生成一份详细的事件清单文档 `.6A-spec/biz/event-list.md`。
10
+
11
+ ## 2. 扫描与识别 (Scan & Identify)
12
+ 1. **搜索范围**: 在整个 Workspace 中搜索引用了 `com.mysoft.framework.event.annotation.Event` 的 Java 文件。
13
+ 2. **过滤条件**:
14
+ - 必须是类定义(Class definition)。
15
+ - 类必须被 `@Event` 注解标记。
16
+ - 忽略测试代码(`src/test` 目录下的文件)。
17
+ 3. **模块归类**: 根据文件路径识别所属模块(例如 `yymh-ticket`, `yymh-portal` 等)。
18
+
19
+ ## 3. 元数据提取 (Metadata Extraction)
20
+ 对每个识别出的事件类,提取以下核心信息:
21
+ 1. **基本信息**: 类名、包名、文件绝对路径。
22
+ 2. **事件名称与描述**:
23
+ - 优先提取 `@Event` 注解中的 `name` 或 `description` 属性。
24
+ - 其次提取类的 JavaDoc 注释(第一行作为名称,后续作为描述)。
25
+ - 若均无,使用类名作为名称。
26
+ 3. **继承关系**: 识别父类(如 `BaseEvent`, `BaseRentalEvent` 等)。
27
+ 4. **字段分析**:
28
+ - 提取所有字段的名称和类型。
29
+ - **字段来源分析**: 区分字段是定义在当前类中,还是继承自父类。
30
+ - *注意*: 如果无法精确分析父类字段,将来源标记为父类类名。
31
+
32
+ ## 4. 格式化与输出 (Format & Output)
33
+ 1. **目录检查**: 确保输出目录 `.6A-spec/biz` 存在,不存在则创建。
34
+ 2. **文档结构**:
35
+ - **Header**: 包含“项目事件清单”标题和统计信息(总事件数、模块数、扫描范围)。
36
+ - **TOC**: 按模块名生成的目录索引。
37
+ - **Content**: 按模块分组,详细列出每个事件的卡片。
38
+ 3. **事件卡片模板**:
39
+
40
+ ```markdown
41
+ ### {ClassName}
42
+
43
+ **事件名称**: {EventName}
44
+
45
+ **事件描述**: {Description}
46
+
47
+ **包名**: `{PackageName}`
48
+
49
+ **继承关系**: 继承自 `{ParentClassName}`
50
+
51
+ **事件体字段**:
52
+
53
+ | 字段名 | 字段类型 | 字段来源 |
54
+ |--------|----------|----------|
55
+ | {fieldName} | {fieldType} | {sourceClass} |
56
+ ...
57
+
58
+ **文件路径**: `{FilePath}`
59
+
60
+ ---
61
+ ```
62
+
@@ -71,7 +71,7 @@ alwaysApply: false
71
71
  - 扫表量级与分页/分片方案(如有)
72
72
 
73
73
  #### 事件订阅(Event Subscribers)
74
- - 订阅事件必须来自系统已有事件清单:`./.cursor/rules/biz/event-list.md`
74
+ - 订阅事件必须来自系统已有事件清单:`./.6A-spec/biz/event-list.md`
75
75
  - 必须同时写 **事件中文名 + 英文名**(如:自动出账提醒事件(AutoBillingRemindEvent))
76
76
 
77
77
  #### 后台任务(Async Background Job)
@@ -127,7 +127,7 @@ alwaysApply: false
127
127
  #### 3.3 事件订阅(Event Subscribers)
128
128
  你必须输出“事件订阅清单表格”,包含以下列:
129
129
  - **订阅者名称**
130
- - **订阅事件(中文名 / 英文名)**(事件必须来自:`./.cursor/rules/biz/event-list.md`)
130
+ - **订阅事件(中文名 / 英文名)**(事件必须来自:`./.6A-spec/biz/event-list.md`)
131
131
  - **执行逻辑**
132
132
  - **幂等设计**
133
133
  - **并发控制(如需要)**
@@ -30,8 +30,8 @@ alwaysApply: false
30
30
  ### 可选输入(用于补齐 TDD 未显式写清的信息)
31
31
  - 数据模型文档:`.docs/{功能名称}/MODEL_{功能名称}.md`
32
32
  - PRD:`.prd/{功能名称}-prd.md`
33
- - 事件清单:`./.cursor/rules/biz/event-list.md`(当涉及事件订阅/发布时)
34
- - 能力地图:`./.cursor/rules/biz/functional-capability-Map.md`(当涉及跨模块 Facade 依赖时)
33
+ - 事件清单:`./.6A-spec/biz/event-list.md`(当涉及事件订阅/发布时)
34
+ - 能力地图:`./.6A-spec/biz/functional-capability-Map.md`(当涉及跨模块 Facade 依赖时)
35
35
 
36
36
  ## 中断机制(必须执行)
37
37
  如果出现以下任一情况,必须停止画图并输出“提问清单”,等待人类补充:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "6a-spec-install",
3
- "version": "1.0.1-dev.4",
3
+ "version": "1.0.1-dev.8",
4
4
  "description": "6A-spec 驱动开发提示词安装工具,支持 Cursor 和 Claude",
5
5
  "main": "lib/installer.js",
6
6
  "bin": {