Merge pull request 'Pin the prompt-library combo: layered prompt data, trigger skills, observability' (#34) from feature/prompt-library into main
ci / test (push) Failing after 1m35s
ci / test (push) Failing after 1m35s
This commit was merged in pull request #34.
This commit is contained in:
@@ -29,3 +29,4 @@
|
||||
| 同步前验收 | fc5008aa134aa1bc75838ca3e5950fc08f84c552 | 688ee3539e75975526e05a2b2059373965da0d52 | 2026-09-30T08:09:25Z |
|
||||
| 同步前验收 | 91e616e03d59882917b79d5305b05db397c40095 | 592917024bea93599755f16404c16a2b5b6a220d | 2026-09-30T08:18:19Z |
|
||||
| 同步前验收 | 20675f7442fd0592d473b715812c50e8cdfeade7 | 8ce9ddb5f27d0dc549051848cd233106ed6d7a89 | 2026-09-30T10:02:23Z |
|
||||
| 同步前验收 | 45e6a07626bc1d709624d5e3e37ba7556198d509 | ca2ff2d6a40d54f6d0d2cf73f2e9bd5c783f65e8 | 2026-09-30T10:36:13Z |
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
# feature/prompt-library 任务卡
|
||||
|
||||
任务主记录:<PR 链接,task-finish 时填写>;状态:已完成;owner:weichen
|
||||
|
||||
## 基线与授权
|
||||
|
||||
- 权威仓:ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/Agent-System-Dev.git;目标分支:main;R0(initial_base_sha)= 45e6a07626bc1d709624d5e3e37ba7556198d509
|
||||
- 工作区:/home/weichen/projects/Agent-System-Dev-wt-feature-prompt-library(worktree);分支:feature/prompt-library
|
||||
- 授权与交付终点:用户批准提示词体系方案并指示施工("充分纳入可纳入的;总结设计思路供扩展")→ 完成实现与验证,按自主闭环建 PR 合入
|
||||
|
||||
## 目标与非目标
|
||||
|
||||
- 目标:① 提示词从代码移入数据(embed 库文件,frontmatter 格式);② 分层模型 base/env/task/agent/tool/aux/style 全部纳入(不止日常用到的);③ 触发匹配(intent/command/attachment/manual + 附件门槛 + 优先级让位);④ 覆盖链 builtin→user(DB v8 迁移 + API + drift 标记);⑤ 组装进 ctxasm(多段 system + 可观测);⑥ 子代理/小队角色/工具文案接线;⑦ 设计思路文档沉淀。
|
||||
- 非目标:提示词管理 UI(设置界面浏览/编辑——契约与 API 已就绪,UI 另行);会话压缩/标题生成的功能接线(模板已入库,随远期档)。
|
||||
|
||||
## 同步记录
|
||||
|
||||
| 节点 | sync_base_sha | tested_head_sha | checked_at |
|
||||
|---|---|---|---|
|
||||
| 启动 | 45e6a07626bc1d709624d5e3e37ba7556198d509 | 45e6a07626bc1d709624d5e3e37ba7556198d509 | 2026-09-30T10:14:30Z |
|
||||
|
||||
## 结果与验证(完成后填写)
|
||||
|
||||
- 结果:
|
||||
- core 0cb0a40:PromptModule/PromptTrigger/PromptBlock/PromptHitRecord 契约 + AgentProfile.promptModules(引用有序;空=默认 base+env)+ ts/types.ts 镜像。
|
||||
- backend:internal/prompts 包(最小 frontmatter 解析器含块标量、embed 库、覆盖链服务、触发匹配、ResolveSystem 组装、占位符解析);**40 个内置模块**(base 5 + env 1 + task 12 + agent 10 + tool 7 + aux 3 + style 2);ctxasm 接收多段 system + prompt 观测条目;llm.go 组装接线 + 工具文案库覆盖;SubLLMRunner/squadadapter 角色接库(回退内联);server /api/prompts CRUD + 技能命令进 `/` 菜单 + postMessage 技能命令跳过命令路由走 run;store v8 迁移 prompt_modules 表;默认画像 SystemPrompt 清空(基座走库)。
|
||||
- frontend:contracts.ts 镜像(PromptModule + promptModules)+ api.listPromptModules。
|
||||
- documents:docs/guides/prompt-library-design.md(分层模型、模块设计八法、触发设计、格式命名、覆盖链、组装观测、扩展步骤、反模式)。
|
||||
- 验证:
|
||||
- `make test` 组合全绿:core ok;backend 17 包 ok(新增 prompts 包 9 组测试:库完整性/默认组装/技能触发(命中·门槛·命令绕过)/优先级让位/画像引用/覆盖链 drift/命令匹配/agent+tool 取用/frontmatter 解析);frontend 9;ui 23;deps ok。
|
||||
- 运行时验证(mock 后端 8789):启动加载 40 模块;GET /api/prompts 层分布 5/1/12/10/7/3/2;覆盖保存→basedOnVersion=1→删除恢复内置往返;/api/commands 含 12 个 prompt-skill 命令;`/minutes 关于季度会` 消息起 run(不走命令总线)。
|
||||
- 影响与剩余项:提示词管理 UI 未做(API 就绪);aux 层三个模板未接线(随 SummarizeBeyond/会话管理远期档);真实模型下的技能注入效果需用户侧验收。
|
||||
+1
-1
Submodule modules/backend updated: 10f400a2c0...4938bd095c
+1
-1
Submodule modules/core updated: a2050d848f...0cb0a40dc8
+1
-1
Submodule modules/documents updated: e601b253bc...02198f1ceb
+1
-1
Submodule modules/frontend updated: 0eb9066510...4abf13d33d
+1
-1
Submodule modules/ui updated: 6068f146cc...f2b08f101e
Reference in New Issue
Block a user