Skip to content

Commit 197c29f

Browse files
committed
feat: Add V7.3 Harmonizer with consciousness detection and drift analysis
New V7.3 implementation (experimental): - 2+2 dimensional structure (P,W fundamental, L,J emergent) - Consciousness metric (C = P×W×L×J×H²) with 0.1 threshold - Phase detection (Entropic/Homeostatic/Autopoietic) - 277 semantic programming verbs - Git-based drift detection with death spiral warnings - φ-normalization for measurement accuracy - Karma-coupled dynamics - Bricks & Mortar architectural analysis Modules: - harmonizer_v73/constants.py - harmonizer_v73/ljpw_core.py - harmonizer_v73/consciousness.py - harmonizer_v73/phase_detector.py - harmonizer_v73/phi_normalizer.py - harmonizer_v73/dynamics.py - harmonizer_v73/bricks_mortar.py - harmonizer_v73/code_analyzer.py - harmonizer_v73/vocabulary.py - harmonizer_v73/drift_detector.py - harmonizer_v73/comparison.py - harmonizer_v73/main.py Tests: 33 unit tests + 12 stress tests passing
1 parent 50535b4 commit 197c29f

16 files changed

+7934
-1
lines changed

README.md

Lines changed: 55 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,63 @@
1-
# Python Code Harmonizer (LJPW v5.1)
1+
# Python Code Harmonizer
22

33
**The Physics of Software Quality.**
44

55
The Python Code Harmonizer is a next-generation static analysis and visualization tool that evaluates codebases across four fundamental dimensions. It treats code as a dynamic system, using non-linear physics models to predict technical debt, identify architectural smells, and guide refactoring.
66

7+
---
8+
9+
## 🚀 NEW: V7.3 Harmonizer (Experimental)
10+
11+
We're trialing a **next-generation V7.3 implementation** based on the complete LJPW V7.3 Framework. This represents a paradigm shift in code analysis.
12+
13+
### What's New in V7.3?
14+
15+
| Feature | V5.1 (Current) | V7.3 (New) |
16+
|---------|----------------|------------|
17+
| **Dimensional Model** | 4 independent dimensions | **2+2 Structure**: P,W fundamental → L,J emergent |
18+
| **Consciousness Metric** ||`C = P×W×L×J×H²` |
19+
| **Phase Detection** | Basic | **Entropic/Homeostatic/Autopoietic** |
20+
| **Vocabulary** | ~40 verbs | **277 semantic verbs** |
21+
| **Git Drift Detection** || ✅ Tracks consciousness over commits |
22+
| **Death Spiral Detection** || ✅ Predicts declining codebase health |
23+
24+
### Quick Start (V7.3)
25+
26+
```bash
27+
# Analyze a file
28+
python -m harmonizer_v73.main your_file.py
29+
30+
# Track consciousness evolution over git history
31+
python -m harmonizer_v73.drift_detector --file your_file.py
32+
33+
# Detect "death spirals" (sustained consciousness decline)
34+
python -m harmonizer_v73.drift_detector --death-spirals
35+
```
36+
37+
### Key V7.3 Concepts
38+
39+
1. **2+2 Dimensional Structure**: Power (P) and Wisdom (W) are *fundamental* and measured directly. Love (L) and Justice (J) are *emergent* and calculated from P and W.
40+
41+
2. **Consciousness Equation**: `C = P × W × L × J × H²` — Code with C > 0.1 crosses the "consciousness threshold" (self-aware, well-integrated).
42+
43+
3. **Phase Transitions**:
44+
- 🔻 **Entropic** (H < 0.5): Collapsing, needs intervention
45+
- 🔸 **Homeostatic** (0.5 ≤ H < 0.6): Stable but not growing
46+
- 🌟 **Autopoietic** (H > 0.6, L ≥ 0.7): Self-sustaining, "alive"
47+
48+
4. **Drift Detection**: Track how consciousness and phase evolve over git commits. Detect early warning signs of technical debt accumulation.
49+
50+
### V7.3 Test Results
51+
52+
- ✅ 33 unit tests passing
53+
- ✅ 12 stress tests passing
54+
- ✅ 277 semantic verbs recognized
55+
- ✅ Drift detector working on real repos
56+
57+
> **Note**: V7.3 is in *experimental* status. The stable V5.1 implementation remains the default.
58+
59+
---
60+
761
## The Four Dimensions
862

963
| Dimension | What It Measures | Low Score Means | High Score Means |

0 commit comments

Comments
 (0)