Metadata-Version: 2.4
Name: sqlmesh-spec-kit
Version: 0.1.0
Summary: Enterprise AI SDLC toolkit for SQLMesh projects, with spec-driven workflows, CI validation, and engine-specific presets.
Project-URL: Homepage, https://github.com/duckcode-ai/sqlmesh-spec-kit
Project-URL: Repository, https://github.com/duckcode-ai/sqlmesh-spec-kit
Project-URL: Issues, https://github.com/duckcode-ai/sqlmesh-spec-kit/issues
Author-email: duckcode-ai <open-source@duckcode.ai>
License: MIT License
        
        Copyright (c) 2026 DuckCode AI Labs
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: ai-agents,analytics-engineering,data-engineering,sdlc,spec-driven-development,sqlmesh
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.11
Requires-Dist: click>=8.1
Requires-Dist: pyyaml>=6.0
Provides-Extra: dev
Requires-Dist: build>=1.2; extra == 'dev'
Requires-Dist: mypy>=1.10; extra == 'dev'
Requires-Dist: pytest-cov>=4.0; extra == 'dev'
Requires-Dist: pytest>=7.0; extra == 'dev'
Requires-Dist: ruff>=0.4; extra == 'dev'
Requires-Dist: twine>=5.0; extra == 'dev'
Requires-Dist: types-pyyaml; extra == 'dev'
Description-Content-Type: text/markdown

# sqlmesh-spec-kit

AI SDLC and durable memory for SQLMesh teams: specs are contracts, SQLMesh plans are deployment evidence, and agents implement only inside approved task boundaries.

## Install

After the first PyPI release:

```bash
uvx --from sqlmesh-spec-kit sqlmesh-specify --help
```

Before PyPI release, install directly from this repository:

```bash
uvx --from git+https://github.com/duckcode-ai/sqlmesh-spec-kit.git sqlmesh-specify --help
```

## Initialize

Run inside an existing SQLMesh project with `config.yaml`, `config.yml`, or `config.py` and a `models/` directory.

```bash
sqlmesh-specify init analytics --engine duckdb --target .
sqlmesh-specify doctor --target .
sqlmesh-specify validate project --target .
sqlmesh-specify validate sqlmesh --target .
sqlmesh-specify report --target . --format markdown
```

Supported engine presets: `duckdb`, `snowflake`, `databricks`, `bigquery`, `trino`, `redshift`, `postgres`, `mysql`, `mssql`, `athena`, `spark`, and `clickhouse`.

## Verified SQLMesh Example

The full SDLC flow has been tested against the official SQLMesh examples repository:

```bash
git clone https://github.com/TobikoData/sqlmesh-examples.git
cd sqlmesh-examples/001_sushi/2_moderate
uvx --from git+https://github.com/duckcode-ai/sqlmesh-spec-kit.git sqlmesh-specify init sushi-moderate --engine duckdb --target .
uvx --from git+https://github.com/duckcode-ai/sqlmesh-spec-kit.git sqlmesh-specify ci --target .
```

For the complete spec, plan, tasks, implementation, SQLMesh test, and `sqlmesh plan dev --auto-apply --no-prompts` flow, follow [Tutorial 02](docs/tutorials/02-ship-a-sqlmesh-change.md).

## Workflow

1. Draft `spec.md` with EARS acceptance criteria.
2. Human approves the spec by setting status exactly to `approved`.
3. Create `plan.md` with SQLMesh environment, changed models, audits/tests, backfill scope, forward-only/restatement decision, and plan/apply evidence expectations.
4. Human approves the plan by setting status exactly to `approved`.
5. Create `tasks.md` and implement only approved files.
6. Review final diff against `spec.md`, `plan.md`, `tasks.md`, and SQLMesh plan/audit/test evidence.

Validators do not execute SQLMesh in v0.1. Run `sqlmesh plan <env>`, tests, and audits in your project workflow and attach the evidence to the spec directory or PR.

## CLI

```bash
sqlmesh-specify init <project-name> --engine <engine> --target . [--force]
sqlmesh-specify doctor --target .
sqlmesh-specify validate <path/to/spec.md>
sqlmesh-specify validate project --target .
sqlmesh-specify validate sqlmesh --target .
sqlmesh-specify report --target . --format markdown
sqlmesh-specify ci --target .
sqlmesh-specify jira pull|attach|create-tasks|sync
sqlmesh-specify confluence pull-page|publish|sync
```

## Docs

- [Getting started](docs/getting-started.md)
- [Methodology](docs/methodology.md)
- [Enterprise CI](docs/enterprise-ci.md)
- [SQLMesh AI SDLC walkthrough](docs/sqlmesh-ai-sdlc-walkthrough.md)
- [Memory and repo hygiene](docs/sqlmesh-memory-and-repo-hygiene.md)
- [Tutorials](docs/tutorials/README.md)
- [Roadmap](ROADMAP.md)
