feat(kernel): context-injection - #118
Merged
Merged
Conversation
- getContextBlock:发现根 CONTEXT.md,缺失返回 null 不报错 - digest = sha256(内容) 前 16 位,mtime 变化才重读 - 提取 ## 标题为 terms,块文本超长截断并提示 - formatContextBlock + CONTEXT_MARKER 供 server 注入复用
…ent) - message.transform:Primary(goal 激活)注入 bootstrap + Project Context 块; 子 agent 首消息注入 Project Context 块;goal 未激活且非子 agent 不注入 - CONTEXT.md 缺失时不报错,仅注入 bootstrap - queueContinuation prompt 前置 Project Context 块 - buildFirstUserInjection 纯函数导出,注入决策可单测 - marker 防重复注入(EXTREMELY_IMPORTANT / CONTEXT_MARKER)
…xt 指针 静态兜底:各 agent prompt 尾部统一提示读取项目根 CONTEXT.md (领域术语权威,消息中已自动注入内容与 digest)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
context-injection
src/kernel/context.ts— 根 CONTEXT.md 发现/摘要(sha256 digest)/mtime 缓存刷新Closes #100