agent-changelog
Scannednpx machina-cli add skill petekp/claude-code-setup/agent-changelog --openclawAgent 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:
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 decisionsCLAUDE.md- project instructionsREADME.md- project overviewdocs/or similar documentation directoriesCHANGELOG.mdif exists (traditional changelog)
Code signals:
@deprecatedannotationsTODO,FIXME,HACKcomments 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:
# 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.mdif 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
Source
git clone https://github.com/petekp/claude-code-setup/blob/main/skills/agent-changelog/SKILL.mdView on GitHub Overview
This skill compiles an agent-optimized changelog by cross-referencing git history, implementation plans, and project documentation. The result is AGENT_CHANGELOG.md, describing key decisions, migrations, deprecated patterns, and the project trajectory to help coding agents stay aligned.
How This Skill Works
It gathers sources from git history and documentation in parallel, extracts significant events such as architectural decisions, breaking changes, deprecations, migrations, and directory or API changes, and checks for contradictions against existing documentation. It then writes a structured AGENT_CHANGELOG.md with sections like Current State Summary, Stale Information Detected, Timeline, Deprecated Patterns, and Trajectory.
When to Use It
- When you need to update the changelog on demand
- When compiling project history for onboarding or audits
- After major milestones or architectural changes
- When documentation contradicts current reality or is stale
- During proactive reports to guide coding agents
Quick Start
- Step 1: Gather Sources: git history, .claude/plans, CLAUDE.md, README, and CHANGELOG.md
- Step 2: Identify key events and check for stale information
- Step 3: Write AGENT_CHANGELOG.md and review before committing
Best Practices
- Gather sources in parallel from git history and documentation
- Prioritize events that affect agent behavior: architecture, migrations, deprecations
- Cross-check for contradictions and flag stale information
- Maintain the prescribed sections in AGENT_CHANGELOG.md
- Validate the changelog against the current codebase before publishing
Example Use Cases
- Migrated from Redux to Zustand; changelog notes rationale, modules affected, and updated docs
- Deprecation of JWT tokens in favor of session-based auth; includes migration steps for agents
- Breaking API change in internal routing; entry documents impact and deprecated patterns
- New feature enabling agents to infer trajectory from plan changes; notes agent impact
- Directory structure overhaul; notes how agent context building changed