fix(aider): CONVENTIONS.md is a roster index, not 3.8 million characters of agents (#871)

Aider loads a conventions file into context and keeps it there for the whole
session — that is what the file is for, and the docs say to load it with
--read so prompt caching can hold it. This integration concatenated every
agent body into it. At 279 agents that is 3,816,372 characters, roughly a
million tokens. No model takes that. Anyone who ran

    ./scripts/install.sh --tool aider

got a CONVENTIONS.md that either blows the context window on the first turn
or bills for a million tokens trying.

CONVENTIONS.md is now the roster index it was described as: one entry per
agent with the name, the description, the division, and the path to the
agent file. 96,823 characters, down from 3.8 million. The header explains
how to pull a single agent's full instructions into the session:

    /read-only /path/to/agency-agents/engineering/engineering-frontend-developer.md

Naming an agent in a prompt still works the way it did — the description is
what the model needed for that, and it is still there.

test-convert-outputs.sh now holds the index to being an index: it fails if
CONVENTIONS.md grows past 250,000 characters, if it does not list exactly
one path per roster agent, or if any path it prints does not resolve. The
existing round-trip check on the accumulated file still covers the names and
descriptions.
This commit is contained in:
Hotragn Pettugani
2026-09-20 18:35:10 -05:00
committed by GitHub
parent ad9264e309
commit d3a3f573e3
6 changed files with 89 additions and 22 deletions
+3 -1
View File
@@ -18,7 +18,7 @@
# gemini-cli -- Install agents to ~/.gemini/agents/
# opencode -- Copy agents to .opencode/agents/ in current directory
# cursor -- Copy rules to .cursor/rules/ in current directory
# aider -- Copy CONVENTIONS.md to current directory
# aider -- Copy the CONVENTIONS.md roster index to current directory
# windsurf -- Copy .windsurfrules to current directory
# openclaw -- Copy workspaces to ~/.openclaw/agency-agents/
# qwen -- Copy SubAgents to ~/.qwen/agents/ (user-wide) or .qwen/agents/ (project)
@@ -926,6 +926,8 @@ install_aider() {
fi
install_file "$src" "$dest"
ok "Aider: installed -> $dest"
dim " CONVENTIONS.md is the roster index. Load one agent's full instructions with"
dim " /read-only $REPO_ROOT/<path shown in the index>"
$SELECTION_ACTIVE && warn "Aider: single-file format — team/agent filtering N/A (installs the full roster)."
warn "Aider: project-scoped. Run from your project root to install there."
}