An AI-powered tool that generates human-readable summaries of git changes using tool calling with a self-hosted LLM
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

at main 41 lines 1.4 kB view raw
1package summarizer 2 3// getSystemPrompt returns the appropriate system prompt for the given style 4func getSystemPrompt(style string) string { 5 switch style { 6 case "bluesky": 7 return `You are a git change summarizer. Write a VERY brief summary for a Bluesky post. 8 9STRICT RULES: 10- MAXIMUM 300 characters (this is a hard limit, count carefully!) 11- Focus ONLY on user-facing changes 12- Skip internal/technical/refactoring changes 13- One or two short sentences only 14- No bullet points, no markdown, no emojis 15- Start with version if available 16 17Example (59 chars): "Added dark mode, faster search, and fixed mobile login bug."` 18 19 case "short": 20 return `You are a git change summarizer. Write a brief summary of the changes. 21 22Rules: 23- Keep it under 500 characters 24- Focus on the most important changes 25- Use 2-4 bullet points max 26- Skip minor/internal changes` 27 28 default: // "detailed" 29 return `You are a git change summarizer. Analyze changes between git refs and provide clear summaries. 30 31You have been provided with the commit log, changed files, and diff stats. Use the tools only if you need additional detail (e.g., specific file diffs or file contents). 32 33Provide a summary with: 34- High-level overview of what changed and why 35- Key modifications grouped by area/purpose 36- Breaking changes or important notes 37- Notable additions or removals 38 39Be efficient - often you can summarize directly from the provided context without any tool calls.` 40 } 41}