Skip to content

AI Changelog Generator โ€‹

Date: 2026-03-17
Status: โœ… Active
Workflow: .github/workflows/ai-changelog.yml


Overview โ€‹

The AI Changelog Generator automatically creates daily development changelog files in docs/changelogs/dev/ by analyzing git commits using Anthropic Claude. It follows the same AI integration pattern as the AI Issue Triage workflow.


What It Does โ€‹

Trigger Events โ€‹

  • Push to dev branch โ€” runs automatically on every push, analyzing only the commits in that push
  • Manual dispatch โ€” allows ad-hoc runs with optional dry-run mode and configurable time window

Process โ€‹

  1. Checks if the triggering actor is a bot (skips to prevent infinite loops)
  2. Gets commits from the push event (BEFORE_SHA..AFTER_SHA) or last N hours for manual runs
  3. Filters out automated commits (merge commits, version bumps, [skip ci] tags)
  4. Sends commit messages to Claude (claude-haiku-4-5-20251001) for analysis
  5. Claude returns a structured JSON response with changelog entries grouped by category
  6. Generates a markdown file following the Keep a Changelog format
  7. If today's file already exists, appends a timestamped update section
  8. Commits the file back to dev with [skip ci] to avoid re-triggering

Output Format โ€‹

Generated files follow the existing naming convention and template:

docs/changelogs/dev/dev-MM.DD.YYYY-v{version}.md

Example output:

markdown
# Changelog - Dev - 03.17.2026

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

---

## [Unreleased] - 2026-03-17

### Added

- New venue proximity check for lantern lighting
- Location permission request flow in onboarding

### Fixed

- Resolve race condition in venue cache refresh

Configuration โ€‹

Required Secret โ€‹

SecretDescription
ANTHROPIC_API_KEYAnthropic API key for Claude access. See API Key Setup.

If ANTHROPIC_API_KEY is not configured, the workflow skips gracefully without failing.

Optional Secret โ€‹

SecretDescription
GH_PATPersonal Access Token for pushing to protected branches. Falls back to GITHUB_TOKEN if not set.

Manual Usage โ€‹

Trigger via GitHub UI โ€‹

  1. Go to Actions โ†’ AI Changelog Generator
  2. Click Run workflow
  3. Configure options:
    • dry_run: true to preview the changelog without committing
    • since_hours: How many hours back to look for commits (default: 24)

Dry Run โ€‹

Use dry run to preview what the AI would generate before committing:

GitHub Actions โ†’ AI Changelog Generator โ†’ Run workflow โ†’ dry_run: true

Behavior โ€‹

Deduplication โ€‹

  • Multiple pushes on the same day: The first push creates the daily file. Subsequent pushes append a new timestamped ## Update - YYYY-MM-DD HH:MM UTC section.
  • Bot-triggered runs: Automatically skipped to prevent infinite loops when the workflow commits a changelog back to dev.

Graceful Degradation โ€‹

  • Missing ANTHROPIC_API_KEY โ†’ workflow skips with a notice (no failure)
  • API errors โ†’ workflow logs the error and skips without failing
  • No meaningful commits โ†’ workflow skips silently
  • All failures are surfaced in the Job Summary for visibility

Integration with Existing Workflow โ€‹

This workflow fits into the existing changelog lifecycle:

Push to dev
    โ†“
AI Changelog Generator
    โ†“
docs/changelogs/dev/dev-MM.DD.YYYY-v{version}.md created
    โ†“ (when ready for prod release)
npm run changelog:consolidate
    โ†“
docs/changelogs/prod/prod-MM.DD.YYYY-v{version}.md created

See CHANGELOG_WORKFLOW.md for the full production promotion workflow.


AI Model โ€‹

  • Model: claude-haiku-4-5-20251001 (same as AI Issue Triage)
  • Temperature: 0.3 (deterministic, consistent output)
  • Max tokens: 1000
  • Estimated cost: ~$0.001โ€“0.005 per push

References โ€‹

Built with VitePress