Python SDK for COVENANT.md, the design contract layer for AI agent skills
Project description
covenant-md (Python SDK)
Python SDK for COVENANT.md,
the design contract layer for AI agent skills. Alpha: Parser and validator
at the Runtime conformance tier, producing identical verdicts to the
TypeScript-compatible reference core on the shared spec/fixtures/ suite.
pip install covenant-md
from covenant_md import parse_file, validate_covenant
data = parse_file("path/to/COVENANT.md")
result = validate_covenant("path/to/COVENANT.md")
# result -> {"valid": True, "errors": [], "warnings": [...]}
What it covers
- Frontmatter parsing (YAML).
- JSON Schema structural validation (the canonical schema is bundled).
- Conformance rules from
docs/COVENANT.md§Conformance:- Required fields, kebab-case
name, semverversion,stabilityenum. covenant_versionhandling per §Versioning (reject unrecognised majors, warn on newer minor under a recognised major, ignore unknown fields under known sections).interface.surface[*].acceptsandreturnscross-references againstcontracts.inputs/contracts.outputs.quality.fixtures[*].operationcross-references againstinterface.surface;quality.fixtures[*].inputkeys againstcontracts.inputs.
- Required fields, kebab-case
The contract-driven test runner, lint heuristics, semantic diff, and dependency
graph (Full tier) are not yet implemented in Python and remain in
@covenant-md/core.
Conformance parity
The test suite at sdks/python/tests/test_conformance.py runs the Python
validator against the same spec/fixtures/ the JavaScript core passes and
asserts identical verdicts.
Licence: MIT.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file covenant_md-0.1.0.tar.gz.
File metadata
- Download URL: covenant_md-0.1.0.tar.gz
- Upload date:
- Size: 9.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bf18b39db078c00a0c85ca118967c6895994f901fb54e914965f8bd6b1d476de
|
|
| MD5 |
a129b0046cf9b127b3143388da07bb09
|
|
| BLAKE2b-256 |
e0b3853369dae4f2dbd25fce61ab8756e003cdb3da537075a7554665cbe72514
|
File details
Details for the file covenant_md-0.1.0-py3-none-any.whl.
File metadata
- Download URL: covenant_md-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a4dde5f100d0e21e37969d868c1cf83cc23489e4a1eac34c4f11498cdd7bea4e
|
|
| MD5 |
26c644d1e6334ed1c97107fef56dad14
|
|
| BLAKE2b-256 |
49a3e2e5fbb7bcdb49fa6490cf872e2054662863719addd5031fe82c7f21ed12
|