Bound repository context size in load_repo_context

Đang mở
#24 2 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@kpj2006 đang làm issue này rồi.

Từ ngày 30/7/2026.

  • #45 của @rishiiicreates — đã đóng, không merge

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
48/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
python
Lĩnh vực
ai

Hướng nghiên cứu

Bắt đầu trong repo_router.py tại load_repo_context() và kiểm tra cách baseline, các tệp .agent/**/*.md khớp với intent và nội dung README được đọc và nối thêm. Theo dõi việc cắt ngắn README hiện có và ghi nhật ký lỗi trước khi đặt các giới hạn dùng chung cho từng tệp và tổng thể. Hoàn tất có nghĩa là các phần bị cắt ngắn được đánh dấu, cả hai ngân sách đều được tuân thủ, còn việc chọn intent và hành vi định tuyến vẫn không thay đổi.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Python
Star
10
Fork
11
Merge trung bình
6 phút
Pull request đã merge (30 ngày)
4

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của AOSSIE-Org/SkillBot

Tất cả issue của AOSSIE-Org/SkillBot

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.