feat(context): mode-aware axme_decisions/axme_memories + active KB triggers#127
Merged
George-iam merged 1 commit intomainfrom Apr 29, 2026
Merged
Conversation
…iggers
axme_decisions and axme_memories now read config.context.mode and switch
output shape: full → bodies (existing behaviour), search → compact catalog
(id/slug + title + ≤200-char description). Closes the regression in v0.5.0
where these tools silently re-loaded every body in search mode and erased
the ~10× session-start token saving.
axme_oracle is unchanged — always full, because stack/structure/patterns/
glossary are connected documents and don't fit the catalog shape.
buildSearchModeInstructions gained an "Active KB usage" block with
concrete trigger predicates ("how did we…", touching git/safety/hooks
subsystems, mentioning a library by name, before architectural advice,
before saving a new entry). Replaces the generic "use search for fuzzy
lookups" hint with imperative MUSTs tied to situations the agent can
recognize in the user's task text.
Tests: +6 (542 total). Builds clean. tsc clean.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> #!axme pr=none repo=AxmeAI/axme-code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
axme_decisionsandaxme_memoriesnow adapt output toconfig.context.mode— full mode unchanged, search mode returns a catalog (id/slug + title + ≤200-char description). Closes a v0.5.0 regression where these tools silently loaded full bodies in search mode, erasing the ~10× token saving.axme_oracleunchanged — always full bodies (stack/structure/patterns/glossary are connected docs, not catalog entries).buildSearchModeInstructionsgained an "Active KB usage" block with concrete trigger predicates so the agent callsaxme_search_kb/axme_get_*proactively (was: generic "useful for fuzzy lookups").Why
In a session started today on this repo with
context.mode: search, the model loaded the catalog viaaxme_context(page 2) and then immediately calledaxme_decisions/axme_memoriesbecause the unified startup instruction asked for "in parallel" loads — the tools returned full bodies, defeating the whole point of search mode. User pointed it out and asked for a reliable, mode-aware fix instead of additional prompt text.Design (per discussion in this session):
Test plan
npm test— 542/542 (was 536, +6 new intest/context.test.ts)npx tsc --noEmitcleannpm run buildcleancontext.mode: search, callaxme_decisions→ catalog only; flip tofull→ bodies. Done in a follow-up window after merge.Notes
CHANGELOG entry added under
[Unreleased](no version bump in this PR — bundle into next release per D-045 batch policy).Includes a small KB cleanup as part of the same effort:
transformers-js-install-size-is-102mbdeleted (B-005 shipped, lazy-install pattern now in code, memory was historical noise).🤖 Generated with Claude Code