@mingfuyun/star-allinone 0.4.19 → 0.4.20
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/docs/skills/dev-flow/gates.md +5 -2
- package/docs/skills/dev-flow/session-file.md +21 -0
- package/docs/skills/dev-flow/session-protocol.md +2 -0
- package/examples/AGENTS.md +1 -1
- package/package.json +1 -1
- package/scripts/cli.js +27 -0
- package/scripts/gen/doctor.js +28 -0
- package/skills/shared/dev-flow/SKILL.md +1 -1
- package/skills/shared/dev-flow/references/gates.md +5 -2
- package/skills/shared/dev-flow/references/session-file.md +23 -0
- package/skills/shared/dev-flow/references/session-protocol.md +2 -0
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
# 确认门禁口令
|
|
2
2
|
|
|
3
3
|
> 维护源:能力包 `docs/skills/dev-flow/gates.md`
|
|
4
|
-
>
|
|
4
|
+
> 跨仓统一。方案、提交、测发三道门禁互不推断。校验豁免不代替任何一道门禁。
|
|
5
5
|
|
|
6
6
|
| 门禁 | 口令(须字面接近) | 不可替代为 |
|
|
7
7
|
| --- | --- | --- |
|
|
8
|
-
| 方案 | `确认方案` | 「确认」「OK
|
|
8
|
+
| 方案 | `确认方案` | 「确认」「OK」、提交/测发口令。只用于需求或接口调整 |
|
|
9
9
|
| 提交 | `确认提交` / `确认提交并推送` | 方案确认、测发确认、「确认」单字 |
|
|
10
10
|
| 测发 | `确认推送流水线` / `发布测试环境` | push 成功、提交确认、方案确认 |
|
|
11
|
+
| 校验豁免 | `豁免校验继续提交` | 「继续吧」「OK」。只跳过 verify 拦截,之后仍须 `确认提交` |
|
|
12
|
+
|
|
13
|
+
只说「按照星系流程 提交代码」或「按照星系流程 发布流水线」时,不用方案门禁。
|
|
11
14
|
|
|
12
15
|
`确认方案` ≠ `确认提交` ≠ `确认推送流水线`
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# 续跑会话文件
|
|
2
|
+
|
|
3
|
+
> 维护源:能力包 `docs/skills/dev-flow/session-file.md`
|
|
4
|
+
> 需求或接口调整需要跨会话续跑时,按下面的形状写入业务仓 `.agents/dev-flow-session.md`。没有进行中的单就不要创建。
|
|
5
|
+
|
|
6
|
+
```text
|
|
7
|
+
phase: await_plan
|
|
8
|
+
plan_confirmed: no
|
|
9
|
+
summary: …
|
|
10
|
+
blocked: 无
|
|
11
|
+
next_action: 用户回复「确认方案」
|
|
12
|
+
gates:
|
|
13
|
+
plan: waiting
|
|
14
|
+
commit: not_started
|
|
15
|
+
publish: not_started
|
|
16
|
+
verify_waiver: no
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
`plan_confirmed` 只有用户说过 `确认方案` 才写 `yes`。禁止默认写成 `yes`。
|
|
20
|
+
|
|
21
|
+
只提交或只发布时不要补方案确认:`plan_confirmed` 保持 `no`,`phase` 用 `await_commit` 或 `await_publish`。
|
package/examples/AGENTS.md
CHANGED
|
@@ -19,7 +19,7 @@ Props for `MFProTable` are in `.agents/skills/shared-project-conventions/referen
|
|
|
19
19
|
|
|
20
20
|
In business repos, dialogue uses **one entry only**: `$custom-entry`. It reads this file and `custom-entry/references/*`, then delegates to `shared-*` or internal `custom-*`. Do not treat direct `$shared-*` as the production entry.
|
|
21
21
|
|
|
22
|
-
- Full requirement
|
|
22
|
+
- Full requirement or API change: intent `flow` → `shared-dev-flow`. Output a plan and wait for `确认方案` before code changes. Submit-only and publish-only phrases stay on the single-point skills and skip `确认方案`.
|
|
23
23
|
- One endpoint: via `$custom-entry` → `shared-api-to-service`, or `pnpm exec star-allinone gen service --operation "METHOD /path/"`.
|
|
24
24
|
- Pages: via `$custom-entry` → `shared-design-to-page`. Standard lists run `pnpm exec star-allinone gen page` inside that skill.
|
|
25
25
|
- Project health: `pnpm exec star-allinone doctor`.
|
package/package.json
CHANGED
package/scripts/cli.js
CHANGED
|
@@ -29,6 +29,7 @@ docs/skills/overview.md is copied to shared-project-conventions/references/skill
|
|
|
29
29
|
docs/skills/dev-flow/*.md is copied into skills/shared/dev-flow/references/ before that skill is synced.
|
|
30
30
|
It never writes ~/.codex/skills and never modifies custom-* skills.
|
|
31
31
|
If <project>/AGENTS.md is missing, it copies examples/AGENTS.md once.
|
|
32
|
+
If AGENTS.md exists, sync only replaces the pre-dev-flow fallback sentence and the missing command-card path.
|
|
32
33
|
|
|
33
34
|
doctor checks config, OpenAPI, MFRequest, MFProTable, skill sync, and bad imports.
|
|
34
35
|
|
|
@@ -134,6 +135,7 @@ const DEV_FLOW_REFERENCE_DOCS = [
|
|
|
134
135
|
'verify-commands.md',
|
|
135
136
|
'gates.md',
|
|
136
137
|
'session-protocol.md',
|
|
138
|
+
'session-file.md',
|
|
137
139
|
];
|
|
138
140
|
|
|
139
141
|
/** docs/skills/dev-flow/ is the only source; refresh skill references before sync. */
|
|
@@ -247,6 +249,7 @@ function syncProject(options) {
|
|
|
247
249
|
pruneStaleShared(destination, prefix, syncedNames, options);
|
|
248
250
|
writeSyncStamp(destination, prefix, syncedNames, options);
|
|
249
251
|
seedAgentsMarkdown(target, options);
|
|
252
|
+
refreshAgentsNotes(target, options);
|
|
250
253
|
console.log(`${options.dryRun ? 'Would sync' : 'Synced'} shared skills -> ${destination}`);
|
|
251
254
|
}
|
|
252
255
|
|
|
@@ -275,6 +278,30 @@ function seedAgentsMarkdown(target, options) {
|
|
|
275
278
|
if (!options.dryRun) fs.copyFileSync(source, dest);
|
|
276
279
|
}
|
|
277
280
|
|
|
281
|
+
const AGENTS_NOTE_REPLACEMENTS = [
|
|
282
|
+
[
|
|
283
|
+
'`shared-dev-flow` 就绪前:先出实现方案,等 `确认方案`,再按复合请求顺序执行',
|
|
284
|
+
'`shared-dev-flow`。需求或接口调整先出方案并等 `确认方案`。只提交或只发布不进状态机,回复与单点相同',
|
|
285
|
+
],
|
|
286
|
+
[
|
|
287
|
+
'完整口令卡见本机工作区 `dev-agent/研发流程-口令卡.md`(与团队文档同步时以此口径为准)。',
|
|
288
|
+
'完整口令见 `.agents/skills/shared-dev-flow/references/gates.md`(维护源:能力包 `docs/skills/dev-flow/gates.md`)。',
|
|
289
|
+
],
|
|
290
|
+
];
|
|
291
|
+
|
|
292
|
+
function refreshAgentsNotes(target, options) {
|
|
293
|
+
const dest = path.join(target, 'AGENTS.md');
|
|
294
|
+
if (!fs.existsSync(dest)) return;
|
|
295
|
+
const original = fs.readFileSync(dest, 'utf8');
|
|
296
|
+
let next = original;
|
|
297
|
+
for (const [from, to] of AGENTS_NOTE_REPLACEMENTS) {
|
|
298
|
+
if (next.includes(from)) next = next.split(from).join(to);
|
|
299
|
+
}
|
|
300
|
+
if (next === original) return;
|
|
301
|
+
console.log(`${options.dryRun ? '[dry-run] ' : ''}AGENTS.md flow notes`);
|
|
302
|
+
if (!options.dryRun) fs.writeFileSync(dest, next);
|
|
303
|
+
}
|
|
304
|
+
|
|
278
305
|
function main() {
|
|
279
306
|
const [group, command, ...rest] = process.argv.slice(2);
|
|
280
307
|
if (group === 'skills') {
|
package/scripts/gen/doctor.js
CHANGED
|
@@ -318,6 +318,34 @@ function runDoctor(cwd, options = {}) {
|
|
|
318
318
|
findings.push(check(true, 'ok', 'Overlay imports use @mingfuyun/star-allinone or none found'));
|
|
319
319
|
}
|
|
320
320
|
|
|
321
|
+
const agentsFile = path.join(root, 'AGENTS.md');
|
|
322
|
+
if (fs.existsSync(agentsFile)) {
|
|
323
|
+
const agents = fs.readFileSync(agentsFile, 'utf8');
|
|
324
|
+
if (agents.includes('就绪前') || agents.includes('研发流程-口令卡.md')) {
|
|
325
|
+
findings.push(check(false, 'error', 'AGENTS.md still has the pre-dev-flow fallback or a missing command-card path. Run skills sync'));
|
|
326
|
+
} else {
|
|
327
|
+
findings.push(check(true, 'ok', 'AGENTS.md flow sentence'));
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
const layoutFile = path.join(skillsDir, `${prefix}i-have-adhd`, 'reply-layout.md');
|
|
331
|
+
const gatesFile = path.join(skillsDir, `${prefix}dev-flow`, 'references', 'gates.md');
|
|
332
|
+
const sessionFile = path.join(skillsDir, `${prefix}dev-flow`, 'references', 'session-file.md');
|
|
333
|
+
if (!fs.existsSync(layoutFile) || !fs.readFileSync(layoutFile, 'utf8').includes('## 测发结果')) {
|
|
334
|
+
findings.push(check(false, 'error', 'reply-layout.md is missing the 测发结果 block. Run skills sync'));
|
|
335
|
+
} else {
|
|
336
|
+
findings.push(check(true, 'ok', 'reply-layout.md'));
|
|
337
|
+
}
|
|
338
|
+
if (!fs.existsSync(gatesFile) || !fs.readFileSync(gatesFile, 'utf8').includes('豁免校验继续提交')) {
|
|
339
|
+
findings.push(check(false, 'error', 'gates.md is missing 豁免校验继续提交. Run skills sync'));
|
|
340
|
+
} else {
|
|
341
|
+
findings.push(check(true, 'ok', 'gates.md exemption'));
|
|
342
|
+
}
|
|
343
|
+
if (!fs.existsSync(sessionFile) || !fs.readFileSync(sessionFile, 'utf8').includes('plan_confirmed')) {
|
|
344
|
+
findings.push(check(false, 'error', 'session-file.md is missing. Run skills sync'));
|
|
345
|
+
} else {
|
|
346
|
+
findings.push(check(true, 'ok', 'session-file.md'));
|
|
347
|
+
}
|
|
348
|
+
|
|
321
349
|
printReport(root, findings);
|
|
322
350
|
return findings;
|
|
323
351
|
}
|
|
@@ -70,7 +70,7 @@ next_action: …
|
|
|
70
70
|
|
|
71
71
|
新会话继续同一单时:
|
|
72
72
|
|
|
73
|
-
1. 先读 `.agents/dev-flow-session.md
|
|
73
|
+
1. 先读 `.agents/dev-flow-session.md`(若有)。没有就请用户确认上一 `phase`。文件形状以 [references/session-file.md](references/session-file.md) 为准,`plan_confirmed` 禁止默认 `yes`。
|
|
74
74
|
2. 上一阶段是需求或接口调整,且没确认过方案:从 `plan` 或 `await_plan` 恢复。**禁止**默认方案已确认。
|
|
75
75
|
3. 上一阶段只是提交代码或发布流水线:从 `await_commit` 或 `await_publish` 恢复,不要补 `确认方案`。
|
|
76
76
|
4. 不确定上一阶段是哪一种:问一句,不要默认已经 `确认方案`。
|
|
@@ -3,12 +3,15 @@
|
|
|
3
3
|
# 确认门禁口令
|
|
4
4
|
|
|
5
5
|
> 维护源:能力包 `docs/skills/dev-flow/gates.md`
|
|
6
|
-
>
|
|
6
|
+
> 跨仓统一。方案、提交、测发三道门禁互不推断。校验豁免不代替任何一道门禁。
|
|
7
7
|
|
|
8
8
|
| 门禁 | 口令(须字面接近) | 不可替代为 |
|
|
9
9
|
| --- | --- | --- |
|
|
10
|
-
| 方案 | `确认方案` | 「确认」「OK
|
|
10
|
+
| 方案 | `确认方案` | 「确认」「OK」、提交/测发口令。只用于需求或接口调整 |
|
|
11
11
|
| 提交 | `确认提交` / `确认提交并推送` | 方案确认、测发确认、「确认」单字 |
|
|
12
12
|
| 测发 | `确认推送流水线` / `发布测试环境` | push 成功、提交确认、方案确认 |
|
|
13
|
+
| 校验豁免 | `豁免校验继续提交` | 「继续吧」「OK」。只跳过 verify 拦截,之后仍须 `确认提交` |
|
|
14
|
+
|
|
15
|
+
只说「按照星系流程 提交代码」或「按照星系流程 发布流水线」时,不用方案门禁。
|
|
13
16
|
|
|
14
17
|
`确认方案` ≠ `确认提交` ≠ `确认推送流水线`
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<!-- 维护源:能力包 docs/skills/dev-flow/session-file.md — 勿在业务仓改此副本 -->
|
|
2
|
+
|
|
3
|
+
# 续跑会话文件
|
|
4
|
+
|
|
5
|
+
> 维护源:能力包 `docs/skills/dev-flow/session-file.md`
|
|
6
|
+
> 需求或接口调整需要跨会话续跑时,按下面的形状写入业务仓 `.agents/dev-flow-session.md`。没有进行中的单就不要创建。
|
|
7
|
+
|
|
8
|
+
```text
|
|
9
|
+
phase: await_plan
|
|
10
|
+
plan_confirmed: no
|
|
11
|
+
summary: …
|
|
12
|
+
blocked: 无
|
|
13
|
+
next_action: 用户回复「确认方案」
|
|
14
|
+
gates:
|
|
15
|
+
plan: waiting
|
|
16
|
+
commit: not_started
|
|
17
|
+
publish: not_started
|
|
18
|
+
verify_waiver: no
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
`plan_confirmed` 只有用户说过 `确认方案` 才写 `yes`。禁止默认写成 `yes`。
|
|
22
|
+
|
|
23
|
+
只提交或只发布时不要补方案确认:`plan_confirmed` 保持 `no`,`phase` 用 `await_commit` 或 `await_publish`。
|