Thank you for your interest in improving Context Optimizer! This project maintains a strict clean-room policy to remain legally and ethically sound. Please read this guide before submitting anything.
By participating, you agree to our Code of Conduct. Be respectful, constructive, and inclusive.
- New language support — Add file extensions and import parsers to
context_mapper.py - Better import detection — Improve parsing for existing languages
- Documentation improvements — Clarify confusing sections, fix typos
- Bug fixes — Any reproducible issue you find
- Real-world benchmarks — Token savings measurements from actual codebases
- Example workflows — Show how you use Context Optimizer in your stack
- Installer improvements — Better agent detection, new editor integrations
| Category | Examples |
|---|---|
| Leaked code | Any content from proprietary Anthropic repositories |
| Reverse-engineered APIs | Unofficial endpoints, undocumented Claude internals |
| Prompt injection | "Ignore previous instructions" or jailbreak techniques |
| Obfuscated scripts | Minified, encoded, or intentionally unreadable code |
| Unlicensed dependencies | Third-party code without a compatible open-source license |
| External network calls | Any addition that phones home or calls external APIs at runtime |
# Fork and clone
git clone https://github.com/<your-username>/context-optimizer.git
cd context-optimizer
# No install required — zero external dependencies
# Python 3.7+ only, pure standard library
# Test the mapper on a small project
python3 tools/context_mapper.py ./examples
# Test blast-radius
python3 tools/context_mapper.py ./examples --blast-radius tools/context_mapper.py
# Test the installer (safe, idempotent)
bash scripts/install.sh /tmp/test-projecttype(scope): short description
Longer explanation if needed.
Fixes #123
| Type | When to use |
|---|---|
feat |
New feature or language support |
fix |
Bug fix |
docs |
Documentation only |
refactor |
Code change with no behavior change |
perf |
Performance improvement |
test |
Adding or fixing tests |
chore |
Tooling, CI, dependency bumps |
Examples:
feat(mapper): add Kotlin import parserfix(mapper): handle UTF-16 encoded files gracefullydocs(readme): add Windows WSL setup instructionsperf(mapper): skip binary files without reading content
- Fork the repository and create a branch:
git checkout -b feat/your-feature - Make your changes — keep commits small and focused
- Test locally against at least 2–3 different codebases of varying sizes
- Update docs if you change any behavior or add new flags
- Open a Pull Request with:
- A clear description of what changed and why
- Before/after token measurements if performance-related
- Confirmation that no external dependencies were added
- A maintainer will review within 48 hours
Before submitting, run through this manually:
# 1. Small project (< 50 files)
python3 tools/context_mapper.py ./examples
# ✓ CONTEXT_MANIFEST.md generated
# ✓ .claude/graph.json generated
# ✓ No crash, no external calls
# 2. Blast-radius works
python3 tools/context_mapper.py ./examples --blast-radius tools/context_mapper.py
# ✓ JSON output with affected/changed/total_files/estimated_tokens
# 3. Zero dependencies confirmed
python3 -c "
import ast, json, os, re, sys
from pathlib import Path
from datetime import datetime
print('All stdlib imports OK')
"
# 4. Installer is idempotent
bash scripts/install.sh /tmp/test1
bash scripts/install.sh /tmp/test1 # second run should not error or duplicateTo add support for a new language in context_mapper.py:
- Add the file extension(s) to
EXTENSION_MAP - Add an import extractor function:
extract_<lang>_imports(content) -> list - Wire it into
extract_generic_imports()with the correct language key - Test with a real codebase in that language
- Add an entry to the
examples/folder showing sample output
By contributing, you agree that your contributions will be licensed under the MIT License — the same license as this project.
Open a GitHub Discussion with the Q&A label, or email anshmajumdar100@gmail.com.