Skip to content

Commit e44ad19

Browse files
ericbuessclaude
andcommitted
Add technical details to README and gitignore CLAUDE.md
- Added brief Technical Details section explaining the compressed format - Clarified that file storage uses minified JSON while clipboard uses pretty-print - Added CLAUDE.md to .gitignore for user customization 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 5816397 commit e44ad19

3 files changed

Lines changed: 12 additions & 1 deletion

File tree

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,6 @@ settings.json.backup*
3333
# Runtime configuration
3434
.python_cmd
3535
.clipboard_content.txt
36+
37+
# User customization
38+
CLAUDE.md

PROJECT_INDEX.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"at":"2025-08-22T12:14:01.127458","root":".","tree":[".","\u251c\u2500\u2500 scripts/ (6 files)","\u251c\u2500\u2500 tests/ (4 files)","\u2514\u2500\u2500 README.md"],"stats":{"total_files":9,"total_directories":2,"fully_parsed":{"shell":1,"python":4},"listed_only":{"json":1,"shell":3},"markdown_files":2},"f":{"s/find_python.sh":["s",["find_python:0:()::"]],"s/i_flag_hook.py":["p",["find_project_root:23:()::Find project root by looking for .git or common project markers.","get_last_interactive_size:45:():find_project_root:Get the last remembered -i size from the index.","parse_index_flag:66:(prompt):get_last_interactive_size:Parse -i or -ic flag with optional size.","calculate_files_hash:104:(project_root)::Calculate hash of non-ignored files to detect changes.","should_regenerate_index:141:(project_root, index_path, requested_size_k):calculate_files_hash:Determine if index needs regeneration.","generate_index_at_size:173:(project_root, target_size_k, is_clipboard_mode=False):calculate_files_hash:Generate index at specific token size.","copy_to_clipboard:259:(prompt, index_path)::Copy prompt, instructions, and index to clipboard for external AI.","main:566:():copy_to_clipboard,find_project_root,generate_index_at_size,parse_index_flag,should_regenerate_index:Process UserPromptSubmit hook for -i and -ic flag detection."]],"s/index_utils.py":["p",["extract_function_calls_python:74:(body:str, all_functions:Set[str])>List[str]::Extract function calls from Python code body.","extract_function_calls_javascript:104:(body:str, all_functions:Set[str])>List[str]::Extract function calls from JavaScript/TypeScript code body.","build_call_graph:132:(functions:Dict, classes:Dict)>Tuple[Dict, Dict]::Build bidirectional call graph from extracted functions and methods.","extract_python_signatures:161:(content:str)>Dict[str, Dict]:extract_function_calls_python:Extract Python function and class signatures with full details for all files.","extract_javascript_signatures:545:(content:str)>Dict[str, any]:extract_function_calls_javascript,pos_to_line:Extract JavaScript/TypeScript function and class signatures with full details.","extract_function_calls_shell:906:(body:str, all_functions:Set[str])>List[str]::Extract function calls from shell script body.","extract_shell_signatures:928:(content:str)>Dict[str, any]:extract_function_calls_shell:Extract shell script function signatures and structure.","extract_markdown_structure:1186:(file_path:Path)>Dict[str, List[str]]::Extract headers and architectural hints from markdown files.","infer_file_purpose:1217:(file_path:Path)>Optional[str]::Infer the purpose of a file from its name and location.","infer_directory_purpose:1240:(path:Path, files_within:List[str])>Optional[str]::Infer directory purpose from naming patterns and contents.","get_language_name:1270:(extension:str)>str::Get readable language name from extension.","parse_gitignore:1281:(gitignore_path:Path)>List[str]::Parse a .gitignore file and return list of patterns.","load_gitignore_patterns:1301:(root_path:Path)>Set[str]:parse_gitignore:Load all gitignore patterns from project root and merge with defaults.","matches_gitignore_pattern:1324:(path:Path, patterns:Set[str], root_path:Path)>bool::Check if a path matches any gitignore pattern.","should_index_file:1368:(path:Path, root_path:Path = None)>bool:load_gitignore_patterns,matches_gitignore_pattern:Check if we should index this file.","get_git_files:1388:(root_path:Path)>Optional[List[Path]]::"]],"s/project_index.py":["p",["generate_tree_structure:40:(root_path:Path, max_depth:int = MAX_TREE_DEPTH)>List[str]:add_tree_level,should_include_dir:Generate a compact ASCII tree representation of the directory structure.","build_index:109:(root_dir:str)>Tuple[Dict, int]:generate_tree_structure:Build the enhanced index with architectural awareness.","convert_to_enhanced_dense_format:404:(index:Dict)>Dict:truncate_doc:Convert to enhanced dense format that preserves all AI-relevant information.","compress_if_needed:529:(dense_index:Dict, target_size:int = MAX_INDEX_SIZE)>Dict::Compress dense index further if it exceeds size limit.","print_summary:660:(index:Dict, skipped_count:int)::Print a helpful summary of what was indexed.","main:708:():build_index,compress_if_needed,convert_to_enhanced_dense_format,print_summary:Run the enhanced indexer."]],"s/stop_hook.py":["p",["main:14:()::Stop hook - regenerate index if PROJECT_INDEX.json exists."]]},"g":[["generate_tree_structure","should_include_dir"],["main","build_index"],["main","convert_to_enhanced_dense_format"],["extract_python_signatures","extract_function_calls_python"],["main","copy_to_clipboard"],["should_index_file","load_gitignore_patterns"],["main","should_regenerate_index"],["generate_tree_structure","add_tree_level"],["generate_index_at_size","calculate_files_hash"],["main","print_summary"],["main","generate_index_at_size"],["extract_javascript_signatures","extract_function_calls_javascript"],["should_regenerate_index","calculate_files_hash"],["build_index","generate_tree_structure"],["main","compress_if_needed"],["get_last_interactive_size","find_project_root"],["parse_index_flag","get_last_interactive_size"],["load_gitignore_patterns","parse_gitignore"],["extract_shell_signatures","extract_function_calls_shell"],["should_index_file","matches_gitignore_pattern"],["main","parse_index_flag"],["main","find_project_root"],["extract_javascript_signatures","pos_to_line"],["convert_to_enhanced_dense_format","truncate_doc"]],"d":{".claude-code-ericbuess/CONTEXT_STATE.md":["\ud83d\udd04 Auto-Generated Context State","\ud83d\udccd Current Session","\ud83d\udcca Git Status","\ud83d\udcdd Recently Modified Files","\ud83d\udccc Context Notes"],"README.md":["Project Index for Claude Code","Background","Quick Install","Usage","Or manually create/update the index anytime","What It Does","Three Ways to Use","Small Projects - Direct Reference with `@PROJECT_INDEX.json`","Reference directly in your prompt","Or auto-load in every session by adding to CLAUDE.md:"]},"deps":{"scripts/i_flag_hook.py":["json","sys","os","re","subprocess","hashlib","time","pathlib","datetime","sys","vm_client_network","vm_client","base64","pyperclip"],"scripts/index_utils.py":["re","fnmatch","pathlib","typing","subprocess"],"scripts/project_index.py":["json","os","re","datetime","pathlib","typing","index_utils","index_utils","sys"],"scripts/stop_hook.py":["json","sys","os","subprocess","pathlib"]},"dir_purposes":{"scripts":"Build and utility scripts"},"staleness":1755278041.145744}
1+
{"at":"2025-08-22T12:27:38.295349","root":".","tree":[".","\u251c\u2500\u2500 scripts/ (6 files)","\u251c\u2500\u2500 tests/ (4 files)","\u2514\u2500\u2500 README.md"],"stats":{"total_files":9,"total_directories":2,"fully_parsed":{"shell":1,"python":4},"listed_only":{"json":1,"shell":3},"markdown_files":2},"f":{"s/find_python.sh":["s",["find_python:0:()::"]],"s/i_flag_hook.py":["p",["find_project_root:23:()::Find project root by looking for .git or common project markers.","get_last_interactive_size:45:():find_project_root:Get the last remembered -i size from the index.","parse_index_flag:66:(prompt):get_last_interactive_size:Parse -i or -ic flag with optional size.","calculate_files_hash:104:(project_root)::Calculate hash of non-ignored files to detect changes.","should_regenerate_index:141:(project_root, index_path, requested_size_k):calculate_files_hash:Determine if index needs regeneration.","generate_index_at_size:173:(project_root, target_size_k, is_clipboard_mode=False):calculate_files_hash:Generate index at specific token size.","copy_to_clipboard:259:(prompt, index_path)::Copy prompt, instructions, and index to clipboard for external AI.","main:566:():copy_to_clipboard,find_project_root,generate_index_at_size,parse_index_flag,should_regenerate_index:Process UserPromptSubmit hook for -i and -ic flag detection."]],"s/index_utils.py":["p",["extract_function_calls_python:74:(body:str, all_functions:Set[str])>List[str]::Extract function calls from Python code body.","extract_function_calls_javascript:104:(body:str, all_functions:Set[str])>List[str]::Extract function calls from JavaScript/TypeScript code body.","build_call_graph:132:(functions:Dict, classes:Dict)>Tuple[Dict, Dict]::Build bidirectional call graph from extracted functions and methods.","extract_python_signatures:161:(content:str)>Dict[str, Dict]:extract_function_calls_python:Extract Python function and class signatures with full details for all files.","extract_javascript_signatures:545:(content:str)>Dict[str, any]:extract_function_calls_javascript,pos_to_line:Extract JavaScript/TypeScript function and class signatures with full details.","extract_function_calls_shell:906:(body:str, all_functions:Set[str])>List[str]::Extract function calls from shell script body.","extract_shell_signatures:928:(content:str)>Dict[str, any]:extract_function_calls_shell:Extract shell script function signatures and structure.","extract_markdown_structure:1186:(file_path:Path)>Dict[str, List[str]]::Extract headers and architectural hints from markdown files.","infer_file_purpose:1217:(file_path:Path)>Optional[str]::Infer the purpose of a file from its name and location.","infer_directory_purpose:1240:(path:Path, files_within:List[str])>Optional[str]::Infer directory purpose from naming patterns and contents.","get_language_name:1270:(extension:str)>str::Get readable language name from extension.","parse_gitignore:1281:(gitignore_path:Path)>List[str]::Parse a .gitignore file and return list of patterns.","load_gitignore_patterns:1301:(root_path:Path)>Set[str]:parse_gitignore:Load all gitignore patterns from project root and merge with defaults.","matches_gitignore_pattern:1324:(path:Path, patterns:Set[str], root_path:Path)>bool::Check if a path matches any gitignore pattern.","should_index_file:1368:(path:Path, root_path:Path = None)>bool:load_gitignore_patterns,matches_gitignore_pattern:Check if we should index this file.","get_git_files:1388:(root_path:Path)>Optional[List[Path]]::"]],"s/project_index.py":["p",["generate_tree_structure:40:(root_path:Path, max_depth:int = MAX_TREE_DEPTH)>List[str]:add_tree_level,should_include_dir:Generate a compact ASCII tree representation of the directory structure.","build_index:109:(root_dir:str)>Tuple[Dict, int]:generate_tree_structure:Build the enhanced index with architectural awareness.","convert_to_enhanced_dense_format:404:(index:Dict)>Dict:truncate_doc:Convert to enhanced dense format that preserves all AI-relevant information.","compress_if_needed:529:(dense_index:Dict, target_size:int = MAX_INDEX_SIZE)>Dict::Compress dense index further if it exceeds size limit.","print_summary:660:(index:Dict, skipped_count:int)::Print a helpful summary of what was indexed.","main:708:():build_index,compress_if_needed,convert_to_enhanced_dense_format,print_summary:Run the enhanced indexer."]],"s/stop_hook.py":["p",["main:14:()::Stop hook - regenerate index if PROJECT_INDEX.json exists."]]},"g":[["extract_javascript_signatures","extract_function_calls_javascript"],["extract_python_signatures","extract_function_calls_python"],["extract_shell_signatures","extract_function_calls_shell"],["main","convert_to_enhanced_dense_format"],["extract_javascript_signatures","pos_to_line"],["get_last_interactive_size","find_project_root"],["should_index_file","matches_gitignore_pattern"],["main","copy_to_clipboard"],["main","find_project_root"],["generate_tree_structure","add_tree_level"],["should_regenerate_index","calculate_files_hash"],["main","build_index"],["generate_tree_structure","should_include_dir"],["main","print_summary"],["convert_to_enhanced_dense_format","truncate_doc"],["main","should_regenerate_index"],["should_index_file","load_gitignore_patterns"],["build_index","generate_tree_structure"],["parse_index_flag","get_last_interactive_size"],["main","parse_index_flag"],["main","compress_if_needed"],["load_gitignore_patterns","parse_gitignore"],["generate_index_at_size","calculate_files_hash"],["main","generate_index_at_size"]],"d":{".claude-code-ericbuess/CONTEXT_STATE.md":["\ud83d\udd04 Auto-Generated Context State","\ud83d\udccd Current Session","\ud83d\udcca Git Status","\ud83d\udcdd Recently Modified Files","\ud83d\udccc Context Notes"],"README.md":["Project Index for Claude Code","Background","Quick Install","Usage","Or manually create/update the index anytime","What It Does","Three Ways to Use","Small Projects - Direct Reference with `@PROJECT_INDEX.json`","Reference directly in your prompt","Or auto-load in every session by adding to CLAUDE.md:"]},"deps":{"scripts/i_flag_hook.py":["json","sys","os","re","subprocess","hashlib","time","pathlib","datetime","sys","vm_client_network","vm_client","base64","pyperclip"],"scripts/index_utils.py":["re","fnmatch","pathlib","typing","subprocess"],"scripts/project_index.py":["json","os","re","datetime","pathlib","typing","index_utils","index_utils","sys"],"scripts/stop_hook.py":["json","sys","os","subprocess","pathlib"]},"dir_purposes":{"scripts":"Build and utility scripts"},"staleness":1755278858.312746}

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,14 @@ For any issue, just describe it to Claude and let it fix the tool for you!
190190
- SSH users: Content saved to `.clipboard_content.txt`
191191
- For unlimited clipboard over SSH: [VM Bridge](https://github.com/ericbuess/vm-bridge)
192192

193+
## Technical Details
194+
195+
The index uses a compressed format to save ~50% space:
196+
- Minified JSON (single line) for file storage
197+
- Short keys: `f`→files, `g`→graph, `d`→docs, `deps`→dependencies
198+
- Compact function signatures with line numbers
199+
- Clipboard mode (`-ic`) uses readable formatting for external AI tools
200+
193201
## Uninstall
194202

195203
```bash

0 commit comments

Comments
 (0)