Metadata-Version: 2.4
Name: vanguard-modeling-language
Version: 1.0.0
Summary: Vanguard Modeling Language compiler for agentic AI
Project-URL: Homepage, https://github.com/Selkomark/vanguard-modeling-language
Project-URL: Repository, https://github.com/Selkomark/vanguard-modeling-language
Project-URL: Issues, https://github.com/Selkomark/vanguard-modeling-language/issues
Project-URL: Changelog, https://github.com/Selkomark/vanguard-modeling-language/blob/main/CHANGELOG.md
Author-email: Selkomark <mahan@selkomark.com>
License: MIT License
        
        Copyright (c) 2026 Selkomark
        
        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: agents,compiler,dsl,fine-tuning,llm,prompt-engineering
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
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: Topic :: Software Development :: Code Generators
Classifier: Topic :: Software Development :: Compilers
Requires-Python: >=3.10
Requires-Dist: lark>=1.2.0
Provides-Extra: dev
Requires-Dist: pytest>=8.0.0; extra == 'dev'
Description-Content-Type: text/markdown

# Vanguard Modeling Language

Vanguard Modeling Language is an open-source modeling language compiler aimed to complement agentic AI development in order to define the logics and requirements of prompts into a fixed format in order to mitigate consistency of results among different AI agent models.

**Repository:** [github.com/Selkomark/vanguard-modeling-language](https://github.com/Selkomark/vanguard-modeling-language)

Contributors and AI assistants: see [AGENTS.md](AGENTS.md) for project scope and architecture, and [TODO.md](TODO.md) for the roadmap.

## Scope

VML is a **compile-time** DSL compiler: `.vml` source in, static artifacts (`dist/prompts`, `dist/finetune`, `dist/flows`, `dist/flags`, `dist/judges`, `dist/manifest.json`) out. It does not call LLMs, invoke MCP, run conversations, or manage session/context state — that belongs to whatever downstream platform consumes these artifacts, not this repo.

Meant to be consumed as a dependency by other projects, e.g. as a git submodule plus `pip install -e path/to/vanguard-modeling-language`, or via PyPI once published. For integrating VML into a Python or TypeScript project — install, config, and runnable examples of loading compiled artifacts — see [docs/integration.md](docs/integration.md).

## Environment

Use a dedicated environment before installing (Python 3.10+).

### venv (stdlib)

```bash
python3 -m venv .venv
source .venv/bin/activate   # macOS/Linux
```

On Windows: `.venv\Scripts\activate`

### conda

```bash
conda create -n vml python=3.10   # or 3.11+
conda activate vml
```

## Install

Once published to PyPI:

```bash
pip install vanguard-modeling-language
```

From source, with the environment active:

```bash
pip install -e ".[dev]"
```

Requires Python 3.10+.

## Compile a project

```bash
vml compile examples/support_project
```

By default, artifacts are written to `<project>/dist`. Override with `--out`:

```bash
vml compile examples/support_project --out ./build
```

Outputs (under `dist/` by default):

| Path | Description |
|------|-------------|
| `dist/prompts/<Model>.md` | Rendered system prompt + constraints |
| `dist/finetune/openai/<Model>.jsonl` | OpenAI chat fine-tuning JSONL |
| `dist/finetune/anthropic/<Model>.jsonl` | Claude fine-tuning JSONL (Amazon Bedrock format — Anthropic has no hosted fine-tuning API) |
| `dist/finetune/gemini/<Model>.jsonl` | Gemini supervised fine-tuning JSONL (Vertex AI format) |
| `dist/flows/<Flow>.flow.json` | Conversation flow IR |
| `dist/flags/<Flow>.flags.json` | Flag definitions |
| `dist/judges/<Judge>.judge.md` | Judge validation prompts |
| `dist/manifest.json` | Project artifact index |

Validate without writing files:

```bash
vml compile examples/support_project --check-only
```

## Language features

- **Models** with `extends`, `use` logic, `implements` traits
- **Flows** with stages, routing, flags, MCP actions, and **judges**
- **Imports** for DRY composition across `.vml` files

See [docs/language.md](docs/language.md) and [docs/orchestrator.md](docs/orchestrator.md).

## VS Code extension

Editor support (syntax highlighting, snippets, compile diagnostics) lives in [`vscode-extension/`](vscode-extension/).

**Try in development**

1. Open `vscode-extension/` in VS Code (or the whole repo).
2. Press **F5** (*Run Extension*) to open an Extension Development Host.
3. In that window, open a folder with `vml.json` (e.g. `examples/support_project`) and edit `.vml` files.

**Install a VSIX**

```bash
cd vscode-extension
vsce package    # requires: npm install -g @vscode/vsce
```

Then in VS Code: **Extensions** → **Install from VSIX…**

The extension runs `vml compile <project> --check-only` when you save or open `.vml` files. Install the compiler (`pip install -e .`) so `vml` is on your PATH (or set `vml.compilerPath` in settings).

## Tests

```bash
pytest
```
