Skip to content

v0.11.1 — dynamic tool guide and memory store caps#20

Merged
lavindeep merged 1 commit into
mainfrom
feature/dynamic-tool-guide-memory-limit
Jul 4, 2026
Merged

v0.11.1 — dynamic tool guide and memory store caps#20
lavindeep merged 1 commit into
mainfrom
feature/dynamic-tool-guide-memory-limit

Conversation

@lavindeep

Copy link
Copy Markdown
Owner

Summary

  • Dynamic tool guide (PROMPT_VERSION 6): a compact, registry-derived Tool guide block in the system prompt. Rendered from the same profile-filtered definitions offered to the model, so it cannot drift from the actual toolset; optional tools (memory_*, web_*, skill_read) appear only when registered, and update_plan appears only while a plan is active or blocked, preserving the proposal-vs-execution split. ~82 tokens for the default toolset.
  • Memory store file cap: memory.json (global and project separately) is capped at 1800 serialized characters. Writes that would exceed the cap are rejected with a clear instruction to forget or compact first. The cap ratchets against the normalized current payload size, so legacy over-cap stores can always shrink (forget keeps working) while growth stays rejected until the store complies.
  • Atomic /memory compact: replacements are preflighted for every store before any file is written — a rejected optimization can no longer partially mutate global memory while leaving project memory untouched.
  • Scoped memory rendering + guidance: the injected memory block now groups global vs project preferences into distinct sections, and memory_propose_update documents the global-vs-project scope policy in its tool description.
  • Friendly cap-rejection messages on /memory add, /memory forget, and /memory compact.

Testing

  • Full gate green at HEAD: ruff check, ruff format --check, mypy --strict, 1625 tests (up from 1610).
  • New coverage: cap rejection on fresh stores, legacy over-cap stores shrinking via forget (including minified legacy files), growth rejection while over cap, atomic multi-store compact rejection, grouped memory rendering, tool-guide presence/absence per registered toolset.
  • Live acceptance: validated in a live session on a real terminal.

Docs

DESIGN.md updated in the same commit: ContextAssembler block order (tool guide), §16 memory cap + ratchet + atomic compact, §19 prompt rationale (PROMPT_VERSION 6).

@lavindeep lavindeep merged commit 5fee884 into main Jul 4, 2026
2 checks passed
@lavindeep lavindeep deleted the feature/dynamic-tool-guide-memory-limit branch July 4, 2026 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant