diff --git a/.github/agents/project-maintainer.md b/.github/agents/project-maintainer.md index ba3bf34..adae5df 100644 --- a/.github/agents/project-maintainer.md +++ b/.github/agents/project-maintainer.md @@ -1,6 +1,6 @@ --- name: Project Maintainer -description: Project maintenance specialist responsible for managing dependencies and Dependabot PRs, triaging and organizing issues, identifying improvement opportunities, planning enhancements and releases, and performing weekly maintenance tasks. +description: Project maintenance specialist responsible for managing dependencies and Dependabot PRs, triaging and organizing issues, identifying improvement opportunities, and planning enhancements and releases. --- # Project Maintainer @@ -40,46 +40,13 @@ and identifies improvement opportunities. Proactively maintains project health. ## Working Approach -- **Monitor Regularly**: Check project health metrics weekly +- **Monitor Regularly**: Check project health metrics regularly - **Be Proactive**: Identify issues before they become problems - **Stay Current**: Keep dependencies and practices modern - **Prioritize Wisely**: Focus on high-impact improvements - **Maintain Standards**: Ensure changes align with project philosophy - **Communicate Clearly**: Provide context and rationale for decisions -## Weekly Maintenance Tasks - -When running weekly maintenance: - -1. **Review Project Status** - - Check recent commits and PRs - - Review open issues - - Check CI/CD status - - Review SonarCloud dashboard - -2. **Dependency Updates** - - Review Dependabot PRs - - Check for new versions of development tools - - Test compatibility with latest .NET previews - -3. **Issue Management** - - Triage new issues - - Update labels and priorities - - Comment on resolved or stale issues but do not close them - - Link related issues - -4. **Identify Improvements** - - Review code coverage reports - - Check for technical debt - - Identify refactoring opportunities - - Propose enhancements - -5. **Create Maintenance Issues** - - Document identified improvements - - Create issues with clear descriptions - - Label appropriately (enhancement, technical-debt, etc.) - - Prioritize based on impact - ## Enhancement Proposal Template When creating enhancement issues: diff --git a/.github/workflows/weekly-maintenance.yml b/.github/workflows/weekly-maintenance.yml deleted file mode 100644 index 5b49cca..0000000 --- a/.github/workflows/weekly-maintenance.yml +++ /dev/null @@ -1,161 +0,0 @@ ---- -# Weekly Project Maintenance Workflow -# This workflow can be used to trigger the Project Maintainer agent for regular maintenance tasks - -name: Weekly Maintenance - -on: - schedule: - # Run every Monday at 9:00 AM UTC - - cron: '0 9 * * 1' - workflow_dispatch: # Allow manual triggering - -permissions: - contents: read - issues: write - pull-requests: read - id-token: write - -jobs: - maintenance: - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v6 - with: - fetch-depth: 0 - - - name: Create Maintenance Issue - uses: actions/github-script@v8 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - script: | - const today = new Date().toISOString().split('T')[0]; - - // Create a maintenance issue for the Project Maintainer agent - const issue = await github.rest.issues.create({ - owner: context.repo.owner, - repo: context.repo.repo, - title: `Weekly Maintenance - ${today}`, - body: `## Weekly Maintenance Tasks - - This issue tracks weekly project maintenance activities. - The Project Maintainer agent should review and address the following: - - ### Tasks - - - [ ] Review and triage open issues - - [ ] Review pending Dependabot PRs - - [ ] Check CI/CD pipeline status - - [ ] Review SonarCloud metrics - - [ ] Check code coverage trends - - [ ] Identify technical debt or improvement opportunities - - [ ] Create enhancement issues for identified improvements - - [ ] Update project documentation if needed - - [ ] Close resolved or stale issues - - ### Instructions for Project Maintainer Agent - - Please review each task above and: - 1. Complete the maintenance activities - 2. Check off completed items - 3. Create separate issues for any significant improvements - 4. Add comments with findings and actions taken - 5. Close this issue once all maintenance is complete - - --- - *This issue was automatically created by the Weekly Maintenance workflow.* - *The project-maintainer agent has been automatically assigned to address these tasks.*`, - labels: ['maintenance', 'automated'] - }); - - console.log(`Created maintenance issue #${issue.data.number}`); - - // Query for the project-maintainer custom agent ID - const agentQuery = ` - query($owner: String!, $repo: String!, $slug: String!) { - repository(owner: $owner, name: $repo) { - customAgent(slug: $slug) { - id - name - } - } - } - `; - - let customAgentId; - try { - const agentResponse = await github.graphql(agentQuery, { - owner: context.repo.owner, - repo: context.repo.repo, - slug: 'project-maintainer' - }); - - customAgentId = agentResponse.repository.customAgent?.id; - - if (!customAgentId) { - console.log('Warning: project-maintainer agent not found'); - // Fallback: Post a comment mentioning the agent - await github.rest.issues.createComment({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: issue.data.number, - body: '@copilot[project-maintainer] Please review and complete ' + - 'the weekly maintenance tasks listed above.' - }); - return; - } - - console.log(`Found project-maintainer agent: ` + - `${agentResponse.repository.customAgent.name} ` + - `(${customAgentId})`); - } catch (error) { - console.log(`Error querying for agent: ${error.message}`); - // Fallback: Post a comment mentioning the agent - await github.rest.issues.createComment({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: issue.data.number, - body: '@copilot[project-maintainer] Please review and complete ' + - 'the weekly maintenance tasks listed above.' - }); - return; - } - - // Assign the custom agent to the issue using GraphQL mutation - const assignMutation = ` - mutation($assignableId: ID!, $customAgentId: ID!) { - assignCopilotAgentToAssignable(input: { - assignableId: $assignableId, - customAgentId: $customAgentId - }) { - assignable { - ... on Issue { - number - title - } - } - } - } - `; - - try { - const assignResponse = await github.graphql(assignMutation, { - assignableId: issue.data.node_id, - customAgentId: customAgentId - }); - - console.log(`Successfully assigned project-maintainer agent ` + - `to issue #${issue.data.number}`); - } catch (error) { - console.log(`Error assigning agent: ${error.message}`); - // Fallback: Post a comment mentioning the agent - await github.rest.issues.createComment({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: issue.data.number, - body: '@copilot[project-maintainer] Please review and complete ' + - 'the weekly maintenance tasks listed above.' - }); - } diff --git a/AGENTS.md b/AGENTS.md index 7924708..2688f30 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -411,7 +411,6 @@ Project maintenance specialist responsible for: - Triaging and organizing issues - Identifying improvement opportunities - Planning enhancements and releases -- Weekly maintenance tasks **Use this agent for**: Issue triage, dependency updates, project health checks, and enhancement planning.