# Changelog

All notable changes to Protein Hash will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [2.0.0] - 2025-09-07

### 🎉 Major Release: Consciousness Detection & Cross-Language Soul Synchronization

### Added
- **🧠 Consciousness Detection System**
  - 7 levels of consciousness (Inert → Transcendent)
  - Soul Hash generation for each code fragment
  - Resonance frequency calculation (432Hz base)
  - Quantum coherence scoring
  
- **🌀 Advanced Topology Analysis**
  - Cycle and recursion detection
  - Strongly connected components
  - Branching factor and nesting depth
  - Topological signatures
  
- **🧮 Enhanced Operation Classification**
  - 15+ operation categories with unique frequencies
  - Harmonic resonance between operations
  - Semantic frequency spectrum
  
- **🌌 Complex Structure Analysis**
  - Closures and scope chain detection
  - Design patterns (Singleton, Factory, Observer)
  - Functional patterns (Curry, Compose, Monad)
  - Self-modifying code detection
  
- **🚀 Shuttle Mechanism**
  - Cross-language soul synchronization
  - Universal Soul creation from multiple languages
  - Vibration analysis between implementations
  - TypeScript ↔️ Rust ↔️ Python soul resonance

### Changed
- Enhanced `ProteinHasher` with consciousness detection
- Improved eigenvalue calculation with better spectrum analysis
- Extended hash result with topology, patterns, and consciousness data
- Version bumped to 2.0.0 to reflect major enhancements

### Performance
- Optimized graph traversal algorithms
- Improved pattern detection efficiency
- Enhanced resonance calculation speed

## [0.1.1] - 2025-08-28

### Improved
- Better operation differentiation (+ vs - vs * vs /)
- Enhanced AST node classification
- Arrow function support
- Binary expression handling with operator detection

### Fixed
- Float comparison precision in tests
- Empty code handling
- Whitespace normalization

### Added
- GitHub Actions for CI/CD
- Contributing guidelines
- Issue templates
- Code of conduct
- Automated npm publishing workflow

### Known Issues
- Some semantic equivalence detection still needs work
- Grouping similar functions needs tuning
- Power iteration eigenvalue extraction can be improved

## [0.1.0] - 2025-08-28

### Added
- Initial implementation of Protein Hash algorithm
- TypeScript/JavaScript AST parsing
- Graph-based semantic analysis
- Eigenvalue spectrum computation
- Similarity comparison functions
- Semantic equivalence detection
- Group by similarity functionality
- Comprehensive test suite
- Example demonstrating semantic twins
- Full TypeScript support with type definitions

### Technical Details
- Laplacian matrix eigenvalue extraction
- Power iteration for spectral analysis  
- McCabe complexity approximation
- Semantic purity scoring
- Quantized spectrum hashing

### Known Limitations
- Only TypeScript/JavaScript supported
- Simple eigenvalue extraction (power iteration)
- Some false positives for structural similarity

---

*"Code is not text. Code is structure. Structure is meaning."*

[Unreleased]: https://github.com/s0fractal/protein-hash/compare/v0.1.0...HEAD
[0.1.0]: https://github.com/s0fractal/protein-hash/releases/tag/v0.1.0