refactor(templates): 提示词按用途分组命名 + 压缩回合剔除 [CTX] 注入行

- 命名混乱整治:prompt-*(压缩/标题系统侧指令)与 profile-*(各 profile 的
  system prompt)两组:system-prompt.txt→profile-default.txt、
  advising/lab/zero-system.txt→profile-*.txt、compress/title-prompt.txt→
  prompt-*.txt;全库引用(llm/config/engine/README×2/example/ARCHITECTURE)同步
- compressMessages 输入过滤:memory_note/scheduler_note/errAck/旧 summarize_request
  不进摘要(跨会话噪音+滚雪球,同 engine JOURNAL_SKIP_TYPES 虑);channel_note 刻意
  保留——压缩落库存档全部行,微信约束只能靠摘要转世;task_brief/summary 照常
- 画像快照本就不在 messages 表,压缩/标题均天然不带
This commit is contained in:
2026-10-02 10:16:31 +08:00
parent 0055842d2d
commit abe5673926
13 changed files with 33 additions and 27 deletions
+2 -2
View File
@@ -21,7 +21,7 @@ app/
│ ├── tools/
│ │ ├── definitions.json # 内置 16 个工具的 JSON Schema
│ │ └── executor.js # 内置工具执行器(任务目录沙箱;未知工具名转 MCP)
│ ├── templates/system-prompt.txt # System prompt 模板(直接编辑)
│ ├── templates/profile-default.txt # System prompt 模板(直接编辑)
│ └── public/ # H5 前端(Vanilla JS + SSE;无构建,index.html + js/ 六模块按序加载)
├── test/ # mock 上游 + 端到端冒烟测试
├── config.example.yml # core 专属配置模板(部署时生成/复制为仓库根 config.yml 挂进容器)
@@ -46,7 +46,7 @@ npm test # 启动 mock 上游 + 真实 server 的端到端冒烟测
## 提示词与工具 schema
System prompt 完全静态(所有会话共用,利于上游前缀缓存),在 `server/templates/system-prompt.txt` 直接编辑;工具定义在 `server/tools/definitions.json`。改完重启服务。
System prompt 完全静态(所有会话共用,利于上游前缀缓存),在 `server/templates/profile-default.txt` 直接编辑;工具定义在 `server/tools/definitions.json`。改完重启服务。
## 关键行为速查