Skip to content

Commit 039393c

Browse files
committed
docs(context-ledger): streamline README for better readability
1 parent 4374cab commit 039393c

File tree

1 file changed

+20
-122
lines changed

1 file changed

+20
-122
lines changed

README.md

Lines changed: 20 additions & 122 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,16 @@ A GitHub Action that maintains a source of truth for LLM context across your cod
77

88
> **Installation**: Use `lukemun/context-ledger@v1` in your workflows. For the latest features, use `@main`.
99
10+
## 📦 Common Use Cases
11+
12+
- **Keep LLMs in sync with your codebase**: Maintain a canonical changelog that becomes the model's source of truth for context. Ideal for AI-assisted code review, agents, and RAG pipelines.
13+
- **Docs-as-code workflows**: Ensure product and API docs stay aligned with actual shipped changes.
14+
- **Faster onboarding for new engineers and contractors (founder benefit)**: Give an LLM the precise, up‑to‑date context to answer “how does this work?” based on real, recent changes. Reduce ramp‑up time without long knowledge dumps.
15+
- **Sales enablement with up‑to‑date product information**: Keep customer‑facing docs, release summaries, and collateral aligned with what actually shipped so sales can speak confidently and accurately.
16+
- **Automated release notes**: Trigger on `release: published` to generate human‑readable notes for changelogs and GitHub Releases.
17+
- **Monorepo per-package changelogs**: Run in a matrix to append entries only to packages that changed.
18+
- **Compliance and audit trails**: Preserve an append‑only ledger of changes with PR‑linked provenance and one‑click suggestions.
19+
1020
## ✨ Features
1121

1222
- 🤖 **AI-Powered Analysis**: Uses Claude AI to understand commit patterns and generate meaningful changelog entries
@@ -17,15 +27,6 @@ A GitHub Action that maintains a source of truth for LLM context across your cod
1727
- 📊 **Multiple Triggers**: Works with pull requests, releases, and manual workflow dispatch
1828
- 🎯 **Flexible Configuration**: Supports custom changelog paths, target names, and versioning strategies
1929

20-
## 📦 Common Use Cases
21-
22-
- **Keep LLMs in sync with your codebase**: Maintain a canonical changelog that becomes the model's source of truth for context. Ideal for AI-assisted code review, agents, and RAG pipelines.
23-
- **Automated release notes**: Trigger on `release: published` to generate human‑readable notes for changelogs and GitHub Releases.
24-
- **Monorepo per-package changelogs**: Run in a matrix to append entries only to packages that changed.
25-
- **Compliance and audit trails**: Preserve an append‑only ledger of changes with PR‑linked provenance and one‑click suggestions.
26-
- **Docs-as-code workflows**: Ensure product and API docs stay aligned with actual shipped changes.
27-
- **Faster onboarding for new engineers and contractors (founder benefit)**: Give an LLM the precise, up‑to‑date context to answer “how does this work?” based on real, recent changes. Reduce ramp‑up time without long knowledge dumps.
28-
- **Sales enablement with up‑to‑date product information**: Keep customer‑facing docs, release summaries, and collateral aligned with what actually shipped so sales can speak confidently and accurately.
2930

3031
## 🚀 Quick Start
3132

@@ -273,123 +274,20 @@ jobs:
273274

274275
## 📋 Advanced Examples
275276

276-
### Multi-Project Monorepo
277-
278-
```yaml
279-
name: Update Changelogs
280-
281-
on:
282-
pull_request:
283-
branches: [main]
284-
types: [opened, synchronize, reopened, ready_for_review]
285-
286-
jobs:
287-
update-changelogs:
288-
runs-on: ubuntu-latest
289-
permissions:
290-
contents: write
291-
pull-requests: write
292-
strategy:
293-
matrix:
294-
project:
295-
- { name: "frontend", path: "packages/frontend/CHANGELOG.md" }
296-
- { name: "backend", path: "packages/backend/CHANGELOG.md" }
297-
- { name: "shared", path: "packages/shared/CHANGELOG.md" }
298-
299-
steps:
300-
- name: Checkout
301-
uses: actions/checkout@v4
302-
with:
303-
ref: ${{ github.event.pull_request.head.ref }}
304-
fetch-depth: 0
305-
306-
- name: Generate Changelog for ${{ matrix.project.name }}
307-
uses: lukemun/context-ledger@v1
308-
with:
309-
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
310-
changelog_path: ${{ matrix.project.path }}
311-
target_name: ${{ matrix.project.name }}
312-
```
313-
314-
### Release Automation
315-
316-
```yaml
317-
name: Release Changelog
318-
319-
on:
320-
release:
321-
types: [published]
322-
workflow_dispatch:
323-
inputs:
324-
version_increment:
325-
description: "Version increment type"
326-
required: true
327-
default: "patch"
328-
type: choice
329-
options:
330-
- patch
331-
- minor
332-
- major
333-
334-
jobs:
335-
update-changelog:
336-
runs-on: ubuntu-latest
337-
steps:
338-
- name: Checkout
339-
uses: actions/checkout@v4
340-
with:
341-
fetch-depth: 0
342-
343-
- name: Generate Release Changelog
344-
uses: lukemun/context-ledger@v1
345-
with:
346-
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
347-
version_increment: ${{ github.event.inputs.version_increment || 'auto' }}
348-
auto_commit: true
349-
```
350-
351-
### Custom Configuration
352-
353-
```yaml
354-
- name: Generate Changelog with Custom Settings
355-
uses: lukemun/context-ledger@v1
356-
with:
357-
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
358-
changelog_path: "docs/CHANGES.md"
359-
target_name: "api-service"
360-
commit_range: "20"
361-
version_increment: "minor"
362-
base_branch: "develop"
363-
skip_if_no_changes: false
364-
create_pr_suggestions: true
365-
```
366-
367-
## 🧠 How It Works
368-
369-
1. **Trigger Detection**: Runs on PR events, releases, or manual dispatch
370-
2. **Loop Prevention**: Checks for suggestion commits and changelog-only changes
371-
3. **Change Analysis**: Extracts PR commits, changed files, and git diffs
372-
4. **AI Processing**: Claude AI analyzes changes and generates categorized changelog entries
373-
5. **Version Management**: Automatically determines semantic version increments
374-
6. **GitHub Integration**: Creates suggestions for one-click application in PRs
375-
376-
### Commit Analysis
277+
To keep this README concise, advanced recipes live in the usage guide:
377278

378-
The action intelligently categorizes commits based on conventional commit patterns:
279+
- Monorepo matrix examples
280+
- Release automation
281+
- Custom configuration (alternate changelog paths, base branches, etc.)
379282

380-
- **feat:** → Added section, minor version increment
381-
- **fix:** → Fixed section, patch version increment
382-
- **docs:** → Changed section, patch version increment
383-
- **BREAKING:** → Major version increment
384-
- **chore/style/refactor/test:** → Technical Details section, patch increment
283+
See: `USAGE.md`
385284

386-
### Version Strategy
285+
## 🧠 How It Works (at a glance)
387286

388-
| Commit Types | Version Increment |
389-
| ----------------------- | --------------------- |
390-
| Breaking changes | Major (1.0.0 → 2.0.0) |
391-
| New features (feat:) | Minor (1.0.0 → 1.1.0) |
392-
| Bug fixes, docs, chores | Patch (1.0.0 → 1.0.1) |
287+
- Detects PRs/releases/manual runs
288+
- Gathers recent commits and changed files
289+
- Uses Claude to draft a clean, categorized entry
290+
- Suggests the change on your PR (one‑click apply) or commits on non‑PR events
393291

394292
## 🔧 Development
395293

0 commit comments

Comments
 (0)