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.

Metadata

Release files for specx 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for specx 0.0.1
File Size Uploaded Provenance Actions
specx-0.0.1.tar.gz 357.8 kB Without provenance Details for specx-0.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for specx 0.0.1
File Interpreter ABI Platform Actions
specx-0.0.1-py3-none-any.whl Python 3 none any Details for specx-0.0.1-py3-none-any.whl

Total release size: 459.8 kB

Release files / specx-0.0.1.tar.gz

Download URL specx-0.0.1.tar.gz
Size 357.8 kB
Tags Source
SHA-256 checksum
How to use checksums
00f81314fd506ba224677bb6247a27ed942cc58374f475f23660d962350b59b1
BLAKE2b-256 checksum
How to use checksums
4542f11fbdea9a0d339cff34afed4b387912d851d3ef914ac4349e8640cfa403
Upload date
Uploaded using Trusted Publishing?
What is 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}

Release files / specx-0.0.1-py3-none-any.whl

Download URL specx-0.0.1-py3-none-any.whl
Size 101.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
040c32d9aebd1573cd9f93c58558b399ba51b61b5acf4d8bd3568a44683fb885
BLAKE2b-256 checksum
How to use checksums
4db1985ee7ab103632c3e0a4c515f7a07a146a58d14baa50040e25267c7b9a98
Upload date
Uploaded using Trusted Publishing?
What is 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}

Security for specx 0.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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