Skip to content

Commit 69dc52f

Browse files
authored
update repo assist to use a balanced weighted task choice strategy (#241)
1 parent c3c849b commit 69dc52f

3 files changed

Lines changed: 201 additions & 102 deletions

File tree

.github/aw/actions-lock.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@
1414
"repo": "github/gh-aw/actions/setup",
1515
"version": "v0.52.1",
1616
"sha": "a86e657586e4ac5f549a790628971ec02f6a4a8f"
17+
},
18+
"github/gh-aw/actions/setup@v0.53.6": {
19+
"repo": "github/gh-aw/actions/setup",
20+
"version": "v0.53.6",
21+
"sha": "956f874e40e831c08a8b01ec76f5d49ae3fe8387"
1722
}
1823
}
1924
}

docs/repo-assist.md

Lines changed: 61 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
>
55
> [Blog Post by @dsyme](https://dsyme.net/2026/02/25/repo-assist-a-repository-assistant/)
66
7-
The [Repo Assist workflow](../workflows/repo-assist.md?plain=1) is a friendly repository assistant that runs daily to support contributors and maintainers. It can also be triggered on-demand via `/repo-assist <instructions>` to perform specific tasks. It triages issues, comments helpfully, fixes bugs via pull requests, proposes improvements, maintains its own PRs, nudges stale PRs, manages labels, prepares releases, welcomes new contributors, and maintains a monthly activity summary for maintainer visibility.
7+
The [Repo Assist workflow](../workflows/repo-assist.md?plain=1) is a friendly repository assistant that runs daily to support contributors and maintainers. It can also be triggered on-demand via `/repo-assist <instructions>` to perform specific tasks. Each run it selects two tasks via a weighted random draw based on live repo data — heavily favouring issue labelling and triage when the backlog is large, then shifting to engineering, testing, and forward progress as the backlog clears. It maintains a monthly activity summary for maintainer visibility.
88

99
## Installation
1010

@@ -22,65 +22,86 @@ This walks you through adding the workflow to your repository.
2222

2323
````mermaid
2424
graph LR
25-
A[Read Memory] --> B[Triage Issues]
26-
A --> C[Fix Bugs via PR]
27-
A --> D[Propose Improvements]
28-
A --> E[Update Own PRs]
29-
A --> F[Nudge Stale PRs]
30-
A --> G[Manage Labels]
31-
A --> H[Prepare Releases]
32-
A --> I[Welcome Contributors]
33-
A --> J[Update Activity Summary]
34-
B --> J
35-
C --> J
36-
D --> J
37-
E --> J
38-
F --> J
39-
G --> J
40-
H --> J
41-
I --> J
42-
J --> K[Save Memory]
25+
P[Fetch repo data] --> W[Compute task weights]
26+
W --> S[Select 2 tasks]
27+
S --> A[Read Memory]
28+
A --> T1[Task 1: Issue Labelling]
29+
A --> T2[Task 2: Issue Investigation + Comment]
30+
A --> T3[Task 3: Issue Investigation + Fix]
31+
A --> T4[Task 4: Engineering Investments]
32+
A --> T5[Task 5: Coding Improvements]
33+
A --> T6[Task 6: Maintain Repo Assist PRs]
34+
A --> T7[Task 7: Stale PR Nudges]
35+
A --> T8[Task 8: Performance Improvements]
36+
A --> T9[Task 9: Testing Improvements]
37+
A --> T10[Task 10: Take Repo Forward]
38+
T1 & T2 & T3 & T4 & T5 & T6 & T7 & T8 & T9 & T10 --> T11[Task 11: Monthly Activity Summary]
39+
T11 --> M[Save Memory]
4340
````
4441

45-
The workflow operates through ten coordinated tasks each run:
42+
Each run a deterministic pre-step fetches live repo data (open issues, unlabelled issues, open PRs) and computes a **weighted probability** for each task. Two tasks are selected and printed in the workflow logs, then communicated to the agent via prompting. The weights adapt naturally: when unlabelled issues are high, labelling dominates; when there are many open issues, commenting and fixing dominate; as the backlog clears, engineering and forward-progress tasks draw more evenly.
4643

47-
### Task 1: Triage and Comment on Open Issues
44+
### Task 1: Issue Labelling
4845

49-
Repo Assist reviews open issues and comments **only when it has something genuinely valuable to add**. It identifies issue types (bug reports, feature requests, questions) and provides helpful responses while avoiding noise. It processes up to 30 issues per run and saves its position so each run continues from where the last one left off, systematically covering the entire backlog over time. It also re-engages with issues when new human comments have been added since its last response.
46+
Default weighting: dominates when the label backlog is large.
5047

51-
### Task 2: Fix Issues via Pull Requests
48+
Applies appropriate labels to unlabelled issues and PRs based on content analysis. Removes misapplied labels. Conservative and confident — only applies labels it is sure about.
5249

53-
When it finds a fixable bug, Repo Assist implements a minimal, surgical fix, runs build and tests, and creates a draft PR. All PRs include a Test Status section showing build/test results.
50+
### Task 2: Issue Investigation and Comment
5451

55-
### Task 3: Study the Codebase and Propose Improvements
52+
Default weighting: scales with backlog size.
5653

57-
Repo Assist identifies improvement opportunities like documentation gaps, test coverage, and code clarity. It proposes only clearly beneficial, low-risk changes.
54+
Repo Assist reviews open issues and comments **only when it has something genuinely valuable to add**. It processes issues oldest-first using a memory-backed cursor, prioritising issues that have never received a Repo Assist comment. It also re-engages when new human comments appear.
5855

59-
### Task 4: Update Dependencies and Engineering
56+
### Task 3: Issue Investigation and Fix
6057

61-
Periodically (at most weekly), Repo Assist checks for dependency updates and engineering improvements, creating PRs for beneficial changes. It also bundles multiple open Dependabot PRs into a single consolidated update PR that applies all compatible updates together.
58+
Default weighting: scales with backlog size.
6259

63-
### Task 5: Maintain Repo Assist Pull Requests
60+
When it finds a fixable bug or clearly actionable issue, Repo Assist implements a minimal, surgical fix, runs build and tests, and creates a draft PR. Can work on issues it has previously commented on. All PRs include a Test Status section.
61+
62+
### Task 4: Engineering Investments
63+
64+
Default weighting: steady baseline with issue-count bias.
65+
66+
Dependency updates, CI improvements, tooling upgrades, SDK version bumps, and build system improvements. Bundles multiple Dependabot PRs into a single consolidated update where possible.
67+
68+
### Task 5: Coding Improvements
69+
70+
Default weighting: steady baseline.
71+
72+
Studies the codebase and proposes clearly beneficial, low-risk improvements: code clarity, dead code removal, API usability, documentation gaps, duplication reduction.
73+
74+
### Task 6: Maintain Repo Assist PRs
75+
76+
Default weighting: only meaningful when open PRs exist.
6477

6578
Keeps its own PRs healthy by fixing CI failures and resolving merge conflicts. Uses `push_to_pull_request_branch` to update PR branches directly.
6679

67-
### Task 6: Stale PR Nudges
80+
### Task 7: Stale PR Nudges
81+
82+
Default weighting: scales with non-Repo-Assist PR count.
83+
84+
Politely nudges PR authors when their PRs have been waiting 14+ days for a response. Maximum 3 nudges per run, never nags the same PR twice.
85+
86+
### Task 8: Performance Improvements
87+
88+
Default weighting: steady baseline.
6889

69-
Politely nudges PR authors when their PRs have been waiting 14+ days for response. Maximum 3 nudges per run, never nags the same PR twice.
90+
Identifies and implements meaningful performance improvements: algorithmic efficiency, unnecessary work, caching, memory usage, startup time.
7091

71-
### Task 7: Manage Labels
92+
### Task 9: Testing Improvements
7293

73-
Applies appropriate labels (`bug`, `enhancement`, `help wanted`, `good first issue`) to unlabeled issues and PRs based on content analysis. Conservative and confident.
94+
Default weighting: steady baseline.
7495

75-
### Task 8: Release Preparation
96+
Improves test quality and coverage: missing tests for existing functionality, flaky tests, slow tests, test infrastructure. Avoids low-value tests that just inflate coverage numbers.
7697

77-
Weekly, checks for unreleased changes and proposes release PRs with updated changelogs. Follows SemVer - never proposes major bumps without approval.
98+
### Task 10: Take the Repository Forward
7899

79-
### Task 9: Welcome New Contributors
100+
Default weighting: steady baseline.
80101

81-
Greets first-time contributors with a warm welcome message, pointing them to README and CONTRIBUTING docs. Maximum 3 welcomes per run.
102+
Proactively moves the repository forward — considers the goals and aims of the repo, implements backlog features, investigates difficult bugs, drafts plans and proposals, or charts out future work. Work may span multiple runs; Repo Assist checks memory for anything in progress and continues before starting something new.
82103

83-
### Task 10: Monthly Activity Summary
104+
### Task 11: Monthly Activity Summary
84105

85106
Every run, Repo Assist updates a rolling monthly activity issue that gives maintainers a single place to see all activity and suggested actions.
86107

@@ -95,6 +116,8 @@ Every run, Repo Assist updates a rolling monthly activity issue that gives maint
95116
- **AI transparency**: Every output includes robot emoji disclosure
96117
- **Anti-spam**: Never posts repeated or follow-up comments to itself; re-engages only when new human comments appear
97118
- **Build, format, lint, and test verification**: Runs any code formatting, linting, and testing checks configured in the repository before creating PRs; never creates PRs with failing builds or lint errors caused by its changes
119+
- **Release preparation**: Uses judgement each run to assess whether a release is warranted — no dedicated release task; proposes release PRs on its own initiative when appropriate
120+
- **Good contributor etiquette**: Warmly welcomes first-time contributors and points them to README and CONTRIBUTING as a normal part of good behaviour
98121

99122
## Usage
100123

0 commit comments

Comments
 (0)