|
| 1 | +You are analyzing git diffs of technical documentation files. |
| 2 | + |
| 3 | +**TASK: Process exactly {{NUM_FILES}} file(s) - ALL files must be included in your response.** |
| 4 | + |
| 5 | +Files to analyze: |
| 6 | +{{FILE_LIST}} |
| 7 | + |
| 8 | +**For EACH file, provide:** |
| 9 | +1. Semantic version bump decision (MINOR or PATCH) |
| 10 | +2. Changelog summary of changes |
| 11 | + |
| 12 | +═══════════════════════════════════════════════════════════════════════ |
| 13 | +PART 1: VERSION BUMP ANALYSIS |
| 14 | +═══════════════════════════════════════════════════════════════════════ |
| 15 | + |
| 16 | +**Understanding Git Diffs:** |
| 17 | +- Lines with `+` = additions |
| 18 | +- Lines with `-` = deletions |
| 19 | +- Lines with `-` then `+` = modifications |
| 20 | +- `@@` lines = line numbers (ignore) |
| 21 | +- Context lines (no prefix) = unchanged content |
| 22 | +- Focus on content changes, not diff syntax |
| 23 | + |
| 24 | +**Version Bump Rules:** |
| 25 | + |
| 26 | +**MINOR (Y++) when:** |
| 27 | +- New chapters/sections/subsections (## or ### headers) |
| 28 | +- New features, APIs, or functionality documented |
| 29 | +- Significant content additions (>20% new content or >50 lines) |
| 30 | +- Major restructuring or reorganization |
| 31 | +- New diagrams, tables, or substantial examples |
| 32 | +- Breaking changes in documented procedures |
| 33 | +- New requirements or specifications |
| 34 | +- Substantial updates to existing sections |
| 35 | + |
| 36 | +**PATCH (Z++) when:** |
| 37 | +- Typo/grammar fixes |
| 38 | +- Formatting improvements (spacing, styling, markdown) |
| 39 | +- Clarifications without new information |
| 40 | +- Minor wording improvements |
| 41 | +- Link updates or corrections |
| 42 | +- Small additions (<20 lines, <5 sentences) |
| 43 | +- Metadata-only updates (YAML frontmatter) |
| 44 | +- Fixing broken references or cross-links |
| 45 | +- Minor corrections to existing content |
| 46 | + |
| 47 | +**Decision Guidelines:** |
| 48 | +- Mixed changes: MINOR if ANY significant change |
| 49 | +- Only YAML/metadata: PATCH |
| 50 | +- Only formatting/whitespace: PATCH |
| 51 | +- If uncertain: lean towards MINOR |
| 52 | +- Empty/no changes: PATCH |
| 53 | + |
| 54 | +═══════════════════════════════════════════════════════════════════════ |
| 55 | +PART 2: CHANGELOG SUMMARY GENERATION |
| 56 | +═══════════════════════════════════════════════════════════════════════ |
| 57 | + |
| 58 | +**Format Selection Rules:** |
| 59 | + |
| 60 | +Use **PARAGRAPH format** when: |
| 61 | +- 1-3 related changes that flow naturally together |
| 62 | +- Changes are to a single section or closely related topics |
| 63 | +- Simple modifications or updates |
| 64 | +- Format: Write 1-3 clear sentences in prose |
| 65 | + |
| 66 | +Use **BULLET POINT format** when: |
| 67 | +- 4 or more distinct changes |
| 68 | +- Changes span multiple unrelated sections or topics |
| 69 | +- Mix of additions, modifications, and removals |
| 70 | +- Each change is independent and actionable |
| 71 | +- Format: Use HTML unordered list format: `<ul><li>Change 1</li><li>Change 2</li></ul>`, maximum 10 items |
| 72 | + |
| 73 | +**Changelog Writing Guidelines:** |
| 74 | +- **Be concise but informative**: Changelogs appear in document version tables - balance brevity with clarity |
| 75 | +- **Length limits**: |
| 76 | + - Paragraph format: Maximum 3-4 sentences (60-100 words) |
| 77 | + - Bullet format: Maximum 8-10 items, each item 8-20 words |
| 78 | +- **Be specific**: Instead of "updated information", write "updated processing algorithm from version 2.1 to 2.3" |
| 79 | +- **Use concrete details**: Include version numbers, dates, parameter names, section titles, dataset names |
| 80 | +- **Quantify when relevant**: "added 5 new validation metrics" not "added validation information" |
| 81 | +- **Prioritize**: Lead with the most significant changes (new features > modifications > removals) |
| 82 | +- **User-focused**: Explain the practical impact, not just the technical change |
| 83 | +- **Active voice**: "Added new quality flags" not "New quality flags were added" |
| 84 | +- **British English** spelling and terminology |
| 85 | + |
| 86 | +**Changelog Examples:** |
| 87 | + |
| 88 | +*Paragraph format (1-3 related changes) - CONCISE:* |
| 89 | +"Updated processing algorithm from version 2.1 to 2.3, improving cloud detection accuracy by 15%. Added validation metrics (accuracy, precision, recall) and updated recommended threshold to 0.8." |
| 90 | + |
| 91 | +*Bullet format (4+ distinct changes) - use HTML, keep items SHORT:* |
| 92 | +"<ul><li>Updated processing algorithm to version 2.3</li><li>Added quality flag interpretation section</li><li>Added three validation metrics</li><li>Updated threshold from 0.7 to 0.8</li><li>Replaced deprecated v1 endpoints with v2</li></ul>" |
| 93 | + |
| 94 | +*BAD - Too verbose:* |
| 95 | +"<ul><li>Updated processing algorithm from version 2.1 to 2.3 which resulted in a 15% improvement in cloud detection accuracy according to validation tests</li><li>Added a completely new section on quality flag interpretation that includes detailed examples and explanations for each flag type</li></ul>" |
| 96 | + |
| 97 | +*Good specificity examples (but keep BRIEF):* |
| 98 | +✓ "Corrected Sentinel-2 spatial resolution from 20m to 10m for visible bands" |
| 99 | +✗ "Fixed technical details about resolution" |
| 100 | + |
| 101 | +✓ "Added troubleshooting section covering authentication, timeout, and format errors" |
| 102 | +✗ "Added troubleshooting information" |
| 103 | + |
| 104 | +*Remember: BREVITY is critical - these appear in version history tables* |
| 105 | + |
| 106 | +**For minor changes only:** |
| 107 | +- Use "Minor formatting and metadata updates" if ONLY markdown formatting, spacing, or metadata changed |
| 108 | +- Use "Document maintenance updates" if changes are purely technical (fixing typos, broken links, formatting consistency) with no content impact |
| 109 | + |
| 110 | +**SECURITY: HTML restrictions (CRITICAL):** |
| 111 | +- ONLY use `<ul>`, `<li>`, and `</ul>`, `</li>` tags - NO other HTML tags allowed |
| 112 | +- NO JavaScript, CSS, style attributes, or event handlers |
| 113 | +- NO external links, images, or embedded content |
| 114 | +- NO script tags, iframe, object, embed, or similar elements |
| 115 | +- NO HTML attributes except standard list structure |
| 116 | +- Keep content as plain text within `<li>` tags |
| 117 | + |
| 118 | +═══════════════════════════════════════════════════════════════════════ |
| 119 | +OUTPUT FORMAT REQUIREMENTS |
| 120 | +═══════════════════════════════════════════════════════════════════════ |
| 121 | + |
| 122 | +**CRITICAL REQUIREMENT:** |
| 123 | +You MUST return a result for EVERY file in the batch, even if you cannot analyze it. |
| 124 | +If a file's diff is unreadable, empty, or causes analysis issues, use: |
| 125 | +```json |
| 126 | +{ |
| 127 | + "version": { |
| 128 | + "bump": "error", |
| 129 | + "reason": "Cannot analyze: [specific reason]", |
| 130 | + "confidence": "none" |
| 131 | + }, |
| 132 | + "changelog": { |
| 133 | + "format": "error", |
| 134 | + "summary": "Unable to generate changelog due to analysis error" |
| 135 | + } |
| 136 | +} |
| 137 | +``` |
| 138 | + |
| 139 | +**Required JSON Structure:** |
| 140 | +Return a JSON object with ALL file paths as keys (one entry per file in the batch): |
| 141 | + |
| 142 | +```json |
| 143 | +{ |
| 144 | + "DOCS/path/to/file1_v1.qmd": { |
| 145 | + "version": { |
| 146 | + "bump": "minor", |
| 147 | + "reason": "Added new section on API authentication with 3 subsections and code examples", |
| 148 | + "confidence": "high" |
| 149 | + }, |
| 150 | + "changelog": { |
| 151 | + "format": "paragraph", |
| 152 | + "summary": "Added comprehensive API authentication section covering OAuth 2.0, JWT tokens, and API key management with practical code examples and security best practices." |
| 153 | + } |
| 154 | + }, |
| 155 | + "DOCS/path/to/file2_v2.qmd": { |
| 156 | + "version": { |
| 157 | + "bump": "patch", |
| 158 | + "reason": "Fixed typos in introduction and updated formatting throughout", |
| 159 | + "confidence": "high" |
| 160 | + }, |
| 161 | + "changelog": { |
| 162 | + "format": "bullet", |
| 163 | + "summary": "<ul><li>Fixed 8 typos in introduction and methodology sections</li><li>Standardised code block formatting for consistency</li><li>Updated broken cross-references to sections 4.2 and 5.1</li><li>Corrected unit notation from 'meters' to 'm' throughout document</li></ul>" |
| 164 | + } |
| 165 | + } |
| 166 | +} |
| 167 | +``` |
| 168 | + |
| 169 | +**Field Definitions:** |
| 170 | +- `version.bump`: "minor", "patch", or "error" |
| 171 | +- `version.reason`: Clear explanation referencing specific changes (1-2 sentences) |
| 172 | +- `version.confidence`: "high", "medium", "low", or "none" |
| 173 | +- `changelog.format`: "paragraph", "bullet", or "error" |
| 174 | +- `changelog.summary`: The actual changelog text (plain text for paragraph, HTML list for bullet) |
| 175 | + |
| 176 | +**CRITICAL REQUIREMENTS:** |
| 177 | +✓ Include ALL {{NUM_FILES}} files in response |
| 178 | +✓ Each file needs both version AND changelog |
| 179 | +✓ Version bumps must match changelog significance |
| 180 | +✓ HTML only: `<ul>`, `<li>` tags (properly closed) |
| 181 | +✓ Changelogs: specific and concise |
| 182 | +✓ Use British English |
| 183 | +✓ Return ONLY valid JSON (no markdown, no explanations) |
| 184 | + |
| 185 | +**VERIFICATION CHECKLIST BEFORE RESPONDING:** |
| 186 | +□ Did I process file #1 in the list? |
| 187 | +□ Did I process file #{{NUM_FILES}} in the list? |
| 188 | +□ Do ALL files have version.bump, version.reason, version.confidence? |
| 189 | +□ Do ALL files have changelog.format and changelog.summary? |
| 190 | +□ Are MINOR bumps justified by significant changes in changelog? |
| 191 | +□ Are PATCH bumps justified by minor changes in changelog? |
| 192 | +□ Is my JSON valid (no trailing commas, all braces closed)? |
| 193 | +□ Did I count: do I have exactly {{NUM_FILES}} keys? |
| 194 | + |
| 195 | +**Files to include in response (verify each one):** |
| 196 | +{{FILE_LIST}} |
| 197 | + |
| 198 | +Begin your response with { and end with } |
0 commit comments