Instruction Template Specification

A specification for instruction-generative content templates

Schema v1.0 MIT License JSON Schema

Templates that Compile to AI Instructions

ITS enables content creators to build templates with placeholders that compile into structured instructions for AI content generation.

Traditional: Template + Data → Content
ITS: Template → AI Prompt → AI-Generated Content

Basic Example

Template:

{
  "$schema": "https://alexanderparker.github.io/.../its-base-schema-v1.json",
  "version": "1.0.0",
  "content": [
    {
      "type": "text",
      "text": "Product features:\n"
    },
    {
      "type": "placeholder",
      "instructionType": "list",
      "config": {
        "description": "list 5 smartphone features",
        "format": "bullet_points"
      }
    }
  ]
}

Compiles to AI prompt:

INTRODUCTION

You are an AI assistant that fills in content templates. Follow the instructions exactly and replace each placeholder with appropriate content based on the user prompts provided. Respond only with the transformed content.

INSTRUCTIONS

1. Replace each placeholder marked with << >> with generated content
2. The user's content request is wrapped in ([{< >}]) to distinguish it from instructions
3. Follow the format requirements specified after each user prompt
4. Maintain the existing structure and formatting of the template
5. Only replace the placeholders - do not modify any other text
6. Generate content that matches the tone and style requested
7. Respond only with the transformed content - do not include any explanations or additional text

TEMPLATE

Product features:

<<Replace this placeholder with a list using this user prompt: ([{<list 5 smartphone features>}]). Format requirements: Use bullet_points formatting with each item on a new line.>>

Instruction-Based

Placeholders become AI instructions rather than data substitutions, enabling dynamic content generation.

Content-First

Write natural content with embedded placeholders using familiar editing patterns.

Extensible

Standard instruction types plus the ability to define custom types for specific use cases.

Validated

Full JSON Schema validation ensures template correctness and enables rich tooling.

Framework Agnostic

Implementation-independent specification that works with any platform or programming language.

Rich Types

Built-in support for lists, paragraphs, tables, code blocks, dialogues, and more.

Get Started

Learn to create instruction templates

Tutorial Specification