Skip to main content

Prompt Templates

By default, work-summary uses a built-in prompt tuned for Gemini. You can replace it with your own Mustache template to change the tone, structure, or add team-specific context — and the same template works with any LLM provider.

Quick Start

  1. Create a template file, e.g. ~/.work-summary/my-prompt.mustache
  2. Set llm.promptTemplate in your config:
work-summary config set llm.promptTemplate ~/.work-summary/my-prompt.mustache --global

Or directly in ~/.work-summary/config.json:

{
"llm": {
"promptTemplate": "~/.work-summary/my-prompt.mustache"
}
}

Template Variables

Templates are rendered with Mustache. The following variables are available:

Pre-built strings (drop-in replacements)

VariableTypeDescription
{{{systemRules}}}stringThe default system rules block (voice, style, quality bar). Use triple braces to avoid HTML escaping.
{{{lengthInstructions}}}stringThe format instructions for the selected summaryLength (short / medium / long).
{{{commitBlock}}}stringAll commits pre-formatted and grouped by category.

Scalar values

VariableTypeDescription
{{summaryLength}}stringshort, medium, or long
{{commitCount}}numberTotal number of commits in the scan
{{contextNote}}stringOptional note injected by the caller (e.g. "These commits were made with AI agent assistance." for the agent summary pass). Empty string when not set.
{{hasAgentCommits}}booleantrue when at least one commit in this slice was AI-agent-assisted
{{hasHumanCommits}}booleantrue when at least one commit in this slice was made by a human
{{agentCommitCount}}numberNumber of agent-assisted commits in this slice
{{humanCommitCount}}numberNumber of human-authored commits in this slice

Commit list

Iterate over raw commits with {{#commits}}...{{/commits}}:

VariableTypeDescription
{{sha7}}stringFirst 7 characters of the commit SHA
{{message}}stringCommit message
{{category}}stringfeat, fix, chore, refactor, docs, perf, test, or other
{{insertions}}numberLines added
{{deletions}}numberLines removed
{{diff}}stringDiff content (may be truncated for large commits)
{{isAgentAssisted}}booleantrue if this commit was co-authored by an AI agent
{{agentName}}stringName of the detected agent (Claude Code, GitHub Copilot, Cursor, Codex, Aider), or empty string for human commits

Default Template

The built-in template is equivalent to:

{{{systemRules}}}

---

OUTPUT FORMAT:
{{{lengthInstructions}}}

---

COMMITS (pre-classified by type):

{{{commitBlock}}}

---

Write the stand-up summary now. Follow the format and rules above exactly.

This is a good starting point to copy and modify.


Example Templates

Slack-style

Short, emoji-prefixed bullets formatted for pasting into Slack.

You are writing a daily engineering stand-up for a Slack message.
Keep it short — 3 to 6 bullets max. Use past tense. Use emoji prefixes:
🚀 for features, 🐛 for bug fixes, 🔧 for chores/refactors, 📝 for docs.
No section headers. No preamble.

Commits ({{commitCount}} total):

{{#commits}}
- [{{category}}] {{sha7}} {{message}} (+{{insertions}}/-{{deletions}})
{{/commits}}

Write the Slack message now.

Manager brief

A 2–3 sentence executive summary, no bullet points.

{{{systemRules}}}

Write a 2–3 sentence plain-English summary of today's engineering work.
Audience: non-technical engineering manager. No bullet points, no commit SHAs.
Focus on business impact and progress, not implementation details.

{{#commits}}
[{{category}}] {{message}}
{{/commits}}

Conventional commit log

Keep the LLM out of it entirely — just format the raw commits.

## Changes — {{commitCount}} commit(s)

{{#commits}}
- `{{sha7}}` **{{category}}**: {{message}} (+{{insertions}}/-{{deletions}})
{{/commits}}

Tips

  • Use {{{ }}} (triple braces) for variables that contain newlines or special characters to prevent Mustache's HTML escaping.
  • The promptTemplate path supports ~ expansion (e.g. ~/my-template.mustache).
  • Share templates across your team by committing the template file and setting llm.promptTemplate in .work-summary.json.
  • Different models respond differently — a template tuned for GPT-4 may need adjustment for Llama or Mistral.