Integration: Scheduled Maintenance
Relevant source files
The following files were used as context for generating this wiki page:The project utilizes a suite of scheduled GitHub Actions workflows to automate repository maintenance tasks using Claude. These agents run periodically to handle documentation synchronization, code quality assurance, and dependency management, ensuring the codebase remains healthy and up-to-date with minimal manual intervention. This automated system acts as a proactive quality gate, catching issues and performing routine upkeep.
These scheduled jobs are a key part of the project's MLOps strategy, offloading repetitive work to AI agents. The system is composed of three distinct workflows, each targeting a specific area of maintenance.
Sources: README.md:19-23, README.md:410-416
Scheduled Workflows Overview
The core of the scheduled maintenance system consists of three GitHub Actions workflows. Each is triggered on a cron schedule and uses the anthropics/claude-code-action to execute a specific task defined by a prompt.
| Workflow | Schedule | Purpose | Source File |
|---|---|---|---|
| Docs Sync | Monthly (1st at 00:00) | Reads commits from the last month and ensures documentation is aligned with code changes. | scheduled-claude-code-docs-sync.yml |
| Code Quality | Weekly (Sunday at 00:00) | Reviews random directories and automatically identifies and fixes quality issues. | scheduled-claude-code-quality.yml |
| Dependency Audit | Biweekly (1st & 15th at 00:00) | Performs safe dependency updates and verifies them by running the test suite. | scheduled-claude-code-dependency-audit.yml |
Sources: README.md:418-422, .github/workflows/scheduled-claude-code-docs-sync.yml:4-5, .github/workflows/scheduled-claude-code-quality.yml:4-5, .github/workflows/scheduled-claude-code-dependency-audit.yml:4-5
Monthly Documentation Sync
This workflow ensures that the project's documentation stays current with the codebase. It runs on the first day of every month. The Claude agent is prompted to analyze all commits from the previous month and update documentation files accordingly, using the logic defined in the /docs-sync command.
Sources: .github/workflows/scheduled-claude-code-docs-sync.yml:1-20, README.md:19, .claude/commands/docs-sync.md
The diagram below illustrates the flow of the documentation sync workflow.
The core instruction for the agent is defined in the workflow file:
# .github/workflows/scheduled-claude-code-docs-sync.yml:17-20
prompt: |
Read all commits from the last month and determine if any documentation needs to be updated to reflect the changes.
Use the `/docs-sync` command to guide your work.
If you find any discrepancies, please open a PR with the necessary updates.
Weekly Code Quality Review
To proactively maintain code health, this workflow runs every Sunday. It instructs a Claude agent to select a random part of the codebase, perform a quality review, and automatically fix any issues it finds. This process is guided by the /code-quality command.
Sources: .github/workflows/scheduled-claude-code-quality.yml:1-19, README.md:20, .claude/commands/code-quality.md
This flowchart shows the weekly code quality review process.
The agent's prompt specifies the task:
# .github/workflows/scheduled-claude-code-quality.yml:16-19
prompt: |
Perform a code quality review on a random part of the codebase.
Use the `/code-quality` command to guide your work.
If you find any issues, please open a PR with the necessary fixes.
Biweekly Dependency Audit
This workflow runs on the 1st and 15th of each month to manage project dependencies. The Claude agent is tasked with identifying and updating outdated dependencies, then running the project's test suite to ensure the updates do not introduce breaking changes.
Sources: .github/workflows/scheduled-claude-code-dependency-audit.yml:1-20, README.md:21
The dependency audit process is visualized in the following diagram.
The prompt for this workflow emphasizes safety and verification:
# .github/workflows/scheduled-claude-code-dependency-audit.yml:16-20
prompt: |
Perform a dependency audit.
Update any outdated dependencies to their latest safe versions.
After updating, run the test suite to verify that the changes have not introduced any regressions.
If the tests pass, open a PR with the updates.
Configuration and Setup
To enable these workflows, an ANTHROPIC_API_KEY must be configured as a repository secret. This key is used by the anthropics/claude-code-action@beta to authenticate with the Anthropic API.
Sources: README.md:424-425, .github/workflows/scheduled-claude-code-docs-sync.yml:15
# .github/workflows/scheduled-claude-code-docs-sync.yml:14-15
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
Summary
The scheduled maintenance system is a powerful feature of the project that leverages Claude agents to automate essential but time-consuming tasks. By periodically synchronizing documentation, reviewing code quality, and auditing dependencies, these workflows ensure the long-term health, security, and maintainability of the repository. This automation frees up developer time to focus on feature development while maintaining high-quality standards.
Sources: README.md:19-23