Skip to main content

specx

specx

Agent skills and executable architecture guardrails for Python services.

PyPI Python versions Documentation build MIT license

Documentation · Quickstart · Rules · Issues

specx gives coding agents a shared architecture for Python backends and checks that the implementation still follows it. It combines composable agent skills, typed foundation classes, a project initializer, and rule-based architecture checks with stable, documented rule IDs.

Highlights

  • Agent-ready workflows. Installable skills cover project structure, core behavior, FastAPI delivery, DI, persistence, settings, migrations, and tests.
  • Architecture as code. specx check catches layer leaks, incorrect inheritance, hidden transaction ownership, misplaced types, and test drift.
  • Explicit building blocks. Typed foundation classes give use cases, services, capabilities, controllers, repositories, gateways, and DTOs clear roles.
  • A strict starting point. specx init creates a small, framework-neutral service with uv, Ruff, mypy, pytest, DI composition, and mirrored tests.

Installation

Install the CLI in an isolated environment with uv:

uv tool install specx

Upgrade it later with uv tool upgrade specx.

The agent skills are installed separately and require Node.js. This example installs the full catalog for Codex:

npx skills add maksimzayats/specx --skill '*' --agent codex -y

See Install agent skills for other agents and installation options.

Quickstart

Create a framework-neutral Python service and run its checks:

$ specx init order-service
$ cd order-service
$ make check

For an existing src/-layout project, add specx as a project dependency:

uv add specx
uv run specx check

Inspect the available guardrails from the command line:

uv run specx rule list
uv run specx rule explain use-cases.return-dtos

Configuration lives in pyproject.toml. See the configuration reference and adoption guide for selectors, exclusions, JSON output, and incremental rollout.

Documentation

Contributing

Contributions are welcome. See the contributing guide for local setup and validation. Run make check before opening a pull request.

License

specx is released under the MIT License.

Download files

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

Source Distribution

specx-0.0.1.tar.gz (357.8 kB view details)

Uploaded Source

Built Distribution

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

specx-0.0.1-py3-none-any.whl (101.9 kB view details)

Uploaded Python 3

File details

Details for the file specx-0.0.1.tar.gz.

File metadata

  • Download URL: specx-0.0.1.tar.gz
  • Upload date:
  • Size: 357.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for specx-0.0.1.tar.gz
Algorithm Hash digest
SHA256 00f81314fd506ba224677bb6247a27ed942cc58374f475f23660d962350b59b1
MD5 4c27d9ae4fcda1c591770571c4e51b8a
BLAKE2b-256 4542f11fbdea9a0d339cff34afed4b387912d851d3ef914ac4349e8640cfa403

See more details on using hashes here.

File details

Details for the file specx-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: specx-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 101.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for specx-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 040c32d9aebd1573cd9f93c58558b399ba51b61b5acf4d8bd3568a44683fb885
MD5 d8b7b57fa2ef00ddcd218105e30f646f
BLAKE2b-256 4db1985ee7ab103632c3e0a4c515f7a07a146a58d14baa50040e25267c7b9a98

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page