Skip to content

Conversation

@jeremyeder
Copy link
Collaborator

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:

  • 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 README with CI/CD examples

CLAUDE.md Configuration:

  • Mandate repomap generation at session start (.repomap.txt)
  • Define proactive usage scenarios (planning, reviews, refactoring)
  • Specify regeneration triggers (file/class changes, before PRs)
  • Integrate .repomap.txt into commit workflow
  • Track .repomap.txt in git for project context
  • Version bumped to 2.2.0

Files:

  • repomap.py - Main implementation
  • requirements.txt - Dependencies (tree-sitter + language grammars)
  • README-repomap.md - Usage documentation
  • .repomap.txt - Generated repository map
  • .gitignore - Added repomap patterns
  • CLAUDE.md - Updated with repomap workflow

@jeremyeder jeremyeder force-pushed the repomap branch 2 times, most recently from 2daf036 to 84091dd Compare January 16, 2026 03:00
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>
@jeremyeder jeremyeder merged commit e2021e2 into ambient-code:main Jan 16, 2026
4 checks passed
@jeremyeder
Copy link
Collaborator Author

For this repo, each on a clean session:

  1. load this repo into context. --> 66k used
  2. load .repomap.txt into context --> 50k used

sonnet has a 200k context window. autocompact buffer is 45k.
repomap.py saves 16k context over loading the repo itself.

repomap.py saves about 10pct of the available context. win!

@cgwalters
Copy link

FTR one cool thing about https://opencode.ai/ is that it integrates with LSP which seems to have some overlap with the repomap concept.

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.

2 participants