Skip to main content

Organizational awareness through stigmergic signal processing

Project description

Stigmergy

Organizational awareness through stigmergic signal processing.

Stigmergy ingests work artifacts from GitHub, Linear, and Slack, routes them through an ART-based mesh of self-organizing agents, and surfaces structural patterns — coordination gaps, knowledge silos, dependency risks — without anyone having to ask.

How it works

  1. Ingest signals from your tools (PRs, issues, commits, Slack threads)
  2. Route each signal through a competitive mesh (stop-on-first-accept, like biological stigmergy)
  3. Correlate across sources to find patterns no single tool reveals
  4. Surface findings with PII/credential filtering and configurable delivery

The mesh uses Adaptive Resonance Theory for stable category formation in non-stationary environments: new patterns create new workers, familiar patterns reinforce existing ones, stale patterns decay. No retraining required.

Quick start

# Clone and install
git clone https://github.com/jmcentire/stigmergy.git
cd stigmergy
make install

# Run with mock data (no API keys needed)
stigmergy run --once

# Run with live GitHub data
gh auth login
stigmergy run --once --live

Requirements

  • Python 3.12+
  • gh CLI (for live GitHub data)

Installation

Development install (recommended)

python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"

With LLM support

pip install -e ".[cli]"
export ANTHROPIC_API_KEY=your-key
stigmergy config set llm.provider anthropic

Without the Anthropic integration, stigmergy uses deterministic heuristics for assessments. The LLM adds richer correlation but is entirely optional.

Usage

# Interactive setup — configures sources, identity, constraints
stigmergy init

# Single pass over all configured sources
stigmergy run --once

# Single pass with live API sources
stigmergy run --once --live

# Continuous monitoring
stigmergy run --live

# Check source connectivity (no tokens spent)
stigmergy check
stigmergy check --slack

# View/modify configuration
stigmergy config show
stigmergy config set budget.daily_cap_usd 10.00

# View current mesh state
stigmergy status

Live sources

Source Auth What it ingests
GitHub gh auth login PRs, issues, commits, reviews, comments
Linear LINEAR_API_KEY env var Issues, projects, cycles, comments
Slack SLACK_BOT_TOKEN env var Channel messages, threads, reactions

Identity resolution

Stigmergy unifies people across sources — the same person may appear as a GitHub handle, Slack display name, Linear UUID, or email address. Resolution runs automatically from configured providers and learns new aliases at runtime.

Identity data lives in config/ (gitignored). To set up:

stigmergy init  # walks through team setup interactively

Or manually create config/team_roster.csv:

Alice Wang,Alice Wang <alice@example.com>,@Alice Wang,alice212
Bob Kim,Bob Kim <bob.kim@example.com>,@Bob,bobkim

Configuration

Config lives in .stigmergy/config.yaml (created by stigmergy init):

sources:
  github:
    enabled: true
    repos: ["org/repo1", "org/repo2"]
  linear:
    enabled: false
  slack:
    enabled: false

llm:
  provider: stub          # stub (free) or anthropic

budget:
  daily_cap_usd: 5.00
  hourly_cap_usd: 1.00

constraints:
  path: config/constraints.yaml   # PII/credential kill + redaction rules

Constraint filtering

All output passes through a constraint engine before delivery. By default:

  • Kill (null-route): SSNs, credit cards, emails, credentials, API keys, compensation data, HR actions
  • Redact (mask): phone numbers, physical addresses

Rules are configurable in config/constraints.yaml.

Architecture

signals (GitHub, Linear, Slack)
    |
    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
[ Constraint Filter ] --> PII kill / redact
    |
    v
[ Output ] --> findings, insights, structural metrics

Key design principles:

  • One pattern: Workers, supervisors, and control layers are the same agent-context-signal pattern at different scales
  • Stop-on-first-accept: BFS routing with Simon's satisficing — first worker above threshold takes the signal
  • Complement coding: Full workers raise vigilance thresholds to prevent category monopoly
  • Match-based learning: Weights update only on acceptance (ART stability guarantee)
  • Immutable signals: Signals are frozen; derived state lives in contexts

Testing

make test          # run all tests
make test-v        # verbose output
pytest -k "mesh"   # run by keyword

Budget

Default caps: $5/day, $1/hour. When the LLM budget is exhausted, stigmergy falls back to heuristic-only mode — it never stops running, just reduces assessment depth. Adjust caps:

stigmergy config set budget.daily_cap_usd 10.00
stigmergy config set budget.hourly_cap_usd 2.00

Project structure

src/stigmergy/
  adapters/         Source connectors (GitHub, Linear, Slack — 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

Stigmergy implements ideas from:

  • Adaptive Resonance Theory (Grossberg/Carpenter) — stable category formation with vigilance-gated plasticity
  • Stigmergy (Grassé, Theraulaz) — coordination through shared environment rather than direct communication
  • Crawford-Sobel (1982) — information degradation under strategic communication; babbling equilibrium at bias >= 1/4
  • Beer's Viable System Model — System 4 intelligence function, algedonic signals
  • Spectral graph analysis — anomaly detection via Laplacian eigenvalue distribution

For the full theoretical treatment, see: Ambient Structure Discovery via Stigmergic Mesh (paper forthcoming).

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stigmergy-0.1.2.tar.gz (936.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

stigmergy-0.1.2-py3-none-any.whl (378.9 kB view details)

Uploaded Python 3

File details

Details for the file stigmergy-0.1.2.tar.gz.

File metadata

  • Download URL: stigmergy-0.1.2.tar.gz
  • Upload date:
  • Size: 936.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for stigmergy-0.1.2.tar.gz
Algorithm Hash digest
SHA256 467237583bad3d8a64340226e87295d34984ca328e4b40615b648d62ec167faf
MD5 662119f70407aed7a1e4bcb1e060e979
BLAKE2b-256 4c8c7bcf4cf763378f968178b1d7a54bb372fd5e5d08e474c6a8b8182505164f

See more details on using hashes here.

Provenance

The following attestation bundles were made for stigmergy-0.1.2.tar.gz:

Publisher: workflow.yml on jmcentire/stigmergy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file stigmergy-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: stigmergy-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 378.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for stigmergy-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7fdce71de16054218d8593c3ce6ac8d80a89f40fd6314e8b3dfeaf4c1ec35d55
MD5 261b90e81708000d9aed17d6d1ae6bf2
BLAKE2b-256 68c03c70fdbb5dd8a6a1bfec12b7a43f7cc3d48ca2685f54f3c827be20bd5b70

See more details on using hashes here.

Provenance

The following attestation bundles were made for stigmergy-0.1.2-py3-none-any.whl:

Publisher: workflow.yml on jmcentire/stigmergy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page