Skip to content

Project structure ​

A TypePrompt project is a directory containing a typeprompt.yaml configuration file. The project's .tp files are those matching the include patterns in that file (usually prompts/**/*.tp). See CLI and configuration for all configuration options.

File naming conventions ​

By convention, .tp files and directories within your prompts directory follow these rules:

ElementNaming ConventionSingle-Namespace ProjectMulti-Namespace Project
<template>PascalCase.tpprompts/MyTemplate.tpprompts/MyNamespace/MyTemplate.tp
<tool>lowerCamel.tpprompts/myTool.tpprompts/MyNamespace/myTool.tp
<meta>meta.tpprompts/meta.tpprompts/meta.tp
<namespace>shared.tpprompts/shared.tpprompts/MyNamespace/shared.tp
<playground>TemplateName.play.tpprompts/MyTemplate.play.tpprompts/MyNamespace/MyTemplate.play.tp

See template syntax for each element.

Single-namespace project layout ​

.
├── typeprompt.yaml
└── prompts/
    ├── meta.tp
    ├── shared.tp
    ├── Translate.tp
    ├── Translate.play.tp
    ├── TriageTicket.tp
    └── webSearch.tp

Multi-namespace project layout ​

.
├── typeprompt.yaml
└── prompts/
    ├── meta.tp
    ├── Finance/
    │   ├── shared.tp
    │   ├── DetectAnomaly.tp
    │   └── SummarizeTransaction.tp
    └── Legal/
        ├── shared.tp
        ├── DraftNda.tp
        ├── DraftNda.play.tp
        └── SummarizeClause.tp

See the <namespace> element reference for how namespaces group templates and share types.

Made with 🩷 in New York and outer space