Bound repository context size in load_repo_context
维护者通常 1 天内回复
评估
调研方向
从 repo_router.py 中的 load_repo_context() 开始,检查 baseline、与 intent 匹配的 .agent/**/*.md 文件以及 README 内容是如何读取并追加的。在设置共享的单文件和总限制之前,跟踪现有的 README 截断和错误日志记录。完成的标准是:截断的部分会被标记,两个预算都得到遵守,并且 intent 选择和路由行为保持不变。
由索引模型根据 Issue 内容生成。
描述
Summary
Add bounded Markdown context loading to repo_router.py so repository context passed to the LLM has predictable size.
Rationale
load_repo_context() currently reads baseline and intent-matched .agent/**/*.md files in full. Categorizing the query reduces the number of selected files, but a single large selected file can still consume the prompt budget, increase latency, and cause the user query or relevant context to be truncated.
Affected area
repo_router.pyload_repo_context()
Required changes
- Introduce a shared capped-read helper for Markdown context files.
- Apply a per-file content limit to operational data, architecture, core context, and instruction files.
- Enforce an overall context-size budget while appending sections.
- Preserve the existing intent-based selection and error logging behavior.
- Mark truncated content clearly in the assembled context.
Acceptance criteria
- No individual Markdown context file can exceed the configured per-file cap in the LLM context.
- The assembled repository context cannot exceed a configured total budget.
- Existing README truncation remains consistent with the shared limit strategy.
- The existing routing and intent-selection behavior remains unchanged.
Backlinks
- Reported from PR #21: https://github.com/AOSSIE-Org/SkillBot/pull/21
- Review discussion: https://github.com/AOSSIE-Org/SkillBot/pull/21#discussion_r3652672930
Requested by @kpj2006.
- 主要语言
- Python
- 星标
- 10
- 派生
- 11
- 平均合并
- 6 分钟
- 30 天内合并 PR
- 4
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
AOSSIE-Org/SkillBot 的其他 Issue
-
[BUG]: Issue-creation intent is missed when the article is omitted (create issue for this)可能已有人在做 @Ankitavasudev 于 8 天前认领。 未关闭bug enhancement
难度 2/5 1-3 小时 新手友好度 82/100
AOSSIE-Org/SkillBot#65 · 2 条评论 ·
维护者通常 1 天内回复
-
[BUG]: Non-Atomic Gap Log Writes Can Cause Data Loss After an Interrupted Save可能重新可做 @SYED-IRTEZA-HUSSAIN-RIZVI 于 11 天前认领,目前没有进行中的 PR。 未关闭bug enhancement
难度 2/5 1-3 小时 新手友好度 74/100
AOSSIE-Org/SkillBot#61 · 2 条评论 ·
维护者通常 1 天内回复
-
[BUG]: os.chdir() Changes the Process-Wide Working Directory During Repository Sync可能已有人在做 @aadityachhipa80-oss 于 2 天前认领。 未关闭bug enhancement
难度 2/5 1-3 小时 新手友好度 75/100
AOSSIE-Org/SkillBot#59 · 3 条评论 ·
维护者通常 1 天内回复
-
[BUG]: wait_for_ollama() Retries Indefinitely When Ollama Is Unavailable可能重新可做 @SYED-IRTEZA-HUSSAIN-RIZVI 于 11 天前认领,目前没有进行中的 PR。 未关闭bug enhancement
难度 2/5 1-3 小时 新手友好度 72/100
AOSSIE-Org/SkillBot#56 · 3 条评论 ·
维护者通常 1 天内回复
-
[BUG]: Backlog Messages Are Re-processed on Discord Reconnection可能重新可做 @SYED-IRTEZA-HUSSAIN-RIZVI 于 11 天前认领,目前没有进行中的 PR。 未关闭bug enhancement
难度 4/5 3-5 天 新手友好度 55/100
AOSSIE-Org/SkillBot#58 · 2 条评论 ·
维护者通常 1 天内回复
查看 AOSSIE-Org/SkillBot 的全部 Issue
相似的 Issue
-
needs-triage
难度 2/5 1-3 小时 新手友好度 78/100
gke-labs/kube-agents#6778 · 1 条评论 ·
维护者通常 1 天内回复
-
Declare the CMS schema library in the optional recipients extra可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭area:python in-progress
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
area/build-framework kind/enhancement priority/low
难度 2/5 1-3 小时 新手友好度 77/100
yugabyte/yugabyte-db#38826 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 73/100
维护者通常 1 天内回复
-
难度 1/5 1-3 小时 新手友好度 72/100
sususweet/midea_auto_cloud#306 ·
维护者通常 9 天内回复