Skip to content

Commit b473d0b

Browse files
Add CONTRIBUTING.md
1 parent 48a408f commit b473d0b

1 file changed

Lines changed: 39 additions & 41 deletions

File tree

CONTRIBUTING.md

Lines changed: 39 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
Welcome to the Open Source and Energy Access (OSEA) contributors' guide.
44
This guide covers how to make a meaningful contribution and what you can expect from maintainers in return.
5-
OSEA prioritises and values its commitment to creating a safe and inclusive community where everyone can contribute and thrive.
5+
OSEA prioritises and values its commitment to creating a safe and inclusive community where everyone can contribute and thrive.
66
It is therefore essential to ensure that everyone adheres to our [Code of Conduct](./CODE_OF_CONDUCT.md).
77

88
## Getting Started
99

1010
Review the existing issues and the discussion thread to ensure your issue has not been previously addressed.
11-
This document narrows down by providing resources to reduce time wastage and increase productivity.
11+
This document narrows down by providing resources to reduce time wastage and increase productivity.
1212
Most documentation is currently written in Markdown, making it easy to add, modify, and delete content as necessary.
1313

1414
## Setting up your Environment
@@ -31,54 +31,63 @@ git switch -c update-fixture
3131

3232
## Creating a Pull Request
3333

34-
> ⚠️ Heads up! Please ensure that there is an existing issue first and that you've been assigned to it before opening a PR, unless your change is minor (e.g. fixing a typo).
35-
This allows the maintainer to provide guidance and prioritise tasks.
36-
We acknowledge everyone's contributions and strive for transparent communication.
34+
> ⚠️ Heads up! Please ensure that there is an existing issue first and that you've been assigned to it before opening a PR, unless your change is minor (e.g. fixing a typo).
35+
> This allows the maintainer to provide guidance and prioritise tasks.
36+
> We acknowledge everyone's contributions and strive for transparent communication.
3737
3838
### What makes a good PR?
39+
3940
Every good PR should contain one logical block of work. Unrelated changes should go into separate PRs.
4041
The rule of thumb is: PR should be as small as possible, as large as necessary to form a meaningful, self-contained piece of work.
41-
Smaller PRs are easier to review, faster to merge. If you find yourself wanting to fix a typo, refactor a helper, and add a feature on the same branch, split them; each change gets its own PR.
42+
Smaller PRs are easier to review, faster to merge. If you find yourself wanting to fix a typo, refactor a helper, and add a feature on the same branch, split them; each change gets its own PR.
4243

4344
### Two ways to contribute
45+
4446
- **GitHub interface**- Fork the repo, edit directly in the browser, and submit a PR. This [guide](https://guides.github.com/activities/hello-world) shows just how to do that for a small personal repo.
45-
- **Fork and Clone**- Fork, clone locally, and work in your IDE. Required for code changes and any project with an associated application. For that, we recommend this [guide](https://www.dataschool.io/how-to-contribute-on-github/).
47+
- **Fork and Clone**- Fork, clone locally, and work in your IDE. Required for code changes and any project with an associated application. For that, we recommend this [guide](https://www.dataschool.io/how-to-contribute-on-github/).
4648

4749
### Commits and Pull Request Titles
50+
4851
We use GitHub Flow. Every PR is squash-merged into a single commit on main. This shapes how you should think about commits and PR titles.
52+
4953
- **Inside your PR**:commits do not need to follow any convention. Commit as often as you like, and use whatever messages help you track your own work. Frequent commits help reviewers follow your thinking.
5054
- **PR title**: becomes the squashed commit message on main, so it must be clean and follow Conventional Commits.
5155

5256
## Conventional Commits
5357

54-
| Prefix | When to Use |
55-
|-------------|----------------------------------------------------------------|
56-
| chore: | Miscellaneous commits, e.g., modifying .gitignore |
57-
| feat: | Commits that add or remove a feature to the API or UI |
58-
| docs: | Commits that affect documentation only |
59-
| fix: | Commits that fix a bug of a preceding feat commit |
60-
| refactor: | Rewrites/restructures code without changing API or UI behaviour |
61-
| revert: | Creates a new commit that undoes previous changes |
58+
| Prefix | When to Use |
59+
| --------- | --------------------------------------------------------------- |
60+
| chore: | Miscellaneous commits, e.g., modifying .gitignore |
61+
| feat: | Commits that add or remove a feature to the API or UI |
62+
| docs: | Commits that affect documentation only |
63+
| fix: | Commits that fix a bug of a preceding feat commit |
64+
| refactor: | Rewrites/restructures code without changing API or UI behaviour |
65+
| revert: | Creates a new commit that undoes previous changes |
6266

6367
## Waiting for Review
68+
6469
The waiting period plays a pivotal role in your contributor journey. We kindly ask that you be patient if maintainers do not review your pull request immediately, as it may take time to give every PR the attention it deserves.
6570
If it has been over one week and you haven't received any acknowledgement, you can post a comment on your PR as a polite reminder.
6671

6772
## Using AI Tools as a Contributor
73+
6874
OSEA is a learning community. Contributing here is not just about shipping code or documentation; it is about building skills and understanding that serve the broader energy access ecosystem. This shapes how we think about AI tools.
6975
AI coding assistants can genuinely help you learn and contribute more effectively. They can also produce plausible-looking work that neither you nor the maintainer fully understands, and reviewing that work takes real time. Our AI policy exists to protect both your learning and the maintainers' capacity.
70-
> **Guiding principle**: *Al is your assistant, not your author. If you cannot explain it, do not submit*.
76+
77+
> **Guiding principle**: _Al is your assistant, not your author. If you cannot explain it, do not submit_.
7178
7279
## What AI use is appropriate
80+
7381
Use AI tools to support your understanding, not to replace it. For Example:
7482

7583
- Using AI to explain unfamiliar syntax, functions, or patterns before you implement something yourself
7684
- Asking AI to review code you have already written for edge cases or clarity
7785
- Using AI to help you draft a test scaffold, which you then review, correct, and extend
7886
- Asking AI to help you structure a bug report or feature proposal in your own words
7987
- Using AI to improve the grammar or clarity of the documentation you have already written
80-
88+
8189
Uses that cross the line:
90+
8291
- Asking AI to implement a feature and submitting the output with minor changes
8392
- Using AI to generate documentation for code you do not understand
8493
- Pasting a codebase into AI and asking "what should I change?" without attempting the problem yourself first
@@ -87,26 +96,31 @@ Uses that cross the line:
8796
If you are unsure whether a specific use is appropriate, describe it in your PR, and the maintainer will let you know.
8897

8998
## Disclosure
99+
90100
Transparency about AI use is required whenever AI meaningfully shapes your contribution. For instance, when it drafted code, suggested architecture, rewrote documentation, or helped diagnose a complex issue. It is not required for single-line autocomplete, minor grammar fixes, or syntax lookups.
91101

92-
Add a note to your PR description:
93-
> *Cursor suggested the initial approach. I adapted it to fit our PAYGo data model, rewrote the core logic, and added all edge-case tests manually"*
102+
Add a note to your PR description:
103+
104+
> _Cursor suggested the initial approach. I adapted it to fit our PAYGo data model, rewrote the core logic, and added all edge-case tests manually"_
94105
95106
Undisclosed AI use that becomes apparent during review is treated as a trust issue, not just a policy issue.
96107

97108
## Your responsibility as a contributor
98109

99110
You are fully responsible for everything you submit, regardless of how you wrote it.
111+
100112
- Be able to explain any block of code and how it fits the project. Maintainers may ask you to walk through your changes before a PR is merged.
101113
- Review AI output critically: AI can produce plausible-looking but incorrect or insecure code.
102114
- Never submit AI-assisted code without running the test suite locally.
103115
- AI output often introduces inconsistent formatting, naming conventions, or unnecessary complexity. Match the style of the surrounding codebase.
104-
- Own the edge cases: AI has no knowledge of low-connectivity environments, PAYGo loan structures, mini-grid constraints, or the specific conventions of this project.
116+
- Own the edge cases: AI has no knowledge of low-connectivity environments, PAYGo loan structures, mini-grid constraints, or the specific conventions of this project.
105117
- Verify generated tests: AI may assert incorrect values or miss domain-specific edge cases entirely. Every generated test needs your sign-off.
106118
- Remove AI filler: phrases like "This function efficiently handles…" belong in marketing copy, not documentation. Be precise and direct.
107119

108120
## What contributors can expect from maintainers
121+
109122
Contribution is a two-way relationship. In return, you can expect the following from OSEA maintainers:
123+
110124
- If a week passes with no acknowledgement of your issue or PR, a polite reminder is welcome.
111125
- Reviews focus on the work, not the contributor. Comments aim to teach, not to gatekeep.
112126
- If a design decision in the codebase is not obvious, ask, and a maintainer will explain the reasoning behind it.
@@ -123,36 +137,20 @@ Maintainer reviews are about knowledge transfer, mentorship, and project coheren
123137
Issue discussions and PR conversations should remain human-to-human. Use AI to help you prepare your thoughts, but write in your own words and engage genuinely with the community.
124138

125139
## A note to new contributors
140+
126141
If you are new to Open Source, AI tools can feel like a shortcut past the uncomfortable parts of learning. We encourage you to sit with those uncomfortable parts. Reading unfamiliar code, debugging without a clear answer, and working through a reviewer's feedback are where real understanding develops.
127142

128143
Use AI to unblock yourself when you are genuinely stuck, not to avoid getting stuck in the first place. The stuck moments are where the learning happens.
129144

130145
If you are unsure where to start or how to approach a problem, ask in [Discord](https://community.oseas.org) or open a GitHub Discussion. We would rather help you find your footing than review a well-formatted PR that nobody fully understands.
131146

132147
## A note to reviewers
148+
133149
Maintainers are not expected to audit contributions for AI use. However, if a PR shows signs of AI generation, inconsistent style, logic that does not match the surrounding codebase, or documentation that does not reflect the contributor's apparent understanding, reviewers may ask the contributor to walk through their changes before merging. Pull requests that deviate significantly from our established stylistic conventions or impose an undue review burden on the maintainer team may be declined for those reasons.
134150
This is not punitive. It is part of how we ensure that contributions represent genuine understanding, and that every contributor walks away having learned something.
135151

136-
## Style Guide & Further Information
137-
Coding style is enforced through automated checks on Pull Requests. [See the corresponding GitHub Actions](https://github.com/EnAccess/micropowermanager/blob/main/.github/workflows) for information about which standards are adhered to in different parts of the project's codebase.
138-
139-
Join the [Open Source in Energy Access (OSEA) community Discord](https://community.oseas.org) server to connect with like-minded people.
140-
141-
142-
143-
144-
145-
146-
147-
148-
149-
150-
151-
152-
153-
154-
155-
156-
152+
## Style Guide & Further Information
157153

154+
Coding style is enforced through automated checks on Pull Requests. [See the corresponding GitHub Actions](https://github.com/EnAccess/micropowermanager/blob/main/.github/workflows) for information about which standards are adhered to in different parts of the project's codebase.
158155

156+
Join the [Open Source in Energy Access (OSEA) community Discord](https://community.oseas.org) server to connect with like-minded people.

0 commit comments

Comments
 (0)