@mingfuyun/star-allinone 0.3.0 → 0.3.2
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/README.md +5 -10
- package/examples/AGENTS.md +2 -5
- package/examples/skills/custom-domain-invariants/SKILL.md +16 -0
- package/package.json +1 -1
- package/scripts/cli.js +8 -2
- package/skills/README.md +40 -211
- package/skills/shared/api-to-service/SKILL.md +4 -4
- package/skills/shared/{api-mock/SKILL.md → api-to-service/references/mock.md} +2 -12
- package/skills/shared/design-to-page/SKILL.md +43 -8
- package/skills/shared/{page-recipe → design-to-page}/references/list-page-template.md +1 -1
- package/skills/shared/design-to-page/references/page-conventions.md +1 -1
- package/skills/shared/i-have-adhd/{SKILL.md → i-have-adhd.md} +0 -10
- package/skills/shared/publish-test/SKILL.md +1 -1
- package/skills/shared/review-and-submit/SKILL.md +7 -17
- package/skills/shared/{ai-review/SKILL.md → review-and-submit/references/ai-review.md} +3 -13
- package/skills/shared/{commit-current-changes/SKILL.md → review-and-submit/references/commit.md} +4 -15
- package/skills/shared/{impact-analysis/SKILL.md → review-and-submit/references/impact-analysis.md} +1 -13
- package/skills/shared/{verify/SKILL.md → review-and-submit/references/verify.md} +2 -12
- package/examples/skills/custom-device-service/SKILL.md +0 -18
- package/skills/shared/page-recipe/SKILL.md +0 -72
- package/skills/shared/project-conventions/SKILL.md +0 -37
- /package/skills/shared/{api-mock → api-to-service}/references/mock-conventions.md +0 -0
package/README.md
CHANGED
|
@@ -77,7 +77,7 @@ StarLink 示例见 `examples/projects/`。
|
|
|
77
77
|
pnpm exec star-allinone skills sync
|
|
78
78
|
```
|
|
79
79
|
|
|
80
|
-
4. 把真正的业务特例放到 `.agents/skills/custom
|
|
80
|
+
4. 把真正的业务特例放到 `.agents/skills/custom-*`。审查、提交、发布、单接口、页面生成不要做成 `custom-*`。全量契约重建(若需要)必须 `disable-model-invocation`,并在 `AGENTS.md` 写清命令。
|
|
81
81
|
|
|
82
82
|
5. 仓库根放 `AGENTS.md`(可从包内 `examples/AGENTS.md` 复制)。`skills sync` 只在该文件缺失时补一份,不会覆盖已有内容。常驻约定只写这一份,不要加 `.cursor/rules`。
|
|
83
83
|
|
|
@@ -90,20 +90,15 @@ git commit -m "chore(skill): 接入公共 skill"
|
|
|
90
90
|
|
|
91
91
|
### 业务项目:日常调用
|
|
92
92
|
|
|
93
|
-
|
|
93
|
+
只使用下面这些**用户入口**。
|
|
94
94
|
|
|
95
95
|
```text
|
|
96
96
|
使用 $shared-api-to-service,为 GET /api/v1/devices/ 生成类型、Service 和 JSON Mock。
|
|
97
97
|
```
|
|
98
98
|
|
|
99
99
|
```text
|
|
100
|
-
使用 $shared-page
|
|
101
|
-
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
```text
|
|
105
|
-
使用 $shared-design-to-page,根据我上传的设计稿生成非标准页面。
|
|
106
|
-
缺少的 Service、类型和 Mock 一并生成。
|
|
100
|
+
使用 $shared-design-to-page,生成 /widgets 页面。
|
|
101
|
+
标准列表接口 GET /api/v1/widgets/。
|
|
107
102
|
```
|
|
108
103
|
|
|
109
104
|
```text
|
|
@@ -115,7 +110,7 @@ git commit -m "chore(skill): 接入公共 skill"
|
|
|
115
110
|
使用 $shared-publish-test,把当前分支发布到测试环境。
|
|
116
111
|
```
|
|
117
112
|
|
|
118
|
-
公共流程用 `shared-*`,项目专属规则用 `custom-*`。`custom-*` 不能再实现一遍 Service
|
|
113
|
+
公共流程用 `shared-*`,项目专属规则用 `custom-*`。`custom-*` 不能再实现一遍 Service/页面生成/审查。全量契约重建若需要,写成不可调用的脚本,并在 `AGENTS.md` 写命令。业务定制需要复用公共流程时,读取对应的 `.agents/skills/shared-*/SKILL.md`,不要再抛一个入口。
|
|
119
114
|
|
|
120
115
|
### 业务项目:更新公共 skill
|
|
121
116
|
|
package/examples/AGENTS.md
CHANGED
|
@@ -9,16 +9,13 @@ Always-on instructions are this file. Do not add `.cursor/rules`.
|
|
|
9
9
|
User-facing shared entries only:
|
|
10
10
|
|
|
11
11
|
- One endpoint: `pnpm exec star-allinone gen service --operation "METHOD /path/"` or `$shared-api-to-service`.
|
|
12
|
-
-
|
|
13
|
-
- Non-standard UI: `$shared-design-to-page`.
|
|
12
|
+
- Pages: `$shared-design-to-page`. Standard lists run `pnpm exec star-allinone gen page` inside that skill.
|
|
14
13
|
- Review and commit: `$shared-review-and-submit`. Wait for confirmation.
|
|
15
14
|
- Test publish: `$shared-publish-test` after explicit pipeline confirmation.
|
|
16
15
|
|
|
17
|
-
Do not invoke `shared-api-mock`, `shared-verify`, `shared-impact-analysis`, `shared-ai-review`, `shared-commit-current-changes`, or `shared-project-conventions` directly.
|
|
18
|
-
|
|
19
16
|
## Hard rules
|
|
20
17
|
|
|
21
|
-
- For non-trivial changes, read `.agents/skills/shared-project-conventions
|
|
18
|
+
- For non-trivial changes, read `.agents/skills/shared-project-conventions/references/architecture.md`.
|
|
22
19
|
- Pages use `import Service from '@/services'`. Do not call axios or `src/services/request.tsx` from pages.
|
|
23
20
|
- Lists: `MFProTable`. Forms: `ProForm`. Overlays: `CustomDrawer`, `BaseModal`, `HocModal` from `@mingfuyun/star-allinone`.
|
|
24
21
|
- Keep columns and actions in `const.tsx`. Empty cells render as `-`.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: custom-domain-invariants
|
|
3
|
+
description: Internal. Project domain extras for review. Do not invoke. Not a generate, page, or review entry.
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Domain invariants
|
|
8
|
+
|
|
9
|
+
Not a user-facing entry. Pages, services, and review still go through `$shared-design-to-page`, `$shared-api-to-service`, and `$shared-review-and-submit`.
|
|
10
|
+
|
|
11
|
+
Read this file only as extra checks after those shared skills. Do not generate pages, services, or mocks here.
|
|
12
|
+
|
|
13
|
+
Example extras (replace with the project's real invariants):
|
|
14
|
+
|
|
15
|
+
- IPv4 and IPv6 branches must both be checked.
|
|
16
|
+
- Do not invent query param aliases that are missing from swagger.
|
package/package.json
CHANGED
package/scripts/cli.js
CHANGED
|
@@ -39,8 +39,12 @@ function listSharedSkillNames() {
|
|
|
39
39
|
.sort();
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
+
function hasSkillMarkdown(name) {
|
|
43
|
+
return fs.existsSync(path.join(skillsRoot, name, 'SKILL.md'));
|
|
44
|
+
}
|
|
45
|
+
|
|
42
46
|
function listSkills() {
|
|
43
|
-
const skills = listSharedSkillNames();
|
|
47
|
+
const skills = listSharedSkillNames().filter(hasSkillMarkdown);
|
|
44
48
|
if (!skills.length) {
|
|
45
49
|
console.log('No shared skills found.');
|
|
46
50
|
return;
|
|
@@ -142,12 +146,14 @@ function pruneStaleShared(destination, prefix, syncedNames, options) {
|
|
|
142
146
|
|
|
143
147
|
function selectedSharedSkills(config) {
|
|
144
148
|
const available = listSharedSkillNames();
|
|
149
|
+
const support = available.filter((name) => !hasSkillMarkdown(name));
|
|
145
150
|
if (!config.sharedSkills) return available;
|
|
146
151
|
const missing = config.sharedSkills.filter((name) => !available.includes(name));
|
|
147
152
|
if (missing.length) {
|
|
148
153
|
throw new Error(`Unknown sharedSkills: ${missing.join(', ')}`);
|
|
149
154
|
}
|
|
150
|
-
|
|
155
|
+
const selected = available.filter((name) => config.sharedSkills.includes(name));
|
|
156
|
+
return [...new Set([...support, ...selected])];
|
|
151
157
|
}
|
|
152
158
|
|
|
153
159
|
function syncProject(options) {
|
package/skills/README.md
CHANGED
|
@@ -6,83 +6,51 @@
|
|
|
6
6
|
|
|
7
7
|
## 推荐目录
|
|
8
8
|
|
|
9
|
-
以 `starscope-frontend` 为例:
|
|
10
|
-
|
|
11
9
|
```text
|
|
12
|
-
|
|
10
|
+
business-app/
|
|
13
11
|
├── AGENTS.md
|
|
14
12
|
├── .star-allinone.json
|
|
15
13
|
└── .agents/
|
|
16
14
|
├── skills/
|
|
17
15
|
│ ├── shared-api-to-service/
|
|
18
|
-
│ ├── shared-api-mock/
|
|
19
16
|
│ ├── shared-design-to-page/
|
|
20
|
-
│ ├── shared-page-recipe/
|
|
21
|
-
│ ├── shared-verify/
|
|
22
17
|
│ ├── shared-review-and-submit/
|
|
23
18
|
│ ├── shared-publish-test/
|
|
24
|
-
│
|
|
19
|
+
│ ├── shared-project-conventions/ ← 无 SKILL.md,给入口读
|
|
20
|
+
│ ├── shared-i-have-adhd/ ← 无 SKILL.md,给入口读
|
|
21
|
+
│ └── custom-* ← 仅真正的业务特例
|
|
25
22
|
└── project/
|
|
26
23
|
├── conventions.md
|
|
27
24
|
├── review-rules.md
|
|
28
25
|
└── openapi.json
|
|
29
26
|
```
|
|
30
27
|
|
|
31
|
-
StarLink:
|
|
32
|
-
|
|
33
|
-
```text
|
|
34
|
-
starlink-frontend/
|
|
35
|
-
├── AGENTS.md
|
|
36
|
-
└── .agents/
|
|
37
|
-
└── skills/
|
|
38
|
-
├── shared-api-to-service/
|
|
39
|
-
├── shared-api-mock/
|
|
40
|
-
├── shared-design-to-page/
|
|
41
|
-
├── shared-page-recipe/
|
|
42
|
-
├── shared-verify/
|
|
43
|
-
├── shared-review-and-submit/
|
|
44
|
-
├── shared-publish-test/
|
|
45
|
-
└── custom-node-management/
|
|
46
|
-
```
|
|
47
|
-
|
|
48
28
|
命名约定:
|
|
49
29
|
|
|
50
30
|
```text
|
|
51
|
-
shared-*
|
|
52
|
-
custom-*
|
|
31
|
+
shared-* 公共内容,由 star-allinone 提供,经 CLI 同步后提交到业务仓库
|
|
32
|
+
custom-* 业务定制,由业务项目维护;禁止做成第二套页面/审查/单接口生成入口
|
|
53
33
|
```
|
|
54
34
|
|
|
55
|
-
这样所有 skill 都在业务项目中,Codex 可以直接发现;同时通过名称可以清楚区分来源。
|
|
56
|
-
|
|
57
35
|
Cursor / Codex 的常驻说明只放仓库根 `AGENTS.md`(模板见 `examples/AGENTS.md`)。项目差异放 `.agents/project/`。不要新增 `.cursor/rules`。
|
|
58
36
|
|
|
59
37
|
## npm 包的职责
|
|
60
38
|
|
|
61
|
-
`@mingfuyun/star-allinone`
|
|
39
|
+
`@mingfuyun/star-allinone` 只发布 **4 个用户入口**。其余是入口的 `references/` 或无 `SKILL.md` 的共享文件:
|
|
62
40
|
|
|
63
41
|
```text
|
|
64
42
|
@mingfuyun/star-allinone/
|
|
65
43
|
└── skills/
|
|
66
44
|
└── shared/
|
|
67
|
-
├── api-to-service/
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
│ └── api-artifact-generation.md
|
|
72
|
-
├── api-mock/
|
|
73
|
-
├── design-to-page/ # page-conventions.md + overlays.md
|
|
74
|
-
├── page-recipe/ # 标准列表页;CLI `gen page`
|
|
45
|
+
├── api-to-service/ # 单接口;mock 规则在 references/
|
|
46
|
+
├── design-to-page/ # 页面;标准列表内部跑 gen page
|
|
47
|
+
├── review-and-submit/ # 审查并提交;步骤在 references/
|
|
48
|
+
├── publish-test/ # 测发
|
|
75
49
|
├── project-conventions/ # architecture / review-checklist / quality-checklist
|
|
76
|
-
|
|
77
|
-
├── review-and-submit/
|
|
78
|
-
├── impact-analysis/
|
|
79
|
-
├── ai-review/
|
|
80
|
-
├── commit-current-changes/
|
|
81
|
-
├── i-have-adhd/ # 同步为 shared-i-have-adhd;其他 shared skill 的用户输出格式
|
|
82
|
-
└── publish-test/ # 流水线 ID 从 .star-allinone.json 读取
|
|
50
|
+
└── i-have-adhd/ # 用户输出格式
|
|
83
51
|
```
|
|
84
52
|
|
|
85
|
-
|
|
53
|
+
公共入口写死两边已对齐的硬规则,例如:页面走 `MFRequest`、DTO 放 namespace typings、`MFProTable` + `ProForm`、弹层用 `BaseModal` / `CustomDrawer` / `HocModal`、`await` 必须 try/catch、禁止无说明的 `any`。
|
|
86
54
|
|
|
87
55
|
业务项目的 `.agents/project/` 只写差异:路径、权限体系、OpenAPI 位置、领域特例。项目文件可以补充,但不能削弱公共硬规则。
|
|
88
56
|
|
|
@@ -94,13 +62,7 @@ npm 包中的 skills/shared
|
|
|
94
62
|
业务项目 .agents/skills/shared-*
|
|
95
63
|
```
|
|
96
64
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
```text
|
|
100
|
-
~/.codex/skills
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
也不会管理业务项目的 `custom-*` skill。
|
|
65
|
+
不会写入 `~/.codex/skills`,也不会管理业务项目的 `custom-*`。`skills list` 只列出带 `SKILL.md` 的入口。无 `SKILL.md` 的目录仍会同步,供入口阅读。
|
|
104
66
|
|
|
105
67
|
## CLI 使用方式
|
|
106
68
|
|
|
@@ -110,40 +72,11 @@ npm 包中的 skills/shared
|
|
|
110
72
|
pnpm exec star-allinone skills sync
|
|
111
73
|
```
|
|
112
74
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
```text
|
|
116
|
-
当前项目/.agents/skills/shared-*/
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
例如:
|
|
120
|
-
|
|
121
|
-
```bash
|
|
122
|
-
cd /path/to/starscope-frontend
|
|
123
|
-
pnpm exec star-allinone skills sync
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
结果:
|
|
127
|
-
|
|
128
|
-
```text
|
|
129
|
-
.agents/skills/
|
|
130
|
-
├── shared-api-to-service/
|
|
131
|
-
├── shared-api-mock/
|
|
132
|
-
├── shared-review-and-submit/
|
|
133
|
-
├── shared-publish-test/
|
|
134
|
-
└── custom-*/
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
公共 skill 的更新不会影响业务定制 skill。同步会整体替换 `shared-*` 目录,并删除包中已不存在的过期 `shared-*`,但不会改动 `custom-*`。
|
|
75
|
+
同步会整体替换 `shared-*` 目录,并删除包中已不存在的过期 `shared-*`,但不会改动 `custom-*`。
|
|
138
76
|
|
|
139
77
|
## 新增或修改公共 skill
|
|
140
78
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
```text
|
|
144
|
-
修改 star-allinone/skills/shared/api-to-service/SKILL.md
|
|
145
|
-
→ 发布新版本 @mingfuyun/star-allinone
|
|
146
|
-
```
|
|
79
|
+
管理者操作:修改 `star-allinone/skills/shared/<entry>/SKILL.md` → 发布新版本。
|
|
147
80
|
|
|
148
81
|
业务项目操作:
|
|
149
82
|
|
|
@@ -154,83 +87,20 @@ git add package.json pnpm-lock.yaml .agents/skills/shared-*
|
|
|
154
87
|
git commit -m "chore(skill): 更新公共 skill"
|
|
155
88
|
```
|
|
156
89
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
```bash
|
|
160
|
-
git pull
|
|
161
|
-
pnpm install
|
|
162
|
-
```
|
|
90
|
+
团队成员只需要 `git pull` 和 `pnpm install`。不要手动修改 `shared-*`。
|
|
163
91
|
|
|
164
|
-
|
|
92
|
+
## 新增或修改业务定制
|
|
165
93
|
|
|
166
|
-
|
|
94
|
+
`custom-*` 只用于真正的业务特例:领域不变量、全量契约脚本、度量。审查、提交、测发、单接口、页面生成都走公共入口。
|
|
167
95
|
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
```text
|
|
171
|
-
.agents/skills/custom-device-management/SKILL.md
|
|
172
|
-
```
|
|
173
|
-
|
|
174
|
-
提交即可:
|
|
175
|
-
|
|
176
|
-
```bash
|
|
177
|
-
git add .agents/skills/custom-device-management
|
|
178
|
-
git commit -m "feat(skill): 增加设备管理 skill"
|
|
179
|
-
```
|
|
180
|
-
|
|
181
|
-
不需要修改 `star-allinone`,也不需要重新发布 npm。
|
|
182
|
-
|
|
183
|
-
审查、提交、测试环境发布、单接口 Mock/Service、标准列表都走公共入口 skill。`custom-*` 只用于真正的业务特例。单接口生成禁止再做 custom;只有整份契约全量重建才允许留在 custom,并必须在 description 里写明「只用于全量」。度量类 custom 不得生成代码。
|
|
96
|
+
全量契约重建若必须留在 custom:加上 `disable-model-invocation: true`,在 `AGENTS.md` 写清要跑的命令,不要作为用户入口。度量类 custom 不得生成代码。
|
|
184
97
|
|
|
185
98
|
## 公共部分和业务定制组合
|
|
186
99
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
```text
|
|
190
|
-
.agents/skills/custom-device-service/SKILL.md
|
|
191
|
-
```
|
|
192
|
-
|
|
193
|
-
内容中引用公共 skill:
|
|
194
|
-
|
|
195
|
-
```md
|
|
196
|
-
---
|
|
197
|
-
name: custom-device-service
|
|
198
|
-
description: Generate StarScope device service code.
|
|
199
|
-
---
|
|
200
|
-
|
|
201
|
-
本任务需要结合公共 skill `shared-api-to-service` 执行。
|
|
202
|
-
|
|
203
|
-
先读取并遵循:
|
|
204
|
-
|
|
205
|
-
`.agents/skills/shared-api-to-service/SKILL.md`
|
|
206
|
-
|
|
207
|
-
再读取当前项目的:
|
|
208
|
-
|
|
209
|
-
- OpenAPI 文件
|
|
210
|
-
- Service 约定
|
|
211
|
-
- 项目类型和权限规则
|
|
212
|
-
|
|
213
|
-
只生成符合当前项目结构的设备相关 service。
|
|
214
|
-
```
|
|
215
|
-
|
|
216
|
-
公共 skill 负责通用流程,业务 skill 负责具体业务规则。
|
|
100
|
+
业务定制需要复用公共流程时,在 `custom-*` 里 **读取** 对应入口的 `SKILL.md`,不要再做一个可 `$` 调用的生成入口。领域规则示例见 `examples/skills/custom-domain-invariants/`。
|
|
217
101
|
|
|
218
102
|
## 项目配置
|
|
219
103
|
|
|
220
|
-
项目差异配置放在业务项目中,例如:
|
|
221
|
-
|
|
222
|
-
```text
|
|
223
|
-
starscope-frontend/
|
|
224
|
-
├── AGENTS.md
|
|
225
|
-
├── .star-allinone.json
|
|
226
|
-
└── .agents/
|
|
227
|
-
├── skills/
|
|
228
|
-
└── project/
|
|
229
|
-
├── conventions.md
|
|
230
|
-
├── review-rules.md
|
|
231
|
-
└── openapi.json
|
|
232
|
-
```
|
|
233
|
-
|
|
234
104
|
```json
|
|
235
105
|
{
|
|
236
106
|
"project": "starscope-frontend",
|
|
@@ -241,86 +111,45 @@ starscope-frontend/
|
|
|
241
111
|
}
|
|
242
112
|
```
|
|
243
113
|
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
```json
|
|
247
|
-
{
|
|
248
|
-
"project": "starlink-frontend",
|
|
249
|
-
"publicSkillPrefix": "shared-",
|
|
250
|
-
"publishPipelineId": "5245265"
|
|
251
|
-
}
|
|
252
|
-
```
|
|
253
|
-
|
|
254
|
-
完整示例见 `examples/projects/`。
|
|
255
|
-
|
|
256
|
-
可选字段 `sharedSkills` 用于只同步部分公共 skill;省略时同步 `skills/shared` 下的全部公共 skill。
|
|
114
|
+
完整示例见 `examples/projects/`。可选字段 `sharedSkills` 只限制用户入口;`project-conventions` 和 `i-have-adhd` 仍会同步。
|
|
257
115
|
|
|
258
|
-
## 用户入口
|
|
116
|
+
## 用户入口
|
|
259
117
|
|
|
260
|
-
|
|
118
|
+
对话里只点这些:
|
|
261
119
|
|
|
262
120
|
| 入口 | 用途 |
|
|
263
121
|
| --- | --- |
|
|
264
122
|
| `shared-api-to-service` | 单个 `METHOD /path/` → 类型、`MFRequest`、默认 mock |
|
|
265
|
-
| `shared-page
|
|
266
|
-
| `shared-
|
|
267
|
-
| `shared-review-and-submit` | 审查并提交(内部会读 impact / verify / commit) |
|
|
123
|
+
| `shared-design-to-page` | 页面:标准列表内部 `gen page`,其余按设计稿实现 |
|
|
124
|
+
| `shared-review-and-submit` | 审查并提交 |
|
|
268
125
|
| `shared-publish-test` | 测发 |
|
|
269
126
|
|
|
270
|
-
下面这些会随包同步,但 **不要作为用户入口调用**(`disable-model-invocation`)。入口 skill 会去读对应 `SKILL.md`:
|
|
271
|
-
|
|
272
|
-
`shared-api-mock`、`shared-project-conventions`、`shared-verify`、`shared-impact-analysis`、`shared-ai-review`、`shared-commit-current-changes`、`shared-i-have-adhd`
|
|
273
|
-
|
|
274
|
-
`custom-*` 禁止再实现一遍上述入口。单接口生成走公共 CLI;只有「整份契约全量重建」才允许留在 custom(例如 StarLink `custom-swagger-to-markdown`)。度量类 custom 不得生成代码。
|
|
275
|
-
|
|
276
127
|
## 公共规则写在哪里
|
|
277
128
|
|
|
278
|
-
|
|
|
129
|
+
| 入口 | 规则位置 | 覆盖内容 |
|
|
279
130
|
| --- | --- | --- |
|
|
280
|
-
| `shared-api-to-service` | SKILL + `references/service-conventions.md`、`api-artifact-generation.md` | 指定 operation、`MFRequest
|
|
281
|
-
| `shared-
|
|
282
|
-
| `shared-
|
|
283
|
-
| `shared-
|
|
284
|
-
|
|
|
285
|
-
|
|
|
286
|
-
| `shared-impact-analysis` | SKILL | 只读影响分类和回归路径 |
|
|
287
|
-
| `shared-ai-review` | SKILL | Hooks、契约、权限、性能、安全的 P0–P3 审查 |
|
|
288
|
-
| `shared-commit-current-changes` | SKILL | 确认门禁、中文 Conventional Commit、禁止未确认就提交 |
|
|
289
|
-
| `shared-review-and-submit` | SKILL | impact → verify → commit review 编排 |
|
|
290
|
-
| `shared-publish-test` | SKILL + `scripts/publish-current-branch.sh` | 云效测试流水线发布;只从配置读 `publishPipelineId`;git push 后不自动跑,需单独确认「推送流水线」 |
|
|
131
|
+
| `shared-api-to-service` | SKILL + `references/service-conventions.md`、`api-artifact-generation.md`、`mock.md` | 指定 operation、`MFRequest`、namespace 类型、snake_case、mock |
|
|
132
|
+
| `shared-design-to-page` | SKILL + `page-conventions.md`、`overlays.md`、`list-page-template.md` | 页面分层、标准列表 CLI、弹层合同 |
|
|
133
|
+
| `shared-review-and-submit` | SKILL + `impact-analysis.md`、`verify.md`、`ai-review.md`、`commit.md` | 影响分析 → 验证 → 确认后提交 |
|
|
134
|
+
| `shared-publish-test` | SKILL + `scripts/publish-current-branch.sh` | 云效测发;只读 `publishPipelineId` |
|
|
135
|
+
| (非入口)`shared-project-conventions` | `architecture.md`、`review-checklist.md`、`quality-checklist.md` | 架构与质量清单 |
|
|
136
|
+
| (非入口)`shared-i-have-adhd` | `i-have-adhd.md` | 用户输出格式 |
|
|
291
137
|
|
|
292
138
|
以下内容**不**写进公共 skill 源码:
|
|
293
139
|
|
|
294
|
-
- 流水线 ID
|
|
295
|
-
- OpenAPI
|
|
296
|
-
- 真正的业务特例:权限常量名、
|
|
140
|
+
- 流水线 ID:`.star-allinone.json` 的 `publishPipelineId`
|
|
141
|
+
- OpenAPI 快照:业务仓库数据文件
|
|
142
|
+
- 真正的业务特例:权限常量名、IP 校验、设备/节点领域规则
|
|
297
143
|
|
|
298
144
|
## 最终推荐流程
|
|
299
145
|
|
|
300
|
-
公共 skill:
|
|
301
|
-
|
|
302
|
-
```text
|
|
303
|
-
star-allinone 修改
|
|
304
|
-
→ 发布 npm
|
|
305
|
-
→ 业务项目升级 npm
|
|
306
|
-
→ 执行 skills sync
|
|
307
|
-
→ 提交 .agents/skills/shared-*
|
|
308
|
-
```
|
|
309
|
-
|
|
310
|
-
业务定制 skill:
|
|
311
|
-
|
|
312
146
|
```text
|
|
313
|
-
|
|
314
|
-
→ 提交业务项目
|
|
147
|
+
star-allinone 修改 → 发布 npm → 业务项目升级并 skills sync → 提交 .agents/skills/shared-*
|
|
315
148
|
```
|
|
316
149
|
|
|
317
|
-
最终结构和责任边界:
|
|
318
|
-
|
|
319
150
|
```text
|
|
320
|
-
AGENTS.md
|
|
151
|
+
AGENTS.md
|
|
321
152
|
.agents/skills/
|
|
322
|
-
├── shared-*
|
|
323
|
-
└── custom-*
|
|
153
|
+
├── shared-* ← npm 包同步
|
|
154
|
+
└── custom-* ← 业务项目自己维护
|
|
324
155
|
```
|
|
325
|
-
|
|
326
|
-
这比全局安装更适合团队协作,也比把公共 skill 藏在 `node_modules` 中更可靠,因为公共 skill 最终会进入业务项目仓库,团队成员拉取代码后即可直接使用。
|
|
@@ -5,7 +5,7 @@ description: User-facing. Generate or update one OpenAPI/Swagger operation as Ty
|
|
|
5
5
|
|
|
6
6
|
# API to Service
|
|
7
7
|
|
|
8
|
-
User-facing entry for **one** `METHOD /path/` or `operationId`. Do not regenerate an entire Swagger domain here.
|
|
8
|
+
User-facing entry for **one** `METHOD /path/` or `operationId`. Do not regenerate an entire Swagger/OpenAPI domain here. Full-spec rebuilds, if the project has one, live in that project's `custom-*` and are not this skill.
|
|
9
9
|
|
|
10
10
|
This skill is fully shared. Generate only the requested `METHOD /path/` or `operationId`. Do not guess undocumented fields or change unrelated endpoints.
|
|
11
11
|
|
|
@@ -14,7 +14,7 @@ Read before editing:
|
|
|
14
14
|
1. `.star-allinone.json`
|
|
15
15
|
2. [references/service-conventions.md](references/service-conventions.md)
|
|
16
16
|
3. [references/api-artifact-generation.md](references/api-artifact-generation.md)
|
|
17
|
-
4.
|
|
17
|
+
4. [references/mock-conventions.md](references/mock-conventions.md) before producing JSON
|
|
18
18
|
|
|
19
19
|
OpenAPI lookup order:
|
|
20
20
|
|
|
@@ -37,7 +37,7 @@ Use `--spec <file>` when `.star-allinone.json` has no `openapi`. Use `--domain <
|
|
|
37
37
|
|
|
38
38
|
3. If the CLI reports reuse, keep the existing method. If it reports a conflict, stop and show the diff; do not overwrite.
|
|
39
39
|
4. Review the generated types against the spec: snake_case, optionality, `| null`, unwrapped `data`, and exact method/path.
|
|
40
|
-
5. Produce extra empty or error mocks only when requested, using
|
|
40
|
+
5. Produce extra empty or error mocks only when requested, using [references/mock.md](references/mock.md).
|
|
41
41
|
6. Verify formatting, TypeScript, JSON parsing, exact method/path, and a focused diff.
|
|
42
42
|
|
|
43
43
|
## Hard rules
|
|
@@ -60,4 +60,4 @@ Parse changed JSON files. Search generated names, operationId, and exact API pat
|
|
|
60
60
|
|
|
61
61
|
## User-facing output
|
|
62
62
|
|
|
63
|
-
Read and apply `.agents/skills/shared-i-have-adhd/
|
|
63
|
+
Read and apply `.agents/skills/shared-i-have-adhd/i-have-adhd.md` to every response this skill sends to the user.
|
|
@@ -1,14 +1,8 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: {{sharedSkillName}}
|
|
3
|
-
description: Internal. Do not invoke. Called by shared-api-to-service when extra mock scenarios are needed. Not a user-facing generate-service entry.
|
|
4
|
-
disable-model-invocation: true
|
|
5
|
-
---
|
|
6
|
-
|
|
7
1
|
# API Mock
|
|
8
2
|
|
|
9
|
-
|
|
3
|
+
`shared-api-to-service` reads this file when extra mock scenarios are needed. Generating types or `MFRequest` methods is not this file's job.
|
|
10
4
|
|
|
11
|
-
|
|
5
|
+
Read [mock-conventions.md](mock-conventions.md), `.star-allinone.json`, the related service types, and the OpenAPI file from `openapi` in `.star-allinone.json` (or the document provided in this conversation).
|
|
12
6
|
|
|
13
7
|
If the service contract is missing, first follow `.agents/skills/shared-api-to-service/SKILL.md`.
|
|
14
8
|
|
|
@@ -24,7 +18,3 @@ If the service contract is missing, first follow `.agents/skills/shared-api-to-s
|
|
|
24
18
|
## Handoff
|
|
25
19
|
|
|
26
20
|
For every endpoint, report HTTP method, path, scenario label, and one strict parseable JSON block. If files were written, list the paths and confirm they parse as JSON.
|
|
27
|
-
|
|
28
|
-
## User-facing output
|
|
29
|
-
|
|
30
|
-
Read and apply `.agents/skills/shared-i-have-adhd/SKILL.md` to every response this skill sends to the user.
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: {{sharedSkillName}}
|
|
3
|
-
description: User-facing.
|
|
3
|
+
description: User-facing. Generate or update a page. Standard table + drawer + confirm lists use star-allinone gen page inside this skill. Use for Figma, screenshots, UI specs, or CRUD list pages.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Design to Page
|
|
7
7
|
|
|
8
|
-
User-facing entry for **
|
|
8
|
+
User-facing entry for **pages**. Do not send the user to another page skill.
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
If the request is a standard management list (table + query + drawer form + confirm), run the CLI in the standard-list path below. Dashboards, iframes, and one-off layouts stay on the design path.
|
|
11
11
|
|
|
12
12
|
Before implementation, read:
|
|
13
13
|
|
|
@@ -20,15 +20,47 @@ If `.agents/project/conventions.md` exists, use it only for extra paths.
|
|
|
20
20
|
|
|
21
21
|
Inspect the nearest existing page of the same type before proposing files.
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
## Standard list
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
When the page is table + query + drawer + confirm, collect any missing item then generate. Do not guess the file tree.
|
|
26
|
+
|
|
27
|
+
Required inputs:
|
|
28
|
+
|
|
29
|
+
- Feature folder (`src/pages/<Feature>`)
|
|
30
|
+
- Route path and menu title
|
|
31
|
+
- List operation (`METHOD /path/` or `operationId`)
|
|
32
|
+
- Optional create / update / delete operations
|
|
33
|
+
- Optional permission codes for create / edit / delete
|
|
34
|
+
|
|
35
|
+
1. Run the CLI from the business project root:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
pnpm exec star-allinone gen page \
|
|
39
|
+
--feature <Feature> \
|
|
40
|
+
--route /path \
|
|
41
|
+
--title <中文标题> \
|
|
42
|
+
--list-operation "GET /api/v1/resource/" \
|
|
43
|
+
--create-operation "POST /api/v1/resource/" \
|
|
44
|
+
--update-operation "PATCH /api/v1/resource/{id}/" \
|
|
45
|
+
--delete-operation "DELETE /api/v1/resource/{id}/"
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Add `--permission-create`, `--permission-edit`, `--permission-delete` when codes are known.
|
|
49
|
+
|
|
50
|
+
2. If only services are missing, run `pnpm exec star-allinone gen service --operation "METHOD /path/"` first. Follow `.agents/skills/shared-api-to-service/SKILL.md`.
|
|
51
|
+
3. Fill generated placeholders using [references/list-page-template.md](references/list-page-template.md): columns, form fields, rowKey, permission constants, and pagination adapter (`results/count` vs `list/total`).
|
|
52
|
+
4. If `src/components/Page/Container/config.tsx` exists, register the new page as a tab after generating the standalone files. Do not invent a second page shell.
|
|
53
|
+
5. Do not overwrite existing page files. Tell the user the CLI refused, then edit in place.
|
|
54
|
+
|
|
55
|
+
## Design path
|
|
56
|
+
|
|
57
|
+
For non-standard layouts:
|
|
26
58
|
|
|
27
59
|
1. List visible states: default, loading, empty, error, disabled, overflow, permission, and narrow-screen.
|
|
28
60
|
2. Resolve ambiguities that affect APIs, route ownership, permissions, or component boundaries. For minor visual gaps, follow the closest precedent and state the assumption.
|
|
29
61
|
3. Write a short implementation contract: route, sections, query fields, columns, actions, APIs, permissions, states, and files.
|
|
30
62
|
4. Implement the smallest complete vertical slice. Keep columns and actions outside render. Keep overlay concerns in focused components.
|
|
31
|
-
5. API-backed pages include types, `MFRequest` methods, aggregate exports, and page consumption in the same change. Use `.agents/skills/shared-api-to-service/SKILL.md` for missing services. Use `.agents/skills/shared-api-mock
|
|
63
|
+
5. API-backed pages include types, `MFRequest` methods, aggregate exports, and page consumption in the same change. Use `.agents/skills/shared-api-to-service/SKILL.md` for missing services. Use `.agents/skills/shared-api-to-service/references/mock.md` for extra mock scenarios. Do not embed production fake data.
|
|
32
64
|
6. Compare desktop and narrow layouts against the design. Fix structure and spacing before decoration.
|
|
33
65
|
7. Run focused verification. Do not claim visual fidelity without inspecting the rendered page.
|
|
34
66
|
|
|
@@ -37,8 +69,11 @@ If the request is a standard management list (table + query + drawer form + conf
|
|
|
37
69
|
- React function components, TypeScript, Ant Design 5, Pro Components, Less.
|
|
38
70
|
- `ProForm` for business forms. `MFProTable` for management lists.
|
|
39
71
|
- Overlays from `@mingfuyun/star-allinone`: `CustomDrawer`, `BaseModal`, `HocModal`.
|
|
72
|
+
- Pages consume `import Service from '@/services'` only.
|
|
73
|
+
- Keep columns and toolbar builders in `const.tsx`. Empty cells render as `-`.
|
|
40
74
|
- Every `await` uses `try-catch`; loading restores in `finally`; `validateFields()` failures are logged and stop the request.
|
|
41
75
|
- Mutations guard duplicate submit, show feedback, and reload affected lists.
|
|
76
|
+
- Do not use `Modal.confirm` or feature-level Ant Design `Modal` / `Drawer` shells.
|
|
42
77
|
- Do not add a UI library, state library, or CSS-in-JS system without approval.
|
|
43
78
|
- Do not refactor unrelated code.
|
|
44
79
|
|
|
@@ -46,11 +81,11 @@ If the request is a standard management list (table + query + drawer form + conf
|
|
|
46
81
|
|
|
47
82
|
```bash
|
|
48
83
|
pnpm exec prettier --check <changed-files>
|
|
49
|
-
pnpm
|
|
84
|
+
pnpm typecheck
|
|
50
85
|
```
|
|
51
86
|
|
|
52
87
|
Run `pnpm lint` for broad or shared changes. Run the project's documented build command when routes, entry, or multiple pages change.
|
|
53
88
|
|
|
54
89
|
## User-facing output
|
|
55
90
|
|
|
56
|
-
Read and apply `.agents/skills/shared-i-have-adhd/
|
|
91
|
+
Read and apply `.agents/skills/shared-i-have-adhd/i-have-adhd.md` to every response this skill sends to the user.
|
|
@@ -39,6 +39,6 @@ src/pages/<Feature>/
|
|
|
39
39
|
- `confirmLoading` tied to the async `onConfirm`.
|
|
40
40
|
- Do not use `Modal.confirm`.
|
|
41
41
|
|
|
42
|
-
##
|
|
42
|
+
## Container tabs
|
|
43
43
|
|
|
44
44
|
If the project uses `src/components/Page/Container/config.tsx`, the generated `src/pages/<Feature>/index.tsx` is still the source of truth. Add a tab entry that renders the feature component. Do not duplicate fetch logic inside Container.
|
|
@@ -75,7 +75,7 @@ Follow [overlays.md](overlays.md). Use `CustomDrawer`, `BaseModal`, and `HocModa
|
|
|
75
75
|
- API-backed pages include types, service methods, aggregate exports, and page consumption in the same change.
|
|
76
76
|
- Do not embed production fake data or invented response fields.
|
|
77
77
|
- If the backend contract is unavailable, label proposed methods, paths, and fields as proposed.
|
|
78
|
-
- Pair missing services with `.agents/skills/shared-api-to-service/SKILL.md`. Pair missing deterministic data with `.agents/skills/shared-api-mock
|
|
78
|
+
- Pair missing services with `.agents/skills/shared-api-to-service/SKILL.md`. Pair missing deterministic data with `.agents/skills/shared-api-to-service/references/mock.md`.
|
|
79
79
|
|
|
80
80
|
## Styling and fidelity
|
|
81
81
|
|
|
@@ -1,13 +1,3 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: {{sharedSkillName}}
|
|
3
|
-
description: Internal output style. Do not invoke as a task. Other shared skills apply this file to user-facing replies. Turn on with /i-have-adhd; off with stop adhd mode.
|
|
4
|
-
disable-model-invocation: true
|
|
5
|
-
license: MIT
|
|
6
|
-
metadata:
|
|
7
|
-
tags: "ADHD, Output Style, Productivity, Formatting"
|
|
8
|
-
category: "productivity"
|
|
9
|
-
---
|
|
10
|
-
|
|
11
1
|
# i-have-adhd
|
|
12
2
|
|
|
13
3
|
The reader has ADHD. Output is not just brief. It is shaped so an ADHD brain can act on it.
|
|
@@ -60,4 +60,4 @@ The dashboard comment is `BUILD_REMARK` and contains branch, commit subject, and
|
|
|
60
60
|
|
|
61
61
|
## User-facing output
|
|
62
62
|
|
|
63
|
-
Read and apply `.agents/skills/shared-i-have-adhd/
|
|
63
|
+
Read and apply `.agents/skills/shared-i-have-adhd/i-have-adhd.md` to every response this skill sends to the user.
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: {{sharedSkillName}}
|
|
3
|
-
description: User-facing. Pre-submit workflow: impact analysis, verify, then confirmation-gated commit. Use when the user wants to review, submit, or commit.
|
|
3
|
+
description: User-facing. Pre-submit workflow: impact analysis, verify, then confirmation-gated commit. Use when the user wants to review, submit, or commit.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Review and Submit
|
|
7
7
|
|
|
8
|
-
User-facing entry for review, submit, and commit. Do not tell the user to invoke
|
|
8
|
+
User-facing entry for review, submit, and commit. Read the files under `references/` in order. Do not tell the user to invoke other review skills.
|
|
9
9
|
|
|
10
10
|
This is the unified pre-submit entry and is fully shared. Do not mutate Git until the user confirms the exact reviewed scope.
|
|
11
11
|
|
|
@@ -17,7 +17,7 @@ Execute in this order.
|
|
|
17
17
|
|
|
18
18
|
### 1. Impact analysis
|
|
19
19
|
|
|
20
|
-
Follow
|
|
20
|
+
Follow [references/impact-analysis.md](references/impact-analysis.md). Output:
|
|
21
21
|
|
|
22
22
|
- Change summary
|
|
23
23
|
- Direct callers and affected pages
|
|
@@ -27,7 +27,7 @@ Follow `.agents/skills/shared-impact-analysis/SKILL.md`. Output:
|
|
|
27
27
|
|
|
28
28
|
### 2. Verification
|
|
29
29
|
|
|
30
|
-
Follow
|
|
30
|
+
Follow [references/verify.md](references/verify.md). Output:
|
|
31
31
|
|
|
32
32
|
- P0/P1/P2 blockers
|
|
33
33
|
- Completeness of route, permission, API, types, mock, and page states
|
|
@@ -35,11 +35,11 @@ Follow `.agents/skills/shared-verify/SKILL.md`. Output:
|
|
|
35
35
|
- Prettier, TypeScript, lint, and build results
|
|
36
36
|
- Uncovered risks
|
|
37
37
|
|
|
38
|
-
If the current change introduced P0/P1 issues or validation failures, stop. Do not enter commit review.
|
|
38
|
+
Also apply [references/ai-review.md](references/ai-review.md). If the current change introduced P0/P1 issues or validation failures, stop. Do not enter commit review.
|
|
39
39
|
|
|
40
40
|
### 3. Commit review
|
|
41
41
|
|
|
42
|
-
Follow
|
|
42
|
+
Follow [references/commit.md](references/commit.md). Output:
|
|
43
43
|
|
|
44
44
|
- Findings sorted P0–P2
|
|
45
45
|
- Optional improvements
|
|
@@ -69,16 +69,6 @@ If the user only says `确认` but the scope is unclear, do not commit; ask for
|
|
|
69
69
|
|
|
70
70
|
If the user says `提交代码` before a review proposal exists, run the three steps above first. Do not skip review.
|
|
71
71
|
|
|
72
|
-
## Related skills
|
|
73
|
-
|
|
74
|
-
| Skill | Purpose |
|
|
75
|
-
| --- | --- |
|
|
76
|
-
| `$shared-impact-analysis` | Read-only impact analysis |
|
|
77
|
-
| `$shared-verify` | Convention and command verification |
|
|
78
|
-
| `$shared-commit-current-changes` | Review plus confirmation-gated commit |
|
|
79
|
-
| `$shared-ai-review` | Standalone review without commit |
|
|
80
|
-
| `$shared-publish-test` | Publish to the test pipeline only after a separate `确认推送流水线`. Never run it automatically after git push. |
|
|
81
|
-
|
|
82
72
|
## User-facing output
|
|
83
73
|
|
|
84
|
-
Read and apply `.agents/skills/shared-i-have-adhd/
|
|
74
|
+
Read and apply `.agents/skills/shared-i-have-adhd/i-have-adhd.md` to every response this skill sends to the user.
|
|
@@ -1,19 +1,13 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: {{sharedSkillName}}
|
|
3
|
-
description: Internal. Do not invoke. Standalone review checklist used by shared-review-and-submit. Do not modify files.
|
|
4
|
-
disable-model-invocation: true
|
|
5
|
-
---
|
|
6
|
-
|
|
7
1
|
# AI Code Review
|
|
8
2
|
|
|
9
|
-
|
|
3
|
+
Checklist used by `shared-review-and-submit`. Do not treat this file as a generate or submit entry.
|
|
10
4
|
|
|
11
|
-
|
|
5
|
+
Review the current diff plus relevant callers and types. Before reviewing, read:
|
|
12
6
|
|
|
13
7
|
1. `.agents/skills/shared-project-conventions/references/review-checklist.md`
|
|
14
8
|
2. `.agents/skills/shared-project-conventions/references/quality-checklist.md`
|
|
15
9
|
|
|
16
|
-
|
|
10
|
+
If `.agents/project/review-rules.md` exists, apply extra domain checks only; do not weaken shared hard rules.
|
|
17
11
|
|
|
18
12
|
## Required checks
|
|
19
13
|
|
|
@@ -30,7 +24,3 @@ Do not require a project-local review-rules file. If `.agents/project/review-rul
|
|
|
30
24
|
Lead with findings ordered `[P0]`–`[P3]`, with file and line. Separate blocking issues from recommendations. Do not report style preferences as bugs.
|
|
31
25
|
|
|
32
26
|
If none, write `No issues found.` Always include validation performed and gaps. Do not modify files unless the user explicitly asks for fixes.
|
|
33
|
-
|
|
34
|
-
## User-facing output
|
|
35
|
-
|
|
36
|
-
Read and apply `.agents/skills/shared-i-have-adhd/SKILL.md` to every response this skill sends to the user.
|
package/skills/shared/{commit-current-changes/SKILL.md → review-and-submit/references/commit.md}
RENAMED
|
@@ -1,14 +1,6 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: {{sharedSkillName}}
|
|
3
|
-
description: Internal. Do not invoke. Step 3 of shared-review-and-submit. Confirmation-gated commit only after that entry skill has run.
|
|
4
|
-
disable-model-invocation: true
|
|
5
|
-
---
|
|
6
|
-
|
|
7
1
|
# Commit Current Changes
|
|
8
2
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
This skill is fully shared. Review user-authorized working-tree changes, report findings and a commit proposal, and mutate Git only after explicit confirmation.
|
|
3
|
+
Step 3 of `shared-review-and-submit`. Review user-authorized working-tree changes, report findings and a commit proposal, and mutate Git only after explicit confirmation.
|
|
12
4
|
|
|
13
5
|
## Write-operation gate
|
|
14
6
|
|
|
@@ -32,8 +24,9 @@ Read:
|
|
|
32
24
|
1. `.agents/skills/shared-project-conventions/references/review-checklist.md`
|
|
33
25
|
2. `.agents/skills/shared-project-conventions/references/quality-checklist.md`
|
|
34
26
|
3. `.agents/skills/shared-project-conventions/references/architecture.md`
|
|
27
|
+
4. [ai-review.md](ai-review.md)
|
|
35
28
|
|
|
36
|
-
|
|
29
|
+
If `.agents/project/review-rules.md` exists, apply extra domain checks only; do not weaken shared hard rules.
|
|
37
30
|
|
|
38
31
|
Classify only concrete security, data-loss, runtime, contract, validation, performance, accessibility, or maintainability risks as P0–P2.
|
|
39
32
|
|
|
@@ -58,7 +51,7 @@ Lead with findings. Then present optional improvements, validation results, chan
|
|
|
58
51
|
3. Commit without `--no-verify` unless the user explicitly authorizes it. Do not amend unless requested.
|
|
59
52
|
4. Push to upstream, or `git push -u origin HEAD` when none exists. Never force-push.
|
|
60
53
|
5. Report hash, subject, files, validation, and remote branch.
|
|
61
|
-
6. Stop. Do not run
|
|
54
|
+
6. Stop. Do not run the test pipeline after git push.
|
|
62
55
|
|
|
63
56
|
A confirmed commit or push does not authorize the test pipeline. If the user later says `确认推送流水线` or `发布测试环境`, follow `.agents/skills/shared-publish-test/SKILL.md`.
|
|
64
57
|
|
|
@@ -67,7 +60,3 @@ A confirmed commit or push does not authorize the test pipeline. If the user lat
|
|
|
67
60
|
- Never expose credentials from diffs; stop if secrets are present.
|
|
68
61
|
- Never use destructive Git commands to clean the working tree.
|
|
69
62
|
- If push is rejected, report the reason and do not rewrite history without separate authorization.
|
|
70
|
-
|
|
71
|
-
## User-facing output
|
|
72
|
-
|
|
73
|
-
Read and apply `.agents/skills/shared-i-have-adhd/SKILL.md` to every response this skill sends to the user.
|
package/skills/shared/{impact-analysis/SKILL.md → review-and-submit/references/impact-analysis.md}
RENAMED
|
@@ -1,14 +1,6 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: {{sharedSkillName}}
|
|
3
|
-
description: Internal. Do not invoke. Step 1 of shared-review-and-submit. Read-only impact tracing.
|
|
4
|
-
disable-model-invocation: true
|
|
5
|
-
---
|
|
6
|
-
|
|
7
1
|
# Impact Analysis
|
|
8
2
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
This skill does not modify files.
|
|
3
|
+
Step 1 of `shared-review-and-submit`. Do not modify files.
|
|
12
4
|
|
|
13
5
|
## Workflow
|
|
14
6
|
|
|
@@ -31,7 +23,3 @@ Read `.agents/skills/shared-project-conventions/references/review-checklist.md`
|
|
|
31
23
|
- Risks that cannot be confirmed statically, with why
|
|
32
24
|
|
|
33
25
|
Use repository facts only. Do not invent backend behavior.
|
|
34
|
-
|
|
35
|
-
## User-facing output
|
|
36
|
-
|
|
37
|
-
Read and apply `.agents/skills/shared-i-have-adhd/SKILL.md` to every response this skill sends to the user.
|
|
@@ -1,14 +1,8 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: {{sharedSkillName}}
|
|
3
|
-
description: Internal. Do not invoke. Step 2 of shared-review-and-submit. Not a user-facing generate or review entry.
|
|
4
|
-
disable-model-invocation: true
|
|
5
|
-
---
|
|
6
|
-
|
|
7
1
|
# Frontend Verification
|
|
8
2
|
|
|
9
|
-
|
|
3
|
+
Step 2 of `shared-review-and-submit`.
|
|
10
4
|
|
|
11
|
-
|
|
5
|
+
Read the current diff, related callers, and:
|
|
12
6
|
|
|
13
7
|
1. `.agents/skills/shared-project-conventions/references/review-checklist.md`
|
|
14
8
|
2. `.agents/skills/shared-project-conventions/references/architecture.md`
|
|
@@ -45,7 +39,3 @@ Run the project's build script when routes, entry, or shared runtime change.
|
|
|
45
39
|
4. Regression list: affected pages, suggested manual paths, uncovered risks.
|
|
46
40
|
|
|
47
41
|
If there are no blockers, write `未发现阻断问题`. Do not report only that commands passed.
|
|
48
|
-
|
|
49
|
-
## User-facing output
|
|
50
|
-
|
|
51
|
-
Read and apply `.agents/skills/shared-i-have-adhd/SKILL.md` to every response this skill sends to the user.
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: custom-device-service
|
|
3
|
-
description: Generate StarScope device service code.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
本任务需要结合公共 skill `shared-api-to-service` 执行。
|
|
7
|
-
|
|
8
|
-
先读取并遵循:
|
|
9
|
-
|
|
10
|
-
`.agents/skills/shared-api-to-service/SKILL.md`
|
|
11
|
-
|
|
12
|
-
再读取当前项目的:
|
|
13
|
-
|
|
14
|
-
- OpenAPI 文件
|
|
15
|
-
- Service 约定
|
|
16
|
-
- 项目类型和权限规则
|
|
17
|
-
|
|
18
|
-
只生成符合当前项目结构的设备相关 service。
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: {{sharedSkillName}}
|
|
3
|
-
description: User-facing. Scaffold a standard management list (route, MFProTable, drawer form, confirm modal, permissions, services). Use for CRUD list pages. Do not use for dashboards or one-off layouts.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# List Page Recipe
|
|
7
|
-
|
|
8
|
-
User-facing entry for a **standard** management list. Dashboards, iframes, and one-off layouts use `shared-design-to-page`.
|
|
9
|
-
|
|
10
|
-
Scaffold a standard management list. Do not use this for dashboards, iframes, or one-off visualizations. Those stay on `shared-design-to-page`.
|
|
11
|
-
|
|
12
|
-
Read before editing:
|
|
13
|
-
|
|
14
|
-
1. `.star-allinone.json`
|
|
15
|
-
2. `.agents/skills/shared-design-to-page/references/page-conventions.md`
|
|
16
|
-
3. `.agents/skills/shared-design-to-page/references/overlays.md`
|
|
17
|
-
4. [references/list-page-template.md](references/list-page-template.md)
|
|
18
|
-
5. `.agents/project/conventions.md` if it exists
|
|
19
|
-
|
|
20
|
-
## Required inputs
|
|
21
|
-
|
|
22
|
-
Collect any missing item before generating:
|
|
23
|
-
|
|
24
|
-
- Feature folder (`src/pages/<Feature>`)
|
|
25
|
-
- Route path and menu title
|
|
26
|
-
- List operation (`METHOD /path/` or `operationId`)
|
|
27
|
-
- Optional create / update / delete operations
|
|
28
|
-
- Optional permission codes for create / edit / delete
|
|
29
|
-
|
|
30
|
-
## Workflow
|
|
31
|
-
|
|
32
|
-
1. Run the CLI from the business project root. Prefer this over hand-writing the skeleton:
|
|
33
|
-
|
|
34
|
-
```bash
|
|
35
|
-
pnpm exec star-allinone gen page \
|
|
36
|
-
--feature <Feature> \
|
|
37
|
-
--route /path \
|
|
38
|
-
--title <中文标题> \
|
|
39
|
-
--list-operation "GET /api/v1/resource/" \
|
|
40
|
-
--create-operation "POST /api/v1/resource/" \
|
|
41
|
-
--update-operation "PATCH /api/v1/resource/{id}/" \
|
|
42
|
-
--delete-operation "DELETE /api/v1/resource/{id}/"
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
Add `--permission-create`, `--permission-edit`, `--permission-delete` when codes are known.
|
|
46
|
-
|
|
47
|
-
2. If only services are missing, run `pnpm exec star-allinone gen service --operation "METHOD /path/"` first. Follow `.agents/skills/shared-api-to-service/SKILL.md`.
|
|
48
|
-
3. Fill generated placeholders: columns, form fields, rowKey, permission constants, and pagination adapter (`results/count` vs `list/total`) using the nearest page of the same type.
|
|
49
|
-
4. If `src/components/Page/Container/config.tsx` exists, register the new page as a tab after generating the standalone files. Do not invent a second page shell.
|
|
50
|
-
5. Run focused verification.
|
|
51
|
-
|
|
52
|
-
## Hard rules
|
|
53
|
-
|
|
54
|
-
- `MFProTable` for the list. `ProForm` inside `CustomDrawer`. Confirmations use `BaseModal` + `HocModal`.
|
|
55
|
-
- Pages consume `import Service from '@/services'` only.
|
|
56
|
-
- Keep columns and toolbar builders in `const.tsx`.
|
|
57
|
-
- Every `await` uses `try-catch`; restore loading in `finally`.
|
|
58
|
-
- Do not use `Modal.confirm` or feature-level Ant Design `Modal` / `Drawer` shells.
|
|
59
|
-
- Do not overwrite existing page files. Tell the user the CLI refused, then edit in place.
|
|
60
|
-
|
|
61
|
-
## Verification
|
|
62
|
-
|
|
63
|
-
```bash
|
|
64
|
-
pnpm exec prettier --check <changed-files>
|
|
65
|
-
pnpm typecheck
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
Run `pnpm lint` when routes or shared components change.
|
|
69
|
-
|
|
70
|
-
## User-facing output
|
|
71
|
-
|
|
72
|
-
Read and apply `.agents/skills/shared-i-have-adhd/SKILL.md` to every response this skill sends to the user.
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: {{sharedSkillName}}
|
|
3
|
-
description: Internal. Do not invoke. Referenced by other shared skills for architecture and hard rules. Not a user-facing task.
|
|
4
|
-
disable-model-invocation: true
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Project Conventions
|
|
8
|
-
|
|
9
|
-
Not a user-facing entry. Do not invoke this skill. Other shared skills read this file for architecture and hard rules.
|
|
10
|
-
|
|
11
|
-
Use this skill for every non-trivial change. Preserve existing patterns and make the smallest scoped change.
|
|
12
|
-
|
|
13
|
-
Read in this order:
|
|
14
|
-
|
|
15
|
-
1. `.star-allinone.json`
|
|
16
|
-
2. [references/architecture.md](references/architecture.md)
|
|
17
|
-
3. [references/review-checklist.md](references/review-checklist.md)
|
|
18
|
-
|
|
19
|
-
Shared rules are complete for review, commit, mock, and service generation. If `.agents/project/conventions.md` exists, use it only for extra paths or domain invariants. It must not weaken the shared hard rules below.
|
|
20
|
-
|
|
21
|
-
## Hard rules
|
|
22
|
-
|
|
23
|
-
- Pages consume `import Service from '@/services'`. No direct axios or request-helper calls from pages.
|
|
24
|
-
- DTOs live in `src/services/<Domain>/typings.d.ts`. Pages do not redefine them.
|
|
25
|
-
- Reuse `MFProTable`, `ProForm`, `CustomDrawer`, `BaseModal`, `HocModal`, and existing permission wrappers.
|
|
26
|
-
- Backend field names stay in service types. Convert only at an adapter boundary.
|
|
27
|
-
- Async surfaces handle loading, empty, error, retry, unauthorized, and duplicate-submit.
|
|
28
|
-
- No unexplained `any`, `as any`, `@ts-ignore`, or `Record<string, any>` when the contract is known.
|
|
29
|
-
- No new UI/state library without approval.
|
|
30
|
-
|
|
31
|
-
## Completion
|
|
32
|
-
|
|
33
|
-
Report changed files, API operations used, states covered, validation commands and results, and remaining gaps.
|
|
34
|
-
|
|
35
|
-
## User-facing output
|
|
36
|
-
|
|
37
|
-
Read and apply `.agents/skills/shared-i-have-adhd/SKILL.md` to every response this skill sends to the user.
|
|
File without changes
|