DevLog Generation
Synthesize a complete, structured development log from a repository's git history, documentation, and code artifacts to serve as a durable knowledge base for developers and AI assistants.
When to Use This Skill
Use this skill when you need to:
- Generate a full development history for a project that lacks one
- Onboard to an unfamiliar codebase by reconstructing its evolution
- Recover development context after a lost or corrupted devlog
- Create a troubleshooting knowledge base from historical commits
- Audit project decisions and their rationale retroactively
- Prepare a project handoff with full context
Trigger phrases: "generate devlog", "create development log", "reconstruct project history", "build devlog from git", "development history", "project timeline"
What This Skill Does
Core Capabilities
- Source Material Collection: Gather git commits, tags, branches, documentation, code comments, and (optionally) PR/MR data
- Timeline Synthesis: Cluster commits into logical units of work aligned with features, releases, and milestones
- Entry Generation: Produce rich entries covering what changed, why, decisions made, troubleshooting trails, and downstream impact
- Cross-Referencing: Correlate CHANGELOG entries, PR descriptions, and inline comments with commit clusters for maximum context density
Entry Structure
Each devlog entry contains five sections:
| Section |
Purpose |
Required |
| What Changed |
Concise summary of modifications |
Always |
| Why It Changed |
Motivation, triggers, requirements |
Always |
| Decisions Made |
Trade-offs, alternatives, rationale |
When design choices were made |
| Troubleshooting Trail |
Failed attempts, errors, solutions |
When debugging occurred |
| Impact & Context |
Affected modules, downstream effects |
When cross-cutting changes |
Instructions
Step 1: Analyze the Git Timeline
Establish the project's full chronological history:
# Full commit timeline (oldest first for analysis)
git log --format="%H|%ai|%an|%s" --reverse
# Tag/release milestones
git tag -l --sort=version:refname
# Branch topology
git log --all --oneline --graph --decorate --first-parent
# Identify large/significant commits
git log --shortstat --format="%H %s" | head -100
Key analysis tasks:
- Identify the natural "chapters" of the project (initial setup, major features, releases)
- Note merge commits as boundaries between logical units
- Flag commits with keywords: "fix", "revert", "workaround", "hack", "breaking"
Step 2: Gather Supporting Documentation
Read all available documentation sources in the repository:
- Primary sources:
README.md
CHANGELOG.md
docs/DEVLOG.md (existing, if any)
tasks/todo.md, tasks/lessons.md
- Secondary sources:
docs/ or guides/ directories
- ADR files (Architecture Decision Records)
.github/PULL_REQUEST_TEMPLATE.md (for PR context patterns)
For each source, extract:
- CHANGELOG.md: Version-tagged change summaries (map to git tags)
- README.md: Project purpose evolution (compare across git history with
git log -p README.md)
- tasks/lessons.md: Captured failure patterns and solutions
- Inline comments: Search for
TODO, FIXME, HACK, WORKAROUND, XXX comments across the codebase
Step 3: Gather PR/MR Context (Optional)
If the repository is hosted on GitHub and the gh CLI is available:
# Merged PRs with descriptions
gh pr list --state merged --limit 100 --json number,title,body,mergedAt,headRefName
# PR review comments (for significant PRs)
gh pr view <number> --json reviews,comments
Map each PR to its commit range using the branch name or merge commit. If the gh CLI is not available, note this as a gap and proceed with git-only sources.
Step 4: Cluster Commits into Logical Units
Rules for clustering:
- Release boundaries: Every tagged release starts a new cluster
- Feature branches: Commits from the same feature branch form one cluster
- Time proximity: Consecutive commits on the same day by the same author touching the same files form one cluster
- Semantic grouping: Commits with the same conventional commit scope (e.g.,
feat(auth)) form one cluster
- Standalone significance: Any commit with 10+ files changed, a revert, or a hotfix gets its own cluster
For each cluster, determine:
- Date: Use the date of the last commit in the cluster
- Title: Derive from the most descriptive commit message or the PR title
- Category:
[feature], [bugfix], [refactor], [decision], [infra]
Step 5: Generate Entries
For each cluster (newest first), produce an entry using this template:
## [YYYY-MM-DD HH:MM] — [Short Descriptive Title] [category-tag]
### What Changed
Concise summary of changes: features, fixes, refactors, dependency updates.
* Modified `path/to/file`: Brief description
* Added `path/to/new-file`: Purpose
* Deleted `path/to/old-file`: Reason
### Why It Changed
Motivation, triggering issue, or requirement. Reference issue numbers or user reports.
### Decisions Made
* **Chose X over Y**: Reasoning
* **Rejected Z**: Reasoning
### Troubleshooting Trail *(if applicable)*
<details>
<summary>Expand troubleshooting details</summary>
* **Attempt 1**: What was tried
* *Result*: Failed
* *Error*: `error message`
* *Analysis*: Why it failed
* **Attempt 2 (Solution)**: What worked
* *Key Insight*: What made the difference
</details>
### Impact & Context
* **Affected**: `module-a`, `module-b`
* **Downstream**: Effects on other parts of the system
Category tags: [feature], [bugfix], [refactor], [decision], [infra]
Guidance for each section:
- What Changed: Map directly to git diffs. List specific files where possible.
- Why It Changed: Capture intent that is often lost in commit messages. Reference issues, user reports, or architectural goals.
- Decisions Made: Serve as lightweight ADR (Architecture Decision Record) entries. Include rejected alternatives with reasoning to prevent future developers from re-evaluating settled decisions.
- Troubleshooting Trail: Use collapsible
<details> to avoid cluttering the file while preserving critical debugging context. This is the highest-value section for AI assistants trying to avoid repeated dead ends.
- Impact & Context: Help readers scope the blast radius of changes without reading diffs.
Step 6: Assemble the DevLog File
Start with the file header:
# Development Log
> A comprehensive record of this project's development history.
> For AI assistants: use this file to understand what has been tried, what worked, what failed, and why.
> Generated by the `generate-devlog` command. Maintained incrementally via `update-devlog`.
Append all entries in reverse chronological order (newest first).
Use consistent ## [YYYY-MM-DD HH:MM] heading format. For entries where exact time is unknown, use 00:00 as placeholder.
If docs/DEVLOG.md already exists, warn the user before overwriting. Offer to create a backup as docs/DEVLOG.backup.md.
Step 7: Validate and Report
After generation, verify:
- Every tagged release has a corresponding entry
- Entries are in strict reverse chronological order
- No duplicate entries for the same logical unit
- Category tags are consistently applied
- File paths referenced in entries actually exist (or existed at that point in history)
Report summary in chat:
Generated DEVLOG.md: X entries, spanning [earliest date] to [latest date].
Sources: git history (Y commits), CHANGELOG.md, [other sources].
Coverage: Z releases, W feature branches.
Handling Edge Cases
Very Large Repositories (1000+ commits)
- Focus on tagged releases and merge commits as primary entry sources
- Batch analysis in chunks of 100 commits
- Prioritize entries for tags, merges, and high-impact commits
- Group maintenance commits (dependency updates, formatting) into monthly summaries
Repositories Without Tags
- Use date-based grouping (weekly or bi-weekly clusters)
- Identify "milestone" commits by diff size or message keywords
Missing Context (No CHANGELOG, No PRs)
- Rely on commit messages and diffs as primary source
- Flag entries with low confidence:
*(Inferred from commit messages only)*
- Recommend the user review and enrich flagged entries
Squash-Merged Repositories
- Each squash-merge commit becomes one entry
- Use the squash commit message (typically contains the PR description) as the primary source
Quality Checklist
Related Skills
code-commit-workflow — Commit message conventions that feed into devlog generation
technical-documentation — Broader documentation practices
context-manager — Maintaining context across large codebases
Version: 1.0.0
Last Updated: February 2026
Iterative Refinement Strategy
This skill is optimized for an iterative approach:
- Execute: Perform the core steps defined above.
- Review: Critically analyze the output (coverage, quality, completeness).
- Refine: If targets aren't met, repeat the specific implementation steps with improved context.
- Loop: Continue until the definition of done is satisfied.
1---2name: devlog-generation3description: Generate comprehensive development logs from git history, documentation, and code artifacts. Use when creating project history, onboarding to unfamiliar.4---56# DevLog Generation78Synthesize a complete, structured development log from a repository's git history, documentation, and code artifacts to serve as a durable knowledge base for developers and AI assistants.910## When to Use This Skill1112Use this skill when you need to:1314- Generate a full development history for a project that lacks one15- Onboard to an unfamiliar codebase by reconstructing its evolution16- Recover development context after a lost or corrupted devlog17- Create a troubleshooting knowledge base from historical commits18- Audit project decisions and their rationale retroactively19- Prepare a project handoff with full context2021**Trigger phrases**: "generate devlog", "create development log", "reconstruct project history", "build devlog from git", "development history", "project timeline"2223## What This Skill Does2425### Core Capabilities26271. **Source Material Collection**: Gather git commits, tags, branches, documentation, code comments, and (optionally) PR/MR data282. **Timeline Synthesis**: Cluster commits into logical units of work aligned with features, releases, and milestones293. **Entry Generation**: Produce rich entries covering what changed, why, decisions made, troubleshooting trails, and downstream impact304. **Cross-Referencing**: Correlate CHANGELOG entries, PR descriptions, and inline comments with commit clusters for maximum context density3132### Entry Structure3334Each devlog entry contains five sections:3536| Section | Purpose | Required |37|---------|---------|----------|38| What Changed | Concise summary of modifications | Always |39| Why It Changed | Motivation, triggers, requirements | Always |40| Decisions Made | Trade-offs, alternatives, rationale | When design choices were made |41| Troubleshooting Trail | Failed attempts, errors, solutions | When debugging occurred |42| Impact & Context | Affected modules, downstream effects | When cross-cutting changes |4344## Instructions4546### Step 1: Analyze the Git Timeline4748Establish the project's full chronological history:4950```bash51# Full commit timeline (oldest first for analysis)52git log --format="%H|%ai|%an|%s" --reverse5354# Tag/release milestones55git tag -l --sort=version:refname5657# Branch topology58git log --all --oneline --graph --decorate --first-parent5960# Identify large/significant commits61git log --shortstat --format="%H %s" | head -10062```6364Key analysis tasks:65- Identify the natural "chapters" of the project (initial setup, major features, releases)66- Note merge commits as boundaries between logical units67- Flag commits with keywords: "fix", "revert", "workaround", "hack", "breaking"6869### Step 2: Gather Supporting Documentation7071Read all available documentation sources in the repository:7273- **Primary sources**:74 - `README.md`75 - `CHANGELOG.md`76 - `docs/DEVLOG.md` (existing, if any)77 - `tasks/todo.md`, `tasks/lessons.md`78- **Secondary sources**:79 - `docs/` or `guides/` directories80 - ADR files (Architecture Decision Records)81 - `.github/PULL_REQUEST_TEMPLATE.md` (for PR context patterns)8283For each source, extract:84- **CHANGELOG.md**: Version-tagged change summaries (map to git tags)85- **README.md**: Project purpose evolution (compare across git history with `git log -p README.md`)86- **tasks/lessons.md**: Captured failure patterns and solutions87- **Inline comments**: Search for `TODO`, `FIXME`, `HACK`, `WORKAROUND`, `XXX` comments across the codebase8889### Step 3: Gather PR/MR Context (Optional)9091If the repository is hosted on GitHub and the `gh` CLI is available:9293```bash94# Merged PRs with descriptions95gh pr list --state merged --limit 100 --json number,title,body,mergedAt,headRefName9697# PR review comments (for significant PRs)98gh pr view <number> --json reviews,comments99```100101Map each PR to its commit range using the branch name or merge commit. If the `gh` CLI is not available, note this as a gap and proceed with git-only sources.102103### Step 4: Cluster Commits into Logical Units104105Rules for clustering:1061071. **Release boundaries**: Every tagged release starts a new cluster1082. **Feature branches**: Commits from the same feature branch form one cluster1093. **Time proximity**: Consecutive commits on the same day by the same author touching the same files form one cluster1104. **Semantic grouping**: Commits with the same conventional commit scope (e.g., `feat(auth)`) form one cluster1115. **Standalone significance**: Any commit with 10+ files changed, a revert, or a hotfix gets its own cluster112113For each cluster, determine:114- **Date**: Use the date of the last commit in the cluster115- **Title**: Derive from the most descriptive commit message or the PR title116- **Category**: `[feature]`, `[bugfix]`, `[refactor]`, `[decision]`, `[infra]`117118### Step 5: Generate Entries119120For each cluster (newest first), produce an entry using this template:121122```markdown123## [YYYY-MM-DD HH:MM] — [Short Descriptive Title] [category-tag]124125### What Changed126Concise summary of changes: features, fixes, refactors, dependency updates.127128* Modified `path/to/file`: Brief description129* Added `path/to/new-file`: Purpose130* Deleted `path/to/old-file`: Reason131132### Why It Changed133Motivation, triggering issue, or requirement. Reference issue numbers or user reports.134135### Decisions Made136* **Chose X over Y**: Reasoning137* **Rejected Z**: Reasoning138139### Troubleshooting Trail *(if applicable)*140141<details>142<summary>Expand troubleshooting details</summary>143144* **Attempt 1**: What was tried145 * *Result*: Failed146 * *Error*: `error message`147 * *Analysis*: Why it failed148* **Attempt 2 (Solution)**: What worked149 * *Key Insight*: What made the difference150151</details>152153### Impact & Context154* **Affected**: `module-a`, `module-b`155* **Downstream**: Effects on other parts of the system156```157158**Category tags**: `[feature]`, `[bugfix]`, `[refactor]`, `[decision]`, `[infra]`159160**Guidance for each section**:161- **What Changed**: Map directly to git diffs. List specific files where possible.162- **Why It Changed**: Capture intent that is often lost in commit messages. Reference issues, user reports, or architectural goals.163- **Decisions Made**: Serve as lightweight ADR (Architecture Decision Record) entries. Include rejected alternatives with reasoning to prevent future developers from re-evaluating settled decisions.164- **Troubleshooting Trail**: Use collapsible `<details>` to avoid cluttering the file while preserving critical debugging context. This is the highest-value section for AI assistants trying to avoid repeated dead ends.165- **Impact & Context**: Help readers scope the blast radius of changes without reading diffs.166167### Step 6: Assemble the DevLog File1681691. Start with the file header:170171 ```markdown172 # Development Log173174 > A comprehensive record of this project's development history.175 > For AI assistants: use this file to understand what has been tried, what worked, what failed, and why.176 > Generated by the `generate-devlog` command. Maintained incrementally via `update-devlog`.177 ```1781792. Append all entries in **reverse chronological order** (newest first).1801813. Use consistent `## [YYYY-MM-DD HH:MM]` heading format. For entries where exact time is unknown, use `00:00` as placeholder.1821834. If `docs/DEVLOG.md` already exists, **warn the user** before overwriting. Offer to create a backup as `docs/DEVLOG.backup.md`.184185### Step 7: Validate and Report186187After generation, verify:188189- Every tagged release has a corresponding entry190- Entries are in strict reverse chronological order191- No duplicate entries for the same logical unit192- Category tags are consistently applied193- File paths referenced in entries actually exist (or existed at that point in history)194195Report summary in chat:196197```198Generated DEVLOG.md: X entries, spanning [earliest date] to [latest date].199Sources: git history (Y commits), CHANGELOG.md, [other sources].200Coverage: Z releases, W feature branches.201```202203## Handling Edge Cases204205### Very Large Repositories (1000+ commits)206- Focus on tagged releases and merge commits as primary entry sources207- Batch analysis in chunks of 100 commits208- Prioritize entries for tags, merges, and high-impact commits209- Group maintenance commits (dependency updates, formatting) into monthly summaries210211### Repositories Without Tags212- Use date-based grouping (weekly or bi-weekly clusters)213- Identify "milestone" commits by diff size or message keywords214215### Missing Context (No CHANGELOG, No PRs)216- Rely on commit messages and diffs as primary source217- Flag entries with low confidence: `*(Inferred from commit messages only)*`218- Recommend the user review and enrich flagged entries219220### Squash-Merged Repositories221- Each squash-merge commit becomes one entry222- Use the squash commit message (typically contains the PR description) as the primary source223224## Quality Checklist225226- [ ] All tagged releases have corresponding entries227- [ ] Entries are in strict reverse chronological order228- [ ] Each entry has at minimum "What Changed" and "Why It Changed" sections229- [ ] Decisions sections include rejected alternatives with reasoning230- [ ] Troubleshooting trails use collapsible `<details>` sections231- [ ] Category tags are consistently applied to all entries232- [ ] File paths use backtick formatting233- [ ] Date format is consistent (`[YYYY-MM-DD HH:MM]`)234- [ ] File header includes purpose statement and maintenance guidance235- [ ] User was warned before overwriting any existing DEVLOG.md236237## Related Skills238239- `code-commit-workflow` — Commit message conventions that feed into devlog generation240- `technical-documentation` — Broader documentation practices241- `context-manager` — Maintaining context across large codebases242243---244245**Version**: 1.0.0246**Last Updated**: February 2026247248249### Iterative Refinement Strategy250This skill is optimized for an iterative approach:2511. **Execute**: Perform the core steps defined above.2522. **Review**: Critically analyze the output (coverage, quality, completeness).2533. **Refine**: If targets aren't met, repeat the specific implementation steps with improved context.2544. **Loop**: Continue until the definition of done is satisfied.