Universal Prompt Format (UPF) JSON Schemas

This page provides JSON Schema files for the Universal Prompt Format (UPF) used by PrompTrek.

Available Schemas

Schema v3.1.0 (Latest Stable Configuration Format)

Configuration Schema Version: 3.1.0

Latest stable configuration schema with refined agent model and workflow support.

Download v3.1.0 Schema


Schema v3.0 (Stable Configuration Format)

Configuration Schema Version: 3.0.x

Stable configuration schema with top-level plugin fields and plugin marketplace support.

Download v3.0.0 Schema


Schema v2.1 (Legacy Configuration Format)

Configuration Schema Version: 2.1.0

Legacy configuration schema with nested plugin structure.

Download v2.1 Schema


Schema v2.0.0 (Legacy Configuration Format)

Configuration Schema Version: 2.0.0

Simplified markdown-first configuration schema without plugin support.

Download v2.0.0 Schema

Usage in Your Editor

VS Code

Add a schema reference at the top of your project.promptrek.yaml:

# yaml-language-server: $schema=https://promptrek.ai/schema/v3.1.0.json
schema_version: 3.1.0
metadata:
  title: My Project
  description: Project description
content: |-
  # Your markdown content here

IntelliJ IDEA / WebStorm

  1. Go to SettingsLanguages & FrameworksSchemas and DTDsJSON Schema Mappings
  2. Add a new mapping:
    • Name: PrompTrek UPF v3.1
    • Schema file or URL: https://promptrek.ai/schema/v3.1.0.json
    • File path pattern: *.promptrek.yaml

Programmatic Validation

Python

import json
import yaml
from jsonschema import validate

# Load the schema
with open('v3.0.json') as f:
    schema = json.load(f)

# Load your YAML file
with open('project.promptrek.yaml') as f:
    data = yaml.safe_load(f)

# Validate
validate(instance=data, schema=schema)

JavaScript/TypeScript

const Ajv = require('ajv');
const yaml = require('js-yaml');
const fs = require('fs');

// Load schema
const schema = JSON.parse(fs.readFileSync('v3.0.json', 'utf8'));

// Load YAML
const data = yaml.load(fs.readFileSync('project.promptrek.yaml', 'utf8'));

// Validate
const ajv = new Ajv();
const validate = ajv.compile(schema);
const valid = validate(data);

if (!valid) console.log(validate.errors);

Migration

To migrate between schema versions, use the PrompTrek CLI:

# Migrate from v2.x to v3.1
promptrek migrate project.promptrek.yaml -o project.v3.promptrek.yaml

# Or migrate in-place
promptrek migrate project.promptrek.yaml --in-place

# v3.0 to v3.1 migration is automatic (100% backward compatible)
# Just update schema_version: "3.1.0" to use new workflow features

Schema Generation

These schemas are automatically generated from the Pydantic models in the PrompTrek codebase.

To regenerate schemas (for contributors):

cd /path/to/promptrek
python scripts/generate_schemas.py

Resources

Questions?

If you have questions or need help with the schemas, please: