Bound repository context size in load_repo_context
Maintainers usually reply within 1 day
@kpj2006 is already working on this.
Since Jul 30, 2026.
- #45 by @rishiiicreates — closed without merging
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 48/100
Research direction
Start in repo_router.py at load_repo_context() and inspect how baseline, intent-matched .agent/**/*.md files, and README content are read and appended. Trace the existing README truncation and error logging before setting the shared per-file and total limits. Done means truncated sections are marked, both budgets are respected, and intent selection and routing behavior remain unchanged.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- Python
- Stars
- 10
- Forks
- 12
- Avg merge
- 3m
- Merged PRs (30d)
- 1
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from AOSSIE-Org/SkillBot
-
bug: conversation context selects the oldest thread messages instead of recent repliesPossibly taken @BLVCK-MAMBA-6 claimed this today. Openbug enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
AOSSIE-Org/SkillBot#74 ·
Maintainers usually reply within 1 day
-
[BUG]: Issue-creation intent is missed when the article is omitted (create issue for this)May be free again A pull request for this issue was closed without being merged. Openbug enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
AOSSIE-Org/SkillBot#65 · 2 comments ·
Maintainers usually reply within 1 day
-
[BUG]: Non-Atomic Gap Log Writes Can Cause Data Loss After an Interrupted SavePossibly taken @sankalpmtellur claimed this 4 days ago. Openbug enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
AOSSIE-Org/SkillBot#61 · 2 comments ·
Maintainers usually reply within 1 day
-
[BUG]: os.chdir() Changes the Process-Wide Working Directory During Repository SyncPossibly taken @aadityachhipa80-oss claimed this 12 days ago. Openbug enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
AOSSIE-Org/SkillBot#59 · 3 comments ·
Maintainers usually reply within 1 day
-
[BUG]: wait_for_ollama() Retries Indefinitely When Ollama Is UnavailableMay be free again @SYED-IRTEZA-HUSSAIN-RIZVI claimed this 22 days ago, and no pull request is open. Openbug enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
AOSSIE-Org/SkillBot#56 · 4 comments ·
Maintainers usually reply within 1 day
All issues in AOSSIE-Org/SkillBot
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
bad-antics/lateralus-lang#1438 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
Maintainers usually reply within 1 day
-
area: control app
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
glossyio/traffic-monitor#415 ·
Maintainers usually reply within 1 day
-
apply_matrix_rect takes 6-9% of extract_text timePossibly taken @g4lb claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
pdfminer/pdfminer.six#1333 ·
Maintainers usually reply within 1 day
-
intake mcp-intake needs-human-review priority:high type:bug
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
Ikalus1988/MisakaNet#6081 · 2 comments ·
Maintainers usually reply within 1 day