A Dumpster You Throw Everything Into¶
Evidence Level: F (directly proven by source code)
Analysis Baseline:4f843556
TL;DR¶
build_agent_context packs soul.md, memory.md, skills/, session_context, focus, triggers, and enterprise_info into a single system message—no layering, no caching, no prioritization.
1. Evidence¶
# agent_context.py
system_prompt = static_content + dynamic_content
# caller.py:557-559
api_messages = [LLMMessage(
role="system",
content=static_prompt,
dynamic_content=dynamic_prompt,
)]
What Goes In¶
| Type | Content | Processing |
|---|---|---|
| Static | soul.md | Truncated to 30K chars |
| Static | memory.md | Truncated to 2K chars |
| Static | skills/ index | Progressive disclosure |
| Static | enterprise_info | Full load |
| Dynamic | session_context | Compact summary |
| Dynamic | focus | Currently active items |
| Dynamic | triggers | Trigger conditions |
| Dynamic | timestamp | Current time |
All merged into a single LLMMessage(role="system").
2. Consequences¶
- No layering: system / task / memory / tool result all mixed together—LLM can't distinguish priority
- No caching strategy: static content (soul.md, skills/, enterprise_info) recalculated every round, never cached
- Truncation loss: memory truncated to 2000 chars, excess discarded
- No independent updates: any static part changes → entire system message must be rebuilt
3. Cross-Article Interactions¶
With "One Pipe" (018): tool outputs (pip progress bars, npm dependency trees) flow directly into messages[] → mix with soul.md, memory, skills in the same context window → critical information drowned in noise.
With "Fake Caching" (020): static content recalculated every round → but mixed with session dynamic content → impossible to cache even if you wanted to.
4. Relationship to AI Coding¶
- "Concatenate everything" is the simplest implementation: packing all content into one big string is far faster than designing a layered architecture
- No caching awareness: AI won't proactively say "this content hasn't changed for several rounds, it should be cached"—that requires an architect's holistic judgment about performance
- Locally correct, globally catastrophic: each
_read_file_safecall is correct in isolation—but combined, they create an unmaintainable dumpster
Key Code¶
| File | Lines | Content |
|---|---|---|
agent_context.py |
throughout | build_agent_context — everything concatenated |
agent_context.py |
467 | memory truncated to 2000 chars |
agent_context.py |
455 | soul truncated to 30000 chars |
caller.py |
557-559 | static + dynamic merged into one system message |