@sakanano-moe/agenthelm 6.13.1 → 6.14.0-rc.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.
Files changed (117) hide show
  1. package/package.json +1 -1
  2. package/runtime/index.json +6 -6
  3. package/runtime/plugins/agent-pack/.codex-plugin/plugin.json +1 -1
  4. package/runtime/plugins/agent-pack/plugin.json +1 -1
  5. package/runtime/plugins/agent-pack/references/capability-config.md +10 -0
  6. package/runtime/plugins/agent-pack/references/check-opinion-migrate.en.md +31 -0
  7. package/runtime/plugins/agent-pack/references/check-opinion-migrate.md +31 -0
  8. package/runtime/plugins/agent-pack/references/dedupe-contract.en.md +27 -0
  9. package/runtime/plugins/agent-pack/references/dedupe-contract.md +27 -0
  10. package/runtime/plugins/agent-pack/references/inventory-contract.en.md +83 -0
  11. package/runtime/plugins/agent-pack/references/inventory-contract.md +83 -0
  12. package/runtime/plugins/agent-pack/references/nudge.en.md +10 -2
  13. package/runtime/plugins/agent-pack/references/nudge.md +10 -2
  14. package/runtime/plugins/agent-pack/references/relocate-contract.en.md +41 -0
  15. package/runtime/plugins/agent-pack/references/relocate-contract.md +41 -0
  16. package/runtime/plugins/agent-pack/runtime/agent_pack_claude.py +572 -30
  17. package/runtime/plugins/agent-pack/runtime/agent_pack_clients.py +233 -0
  18. package/runtime/plugins/agent-pack/runtime/agent_pack_config.py +112 -4
  19. package/runtime/plugins/agent-pack/runtime/agent_pack_dedupe.py +502 -0
  20. package/runtime/plugins/agent-pack/runtime/agent_pack_desktop.py +92 -0
  21. package/runtime/plugins/agent-pack/runtime/agent_pack_ext_common.py +251 -0
  22. package/runtime/plugins/agent-pack/runtime/agent_pack_inventory.py +989 -0
  23. package/runtime/plugins/agent-pack/runtime/agent_pack_mcp_write.py +447 -0
  24. package/runtime/plugins/agent-pack/runtime/agent_pack_nudge.py +29 -4
  25. package/runtime/plugins/agent-pack/runtime/agent_pack_relocate.py +385 -0
  26. package/runtime/plugins/agent-pack/runtime/agent_pack_scope.py +233 -0
  27. package/runtime/plugins/agent-pack/runtime/agenthelm.py +183 -14
  28. package/runtime/plugins/agent-pack/runtime/locale/en.json +250 -1
  29. package/runtime/plugins/agent-pack/runtime/mcp_server.py +12 -0
  30. package/runtime/plugins/agent-pack/runtime/nudge_text.py +8 -2
  31. package/runtime/plugins/agent-pack/runtime/user_settings.py +2 -1
  32. package/runtime/plugins/agent-pack/skills/agent-pack/SKILL.md +15 -0
  33. package/runtime/plugins/agents-init/.codex-plugin/plugin.json +1 -1
  34. package/runtime/plugins/agents-init/content.json +4 -2
  35. package/runtime/plugins/agents-init/plugin.json +1 -1
  36. package/runtime/plugins/agents-init/skills/agents-init/SKILL.md +2 -0
  37. package/runtime/plugins/agents-init/skills/agents-init/launcher.en.sh +93 -0
  38. package/runtime/plugins/agents-init/skills/agents-init/project.schema.json +27 -0
  39. package/runtime/plugins/agents-init/skills/agents-init/scripts/baseline.py +4 -1
  40. package/runtime/plugins/agents-init/skills/agents-init/scripts/init_project.py +24 -9
  41. package/runtime/plugins/agents-init/skills/agents-init/skill.json +1 -1
  42. package/runtime/plugins/opinion-manager/.codex-plugin/plugin.json +1 -1
  43. package/runtime/plugins/opinion-manager/catalog/README.md +3 -1
  44. package/runtime/plugins/opinion-manager/catalog/rules/om.align-requirements/versions/1.1.0.json +34 -0
  45. package/runtime/plugins/opinion-manager/catalog/rules/om.assumptions-authority/versions/1.1.0.json +34 -0
  46. package/runtime/plugins/opinion-manager/catalog/rules/om.batch-questions/versions/1.1.0.json +34 -0
  47. package/runtime/plugins/opinion-manager/catalog/rules/om.bilingual-terms/versions/1.1.0.json +34 -0
  48. package/runtime/plugins/opinion-manager/catalog/rules/om.calculations/versions/1.1.0.json +34 -0
  49. package/runtime/plugins/opinion-manager/catalog/rules/om.chinese-response/versions/1.1.0.json +34 -0
  50. package/runtime/plugins/opinion-manager/catalog/rules/om.clean-deliverable/versions/1.1.0.json +34 -0
  51. package/runtime/plugins/opinion-manager/catalog/rules/om.complete-options/versions/1.1.0.json +34 -0
  52. package/runtime/plugins/opinion-manager/catalog/rules/om.conclusion-first/versions/1.1.0.json +34 -0
  53. package/runtime/plugins/opinion-manager/catalog/rules/om.concrete-titles/versions/1.1.0.json +34 -0
  54. package/runtime/plugins/opinion-manager/catalog/rules/om.consistent-items/versions/1.1.0.json +34 -0
  55. package/runtime/plugins/opinion-manager/catalog/rules/om.device-readable/versions/1.1.0.json +34 -0
  56. package/runtime/plugins/opinion-manager/catalog/rules/om.editable-diagrams/versions/1.1.0.json +34 -0
  57. package/runtime/plugins/opinion-manager/catalog/rules/om.evidence-inference/versions/1.1.0.json +34 -0
  58. package/runtime/plugins/opinion-manager/catalog/rules/om.maintenance-chinese/versions/1.1.0.json +34 -0
  59. package/runtime/plugins/opinion-manager/catalog/rules/om.maintenance-project-language/versions/1.1.0.json +34 -0
  60. package/runtime/plugins/opinion-manager/catalog/rules/om.markdown-structure/versions/1.1.0.json +34 -0
  61. package/runtime/plugins/opinion-manager/catalog/rules/om.portable-files/versions/1.1.0.json +34 -0
  62. package/runtime/plugins/opinion-manager/catalog/rules/om.report-context/versions/1.1.0.json +34 -0
  63. package/runtime/plugins/opinion-manager/catalog/rules/om.report-formats/versions/1.1.0.json +34 -0
  64. package/runtime/plugins/opinion-manager/catalog/rules/om.report-review/versions/1.1.0.json +34 -0
  65. package/runtime/plugins/opinion-manager/catalog/rules/om.response-brief/versions/1.1.0.json +34 -0
  66. package/runtime/plugins/opinion-manager/catalog/rules/om.response-dense/versions/1.1.0.json +34 -0
  67. package/runtime/plugins/opinion-manager/catalog/rules/om.rules-tools/versions/1.1.0.json +34 -0
  68. package/runtime/plugins/opinion-manager/catalog/rules/om.semantic-wrap/versions/1.1.0.json +34 -0
  69. package/runtime/plugins/opinion-manager/catalog/rules/om.solutions-proportional/versions/1.1.0.json +34 -0
  70. package/runtime/plugins/opinion-manager/catalog/rules/om.solutions-three-level/versions/1.1.0.json +34 -0
  71. package/runtime/plugins/opinion-manager/catalog/rules/om.tables-compact/versions/1.1.0.json +34 -0
  72. package/runtime/plugins/opinion-manager/catalog/rules/om.tables-list-first/versions/1.1.0.json +34 -0
  73. package/runtime/plugins/opinion-manager/catalog/rules/om.test-evidence/versions/1.1.0.json +34 -0
  74. package/runtime/plugins/opinion-manager/catalog/rules/om.versioned-files/versions/1.1.0.json +34 -0
  75. package/runtime/plugins/opinion-manager/catalog/templates/delivery-standard/compact-tables/versions/1.1.0.json +32 -0
  76. package/runtime/plugins/opinion-manager/catalog/templates/delivery-standard/list-first/versions/1.1.0.json +32 -0
  77. package/runtime/plugins/opinion-manager/catalog/templates/development-standard/chinese-maintenance/versions/1.1.0.json +26 -0
  78. package/runtime/plugins/opinion-manager/catalog/templates/development-standard/project-language/versions/1.1.0.json +26 -0
  79. package/runtime/plugins/opinion-manager/catalog/templates/response-style/brief-chinese/versions/1.1.0.json +30 -0
  80. package/runtime/plugins/opinion-manager/catalog/templates/response-style/dense-chinese/versions/1.1.0.json +30 -0
  81. package/runtime/plugins/opinion-manager/catalog/templates/scenario/concise-project/versions/1.1.0.json +181 -0
  82. package/runtime/plugins/opinion-manager/catalog/templates/scenario/reviewed-project/versions/1.1.0.json +179 -0
  83. package/runtime/plugins/opinion-manager/catalog/templates/work-method/proportional/versions/1.1.0.json +31 -0
  84. package/runtime/plugins/opinion-manager/catalog/templates/work-method/three-level/versions/1.1.0.json +31 -0
  85. package/runtime/plugins/opinion-manager/content.json +44 -3
  86. package/runtime/plugins/opinion-manager/plugin.json +1 -1
  87. package/runtime/plugins/opinion-manager/references/inbox.en.md +25 -4
  88. package/runtime/plugins/opinion-manager/references/inbox.md +25 -4
  89. package/runtime/plugins/opinion-manager/references/profile.schema.json +19 -2
  90. package/runtime/plugins/opinion-manager/references/rule.schema.json +25 -3
  91. package/runtime/plugins/opinion-manager/references/versioned-template.schema.json +5 -4
  92. package/runtime/plugins/opinion-manager/references/versioning.md +89 -4
  93. package/runtime/plugins/opinion-manager/runtime/context.py +26 -19
  94. package/runtime/plugins/opinion-manager/runtime/inbox.py +400 -25
  95. package/runtime/plugins/opinion-manager/runtime/inbox_relations.py +106 -0
  96. package/runtime/plugins/opinion-manager/runtime/inbox_routes.py +132 -0
  97. package/runtime/plugins/opinion-manager/runtime/inbox_text.py +117 -11
  98. package/runtime/plugins/opinion-manager/runtime/lifecycle.py +35 -5
  99. package/runtime/plugins/opinion-manager/runtime/locale/en.json +137 -2
  100. package/runtime/plugins/opinion-manager/runtime/migrate.py +582 -0
  101. package/runtime/plugins/opinion-manager/runtime/opinion_manager.py +9 -4
  102. package/runtime/plugins/opinion-manager/runtime/rule_lines.py +247 -0
  103. package/runtime/plugins/opinion-manager/runtime/tags.py +217 -0
  104. package/runtime/plugins/opinion-manager/runtime/versioned.py +289 -41
  105. package/runtime/plugins/opinion-manager/skills/opinion-manager/SKILL.md +8 -7
  106. package/runtime/plugins/project-orchestrator/.codex-plugin/plugin.json +1 -1
  107. package/runtime/plugins/project-orchestrator/plugin.json +1 -1
  108. package/runtime/plugins/project-orchestrator/runtime/locale/en.json +305 -3
  109. package/runtime/plugins/project-orchestrator/runtime/private_paths.py +11 -1
  110. package/runtime/plugins/project-orchestrator/runtime/project_cli.py +101 -1
  111. package/runtime/plugins/project-orchestrator/runtime/project_demo.py +13 -1
  112. package/runtime/plugins/project-orchestrator/runtime/project_ext_actions.py +415 -0
  113. package/runtime/plugins/project-orchestrator/runtime/project_extensions.py +971 -0
  114. package/runtime/plugins/project-orchestrator/runtime/project_extensions_demo.py +86 -0
  115. package/runtime/plugins/project-orchestrator/runtime/project_menu.py +345 -2
  116. package/runtime/plugins/project-orchestrator/runtime/project_real.py +17 -1
  117. package/runtime/plugins/project-orchestrator/skills/project-orchestrator/SKILL.md +2 -0
@@ -76,6 +76,10 @@ TOOLS = [
76
76
  "replaceSkills": {"type": "boolean", "default": False},
77
77
  "only": {"type": "array", "items": {"type": "string", "enum": ["mcp", "skills", "plugins"]}, "default": [],
78
78
  "description": "claude: sync only these types; default is all"},
79
+ "scope": {"type": "string", "enum": ["user", "project", "all"], "default": "all",
80
+ "description": "claude: user-level entries only, project-declared entries only, or both"},
81
+ "projectStore": {"type": "string", "enum": ["local", "file"], "default": "local",
82
+ "description": "claude: where project-level MCP entries go (local = ~/.claude.json under the project's path; file = .mcp.json)"},
79
83
  "resetOverrides": {"type": "boolean", "default": False},
80
84
  "home": {"type": "string"},
81
85
  "retireSkills": {"type": "array", "items": {"type": "string"}, "default": []},
@@ -173,6 +177,10 @@ TOOLS = [
173
177
  "replaceSkills": {"type": "boolean", "default": False},
174
178
  "only": {"type": "array", "items": {"type": "string", "enum": ["mcp", "skills", "plugins"]}, "default": [],
175
179
  "description": "claude: sync only these types (plugins = package and install record); default is all"},
180
+ "scope": {"type": "string", "enum": ["user", "project", "all"], "default": "all",
181
+ "description": "claude: user-level entries only, project-declared entries only, or both"},
182
+ "projectStore": {"type": "string", "enum": ["local", "file"], "default": "local",
183
+ "description": "claude: where project-level MCP entries go (local = ~/.claude.json under the project's path; file = .mcp.json)"},
176
184
  "recoveryRoot": {"type": "string"},
177
185
  },
178
186
  "required": ["project", "client"],
@@ -234,6 +242,8 @@ def _call(name: str, arguments: dict[str, Any]) -> dict[str, Any]:
234
242
  only=arguments.get("only", []),
235
243
  replace_mcp=bool(arguments.get("replaceMcp", False)),
236
244
  replace_skills=bool(arguments.get("replaceSkills", False)),
245
+ scope=arguments.get("scope", "all"),
246
+ project_store=arguments.get("projectStore", "local"),
237
247
  )
238
248
  if name == "agent_pack_inventory":
239
249
  inventory = inventory_source(arguments["source"], home)
@@ -266,6 +276,8 @@ def _call(name: str, arguments: dict[str, Any]) -> dict[str, Any]:
266
276
  only=arguments.get("only", []),
267
277
  replace_mcp=bool(arguments.get("replaceMcp", False)),
268
278
  replace_skills=bool(arguments.get("replaceSkills", False)),
279
+ scope=arguments.get("scope", "all"),
280
+ project_store=arguments.get("projectStore", "local"),
269
281
  )
270
282
  if name == "agent_pack_cloud_sync_safety_check":
271
283
  import agenthelm # noqa: PLC0415 - shipped next to this file
@@ -27,6 +27,9 @@ MESSAGES: dict[str, dict[str, str]] = {
27
27
  "warn_bool": {"zh": "{label}.{key} 必须是布尔值,已忽略", "en": "{label}.{key} must be a boolean; ignored"},
28
28
  "warn_stop": {"zh": "{label}.stop_prompt 须为 {modes} 或 {{客户端: 模式}},已忽略",
29
29
  "en": "{label}.stop_prompt must be {modes} or {{client: mode}}; ignored"},
30
+ "warn_confirm": {"zh": "{label}.confirm 须为 {modes},已忽略", "en": "{label}.confirm must be {modes}; ignored"},
31
+ "warn_cooldown": {"zh": "{label}.prompt_cooldown_hours 须为非负整数(0 表示不设冷却),已忽略",
32
+ "en": "{label}.prompt_cooldown_hours must be a non-negative integer (0 means no cooldown); ignored"},
30
33
  "warn_words": {"zh": "{label}.{key} 须为非空的字符串数组,已忽略", "en": "{label}.{key} must be a non-empty array of strings; ignored"},
31
34
  "warn_int": {"zh": "{label}.{key} 须为正整数,已忽略", "en": "{label}.{key} must be a positive integer; ignored"},
32
35
  "warn_language": {"zh": "{label}.language 须为 auto、zh 或 en,已忽略", "en": "{label}.language must be auto, zh or en; ignored"},
@@ -45,8 +48,8 @@ MESSAGES: dict[str, dict[str, str]] = {
45
48
  "en": "\n[A notice for the user, who may not have seen it. Pass it on in one sentence in your first reply, as written; what to do about it is the user's decision, and do not edit .gitignore yourself]\n{notice}",
46
49
  },
47
50
  "add_command": {
48
- "zh": 'python3 {manager} inbox add --project {root} --title "<标题>" --text "<完整规则>" --scope "<适用范围>" --quote "<用户原话>"{session} --lang {lang}',
49
- "en": 'python3 {manager} inbox add --project {root} --title "<title>" --text "<the full rule>" --scope "<where it applies>" --quote "<the user\'s own words>"{session} --lang {lang}',
51
+ "zh": 'python3 {manager} inbox add --project {root} --title "<标题>" --text "<完整规则>" --scope "<适用范围>" --trigger "<何时适用>" --purpose "<为什么>" --quote "<用户原话>"{session} --lang {lang}',
52
+ "en": 'python3 {manager} inbox add --project {root} --title "<title>" --text "<the full rule>" --scope "<where it applies>" --trigger "<when it applies>" --purpose "<why>" --quote "<the user\'s own words>"{session} --lang {lang}',
50
53
  },
51
54
  "add_command_fallback": {"zh": "opinion-manager 的 inbox add", "en": "opinion-manager's inbox add"},
52
55
  "sep": {"zh": "、", "en": ", "},
@@ -107,6 +110,9 @@ MESSAGES: dict[str, dict[str, str]] = {
107
110
  "zh": "阈值:待确认 ≥{pending} 条或最久 ≥{stale} 天;每会话确认 ≤{prompts} 次;试行 {expire} 天未转正回退;任务结束提示 {stop};语言 {language}",
108
111
  "en": "Thresholds: pending ≥ {pending} or oldest age (days) ≥ {stale}; confirmation requests per session ≤ {prompts}; trial expiry (days): {expire}; end-of-task prompt {stop}; language {language}",
109
112
  },
113
+ "status_confirm": {
114
+ "zh": "确认方式:{mode}(ask:每项目冷却 {hours} 小时内最多问一次;digest:回复末尾顺带一句;quiet:只在会话开始汇总)",
115
+ "en": "Confirmation mode: {mode} (ask: at most one ask per project within {hours} hours; digest: one closing sentence in a reply; quiet: session-start summary only)"},
110
116
  "status_current": {
111
117
  "zh": "当前:待确认 {pending} 条,试行 {trial} 条,最久 {days} 天", "en": "Now: {pending} pending, {trial} on trial, the oldest {days} days old"},
112
118
  "status_quiet": {"zh": "按当前阈值,开新会话不会提示。", "en": "With the current thresholds, a new session shows no reminder."},
@@ -23,11 +23,12 @@ from pathlib import Path
23
23
  from typing import Any, Mapping
24
24
 
25
25
  from i18n_agent_pack import _, N_, normalize # noqa: E402
26
+ import agent_pack_clients as client_registry # noqa: E402
26
27
 
27
28
  LANGUAGE_NAMES = {"zh": N_("中文"), "en": "English"}
28
29
  SOURCE_NAMES = {"locale": N_("系统 locale"), "default": N_("默认值")}
29
30
  KNOWN_KEYS = ("language", "language_hint", "update_check", "ignored_clients")
30
- CLIENT_CHOICES = ("claude", "codex", "cursor")
31
+ CLIENT_CHOICES = client_registry.default_ids()
31
32
 
32
33
 
33
34
  def read_settings(path: Path) -> tuple[dict, str | None]:
@@ -19,6 +19,21 @@ description: Deterministically inventory, verify, install, sync, migrate and rec
19
19
 
20
20
  `runtime/agenthelm.py` 另有两个面向人的入口:`project` 转交 project-orchestrator 的项目入口(不需要 AI Agent);`runtime install|update|use|status` 管理用户级运行时(`~/.local/share/agenthelm/`,项目根目录的启动器优先使用它),写操作默认预览、`--apply` 才执行,新版本装在旁边、旧版本保留。
21
21
 
22
+ `agenthelm inventory`(只读)列出各客户端能看到的 Skill 与 MCP:存放位置、重复、description 字节数、可识别的来源;输出带 `schema_version` 的稳定 JSON,契约见 [references/inventory-contract.md](../../references/inventory-contract.md)。
23
+
24
+ ## 技能与 MCP 管理(命令清单)
25
+
26
+ 读命令零写入;写命令默认预览,`--apply` 必须带预览给出的 `--expect-plan <plan_digest>`(指纹不一致拒绝、退出码 1),本版只支持 macOS 与 Linux。Agent 先向用户展示预览,经同意才加 `--apply`;只有证据等级为 `file` 的条目才可能被处置,`unknown` 一律只读,不下结论。
27
+
28
+ - `agenthelm inventory [--client claude|codex|cursor|claude-desktop|all] [--scope project|user|all]`:技能与 MCP 的作用域、重复、description 加载成本、证据等级。`claude-desktop` 只读,不在默认客户端集合内,须点名或用 `--client all`。契约:[inventory-contract.md](../../references/inventory-contract.md)。
29
+ - `agenthelm clients`:只读,列出客户端驱动(内置与用户声明)及其能力。用户声明文件放在 `~/.config/agenthelm/clients.d/*.json`,本版**只校验、不执行**,不支持用新声明安装新客户端(#134 Phase 1)。
30
+ - `agenthelm relocate <ref> --to <客户端>:<作用域>`:迁移 Skill(复制或同作用域内相对符号链接,默认归档源、不删除)与 Claude 的 MCP 条目(`user|local|project`)。绝不覆盖同名目标;放宽须 `--allow-widen`,进入项目目录须 `--confirm-project-content`。契约:[relocate-contract.md](../../references/relocate-contract.md)。
31
+ - `agenthelm dedupe <分组id> …`:重复分组的处置(`--keep <ref> --retire-others`、`--keep-all --note`、`--ignore|--unignore`,决定写入 `~/.config/agenthelm/ext-decisions.json`),`--desktop-snippet` 只生成可粘贴到 Claude Desktop 配置的片段,不读写 Desktop 配置。契约:[dedupe-contract.md](../../references/dedupe-contract.md)。
32
+ - 受管与手工的区别(MCP):state 里记录了本项目包归属的条目由工具退役(原片段与整份配置先备份、失败回滚);手工装的或属于别的包的条目工具**不编辑**,只给 `claude mcp remove --scope <作用域> <名>` 与备份提示。Skill 副本只归档、不删除,本版没有 `restore` 命令,结果给出手工恢复的 `mv`。
33
+ - 作用域:Project Profile 的 `capabilities.default_scope` / `mcp_scope` / `skill_scope`(可选,不写则行为不变)与 `sync` / `reconcile --scope user|project|all`、`--project-store local|file`,细节与迁移预览、屏蔽检测见 [capability-config.md](../../references/capability-config.md)。
34
+ - 项目里的人用入口:`agenthelm project extensions list|dups|show|check|move|dedupe|scope`(菜单第 9 屏「技能与 MCP」),属于 project-orchestrator,写入类子命令转发到上面的命令。
35
+ - **未确认,须真机验证**:Claude local 级 MCP 条目是否弹批准;Claude Desktop 是否加载某条目(远程 url、请求头、SSE 官方文档未说明);同步盘里相对符号链接是否可用(同步盘路径下改为复制)。这些工具都以 `promise: cannot-promise` 或 `best-effort` 标注,不写成已验证。
36
+
22
37
  `agenthelm config` 管理用户级设置(`~/.config/agenthelm/config.json`),默认只预览,`--apply` 才写入,只改要改的键,替换前备份原文件:`config show` 显示生效的设置;`config language zh|en|auto` 设置界面语言(命令行输出用哪种语言,不改动项目文件);`config language-hint on|off` 开关“界面语言未设置”的提示;`config project-language zh|en [--project <目录>]` 设置当前项目的文件语言(Profile 的 `language`,写进项目的文件用哪种语言;只改 Profile)。只有界面实际显示英文、且没有任何地方指定界面语言时,`agenthelm check` 与会话开始的提示才会说明当前语言从哪来并给出命令(中文界面不提示);界面显示英文、已有项目没有 `language` 时 `check` 也会说明。两种语言的区别要向用户讲清楚:界面语言只影响屏幕上的文字,项目文件语言随项目同步。
23
38
 
24
39
  ## 执行顺序
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agents-init",
3
- "version": "6.9.2",
3
+ "version": "6.10.0",
4
4
  "description": "Initialize or migrate an Agent project contract; ships with project-orchestrator, agent-pack and opinion-manager.",
5
5
  "author": {
6
6
  "name": "lc4t"
@@ -3,13 +3,14 @@
3
3
  "packs": [
4
4
  {
5
5
  "id": "agents-init/project-contract",
6
- "version": "1.4.0",
6
+ "version": "1.5.0",
7
7
  "kind": "template",
8
8
  "title": "项目契约模板",
9
9
  "description": "初始化时渲染为项目入口文件的中文模板与根目录启动器;更新后由用户逐文件选择是否重新渲染。",
10
10
  "sources": [
11
11
  "skills/agents-init/AGENT.template.md",
12
- "skills/agents-init/launcher.sh"
12
+ "skills/agents-init/launcher.sh",
13
+ "skills/agents-init/launcher.en.sh"
13
14
  ],
14
15
  "materializes": [
15
16
  "AGENTS.md",
@@ -21,6 +22,7 @@
21
22
  "project_lock": "agenthelm",
22
23
  "files": {
23
24
  "skills/agents-init/AGENT.template.md": "4fe1115569c12ab007cd7d388f49c2a4c579864d5c0bf04a3180ea4b0796220d",
25
+ "skills/agents-init/launcher.en.sh": "105a8800889d4479b1ccb3cfe3ac7e1d92cb4b9c7642a089d64c297eb80e8189",
24
26
  "skills/agents-init/launcher.sh": "cf27d6cca786905a192446ea4eefe5635942914c3358c78d12117af912107cad"
25
27
  },
26
28
  "materializes_from_profile": [
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
3
3
  "name": "agents-init",
4
- "version": "6.9.2",
4
+ "version": "6.10.0",
5
5
  "description": "Initialize or migrate an Agent project contract (AGENTS.md, Project Profile, root launcher); ships with project-orchestrator, agent-pack and opinion-manager.",
6
6
  "author": {
7
7
  "name": "lc4t"
@@ -53,6 +53,8 @@ python3 scripts/init_project.py --project /path/to/project \
53
53
 
54
54
  **项目文件语言**:初始化前先问用户项目里的文件用中文还是英文(用户没有特别要求时取当前对话的语言),用 `--language zh|en` 传入;不传时取当前界面语言(`AGENTHELM_LANG`、系统 locale,最后英文)。它写进 Profile 的 `language`,决定新建 Case 的小节名与默认文字、README 追加的使用说明用哪种语言,随项目同步,与各人的命令行界面语言无关;缺省的旧项目保持中文。`--mode migrate` 缺省保持中文,要改传 `--language en`。
55
55
 
56
+ `language=en` 的项目不再生成含中文的文件:根目录启动器(头部注释与报错、指引文案)与 `private/.gitignore` 随项目文件语言生成,`zh` 与缺省语言的输出逐字节不变(内容包 `agents-init/project-contract` 因此升版)。**以前用 `--language en` 生成的项目**启动器仍是中文:先运行 `agenthelm check` 看差异,再运行 `agenthelm fix update-content` 预览(直接运行 `agenthelm fix` 会按 `check` 的差异列出同样的项),确认后加 `--apply` 整份替换为英文启动器(替换前备份;你改过启动器时该文件被阻止,逐文件选择 `--keep`、`--merge` 或 `--accept`);已有的 `private/.gitignore` 不会被改写。`zh` 或缺省语言的项目不受影响,不要求任何动作。
57
+
56
58
  已有项目没有 `language` 时按中文生成。要改,用 `--mode language --language zh|en`(或 `agenthelm config project-language zh|en`):默认只预览,`--apply` 只把 Profile 的 `language` 写成所选值(Profile 先备份),不改写任何已有文件;`check` 的 `project_language` 字段给出项目是否声明了它。
57
59
 
58
60
  新项目默认在根目录生成启动器 `menu`(人不经过 Agent 打开项目菜单),并在 Profile 写入 `entry` 段;用户想用别的名字时传 `--entry-name <名称>`,不要启动器时传 `--no-entry`。README.md 不存在时新建并写入使用说明小节(中文项目叫「怎样使用」,英文项目叫 How to use),已存在的不改动。
@@ -0,0 +1,93 @@
1
+ #!/bin/sh
2
+ # Project entry (generated by agents-init; the file can be renamed): ./<this file> opens the project menu,
3
+ # ./<this file> --help lists the commands available without the menu. It calls no model and downloads no code.
4
+ #
5
+ # It looks for the agenthelm runtime in this order and hands over to the first one found:
6
+ # 1. the command named by the AGENTHELM_BIN environment variable
7
+ # 2. the user runtime directory ${XDG_DATA_HOME:-~/.local/share}/agenthelm/current
8
+ # 3. agenthelm on PATH
9
+ # 4. the agent-pack that ships with a plugin in an installed AI client (needs Python 3.11+)
10
+ # If none is found it explains why and what to do next, and exits with code 3.
11
+ set -u
12
+ LAUNCHER_API=1
13
+ root=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
14
+
15
+ python_ok() {
16
+ "$1" -c 'import sys; sys.exit(0 if sys.version_info >= (3, 11) else 1)' >/dev/null 2>&1
17
+ }
18
+
19
+ find_python() {
20
+ for candidate in "${AGENTHELM_PYTHON:-}" python3 python; do
21
+ [ -n "$candidate" ] || continue
22
+ command -v "$candidate" >/dev/null 2>&1 || continue
23
+ if python_ok "$candidate"; then
24
+ printf '%s\n' "$candidate"
25
+ return 0
26
+ fi
27
+ done
28
+ return 1
29
+ }
30
+
31
+ if [ -n "${AGENTHELM_BIN:-}" ]; then
32
+ if [ -x "$AGENTHELM_BIN" ] || command -v "$AGENTHELM_BIN" >/dev/null 2>&1; then
33
+ exec "$AGENTHELM_BIN" project --project "$root" --via-launcher "$LAUNCHER_API" "$@"
34
+ fi
35
+ echo "The command AGENTHELM_BIN points to does not exist: ${AGENTHELM_BIN}" >&2
36
+ echo " · Fix or unset this environment variable and try again" >&2
37
+ exit 3
38
+ fi
39
+
40
+ current="${XDG_DATA_HOME:-$HOME/.local/share}/agenthelm/current/bin/agenthelm"
41
+ if [ -x "$current" ]; then
42
+ exec "$current" project --project "$root" --via-launcher "$LAUNCHER_API" "$@"
43
+ fi
44
+
45
+ if command -v agenthelm >/dev/null 2>&1; then
46
+ exec agenthelm project --project "$root" --via-launcher "$LAUNCHER_API" "$@"
47
+ fi
48
+
49
+ python=$(find_python) || python=""
50
+ if [ -n "$python" ]; then
51
+ # Client plugin caches: <plugin>/<version>/ for Claude Code and Codex, a local directory for Cursor; take the highest version.
52
+ best=$("$python" - "$HOME" "${CLAUDE_CONFIG_DIR:-$HOME/.claude}" "${CODEX_HOME:-$HOME/.codex}" <<'PY'
53
+ import re, sys
54
+ from pathlib import Path
55
+ home, claude, codex = map(Path, sys.argv[1:4])
56
+ patterns = [(claude / "plugins/cache/agenthelm/agent-pack", "*/runtime/agenthelm.py"),
57
+ (codex / "plugins/cache/agenthelm/agent-pack", "*/runtime/agenthelm.py"),
58
+ (home / ".cursor/plugins/local/agent-pack", "runtime/agenthelm.py")]
59
+ def key(path):
60
+ match = re.search(r"/(\d+)\.(\d+)\.(\d+)/runtime/", path.as_posix())
61
+ return tuple(map(int, match.groups())) if match else (0, 0, 0)
62
+ found = [path for base, pattern in patterns for path in base.glob(pattern)]
63
+ print(max(found, key=key) if found else "")
64
+ PY
65
+ )
66
+ if [ -n "$best" ]; then
67
+ exec "$python" "$best" project --project "$root" --via-launcher "$LAUNCHER_API" "$@"
68
+ fi
69
+ fi
70
+
71
+ {
72
+ echo "Cannot open the project menu: this machine has no agenthelm runtime yet."
73
+ if [ -z "$python" ]; then
74
+ old=$(python3 -c 'import platform; print(platform.python_version())' 2>/dev/null || true)
75
+ if [ -n "$old" ]; then
76
+ echo "Reason: the Python found is ${old}; 3.11 or newer is required (everyday agenthelm features need only Python, not an AI client)."
77
+ else
78
+ echo "Reason: no Python 3.11 or newer was found (everyday agenthelm features need only Python, not an AI client)."
79
+ fi
80
+ echo "Next steps:"
81
+ echo " 1. Install Python 3.11+ (on macOS use the python.org installer or Homebrew; on Linux use your distribution's package manager)"
82
+ echo " 2. If it is installed elsewhere: export AGENTHELM_PYTHON=/path/to/python3"
83
+ echo " 3. Then install the runtime (see below)"
84
+ else
85
+ echo "Reason: no agenthelm runtime was found; everyday use needs only Python 3.11+, not an AI client."
86
+ fi
87
+ echo "Install the runtime (once; opening the menu afterwards needs no network):"
88
+ echo " · Online: npx @sakanano-moe/agenthelm runtime install --apply"
89
+ echo " · Offline: extract the release archive (agenthelm-v<version>.tar.gz), then run"
90
+ echo " python3 <extracted-dir>/plugins/agent-pack/runtime/agenthelm.py runtime install --apply"
91
+ echo " · Runtime already installed: export AGENTHELM_BIN=/path/to/agenthelm"
92
+ } >&2
93
+ exit 3
@@ -296,6 +296,33 @@
296
296
  }
297
297
  }
298
298
  },
299
+ "default_scope": {
300
+ "enum": [
301
+ "user",
302
+ "project"
303
+ ],
304
+ "description": "条目的默认作用域:user 对本机所有项目生效,project 只对本项目生效;缺省 user。旧版 agent-pack 会忽略该键。"
305
+ },
306
+ "mcp_scope": {
307
+ "type": "object",
308
+ "additionalProperties": {
309
+ "enum": [
310
+ "user",
311
+ "project"
312
+ ]
313
+ },
314
+ "description": "MCP 服务器名到作用域的映射,覆盖 default_scope。"
315
+ },
316
+ "skill_scope": {
317
+ "type": "object",
318
+ "additionalProperties": {
319
+ "enum": [
320
+ "user",
321
+ "project"
322
+ ]
323
+ },
324
+ "description": "Skill 名到作用域的映射,覆盖 default_scope。"
325
+ },
299
326
  "destination_skill_root": {
300
327
  "$ref": "#/$defs/relativePath"
301
328
  },
@@ -26,6 +26,7 @@ REPOSITORY = "lc4t/agenthelm"
26
26
  PLUGIN = "agents-init"
27
27
  TEMPLATE_NAME = "AGENT.template.md"
28
28
  LAUNCHER_NAME = "launcher.sh"
29
+ LAUNCHER_EN_NAME = "launcher.en.sh" # 英文版启动器;早期发布没有
29
30
  MAX_RELEASES = 20 # 联网最多看最近这么多个发布
30
31
  MAX_ARCHIVE_BYTES = 64 * 1024 * 1024
31
32
 
@@ -39,6 +40,7 @@ class PackSource:
39
40
  version: str # 内容包版本(content.json 里的 version)
40
41
  template: str
41
42
  launcher: str | None
43
+ launcher_en: str | None = None
42
44
 
43
45
 
44
46
  def sha256(data: bytes) -> str:
@@ -63,7 +65,8 @@ def _verified(content: object, pack_id: str, read: Callable[[str], bytes | None]
63
65
  return None
64
66
  try:
65
67
  launcher = texts[LAUNCHER_NAME].decode("utf-8") if LAUNCHER_NAME in texts else None
66
- return PackSource(label, kind, str(pack["version"]), texts[TEMPLATE_NAME].decode("utf-8"), launcher)
68
+ launcher_en = texts[LAUNCHER_EN_NAME].decode("utf-8") if LAUNCHER_EN_NAME in texts else None
69
+ return PackSource(label, kind, str(pack["version"]), texts[TEMPLATE_NAME].decode("utf-8"), launcher, launcher_en)
67
70
  except UnicodeDecodeError:
68
71
  return None
69
72
 
@@ -55,6 +55,7 @@ BUNDLED_PLUGINS = {
55
55
  TEMPLATE_PATH = Path(__file__).resolve().parents[1] / "AGENT.template.md"
56
56
  # 项目根目录的人用入口(启动器):文件名由项目选择,内容与名称无关,随内容包更新。
57
57
  LAUNCHER_TEMPLATE = Path(__file__).resolve().parents[1] / "launcher.sh"
58
+ LAUNCHER_TEMPLATE_EN = Path(__file__).resolve().parents[1] / "launcher.en.sh" # language=en 项目用的同一脚本英文版
58
59
  DEFAULT_ENTRY = "menu"
59
60
  ENTRY_API = 1
60
61
  ENTRY_NAME_RE = re.compile(r"^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$")
@@ -62,6 +63,7 @@ RESERVED_ENTRY_NAMES = {"AGENTS.md", "AGENT.md", "CLAUDE.md", "AGENT.RULES.md",
62
63
  "cases", "docs", "memory", "sops", "private", ".agents", ".git"}
63
64
  # 私有目录:内容默认不进入 git(与 project-orchestrator 的 private_paths.IGNORE_TEXT 相同,测试核对一致)。
64
65
  PRIVATE_IGNORE = "# agenthelm: 本目录内容默认不进入 git;读取前须经用户确认。\n*\n!.gitignore\n"
66
+ PRIVATE_IGNORE_EN = "# agenthelm: this directory is kept out of git by default; get the user's confirmation before reading it.\n*\n!.gitignore\n"
65
67
  README_START = "<!-- agenthelm:entry -->"
66
68
  README_END = "<!-- /agenthelm:entry -->"
67
69
  # 内容锁里没有记录模板版本时(早于内容锁的项目),补登的条目使用这个版本,检查会提示刷新。
@@ -440,11 +442,17 @@ def validate_entry_name(name: str) -> str:
440
442
  return name
441
443
 
442
444
 
443
- def launcher_text() -> str:
445
+ def launcher_text(language: str = "zh") -> str:
446
+ """The launcher shipped with this plugin, in the project's file language (``en`` has its own script)."""
447
+ path = LAUNCHER_TEMPLATE_EN if language == "en" else LAUNCHER_TEMPLATE
444
448
  try:
445
- return LAUNCHER_TEMPLATE.read_text(encoding="utf-8")
449
+ return path.read_text(encoding="utf-8")
446
450
  except (OSError, UnicodeDecodeError) as exc:
447
- raise InitError(_("无法读取启动器模板:{0}").format(LAUNCHER_TEMPLATE), code="template-invalid") from exc
451
+ raise InitError(_("无法读取启动器模板:{0}").format(path), code="template-invalid") from exc
452
+
453
+
454
+ def private_ignore_text(language: str = "zh") -> str:
455
+ return PRIVATE_IGNORE_EN if language == "en" else PRIVATE_IGNORE
448
456
 
449
457
 
450
458
  def entry_command(launcher: str | None) -> str:
@@ -482,8 +490,11 @@ def tracked_paths(pack: dict | None, launcher: str | None) -> list[Path]:
482
490
  return tracked + ([Path(launcher)] if launcher else [])
483
491
 
484
492
 
485
- def files_for(inputs: Inputs, templates: dict[str, str] | None = None, launcher: str | None = None) -> dict[Path, str]:
486
- """``launcher`` is the launcher script text; omitted, the one shipped with this plugin."""
493
+ def files_for(inputs: Inputs, templates: dict[str, str] | None = None, launcher: str | None = None,
494
+ launcher_en: str | None = None) -> dict[Path, str]:
495
+ """``launcher`` / ``launcher_en`` are the launcher script texts (Chinese / English); both omitted, the ones shipped
496
+ with this plugin. A historical pack source without an English script (``launcher`` given, ``launcher_en`` not) renders
497
+ the Chinese one for every language: that is what such a release wrote."""
487
498
  templates = templates or load_templates()
488
499
  profile = {
489
500
  "$schema": PROFILE_SCHEMA,
@@ -571,14 +582,18 @@ def files_for(inputs: Inputs, templates: dict[str, str] | None = None, launcher:
571
582
  Path(".agent-doc/chat-summary.md"): render_template(localized(templates, ".agent-doc/chat-summary.md", inputs.language), replacements),
572
583
  Path("memory/.gitkeep"): "",
573
584
  Path("sops/.gitkeep"): "",
574
- Path("private/.gitignore"): PRIVATE_IGNORE,
585
+ Path("private/.gitignore"): private_ignore_text(inputs.language),
575
586
  Path("docs/refs/README.md"): render_template(localized(templates, "docs/refs/README.md", inputs.language), replacements),
576
587
  Path("docs/drafts/.gitkeep"): "",
577
588
  }
578
589
  if inputs.work_mode == "case-workspace":
579
590
  files[Path("cases/.gitkeep")] = ""
580
591
  if inputs.entry_launcher:
581
- files[Path(inputs.entry_launcher)] = launcher if launcher is not None else launcher_text()
592
+ if inputs.language == "en" and (launcher_en is not None or launcher is None):
593
+ text = launcher_en if launcher_en is not None else launcher_text("en")
594
+ else:
595
+ text = launcher if launcher is not None else launcher_text()
596
+ files[Path(inputs.entry_launcher)] = text
582
597
  return files
583
598
 
584
599
 
@@ -999,7 +1014,7 @@ def find_baseline(root: Path, relative: Path, digest: str, versions: list[str],
999
1014
  try:
1000
1015
  templates = parse_templates(source.template, historical=True)
1001
1016
  for variant in variants:
1002
- text = files_for(variant, templates, source.launcher).get(relative)
1017
+ text = files_for(variant, templates, source.launcher, source.launcher_en).get(relative)
1003
1018
  if text is not None and hashlib.sha256(text.encode("utf-8")).hexdigest() == digest:
1004
1019
  return {"text": text, "source": source.label, "kind": source.kind, "version": source.version}
1005
1020
  if text is not None and diagnostics is not None and (not versions or source.version in versions):
@@ -1537,7 +1552,7 @@ def add_entry(args: argparse.Namespace, root: Path) -> tuple[int, dict]:
1537
1552
  entry = profile.get("entry") if isinstance(profile.get("entry"), dict) else {}
1538
1553
  if entry.get("launcher") and entry["launcher"] != name:
1539
1554
  raise InitError(_("项目已声明入口 ./{0};改名请同时修改 Profile 的 entry.launcher 与文件名").format(entry['launcher']))
1540
- template = launcher_text()
1555
+ template = launcher_text(project_language(profile))
1541
1556
  target = root / name
1542
1557
  if target.is_symlink():
1543
1558
  raise InitError(f"refusing symlinked launcher: {name}")
@@ -3,7 +3,7 @@
3
3
  "name": "agents-init v6 / Project Profile initialization and migration",
4
4
  "description": "Create or migrate a general project skeleton and Project Profile; the bundled opinion-manager manages user-confirmed Agent behavior rules.",
5
5
  "schema_version": "1.0",
6
- "version": "6.9.2",
6
+ "version": "6.10.0",
7
7
  "status": "stable",
8
8
  "language": "zh-CN",
9
9
  "license": "MIT",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opinion-manager",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "description": "Choose template variants and exact versions; manage personal Profiles, locked snapshots and upgrade previews.",
5
5
  "author": {
6
6
  "name": "lc4t"
@@ -12,4 +12,6 @@
12
12
 
13
13
  配置采用 Opinion Manager 的 catalog、profile、compose、verify 流程:先查看完整规则,预览配置与正文;用户确认后由 Agent 使用工具实际返回的指纹保存,再核验。人工修改先保留,完整读回并纳入新配置;升级必须精确选版本并保留个人修改。模板不创建 Case、不管理 Git、不自行上传或发布文件,也不实现候选计数与灰度晋升。项目路径、权限、依赖和命令由项目治理契约提供。
14
14
 
15
- 规则初始版本为 1.0.0;同用途的变体各自维护版本。说明或拼写修订且行为不变用 patch;兼容的新增或完善用 minor;删除约束或不兼容改变用 major。版本变化都需要完整预览和确认。测试只证明相应结构及组合流程,不证明长期效果。
15
+ 规则初始版本为 1.0.0;同用途的变体各自维护版本。当前推荐版本为 1.1.0:每条规则与模板提供 zh / en 双语文字,规则另带 trigger(何时适用)、purpose(为什么)、exclude(不适用于);scopes 只是适用范围说明,不是路由。1.1.0 与 1.0.0 的行为语义一致,1.0.0 文件保持不变,模板按精确版本引用对应规则的 1.1.0。说明或拼写修订且行为不变用 patch;兼容的新增或完善用 minor;删除约束或不兼容改变用 major。版本变化都需要完整预览和确认。测试只证明相应结构及组合流程,不证明长期效果。
16
+
17
+ 1.1.0 的两个场景模板(`scenario/reviewed-project`、`scenario/concise-project`)还声明了标签加载:宽集合的 10 条(简明组合 9 条)常驻规则始终读取,其余规则按 `decisions`(方案与论证)、`files`(文件与条目)、`reports`(汇报材料)、`maintenance`(规则与模板维护)四个标签按需读取,标签成员关系只写在模板里,规则文件不变。选择这些模板时,`profile` 预览会生成带标签声明的 Profile(schema 2.2),经确认后才生效;不需要分层读取时加 `--no-tags` 保持完整读取。其余模板没有声明,规则全部常驻。1.0.0 的模板与规则保持原样。
@@ -0,0 +1,34 @@
1
+ {
2
+ "id": "om.align-requirements",
3
+ "version": "1.1.0",
4
+ "slot": "om.align-requirements",
5
+ "level": "required",
6
+ "title": {
7
+ "zh": "需求对齐与错误前提阻断",
8
+ "en": "Requirement alignment and blocking wrong premises"
9
+ },
10
+ "text": {
11
+ "zh": "展开完整方案前先对齐对需求的理解;出现偏差时回到用户原话重建,必要时针对原话集中追问。发现初始假设或关键前提错误时,先纠正并重新对齐,再继续后续沟通和行动,禁止在错误前提上继续加工。不可逆操作前先确认现状,禁止基于推断现状执行或建议破坏性操作。",
12
+ "en": "Before expanding a full solution, align on your understanding of the request. When it drifts, rebuild from the user's own words and, if needed, ask focused questions about them in one batch. When an initial assumption or key premise turns out to be wrong, correct it and realign before continuing the conversation or any action; never keep building on a wrong premise. Before an irreversible operation, confirm the current state first; never perform or suggest a destructive operation based on an inferred state."
13
+ },
14
+ "scopes": {
15
+ "zh": [
16
+ "选择本模板的环境;按正文条件适用"
17
+ ],
18
+ "en": [
19
+ "Where the template is selected; applies under the conditions in the text"
20
+ ]
21
+ },
22
+ "trigger": {
23
+ "zh": "展开完整方案前;理解出现偏差、初始假设或关键前提有误时;执行不可逆操作前",
24
+ "en": "Before expanding a full solution; when the understanding drifts or an initial assumption or key premise is wrong; before an irreversible operation"
25
+ },
26
+ "purpose": {
27
+ "zh": "避免在错误前提或推断出的现状上继续加工、执行破坏性操作",
28
+ "en": "Avoid building on a wrong premise, or acting destructively on an inferred current state"
29
+ },
30
+ "exclude": {
31
+ "zh": "需求与前提已经清楚、也不涉及不可逆操作的回答",
32
+ "en": "Answers where the request and premises are already clear and no irreversible operation is involved"
33
+ }
34
+ }
@@ -0,0 +1,34 @@
1
+ {
2
+ "id": "om.assumptions-authority",
3
+ "version": "1.1.0",
4
+ "slot": "om.assumptions-authority",
5
+ "level": "required",
6
+ "title": {
7
+ "zh": "假设、能力边界与推荐倾向",
8
+ "en": "Assumptions, capability limits and recommendation bias"
9
+ },
10
+ "text": {
11
+ "zh": "标注回答依赖的未经确认假设并说明依据。区分擅长的信息检索、结构化分析、代码生成和文本润色,与需要用户决策的价值判断、审美偏好、领域经验和实时业务决策。技术选型、方法论推荐等可能受训练数据分布影响时,提示倾向并列出替代视角。",
12
+ "en": "Mark the unconfirmed assumptions an answer relies on and say why they were assumed. Distinguish what you are good at (information retrieval, structured analysis, code generation, text polishing) from what needs the user's decision (value judgments, aesthetic preferences, domain experience, real-time business decisions). When technology or methodology recommendations may be skewed by the training data distribution, point out the bias and list alternative perspectives."
13
+ },
14
+ "scopes": {
15
+ "zh": [
16
+ "选择本模板的环境;按正文条件适用"
17
+ ],
18
+ "en": [
19
+ "Where the template is selected; applies under the conditions in the text"
20
+ ]
21
+ },
22
+ "trigger": {
23
+ "zh": "回答依赖未经确认的假设时;任务涉及价值判断、审美偏好、领域经验或实时业务决策时;做技术选型或方法论推荐时",
24
+ "en": "When an answer relies on unconfirmed assumptions; when the task involves value judgments, aesthetic preferences, domain experience or real-time business decisions; when recommending technologies or methods"
25
+ },
26
+ "purpose": {
27
+ "zh": "让用户看清回答的依据、能力边界和推荐倾向,并把需要用户决策的部分交回用户",
28
+ "en": "Let the user see the basis, the capability limits and the bias of an answer, and hand decisions that belong to the user back to them"
29
+ },
30
+ "exclude": {
31
+ "zh": "不依赖未确认假设、也不涉及上述决策或推荐的事实性回答",
32
+ "en": "Factual answers that rely on no unconfirmed assumption and involve none of these decisions or recommendations"
33
+ }
34
+ }
@@ -0,0 +1,34 @@
1
+ {
2
+ "id": "om.batch-questions",
3
+ "version": "1.1.0",
4
+ "slot": "om.batch-questions",
5
+ "level": "required",
6
+ "title": {
7
+ "zh": "编号问题与一次性集中决策",
8
+ "en": "Numbered questions and one-shot decisions"
9
+ },
10
+ "text": {
11
+ "zh": "存在不确定内容或需要收集信息时,使用“编号+问题”格式请求确认。问题征集与对问题的回答都应尽量一次完整给出,多个问题打包成一次决策,避免分页、逐条往返或分批遗漏。",
12
+ "en": "When something is uncertain or information must be collected, ask for confirmation in a \"number + question\" format. Collect the questions, and answer them, in one complete pass where possible: bundle several questions into a single decision and avoid paging, one-by-one round trips, or leaving items out across batches."
13
+ },
14
+ "scopes": {
15
+ "zh": [
16
+ "选择本模板的环境;按正文条件适用"
17
+ ],
18
+ "en": [
19
+ "Where the template is selected; applies under the conditions in the text"
20
+ ]
21
+ },
22
+ "trigger": {
23
+ "zh": "存在不确定内容或需要向用户收集信息时",
24
+ "en": "When something is uncertain or information must be collected from the user"
25
+ },
26
+ "purpose": {
27
+ "zh": "减少逐条往返和分批遗漏,让用户一次完成决策",
28
+ "en": "Cut one-by-one round trips and omissions across batches so the user can decide in one pass"
29
+ },
30
+ "exclude": {
31
+ "zh": "无需向用户确认或收集信息的任务",
32
+ "en": "Tasks that need no confirmation or information from the user"
33
+ }
34
+ }
@@ -0,0 +1,34 @@
1
+ {
2
+ "id": "om.bilingual-terms",
3
+ "version": "1.1.0",
4
+ "slot": "om.bilingual-terms",
5
+ "level": "required",
6
+ "title": {
7
+ "zh": "专业术语与外文引用",
8
+ "en": "Technical terms and foreign-language citations"
9
+ },
10
+ "text": {
11
+ "zh": "专业术语首次出现时标注中英对照;后续正文使用英文缩写。术语密集时在文末附术语对照表;引用外文资料时保留原文术语并附中文释义。",
12
+ "en": "On the first occurrence of a technical term, give both the Chinese and English forms; afterwards use the English abbreviation. When terms are dense, add a glossary at the end. When citing foreign-language sources, keep the original term and add a Chinese explanation."
13
+ },
14
+ "scopes": {
15
+ "zh": [
16
+ "选择本模板的环境;按正文条件适用"
17
+ ],
18
+ "en": [
19
+ "Where the template is selected; applies under the conditions in the text"
20
+ ]
21
+ },
22
+ "trigger": {
23
+ "zh": "正文中首次出现专业术语时;术语密集时;引用外文资料时",
24
+ "en": "On the first occurrence of a technical term; when terms are dense; when citing foreign-language sources"
25
+ },
26
+ "purpose": {
27
+ "zh": "让读者对应上中英术语,并保留外文资料的原意",
28
+ "en": "Let readers match the Chinese and English terms and keep the original meaning of foreign sources"
29
+ },
30
+ "exclude": {
31
+ "zh": "同一术语的后续出现(改用英文缩写);不含专业术语的内容",
32
+ "en": "Later occurrences of the same term (use the English abbreviation); content without technical terms"
33
+ }
34
+ }