ITS Examples

Template examples and implementation patterns

Template Examples

These examples demonstrate different instruction types and template patterns. Each example shows how ITS templates compile into AI instructions.

Citrus Fruits List

Basic example demonstrating list generation with the list instruction type and title type.

beginner list title
Template creates:
Title about citrus fruits + static text + AI-generated bullet list of 5 citrus fruits

Blog Post Template

Comprehensive blog post structure with title, introduction, lists, tables, quotes, and conclusion.

intermediate blog content
Includes: Dynamic title, intro paragraph, numbered list, markdown table, expert quote, summary conclusion

Product Launch Email

Email template with product introduction, features, testimonials, and call-to-action.

advanced email business
Demonstrates: Multiple instruction types, dialogue generation, varied list formats, structured email content

Marketing Campaign Template

Advanced template showcasing variables, conditionals, and dynamic content generation for multi-channel campaigns.

advanced variables conditional
Features: Variable-driven content, conditional sections based on channels, dynamic product counts, customizable tone and discount values

Schema Extension Example

Complete demonstration of the schema extension mechanism, showing how instruction types are overridden through multiple schema files.

advanced extends overrides
Demonstrates: Schema loading order, type override precedence, custom types overriding extended types, complete override principle

Citrus Fruits Example - Basic Template Structure

Template JSON

{
  "$schema": "https://alexanderparker.github.io/.../its-base-schema-v1.json",
  "version": "1.0.0",
  "content": [
    {
      "type": "placeholder",
      "id": "fruit_title",
      "instructionType": "title",
      "config": {
        "description": "Create a fun title about citrus fruits",
        "displayName": "Fruit Title",
        "style": "catchy",
        "length": "short"
      }
    },
    {
      "type": "text",
      "text": "\n\nHey there is a list of fruits here:\n"
    },
    {
      "type": "placeholder",
      "id": "citrus_list",
      "instructionType": "list",
      "config": {
        "description": "list 5 different citrus fruits",
        "format": "bullet_points",
        "itemCount": 5
      }
    }
  ]
}

Compiled 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

<<Replace this placeholder with a title using this user prompt: ([{<Create a fun title about citrus fruits>}]). Format requirements: Create a catchy title that is short in length.>>

Hey there is a list of fruits here:

<<Replace this placeholder with a list using this user prompt: ([{<list 5 different citrus fruits>}]). Format requirements: Use bullet_points formatting with each item on a new line. Create exactly 5 items.>>

Key Learning Points:

Blog Post Template - Structure Analysis

This template demonstrates a complex content structure using multiple instruction types:

Template Structure

Usage Pattern:
Text → Placeholder → Text → Placeholder → Text...

This pattern creates a natural content flow where AI-generated sections are integrated with static structure. Each placeholder clearly separates user content requests from system formatting requirements.

Best Practices Demonstrated:

Product Launch Email - Advanced Features

This template showcases advanced ITS features including dialogue generation and varied formatting:

Advanced Instruction Types Used

Dialogue Generation:
{
  "instructionType": "dialogue",
  "config": {
    "description": "Create a brief conversation between two beta users discussing how the product improved their workflow",
    "participantCount": 2,
    "style": "casual"
  }
}
Compiles to:
<<Replace this placeholder with a dialogue using this user prompt: ([{<Create a brief conversation between two beta users discussing how the product improved their workflow>}]). Format requirements: Create a conversation between 2 people using casual style. Format each line as: Person Name: "Dialogue">>
Varied List Formats:
// Features with bullet points
"format": "bullet_points"

// Target audience with dashes  
"format": "dashes"

Email Template Patterns

Marketing Campaign Template - Variables & Conditionals

This template demonstrates the full power of ITS variables and conditional logic:

Key Features

Variable Definition Example:

"variables": {
  "campaignName": "Summer Tech Sale 2025",
  "companyName": "TechVault",
  "discountPercentage": 25,
  "channels": {
    "email": true,
    "social": true,
    "blog": false
  }
}

Variable Usage in Placeholders:

{
  "type": "placeholder",
  "instructionType": "title",
  "config": {
    "description": "Create an email subject line for ${companyName}'s ${campaignName} offering ${discountPercentage}% off"
  }
}

Conditional Content Example:

{
  "type": "conditional",
  "condition": "channels.email == true",
  "content": [
    // Email-specific content here
  ]
}

Advanced Patterns Demonstrated:

Use Case Categories

Documentation

Marketing

Education

Business

Creating Your Own Templates

Ready to create your own templates? Here are some guidelines:

Start Simple: Begin with basic text + list/paragraph combinations
Add Complexity: Gradually introduce tables, dialogues, and custom types
Use Variables: Make templates reusable with the ${variable} syntax
Add Logic: Use conditionals to create flexible, multi-purpose templates
Test Compilation: Verify your templates compile to clear AI instructions
Use Metadata: Document your templates for future reference and sharing
Compile Your Templates:
Use the ITS Python Compiler to test and compile your templates:
pip install its-compiler-python
its-compile your-template.json --output prompt.txt
Learn to Build Templates Read Full Specification Try the Compiler