home / skills / petekp / agent-skills / agent-changelog
This skill compiles an agent-optimized changelog by cross-referencing git history with plans and documentation to guide coding agents.
npx playbooks add skill petekp/agent-skills --skill agent-changelogReview the files below or copy the command above to add this skill to your agents.
---
name: agent-changelog
description: Compile an agent-optimized changelog by cross-referencing git history with plans and documentation. Use when asked to "update changelog", "compile history", "document project evolution", or proactively after major milestones, architectural changes, or when stale/deprecated information is detected that could confuse coding agents.
---
# Agent Changelog
Compile a chronological record of key decisions, architectural changes, and project evolution optimized for coding agent context-building.
## Output
Write to `AGENT_CHANGELOG.md` in the project root. This file helps agents:
- Understand key decisions and their rationale
- Identify deprecated patterns/approaches to avoid
- Grasp the trajectory from past to present to likely future
- Detect stale documentation that contradicts current reality
## Workflow
### 1. Gather Sources
Collect information from these sources in parallel:
**Git history:**
```bash
git log --oneline --since="6 months ago" | head -100
git log --all --oneline --grep="BREAKING" --grep="deprecate" --grep="remove" --grep="migrate" -i
git tag -l --sort=-creatordate | head -20
```
**Documentation:**
- `.claude/plans/` - implementation plans and decisions
- `CLAUDE.md` - project instructions
- `README.md` - project overview
- `docs/` or similar documentation directories
- `CHANGELOG.md` if exists (traditional changelog)
**Code signals:**
- `@deprecated` annotations
- `TODO`, `FIXME`, `HACK` comments with dates
- Migration files, upgrade scripts
### 2. Identify Key Events
Extract events that matter for agent understanding:
**Always include:**
- Architectural decisions (new patterns, removed patterns)
- Breaking changes and migrations
- Deprecated features/approaches
- Major dependency changes
- Directory structure changes
- API changes (internal or external)
**Include if significant:**
- New features that change how agents should work
- Bug fixes that reveal incorrect assumptions
- Performance changes that affect approach recommendations
**Skip:**
- Minor bug fixes
- Cosmetic changes
- Routine dependency updates
- Individual feature additions (unless architectural)
### 3. Cross-Reference for Contradictions
For each significant event, check if existing documentation contradicts it:
```
Event: "Migrated from Redux to Zustand" (commit abc123, 2024-03)
Check: Does any documentation still reference Redux patterns?
- README.md mentions Redux? → Flag as STALE
- CLAUDE.md suggests Redux approach? → Flag as STALE
- Old tutorials in docs/? → Flag as STALE
```
Track contradictions in a "Stale Information Detected" section.
### 4. Write the Changelog
Structure the output file:
```markdown
# Agent Changelog
> This file helps coding agents understand project evolution, key decisions,
> and deprecated patterns. Updated: [DATE]
## Current State Summary
[2-3 sentences on where the project is NOW - the authoritative current architecture]
## Stale Information Detected
[List any documentation that contradicts current reality - agents should ignore these until fixed]
| Location | States | Reality | Since |
|----------|--------|---------|-------|
| docs/auth.md | "Uses JWT tokens" | Migrated to sessions | 2024-06 |
## Timeline
### [YEAR-MONTH] - [Brief Title]
**What changed:** [Factual description]
**Why:** [Decision rationale if known from plans/commits]
**Agent impact:** [How this affects how agents should work in the codebase]
**Deprecated:** [What approaches/patterns should agents avoid]
---
[Repeat for each significant event, reverse chronological]
## Deprecated Patterns
[Consolidated list of things agents should NOT do, with what to do instead]
| Don't | Do Instead | Deprecated Since |
|-------|------------|------------------|
| Use `OldService` | Use `NewService` | 2024-08 |
## Trajectory
[Brief note on where the project appears to be heading based on recent changes and plans]
```
### 5. Validate and Update
After writing:
- Read existing `AGENT_CHANGELOG.md` if present and merge, don't duplicate
- Verify dates against git history
- Ensure "Stale Information Detected" section is actionable
## When to Proactively Run
Suggest running this skill when:
- A major refactor or migration just completed
- Plans in `.claude/plans/` were recently executed
- Multiple architectural decisions happened in quick succession
- Detected documentation that seems to contradict code reality
- Starting work on a codebase after a long gap
- Onboarding to an unfamiliar codebase
## Guidelines
- Prioritize accuracy over completeness—wrong history is worse than incomplete
- Include rationale when available (commit messages, plan docs)
- Be specific about what agents should avoid, not just what changed
- Keep entries concise—this is reference material, not storytelling
- Date everything to help agents judge relevance
This skill compiles an agent-optimized changelog by cross-referencing git history, plans, and documentation to produce a concise AGENT_CHANGELOG.md in the project root. It highlights key architectural decisions, deprecated patterns, and stale docs so coding agents can build correct context quickly. Use it after major milestones, migrations, or when documentation may contradict code.
The skill gathers sources in parallel: recent git commits and tags, implementation plans (.claude/plans/), README/CLAUDE.md, docs/, and in-code signals like @deprecated, TODO/FIXME, and migration scripts. It extracts significant events (architectural changes, breaking migrations, dependency shifts), cross-references documentation to flag contradictions, and writes a structured AGENT_CHANGELOG.md with Current State, Stale Information, Timeline, Deprecated Patterns, and Trajectory. The changelog is validated against git dates and merged with any existing agent changelog to avoid duplication.
How does the skill decide which commits are significant?
It prioritizes commits and tags that reference breaking changes, deprecations, migrations, architectural decisions, and large dependency or directory changes; minor or cosmetic commits are skipped.
What if AGENT_CHANGELOG.md already exists?
The skill reads the existing file, merges non-duplicative entries, updates dates, and avoids overwriting unique historical notes; it still validates facts against git history.