Skip to content

Add daily documentation updater workflow#1861

Merged
pelikhan merged 4 commits intomainfrom
copilot/update-daily-docs
Oct 17, 2025
Merged

Add daily documentation updater workflow#1861
pelikhan merged 4 commits intomainfrom
copilot/update-daily-docs

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Oct 17, 2025

Overview

This PR adds a new agentic workflow that automatically keeps documentation up-to-date by scanning merged pull requests and code changes from the last 24 hours, then updating the documentation accordingly.

Motivation

As the project evolves with new features and changes, documentation can quickly fall out of sync with the codebase. This workflow automates the documentation maintenance process by:

  • Monitoring daily code changes and merged PRs
  • Identifying features that need documentation
  • Updating docs following established guidelines
  • Creating pull requests with comprehensive documentation updates

Implementation

Workflow File: .github/workflows/daily-doc-updater.md

The workflow runs daily at 9am UTC (or can be triggered manually) and performs the following steps:

  1. Scans Recent Activity - Uses GitHub API to search for merged PRs and commits from the last 24 hours
  2. Analyzes Changes - Categorizes features as added, removed, modified, or breaking changes
  3. Loads Documentation Guidelines - Reads .github/instructions/documentation.instructions.md to ensure consistency with the Diátaxis framework and Astro Starlight syntax
  4. Identifies Documentation Gaps - Scans docs/src/content/docs/ to determine which files need updates
  5. Updates Documentation - Edits appropriate files based on feature type (CLI commands, reference docs, how-to guides, samples)
  6. Creates Pull Request - Uses safe-outputs to create a PR with documentation changes, including references to the merged PRs that triggered the updates

Configuration

Engine: Claude with network access to GitHub domains
Permissions: Read-only (contents: read, pull-requests: read, actions: read)
Tools:

  • Cache-memory (for persistent storage across workflow runs)
  • GitHub API (search PRs, commits, file contents)
  • Edit tool (for modifying documentation files)
  • Bash (for exploring documentation structure)

Safe Outputs: Configured to create pull requests with:

  • Title prefix: [docs]
  • Labels: documentation, automation
  • Draft: false (ready for review)

Example Output

When features are merged, the workflow creates a PR like:

Title: [docs] Update documentation for features from 2025-10-17

Description:

## Documentation Updates - 2025-10-17

This PR updates the documentation based on features merged in the last 24 hours.

### Features Documented

- New cache-memory configuration options (from #123)
- Updated safe-outputs API (from #124)

### Changes Made

- Updated `docs/src/content/docs/reference/cache-memory.md` to document new options
- Added new section in `docs/src/content/docs/reference/safe-outputs.md` for API updates

### Merged PRs Referenced

- #123 - Add multi-cache support for cache-memory
- #124 - Extend safe-outputs with upload-assets

Edge Cases

The workflow handles several edge cases gracefully:

  • No recent changes: Exits without creating a PR
  • Already documented: Skips features that are already documented
  • Complex features: Notes them in the PR description for manual review
  • Multiple features: Documents all in a single comprehensive PR

Testing

  • ✅ Workflow compiles successfully (197.5 KB)
  • ✅ Lock file validates with no errors or warnings
  • ✅ All unit tests pass
  • ✅ Bash commands are portable across shells
  • ✅ GitHub search syntax is correct
  • ✅ Code review feedback addressed

Files Changed

  • .github/workflows/daily-doc-updater.md - Main workflow definition
  • .github/workflows/daily-doc-updater.lock.yml - Generated GitHub Actions workflow

The workflow is now ready to run and will help maintain documentation quality automatically.

Original prompt

Generate an agentic workflow that runs daily and update docs with features from the last 24h

  • scan merged PRs and code changes from the last 24h
  • summarize features added, removed, modified
  • for each missing docs feature, update docs following the documenation instructions (tell LLM to load th instructions file)

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits October 17, 2025 12:45
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
draft: false

tools:
github:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot add cache-memory tool

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added cache-memory tool in commit 895e714.

Comment thread .github/workflows/daily-doc-updater.md Outdated

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.

## Current Context
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot remove current context

Copilot AI changed the title [WIP] Update documentation with features from the last 24 hours Add daily documentation updater workflow Oct 17, 2025
Copilot AI requested a review from pelikhan October 17, 2025 12:53
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
@pelikhan pelikhan marked this pull request as ready for review October 17, 2025 14:59
@pelikhan pelikhan merged commit 16ec75f into main Oct 17, 2025
5 checks passed
@pelikhan pelikhan deleted the copilot/update-daily-docs branch October 17, 2025 14:59
@github-actions
Copy link
Copy Markdown
Contributor

Agentic Changeset Generator triggered by this pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants