Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/simplify-system-prompt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@moonshot-ai/kimi-code": patch
---

Simplify the built-in system prompt.
1 change: 1 addition & 0 deletions packages/agent-core-v2/src/agent/tools/os/bash/bash.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ If `run_in_background=true`, the command will be started as a background task an
- Avoid using `..` to access files or directories outside of the working directory.
- Avoid modifying files outside of the working directory unless explicitly instructed to do so.
- Never run commands that require superuser privileges unless explicitly instructed to do so.
- Run git-mutating commands such as `git commit`, `git push`, `git reset`, and `git rebase` only when the user asks for them.

**Guidelines for efficiency:**
- Use `&&` to chain commands that genuinely depend on each other, e.g. `npm install && npm test`. Independent read-only commands (separate `git show`, `ls`, or status checks) should be issued as separate parallel Bash calls in one response, not chained into a single call — chaining serializes their execution and mixes their output. Do not stitch outputs together with `echo` separators.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ const WINDOWS_NOTES =
export const DEFAULT_PRODUCT_NAME = 'Kimi Code CLI';

export const DEFAULT_REPLY_STYLE_GUIDE =
"Your text replies render as Markdown in the user's terminal. Use light Markdown that reads well there: short paragraphs, `-` bullets for lists, backticks for code, commands, paths, and identifiers, and fenced blocks for multi-line code. Keep structure shallow — avoid deep nesting, large tables, and heavy headings in ordinary replies. Do not use emoji unless the user does first or asks for it. Default to prose; reach for a list only when the content is genuinely a set of items or steps. When you point to a specific code location, cite it as `path/to/file.ts:42` — a precise, consistent reference the user can navigate to.";
"Your text replies render as Markdown in the user's terminal. Keep structure light and shallow — deep nesting, large tables, and heavy headings read poorly there. Cite code locations as `path/to/file.ts:42` so the user can navigate to them. Do not use emoji unless the user does first or asks for it.";

const ADDITIONAL_DIRS_SECTION_PROSE =
'The following directories have been added to the workspace. You can read, write, search, and glob files in these directories as part of your workspace scope.';
Expand Down
111 changes: 33 additions & 78 deletions packages/agent-core-v2/src/app/agentProfileCatalog/system.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ describe('FullCompaction', () => {
event: 'compaction_finished',
properties: expect.objectContaining({
source: 'manual',
tokens_before: 17_863,
tokens_before: 17_895,
retry_count: 1,
trace_id: 'trace-compact-1',
}),
Expand Down Expand Up @@ -1124,7 +1124,7 @@ describe('FullCompaction', () => {
properties: expect.objectContaining({
agent_id: 'main',
source: 'manual',
tokens_before: 17_863,
tokens_before: 17_895,
duration_ms: expect.any(Number),
round: 1,
retry_count: 0,
Expand Down Expand Up @@ -1349,7 +1349,7 @@ describe('FullCompaction', () => {
event: 'compaction_failed',
properties: expect.objectContaining({
source: 'manual',
tokens_before: 17_863,
tokens_before: 17_895,
duration_ms: expect.any(Number),
retry_count: 4,
error_type: 'APIConnectionError',
Expand Down
4 changes: 2 additions & 2 deletions packages/agent-core-v2/test/agent/loop/loop.test.ts

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions packages/agent-core-v2/test/features/plan/plan.test.ts

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions packages/agent-core-v2/test/tool/tool.test.ts

Large diffs are not rendered by default.

Loading