Feat/augment tool aliases#14
Open
pablo-lamtenzan wants to merge 2 commits into
Open
Conversation
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
logical GitNexus augment kinds
pi-lean-ctxpreset forctx_read,ctx_grep,ctx_find, andctx_shellcoexistence
Problem
Auto-augment currently matches only fixed built-in Pi tool
names such as:
readread_manygrepfindbashThat makes wrapper tools work inconsistently in additive
integrations like pi-lean-ctx, where calls may use:
ctx_readctx_grepctx_findctx_shellExplicit
gitnexus_*tools already work, but auto-augmentdid not recognize these wrapper tool names.
Solution
Introduce small abstraction from physical tool name to
logical augment kind.
Logical kinds:
readread_manygrepfindbashDefault aliases remain unchanged:
read -> ["read"]read_many -> ["read_many"]grep -> ["grep"]find -> ["find"]bash -> ["bash"]Add shell-friendly CSV env overrides:
GITNEXUS_AUGMENT_READ_TOOLSGITNEXUS_AUGMENT_READ_MANY_TOOLSGITNEXUS_AUGMENT_GREP_TOOLSGITNEXUS_AUGMENT_FIND_TOOLSGITNEXUS_AUGMENT_BASH_TOOLSAdd optional preset:
GITNEXUS_AUGMENT_PRESET=pi-lean-ctxPreset expands to:
read -> ["read", "ctx_read"]read_many -> ["read_many"]grep -> ["grep", "ctx_grep"]find -> ["find", "ctx_find"]bash -> ["bash", "ctx_shell"]If preset and explicit env var both exist, explicit env
var replaces preset for that logical kind.
Implementation notes
kind before matching
parsing wrapper output formats
gitnexus_*tools unchangedDocumentation
Added README section:
Configuring auto-augment tool aliasesIncludes:
pi-lean-ctxpresetLEAN_CTX_PI_MODE=additiveLEAN_CTX_PI_ENABLE_MCP=0GITNEXUS_AUGMENT_PRESET=pi-lean-ctxTesting
npm ci✅npm run lint✅npm run typecheck✅npm test✅npm run build✅Additional test coverage includes:
ctx_grepandctx_readNotes
readwas already documented and covered byexisting code/tests
broadening scope beyond that