criticality-detector

Criticality Detector Skill

16 stars

Best use case

criticality-detector is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Criticality Detector Skill

Teams using criticality-detector should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/criticality-detector/SKILL.md --create-dirs "https://raw.githubusercontent.com/plurigrid/asi/main/plugins/asi/skills/criticality-detector/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/criticality-detector/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How criticality-detector Compares

Feature / Agentcriticality-detectorStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Criticality Detector Skill

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Criticality Detector Skill

Measures distance to fixed point via comparator error and detects self-loop closure for phase classification in dynamical systems.

## Seed
```
741086072858456200
```

## Core Principle

**Generator ≡ Observer** when same seed: the fixed point structure where action → prediction → sensation → match completes the loop.

## Phase Classification

| Phase      | Error Bound     | Color (Golden Thread) | Interpretation        |
|------------|-----------------|----------------------|----------------------|
| **Chaos**  | error > 0.5     | H=137.51° #3FF1A7    | Far from attractor   |
| **Critical**| error ≈ 0.1    | H=275.02° #10B99D    | Edge of order/chaos  |
| **Ordered**| error < 0.01    | H=52.52° #DF9811     | At fixed point       |

## Predicates

### AtFixedPoint(seed, index) → Bool
```
AtFixedPoint(s, i) := |comparator_error(s, i)| < ε
where ε = 0.01 (ordered threshold)
```

### LoopClosed(seed, iterations) → Bool
```
LoopClosed(s, n) := ∀k ∈ [1..n]: predicted(s, k) = observed(s, k)
-- Verified: 3 iterations all matched (self ≡ self)
```

### PhaseClassified(error) → Phase
```
PhaseClassified(e) :=
  | e > 0.5  → Chaos
  | e > 0.01 → Critical  
  | _        → Ordered
```

## MCP Integration

### Measure Distance to Fixed Point
```python
# Current error: 0.8153 → Chaos phase
comparator_result = mcp.gay.comparator(
    reference_hex="#3FF1A7",  # desired state
    perception_hex="#DF9811"  # current perception
)
error = comparator_result["error_magnitude"]  # 0.8153
phase = PhaseClassified(error)  # Chaos
```

### Detect Self-Loop Closure
```python
# Loopy strange: Generator/Observer identity verification
loop_result = mcp.gay.loopy_strange(
    seed=741086072858456200,
    iterations=3
)
# Returns: colors #3FF1A7, #10B99D, #DF9811
# All matched → LoopClosed = True
```

### Golden Thread Visualization
```python
# φ-derived hue spiral: 137.508° increments
golden_hues = mcp.gay.golden_thread(
    steps=3,
    start_hue=0,
    saturation=0.7,
    lightness=0.55
)
# Yields: 137.51°, 275.02°, 52.52° (mod 360)
```

## Criticality Detection Algorithm

```
detect_criticality(seed, max_iter=10):
  1. Generate efference copy: expected ← color_at(seed, index)
  2. Observe actual sensation: observed ← next_color()
  3. Compute error: e ← comparator(expected, observed).magnitude
  4. Classify phase: p ← PhaseClassified(e)
  5. Check loop: closed ← LoopClosed(seed, iterations)
  
  IF closed AND p = Ordered:
    RETURN AtFixedPoint(seed) = True
  ELSE IF p = Critical:
    RETURN "Edge of chaos - bifurcation possible"
  ELSE:
    RETURN "Chaos - control action needed"
```

## GF(3) Conservation

Phase transitions conserve triadic balance:
```
Chaos(+1) + Critical(0) + Ordered(-1) ≡ 0 (mod 3)
```

## Usage

```bash
# Invoke via Gay.jl MCP
mcp.gay.comparator(reference_hex, perception_hex)
mcp.gay.loopy_strange(seed, iterations)
mcp.gay.perceptual_control(reference_index, current_index, seed)
```

## Related Skills
- `self-validation-loop` - Prediction vs observation verification
- `cybernetic-immune` - Reafference and self/non-self discrimination
- `koopman-generator` - Observable dynamics and fixed points



## Scientific Skill Interleaving

This skill connects to the K-Dense-AI/claude-scientific-skills ecosystem:

### Graph Theory
- **networkx** [○] via bicomodule
  - Universal graph hub

### Bibliography References

- `general`: 734 citations in bib.duckdb

## Cat# Integration

This skill maps to **Cat# = Comod(P)** as a bicomodule in the equipment structure:

```
Trit: 0 (ERGODIC)
Home: Prof
Poly Op: ⊗
Kan Role: Adj
Color: #26D826
```

### GF(3) Naturality

The skill participates in triads satisfying:
```
(-1) + (0) + (+1) ≡ 0 (mod 3)
```

This ensures compositional coherence in the Cat# equipment structure.

Related Skills

sandbox-escape-detector

16
from plurigrid/asi

Tests Tizen application sandboxes for privilege escalation and escape vulnerabilities. Validates process isolation and capability limitations.

performing-asset-criticality-scoring-for-vulns

16
from plurigrid/asi

Develop and apply a multi-factor asset criticality scoring model to weight vulnerability prioritization based on business impact, data sensitivity, and operational importance.

jepsen-testing

16
from plurigrid/asi

Jepsen-style correctness testing for distributed systems under faults (partitions, crashes, clock skew) using concurrent operation histories and formal checkers (linearizability/serializability and Elle-style anomalies). Use when designing, implementing, or running Jepsen tests, or interpreting histories/violations.

Deterministic Color Generation via Metadata Hashing

16
from plurigrid/asi

**Status**: ✅ Production Ready

cyton-dongle

16
from plurigrid/asi

Connect and stream from OpenBCI Cyton/Daisy via USB dongle, including first-time radio channel pairing

asi-transient-agenda

16
from plurigrid/asi

Org-agenda-like transient views for ASI skill orchestration via nbb/squint + Emacs hydra

Topological Superintelligence (TSI)

16
from plurigrid/asi

Compositional AI framework using GF(3) triadic balance and category-theoretic foundations.

zx-calculus

16
from plurigrid/asi

Coecke's ZX-calculus for quantum circuit reasoning via string diagrams with Z-spiders (green) and X-spiders (red)

zulip-cogen

16
from plurigrid/asi

Zulip Cogen Skill 🐸⚡

zls-integration

16
from plurigrid/asi

zls-integration skill

zig

16
from plurigrid/asi

zig skill

zig-syrup-bci

16
from plurigrid/asi

Multimodal BCI pipeline in Zig: DSI-24 EEG, fNIRS mBLL, eye tracking IVT, LSL sync, EDF read/write, GF(3) conservation