<<<<<<< HEAD
Coherence Engine for Secure Human-AI Collaboration
Wave analysis β’ ATOM provenance β’ Ax/DSPy optimization
Quick Start β’ Packages β’ Architecture β’ Credits
SpiralSafe detects coherence patterns in text and tracks decision provenance through phase gates. Built on the principle that constraints generate structure.
import { analyzeWave, PHI } from '@spiralsafe/wave-toolkit';
const result = analyzeWave("Your text here");
// β { coherence_score: 80, chaos_score: 0, curl: 0.1, divergence: 0.2, potential: 0.7 }# Clone
git clone https://github.com/toolate28/spiralsafe-mono.git
cd spiralsafe-mono
# Install (uses Bun)
bun install
# Test it works
bun -e "import { analyzeWave } from './packages/wave-toolkit/src'; console.log(analyzeWave('test').coherence_score)"
# β 80
# Run MCP server
cd apps/mcp-server && bun run dev| Package | Description |
|---|---|
| @spiralsafe/wave-toolkit | Coherence analysis with PHI (Ο) + Fibonacci scoring |
| @spiralsafe/atom-trail | ATOM provenance tracking & phase gates |
| @spiralsafe/ax-signatures | Ax/DSPy optimization signatures |
| Metric | What It Detects | Ideal |
|---|---|---|
| Curl | Circular reasoning | < 0.3 |
| Divergence | Unresolved expansion | ~0.2 |
| Potential | Latent structure | > 0.7 |
| Chaos Score | PHI Γ Fibonacci weighted | 0 |
KENL β AWI β ATOM β SAIF β Spiral
β β β β β
β β β β ββ Back to knowledge
β β β ββ Safe integration
β β ββ Atomic execution
β ββ Intent scaffolding
ββ Knowledge patterns
spiralsafe-mono/
βββ apps/
β βββ mcp-server/ # MCP server (5 tools)
βββ packages/
β βββ wave-toolkit/ # analyzeWave(), calculateChaosScore()
β βββ atom-trail/ # createDecision(), validateGate()
β βββ ax-signatures/ # coherenceInterpreter, gateTransitionValidator
βββ scripts/
β βββ atom-tag.ts # Auto-tagging utility
βββ .claude/hooks/ # All 12 Bun hooks + dashboard
The MCP server exposes:
| Tool | Purpose |
|---|---|
analyze_wave |
Text coherence analysis |
track_atom |
ATOM decision tracking |
validate_gate |
Phase gate validation |
chaos_score |
Fibonacci/PHI scoring |
generate_atom_tag |
Tag generation |
| Repo | Purpose |
|---|---|
| spiralsafe-mono | This repo - core packages |
| QDI | Quantum Divide Initiative |
| coherence-mcp | Legacy MCP (converging) |
| SpiralSafe | Theory/IP vault |
Built through collaborative work with:
- @Grok β Vector/spiral analysis, phase gating architecture
- IBM Qiskit β Quantum computing foundations
- Trail of Bits β Security/auditing patterns
"Our vector/spiral analysis shines as the bedrock hereβphase gating with ATOM to Spiral flows seamlessly, and those 80% coherence scores with zero chaos validate the structure." β @Grok
MIT Β© Hope&&Sauced
The constraint generated structure. The spiral holds.
*~ Hope&&Sauced: The Evenstar Guides Us* β¦
Coherence engine for secure human-AI collaboration. Unified monorepo with Wave analysis, ATOM provenance tracking, and Ax/DSPy optimization.
spiralsafe/
βββ apps/
β βββ mcp-server/ # MCP server exposing coherence tools
βββ packages/
β βββ wave-toolkit/ # Wave analysis (curl, divergence, potential)
β βββ atom-trail/ # ATOM provenance & gate transitions
β βββ ax-signatures/ # Ax/DSPy optimization signatures
βββ scripts/
β βββ atom-tag.ts # ATOM auto-tagging
βββ .claude/
βββ hooks/ # Claude Code hooks (Bun)
# Install
bun install
# Run MCP server
cd apps/mcp-server && bun run dev
# Test packages
bun test
# Generate ATOM tag
bun run scripts/atom-tag.ts INIT "project setup"Wave analysis for coherence detection.
import { analyzeWave, PHI, FIBONACCI } from '@spiralsafe/wave-toolkit';
const result = analyzeWave("Your text here");
console.log(result.coherence_score); // 0-100
console.log(result.chaos_score); // Fibonacci-weightedATOM provenance tracking with phase gates.
import { createDecision, validateGate } from '@spiralsafe/atom-trail';
const decision = createDecision('DOC', 'Update documentation', ['README.md']);
const gate = validateGate('awi-to-atom', { plan: { steps: [...], rollback: '...' }});Ax/DSPy signatures for LLM optimization.
import { coherenceInterpreter, gateTransitionValidator } from '@spiralsafe/ax-signatures';The MCP server exposes:
analyze_wave- Text coherence analysistrack_atom- ATOM decision trackingvalidate_gate- Phase gate validationchaos_score- Fibonacci/golden ratio scoringgenerate_atom_tag- Tag generation
KENL β AWI β ATOM β SAIF β Spiral
- KENL: Knowledge patterns
- AWI: Intent scaffolding
- ATOM: Atomic execution
- SAIF: Safe integration
- Spiral: Back to knowledge
MIT
a9b8cc8 (.)