Core Concepts
Context Engineering
How “Repo is the Agent” is implemented in runtime
Context Engineering
Downcity keeps context in composable, persisted layers:
PROFILE.md/SOUL.mddowncity.jsonruntime config.downcity/session/<sessionId>/messages/messages.jsonlsession history.downcity/memory/MEMORY.mdlong-term memory.downcity/memory/daily/<YYYY-MM-DD>.mddaily memory increments.downcity/session/<sessionId>/memory/working.mdsession working memory (optional)
Why this model
- History is auditable and explicit.
- Long conversations can be compacted safely.
- Session isolation by
sessionIdavoids cross-conversation bleed. - Memory retrieval is budgeted via
memory.search -> memory.get, instead of full-file injection.
Practical tips
- Keep clear boundaries and goals in
PROFILE.md. - Use meaningful
sessionIdper channel/user/workflow. - Inspect
.downcity/logs/<date>.jsonland task run artifacts regularly.