Skip to main content

Overview

Custom PR prompts let you teach DevDaily AI how to write PR descriptions that match your team’s conventions, tone, and structure. Think of it like a “CLAUDE.md” file but specifically for PR descriptions.

How It Works

When generating a PR description, DevDaily searches for a custom prompt file in your repository. If found, the file contents are injected into the AI prompt as “team guidelines” that the AI must follow. This allows you to:
  • Enforce team-specific PR description formats
  • Control tone and style (formal vs. casual, technical vs. business-focused)
  • Require specific sections (testing instructions, breaking changes, etc.)
  • Mandate ticket references or links
  • Specify what NOT to include

Search Order

DevDaily looks for custom prompt files in this order:
1

Config-specified path

Path specified in pr.promptFile in your config (~/.config/devdaily/config.json)
2

Repo root

.devdaily-pr-prompt.md in the repo root
3

.github directory

.github/devdaily-pr-prompt.md
4

Alternative .github name

.github/PR_DESCRIPTION_PROMPT.md
5

docs directory

docs/devdaily-pr-prompt.md
The first file found is used.

Creating a Custom Prompt

Sample Prompt File

Create a file at .devdaily-pr-prompt.md in your repo root:

Structured Guidelines

The prompt file is parsed into structured sections based on markdown headings (h1-h3). Each section becomes a “guideline” that the AI follows. From src/core/pr-prompt.ts:89:
Headings inside code blocks are ignored so you can safely include examples.

AI Prompt Injection

When a custom prompt is found, it’s formatted and injected into the AI prompt:
This clear delineation tells the AI to treat these as strict rules.

Config-Based Path

You can specify a custom path in your DevDaily config:
Both absolute and relative paths are supported:

Example Use Cases

Enforce Business Context

Require Screenshots

Before

before

After

after

Team-Specific Ticket Format

Fixes PROJ-123 Acceptance Criteria:
  • Users can reset password via email
  • Password must meet security requirements

Control Tone

Compatibility with PR Templates

Custom prompts work alongside GitHub PR templates:
  1. PR template defines the structure (sections, placeholders)
  2. Custom prompt defines the content style (tone, what to include)
From src/core/copilot.ts:336:
The AI receives both:
  • Template: “Here’s the structure to use”
  • Prompt: “Here’s the tone and content style to follow”

Debugging

To see what prompt is being sent to the AI, use debug mode:
This shows:
  1. The raw prompt sent to Copilot
  2. Whether a custom prompt file was found
  3. The injected guidelines block

Generate Sample Prompt

You can generate a sample prompt file to get started:

Best Practices

Be Specific

Vague guidelines like “be clear” don’t help. Instead: “Include 2-3 bullet points describing WHAT changed, with file paths.”

Show Examples

Include example PR descriptions in your prompt file so the AI can mimic the style.

Use Positive Language

Say “Include ticket links” instead of “Don’t forget ticket links”. Positive instructions work better.

Test Iteratively

Start simple, generate a few PRs, then refine your prompt based on what the AI produces.

Version Control

Commit your prompt file to the repo so the whole team benefits and can suggest improvements.

Troubleshooting

Prompt Not Being Used

Check these:
  1. File location: Is it in one of the searched paths?
  2. File name: Ensure correct spelling (.devdaily-pr-prompt.md)
  3. Permissions: Can DevDaily read the file?
  4. Debug mode: Run with DEVD_DEBUG=1 to see what’s loaded

AI Not Following Guidelines

Try:
  1. Be more explicit: Add “MUST”, “ALWAYS”, “NEVER” to emphasize requirements
  2. Provide examples: Show don’t tell — include sample PR descriptions
  3. Simplify: Start with 2-3 core rules, add more once those work
  4. Check conflicts: Ensure your prompt doesn’t contradict the PR template

Guidelines Too Restrictive

If the AI produces overly formulaic output:
  1. Add flexibility: “Prefer X, but Y is acceptable if needed”
  2. Remove micro-rules: Focus on high-level principles, not word counts
  3. Emphasize judgment: “Use your judgment to decide which changes are worth highlighting”