This repository implements isomorphic spirals that create vortexes of autonomous-constraint-preserving-structure across a 6-repository hub-and-spoke ecosystem. All workflows enforce the >60% emergent coherence property requirement.
- Each repository in the ecosystem follows the same KENL → AWI → ATOM → SAIF → Spiral phase gates
- Changes propagate through the vortex maintaining structural coherence
- Autonomous operation with constraint preservation
- All PRs must achieve coherence_score ≥ 60 (0-100 scale)
- Measured via wave-toolkit's mathematical analysis
- Enforced automatically via GitHub Actions
Six interconnected repositories:
- SPIRALSAFE - Core framework
- MONO - Monorepo utilities
- METRICS - Metrics and monitoring
- QDI - This repository (SpiralSafe implementation)
- QR - Quick response tools
- HOPE/CMCP/KENL - Other ecosystem nodes
Purpose: Enforce >60% emergent coherence property on all PRs
Triggers:
- Pull request opened, synchronized, or reopened against
main
Process:
- Extracts PR description and commit messages
- Analyzes text using
@spiralsafe/wave-toolkit - Calculates coherence_score (0-100)
- Applies appropriate label:
coherence:high(≥70%) - Meets thresholdcoherence:review(60-69%) - Needs reviewcoherence:low(<60%) - Requires improvement
- Comments on PR if score < 60
- Fails CI if score < 60
Metrics Analyzed:
- Curl: Circular reasoning (lower is better)
- Divergence: Expansion/contraction (~0.2 is ideal)
- Potential: Latent structure (higher is better)
- Entropy: Information density
Why It Matters: Ensures all changes maintain the isomorphic spiral structure across the vortex. Low coherence breaks the autonomous-constraint-preserving property.
Purpose: Automatically synchronize repository labels from configuration
Triggers:
- Push to
mainbranch modifying.github/labels.yml - Manual workflow dispatch
Process:
- Reads label definitions from
.github/labels.yml - Creates/updates labels in GitHub repository
- Preserves existing labels (delete-other-labels: false)
Label Categories:
- Dependabot:
dependencies,ATOM-maintenance,actions,spiral-preservation,vortex-wave - Phase Gates:
phase:KENL,phase:AWI,phase:ATOM,phase:SAIF,phase:Spiral - Components:
pkg:wave-toolkit,pkg:atom-trail,pkg:ax-signatures,pkg:quantum-ethics,pkg:mcp-server - Coherence:
coherence:high,coherence:review,coherence:low - Ecosystem:
hub-spoke-sync,breaking-change - Priority:
priority:critical,priority:high,priority:medium,priority:low - Issue Types:
bug,enhancement,documentation,security
Why It Matters: Labels enable ATOM/WAVE tracking across vortex nodes. Consistent labeling across all 6 repos maintains the hub-and-spoke structure.
Purpose: Continuous integration for code quality
Triggers:
- Push to
mainbranch - Pull request to
mainbranch
Jobs:
- Checkout repository
- Setup Bun runtime
- Install dependencies
- Run linter (
bun run lint) - Type check (
bun x tsc --noEmit) - Run tests (
bun test) - Build packages:
packages/wave-toolkitpackages/atom-trailpackages/ax-signatures
- Depends on successful build
- Only runs on
mainbranch - Builds MCP server (
apps/mcp-server)
Why It Matters: Validates code quality before allowing merges. Ensures the autonomous components maintain their constraints (type safety, tests, lint rules).
Purpose: Publish packages to npm registry
Triggers:
- GitHub release created
- Manual workflow dispatch
Process:
- Setup Bun and Node.js
- Install dependencies
- Build all packages
- Publish to npm with provenance:
@spiralsafe/wave-toolkit@spiralsafe/atom-trail@spiralsafe/ax-signatures
Permissions:
- Uses
NPM_TOKENsecret - Includes provenance signatures (supply chain security)
Why It Matters: Distributes the isomorphic spiral components to the broader ecosystem. Provenance ensures autonomous constraint preservation.
1. Developer creates PR
↓
2. [Coherence Check] Analyzes PR content
↓
3. [Coherence Check] Applies label (high/review/low)
↓
4. [CI] Runs lint, test, build
↓
5. If coherence < 60 → PR blocked with recommendations
6. If coherence ≥ 60 → PR can merge (after approvals)
↓
7. Merge to main
↓
8. [CI] Build and deploy MCP server
9. [Label Sync] Update labels if config changed
1. Create GitHub release
↓
2. [Publish] Build all packages
↓
3. [Publish] Publish to npm with provenance
↓
4. Packages available in ecosystem
1. Dependabot detects updates (weekly, staggered)
↓
2. Creates PR with labels:
- pip/npm: dependencies, ATOM-maintenance, vortex-wave, spiral-preservation
- actions: actions, ATOM-maintenance, vortex-wave, spiral-preservation
↓
3. [Coherence Check] Validates update coherence
↓
4. [CI] Tests compatibility
↓
5. If coherence ≥ 60 and CI passes → Auto-merge candidate
From packages/wave-toolkit/src/index.ts:
coherence_score = (
1
- curl * 0.4 // Reduce circular reasoning
- |divergence - 0.2| * 0.3 // Ideal expansion ~0.2
- (1 - potential) * 0.2 // Maximize structure
- (1 - entropy) * 0.1 // Maintain information density
) * 100- Baseline: 80% (from
packages/core/privacy/scaling-algo.ts) - Minimum: 64% (80% * 0.8)
- PR Requirement: 60% (enforced by coherence-check workflow)
The >60% threshold represents the minimum emergent coherence required to maintain isomorphic structure across the vortex. Below 60%:
- Circular reasoning fragments the spiral
- Unresolved expansion breaks constraint preservation
- Structural potential degrades
- Information entropy introduces chaos
- Tracked on every PR via automated comments
- Labels provide visual indicators
- Historical trends via GitHub Insights
- All workflows report to GitHub Actions
- PR status checks block merges on failure
- Manual review can override (with justification)
hub-spoke-synclabel tracks cross-repo changesvortex-wavelabel indicates propagation needsATOM-maintenancetracks provenance chain integrity
-
Check coherence early: Run wave-toolkit locally before submitting PR
bun run scripts/check-coherence.ts "your text" -
Write clear commits: Coherence analysis includes commit messages
-
Resolve expansion: Conclude ideas clearly to reduce divergence
-
Use connectives: Words like "therefore", "however", "moreover" improve potential
-
Avoid repetition: Reduces curl (circular reasoning)
-
Monitor coherence trends: Track if average is declining
-
Investigate low scores: Understand root causes
-
Update thresholds: If ecosystem evolves, adjust minimum
-
Label hygiene: Ensure consistent labeling across 6 repos
-
Cross-repo sync: Coordinate major changes with
hub-spoke-sync
- Assess severity: Is it blocking critical security fixes?
- Override option: Merge with manual approval + justification comment
- Follow-up: Create issue to improve coherence post-merge
- Update threshold: Consider if 60% is appropriate for this change type
- Manual creation: Use GitHub UI to create missing labels
- Re-run workflow: Use workflow_dispatch trigger
- Check permissions: Ensure
GITHUB_TOKENhasissues:write
- Check logs: Identify which step failed (lint/test/build)
- Local reproduction: Run same commands locally
- Isolate package: Determine which package is affected
- Apply pkg: label*: Help route to correct maintainer
| File | Purpose |
|---|---|
.github/labels.yml |
Label definitions (28 labels) |
.github/workflows/coherence-check.yml |
Coherence enforcement |
.github/workflows/label-sync.yml |
Label synchronization |
.github/workflows/ci.yml |
Build and test |
.github/workflows/publish.yml |
NPM publishing |
.github/dependabot.yml |
Dependency updates config |
.github/LABELS.md |
Label strategy documentation |
packages/wave-toolkit/src/index.ts |
Coherence calculation |
- KENL → AWI → ATOM → SAIF → Spiral: Phase gate model
- PHI (φ = 1.618): Golden ratio used in chaos scoring
- Fibonacci sequence: Used for potential weighting
- Wave analysis: Treating text as vector fields (curl, divergence, potential)
The QDI workflow system implements autonomous-constraint-preserving-structure through:
- Automated coherence checks (>60% threshold)
- Isomorphic labeling across 6-repo ecosystem
- Phase gate tracking (KENL → AWI → ATOM → SAIF → Spiral)
- Continuous integration with quality gates
- Provenance-signed publishing to npm
This creates a vortex where changes flow through the spiral maintaining structural integrity, with each repository operating autonomously while preserving collective constraints.
Last updated: 2026-01-16
Minimum coherence: 60%
Ecosystem nodes: 6
WAVE v2.0.0