mirror of
https://github.com/MoonshotAI/kimi-code.git
synced 2026-07-09 17:29:12 +00:00
docs: improve goals page and related cross-references (zh/en) (#475)
* docs: fix code fence language and add cross-references (zh/en) - slash-commands: add 'sh' language tag to /goal example code block - config-files: link experimental section to env-vars#runtime-switches - env-vars: link KIMI_CODE_EXPERIMENTAL_* rows to config-files#experimental * docs: improve goals.md formatting and clarity (zh/en) - Merge redundant opening paragraphs into one with concrete examples - Use colons before code examples (not periods) - Bold state names in lifecycle list (complete/paused/blocked) - Replace prose keyboard shortcut description with table - Remove draft product-background text from EN queue section * docs: move goals after sessions in sidebar (zh/en) Goal mode builds on multi-turn sessions, so it reads more naturally after the sessions page in the guides navigation.
This commit is contained in:
parent
df4f2d6e86
commit
c984cbcb30
9 changed files with 42 additions and 36 deletions
|
|
@ -53,8 +53,8 @@ const config = withMermaid(defineConfig({
|
|||
{ text: '从 kimi-cli 迁移', link: '/zh/guides/migration' },
|
||||
{ text: '常见使用案例', link: '/zh/guides/use-cases' },
|
||||
{ text: '交互与输入', link: '/zh/guides/interaction' },
|
||||
{ text: '使用目标模式', link: '/zh/guides/goals' },
|
||||
{ text: '会话与上下文', link: '/zh/guides/sessions' },
|
||||
{ text: '使用目标模式', link: '/zh/guides/goals' },
|
||||
{ text: '在 IDE 中使用', link: '/zh/guides/ides' },
|
||||
],
|
||||
},
|
||||
|
|
@ -130,8 +130,8 @@ const config = withMermaid(defineConfig({
|
|||
{ text: 'Migrating from kimi-cli', link: '/en/guides/migration' },
|
||||
{ text: 'Common Use Cases', link: '/en/guides/use-cases' },
|
||||
{ text: 'Interaction and Input', link: '/en/guides/interaction' },
|
||||
{ text: 'Using Goals', link: '/en/guides/goals' },
|
||||
{ text: 'Sessions and Context', link: '/en/guides/sessions' },
|
||||
{ text: 'Using Goals', link: '/en/guides/goals' },
|
||||
{ text: 'Using in IDEs', link: '/en/guides/ides' },
|
||||
],
|
||||
},
|
||||
|
|
|
|||
|
|
@ -185,7 +185,7 @@ You can also switch models temporarily without touching the config file — by s
|
|||
| `micro_compaction` | `boolean` | `false` | Trim older large tool results from context while preserving recent conversation |
|
||||
| `background_ask` | `boolean` | `false` | Allow `AskUserQuestion` to start a background question task when the Agent can continue working |
|
||||
|
||||
Environment variables take priority over this table. `KIMI_CODE_EXPERIMENTAL_<NAME>` overrides one feature, and `KIMI_CODE_EXPERIMENTAL_FLAG=1` enables all experimental features for that process. When a feature is controlled by the environment, `/experiments` shows it as locked.
|
||||
Environment variables take priority over this table. `KIMI_CODE_EXPERIMENTAL_<NAME>` overrides one feature, and `KIMI_CODE_EXPERIMENTAL_FLAG=1` enables all experimental features for that process — see the full list in [Environment variables → Runtime switches](./env-vars.md#runtime-switches). When a feature is controlled by the environment, `/experiments` shows it as locked.
|
||||
|
||||
## `services`
|
||||
|
||||
|
|
|
|||
|
|
@ -125,10 +125,10 @@ Switches that control the behavior of subsystems such as telemetry, background t
|
|||
| `KIMI_DISABLE_TELEMETRY` | Disable anonymous telemetry reporting | `1`, `true`, `yes`, `y` (case-insensitive) |
|
||||
| `KIMI_CODE_BACKGROUND_KEEP_ALIVE_ON_EXIT` | Whether to keep background tasks when the session closes; takes higher priority than `config.toml` | Truthy: `1`/`true`/`yes`/`on`; falsy: `0`/`false`/`no`/`off` |
|
||||
| `KIMI_CODE_PLUGIN_MARKETPLACE_URL` | Override the plugin marketplace JSON loaded by `/plugins` | URL or local path |
|
||||
| `KIMI_CODE_EXPERIMENTAL_FLAG` | Enable all experimental features for this process; takes higher priority than `[experimental]` in `config.toml` | `1`, `true`, `yes`, `on` |
|
||||
| `KIMI_CODE_EXPERIMENTAL_GOAL_COMMAND` | Override `[experimental].goal_command` for this process | Truthy or falsy |
|
||||
| `KIMI_CODE_EXPERIMENTAL_MICRO_COMPACTION` | Override `[experimental].micro_compaction` for this process | Truthy or falsy |
|
||||
| `KIMI_CODE_EXPERIMENTAL_BACKGROUND_ASK` | Override `[experimental].background_ask` for this process | Truthy or falsy |
|
||||
| `KIMI_CODE_EXPERIMENTAL_FLAG` | Enable all experimental features for this process; takes higher priority than [`[experimental]`](./config-files.md#experimental) in `config.toml` | `1`, `true`, `yes`, `on` |
|
||||
| `KIMI_CODE_EXPERIMENTAL_GOAL_COMMAND` | Override [`[experimental].goal_command`](./config-files.md#experimental) for this process | Truthy or falsy |
|
||||
| `KIMI_CODE_EXPERIMENTAL_MICRO_COMPACTION` | Override [`[experimental].micro_compaction`](./config-files.md#experimental) for this process | Truthy or falsy |
|
||||
| `KIMI_CODE_EXPERIMENTAL_BACKGROUND_ASK` | Override [`[experimental].background_ask`](./config-files.md#experimental) for this process | Truthy or falsy |
|
||||
| `KIMI_SHELL_PATH` | Override the Git Bash path on Windows (used when auto-detection fails) | Absolute path |
|
||||
| `KIMI_MODEL_MAX_COMPLETION_TOKENS` | Hard cap on `max_completion_tokens` per LLM step; applies to the `kimi` provider only | Positive integer; `0` or negative disables clamping |
|
||||
| `KIMI_MODEL_TEMPERATURE` | Sampling temperature for every request; applies to the `kimi` provider only (global — independent of `KIMI_MODEL_NAME`) | Number, e.g. `0.3` |
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
# Goals
|
||||
|
||||
Goals keep Kimi Code working toward a defined outcome across turns. Use `/goal` when the task has a clear finish line, but the next useful step depends on what the agent learns while it works.
|
||||
|
||||
A normal prompt says what to do next. A goal says what must become true. Kimi Code keeps that objective visible, checks progress against evidence, and continues while the goal is active.
|
||||
Goals keep Kimi Code working toward a defined outcome across turns. Unlike a normal prompt that says what to do next, a goal says what must become true. Use `/goal` when the task has a clear finish line, but the next useful step depends on what the agent learns while it works — for example, fixing a batch of failing tests or tracking down the root cause of a broken build.
|
||||
|
||||
::: info
|
||||
`/goal` is still experimental. Start `kimi` with:
|
||||
|
|
@ -108,16 +106,14 @@ Use the same command surface to inspect or control the current goal:
|
|||
|
||||
A goal can stop in three ways:
|
||||
|
||||
- `complete`: the objective is done, and Kimi Code clears the goal
|
||||
- `paused`: you paused it, interrupted the turn, or resumed a session that had an active goal
|
||||
- `blocked`: Kimi Code needs input, cannot complete the goal as stated, reached a budget limit, or hit a runtime failure
|
||||
- **complete**: the objective is done, and Kimi Code clears the goal
|
||||
- **paused**: you paused it, interrupted the turn, or resumed a session that had an active goal
|
||||
- **blocked**: Kimi Code needs input, cannot complete the goal as stated, reached a budget limit, or hit a runtime failure
|
||||
|
||||
Write stop conditions into the objective. `/goal` does not have a separate stop-limit flag.
|
||||
|
||||
## Queue upcoming goals
|
||||
|
||||
Agents sometimes complete a goal too quickly. Users can be disappointed that they can assign only one goal at a time. Many people already know the upcoming goals they want to pursue. They had to wait for the current goal to complete, opens the TUI, and submit the next goal manually.
|
||||
|
||||
Use `/goal next` when you have more work ready but do not want to interrupt the current goal:
|
||||
|
||||
```sh
|
||||
|
|
@ -126,15 +122,21 @@ Use `/goal next` when you have more work ready but do not want to interrupt the
|
|||
|
||||
Upcoming goals are not visible to the agent while the current goal is running. When the current goal completes, Kimi Code starts the first upcoming goal in the same way as users enter `/goal <objective>`.
|
||||
|
||||
Manage upcoming goals interactively:
|
||||
Manage upcoming goals interactively with `/goal next manage`:
|
||||
|
||||
```sh
|
||||
/goal next manage
|
||||
```
|
||||
|
||||
In the manager, use <kbd>↑</kbd> / <kbd>↓</kbd> to browse, <kbd>Space</kbd> to select a goal for moving, <kbd>↑</kbd> / <kbd>↓</kbd> to reorder it, <kbd>E</kbd> to edit, <kbd>D</kbd> to delete, and <kbd>Esc</kbd> to cancel.
|
||||
| Key | Action |
|
||||
| --- | --- |
|
||||
| <kbd>↑</kbd> / <kbd>↓</kbd> | Browse the list |
|
||||
| <kbd>Space</kbd> | Select a goal for moving, then <kbd>↑</kbd> / <kbd>↓</kbd> to reorder |
|
||||
| <kbd>E</kbd> | Edit |
|
||||
| <kbd>D</kbd> | Delete |
|
||||
| <kbd>Esc</kbd> | Cancel |
|
||||
|
||||
The feature helps you run sequential goals in a manageable way. If the current goal is paused, canceled, or blocked, Kimi Code does not start the next upcoming goal. When a goal blocks and upcoming goals exist, the TUI reminds you that they wait for completion.
|
||||
If the current goal is paused, canceled, or blocked, Kimi Code does not start the next upcoming goal. When a goal blocks and upcoming goals exist, the TUI reminds you that they wait for completion.
|
||||
|
||||
## Use goal mode carefully
|
||||
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ KIMI_CODE_EXPERIMENTAL_GOAL_COMMAND=1 kimi
|
|||
|
||||
`/goal` starts or manages goal mode: a persistent objective that Kimi Code works toward across automatically continuing turns. For usage guidance and examples, see [Goals](../guides/goals.md).
|
||||
|
||||
```
|
||||
```sh
|
||||
/goal Update the checkout docs, run docs build, and stop if still blocked after 20 turns
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -185,7 +185,7 @@ max_context_size = 1047576
|
|||
| `micro_compaction` | `boolean` | `false` | 清理较旧的大型工具结果内容,同时保留最近对话 |
|
||||
| `background_ask` | `boolean` | `false` | 允许 `AskUserQuestion` 在 Agent 可以继续工作时启动后台提问任务 |
|
||||
|
||||
环境变量优先级高于这个表。`KIMI_CODE_EXPERIMENTAL_<NAME>` 可以覆盖单个功能,`KIMI_CODE_EXPERIMENTAL_FLAG=1` 会在当前进程启用所有实验功能。某个功能被环境变量控制时,`/experiments` 会显示为 locked。
|
||||
环境变量优先级高于这个表。`KIMI_CODE_EXPERIMENTAL_<NAME>` 可以覆盖单个功能,`KIMI_CODE_EXPERIMENTAL_FLAG=1` 会在当前进程启用所有实验功能——完整变量列表见[环境变量 → 运行时开关](./env-vars.md#运行时开关)。某个功能被环境变量控制时,`/experiments` 会显示为 locked。
|
||||
|
||||
## `services`
|
||||
|
||||
|
|
|
|||
|
|
@ -125,10 +125,10 @@ kimi
|
|||
| `KIMI_DISABLE_TELEMETRY` | 关闭匿名遥测上报 | `1`、`true`、`yes`、`y`(不区分大小写) |
|
||||
| `KIMI_CODE_BACKGROUND_KEEP_ALIVE_ON_EXIT` | 会话关闭时是否保留后台任务,优先级高于 `config.toml` | 真值:`1`/`true`/`yes`/`on`;假值:`0`/`false`/`no`/`off` |
|
||||
| `KIMI_CODE_PLUGIN_MARKETPLACE_URL` | 替换 `/plugins` 加载的 marketplace JSON | URL 或本地路径 |
|
||||
| `KIMI_CODE_EXPERIMENTAL_FLAG` | 在当前进程启用所有实验功能,优先级高于 `config.toml` 的 `[experimental]` | `1`、`true`、`yes`、`on` |
|
||||
| `KIMI_CODE_EXPERIMENTAL_GOAL_COMMAND` | 覆盖当前进程的 `[experimental].goal_command` | 真值或假值 |
|
||||
| `KIMI_CODE_EXPERIMENTAL_MICRO_COMPACTION` | 覆盖当前进程的 `[experimental].micro_compaction` | 真值或假值 |
|
||||
| `KIMI_CODE_EXPERIMENTAL_BACKGROUND_ASK` | 覆盖当前进程的 `[experimental].background_ask` | 真值或假值 |
|
||||
| `KIMI_CODE_EXPERIMENTAL_FLAG` | 在当前进程启用所有实验功能,优先级高于 `config.toml` 的 [`[experimental]`](./config-files.md#experimental) | `1`、`true`、`yes`、`on` |
|
||||
| `KIMI_CODE_EXPERIMENTAL_GOAL_COMMAND` | 覆盖当前进程的 [`[experimental].goal_command`](./config-files.md#experimental) | 真值或假值 |
|
||||
| `KIMI_CODE_EXPERIMENTAL_MICRO_COMPACTION` | 覆盖当前进程的 [`[experimental].micro_compaction`](./config-files.md#experimental) | 真值或假值 |
|
||||
| `KIMI_CODE_EXPERIMENTAL_BACKGROUND_ASK` | 覆盖当前进程的 [`[experimental].background_ask`](./config-files.md#experimental) | 真值或假值 |
|
||||
| `KIMI_SHELL_PATH` | Windows 上覆盖 Git Bash 路径(自动探测失败时使用) | 绝对路径 |
|
||||
| `KIMI_MODEL_MAX_COMPLETION_TOKENS` | 单步 LLM 请求的 `max_completion_tokens` 硬上限,仅对 `kimi` 供应商生效 | 正整数;`0` 或负数禁用 clamp |
|
||||
| `KIMI_MODEL_TEMPERATURE` | 每次请求的采样温度,仅对 `kimi` 供应商生效(全局生效,不依赖 `KIMI_MODEL_NAME`) | 数字,如 `0.3` |
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
# 使用目标模式
|
||||
|
||||
目标(goal)让 Kimi Code 在多个轮次中持续朝一个明确结果工作。当任务有清晰终点,但下一步要取决于 Agent 工作中发现的信息时,使用 `/goal`。
|
||||
|
||||
平常对话中的提示词说明下一步要做什么。而目标说明了要追求的最终状态。Kimi Code 会持续保留该目标,根据目标的描述检查进展,并在目标仍为「活跃(`active`)」状态时继续工作。
|
||||
目标(goal)让 Kimi Code 在多个轮次中持续朝一个明确结果工作——不同于普通提示词只说"下一步做什么",目标说的是"最终要达成什么状态"。当任务有清晰终点,但下一步取决于 Agent 工作中发现的信息时,使用 `/goal`,例如:修复一批失败的测试、追踪并修复构建失败的根因。
|
||||
|
||||
::: info 说明
|
||||
`/goal` 仍是实验功能,需要在启动 `kimi` 时设置相应的环境变量:
|
||||
|
|
@ -22,13 +20,13 @@ KIMI_CODE_EXPERIMENTAL_GOAL_COMMAND=1 kimi
|
|||
|
||||
Kimi Code 会保存该目标,把它作为下一条用户消息发送,并进入目标模式。每个轮次结束后,它会检查目标是「完成(`complete`)」、「阻塞(`blocked`)」、「暂停(`paused`)」,还是仍然「活跃(`active`)」。
|
||||
|
||||
好的目标应当说清楚具体的完成条件。
|
||||
好的目标应当说清楚具体的完成条件:
|
||||
|
||||
```sh
|
||||
/goal 修复所有标签关于结算系统的回退的漏洞,为每个修复新增或更新测试,最后运行所有有关结算的测试套件
|
||||
```
|
||||
|
||||
避免只写宽泛方向。
|
||||
避免只写宽泛方向:
|
||||
|
||||
```sh
|
||||
/goal 找出这个代码库中的所有 bug
|
||||
|
|
@ -108,9 +106,9 @@ Kimi Code 会保存该目标,把它作为下一条用户消息发送,并进
|
|||
|
||||
目标有三种停止方式:
|
||||
|
||||
- 「完成(`complete`)」:目标已完成,Kimi Code 会清除该目标
|
||||
- 「暂停(`paused`)」:你暂停了它、中断了当前轮次,或恢复了原本有目标的会话
|
||||
- 「阻塞(`blocked`)」:Kimi Code 需要输入、无法按当前表述完成目标、达到预算上限,或遇到运行时失败
|
||||
- **完成(`complete`)**:目标已完成,Kimi Code 会清除该目标
|
||||
- **暂停(`paused`)**:你暂停了它、中断了当前轮次,或恢复了原本有目标的会话
|
||||
- **阻塞(`blocked`)**:Kimi Code 需要输入、无法按当前表述完成目标、达到预算上限,或遇到运行时失败
|
||||
|
||||
停止条件需要写在目标本身里。`/goal` 没有单独用于描述停止限制的语法。
|
||||
|
||||
|
|
@ -124,15 +122,21 @@ Kimi Code 会保存该目标,把它作为下一条用户消息发送,并进
|
|||
|
||||
当前目标运行期间,安排的后续目标对 Agent 不可见。当前目标完成后,Kimi Code 会用与 `/goal <objective>` 相同的效果开始第一个后续目标。
|
||||
|
||||
交互式管理后续目标:
|
||||
使用 `/goal next manage` 交互式管理后续目标队列:
|
||||
|
||||
```sh
|
||||
/goal next manage
|
||||
```
|
||||
|
||||
在管理器中,用 <kbd>↑</kbd> / <kbd>↓</kbd> 浏览,<kbd>Space</kbd> 选择一个目标以便移动,选中后用 <kbd>↑</kbd> / <kbd>↓</kbd> 调整顺序,<kbd>E</kbd> 编辑,<kbd>D</kbd> 删除,<kbd>Esc</kbd> 取消。
|
||||
| 按键 | 作用 |
|
||||
| --- | --- |
|
||||
| <kbd>↑</kbd> / <kbd>↓</kbd> | 浏览列表 |
|
||||
| <kbd>Space</kbd> | 选中目标以便移动,再按 <kbd>↑</kbd> / <kbd>↓</kbd> 调整顺序 |
|
||||
| <kbd>E</kbd> | 编辑 |
|
||||
| <kbd>D</kbd> | 删除 |
|
||||
| <kbd>Esc</kbd> | 取消 |
|
||||
|
||||
这个功能帮助你以可管理的方式顺序运行后续目标。如果当前目标被暂停、取消或阻塞,Kimi Code 不会开始下一个后续目标。当目标进入「阻塞(blocked)」状态且存在后续目标时,TUI 会提醒你,这些后续目标会等待当前目标完成。
|
||||
如果当前目标被暂停、取消或阻塞,Kimi Code 不会开始下一个后续目标。当目标进入「阻塞(`blocked`)」状态且存在后续目标时,TUI 会提醒你,这些后续目标会等待当前目标完成。
|
||||
|
||||
## 谨慎使用目标模式
|
||||
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ KIMI_CODE_EXPERIMENTAL_GOAL_COMMAND=1 kimi
|
|||
|
||||
`/goal` 用于开始或管理目标模式:Kimi Code 会在自动续跑的轮次中持续朝一个持久目标工作。使用指导和示例见[使用目标模式](../guides/goals.md)。
|
||||
|
||||
```
|
||||
```sh
|
||||
/goal 更新 checkout 文档,运行 docs build,如果 20 轮后仍被阻塞就停止
|
||||
```
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue