Bound repository context size in load_repo_context

オープン
#24 コメント 2 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@kpj2006 がすでに取り組んでいます。

2026年7月30日 から。

  • #45 @rishiiicreates による — マージされずにクローズ

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
48/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
静か
技術スタック
python
領域
ai

調査の方向性

repo_router.py の load_repo_context() から始め、baseline、意図に一致する .agent/**/*.md ファイル、README の内容がどのように読み込まれて追加されるかを確認します。ファイル単位および合計の共有制限を設定する前に、既存の README の切り詰めとエラーログを追跡します。切り詰められたセクションに印が付き、両方の予算が守られ、意図の選択とルーティング動作が変更されていなければ完了です。

索引モデルが 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.py
  • load_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

Requested by @kpj2006.

主要言語
Python
スター
10
フォーク
11
平均マージ
6分
マージ済み PR(30日)
4

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

AOSSIE-Org/SkillBot のほかの issue

AOSSIE-Org/SkillBot の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。