Skip to main content

RDF-native, SHACL-validated specifications for spec-driven AI development

Project description

specl

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


Download files

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

Source Distribution

specl-0.2.0.tar.gz (17.4 kB view details)

Uploaded Source

Built Distribution

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

specl-0.2.0-py3-none-any.whl (18.1 kB view details)

Uploaded Python 3

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

Hashes for specl-0.2.0.tar.gz
Algorithm Hash digest
SHA256 073c25385d4b34fdfab703412abe42c4afcf5de34520e1432844afdc871bc448
MD5 b0d1dfff759843cde87974daed7b807c
BLAKE2b-256 e5b5facb871fb8f7f03c73f3e52d4e34570d378f99a393d9d5c45987010db6e2

See more details on using hashes here.

Provenance

The following attestation bundles were made for specl-0.2.0.tar.gz:

Publisher: publish.yml on zwelz3/specl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for specl-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 58b405b73020a7189986c873706d84cd450a702a989bc0fc7d9412e723dbc035
MD5 7afe3198d81e013abf7409a64019f5a2
BLAKE2b-256 bad4bfe862475c24107df66e51db12c3d699222b2ae4901b8da61c48a5701449

See more details on using hashes here.

Provenance

The following attestation bundles were made for specl-0.2.0-py3-none-any.whl:

Publisher: publish.yml on zwelz3/specl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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