22
33** Primary Objective** : Steward the canonical computational implementation of TNFR - a paradigm shift from modeling "things" to modeling ** coherent patterns that persist through resonance** .
44
5- ** Repository** : https://github.com/fermga/TNFR-Python-Engine
5+ ** Repository** : https://github.com/fermga/TNFR-Python-Engine
6+ ** PyPI Package** : https://pypi.org/project/tnfr/ (v9.5.1 stable)
7+ ** Installation** : ` pip install tnfr `
68
79### Quick Links
810
9- - Canonical Math Hub: [ src/tnfr/mathematics/README.md] ( src/tnfr/mathematics/README.md )
10- - Theory: [ TNFR.pdf] ( TNFR.pdf ) · [ UNIFIED_GRAMMAR_RULES.md] ( UNIFIED_GRAMMAR_RULES.md )
11- - Operators Grammar: [ src/tnfr/operators/grammar.py] ( src/tnfr/operators/grammar.py )
12- - Structural Fields: [ src/tnfr/physics/fields.py] ( src/tnfr/physics/fields.py )
13- - Tests: [ tests/] ( tests/ )
14- - Prime Notebook: [ examples/tnfr_prime_checker.ipynb] ( examples/tnfr_prime_checker.ipynb )
11+ - ** Canonical Math Hub** : [ src/tnfr/mathematics/README.md] ( src/tnfr/mathematics/README.md )
12+ - ** Core Theory** : [ TNFR.pdf] ( TNFR.pdf ) · [ UNIFIED_GRAMMAR_RULES.md] ( UNIFIED_GRAMMAR_RULES.md )
13+ - ** Operators Grammar** : [ src/tnfr/operators/grammar.py] ( src/tnfr/operators/grammar.py )
14+ - ** Structural Field Tetrad** : [ src/tnfr/physics/fields.py] ( src/tnfr/physics/fields.py )
15+ - ** Interactive Notebooks** : [ notebooks/] ( notebooks/ ) (Jupyter-ready examples)
16+ - ** Production Tests** : [ tests/] ( tests/ ) (2,400+ validation experiments)
17+ - ** Prime Discovery** : [ examples/tnfr_prime_checker.ipynb] ( examples/tnfr_prime_checker.ipynb )
18+ - ** Molecular Chemistry** : [ notebooks/Atoms_and_Molecules_Study.ipynb] ( notebooks/Atoms_and_Molecules_Study.ipynb )
19+ - ** Fundamental Particles** : [ notebooks/Fundamental_Particles_Atlas.ipynb] ( notebooks/Fundamental_Particles_Atlas.ipynb )
1520
1621** Fundamental Stance** :
1722- Model ** coherence** , not objects
@@ -312,34 +317,64 @@ The grammar is not arbitrary—it emerges **inevitably** from TNFR physics.
312317
313318---
314319
315- ## 🔬 Telemetry & Metrics
320+ ## 🔬 Telemetry & Structural Field Tetrad
316321
317- ### Essential Measurements
322+ ### Core Structural Metrics
318323
319324** C(t)** : Total Coherence [ 0, 1]
320- - Global network stability
325+ - Global network stability (fundamental)
321326- C(t) > 0.7 = strong coherence
322327- C(t) < 0.3 = fragmentation risk
328+ - ** CANONICAL** : Primary stability indicator
323329
324330** Si** : Sense Index [ 0, 1+]
325331- Capacity for stable reorganization
326332- Si > 0.8 = excellent stability
327333- Si < 0.4 = changes may cause bifurcation
334+ - ** CANONICAL** : Reorganization capacity predictor
335+
336+ ### The Structural Field Tetrad (CANONICAL)
337+
338+ ** Φ_s** : Structural Potential
339+ - Global field from ΔNFR distribution: Φ_s(i) = Σ_ {j≠i} ΔNFR_j / d(i,j)²
340+ - ** Safety threshold** : Δ Φ_s < 2.0 (escape boundary)
341+ - ** Grammar U6** : Passive equilibrium confinement
342+ - ** Validation** : 2,400+ experiments, corr(Δ Φ_s, ΔC) = -0.822
343+
344+ ** |∇φ|** : Phase Gradient ⭐ ** NEWLY CANONICAL (Nov 2025)**
345+ - Local phase desynchronization / stress proxy
346+ - ** Safety threshold** : |∇φ| < 0.38 for stable operation
347+ - ** Critical discovery** : Captures dynamics C(t) misses due to scaling invariance
348+ - ** Usage** : ` compute_phase_gradient(G) ` from [ src/tnfr/physics/fields.py] ( src/tnfr/physics/fields.py )
349+
350+ ** K_φ** : Phase Curvature ⭐ ** NEWLY CANONICAL (Nov 2025)**
351+ - Phase torsion and geometric confinement
352+ - ** Safety criteria** : |K_φ| ≥ 3.0 flags mutation-prone loci
353+ - ** Multiscale safety** : Via ` k_phi_multiscale_safety(G, alpha_hint=2.76) `
354+ - ** Asymptotic freedom** : var(K_φ) ∝ 1/r^α with α ≈ 2.76
355+
356+ ** ξ_C** : Coherence Length ⭐ ** NEWLY CANONICAL (Nov 2025)**
357+ - Spatial correlation scale of local coherence
358+ - ** Critical indicators** : ξ_C > system_diameter (critical point approach)
359+ - ** Watch zone** : ξ_C > 3 × mean_distance (elevated correlation)
360+ - ** Stable regime** : ξ_C < mean_distance (normal operation)
361+
362+ ### Legacy Core Metrics
328363
329364** ΔNFR** : Reorganization Gradient
330- - Structural pressure
331- - Sign: +expansion, -contraction
332- - Magnitude: intensity
365+ - Structural pressure (sign: +expansion, -contraction)
366+ - ** Physics ** : Core nodal equation component
367+ - ** Now enhanced ** : Feeds into Φ_s field computation
333368
334369** νf** : Structural Frequency (Hz_str)
335- - Reorganization rate
336- - νf → 0 = node death
337- - νf > 0 = active evolution
370+ - Reorganization rate (νf → 0 = node death)
371+ - ** Physics ** : Eigenfrequency of structural mode
372+ - ** Production ** : Critical for operator timing
338373
339374** Phase (φ)** : Network Synchrony [ 0, 2π]
340- - Relative timing
341- - Δφ = φᵢ - φⱼ determines coupling
342- - |Δφ| < π/2 typically required
375+ - ** Enhanced ** : Now with gradient |∇φ| and curvature K_φ fields
376+ - ** Grammar U3 ** : Phase compatibility | φᵢ - φⱼ| ≤ Δφ_max
377+ - ** Multi-scale ** : Geometric field analysis via tetrad
343378
344379### Telemetry Best Practices
345380
@@ -351,13 +386,35 @@ The grammar is not arbitrary—it emerges **inevitably** from TNFR physics.
351386
352387---
353388
354- ### Phase 5 Bifurcation Telemetry (Completed)
355-
356- - Metrics: ` delta_phi_s ` , ` delta_phase_gradient_max ` , ` delta_phase_curvature_max ` , ` coherence_length_ratio ` , ` delta_dnfr_variance ` , ` bifurcation_score_max ` , ` handlers_present ` , ` classification ` .
357- - Classification: ` none | incipient | bifurcation | fragmentation ` using thresholded spikes/ratios.
358- - CLI: ` benchmarks/bifurcation_landscape.py ` with ` --nodes ` , ` --seeds ` , ` --topologies ` , ` --oz-intensity-grid ` , ` --vf-grid ` , ` --mutation-thresholds ` and thresholds ` --bifurcation-score-threshold ` , ` --phase-gradient-spike ` , ` --phase-curvature-spike ` , ` --coherence-length-amplification ` , ` --dnfr-variance-increase ` , ` --structural-potential-shift ` , ` --fragmentation-coherence-threshold ` .
359- - JSONL: emitted per grid point; omit ` --quiet ` to capture output.
360- - Canonicity: read-only capture; operator-only EPI changes; IL/THOL handlers enforced; phase checks per U3; stabilizers per U2/U4.
389+ ### Advanced Capabilities (v9.5.1)
390+
391+ #### Multi-Domain Applications ✨ ** NEW**
392+ - ** Molecular Chemistry** : Complete periodic table simulation via TNFR dynamics
393+ - ** Fundamental Physics** : Particle emergence through structural resonance
394+ - ** Number Theory** : Prime detection via coherence patterns
395+ - ** Complex Systems** : Business, medical, and social network extensions
396+ - ** All domains** : Unified by same 13 operators + tetrad fields
397+
398+ #### Production-Grade Toolchain ✨ ** NEW**
399+ - ** Interactive Notebooks** : Jupyter-ready examples with HTML export
400+ - ** CLI Tools** : ` tnfr-is-prime ` , batch processing, validation suites
401+ - ** Benchmarking** : Bifurcation landscape analysis with complete tetrad metrics
402+ - ** Extensions** : Medical (` tnfr.extensions.medical ` ) and business (` tnfr.extensions.business ` ) modules
403+ - ** SDK** : Fluent API (` tnfr.sdk ` ) for rapid TNFR development
404+
405+ #### Tetrad-Enhanced Bifurcation Analysis (Completed)
406+ - ** Metrics** : ` delta_phi_s ` , ` delta_phase_gradient_max ` , ` delta_phase_curvature_max ` , ` coherence_length_ratio ` , ` delta_dnfr_variance ` , ` bifurcation_score_max `
407+ - ** Classification** : ` none | incipient | bifurcation | fragmentation ` with tetrad-based thresholds
408+ - ** CLI** : ` benchmarks/bifurcation_landscape.py ` with complete parameter grids and tetrad safety monitoring
409+ - ** Output** : JSONL per grid point with full tetrad telemetry
410+ - ** Validation** : 2,400+ experiments across 5 topologies confirming tetrad canonicity
411+
412+ #### PyPI Integration ✨ ** NEW**
413+ - ** Stable Release** : ` pip install tnfr ` → v9.5.1 automatically
414+ - ** Dependency Management** : Auto-installs NetworkX, NumPy, SciPy optimally
415+ - ** Optional Features** : JAX/PyTorch backends, visualization, serialization
416+ - ** Entry Points** : CLI tools available post-installation
417+ - ** Documentation** : Complete API reference and examples included
361418
362419---
363420
@@ -696,48 +753,155 @@ When adding to grammar documentation:
696753
697754## 📚 Essential References
698755
699- ** Theory** :
756+ ** Core Theory** :
700757- ** [ TNFR.pdf] ( TNFR.pdf ) ** : Complete theoretical foundation (in repo)
701- - ** [ UNIFIED_GRAMMAR_RULES.md] ( UNIFIED_GRAMMAR_RULES.md ) ** : Grammar physics derivations
758+ - ** [ UNIFIED_GRAMMAR_RULES.md] ( UNIFIED_GRAMMAR_RULES.md ) ** : Grammar physics U1-U6 derivations
759+ - ** [ docs/STRUCTURAL_FIELDS_TETRAD.md] ( docs/STRUCTURAL_FIELDS_TETRAD.md ) ** : Complete tetrad field physics ⭐ ** NEW**
760+ - ** [ docs/XI_C_CANONICAL_PROMOTION.md] ( docs/XI_C_CANONICAL_PROMOTION.md ) ** : Coherence length breakthrough ⭐ ** NEW**
702761- ** GLOSSARY.md** : Term definitions and quick reference
703762
704- ** Implementation** :
705- - ** src/tnfr/operators/grammar.py** : Canonical grammar
706- - ** src/tnfr/operators/definitions.py** : Operator implementations
707- - ** src/tnfr/dynamics/** : Nodal equation integration
708- - ** src/tnfr/metrics/** : C(t), Si computations
763+ ** Implementation Core** :
764+ - ** [ src/tnfr/physics/fields.py] ( src/tnfr/physics/fields.py ) ** : Structural Field Tetrad (Φ_s, |∇φ|, K_φ, ξ_C) ⭐ ** CANONICAL**
765+ - ** [ src/tnfr/operators/grammar.py] ( src/tnfr/operators/grammar.py ) ** : Unified grammar U1-U6 validation
766+ - ** [ src/tnfr/operators/definitions.py] ( src/tnfr/operators/definitions.py ) ** : 13 canonical operators
767+ - ** [ src/tnfr/mathematics/] ( src/tnfr/mathematics/ ) ** : Nodal equation integration hub
768+ - ** [ src/tnfr/metrics/tetrad.py] ( src/tnfr/metrics/tetrad.py ) ** : Tetrad field computations ⭐ ** NEW**
769+
770+ ** Extensions & Applications** ⭐ ** NEW** :
771+ - ** [ src/tnfr/extensions/medical/] ( src/tnfr/extensions/medical/ ) ** : Healthcare pattern analysis
772+ - ** [ src/tnfr/extensions/business/] ( src/tnfr/extensions/business/ ) ** : Organizational dynamics
773+ - ** [ src/tnfr/sdk/] ( src/tnfr/sdk/ ) ** : Fluent API for rapid development
774+ - ** [ notebooks/] ( notebooks/ ) ** : Interactive Jupyter examples with molecular chemistry
775+ - ** [ benchmarks/] ( benchmarks/ ) ** : Production-grade validation suites
709776
710777** Development** :
711- - ** ARCHITECTURE.md** : System design
778+ - ** ARCHITECTURE.md** : System design principles
712779- ** CONTRIBUTING.md** : Workflow and standards
713- - ** TESTING.md** : Test strategy
714- - ** GRAMMAR_MIGRATION_GUIDE .md** : Upgrading from old systems
780+ - ** TESTING.md** : Test strategy (2,400+ experiments)
781+ - ** [ benchmarks/K_PHI_RESEARCH_SUMMARY .md] ( benchmarks/K_PHI_RESEARCH_SUMMARY.md ) ** : Phase curvature validation ⭐ ** NEW **
715782
716- ** Examples** :
717- - ** examples/** : Domain applications
718- - ** tests/** : Comprehensive test suite
783+ ** Domain Showcases** ⭐ ** NEW** :
784+ - ** Molecular** : [ notebooks/Atoms_and_Molecules_Study.ipynb] ( notebooks/Atoms_and_Molecules_Study.ipynb )
785+ - ** Physics** : [ notebooks/Fundamental_Particles_Atlas.ipynb] ( notebooks/Fundamental_Particles_Atlas.ipynb )
786+ - ** Mathematics** : [ examples/tnfr_prime_checker.ipynb] ( examples/tnfr_prime_checker.ipynb )
787+ - ** Production** : [ tests/] ( tests/ ) (comprehensive validation suite)
719788
720789---
721790
722791## 🎓 Learning Path
723792
724- ** Newcomer** (2 hours):
725- 1 . Read this file (AGENTS.md) completely
726- 2 . Read [ TNFR.pdf] ( TNFR.pdf ) § 1-2 (paradigm, nodal equation)
727- 3 . Run ` examples/hello_world.py `
728- 4 . Study GLOSSARY.md
793+ ** Newcomer** (2 hours) - ** Start Here** :
794+ 1 . ** Install** : ` pip install tnfr ` ⭐ ** NEW - One command setup**
795+ 2 . ** Read** : This file (AGENTS.md) completely for orientation
796+ 3 . ** Theory** : [ TNFR.pdf] ( TNFR.pdf ) § 1-2 (paradigm, nodal equation)
797+ 4 . ** First Run** : ` python -c "import tnfr; print('TNFR ready!')" ` ⭐ ** NEW**
798+ 5 . ** Reference** : Study GLOSSARY.md for terminology
799+
800+ ** Hands-On Explorer** (1 day) ⭐ ** NEW Path** :
801+ 1 . ** Interactive** : Open [ notebooks/Atoms_and_Molecules_Study.ipynb] ( notebooks/Atoms_and_Molecules_Study.ipynb )
802+ 2 . ** Chemistry** : Run molecular simulations, see periodic table emergence
803+ 3 . ** Physics** : Try [ notebooks/Fundamental_Particles_Atlas.ipynb] ( notebooks/Fundamental_Particles_Atlas.ipynb )
804+ 4 . ** Mathematics** : Explore [ examples/tnfr_prime_checker.ipynb] ( examples/tnfr_prime_checker.ipynb )
805+ 5 . ** CLI Tools** : Run ` tnfr-is-prime 17 ` to test primality via resonance
806+
807+ ** Intermediate Developer** (1 week):
808+ 1 . ** Grammar Deep-Dive** : [ UNIFIED_GRAMMAR_RULES.md] ( UNIFIED_GRAMMAR_RULES.md ) (U1-U6 complete)
809+ 2 . ** Tetrad Fields** : [ docs/STRUCTURAL_FIELDS_TETRAD.md] ( docs/STRUCTURAL_FIELDS_TETRAD.md ) ⭐ ** NEW**
810+ 3 . ** Operator Study** : Implementations in [ src/tnfr/operators/definitions.py] ( src/tnfr/operators/definitions.py )
811+ 4 . ** Field Computation** : Practice with [ src/tnfr/physics/fields.py] ( src/tnfr/physics/fields.py ) tetrad
812+ 5 . ** Domain Extensions** : Try medical or business modules ⭐ ** NEW**
813+ 6 . ** SDK Usage** : Fluent API patterns in [ src/tnfr/sdk/] ( src/tnfr/sdk/ ) ⭐ ** NEW**
814+
815+ ** Advanced Researcher** (ongoing):
816+ 1 . ** Complete Theory** : [ TNFR.pdf] ( TNFR.pdf ) + [ UNIFIED_GRAMMAR_RULES.md] ( UNIFIED_GRAMMAR_RULES.md ) mastery
817+ 2 . ** Tetrad Mastery** : All four fields (Φ_s, |∇φ|, K_φ, ξ_C) + validation studies
818+ 3 . ** Architecture** : [ ARCHITECTURE.md] ( ARCHITECTURE.md ) + complete codebase exploration
819+ 4 . ** Research Contribution** : Study [ benchmarks/K_PHI_RESEARCH_SUMMARY.md] ( benchmarks/K_PHI_RESEARCH_SUMMARY.md ) methodology ⭐ ** NEW**
820+ 5 . ** Extension Development** : Create new domain applications using SDK
821+ 6 . ** Theoretical Extensions** : Propose new operators or fields with full derivations
822+
823+ ** Production User** (immediate) ⭐ ** NEW Path** :
824+ 1 . ** Quick Start** : ` pip install tnfr[viz] ` for visualization support
825+ 2 . ** Integration** : Import specific modules for your domain
826+ 3 . ** CLI Usage** : Batch processing with command-line tools
827+ 4 . ** Monitoring** : Implement tetrad field telemetry in your applications
828+ 5 . ** Extensions** : Leverage medical/business modules for specialized workflows
829+
830+ ---
831+
832+ ### Structural Fields: CANONICAL Status (Φ_s + |∇φ| + K_φ + ξ_C)
833+
834+ ** CANONICAL Status** (Updated 2025-11-12): ** Four Promoted Fields**
835+
836+ ---
837+
838+ #### ** Structural Potential (Φ_s)** - CANONICAL (First promotion 2025)
839+
840+ - Global structural potential, passive equilibrium states
841+ - Safety criterion (U6 telemetry): Δ Φ_s < 2.0 (escape threshold)
842+ - For full physics, equations, and validation, see ` docs/STRUCTURAL_FIELDS_TETRAD.md ` and ` docs/grammar/U6_STRUCTURAL_FIELD_TETRAD.md ` .
843+
844+ ---
729845
730- ** Intermediate** (1 week):
731- 1 . Read [ UNIFIED_GRAMMAR_RULES.md] ( UNIFIED_GRAMMAR_RULES.md ) (all sections)
732- 2 . Study operator implementations in ` definitions.py `
733- 3 . Run domain examples (biological, social, AI)
734- 4 . Write simple sequence, test with unified grammar
846+ #### ** Phase Gradient (|∇φ|)** - CANONICAL ⭐ ** NEWLY PROMOTED (Nov 2025)**
735847
736- ** Advanced** (ongoing):
737- 1 . Read [ TNFR.pdf] ( TNFR.pdf ) completely
738- 2 . Study complete codebase architecture
739- 3 . Contribute tests or examples
740- 4 . Propose extensions with full derivations
848+ - Local phase desynchronization / stress proxy
849+ - Safety criterion: |∇φ| < 0.38 for stable operation
850+ - For formal definition and evidence, see ` docs/STRUCTURAL_FIELDS_TETRAD.md ` and ` docs/grammar/U6_STRUCTURAL_FIELD_TETRAD.md ` .
851+
852+ ** Critical Discovery** : C(t) = 1-(σ_ΔNFR/ΔNFR_max) is invariant to proportional scaling.
853+ |∇φ| correlation validated against alternative metrics (max_ΔNFR, mean_ΔNFR, Si) that
854+ capture dynamics C(t) misses.
855+
856+ ** Usage** :
857+ - Import from [ src/tnfr/physics/fields.py] ( src/tnfr/physics/fields.py )
858+ - Compute via ` compute_phase_gradient(G) ` [ CANONICAL]
859+ - Monitor alongside Φ_s for comprehensive structural health
860+
861+ ** Documentation** : See ` docs/TNFR_FORCES_EMERGENCE.md ` §14-15 for full validation details.
862+
863+ ---
864+
865+ #### ** Phase Curvature (K_φ)** - CANONICAL ⭐ ** NEWLY PROMOTED (Nov 2025)**
866+
867+ - Phase torsion and geometric confinement; flags mutation-prone loci
868+ - Safety criteria: |K_φ| ≥ 3.0 (local fault zones); multiscale safety via ` k_phi_multiscale_safety `
869+ - See ` docs/STRUCTURAL_FIELDS_TETRAD.md ` and ` docs/grammar/U6_STRUCTURAL_FIELD_TETRAD.md ` for definitions, asymptotic freedom evidence, and thresholds.
870+
871+ ** Safety criteria (telemetry-based)** :
872+ - Local: |K_φ| ≥ 3.0 flags confinement/fault zones
873+ - Multiscale: safe if either (A) α>0 with R² ≥ 0.5, or (B) observed
874+ var(K_φ) within tolerance of expected 1/r^α given α_hint ≈ 2.76
875+
876+ ** Usage** :
877+ - Import from [ src/tnfr/physics/fields.py] ( src/tnfr/physics/fields.py )
878+ - Compute via ` compute_phase_curvature(G) ` [ CANONICAL]
879+ - Optional multiscale check: ` k_phi_multiscale_safety(G, alpha_hint=2.76) `
880+
881+ ** Documentation** : See [ benchmarks/K_PHI_RESEARCH_SUMMARY.md] ( benchmarks/K_PHI_RESEARCH_SUMMARY.md ) and
882+ ` benchmarks/enhanced_fragmentation_test.py ` for empirical validation.
883+
884+ ---
885+
886+ #### ** Coherence Length (ξ_C)** - CANONICAL ⭐ ** NEWLY PROMOTED (Nov 2025)**
887+
888+ - Spatial correlation scale of local coherence; quantifies approach to critical points
889+ - Safety cues: ξ_C > system diameter (critical), ξ_C > 3 × mean distance (watch), ξ_C < mean distance (stable)
890+ - For full derivation and experimental validation, see ` docs/STRUCTURAL_FIELDS_TETRAD.md ` and ` docs/XI_C_CANONICAL_PROMOTION.md ` (plus ` docs/XI_C_BREAKTHROUGH_REPORT.txt ` and the benchmark visuals).
891+
892+ ---
893+
894+ ** RESEARCH-PHASE Fields** (NOT CANONICAL):
895+
896+ Currently none. All four structural fields have achieved CANONICAL status:
897+ - Φ_s (Nov 2025): Global structural potential
898+ - |∇φ| (Nov 2025): Phase gradient / local desynchronization
899+ - K_φ (Nov 2025): Phase curvature / geometric confinement
900+ - ξ_C (Nov 2025): Coherence length / spatial correlations
901+
902+ The ** Structural Field Tetrad** (Φ_s, |∇φ|, K_φ, ξ_C) provides complete
903+ multi-scale characterization of TNFR network state across global, local,
904+ geometric, and spatial correlation dimensions.
741905
742906---
743907
@@ -840,9 +1004,11 @@ A TNFR expert:
8401004
8411005---
8421006
843- ** Version** : 2.0
844- ** Last Updated** : 2025-11-11
845- ** Status** : ✅ CANONICAL - Single source of truth for TNFR agent guidance
1007+ ** Version** : 9.5.1
1008+ ** Last Updated** : 2025-11-28
1009+ ** Status** : ✅ CANONICAL - Single source of truth for TNFR agent guidance
1010+ ** PyPI Release** : ✅ STABLE - Available via ` pip install tnfr `
1011+ ** Production Ready** : ✅ Complete Tetrad Fields + Unified Grammar U1-U6
8461012
8471013---
8481014
0 commit comments