Load order matters
For WebUI, backend/context/engine.py loads the soul identity file first, then shared instructions.md and shared core/*, soul-specific instructions.md and core/*, and finally index/*. The soul layer follows the shared layer so a soul-specific override wins on the same topic. Some reference doctrine stays as an on-demand pointer by kind, and oversized index material is also represented by a path instead of being inlined.
RAG injection
The system prompt also includes RAG context (next lesson). RAG runs before the system prompt is finalized — the retrieved chunks become a section of the system prompt, not a user message.
Cache hint
The vault content is huge. The Claude SDK uses prefix caching — same vault content across sessions, same prefix, cached. Tokens billed once, reused on every session start. The cache hint is implicit; the structure is what makes it work.