Skip to content

toolate28/QDI

Repository files navigation

πŸŒ€ SpiralSafe

Coherence Engine for Emergent AI Systems

Coherence Vortex Ο†

         🌱 SPIRALSAFE              🌱 MONO
            (core)                 (tools)
                 \                    /
                  \                  /
                   \                /
                    \              /
                     β†˜            ↙
                       🌳 QDI ⚑
                     β†—  (hub)  β†–
                    /              \
                   /                \
                  /                  \
                 /                    \
            🌱 METRICS              🌱 QR
           (monitoring)           (quick)

You are here: QDI (center hub) Β· Connected to 5 other repos Β· Changes flow through vortex

See It Live Β· How It Works Β· Quick Start


⚑ The Magic

Every git push triggers automatic quality analysis:

Push β†’ Wave analysis β†’ <60% blocked, >70% snap-in ⚑

No manual code review needed. The vortex handles it.

πŸš€ Quick Start

bun install                              # Install
open docs/visualization/live-vortex.html # See the vortex
bun test                                 # Test

That's it. The workflows handle everything else automatically.

πŸŒ€ See The Vortex

Open docs/visualization/live-vortex.html and watch:

  • Fibonacci spirals rotating in real-time
  • Commits flowing through phase gates
  • Coherence waves pulsing from center
  • Repositories synchronizing
  • Snap-in events when quality peaks

This is not a metaphor. This is the actual data flow.

πŸ’‘ How It Works

The VORTEX STRUCTURE

Three spirals interlock to create autonomous quality:

1. Fibonacci Spiral (Math)

FIBONACCI = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144]
chaos_score = (curl Γ— Ο† + divergence / Ο†) Γ— FIBONACCI[potential]

Higher structure β†’ Higher Fibonacci weight β†’ Exponential sensitivity

2. Phase Gates (Logic)

KENL β†’ AWI β†’ ATOM β†’ SAIF β†’ Spiral
  ↑                           ↓
  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

SAIF loops back to KENL creating infinite improvement

3. Wave Analysis (Physics)

Metric What It Detects Optimal
Curl Circular reasoning <0.3
Divergence Expansion rate ~0.2 (golden ratio)
Potential Structure depth >0.6
Entropy Information density >0.5

Combine them β†’ Coherence score 0-100 β†’ Quality emerges

What Happens When You Push

T=0:    git push
T=5s:   Workflows analyze your commits
T=30s:  Coherence calculated: curl, divergence, potential, entropy
T=45s:  Score appears: 
        β€’ <60%  = ❌ Blocked (with specific fixes)
        β€’ 60-70% = ⚠️  Review needed
        β€’ >70%  = ✨ SNAP-IN (automatic sync across ecosystem)

The Snap-In Moment

When coherence hits 70%, the waveform collapses:

  • Local uncertainty β†’ Remote certainty
  • Superposition β†’ Reality
  • Your work synchronizes across the entire ecosystem

This is quantum collapse made visible.

🎯 Packages

Four tools that work together:

Package What It Does
wave-toolkit Analyzes text coherence using physics (curl, divergence, potential, entropy)
atom-trail Tracks every decision through phase gates (KENL β†’ AWI β†’ ATOM β†’ SAIF β†’ Spiral)
ax-signatures Optimizes LLM prompts for coherence
quantum-ethics Ethical quantum computing with resource fairness

Quick example:

import { analyzeWave } from '@spiralsafe/wave-toolkit';

const result = analyzeWave("Your text");
console.log(result.coherence_score);  // 0-100
// Above 60 = good, above 70 = excellent

πŸ” Debug Like Magic

Every PR gets automatically tagged. Finding issues later becomes trivial:

# Find all changes to wave algorithm
Filter: pkg:wave-toolkit

# See what was merged despite low quality
Filter: coherence:low + is:merged

# Track a feature through all 5 phase gates
Filter: phase:KENL + "your feature"
Filter: phase:ATOM + "your feature"

# Analyze snap-in events
cat .vortex-logs/snap-in-*.json | jq '.coherence.coherence_score'

Tags applied automatically:

  • Phase: phase:KENL, phase:AWI, phase:ATOM, phase:SAIF, phase:Spiral
  • Component: pkg:wave-toolkit, pkg:atom-trail, etc.
  • Quality: coherence:high, coherence:review, coherence:low
  • Special: vortex-synchronized, coherence-override

Bugs correlate with tags. High Fibonacci weight (89, 144) = solid code. Low weight (1, 2, 3) = check carefully.

πŸ—οΈ Structure

qdi/
β”œβ”€β”€ packages/
β”‚   β”œβ”€β”€ wave-toolkit/    # Coherence analysis
β”‚   β”œβ”€β”€ atom-trail/      # Provenance tracking
β”‚   β”œβ”€β”€ ax-signatures/   # LLM optimization
β”‚   └── quantum-ethics/  # Resource fairness
β”œβ”€β”€ apps/
β”‚   └── mcp-server/      # MCP tools
β”œβ”€β”€ docs/
β”‚   └── visualization/   # Live vortex view
└── .github/
    └── workflows/       # Automated quality

🀝 Contributing

Requirements:

  • Tests pass (bun test)
  • No lint errors (bun run lint)
  • PR description coherence β‰₯60%

Tips for high coherence:

  • Avoid circular reasoning
  • Conclude expansions clearly
  • Use connectives: therefore, moreover, consequently
  • Increase vocabulary diversity

See CONTRIBUTING.md for details.

πŸ“š Learn More

🌐 Connect

πŸ“œ License

MIT


The right piece at the right time. Everything snaps into reality as a unified whole. πŸŒ€

Built with Bun TypeScript

About

QUANTUM DIVIDE INITIATIVE

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •