Skip to content

Commit 828ac10

Browse files
committed
add command mode
1 parent ee50a3b commit 828ac10

2 files changed

Lines changed: 34 additions & 4 deletions

File tree

docs/repo-assist.md

Lines changed: 19 additions & 2 deletions
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 [Repo Assist workflow](../workflows/repo-assist.md?plain=1) is a friendly repository assistant that runs daily to support contributors and maintainers. 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.
5+
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.
66

77
## Installation
88

@@ -22,6 +22,22 @@ You can start a run of this workflow immediately by running:
2222
gh aw run repo-assist
2323
```
2424

25+
## On-Demand Usage
26+
27+
You can also trigger Repo Assist on-demand by commenting on any issue or PR:
28+
29+
```
30+
/repo-assist <instructions>
31+
```
32+
33+
When triggered this way, Repo Assist focuses exclusively on your instructions instead of running its normal scheduled tasks. For example:
34+
35+
- `/repo-assist investigate this bug and suggest a fix`
36+
- `/repo-assist add documentation for the new API endpoints`
37+
- `/repo-assist review this PR and suggest improvements`
38+
39+
All the same guidelines apply (AI disclosure, running formatters/linters/tests, being polite and constructive).
40+
2541
## How It Works
2642

2743
````mermaid
@@ -133,9 +149,10 @@ After editing run `gh aw compile` to update the workflow and commit all changes
133149
- **No breaking changes**: Never changes public APIs without explicit approval
134150
- **No new dependencies**: Discusses in an issue first
135151
- **Small, focused PRs**: One concern per PR
152+
- **Read AGENTS.md first**: Before starting work on any pull request, reads the repository's `AGENTS.md` file (if present) to understand project-specific conventions, coding standards, and contribution requirements
136153
- **AI transparency**: Every output includes robot emoji disclosure
137154
- **Anti-spam**: Never posts repeated or follow-up comments to itself; re-engages only when new human comments appear
138-
- **Build and test verification**: Never creates PRs with failing builds
155+
- **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
139156

140157
## Example Monthly Activity Issue
141158

workflows/repo-assist.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
description: |
33
A friendly repository assistant that runs daily to support contributors and maintainers.
4+
Can also be triggered on-demand via '/repo-assist <instructions>' to perform specific tasks.
45
- Comments helpfully on open issues to unblock contributors and onboard newcomers
56
- Identifies issues that can be fixed and creates draft pull requests with fixes
67
- Studies the codebase and proposes improvements via PRs
@@ -15,6 +16,9 @@ description: |
1516
on:
1617
schedule: daily
1718
workflow_dispatch:
19+
slash_command:
20+
name: repo-assist
21+
reaction: "eyes"
1822

1923
timeout-minutes: 60
2024

@@ -78,7 +82,15 @@ engine: copilot
7882

7983
# Repo Assist
8084

81-
## Role
85+
## Command Mode
86+
87+
Take heed of **instructions**: "${{ steps.sanitized.outputs.text }}"
88+
89+
If these are non-empty (not ""), then you have been triggered via `/repo-assist <instructions>`. Follow the user's instructions instead of the normal scheduled workflow. Focus exclusively on those instructions. Apply all the same guidelines (read AGENTS.md, run formatters/linters/tests, be polite, use AI disclosure). Skip the round-robin task workflow below and the reporting and instead directly do what the user requested. If no specific instructions were provided (empty or blank), proceed with the normal scheduled workflow below.
90+
91+
Then exit — do not run the normal workflow after completing the instructions.
92+
93+
## Non-Command Mode
8294

8395
You are Repo Assist for `${{ github.repository }}`. Your job is to support human contributors, help onboard newcomers, identify improvements, and fix bugs by creating pull requests. You never merge pull requests yourself; you leave that decision to the human maintainers.
8496

@@ -260,7 +272,8 @@ Maintain a single open issue titled `[Repo Assist] Monthly Activity {YYYY}-{MM}`
260272
- **No breaking changes** without maintainer approval via a tracked issue.
261273
- **No new dependencies** without discussion in an issue first.
262274
- **Small, focused PRs** — one concern per PR.
263-
- **Build and test before every PR**: build failure or test failures caused by your changes → do not create the PR. Infrastructure failures → create the PR but document in the Test Status section.
275+
- **Read AGENTS.md first**: before starting work on any pull request, read the repository's `AGENTS.md` file (if present) to understand project-specific conventions, coding standards, and contribution requirements.
276+
- **Build, format, lint, and test before every PR**: run any code formatting, linting, and testing checks configured in the repository. Build failure, lint errors, or test failures caused by your changes → do not create the PR. Infrastructure failures → create the PR but document in the Test Status section.
264277
- **Respect existing style** — match code formatting and naming conventions.
265278
- **AI transparency**: every comment, PR, and issue must include a Repo Assist disclosure with 🤖.
266279
- **Anti-spam**: no repeated or follow-up comments to yourself in a single run; re-engage only when new human comments have appeared.

0 commit comments

Comments
 (0)