@mingfuyun/star-allinone 0.4.6 → 0.4.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.
package/README.md CHANGED
@@ -33,7 +33,8 @@ pnpm add @mingfuyun/star-allinone
33
33
  AGENTS.md ← 常驻约定,不要加 .cursor/rules
34
34
  .agents/skills/
35
35
  ├── shared-* ← npm 包同步,不能在业务项目直接改
36
- └── custom-* ← 业务项目自己维护
36
+ ├── custom-entry/ ← 可选:唯一对话入口 + references/project-rules.md
37
+ └── custom-* ← 其他业务特例(项目自己维护)
37
38
  ```
38
39
 
39
40
  完整约定见 [skills/README.md](skills/README.md)。
@@ -91,7 +92,7 @@ StarLink 示例见 `examples/projects/`。
91
92
  pnpm exec star-allinone skills sync
92
93
  ```
93
94
 
94
- 4. 把真正的业务特例放到 `.agents/skills/custom-*`。审查、提交、发布、单接口、页面生成不要做成 `custom-*`。全量契约重建(若需要)必须 `disable-model-invocation`,并在 `AGENTS.md` 写清命令。
95
+ 4. 领域规则放 `.agents/skills/custom-entry/references/`。可用 `custom-entry` 做唯一对话编排入口(内部委托 `shared-*`)。不要再拆第二套审查/提交/发布/单接口/页面入口。全量契约重建(若需要)必须 `disable-model-invocation`,并在 `AGENTS.md` 写清命令。
95
96
 
96
97
  5. 仓库根放 `AGENTS.md`(可从包内 `examples/AGENTS.md` 复制)。`skills sync` 只在该文件缺失时补一份,不会覆盖已有内容。常驻约定只写这一份,不要加 `.cursor/rules`。
97
98
 
@@ -128,7 +129,7 @@ git commit -m "chore(skill): 接入公共 skill"
128
129
  使用 $shared-tracking,为本项目接入埋点并全站补齐按钮埋点。
129
130
  ```
130
131
 
131
- 公共流程用 `shared-*`,项目专属规则用 `custom-*`。`custom-*` 不能再实现一遍 Service/页面生成/审查。全量契约重建若需要,写成不可调用的脚本,并在 `AGENTS.md` 写命令。业务定制需要复用公共流程时,读取对应的 `.agents/skills/shared-*/SKILL.md`,不要再抛一个入口。
132
+ 公共流程用 `shared-*`;领域规则优先 `custom-entry/references/`。`custom-entry` 只编排、不复制 shared 正文。全量契约重建若需要,写成不可调用的脚本,并在 `AGENTS.md` 写命令。
132
133
 
133
134
  ### 业务项目:更新公共 skill
134
135
 
@@ -1,8 +1,8 @@
1
1
  # Agent instructions
2
2
 
3
- This is a Umi Max + Ant Design 5 PC admin app. Shared skills live in `.agents/skills/shared-*` and are synced from `@mingfuyun/star-allinone`. Do not edit `shared-*`. Put project-only rules in `.agents/skills/custom-*` or `.agents/project/`.
3
+ This is a Umi Max + Ant Design 5 PC admin app. Shared skills live in `.agents/skills/shared-*` and are synced from `@mingfuyun/star-allinone`. Do not edit `shared-*`. Put project-only rules in `.agents/skills/custom-entry/references/` (preferred) or legacy `.agents/project/`.
4
4
 
5
- Always-on instructions are this file. Do not add `.cursor/rules`.
5
+ Always-on instructions are this file. **Normative sources are only this file and `.agents/skills/**`. Do not add `.cursor/rules`.** Do not use global Codex skills under `~/.codex/skills` as a business entry (including retired names such as `publish-starlink-test`, `review-and-commit`, `i-have-adhd`, `zentao-connect`).
6
6
 
7
7
  Peer React is **18.3.1**. The npm package does not export a table.
8
8
 
@@ -17,14 +17,17 @@ Props for `MFProTable` are in `.agents/skills/shared-project-conventions/referen
17
17
 
18
18
  ## Default workflow
19
19
 
20
- User-facing shared entries only:
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
- - One endpoint: `pnpm exec star-allinone gen service --operation "METHOD /path/"` or `$shared-api-to-service`.
23
- - Pages: `$shared-design-to-page`. Standard lists run `pnpm exec star-allinone gen page` inside that skill.
22
+ - Full requirement / end-to-end flow: intent `flow` (orchestrator `shared-dev-flow` when available; until then: output an implementation plan, wait for `确认方案`, then follow the composite order in `$custom-entry`).
23
+ - One endpoint: via `$custom-entry` → `shared-api-to-service`, or `pnpm exec star-allinone gen service --operation "METHOD /path/"`.
24
+ - Pages: via `$custom-entry` → `shared-design-to-page`. Standard lists run `pnpm exec star-allinone gen page` inside that skill.
24
25
  - Project health: `pnpm exec star-allinone doctor`.
25
- - Review and commit: `$shared-review-and-submit`. Wait for confirmation.
26
- - Test publish: `$shared-publish-test` after explicit pipeline confirmation.
27
- - Tracking: `$shared-tracking`. Load the SDK from OSS. Do not commit `tracking-sdk.global.min.js`.
26
+ - Review and commit: via `$custom-entry` → `shared-review-and-submit`. Wait for confirmation (`确认提交` / `确认提交并推送`).
27
+ - Test publish: via `$custom-entry` → `shared-publish-test` after explicit pipeline confirmation (`确认推送流水线` / `发布测试环境`).
28
+ - Tracking: via `$custom-entry` → `shared-tracking`. Load the SDK from OSS. Do not commit `tracking-sdk.global.min.js`.
29
+
30
+ This `examples/AGENTS.md` seeds new projects. Prefer aligning production repos to `$custom-entry` as above.
28
31
 
29
32
  ## Hard rules
30
33
 
@@ -36,4 +39,4 @@ User-facing shared entries only:
36
39
  - After TypeScript changes run `pnpm typecheck`.
37
40
  - Do not treat `pnpm test` as unit tests unless that script actually runs a test runner.
38
41
  - Heavy modules (`xlsx`, editors, charts) must be `import()`. Do not add them to `src/app.ts`.
39
- - If `.agents/project/conventions.md` or `.agents/project/review-rules.md` exists, apply them as additions only.
42
+ - Prefer `.agents/skills/custom-entry/references/{project-rules,conventions}.md`; else legacy `.agents/project/{review-rules,conventions}.md`. Apply as additions only.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mingfuyun/star-allinone",
3
- "version": "0.4.6",
3
+ "version": "0.4.8",
4
4
  "description": "星系运维前端能力包",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
package/skills/README.md CHANGED
@@ -18,21 +18,31 @@ business-app/
18
18
  │ ├── shared-publish-test/
19
19
  │ ├── shared-project-conventions/ ← 无 SKILL.md,给入口读
20
20
  │ ├── shared-i-have-adhd/ ← 无 SKILL.md,给入口读
21
- │ └── custom-* ← 仅真正的业务特例
22
- └── project/
23
- ├── conventions.md
24
- ├── review-rules.md
21
+ │ ├── custom-entry/ ← 可选:唯一对话编排入口 + 领域规则正文
22
+ │ │ └── references/
23
+ │ │ ├── project-rules.md
24
+ │ │ └── conventions.md
25
+ │ └── custom-* ← 其他业务特例(如全量 swagger,勿再拆对外入口)
26
+ └── project/ ← legacy;openapi 等仍可放这里
25
27
  └── openapi.json
26
28
  ```
27
29
 
28
30
  命名约定:
29
31
 
30
32
  ```text
31
- shared-* 公共内容,由 star-allinone 提供,经 CLI 同步后提交到业务仓库
32
- custom-* 业务定制,由业务项目维护;禁止做成第二套页面/审查/单接口生成入口
33
+ shared-* 公共内容,由 star-allinone 提供,经 CLI 同步后提交到业务仓库
34
+ custom-entry 可选唯一对话入口;领域规则正文在其 references/
35
+ custom-* 其他业务定制;禁止再做成第二套页面/审查/单接口生成入口
33
36
  ```
34
37
 
35
- Cursor / Codex 的常驻说明只放仓库根 `AGENTS.md`(模板见 `examples/AGENTS.md`)。项目差异放 `.agents/project/`。不要新增 `.cursor/rules`。
38
+ 项目 overlay 探测顺序(存在则应用,只补充不削弱硬规则):
39
+
40
+ ```text
41
+ review-rules: custom-entry/references/project-rules.md → legacy .agents/project/review-rules.md
42
+ conventions: custom-entry/references/conventions.md → legacy .agents/project/conventions.md
43
+ ```
44
+
45
+ Cursor / Codex 的常驻说明只放仓库根 `AGENTS.md`(模板见 `examples/AGENTS.md`)。不要新增 `.cursor/rules`。
36
46
 
37
47
  ## npm 包的职责
38
48
 
@@ -55,7 +65,7 @@ Cursor / Codex 的常驻说明只放仓库根 `AGENTS.md`(模板见 `examples/
55
65
 
56
66
  接入或升级后跑 `pnpm exec star-allinone doctor`。
57
67
 
58
- 业务项目的 `.agents/project/` 只写差异:路径、权限体系、OpenAPI 位置、领域特例。项目文件可以补充,但不能削弱公共硬规则。
68
+ 领域差异优先写 `.agents/skills/custom-entry/references/`。`.agents/project/` 仍可放 OpenAPI 路径等 legacy 文件。项目文件可以补充,但不能削弱公共硬规则。
59
69
 
60
70
  CLI 只做同步:
61
71
 
@@ -95,13 +105,15 @@ git commit -m "chore(skill): 更新公共 skill"
95
105
 
96
106
  ## 新增或修改业务定制
97
107
 
98
- `custom-*` 只用于真正的业务特例:领域不变量、全量契约脚本、度量。审查、提交、测发、单接口、页面生成都走公共入口。
108
+ 推荐用 `custom-entry` 做 **唯一对话编排入口**:先读本仓 `references/project-rules.md`(与可选 `conventions.md`),再 **Read 并执行** 对应 `shared-*`,不要复制 shared 正文。
109
+
110
+ 其他 `custom-*` 只用于真正的业务特例:领域不变量、全量契约脚本、度量。不要再做成第二套审查/提交/测发/单接口/页面入口。
99
111
 
100
112
  全量契约重建若必须留在 custom:加上 `disable-model-invocation: true`,在 `AGENTS.md` 写清要跑的命令,不要作为用户入口。度量类 custom 不得生成代码。
101
113
 
102
114
  ## 公共部分和业务定制组合
103
115
 
104
- 业务定制需要复用公共流程时,在 `custom-*` 里 **读取** 对应入口的 `SKILL.md`,不要再做一个可 `$` 调用的生成入口。领域规则示例见 `examples/skills/custom-domain-invariants/`。
116
+ `custom-entry`(或其他 `custom-*`)复用公共流程时,**读取** 对应入口的 `SKILL.md` 并原样执行确认门。领域规则示例见 `examples/skills/custom-domain-invariants/`。
105
117
 
106
118
  ## 项目配置
107
119
 
@@ -1,6 +1,6 @@
1
1
  # Service Conventions
2
2
 
3
- Read `.star-allinone.json` first. `serviceDir` defaults to `src/services`. Overlay extra domain paths only when `.agents/project/conventions.md` exists.
3
+ Read `.star-allinone.json` first. `serviceDir` defaults to `src/services`. Prefer `.agents/skills/custom-entry/references/conventions.md`; else legacy `.agents/project/conventions.md`. Overlay extra domain paths only when that file exists.
4
4
 
5
5
  ## Layout
6
6
 
@@ -17,7 +17,7 @@ Before implementation, read:
17
17
  4. `.agents/skills/shared-project-conventions/references/architecture.md`
18
18
  5. [references/tracking.md](references/tracking.md) when `src/utils/tracking/index.ts` exists (or the project tracking path in conventions)
19
19
 
20
- If `.agents/project/conventions.md` exists, use it only for extra paths.
20
+ Prefer `.agents/skills/custom-entry/references/conventions.md`; else legacy `.agents/project/conventions.md`. If either exists, use it only for extra paths.
21
21
 
22
22
  Inspect the nearest existing page of the same type before proposing files.
23
23
 
@@ -1,6 +1,6 @@
1
1
  # Page Conventions
2
2
 
3
- Read `.star-allinone.json` first. Use extra component paths or permission helpers from `.agents/project/conventions.md` only when that file exists.
3
+ Read `.star-allinone.json` first. Prefer `.agents/skills/custom-entry/references/conventions.md`; else legacy `.agents/project/conventions.md`. Use extra component paths or permission helpers only when that file exists.
4
4
 
5
5
  ## Stack and locations
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Review Checklist
2
2
 
3
- This checklist is complete for shared review and commit. If `.agents/project/review-rules.md` exists, apply extra domain checks only; do not weaken the rules below.
3
+ This checklist is complete for shared review and commit. Prefer `.agents/skills/custom-entry/references/project-rules.md`; else legacy `.agents/project/review-rules.md`. If either exists, apply extra domain checks only; do not weaken the rules below.
4
4
 
5
5
  ## Permissions
6
6
 
@@ -56,7 +56,7 @@ before or as part of `max build`. Do not treat `pnpm test` as unit tests; in bus
56
56
  - Current HEAD is a named branch, not detached.
57
57
  - `origin/<branch>` exists and matches local `HEAD`. Push first when it does not.
58
58
  - `YUNXIAO_ACCESS_TOKEN` is available. Request approval for the external Yunxiao CLI call.
59
- - Never print access tokens.
59
+ - If `YUNXIAO_ACCESS_TOKEN` is unset, the publish script loads `~/.codex/secrets/yunxiao.env` in the same shell when that file exists. Do not ask the user to `export` the token. Never print, copy, or paste the token.
60
60
 
61
61
  ## After the run
62
62
 
@@ -69,6 +69,16 @@ if [[ "$local_commit" != "$remote_commit" ]]; then
69
69
  exit 1
70
70
  fi
71
71
 
72
+ if [[ -z "${YUNXIAO_ACCESS_TOKEN:-}" ]]; then
73
+ yunxiao_env="${HOME}/.codex/secrets/yunxiao.env"
74
+ if [[ -f "$yunxiao_env" ]]; then
75
+ # Load token for this shell only. Do not print file contents.
76
+ set -a
77
+ # shellcheck disable=SC1090
78
+ source "$yunxiao_env"
79
+ set +a
80
+ fi
81
+ fi
72
82
  if [[ -z "${YUNXIAO_ACCESS_TOKEN:-}" ]]; then
73
83
  echo "error: YUNXIAO_ACCESS_TOKEN is unavailable" >&2
74
84
  exit 1
@@ -9,7 +9,7 @@ User-facing entry for review, submit, and commit. Read the files under `referenc
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
 
12
- If `.agents/project/review-rules.md` exists, apply extra domain checks only; do not weaken shared hard rules.
12
+ Prefer `.agents/skills/custom-entry/references/project-rules.md`; else legacy `.agents/project/review-rules.md`. If either exists, apply extra domain checks only; do not weaken shared hard rules.
13
13
 
14
14
  ## Workflow
15
15
 
@@ -54,7 +54,7 @@ Then stop and wait. Do not run Git writes.
54
54
 
55
55
  ## Confirmation gate
56
56
 
57
- Execute the commit phase only after an explicit reply such as `确认` or `确认提交并推送` that authorizes the latest proposal.
57
+ Execute the commit phase only after an explicit reply such as `确认`、`确认提交` or `确认提交并推送` that authorizes the latest proposal.
58
58
 
59
59
  1. Re-check branch, status, and full diff.
60
60
  2. Confirm the review scope did not change.
@@ -8,7 +8,7 @@ Review the current diff plus relevant callers and types. Before reviewing, read:
8
8
  2. `.agents/skills/shared-project-conventions/references/quality-checklist.md`
9
9
  3. `.agents/skills/shared-tracking/SKILL.md` and `.agents/skills/shared-design-to-page/references/tracking.md` when the project has tracking configured
10
10
 
11
- If `.agents/project/review-rules.md` exists, apply extra domain checks only; do not weaken shared hard rules.
11
+ Prefer `.agents/skills/custom-entry/references/project-rules.md`; else legacy `.agents/project/review-rules.md`. If either exists, apply extra domain checks only; do not weaken shared hard rules.
12
12
 
13
13
  ## Required checks
14
14
 
@@ -26,7 +26,7 @@ Read:
26
26
  3. `.agents/skills/shared-project-conventions/references/architecture.md`
27
27
  4. [ai-review.md](ai-review.md)
28
28
 
29
- If `.agents/project/review-rules.md` exists, apply extra domain checks only; do not weaken shared hard rules.
29
+ Prefer `.agents/skills/custom-entry/references/project-rules.md`; else legacy `.agents/project/review-rules.md`. If either exists, apply extra domain checks only; do not weaken shared hard rules.
30
30
 
31
31
  Classify only concrete security, data-loss, runtime, contract, validation, performance, accessibility, or maintainability risks as P0–P2.
32
32
 
@@ -11,7 +11,7 @@ Step 1 of `shared-review-and-submit`. Do not modify files.
11
11
  5. Classify impact: direct callers, indirect pages, API/permission contracts, build/release risk.
12
12
  6. Give a minimal automated and manual regression path for each item. An import is not proof of runtime impact.
13
13
 
14
- Read `.agents/skills/shared-project-conventions/references/review-checklist.md` for shared files that must be expanded. If `.agents/project/review-rules.md` exists, also expand any extra domain files it names.
14
+ Read `.agents/skills/shared-project-conventions/references/review-checklist.md` for shared files that must be expanded. Prefer `.agents/skills/custom-entry/references/project-rules.md`; else legacy `.agents/project/review-rules.md`. If either exists, also expand any extra domain files it names.
15
15
 
16
16
  ## Output
17
17
 
@@ -8,7 +8,7 @@ Read the current diff, related callers, and:
8
8
  2. `.agents/skills/shared-project-conventions/references/architecture.md`
9
9
  3. `.agents/skills/shared-tracking/SKILL.md` when the project has `src/utils/tracking/index.ts` (or the tracking path in project conventions)
10
10
 
11
- Do not auto-fix. If `.agents/project/review-rules.md` exists, apply extra domain checks only.
11
+ Do not auto-fix. Prefer `.agents/skills/custom-entry/references/project-rules.md`; else legacy `.agents/project/review-rules.md`. If either exists, apply extra domain checks only.
12
12
 
13
13
  ## Checks
14
14