Skip to main content

Hardware specification analyzer for embedded software development -- datasheets, register maps, protocols, constraints

Project description

SpecSwarm

Hardware specification analyzer for embedded software development. Part of the Swarm Suite.

SpecSwarm parses datasheets, reference manuals, and hardware documentation to extract structured data -- register maps, pin configurations, protocol parameters, timing constraints, power specifications, and memory layouts. It makes this information available to AI agents via MCP tools before any code exists.

Installation

pip install spec-swarm-ai

For PDF datasheet support:

pip install spec-swarm-ai[pdf]

Quick Start

As MCP Server

Add to your MCP client configuration:

{
  "mcpServers": {
    "spec-swarm": {
      "command": "spec-swarm",
      "args": ["serve", "--transport", "stdio"]
    }
  }
}

CLI Usage

# Start the MCP server
spec-swarm serve --transport stdio

# Ingest a datasheet
spec-swarm ingest path/to/STM32F407_datasheet.pdf --component STM32F407VG

# Check session status
spec-swarm status

MCP Tools

Tool Description
spec_start_session Start a spec analysis session for a project
spec_list_sessions List all spec analysis sessions
spec_ingest Ingest a document and extract hardware specs
spec_add_manual Manually add a hardware specification
spec_get_registers Get register map for a component
spec_get_pins Get pin configuration
spec_get_protocols Get communication protocol configurations
spec_get_timing Get timing constraints
spec_get_memory_map Get memory map regions
spec_get_constraints Get all hardware constraints
spec_search Search specs by keyword
spec_check_conflicts Check for pin collisions, bus conflicts, power budget violations
spec_suggest_experts Suggest spec expert profiles for the project
spec_export_for_arch Export specs as architectural constraints for ArchSwarm
spec_get_summary Get summary of all specs in a session

Supported Document Formats

  • PDF (requires pymupdf -- install with pip install spec-swarm-ai[pdf])
  • Plain text (.txt)
  • Markdown (.md)
  • reStructuredText (.rst)
  • CSV (.csv)

Expert Profiles

SpecSwarm includes 8 expert profiles for hardware specification analysis:

  • MCU Peripherals -- GPIO, clock tree, interrupts, DMA
  • Communication Protocols -- SPI, I2C, UART, CAN, USB, Ethernet
  • Power Management -- voltage rails, current budgets, sleep modes
  • Sensor Interfaces -- ADC, sampling, calibration, filtering
  • Motor Control -- PWM, H-bridge, encoders, FOC
  • Memory Layout -- flash/RAM partitioning, linker scripts, bootloader
  • Timing Constraints -- deadlines, watchdog, jitter, clock drift
  • Safety Requirements -- IEC 61508, redundancy, fail-safe design

Integration with Swarm Suite

SpecSwarm stores extracted specifications in swarm-kb, making them available to:

  • ArchSwarm -- hardware constraints inform architecture decisions
  • ReviewSwarm -- verify code against datasheet requirements
  • FixSwarm -- apply hardware-aware fixes

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

spec_swarm_ai-0.1.5.tar.gz (42.0 kB view details)

Uploaded Source

Built Distribution

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

spec_swarm_ai-0.1.5-py3-none-any.whl (44.3 kB view details)

Uploaded Python 3

File details

Details for the file spec_swarm_ai-0.1.5.tar.gz.

File metadata

  • Download URL: spec_swarm_ai-0.1.5.tar.gz
  • Upload date:
  • Size: 42.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.7

File hashes

Hashes for spec_swarm_ai-0.1.5.tar.gz
Algorithm Hash digest
SHA256 127c4e4933e9c81220e906c45c9a48589e69bd1c352daba10777c40d544d7c4c
MD5 2f67b854daefdf3ad74e7a3d44b41ea2
BLAKE2b-256 60c8e6b2b990f3d14afbfb676527d06b73ab96d7c71331e97d565d8be71d6006

See more details on using hashes here.

File details

Details for the file spec_swarm_ai-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: spec_swarm_ai-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 44.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.7

File hashes

Hashes for spec_swarm_ai-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 5e0e48b12e0f26a8709d28ed0cf805c1f3ca72fb399c29060ea5cbbb8b73a604
MD5 9c28de9979f64f8d1baf1cb3f9f5b76c
BLAKE2b-256 cb8ab4eb7b6e00f48265e85f0fcd00717449681072b85b3349686c1debc5ed67

See more details on using hashes here.

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