RDF-native, SHACL-validated specifications for spec-driven AI development
Project description
specl
RDF-native, SHACL-validated specifications for spec-driven AI development.
Specs are authored in markdown with stable IDs (R1.2, US3), translated to RDF, validated against a tiered SHACL shapes graph, and scored for maturity. Designed to be the durable source of truth that AI coding agents read before they write.
Install
pip install -e .
Quick start
# Translate the specl_explorer spec to Turtle
specl-translate specs/specl_explorer/spec.md specs/specl_explorer/spec.ttl
# Validate with explanations
specl-validate validate specs/specl_explorer/spec.ttl src/specl/shapes.ttl --explain
# Maturity score
specl-validate score specs/specl_explorer/spec.ttl src/specl/shapes.ttl
# Diff two versions (auto-appends CHANGELOG.spec.md)
specl-validate diff old.ttl new.ttl
# Badge
specl-validate badge specs/specl_explorer/spec.ttl src/specl/shapes.ttl --out badge.svg
# LLM gap interrogator (requires local Ollama)
specl-assist gaps specs/specl_explorer/spec.ttl src/specl/shapes.ttl --model llama3.1
# Consistency check
specl-assist check specs/specl_explorer/spec.ttl --model llama3.1
Severity tiers
SHACL shapes are split two ways so specs can evolve:
- Violations — structural. Always fail. A spec that violates these is broken.
- Warnings — production-readiness. Accumulate during prototyping, block only when
ekga:status "production".
The gate reads status from the spec itself, so no CI reconfiguration is needed as the spec matures.
Layout
specl/
├── src/specl/ # Python package
│ ├── spec_to_rdf.py # markdown -> Turtle
│ ├── validate_spec.py # validate / diff / score / badge
│ ├── spec_assistant.py # LLM gap interrogator + consistency checker
│ ├── shapes.ttl # tiered SHACL shapes
│ ├── core.ttl # ekga-core ontology stub
│ └── explorer.html # lightweight read-only spec viewer
├── specs/
│ ├── ekga/ # Enterprise Knowledge Graph App (WIP)
│ ├── html_presenter/ # Interactive HTML presentations
│ ├── pptx_templater/ # PowerPoint corporate template filler
│ └── excel_service/ # Excel generation service
├── .github/workflows/ # CI validation
└── .pre-commit-config.yaml
Spec explorer
Open src/specl/explorer.html in a browser and drop a generated spec.ttl file to browse requirements, user stories, and open issues. Read-only, zero build, no server.
Authoring
Write specs in markdown under specs/<name>/spec.md. Use ID-bulleted lists for requirements (R1.1), user stories (US1), and open issues. The spec file itself carries YAML frontmatter with spec_id, title, version, and status. See specs/ekga/spec.md for the reference example.
Deferred features
See specs/ekga/ISSUES.md for traceability registries, domain extension patterns, and other items scheduled for future iterations.
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 specl-0.2.0.tar.gz.
File metadata
- Download URL: specl-0.2.0.tar.gz
- Upload date:
- Size: 17.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
073c25385d4b34fdfab703412abe42c4afcf5de34520e1432844afdc871bc448
|
|
| MD5 |
b0d1dfff759843cde87974daed7b807c
|
|
| BLAKE2b-256 |
e5b5facb871fb8f7f03c73f3e52d4e34570d378f99a393d9d5c45987010db6e2
|
Provenance
The following attestation bundles were made for specl-0.2.0.tar.gz:
Publisher:
publish.yml on zwelz3/specl
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
specl-0.2.0.tar.gz -
Subject digest:
073c25385d4b34fdfab703412abe42c4afcf5de34520e1432844afdc871bc448 - Sigstore transparency entry: 1328263468
- Sigstore integration time:
-
Permalink:
zwelz3/specl@f8c514bedb8e3d123a94fa036689949a21875250 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/zwelz3
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f8c514bedb8e3d123a94fa036689949a21875250 -
Trigger Event:
release
-
Statement type:
File details
Details for the file specl-0.2.0-py3-none-any.whl.
File metadata
- Download URL: specl-0.2.0-py3-none-any.whl
- Upload date:
- Size: 18.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
58b405b73020a7189986c873706d84cd450a702a989bc0fc7d9412e723dbc035
|
|
| MD5 |
7afe3198d81e013abf7409a64019f5a2
|
|
| BLAKE2b-256 |
bad4bfe862475c24107df66e51db12c3d699222b2ae4901b8da61c48a5701449
|
Provenance
The following attestation bundles were made for specl-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on zwelz3/specl
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
specl-0.2.0-py3-none-any.whl -
Subject digest:
58b405b73020a7189986c873706d84cd450a702a989bc0fc7d9412e723dbc035 - Sigstore transparency entry: 1328263472
- Sigstore integration time:
-
Permalink:
zwelz3/specl@f8c514bedb8e3d123a94fa036689949a21875250 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/zwelz3
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f8c514bedb8e3d123a94fa036689949a21875250 -
Trigger Event:
release
-
Statement type: