Memory layers: budgeted hot context (#27) #57
Reference in New Issue
Block a user
No description provided.
Delete Branch "feat/memory-layers"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Tiers Reginald's context (#27) so the model always sees what matters without copying ticket data into the prompt.
query_project. Ticket bodies/comments/detail live here and are never inlined; the model fetches them by number.assembleHotContext(inputs, budget=2000)packs by priority: focus (tiny, always kept) → most recent active directives (each while they fit ~⅔) → charter fills the true remainder, truncated on a line boundary. It measures the fixed tail exactly and reserves for header/joiner/ellipsis, so the total never exceeds budget. PlusestimateTokens(tokenizer-free, slight over-estimate) andactiveDirectives(accepted/amended, most-recent-first).Acceptance ✅ — hot assembles under 2k even with a ~34k-token charter; nothing ticket-shaped is inlined (only numbers + titles for focus). +5 core tests; full core suite + typecheck green.
Follow-up: wire
assembleHotContextinto the live system prompt in main (needs charter + directives + focus at chat time) — the assembly + budget is the tested core here.🤖 Generated with Claude Code