Stigmergy

Organizational awareness through stigmergic signal processing. Surface structural patterns across your engineering tools without anyone having to ask.

Adaptive Resonance Theory Python 3.12+ MIT License
Get Started View on GitHub PyPI

What it does

Ingest work artifacts. Route through a self-organizing mesh. Surface patterns no single tool reveals.

Multi-source ingestion

GitHub PRs, issues, commits, and reviews. Linear issues and cycles. Slack threads and reactions. Grafana metrics and traces. All normalized into a unified signal format.

adapters

ART mesh routing

Signals route through a competitive mesh using Adaptive Resonance Theory. Workers self-organize into stable categories. New patterns fork new workers; stale ones decay. No retraining.

mesh

Cross-signal correlation

Detect coordination gaps between teams, knowledge silos forming around individuals, and dependency risks that span multiple tools and time horizons.

correlation

Identity resolution

Unify people across GitHub handles, Slack names, Linear UUIDs, and email addresses. Learns new aliases at runtime. Privacy-first with configurable sensitivity levels.

identity

Constraint filtering

All output passes through a constraint engine. SSNs, credit cards, credentials, and API keys are killed. Phone numbers and addresses are redacted. Fully configurable.

constraints

Budget-aware LLM

Optional LLM enrichment with hard daily and hourly caps. When budget is exhausted, falls back to deterministic heuristics. Never stops running, just reduces depth.

budget

Architecture

One pattern at every scale: agent-context-signal. Workers, supervisors, and control layers are the same abstraction.

signals (GitHub, Linear, Slack, Grafana) | v [ Ingestion ] ---- normalized Signal objects | v [ Mesh Router ] -- BFS competitive routing, stop-on-first-accept | v [ Workers ] ----- ART categories: familiarity match, weight update, fork/merge/decay | v [ Correlator ] -- cross-signal pattern detection | v [ Constraints ] - PII kill / credential redact | v [ Output ] ------ findings, insights, structural metrics
Source Auth Signals ingested
GitHub gh auth login PRs, issues, commits, reviews, comments
Linear LINEAR_API_KEY Issues, projects, cycles, comments
Slack SLACK_BOT_TOKEN Channel messages, threads, reactions
Grafana GRAFANA_API_KEY Dashboard metrics, Tempo traces, alerts

Quickstart

Up and running in under a minute. No API keys needed for mock mode.

1

Install

pip install stigmergy

Or clone and install in dev mode:

git clone https://github.com/jmcentire/stigmergy.git
cd stigmergy
pip install -e ".[dev]"
2

Initialize

stigmergy init

Interactive setup walks you through sources, identity, and budget configuration. Creates .stigmergy/config.yaml.

3

Run

# Mock data (no keys needed)
stigmergy run --once

# Live sources
stigmergy run --once --live

# Continuous monitoring
stigmergy run --live

Project structure

Modular by design. Each package owns one concern.

src/stigmergy/
  adapters/         Source connectors (GitHub, Linear, Slack, Grafana — mock + live)
  attention/        Attention model, portfolio scoring, surfacing
  cli/              CLI entry point, config, budget, live adapters
  constraints/      Output filtering (PII/credential kill and redaction)
  core/             Algorithms: familiarity, consensus, energy, lifecycle
  delivery/         Output delivery framework
  identity/         Person identity resolution across sources
  mesh/             ART mesh: routing, workers, topology, insights, stability
  pipeline/         Signal ingestion pipeline
  policy/           Policy engine, spectral analysis, budget enforcement
  primitives/       Data types: Signal, Context, Agent, Assessment
  services/         LLM, embedding, vector store, token budget
  structures/       Bloom filters, LSH, SimHash, ring buffers, tries
  unity/            Field equations, eigenmonitor, PID control
  tracing/          Execution tracing

Theoretical foundations

Built on established theory from computational neuroscience, biology, economics, and cybernetics.

Adaptive Resonance Theory

Stable category formation with vigilance-gated plasticity. New patterns create new categories; familiar patterns reinforce existing ones. Solves the stability-plasticity dilemma.

Grossberg & Carpenter, 1987

Stigmergy

Coordination through shared environment rather than direct communication. Agents leave traces in the medium; other agents respond to those traces. No central coordinator needed.

Grassé, 1959; Theraulaz & Bonabeau, 1999

Crawford-Sobel

Information degradation under strategic communication. When sender bias exceeds 1/4, communication collapses to babbling equilibrium. Used to detect organizational signal decay.

Crawford & Sobel, 1982

Viable System Model

Beer's cybernetic model for organizational viability. System 4 intelligence function: scanning the environment and modeling the future. Algedonic signals for pain/pleasure alerting.

Beer, 1972

Spectral Graph Analysis

Anomaly detection via Laplacian eigenvalue distribution. Structural changes in the communication graph surface as spectral perturbations before they become visible in metrics.

Chung, 1997

Simon's Satisficing

Stop-on-first-accept routing: the first worker above threshold takes the signal. Bounded rationality over exhaustive optimization. Fast, stable, and biologically plausible.

Simon, 1956