Coding
PromptBeginner5 minmarkdown
Markdown Converter
Agent skill for markdown-converter
7
This file provides guidance to Claude Code when working with this module.
Sign in to like and favorite skills
This file provides guidance to Claude Code when working with this module.
shared-contracts is a foundational module providing type-safe data contracts for the vector search pipeline. It defines three Pydantic v2 dataclasses that serve as the interface between all other modules in the pipeline.
This module exists to:
# Initial setup make setup # Run tests make test # All tests with verbose output make test-quick # Fast subset for rapid feedback make test-cov # Tests with coverage report (80% minimum) # Code quality make format # Format with black and ruff make lint # Lint with ruff make typecheck # Type check with mypy make quality # All quality checks # Build make build # Build wheel packages make clean # Clean artifacts
# Run specific test file poetry run pytest tests/test_models.py -v # Run specific test class poetry run pytest tests/test_models.py::TestTextChunk -v # Run specific test function poetry run pytest tests/test_models.py::TestTextChunk::test_text_chunk_creation_valid -v # Run tests matching pattern poetry run pytest -k "text_chunk" -v
shared-contracts/ ├── src/shared_contracts/ │ ├── __init__.py # Public API exports │ └── models.py # Data contract definitions ├── tests/ │ └── test_models.py # Comprehensive validation tests ├── Makefile # Standard targets ├── pyproject.toml # Poetry configuration ├── CLAUDE.md # This file └── README.md # Usage documentation
Represents chunked HTML content ready for embedding.
chunk_id and content must be non-empty stringstoken_count must be positive integerRepresents 768-dimensional embedding vectors.
embedding must have exactly 768 float valuesmodel defaults to "text-embedding-004"Represents search results with relevance scores.
score must be float between 0.0 and 1.0 inclusivecontent can be empty (edge case)../ imports - This module is completely independentcd shared-contracts && make setup && make testfield_validator for custom validationmin_length=1 for non-empty stringsge=1 for positive integersge=0.0, le=1.0 for score rangesThis module is a dependency for:
Other modules will add this as a dependency via:
[tool.poetry.dependencies] shared-contracts = {path = "../shared-contracts", develop = true}
cd shared-contracts/make test or make test-quickmake test-covmake quality before commits# First time setup cd shared-contracts/ make setup # Development cycle make test-quick # Fast feedback make format # Format code make quality # Full quality check # Before commit make test-cov # Verify 80% coverage make quality # All checks pass