Skip to content

Commit d10d12c

Browse files
Daily Repo Goal Achiever: Fix typos and add Daily Documentation Updater workflow (#153)
Phase 1 - Consistency Fixes: - Fixed typo in docs/update-docs.md: extra space in Astro Starlight URL - Fixed typo in docs/daily-repo-status.md: 'You can use edit' → 'You can edit' Phase 2 - Workflow Discovery: - Added Daily Documentation Updater workflow from Peli's Agent Factory - Source: gh-aw/.github/workflows/daily-doc-updater.md - Merge rate: 96% (57/59 merged PRs) - Generalized for universal use: removed gh-aw specific dependencies - Added workflow and documentation files - Updated README with new workflow entry Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent eb7950f commit d10d12c

5 files changed

Lines changed: 276 additions & 2 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ You can use the "/plan" agent to turn the reports into actionable issues which c
4848
### Code Improvement Workflows (by making changes, producing pull requests)
4949

5050
- [📖 Regular Documentation Update](docs/update-docs.md) - Update documentation automatically
51+
- [📖 Daily Documentation Updater](docs/daily-doc-updater.md) - Automatically update documentation based on recent code changes and merged PRs
5152
- [✨ Code Simplifier](docs/code-simplifier.md) - Automatically simplify recently modified code for improved clarity and maintainability
5253
- [⚡ Daily Progress](docs/daily-progress.md) - Automated daily feature development following a structured roadmap
5354
- [🧪 Daily Test Coverage Improver](docs/daily-test-improver.md) - Improve test coverage by adding meaningful tests to under-tested areas

docs/daily-doc-updater.md

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# 📖 Daily Documentation Updater
2+
3+
> For an overview of all available workflows, see the [main README](../README.md).
4+
5+
The [Daily Documentation Updater workflow](../workflows/daily-doc-updater.md?plain=1) automatically reviews and updates documentation based on recent code changes and merged pull requests. It scans for changes in the last 24 hours and updates documentation to reflect new features, modifications, or deprecations.
6+
7+
## Installation
8+
9+
```bash
10+
# Install the 'gh aw' extension
11+
gh extension install github/gh-aw
12+
13+
# Add the workflow to your repository
14+
gh aw add-wizard githubnext/agentics/daily-doc-updater
15+
```
16+
17+
This walks you through adding the workflow to your repository.
18+
19+
You can start a run of this workflow immediately by running:
20+
21+
```bash
22+
gh aw run daily-doc-updater
23+
```
24+
25+
## Configuration
26+
27+
This workflow requires no configuration and works out of the box. It automatically:
28+
- Scans for merged PRs from the last 24 hours
29+
- Identifies documentation gaps
30+
- Follows your repository's existing documentation structure and style
31+
- Creates pull requests with documentation updates
32+
33+
You can edit the workflow to customize:
34+
- The time range for scanning changes
35+
- Which types of changes to document
36+
- The documentation update criteria
37+
- PR title prefix and labels
38+
39+
After editing, run `gh aw compile` to apply your changes.
40+
41+
## What it reads from GitHub
42+
43+
- Merged pull requests from the last 24 hours
44+
- Recent commits and their details
45+
- Pull request descriptions and comments
46+
- Code changes and diffs
47+
48+
## What it creates
49+
50+
- Pull requests with documentation updates
51+
- Updated markdown documentation files
52+
53+
## Human in the loop
54+
55+
- **Pull Request Review**: All documentation changes are submitted as pull requests for review before merging
56+
- **Manual Approval**: A human reviewer can verify accuracy, completeness, and appropriateness of documentation updates
57+
- **Draft PRs**: Configure `draft: true` in the workflow to require explicit promotion to ready-for-review
58+
59+
## Use Cases
60+
61+
1. **Continuous Documentation**: Keep documentation synchronized with code changes automatically
62+
2. **Feature Release Documentation**: Ensure new features are documented when they're merged
63+
3. **API Changes**: Document API modifications, deprecations, and breaking changes
64+
4. **Changelog Maintenance**: Help maintain up-to-date changelogs or release notes
65+
5. **Developer Onboarding**: Ensure new developers always have current documentation
66+
67+
## Why It's Valuable
68+
69+
- **Reduces Documentation Debt**: Catches documentation gaps before they accumulate
70+
- **Maintains Documentation Quality**: Keeps docs synchronized with code changes
71+
- **Saves Developer Time**: Automates the tedious task of documentation maintenance
72+
- **Improves User Experience**: Ensures users have access to current, accurate documentation
73+
- **High Success Rate**: With a 96% merge rate in production use, this workflow consistently produces valuable documentation updates
74+
75+
## Activity Duration
76+
77+
Typical workflow execution takes 10-20 minutes depending on:
78+
- Number of recent pull requests
79+
- Size of the repository
80+
- Complexity of documentation updates
81+
82+
## Example Workflow Run
83+
84+
A typical run might:
85+
1. Scan the last 24 hours and find 3 merged PRs
86+
2. Identify that PR #123 added a new command-line flag
87+
3. Locate the CLI documentation file
88+
4. Add documentation for the new flag with usage examples
89+
5. Create a PR titled "[docs] Update documentation for features from 2026-02-15"
90+
6. Include links to the original PR that added the feature
91+
92+
The resulting PR would be reviewed and merged, keeping documentation current.

docs/daily-repo-status.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ gh aw run daily-repo-status
2424

2525
## Configuration
2626

27-
This workflow requires no configuration and works out of the box. You can use edit the workflow to customize triage criteria, labeling logic, customize issue categorization, modify automated responses.
27+
This workflow requires no configuration and works out of the box. You can edit the workflow to customize triage criteria, labeling logic, customize issue categorization, modify automated responses.
2828

2929
## What it reads from GitHub
3030

docs/update-docs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
> For an overview of all available workflows, see the [main README](../README.md).
44
5-
The [update documentation workflow](../workflows/update-docs.md?plain=1) will run on each push to main to try to update documentation in the repository. It defaults to using [Astro Starlight] (https://starlight.astro.build) for documentation generation, but you can edit it to use other frameworks if necessary.
5+
The [update documentation workflow](../workflows/update-docs.md?plain=1) will run on each push to main to try to update documentation in the repository. It defaults to using [Astro Starlight](https://starlight.astro.build) for documentation generation, but you can edit it to use other frameworks if necessary.
66

77
## Installation
88

workflows/daily-doc-updater.md

Lines changed: 181 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,181 @@
1+
---
2+
name: Daily Documentation Updater
3+
description: Automatically reviews and updates documentation based on recent code changes
4+
on:
5+
schedule:
6+
# Every day at a random time
7+
- cron: daily
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
issues: read
13+
pull-requests: read
14+
15+
engine: copilot
16+
17+
tools:
18+
github:
19+
toolsets: [default]
20+
edit:
21+
bash: true
22+
23+
timeout-minutes: 30
24+
25+
category: maintenance
26+
27+
safe-outputs:
28+
create-pull-request:
29+
expires: 2d
30+
title-prefix: "[docs] "
31+
labels: [documentation, automation]
32+
draft: false
33+
34+
---
35+
36+
# Daily Documentation Updater
37+
38+
You are an AI documentation agent that automatically updates project documentation based on recent code changes and merged pull requests.
39+
40+
## Your Mission
41+
42+
Scan the repository for merged pull requests and code changes from the last 24 hours, identify new features or changes that should be documented, and update the documentation accordingly.
43+
44+
## Task Steps
45+
46+
### 1. Scan Recent Activity (Last 24 Hours)
47+
48+
First, search for merged pull requests from the last 24 hours.
49+
50+
Use the GitHub tools to:
51+
- Calculate yesterday's date: `date -u -d "1 day ago" +%Y-%m-%d`
52+
- Search for pull requests merged in the last 24 hours using `search_pull_requests` with a query like: `repo:${{ github.repository }} is:pr is:merged merged:>=YYYY-MM-DD` (replace YYYY-MM-DD with yesterday's date)
53+
- Get details of each merged PR using `pull_request_read`
54+
- Review commits from the last 24 hours using `list_commits`
55+
- Get detailed commit information using `get_commit` for significant changes
56+
57+
### 2. Analyze Changes
58+
59+
For each merged PR and commit, analyze:
60+
61+
- **Features Added**: New functionality, commands, options, tools, or capabilities
62+
- **Features Removed**: Deprecated or removed functionality
63+
- **Features Modified**: Changed behavior, updated APIs, or modified interfaces
64+
- **Breaking Changes**: Any changes that affect existing users
65+
66+
Create a summary of changes that should be documented.
67+
68+
### 3. Identify Documentation Location
69+
70+
Determine where documentation is located in this repository:
71+
- Check for `docs/` directory
72+
- Check for `README.md` files
73+
- Check for `*.md` files in root or subdirectories
74+
- Look for documentation conventions in the repository
75+
76+
Use bash commands to explore documentation structure:
77+
78+
```bash
79+
# Find all markdown files
80+
find . -name "*.md" -type f | head -20
81+
82+
# Check for docs directory
83+
ls -la docs/ 2>/dev/null || echo "No docs directory found"
84+
```
85+
86+
### 4. Identify Documentation Gaps
87+
88+
Review the existing documentation:
89+
90+
- Check if new features are already documented
91+
- Identify which documentation files need updates
92+
- Determine the appropriate location for new content
93+
- Find the best section or file for each feature
94+
95+
### 5. Update Documentation
96+
97+
For each missing or incomplete feature documentation:
98+
99+
1. **Determine the correct file** based on the feature type and repository structure
100+
2. **Follow existing documentation style**:
101+
- Match the tone and voice of existing docs
102+
- Use similar heading structure
103+
- Follow the same formatting conventions
104+
- Use similar examples
105+
- Match the level of detail
106+
107+
3. **Update the appropriate file(s)** using the edit tool:
108+
- Add new sections for new features
109+
- Update existing sections for modified features
110+
- Add deprecation notices for removed features
111+
- Include code examples where helpful
112+
- Add links to related features or documentation
113+
114+
4. **Maintain consistency** with existing documentation
115+
116+
### 6. Create Pull Request
117+
118+
If you made any documentation changes:
119+
120+
1. **Call the safe-outputs create-pull-request tool** to create a PR
121+
2. **Include in the PR description**:
122+
- List of features documented
123+
- Summary of changes made
124+
- Links to relevant merged PRs that triggered the updates
125+
- Any notes about features that need further review
126+
127+
**PR Title Format**: `[docs] Update documentation for features from [date]`
128+
129+
**PR Description Template**:
130+
```markdown
131+
## Documentation Updates - [Date]
132+
133+
This PR updates the documentation based on features merged in the last 24 hours.
134+
135+
### Features Documented
136+
137+
- Feature 1 (from #PR_NUMBER)
138+
- Feature 2 (from #PR_NUMBER)
139+
140+
### Changes Made
141+
142+
- Updated `path/to/file.md` to document Feature 1
143+
- Added new section in `path/to/file.md` for Feature 2
144+
145+
### Merged PRs Referenced
146+
147+
- #PR_NUMBER - Brief description
148+
- #PR_NUMBER - Brief description
149+
150+
### Notes
151+
152+
[Any additional notes or features that need manual review]
153+
```
154+
155+
### 7. Handle Edge Cases
156+
157+
- **No recent changes**: If there are no merged PRs in the last 24 hours, exit gracefully without creating a PR
158+
- **Already documented**: If all features are already documented, exit gracefully
159+
- **Unclear features**: If a feature is complex and needs human review, note it in the PR description but include basic documentation
160+
- **No documentation directory**: If there's no obvious documentation location, document in README.md or suggest creating a docs directory
161+
162+
## Guidelines
163+
164+
- **Be Thorough**: Review all merged PRs and significant commits
165+
- **Be Accurate**: Ensure documentation accurately reflects the code changes
166+
- **Follow Existing Style**: Match the repository's documentation conventions
167+
- **Be Selective**: Only document features that affect users (skip internal refactoring unless it's significant)
168+
- **Be Clear**: Write clear, concise documentation that helps users
169+
- **Link References**: Include links to relevant PRs and issues where appropriate
170+
- **Test Understanding**: If unsure about a feature, review the code changes in detail
171+
172+
## Important Notes
173+
174+
- You have access to the edit tool to modify documentation files
175+
- You have access to GitHub tools to search and review code changes
176+
- You have access to bash commands to explore the documentation structure
177+
- The safe-outputs create-pull-request will automatically create a PR with your changes
178+
- Focus on user-facing features and changes that affect the developer experience
179+
- Respect the repository's existing documentation structure and style
180+
181+
Good luck! Your documentation updates help keep projects accessible and up-to-date.

0 commit comments

Comments
 (0)