Add repomap tool for AI-friendly code structure maps#22
Merged
jeremyeder merged 1 commit intoambient-code:mainfrom Jan 16, 2026
Merged
Add repomap tool for AI-friendly code structure maps#22jeremyeder merged 1 commit intoambient-code:mainfrom
jeremyeder merged 1 commit intoambient-code:mainfrom
Conversation
2daf036 to
84091dd
Compare
Implement tree-sitter based repomap tool inspired by Aider's repomap.py. Generates token-optimized code structure maps for AI-assisted development. Implementation: - Single-file repomap.py (~330 lines) - Tree-sitter parsing for Python, TypeScript, JavaScript, Go, Shell - Parallel processing for performance - Respects .gitignore patterns - CLI with --verbose, --max-file-size, --no-parallel options - Comprehensive documentation with CI/CD examples CLAUDE.md Configuration: - Mandate LOADING .repomap.txt at session start (not generating) - .repomap.txt tracked in git for project context - Define proactive usage scenarios (planning, reviews, refactoring) - Specify regeneration triggers (file/class changes, before PRs) - Integrate .repomap.txt into commit workflow - Version bumped to 2.2.0 Files: - repomap.py - Main implementation - requirements.txt - Dependencies (tree-sitter + language grammars) - docs/patterns/repomap.md - Pattern documentation - .repomap.txt - Generated repository map (tracked in git) - .gitignore - Added repomap patterns - CLAUDE.md - Updated with repomap workflow Terminology: - Replaced all "codemap" references with "repomap" throughout codebase Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Collaborator
Author
|
For this repo, each on a clean session:
sonnet has a 200k context window. autocompact buffer is 45k. repomap.py saves about 10pct of the available context. win! |
|
FTR one cool thing about https://opencode.ai/ is that it integrates with LSP which seems to have some overlap with the repomap concept. |
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.
the changes to CLAUDE.md load repomap.txt at session start and proactively throughout.
Implement tree-sitter based repomap tool inspired by Aider's repomap.py. Generates token-optimized code structure maps for AI-assisted development.
Implementation:
CLAUDE.md Configuration:
Files: