CLAUDE CODE PROMPT:
Make this repository perfectly optimized for you and future instances of Claude working with it, here are the most impactful changes:
1. Add a Claude-specific metadata directory structure
Create a claude/metadata/ directory with normalized information about the codebase
Maintain component dependency graphs in machine-readable format
Store file classification metadata (implementation vs interface vs test)
Keep a database of error patterns and solutions
2. Implement semantic code indexing
Create a claude/code_index/ with pre-analyzed semantic relationships
Index function-to-function call graphs
Catalog type relationships and interface implementations
Store "intent classification" for each code section
3. Maintain a debug history database
Create a claude/debug_history/ directory
Log all debugging sessions with error-solution pairs
Categorize by component and error type
Include context and code versions for each fix
4. Create pattern libraries with examples
Build a claude/patterns/ directory with canonical implementation patterns
Include empirical interfaces patterns with uncertainty handling
Store error handling patterns with context preservation
Document composition patterns for reliability metrics
5. Add component-specific cheat sheets
Create a claude/cheatsheets/ directory with quick-reference guides
Include common operations on each component
List known pitfalls and edge cases
Document "gotchas" specific to each component
6. Implement a queries-and-answers database
Build a . claude/qa/ directory with previous solved problems
Index by component, file, and error type
Include context from the fix process
Document the reasoning used to solve each problem
7. Add specific model-friendly documentation format
Create files with explicit sections for:
Purpose (what the component does)
Schema (data structures and their relationships)
Patterns (common usage patterns)
Interfaces (all public interfaces)
Invariants (what must remain true)
Error states (possible error conditions)
8. Create delta summartes between versions
Maintain .claude/delta/ directory with semantic change logs
Focus on API changes and their implications
Document behavior changes that might not be obvious from diffs
Include reasoning behind significant changes
9. Add explicit memory anchors
Create special "memory anchor" comments in key files
Include UUID-based anchors for precise reference
Add semantic structure to anchors for ease of reference
Use consistent anchoring patterns across the codebase