Prompt Templates
Write reusable prompt templates with variable interpolation. Version, test, and share prompts across your team for consistent AI output.
Prompt templates are the instructions that drive every ticket execution. A specific template produces consistent, high-quality code changes. A vague one produces unpredictable results.
Built-in templates¶
JuhJuh ships with templates for common tasks:
- Bug fix. Diagnose and fix issues based on ticket context and error details.
- Feature implementation. Build new functionality following your project's existing patterns.
- Refactoring. Restructure code while preserving behavior.
- Test writing. Generate tests for existing functionality.
- Documentation. Create or update docs based on code changes.
These work out of the box. Duplicate and customize them as needed.
Creating a custom template¶
- Navigate to Prompts in the sidebar
- Click New Template
- Give it a name and description
- Write the template content with Markdown and variable placeholders
- Test it against a sample ticket to verify the output
- Click Save
Variables¶
Templates support variable interpolation with double curly braces. Available variables:
| Variable | What it contains |
|---|---|
ticket.title |
The ticket title |
ticket.description |
Full ticket description |
ticket.labels |
Comma-separated labels |
project.name |
Project name |
project.language |
Primary programming language |
context.files |
Files identified during analysis |
context.dependencies |
Project dependencies |
Writing effective templates¶
Be specific. "Fix the bug" produces worse results than "Find the function that handles user authentication in auth/login.py, identify why the token refresh fails when the session expires, and fix it without changing the public API."
Include examples. Show the AI what good output looks like in your codebase. Reference your naming conventions, import patterns, and test structure.
Set boundaries. State what the AI should not change. "Do not modify the database schema" or "Do not add new dependencies" prevents scope creep.
Reference your standards. If your team uses specific coding conventions, linting rules, or architectural patterns, mention them explicitly. For org-wide coding standards that apply to every execution, use Instructions instead of repeating them in each template.
Start simple, then iterate. Write a minimal template, run it, review the output, and refine. Three iterations typically produce a template that works reliably.
Version history¶
Every change to a template creates a new version. You can:
- View the full history with diffs between versions
- Compare any two versions side by side
- Roll back to a previous version
- See which executions used which version. This is useful for debugging quality regressions.
Related¶
- Tickets: how prompts connect to ticket executions
- Instructions: set org-wide and project-level coding standards
- Core Concepts: overview of the full pipeline from ticket to pull request
- Brand Voice: align AI-generated content with your team's writing style