- Replace fixed 6-message compact retention with ratio-based logic:
retain ~20% of compactable estimated tokens, with a 6-message floor
and user-turn boundary alignment
- Add compactRetainedTokenBudget, compactRecentStart, compactTurnBoundary
helpers in internal/agent/agent.go
- Add TestAgentCompactKeepsTwentyPercentRecentContext
- Move startup/session/repl/bootstrap logic from root into internal/app
so main.go is a thin binary entry point (15 lines)
- Update /compact docs in README.md
Add OpenAI-compatible providers, TUI, slash commands, and model switching.
Add local file tools plus optional yolo shell execution.
Document config, usage, and development workflow.