Skip to content

RFC for working with GitHub coding agent #131

@kenoir

Description

@kenoir

We should add an RFC that discusses how to work effectively with GitHub copilot coding agent. If should follow the RFC style in the repository and cover the following points and any other relevant considerations for a small development team.


See: https://docs.github.com/en/copilot/concepts/coding-agent/coding-agent

“With Copilot coding agent, GitHub Copilot can work independently in the background to complete tasks, just like a human developer.”

An example PR:
wellcomecollection/catalogue-pipeline#2969

Working model:

Coding agent is sandboxed (it has an allow list for making network requests), it has access to common development tools and dependency management repos (e.g. npm).
It can only push changes to copilot/ prefixed branches.
Your issue needs to be in the same repository as the PR.
When it’s done it will request a review, you can review its PR and suggest changes.
It will respond to suggested changes, and you can iterate towards a solution.

You can check out the branch yourself and push changes to its branch if you want to.
You can review its thought process by looking at “view session”.

Process rules for Wellcome Collection:

Assigner is responsible for the PR
Assigner should be the one to prompt co-pilot in the PR
Copilot authored PRs need a review from a non-assigner dev

Cost:

https://docs.github.com/en/copilot/get-started/plans#comparing-copilot-plans
Uses actions minutes of which we have a finite quantity per month
Prompts are premium requests, per user (with business 300 per month)

Guidelines for use:

Issue Prompts should be clear and describe the outcome
Repo instructions might help
https://docs.github.com/en/copilot/how-tos/configure-custom-instructions/add-repository-instructions
https://github.com/wellcomecollection/catalogue-pipeline/blob/main/.github/instructions/.instructions.md
Choose well defined issue - if you feel “this one is easy, I know how to do it”.
Work asynchronously - do something else while it’s working.

Potential pitfalls:

It can be wrong while convincingly appearing correct - a human review is necessary!
If the outcome is not well specified, it might imagine a solution for you.
It can write a lot of code very quickly - the bottleneck will be human review.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions