helloagents 3.0.30 → 3.0.31

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 (40) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/.codex-plugin/plugin.json +1 -1
  3. package/README.md +5 -18
  4. package/README_CN.md +7 -20
  5. package/bootstrap-lite.md +15 -15
  6. package/bootstrap.md +15 -15
  7. package/gemini-extension.json +1 -1
  8. package/install.ps1 +3 -3
  9. package/install.sh +3 -3
  10. package/package.json +1 -1
  11. package/scripts/advisor-state.mjs +1 -1
  12. package/scripts/cli-config.mjs +8 -0
  13. package/scripts/cli-doctor.mjs +2 -76
  14. package/scripts/cli-host-detect.mjs +0 -29
  15. package/scripts/cli-hosts.mjs +0 -8
  16. package/scripts/cli-lifecycle-hosts.mjs +1 -22
  17. package/scripts/cli-lifecycle.mjs +17 -3
  18. package/scripts/cli-messages.mjs +12 -24
  19. package/scripts/guard.mjs +1 -1
  20. package/scripts/notify-context.mjs +1 -1
  21. package/scripts/notify-events.mjs +0 -1
  22. package/scripts/notify-source.mjs +0 -1
  23. package/scripts/plan-contract.mjs +1 -1
  24. package/scripts/runtime-scope.mjs +1 -1
  25. package/scripts/turn-stop-gate.mjs +5 -5
  26. package/skills/commands/auto/SKILL.md +2 -2
  27. package/skills/commands/build/SKILL.md +3 -3
  28. package/skills/commands/global/SKILL.md +1 -1
  29. package/skills/commands/help/SKILL.md +11 -11
  30. package/skills/commands/loop/SKILL.md +1 -1
  31. package/skills/commands/plan/SKILL.md +1 -1
  32. package/skills/commands/prd/SKILL.md +1 -1
  33. package/skills/commands/test/SKILL.md +1 -1
  34. package/skills/commands/verify/SKILL.md +5 -5
  35. package/skills/hello-review/SKILL.md +1 -1
  36. package/skills/hello-subagent/SKILL.md +1 -1
  37. package/skills/hello-ui/SKILL.md +1 -1
  38. package/skills/hello-verify/SKILL.md +7 -7
  39. package/skills/helloagents/SKILL.md +6 -6
  40. package/scripts/cli-deepseek.mjs +0 -131
@@ -7,7 +7,6 @@ import {
7
7
  CODEX_PLUGIN_NAME,
8
8
  } from './cli-codex.mjs'
9
9
  import { getStableRuntimeRoot } from './cli-runtime-root.mjs'
10
- import { FULL_CARRIER_PROFILE_MARKER } from './cli-utils.mjs'
11
10
  import { safeJson, safeRead } from './cli-utils.mjs'
12
11
 
13
12
  const HOST_ALIASES = new Map([
@@ -19,8 +18,6 @@ const HOST_ALIASES = new Map([
19
18
  ['gemini-cli', 'gemini'],
20
19
  ['codex', 'codex'],
21
20
  ['codex-cli', 'codex'],
22
- ['deepseek', 'deepseek'],
23
- ['deepseek-tui', 'deepseek'],
24
21
  ])
25
22
 
26
23
  function hasHelloagentsMarker(filePath) {
@@ -31,10 +28,6 @@ function hasHelloagentsSettings(filePath) {
31
28
  return JSON.stringify(safeJson(filePath) || {}).includes('helloagents')
32
29
  }
33
30
 
34
- function hasFullCarrierProfile(filePath) {
35
- return (safeRead(filePath) || '').includes(FULL_CARRIER_PROFILE_MARKER)
36
- }
37
-
38
31
  function normalizePath(value = '') {
39
32
  return String(value || '').replace(/\\/g, '/').toLowerCase()
40
33
  }
@@ -97,26 +90,6 @@ function detectCodexMode(home) {
97
90
  return ''
98
91
  }
99
92
 
100
- function detectDeepseekMode(home) {
101
- const deepseekDir = join(home, '.deepseek')
102
- const carrierPath = join(deepseekDir, 'AGENTS.md')
103
- const runtimeRoot = normalizePath(getStableRuntimeRoot(home))
104
- const homeLinkTarget = safeRealTarget(join(deepseekDir, 'helloagents'))
105
- if (
106
- (hasHelloagentsMarker(carrierPath) || (existsSync(join(deepseekDir, 'helloagents')) && homeLinkTarget === runtimeRoot))
107
- && hasFullCarrierProfile(carrierPath)
108
- ) {
109
- return 'global'
110
- }
111
- if (
112
- (existsSync(join(deepseekDir, 'helloagents')) && homeLinkTarget === runtimeRoot)
113
- || hasHelloagentsMarker(carrierPath)
114
- ) {
115
- return 'standby'
116
- }
117
- return ''
118
- }
119
-
120
93
  export function normalizeHost(value = '') {
121
94
  return HOST_ALIASES.get(String(value || '').toLowerCase()) || ''
122
95
  }
@@ -125,7 +98,6 @@ export function getHostLabel(host) {
125
98
  if (host === 'claude') return 'Claude Code'
126
99
  if (host === 'gemini') return 'Gemini CLI'
127
100
  if (host === 'codex') return 'Codex CLI'
128
- if (host === 'deepseek') return 'DeepSeek TUI'
129
101
  return 'All CLIs'
130
102
  }
131
103
 
@@ -133,6 +105,5 @@ export function detectHostMode(host, runtime) {
133
105
  if (host === 'claude') return detectClaudeMode(runtime.home)
134
106
  if (host === 'gemini') return detectGeminiMode(runtime.home)
135
107
  if (host === 'codex') return detectCodexMode(runtime.home)
136
- if (host === 'deepseek') return detectDeepseekMode(runtime.home)
137
108
  return ''
138
109
  }
@@ -12,7 +12,6 @@ import {
12
12
  loadHooksWithCliEntry,
13
13
  } from './cli-utils.mjs';
14
14
  import { buildRuntimeCarrier, readCarrierSettings } from './cli-runtime-carrier.mjs';
15
- import { installDeepseekGlobal, installDeepseekStandby, uninstallDeepseekGlobal, uninstallDeepseekStandby } from './cli-deepseek.mjs'
16
15
 
17
16
  export function installClaudeStandby(home, pkgRoot) {
18
17
  const claudeDir = join(home, '.claude');
@@ -82,10 +81,3 @@ export function uninstallGeminiStandby(home) {
82
81
 
83
82
  return true;
84
83
  }
85
-
86
- export {
87
- installDeepseekGlobal,
88
- installDeepseekStandby,
89
- uninstallDeepseekGlobal,
90
- uninstallDeepseekStandby,
91
- }
@@ -2,12 +2,8 @@ import { spawnSync } from 'node:child_process'
2
2
 
3
3
  import {
4
4
  installClaudeStandby,
5
- installDeepseekGlobal,
6
- installDeepseekStandby,
7
5
  installGeminiStandby,
8
6
  uninstallClaudeStandby,
9
- uninstallDeepseekGlobal,
10
- uninstallDeepseekStandby,
11
7
  uninstallGeminiStandby,
12
8
  } from './cli-hosts.mjs'
13
9
  import {
@@ -100,10 +96,6 @@ function installHostStandby(runtime, host) {
100
96
  installGeminiStandby(runtime.home, runtime.pkgRoot)
101
97
  return {}
102
98
  }
103
- if (host === 'deepseek') {
104
- installDeepseekStandby(runtime.home, runtime.pkgRoot)
105
- return {}
106
- }
107
99
  if (!installCodexStandby(runtime.home, runtime.pkgRoot)) return { skipped: true }
108
100
  cleanupCodexGlobalResidueForStandby(runtime.home)
109
101
  return {}
@@ -130,10 +122,6 @@ function installHostGlobal(runtime, host) {
130
122
  'Gemini CLI extension auto-install failed. Run manually: gemini extensions install https://github.com/hellowind777/helloagents',
131
123
  )
132
124
  }
133
- if (host === 'deepseek') {
134
- installDeepseekGlobal(runtime.home, runtime.pkgRoot)
135
- return {}
136
- }
137
125
  uninstallCodexStandby(runtime.home)
138
126
  return installCodexGlobal(runtime.home, runtime.pkgRoot) ? {} : { skipped: true }
139
127
  }
@@ -141,7 +129,6 @@ function installHostGlobal(runtime, host) {
141
129
  function cleanupHostStandby(runtime, host) {
142
130
  if (host === 'claude') return { skipped: !uninstallClaudeStandby(runtime.home) }
143
131
  if (host === 'gemini') return { skipped: !uninstallGeminiStandby(runtime.home) }
144
- if (host === 'deepseek') return { skipped: !uninstallDeepseekStandby(runtime.home) }
145
132
  const standbyCleaned = uninstallCodexStandby(runtime.home)
146
133
  const globalResidueCleaned = uninstallCodexGlobal(runtime.home)
147
134
  return { skipped: !(standbyCleaned || globalResidueCleaned) }
@@ -168,7 +155,6 @@ function cleanupHostGlobal(runtime, host) {
168
155
  'Gemini CLI extension auto-remove failed. Run manually: gemini extensions uninstall helloagents',
169
156
  )
170
157
  }
171
- if (host === 'deepseek') return { skipped: !uninstallDeepseekGlobal(runtime.home) }
172
158
  return { skipped: !uninstallCodexGlobal(runtime.home) }
173
159
  }
174
160
 
@@ -194,18 +180,12 @@ function installStandby(runtime) {
194
180
  console.log(runtime.msg(' - Codex CLI 未检测到,跳过', ' - Codex CLI not detected, skipped'))
195
181
  results.codex = { skipped: true }
196
182
  }
197
- if (installDeepseekStandby(runtime.home, runtime.pkgRoot)) {
198
- runtime.ok(runtime.msg('DeepSeek TUI 已配置(standby 模式)', 'DeepSeek TUI configured (standby mode)'))
199
- results.deepseek = {}
200
- } else {
201
- results.deepseek = { skipped: true }
202
- }
203
183
  return results
204
184
  }
205
185
 
206
186
  function installGlobal(runtime) {
207
187
  const results = {}
208
- for (const host of ['claude', 'gemini', 'codex', 'deepseek']) {
188
+ for (const host of ['claude', 'gemini', 'codex']) {
209
189
  const result = installHostGlobal(runtime, host)
210
190
  reportHostAction(runtime, 'install', host, 'global', result)
211
191
  results[host] = result
@@ -223,7 +203,6 @@ export function uninstallAllHosts(runtime) {
223
203
  cleanupHostGlobal(runtime, 'gemini')
224
204
  uninstallCodexStandby(runtime.home)
225
205
  uninstallCodexGlobal(runtime.home)
226
- uninstallDeepseekStandby(runtime.home)
227
206
  }
228
207
 
229
208
  export function runHostLifecycle(runtime, action, host, mode) {
@@ -10,7 +10,7 @@ import {
10
10
  import { installAllHosts, runHostLifecycle, uninstallAllHosts } from './cli-lifecycle-hosts.mjs'
11
11
  import { ensureDir, safeJson, safeWrite } from './cli-utils.mjs'
12
12
 
13
- export const HOSTS = ['claude', 'gemini', 'codex', 'deepseek']
13
+ export const HOSTS = ['claude', 'gemini', 'codex']
14
14
 
15
15
  const runtime = {
16
16
  home: '',
@@ -28,14 +28,28 @@ export function initCliLifecycle(options) {
28
28
  Object.assign(runtime, options)
29
29
  }
30
30
 
31
+ function sanitizeSettings(settings = {}) {
32
+ const next = settings && typeof settings === 'object' ? { ...settings } : {}
33
+ const tracked = next.host_install_modes
34
+ if (!tracked || typeof tracked !== 'object' || Array.isArray(tracked)) {
35
+ next.host_install_modes = {}
36
+ return next
37
+ }
38
+ next.host_install_modes = Object.fromEntries(
39
+ Object.entries(tracked).filter(([host, mode]) => HOSTS.includes(host) && typeof mode === 'string' && mode),
40
+ )
41
+ return next
42
+ }
43
+
31
44
  export function readSettings(shouldEnsure = false) {
32
45
  if (shouldEnsure) ensureConfig(runtime.helloagentsHome, runtime.configFile, safeJson, ensureDir)
33
- return safeJson(runtime.configFile) || {}
46
+ return sanitizeSettings(safeJson(runtime.configFile) || {})
34
47
  }
35
48
 
36
49
  function writeSettings(settings) {
50
+ const sanitized = sanitizeSettings(settings)
37
51
  ensureDir(runtime.helloagentsHome)
38
- writeFileSync(runtime.configFile, JSON.stringify(settings, null, 2), 'utf-8')
52
+ writeFileSync(runtime.configFile, JSON.stringify(sanitized, null, 2), 'utf-8')
39
53
  }
40
54
 
41
55
  function hasTrackedHostModes(settings) {
@@ -19,18 +19,6 @@ function codexGlobalStatus({ home, msg }) {
19
19
  : msg('安装 Codex CLI 后重新运行 npm install -g helloagents', 'Install Codex CLI then re-run npm install -g helloagents')
20
20
  }
21
21
 
22
- function deepseekStandbyStatus({ home, msg }) {
23
- return existsSync(join(home, '.deepseek'))
24
- ? msg('已自动配置(~/.deepseek/AGENTS.md)', 'Auto-configured (~/.deepseek/AGENTS.md)')
25
- : msg('安装 DeepSeek TUI 后重新运行 npm install -g helloagents', 'Install DeepSeek TUI then re-run npm install -g helloagents')
26
- }
27
-
28
- function deepseekGlobalStatus({ home, msg }) {
29
- return existsSync(join(home, '.deepseek'))
30
- ? msg('已自动切到受管全局载体(~/.deepseek/AGENTS.md)', 'Managed global carrier applied (~/.deepseek/AGENTS.md)')
31
- : msg('安装 DeepSeek TUI 后重新运行 npm install -g helloagents', 'Install DeepSeek TUI then re-run npm install -g helloagents')
32
- }
33
-
34
22
  function pluginCommands() {
35
23
  return [
36
24
  ' Claude Code: /plugin marketplace add hellowind777/helloagents',
@@ -61,24 +49,24 @@ function renderInstallMessage(context, mode, state) {
61
49
  if (mode === 'global') {
62
50
  if (install) {
63
51
  return msg(
64
- `\n ✅ HelloAGENTS 已安装(global 模式)!\n\n Claude Code / Gemini CLI: 已自动尝试宿主原生插件/扩展安装\n Codex: ${codexGlobalStatus(context)}(~/.agents/plugins/marketplace.json + ~/plugins/helloagents)\n DeepSeek TUI: ${deepseekGlobalStatus(context)}\n\n ${restartHint(msg)}\n\n 若宿主命令不可用,请手动执行:\n${pluginCommands()}\n\n 切换模式:\n helloagents --standby 标准模式(默认,非插件安装)`,
65
- `\n ✅ HelloAGENTS installed (global mode)!\n\n Claude Code / Gemini CLI: native plugin/extension install attempted automatically\n Codex: ${codexGlobalStatus(context)} (~/.agents/plugins/marketplace.json + ~/plugins/helloagents)\n DeepSeek TUI: ${deepseekGlobalStatus(context)}\n\n ${restartHint(msg)}\n\n If a host command is unavailable, run manually:\n${pluginCommands()}\n\n Switch modes:\n helloagents --standby Standby mode (default, non-plugin install)`,
52
+ `\n ✅ HelloAGENTS 已安装(global 模式)!\n\n Claude Code / Gemini CLI: 已自动尝试宿主原生插件/扩展安装\n Codex: ${codexGlobalStatus(context)}(~/.agents/plugins/marketplace.json + ~/plugins/helloagents)\n\n ${restartHint(msg)}\n\n 若宿主命令不可用,请手动执行:\n${pluginCommands()}\n\n 切换模式:\n helloagents --standby 标准模式(默认,非插件安装)`,
53
+ `\n ✅ HelloAGENTS installed (global mode)!\n\n Claude Code / Gemini CLI: native plugin/extension install attempted automatically\n Codex: ${codexGlobalStatus(context)} (~/.agents/plugins/marketplace.json + ~/plugins/helloagents)\n\n ${restartHint(msg)}\n\n If a host command is unavailable, run manually:\n${pluginCommands()}\n\n Switch modes:\n helloagents --standby Standby mode (default, non-plugin install)`,
66
54
  )
67
55
  }
68
56
  return msg(
69
57
  refresh
70
- ? ` global 模式已刷新。\n Claude Code / Gemini 已自动尝试刷新宿主插件/扩展;Codex 原生本地插件已重装并同步最新文件;DeepSeek TUI 受管全局载体已同步。\n ${restartHint(msg)}`
71
- : ` 所有项目将自动启用完整 HelloAGENTS 规则。\n Claude Code / Gemini 已自动尝试安装宿主插件/扩展;Codex 已自动安装原生本地插件;DeepSeek TUI 已切到受管全局载体。\n ${restartHint(msg)}\n\n若宿主命令不可用,请手动执行:\n${pluginCommands()}`,
58
+ ? ` global 模式已刷新。\n Claude Code / Gemini 已自动尝试刷新宿主插件/扩展;Codex 原生本地插件已重装并同步最新文件。\n ${restartHint(msg)}`
59
+ : ` 所有项目将自动启用完整 HelloAGENTS 规则。\n Claude Code / Gemini 已自动尝试安装宿主插件/扩展;Codex 已自动安装原生本地插件。\n ${restartHint(msg)}\n\n若宿主命令不可用,请手动执行:\n${pluginCommands()}`,
72
60
  refresh
73
- ? ` Global mode refreshed.\n Claude Code / Gemini native plugin/extension refresh was attempted automatically; Codex native local-plugin files were reinstalled and synced; the managed DeepSeek TUI global carrier was refreshed.\n ${restartHint(msg)}`
74
- : ` All projects will use full HelloAGENTS rules.\n Claude Code / Gemini native plugin/extension install was attempted automatically; Codex now uses the native local-plugin path automatically; DeepSeek TUI now uses the managed global carrier.\n ${restartHint(msg)}\n\nIf a host command is unavailable, run manually:\n${pluginCommands()}`,
61
+ ? ` Global mode refreshed.\n Claude Code / Gemini native plugin/extension refresh was attempted automatically; Codex native local-plugin files were reinstalled and synced.\n ${restartHint(msg)}`
62
+ : ` All projects will use full HelloAGENTS rules.\n Claude Code / Gemini native plugin/extension install was attempted automatically; Codex now uses the native local-plugin path automatically.\n ${restartHint(msg)}\n\nIf a host command is unavailable, run manually:\n${pluginCommands()}`,
75
63
  )
76
64
  }
77
65
 
78
66
  if (install) {
79
67
  return msg(
80
- `\n ✅ HelloAGENTS 已安装(standby 模式)!\n\n Claude Code: 已自动配置(~/.claude/CLAUDE.md + hooks)\n Gemini CLI: 已自动配置(~/.gemini/GEMINI.md)\n Codex: ${codexStandbyStatus(context)}\n DeepSeek TUI: ${deepseekStandbyStatus(context)}\n\n ${restartHint(msg)}\n\n standby 模式下,hello-* 技能不会自动触发。\n 在项目中使用 ~wiki 或 ~init 仅创建/同步知识库;用 ~global 初始化项目级全局模式;也可用 ~command 按需调用。\n\n 切换模式:\n helloagents --global 项目级全局模式(自动尝试 Claude/Gemini 插件或扩展;Codex 自动装原生本地插件;DeepSeek 使用受管 AGENTS 载体)`,
81
- `\n ✅ HelloAGENTS installed (standby mode)!\n\n Claude Code: Auto-configured (~/.claude/CLAUDE.md + hooks)\n Gemini CLI: Auto-configured (~/.gemini/GEMINI.md)\n Codex: ${codexStandbyStatus(context)}\n DeepSeek TUI: ${deepseekStandbyStatus(context)}\n\n ${restartHint(msg)}\n\n In standby mode, hello-* skills won't auto-trigger.\n Use ~wiki or ~init to create or sync the KB only; use ~global to initialize project-level global mode; ~command stays available on demand.\n\n Switch modes:\n helloagents --global Project-level global mode (auto-attempts Claude/Gemini plugins or extensions; native local plugin auto-install for Codex; DeepSeek uses a managed AGENTS carrier)`,
68
+ `\n ✅ HelloAGENTS 已安装(standby 模式)!\n\n Claude Code: 已自动配置(~/.claude/CLAUDE.md + hooks)\n Gemini CLI: 已自动配置(~/.gemini/GEMINI.md)\n Codex: ${codexStandbyStatus(context)}\n\n ${restartHint(msg)}\n\n standby 模式下,hello-* 技能不会自动触发。\n 在项目中使用 ~wiki 或 ~init 仅创建/同步知识库;用 ~global 初始化项目级全局模式;也可用 ~command 按需调用。\n\n 切换模式:\n helloagents --global 项目级全局模式(自动尝试 Claude/Gemini 插件或扩展;Codex 自动装原生本地插件)`,
69
+ `\n ✅ HelloAGENTS installed (standby mode)!\n\n Claude Code: Auto-configured (~/.claude/CLAUDE.md + hooks)\n Gemini CLI: Auto-configured (~/.gemini/GEMINI.md)\n Codex: ${codexStandbyStatus(context)}\n\n ${restartHint(msg)}\n\n In standby mode, hello-* skills won't auto-trigger.\n Use ~wiki or ~init to create or sync the KB only; use ~global to initialize project-level global mode; ~command stays available on demand.\n\n Switch modes:\n helloagents --global Project-level global mode (auto-attempts Claude/Gemini plugins or extensions; native local plugin auto-install for Codex)`,
82
70
  )
83
71
  }
84
72
 
@@ -102,17 +90,17 @@ HelloAGENTS v${pkgVersion} — The orchestration kernel for AI CLIs
102
90
  helloagents-js ${msg('(受管宿主配置的跨平台稳定入口)', '(cross-platform stable entrypoint for managed host configs)')}
103
91
 
104
92
  ${msg('模式切换', 'Mode switching')}:
105
- helloagents --global ${msg('项目级全局模式(自动尝试 Claude/Gemini 插件或扩展;Codex 自动装原生本地插件;DeepSeek 使用受管 AGENTS 载体)', 'Project-level global mode (auto-attempts Claude/Gemini plugins or extensions; native local plugin auto-install for Codex; DeepSeek uses a managed AGENTS carrier)')}
93
+ helloagents --global ${msg('项目级全局模式(自动尝试 Claude/Gemini 插件或扩展;Codex 自动装原生本地插件)', 'Project-level global mode (auto-attempts Claude/Gemini plugins or extensions; native local plugin auto-install for Codex)')}
106
94
  helloagents --standby ${msg('标准模式(非插件安装,hello-* 不自动触发,默认)', "Standby mode (non-plugin install, hello-* won't auto-trigger, default)")}
107
95
 
108
96
  ${msg('单 CLI 管理', 'Scoped CLI management')}:
109
97
  helloagents install codex --standby
110
- helloagents install deepseek --standby
98
+ helloagents install gemini --standby
111
99
  helloagents install --all --global
112
100
  helloagents update codex
113
101
  helloagents cleanup claude --global
114
102
  helloagents uninstall gemini
115
- ${msg('支持: claude | gemini | codex | deepseek | --all;省略模式时优先沿用该 CLI 已记录/已检测的模式,否则回退 standby', 'Hosts: claude | gemini | codex | deepseek | --all; omit mode to reuse the tracked/detected mode for that CLI, then fall back to standby')}
103
+ ${msg('支持: claude | gemini | codex | --all;省略模式时优先沿用该 CLI 已记录/已检测的模式,否则回退 standby', 'Hosts: claude | gemini | codex | --all; omit mode to reuse the tracked/detected mode for that CLI, then fall back to standby')}
116
104
 
117
105
  ${msg('分支切换', 'Branch switching')}:
118
106
  helloagents switch-branch beta
@@ -123,7 +111,7 @@ ${msg('分支切换', 'Branch switching')}:
123
111
  ${msg('诊断', 'Diagnostics')}:
124
112
  helloagents doctor
125
113
  helloagents doctor codex --json
126
- ${msg('检查 carrier、链接、hooks、配置注入、Codex 插件安装、DeepSeek 原生 doctor 摘要、受管 model_instructions_file 指向、Codex hook trust 本机状态与版本漂移', 'Checks carriers, links, hooks, config injections, Codex plugin installation, DeepSeek native doctor summaries, managed model_instructions_file targeting, machine-local Codex hook trust state, and version drift')}
114
+ ${msg('检查 carrier、链接、hooks、配置注入、Codex 插件安装、受管 model_instructions_file 指向、Codex hook trust 本机状态与版本漂移', 'Checks carriers, links, hooks, config injections, Codex plugin installation, managed model_instructions_file targeting, machine-local Codex hook trust state, and version drift')}
127
115
 
128
116
  ${msg('Codex /goal', 'Codex /goal')}:
129
117
  helloagents codex goals status
package/scripts/guard.mjs CHANGED
@@ -133,7 +133,7 @@ function buildPostWriteWarnings(data) {
133
133
  const filePath = data.tool_input?.file_path || ''
134
134
  return [
135
135
  ...(detectIdeaBoundaryContext(data)?.zeroSideEffect
136
- ? ['~idea 本轮要求只读探索;检测到写入文件的工具调用,请回到探索输出,或升级到 ~plan / ~build / ~prd / ~auto 后再修改文件']
136
+ ? ['~idea 当前任务要求只读探索;检测到写入文件的工具调用,请回到探索输出,或升级到 ~plan / ~build / ~prd / ~auto 后再修改文件']
137
137
  : []),
138
138
  ...scanUnrequestedFiles(filePath, data.tool_name),
139
139
  ...(content ? [...scanForSecrets(content), ...scanDangerousPackages(content, filePath)] : []),
@@ -34,7 +34,7 @@ function buildReadRootBlock(readRoot) {
34
34
  turnStateCommand: 'helloagents-turn-state write --kind complete --role main',
35
35
  turnStateUsage: '仅在运行时需要识别完成、等待或阻塞时调用;普通问答不调用',
36
36
  };
37
- return `## 本轮 HelloAGENTS 读取根目录\n\`\`\`json\n${JSON.stringify(block, null, 2)}\n\`\`\``;
37
+ return `## 当前对话 HelloAGENTS 读取根目录\n\`\`\`json\n${JSON.stringify(block, null, 2)}\n\`\`\``;
38
38
  }
39
39
 
40
40
  export function resolveCanonicalCommandSkill(skillName) {
@@ -11,7 +11,6 @@ export function shouldIgnoreFormattedSubagent(lastMsg, outputFormatEnabled) {
11
11
  export function resolveNotifyHost(argv = []) {
12
12
  const args = Array.from(argv, (value) => String(value || ''));
13
13
  const command = args[2] || args[0] || '';
14
- if (args.includes('--deepseek')) return 'deepseek';
15
14
  if (args.includes('--gemini')) return 'gemini';
16
15
  if (args.includes('--codex') || command === 'codex-notify') return 'codex';
17
16
  return 'claude';
@@ -6,7 +6,6 @@ const HOST_LABELS = {
6
6
  codex: 'Codex',
7
7
  claude: 'Claude Code',
8
8
  gemini: 'Gemini',
9
- deepseek: 'DeepSeek TUI',
10
9
  }
11
10
 
12
11
  function normalizePath(filePath = '') {
@@ -5,7 +5,7 @@ import { resolveProjectPlanDir } from './project-storage.mjs'
5
5
 
6
6
  export const PLAN_CONTRACT_FILE_NAME = 'contract.json'
7
7
  const VALID_VERIFY_MODES = new Set(['test-first', 'review-first'])
8
- const VALID_ADVISOR_SOURCES = new Set(['claude', 'codex', 'gemini', 'deepseek'])
8
+ const VALID_ADVISOR_SOURCES = new Set(['claude', 'codex', 'gemini'])
9
9
 
10
10
  function normalizeStringArray(values) {
11
11
  if (!Array.isArray(values)) return []
@@ -146,7 +146,7 @@ export function getProjectRoot(cwd) {
146
146
 
147
147
  function getCarrierPathForRoot(root, host = '') {
148
148
  if (!root) return ''
149
- if (host === 'codex' || host === 'deepseek') return join(root, 'AGENTS.md')
149
+ if (host === 'codex') return join(root, 'AGENTS.md')
150
150
  if (host === 'gemini') return join(root, '.gemini', 'GEMINI.md')
151
151
  return join(root, 'CLAUDE.md')
152
152
  }
@@ -39,7 +39,7 @@ function buildBlockReason(routeContext, detail, cwd) {
39
39
  const commandLabel = `~${routeContext.skillName}`
40
40
  const workflowHint = buildWorkflowHint(cwd)
41
41
  return [
42
- `[HelloAGENTS Runtime] 显式 ${commandLabel} 本轮不应直接停下。`,
42
+ `[HelloAGENTS Runtime] 显式 ${commandLabel} 当前对话不应直接停下。`,
43
43
  detail,
44
44
  workflowHint,
45
45
  '若无真实阻塞,请继续沿当前路径执行。',
@@ -74,7 +74,7 @@ function validateFormattedCloseoutMessage(routeContext, payload, cwd) {
74
74
  if (!firstNonEmptyLine || !/^[💡⚡🔵✅❓⚠️❌]【HelloAGENTS】- /.test(firstNonEmptyLine)) {
75
75
  return buildBlockReason(
76
76
  routeContext,
77
- '最终收尾消息使用了 HelloAGENTS 外层格式,但首个非空行不是规范标题行。',
77
+ '最终回复使用了 HelloAGENTS 外层格式,但首个非空行不是规范标题行。',
78
78
  cwd,
79
79
  )
80
80
  }
@@ -82,7 +82,7 @@ function validateFormattedCloseoutMessage(routeContext, payload, cwd) {
82
82
  if (countMatches(message, /[💡⚡🔵✅❓⚠️❌]【HelloAGENTS】-/g) > 1) {
83
83
  return buildBlockReason(
84
84
  routeContext,
85
- '最终收尾消息重复输出了 HelloAGENTS 标题;请把所有内容合并到同一个外层块内。',
85
+ '最终回复重复输出了 HelloAGENTS 标题;请把所有内容合并到同一个外层块内。',
86
86
  cwd,
87
87
  )
88
88
  }
@@ -90,7 +90,7 @@ function validateFormattedCloseoutMessage(routeContext, payload, cwd) {
90
90
  if (countMatches(message, /^🔄 下一步:/gm) > 1) {
91
91
  return buildBlockReason(
92
92
  routeContext,
93
- '最终收尾消息重复输出了 `🔄 下一步`;请只保留一个真实下一步。',
93
+ '最终回复重复输出了 `🔄 下一步`;请只保留一个真实下一步。',
94
94
  cwd,
95
95
  )
96
96
  }
@@ -140,7 +140,7 @@ function validateTurnState(routeContext, turnState, cwd, payload = {}) {
140
140
  cwd,
141
141
  )
142
142
  }
143
- return buildBlockReason(routeContext, `当前 turn-state 为 \`${turnState.kind}\`,不能作为本轮结束状态。`, cwd)
143
+ return buildBlockReason(routeContext, `当前 turn-state 为 \`${turnState.kind}\`,不能作为当前对话结束状态。`, cwd)
144
144
  }
145
145
 
146
146
  export function evaluateTurnStopGate(payload = {}) {
@@ -15,7 +15,7 @@ Trigger: ~auto <任务描述>
15
15
  - `T3` 高风险或不可逆操作默认不直接进入 `~build`;优先先走 `~plan` 或 `~prd`,纯审查/纯验证请求才可先进入 `~verify`
16
16
  - 主路径一旦确定,立即读取对应 command skill,并在阶段完成后继续执行后续阶段,避免同一任务重复探索或重复等待
17
17
  - 选路不替代授权;涉及外部副作用或高风险不可逆操作时,仍遵守 HelloAGENTS 阻塞判定与确认规则
18
- - 用户显式使用 `~auto`,表示已授权在当前任务边界内沿选定主路径持续执行;若本轮运行在 Codex `/goal` 下,`/goal` 只提供长程续跑与预算,`~auto` 仍按方案包、`state_path` 与验证契约推进;`~plan` / `~prd` 作为中间阶段时,不再额外询问“是否开始执行”,除非仍有真实阻塞;不得把 `🔄 下一步` 当作阶段交接或继续执行占位
18
+ - 用户显式使用 `~auto`,表示已授权在当前任务边界内沿选定主路径持续执行;若当前运行在 Codex `/goal` 下,`/goal` 只提供长程续跑与预算,`~auto` 仍按方案包、`state_path` 与验证契约推进;`~plan` / `~prd` 作为中间阶段时,不再额外询问“是否开始执行”,除非仍有真实阻塞;不得把 `🔄 下一步` 当作阶段交接或继续执行占位
19
19
  - 优先消费当前上下文中已注入的 ROUTE / TIER、当前工作流约束与项目状态;不要在 `~auto` 内另建一套关键词路由表
20
20
 
21
21
  ## 流程
@@ -33,7 +33,7 @@ Trigger: ~auto <任务描述>
33
33
  ### 1. 选路
34
34
 
35
35
  - 先按当前上下文里已注入的 ROUTE / TIER 语义约束判断,不依赖关键词命中做机械分流
36
- - 若本轮没有足够的注入约束,再结合以下信号补足判断:影响范围、风险等级、是否需要结构化产物、是否已有活跃方案包、用户是否只想先比较方向
36
+ - 若当前上下文没有足够的注入约束,再结合以下信号补足判断:影响范围、风险等级、是否需要结构化产物、是否已有活跃方案包、用户是否只想先比较方向
37
37
  - 选路优先级:
38
38
  - 纯探索 / 点子 / 方向比较 → `~idea`
39
39
  - 明确要求验证 / 审查 / 跑检查 → `~verify`
@@ -20,15 +20,15 @@ Trigger: ~build [description]
20
20
 
21
21
  ### 1. 恢复与定位
22
22
 
23
- - 优先按当前已加载的 HelloAGENTS 规则恢复当前任务,并遵循“.helloagents/ 文件读取优先级”;若当前消息明确要继续上次任务、会话刚经历恢复 / 压缩,或本轮运行在 Codex active goal 下,先读取 `state_path`,再用当前用户消息、活跃方案包 / PRD 与代码事实确认当前任务
23
+ - 优先按当前已加载的 HelloAGENTS 规则恢复当前任务,并遵循“.helloagents/ 文件读取优先级”;若当前消息明确要继续上次任务、会话刚经历恢复 / 压缩,或当前运行在 Codex active goal 下,先读取 `state_path`,再用当前用户消息、活跃方案包 / PRD 与代码事实确认当前任务
24
24
  - 若存在最近的活跃方案包,读取对应的:
25
25
  - `requirements.md`
26
26
  - `plan.md`
27
27
  - `tasks.md`
28
28
  - `contract.json`
29
- - 实现时优先把 `tasks.md` 中每个任务的“完成标准”当作本轮实现约束,不要只按任务标题猜测范围
29
+ - 实现时优先把 `tasks.md` 中每个任务的“完成标准”当作本次实现约束,不要只按任务标题猜测范围
30
30
  - `contract.json` 存在时,优先按其中的 `verifyMode`、`reviewerFocus`、`testerFocus` 理解后续验证边界
31
- - 若本轮运行在 Codex active goal 下,按 `tasks.md` 未完成项、`contract.json` 与 `state_path` 恢复实现位置;不要自动创建新 goal,也不要把 goal 目标原文替代方案包
31
+ - 若当前运行在 Codex active goal 下,按 `tasks.md` 未完成项、`contract.json` 与 `state_path` 恢复实现位置;不要自动创建新 goal,也不要把 goal 目标原文替代方案包
32
32
  - 若当前上下文中已注入“当前工作流约束”或“当前推荐下一命令”,先服从它;只有推荐仍为 `~build`,或用户明确提出新增实现范围时,才继续 `~build`
33
33
  - 其余项目知识库与相关代码文件,按 HelloAGENTS 项目上下文要求读取
34
34
  - 若任务涉及 UI,按以下优先级读取并遵循:当前活跃 `plan.md` / PRD 中的 UI 决策 > 逻辑 `.helloagents/DESIGN.md`(实际路径按当前项目存储模式解析) > 已读取的 `hello-ui` 规则;同时所有 UI 任务都必须满足 UI 质量基线
@@ -24,7 +24,7 @@ Trigger: ~global
24
24
  - `.codex/skills/helloagents` symlink → `{插件根目录}/`
25
25
  这些链接用于项目级规则定位 HelloAGENTS 的 `skills/`、`templates/` 和 `scripts/`;宿主若支持递归发现 `SKILL.md`,也可直接识别包内 skills。
26
26
  4. 读取 `{插件根目录}` 中的全量规则模板,在受管内容第一行写入 `<!-- HELLOAGENTS_PROFILE: full -->`,再用 `<!-- HELLOAGENTS_START -->` / `<!-- HELLOAGENTS_END -->` 标记包裹后写入:
27
- - `AGENTS.md`(项目根目录,Codex 与 DeepSeek TUI 读取)
27
+ - `AGENTS.md`(项目根目录,Codex 读取)
28
28
  - `CLAUDE.md`(项目根目录,Claude Code 读取)
29
29
  - `.gemini/GEMINI.md`(Gemini CLI 读取,需先创建 .gemini/ 目录)
30
30
  注意:如果文件已存在且包含标记,替换标记内的内容;如果文件已存在但无标记,追加到末尾;如果文件不存在,创建新文件
@@ -44,14 +44,14 @@ Trigger: ~help
44
44
  如果当前 CLI 存在工作区限制导致家目录不可读,则明确说明“无法直接读取配置文件,以下按已注入设置或默认值展示”,不要改用无关工具或伪造已读取结果。
45
45
  | 配置项 | 默认值 | 作用 | 适用 CLI |
46
46
  |--------|-------|------|---------|
47
- | output_language | "" | 空=跟随用户语言/填写则指定(如 zh-CN、en) | Claude Code + Gemini CLI + Codex CLI + DeepSeek TUI |
48
- | output_format | true | true=主代理最终收尾必须使用 HelloAGENTS 格式,流式/中间输出及子代理输出保持自然;false=自然输出 | Claude Code + Gemini CLI + Codex CLI + DeepSeek TUI |
49
- | notify_level | 0 | 0=关闭/1=桌面通知/2=声音/3=两者 | Claude Code + Gemini CLI + Codex CLI + DeepSeek TUI |
50
- | ralph_loop_enabled | true | 自动验证循环(显式 ~verify / ~loop 或收尾要求时触发 lint/test/build) | Claude Code + Gemini CLI + Codex CLI + DeepSeek TUI |
51
- | guard_enabled | true | 阻断危险命令与写入后的安全扫描 | Claude Code + Gemini CLI + Codex CLI + DeepSeek TUI |
52
- | kb_create_mode | 1 | 0=关闭/1=知识库已存在时自动同步/2=编码任务在知识库已存在或全局模式下自动创建或同步 | Claude Code + Gemini CLI + Codex CLI + DeepSeek TUI |
53
- | project_store_mode | "local" | "local"=知识库/方案包保留在项目本地 `.helloagents/`;"repo-shared"=本地 `.helloagents/` 仅保留项目本地状态/运行态,知识库与方案包改写到 `~/.helloagents/projects/<repo-key>/` | Claude Code + Gemini CLI + Codex CLI + DeepSeek TUI |
54
- | auto_commit_enabled | true | true=验证完成且有变更时自动执行本地提交;false=跳过自动提交,仍可手动用 `~commit` | Claude Code + Gemini CLI + Codex CLI + DeepSeek TUI |
55
- | commit_attribution | "" | 空=不添加/填写内容则添加到 commit message | Claude Code + Gemini CLI + Codex CLI + DeepSeek TUI |
56
- | install_mode | "standby" | 当前默认安装模式 | Claude Code + Gemini CLI + Codex CLI + DeepSeek TUI |
57
- | host_install_modes | {} | 单 CLI 模式记录,优先于 install_mode | Claude Code + Gemini CLI + Codex CLI + DeepSeek TUI |
47
+ | output_language | "" | 空=跟随用户语言/填写则指定(如 zh-CN、en) | Claude Code + Gemini CLI + Codex CLI |
48
+ | output_format | true | true=主代理最终回复必须使用 HelloAGENTS 格式,流式/中间输出及子代理输出保持自然;false=自然输出 | Claude Code + Gemini CLI + Codex CLI |
49
+ | notify_level | 0 | 0=关闭/1=桌面通知/2=声音/3=两者 | Claude Code + Gemini CLI + Codex CLI |
50
+ | ralph_loop_enabled | true | 自动验证循环(显式 ~verify / ~loop 或收尾要求时触发 lint/test/build) | Claude Code + Gemini CLI + Codex CLI |
51
+ | guard_enabled | true | 阻断危险命令与写入后的安全扫描 | Claude Code + Gemini CLI + Codex CLI |
52
+ | kb_create_mode | 1 | 0=关闭/1=知识库已存在时自动同步/2=编码任务在知识库已存在或全局模式下自动创建或同步 | Claude Code + Gemini CLI + Codex CLI |
53
+ | project_store_mode | "local" | "local"=知识库/方案包保留在项目本地 `.helloagents/`;"repo-shared"=本地 `.helloagents/` 仅保留项目本地状态/运行态,知识库与方案包改写到 `~/.helloagents/projects/<repo-key>/` | Claude Code + Gemini CLI + Codex CLI |
54
+ | auto_commit_enabled | true | true=验证完成且有变更时自动执行本地提交;false=跳过自动提交,仍可手动用 `~commit` | Claude Code + Gemini CLI + Codex CLI |
55
+ | commit_attribution | "" | 空=不添加/填写内容则添加到 commit message | Claude Code + Gemini CLI + Codex CLI |
56
+ | install_mode | "standby" | 当前默认安装模式 | Claude Code + Gemini CLI + Codex CLI |
57
+ | host_install_modes | {} | 单 CLI 模式记录,优先于 install_mode | Claude Code + Gemini CLI + Codex CLI |
@@ -37,7 +37,7 @@ iteration commit metric delta guard status description
37
37
 
38
38
  `~loop` 的八阶段循环是统一执行流程(ROUTE/TIER→SPEC→PLAN→BUILD→VERIFY→CONSOLIDATE)在迭代优化场景下的特化形式。每轮迭代的“修改”阶段遵循已标记的 hello-* 质量技能规范,“验证”阶段遵循 hello-verify 的验证规范。
39
39
  执行 `~loop` 时,涉及公共阶段边界、阻塞判定与收尾要求的部分,仍按当前已加载的 HelloAGENTS 规则执行;本 skill 负责补充 loop 场景的迭代顺序与回滚规则。
40
- 若本轮运行在 Codex `/goal` 下,`/goal` 只作为外层长程续跑与预算控制;`~loop` 仍负责指标、守卫、实验提交、keep/revert、results log、`state_path` 与收尾验证,不把 `/goal` 当成循环逻辑本身。
40
+ 若当前运行在 Codex `/goal` 下,`/goal` 只作为外层长程续跑与预算控制;`~loop` 仍负责指标、守卫、实验提交、keep/revert、results log、`state_path` 与收尾验证,不把 `/goal` 当成循环逻辑本身。
41
41
 
42
42
  除非达到迭代上限或命中阻塞判定,否则继续执行,不额外询问是否继续,也不把 `🔄 下一步` 当作单轮结果或继续执行占位。
43
43
  每轮迭代必须完整走完以下八个阶段:
@@ -102,7 +102,7 @@ Trigger: ~plan [description]
102
102
 
103
103
  如果用户已明确表示继续执行,则视为授权成立,可直接继续执行。
104
104
  如果当前任务来自 `~auto`,且方案包已足够支撑实现、也未命中阻塞判定,则默认直接进入 `~build`,不再追加一次“是否开始执行”的询问。
105
- 如果当前任务是显式 `~plan` 或 `~design`,且尚未获得执行授权,最终收尾按通用输出格式使用等待输入态:正文说明方案包与验证结果,`🔄 下一步` 写清待确认动作。
105
+ 如果当前任务是显式 `~plan` 或 `~design`,且尚未获得执行授权,最终回复按通用输出格式使用等待输入态:正文说明方案包与验证结果,`🔄 下一步` 写清待确认动作。
106
106
 
107
107
  ## 方案包要求
108
108
 
@@ -121,7 +121,7 @@ c. AI 总结该维度的决策结果,进入下一个维度
121
121
 
122
122
  如果用户已对当前 PRD 或继续执行作出明确同意,视为执行授权成立,可直接进入执行,或按需先补一轮 `~plan` 明确实现方案。
123
123
  如果当前任务来自 `~auto`,且 PRD 已整理成可执行任务、也未命中阻塞判定,则默认继续进入 `~build`,必要时先补一轮轻量 `~plan`,不再额外询问一次“是否开始执行”。
124
- 如果当前任务是显式 `~prd`,且尚未获得执行授权,最终收尾按通用输出格式使用等待输入态:正文说明 PRD / 任务 / 契约结果,`🔄 下一步` 写清待确认动作。
124
+ 如果当前任务是显式 `~prd`,且尚未获得执行授权,最终回复按通用输出格式使用等待输入态:正文说明 PRD / 任务 / 契约结果,`🔄 下一步` 写清待确认动作。
125
125
 
126
126
  ### 6. 继续执行
127
127
 
@@ -11,7 +11,7 @@ Trigger: ~test [scope]
11
11
  1. 确定测试范围:
12
12
  - 无参数:为最近变更的文件编写测试
13
13
  - 指定文件/模块:为指定范围编写测试
14
- - Codex active goal 下无参数:从 `tasks.md` 未完成项、`contract.json` 与 `state_path` 推导本轮测试范围
14
+ - Codex active goal 下无参数:从 `tasks.md` 未完成项、`contract.json` 与 `state_path` 推导本次测试范围
15
15
  2. 按 hello-* 技能查找路径读取 hello-test SKILL.md,按其 TDD 规范和边界用例要求编写测试
16
16
  3. 运行测试确认全部通过
17
17
  4. 同步直接相关的任务状态,报告覆盖情况和遗漏;测试通过只作为 goal 交付证据,不直接标记 goal complete
@@ -12,13 +12,13 @@ Trigger: ~verify [scope]
12
12
  - 若当前上下文中已注入“当前工作流约束”或“当前推荐下一命令”,先服从它
13
13
  - 即使命令通过,也不能越过当前方案包边界:不完整方案包不能视为可信交付记录,未闭合方案包不能被整体报告为已完成
14
14
  - 当推荐路径已进入 `~verify` / 收尾时,优先把本命令用于审查、验真和交付收尾
15
- - 若当前存在活跃方案包,先读取 `requirements.md`、`plan.md`、`tasks.md`、`contract.json`,把它们当作本轮验证契约;不要只看命令结果
16
- - 若本轮运行在 Codex active goal 下,按 active goal 关联方案包和 `state_path` 复核范围;`/goal` 只负责续跑,不改变验证契约
17
- - 若 `contract.json` 声明 `advisor.required=true` 或 `ui.styleAdvisor.required=true`,则本轮还必须补齐当前会话 `artifacts/advisor.json`;advisor / style advisor 都是可选能力,不是默认常驻步骤
18
- - 若 `contract.json` 声明 `ui.visualValidation.required=true`,则本轮还必须补齐当前会话 `artifacts/visual.json`;视觉验收优先用截图/浏览器工具,没有工具时才降级为结构化代码级自检
15
+ - 若当前存在活跃方案包,先读取 `requirements.md`、`plan.md`、`tasks.md`、`contract.json`,把它们当作当前验证契约;不要只看命令结果
16
+ - 若当前运行在 Codex active goal 下,按 active goal 关联方案包和 `state_path` 复核范围;`/goal` 只负责续跑,不改变验证契约
17
+ - 若 `contract.json` 声明 `advisor.required=true` 或 `ui.styleAdvisor.required=true`,则本次验证还必须补齐当前会话 `artifacts/advisor.json`;advisor / style advisor 都是可选能力,不是默认常驻步骤
18
+ - 若 `contract.json` 声明 `ui.visualValidation.required=true`,则本次验证还必须补齐当前会话 `artifacts/visual.json`;视觉验收优先用截图/浏览器工具,没有工具时才降级为结构化代码级自检
19
19
  1. 先决定验证分流:
20
20
  - 若当前上下文中已注入“验证分流”,先按该分流执行
21
- - 用户显式使用 `~review` 时,即使本轮没有注入分流,也按审查优先起步
21
+ - 用户显式使用 `~review` 时,即使当前没有注入分流,也按审查优先起步
22
22
  - 若没有注入分流、也不是 `~review`,默认先做全量验证;执行中一旦发现高风险流程、关键权限/配置/迁移/发布边界或明显未覆盖的风险点,立即补做 `hello-review`
23
23
  2. 审查优先模式:
24
24
  - 获取变更范围:无参数默认未提交变更;`staged` 代表暂存区;指定文件/目录则只审查对应范围
@@ -32,7 +32,7 @@ description: 审查代码变更、检查 PR、review 代码质量,或用户要
32
32
  - 审查结束时必须单独给出一行“审查结论:...”
33
33
  - 若发现阻塞问题,结论中明确写出存在问题,并在正文中为每个问题附文件定位
34
34
  - 若未发现阻塞问题,明确写“审查结论:未发现阻塞问题。”
35
- - 若当前项目已初始化,或本轮审查结果需要进入后续交付检查或收尾,审查结论确定后立即调用 `scripts/review-state.mjs write` 写当前会话 `artifacts/review.json`
35
+ - 若当前项目已初始化,或当前审查结果需要进入后续交付检查或收尾,审查结论确定后立即调用 `scripts/review-state.mjs write` 写当前会话 `artifacts/review.json`
36
36
  - `artifacts/review.json` 必须使用结构化字段记录:`outcome`(`clean` / `findings`)、`conclusion`、`findings`、`fileReferences`
37
37
  - 不要依赖“审查结论:...”这行让运行时再从自然语言里猜机器结论;这行只服务于人类阅读
38
38
 
@@ -18,7 +18,7 @@ description: 使用子代理执行任务、并行开发、分派工作时使用
18
18
 
19
19
  ## 协调规范
20
20
  - 使用子代理时,主代理作为控制器跟踪进度
21
- - 主代理只有在本轮最终收尾时才可使用 HelloAGENTS 外层输出格式。
21
+ - 主代理只有在当前对话的最终回复中才可使用 HelloAGENTS 外层输出格式。
22
22
  - 团队协作中的进度与状态汇报都属于中间输出,不得包装 HelloAGENTS 外层输出格式。
23
23
  - 子代理不得调用 `helloagents-turn-state write` 代替主代理写完成态或等待态;需要运行时状态信号时只由主代理写入
24
24
  - 子代理完成后执行双阶段审查:
@@ -47,7 +47,7 @@ description: 已进入显式 UI 工作流、全局模式中的 UI 任务、已
47
47
  - 组件边界:哪些能力做成复用组件,哪些只保留在当前页面;避免把一次性布局抽成错误的“通用组件”
48
48
  - 状态矩阵:当前界面涉及的加载、空、错误、成功、禁用、危险态分别如何呈现
49
49
  - 主题与适配:深浅色、响应式断点或平台尺寸、安全区、最小窗口/最小视口如何处理
50
- - 验收证据:本轮需要检查的关键视口、关键状态和关键截图点是什么
50
+ - 验收证据:本次需要检查的关键视口、关键状态和关键截图点是什么
51
51
 
52
52
  ## 结构性规则
53
53
 
@@ -75,11 +75,11 @@ description: 声称工作完成前、提交代码前、创建 PR 前、报告任
75
75
  2. 逐项确认每个检查项,标记 [√] 并附带证据(如:`src/api.ts:42` 使用了参数化查询)
76
76
  3. 不适用的项标记 [-] 并说明原因
77
77
  4. 有未通过项 → 修复 → 重新运行验证循环
78
- 5. 若当前存在方案包并准备最终收尾,优先调用 `scripts/closeout-state.mjs write` 写当前会话 `artifacts/closeout.json`,记录 `requirementsCoverage` 与 `deliveryChecklist` 两项结论;两项都必须包含 `status`(`PASS` / `BLOCKED`)和 `summary`
78
+ 5. 若当前存在方案包并准备最终回复,优先调用 `scripts/closeout-state.mjs write` 写当前会话 `artifacts/closeout.json`,记录 `requirementsCoverage` 与 `deliveryChecklist` 两项结论;两项都必须包含 `status`(`PASS` / `BLOCKED`)和 `summary`
79
79
  6. 若当前方案包要求 `review-first`,必须先确认当前会话 `artifacts/review.json` 已通过 `scripts/review-state.mjs write` 写成最新结构化证据;不要把审查自然语言消息直接当成交付证据
80
- 7. 若 `contract.json` 中 `ui.visualValidation.required=true`,必须确认当前会话 `artifacts/visual.json` 已通过 `scripts/visual-state.mjs write` 写成最新结构化证据;若没有视觉验收证据,不得把本轮视为 UI 可交付
81
- 8. 本地版本检查点:非只读任务完成验证且产生工作区变更时,若 `auto_commit_enabled=true`,最终收尾前自动执行本地提交;若 `auto_commit_enabled=false`,跳过这一步。先检查 `git status --short`;若不是 git 仓库或无变更则跳过。若发现 `.env`、密钥、凭据、明显不应提交的大文件或二进制产物,停止提交并说明风险;否则执行 `git add -A`,使用当前回复语言生成简洁 conventional commit message 后执行 `git commit`。显式 `~commit` 不受这个开关影响。不自动远程 `git push`,除非用户明确要求
82
- 9. 若本轮需要运行时识别验证收尾状态,优先调用 `helloagents-turn-state write --kind complete --role main`;若因阻塞判定等待输入或因前置条件缺失而停下,写 `kind=waiting` 或 `kind=blocked`,并同时写 `reasonCategory` 与 `reason`;显式 `~auto` / `~loop` 下还要写 `blocker.target`、`blocker.evidence`、`blocker.requiredAction`,不要让运行时从自然语言消息里猜状态
80
+ 7. 若 `contract.json` 中 `ui.visualValidation.required=true`,必须确认当前会话 `artifacts/visual.json` 已通过 `scripts/visual-state.mjs write` 写成最新结构化证据;若没有视觉验收证据,不得把当前结果视为 UI 可交付
81
+ 8. 本地版本检查点:非只读任务完成验证且产生工作区变更时,若 `auto_commit_enabled=true`,最终回复前自动执行本地提交;若 `auto_commit_enabled=false`,跳过这一步。先检查 `git status --short`;若不是 git 仓库或无变更则跳过。若发现 `.env`、密钥、凭据、明显不应提交的大文件或二进制产物,停止提交并说明风险;否则执行 `git add -A`,使用当前回复语言生成简洁 conventional commit message 后执行 `git commit`。显式 `~commit` 不受这个开关影响。不自动远程 `git push`,除非用户明确要求
82
+ 9. 若当前对话需要运行时识别验证收尾状态,优先调用 `helloagents-turn-state write --kind complete --role main`;若因阻塞判定等待输入或因前置条件缺失而停下,写 `kind=waiting` 或 `kind=blocked`,并同时写 `reasonCategory` 与 `reason`;显式 `~auto` / `~loop` 下还要写 `blocker.target`、`blocker.evidence`、`blocker.requiredAction`,不要让运行时从自然语言消息里猜状态
83
83
 
84
84
  ## 需求追踪验证
85
85
 
@@ -88,9 +88,9 @@ description: 声称工作完成前、提交代码前、创建 PR 前、报告任
88
88
  2. 确认每条需求都有对应的任务实现,没有被静默丢弃
89
89
  3. 确认非目标章节列出的内容确实没有被实现(防止范围蔓延)
90
90
  4. 若 tasks.md 中定义了“完成标准”,逐项确认每个任务的完成标准确实成立,不能只因为代码存在或命令通过就视为完成
91
- 5. 若存在 `contract.json`,逐项确认其中的 `verifyMode`、reviewer / tester 关注边界都已被本轮验证覆盖
92
- 6. 若 `contract.json` 中 `advisor.required=true` 或 `ui.styleAdvisor.required=true`,额外确认当前会话 `artifacts/advisor.json` 已存在且结论为 clean;若没有 advisor 证据,不得把本轮视为可交付
93
- 7. 若 `contract.json` 中 `ui.visualValidation.required=true`,额外确认当前会话 `artifacts/visual.json` 已存在、覆盖要求的关键 screens / states,且结论为 `PASS`;若没有视觉验收证据,不得把本轮视为 UI 可交付
91
+ 5. 若存在 `contract.json`,逐项确认其中的 `verifyMode`、reviewer / tester 关注边界都已被本次验证覆盖
92
+ 6. 若 `contract.json` 中 `advisor.required=true` 或 `ui.styleAdvisor.required=true`,额外确认当前会话 `artifacts/advisor.json` 已存在且结论为 clean;若没有 advisor 证据,不得把当前结果视为可交付
93
+ 7. 若 `contract.json` 中 `ui.visualValidation.required=true`,额外确认当前会话 `artifacts/visual.json` 已存在、覆盖要求的关键 screens / states,且结论为 `PASS`;若没有视觉验收证据,不得把当前结果视为 UI 可交付
94
94
  8. 发现遗漏 → 补充实现 → 重新验证
95
95
 
96
96
  ## 目标偏移检查