MoonshotAI / MoonshotAI/kimi-code
关于自动加载的memory
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 7.5k
- Forks
- 1.2k
- Avg merge
- 11h 53m
- Merged PRs (30d)
- 350
Description
What feature would you like to see?
目前 Kimi Code 的记忆功能仅支持单个 Agent.md 文件,这在实际使用中存在一些局限:
-
规则难以拆分管理:当项目规模变大时,Agent.md 会变得冗长,不同类型的规则(如编码规范、项目架构、API 使用规范)混在一起,维护困难。
-
无法按目录/模块定制规则:不同子目录可能需要不同的上下文规则,但目前的单文件机制无法实现这种细粒度的控制。
期望的改进:
参考 Claude Code 的 .claude/rules 机制,支持以下能力:
- 允许在项目中放置多个规则文件(如
.kimi/rules/*.md或类似结构) - 支持按目录层级自动加载适用的规则文件
- 或者至少支持一个规则目录,自动合并加载其中的所有 markdown 文件
使用场景举例:
- 根目录放置通用的编码规范和项目概述
backend/目录下放置 Python/Django 相关的规则frontend/目录下放置 React/TypeScript 相关的规则- 每个规则文件独立维护,避免单个文件过于庞大
这样可以让 Kimi Code 在大型项目中的上下文管理更加灵活和可维护。
Additional information
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the current code that loads the single Agent.md memory file, then trace how its contents enter the CLI context. Define how a .kimi/rules directory and directory-specific rules should be discovered and merged; done means the documented rule layouts load automatically without breaking the existing single-file behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100