Metadata-Version: 2.4
Name: mds-core
Version: 0.17.4
Summary: MDS - Markdown Document Schema: validate Markdown against .mds contracts from files, strings or streams - deterministic structure, types, constraints and LLM-readable semantic expectations with structured diagnostics.
Author-email: Lorenz Sommer <59441867+sommelo1@users.noreply.github.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/sommelo1/mds
Project-URL: Repository, https://github.com/sommelo1/mds
Project-URL: Issues, https://github.com/sommelo1/mds/issues
Keywords: markdown,schema,validation,llm,ai,document,contract,gfm
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Quality Assurance
Classifier: Topic :: Text Processing :: Markup :: Markdown
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# mds-core (Python)

MDS — Markdown Document Schema: validate Markdown against `.mds` contracts from files, strings or streams with deterministic structure, types, constraints and LLM-readable semantic expectations.

## Install

```bash
pip install mds-core        # or: pipx install mds-core (CLI only)
mds validate doc.md doc.mds
```

## Coding examples

```python
# Files
from mds import validate_files
r = validate_files("doc.md", "doc.mds")
print(r["exitCode"], r["stream"])

# Strings
from mds import validate_document
r = validate_document(doc_text=doc, schema_text=schema, doc_name="doc.md", schema_name="doc.mds")
print(r["exitCode"], r["stream"])

# Streams
import io
from mds import validate_streams
r = validate_streams(io.StringIO(doc_text), io.StringIO(schema_text))
print(r["exitCode"], r["stream"])
```

## Skills for agents

```bash
mds skills install
```

This installs four skills for agent integration (Claude Code, Hermes, Kilo):

| Skill | Purpose |
|-------|---------|
| `mds-validate` | Validate a document against a contract, repair until clean |
| `mds-write` | Generate a document from a contract, then validate |
| `mds-draft` | Derive a starter contract from an existing document (`mds draft`) |
| `mds-install` | Resolve or install the `mds` CLI when none is available |

See the repository root README and the normative specification for details, the zero-config extension contract (entry-point group `mds_ext`) and conformance fixtures.
