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.
- Schema URL:
https://promptrek.ai/schema/v3.1.0.json - Features:
- Agent field rename:
prompt(wassystem_promptin v3.0) - Multi-step workflow support with
multi_step,tool_calls, andstepsfields - Agent-scoped hooks with
agentfield - Top-level plugin fields:
mcp_servers,commands,agents,hooks - Plugin marketplace support via
pluginsfield - Markdown-first content approach
- Lossless round-trip sync with literal block scalar formatting
- 100% backward compatible with schema v3.0 (automatic field mapping)
- Agent field rename:
- Recommended: Use this for all new projects
Schema v3.0 (Stable Configuration Format)
Configuration Schema Version: 3.0.x
Stable configuration schema with top-level plugin fields and plugin marketplace support.
- Schema URL:
https://promptrek.ai/schema/v3.0.0.json - Features:
- Top-level plugin fields:
mcp_servers,commands,agents,hooks - Plugin marketplace support via
pluginsfield - Markdown-first content approach
- Lossless round-trip sync
- Top-level plugin fields:
- Note: Consider upgrading to schema v3.1 for workflow support
Schema v2.1 (Legacy Configuration Format)
Configuration Schema Version: 2.1.0
Legacy configuration schema with nested plugin structure.
- Schema URL:
https://promptrek.ai/schema/v2.1.0.json - Features:
- Nested plugin structure:
plugins.mcp_servers,plugins.commands, etc. - Markdown-first content approach
- Lossless round-trip sync
- Nested plugin structure:
- Note: Consider migrating to schema v3.1
Schema v2.0.0 (Legacy Configuration Format)
Configuration Schema Version: 2.0.0
Simplified markdown-first configuration schema without plugin support.
- Schema URL:
https://promptrek.ai/schema/v2.0.0.json - Features:
- Markdown-first content approach
- No plugin support
- Note: Consider migrating to schema v3.1
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
- Go to Settings → Languages & Frameworks → Schemas and DTDs → JSON Schema Mappings
- 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:
- Check the documentation
- Open an issue on GitHub
- Join the discussion in GitHub Discussions