Skip to content

Commit 847aa98

Browse files
Add CONTRIBUTING.md
1 parent 0044287 commit 847aa98

1 file changed

Lines changed: 41 additions & 39 deletions

File tree

CONTRIBUTING.md

Lines changed: 41 additions & 39 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,63 +31,54 @@ 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-
4039
Every good PR should contain one logical block of work. Unrelated changes should go into separate PRs.
4140
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.
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.
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.
4342

4443
### Two ways to contribute
45-
4644
- **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.
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/).
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/).
4846

4947
### Commits and Pull Request Titles
50-
5148
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-
5349
- **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.
5450
- **PR title**: becomes the squashed commit message on main, so it must be clean and follow Conventional Commits.
5551

5652
## Conventional Commits
5753

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 |
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 |
6662

6763
## Waiting for Review
68-
6964
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.
7065
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.
7166

7267
## Using AI Tools as a Contributor
73-
7468
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.
7569
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.
76-
77-
> **Guiding principle**: _Al is your assistant, not your author. If you cannot explain it, do not submit_.
70+
> **Guiding principle**: *Al is your assistant, not your author. If you cannot explain it, do not submit*.
7871
7972
## What AI use is appropriate
80-
8173
Use AI tools to support your understanding, not to replace it. For Example:
8274

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

9889
## Disclosure
99-
10090
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.
10191

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"_
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"*
10594
10695
Undisclosed AI use that becomes apparent during review is treated as a trust issue, not just a policy issue.
10796

10897
## Your responsibility as a contributor
10998

11099
You are fully responsible for everything you submit, regardless of how you wrote it.
111-
112100
- 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.
113101
- Review AI output critically: AI can produce plausible-looking but incorrect or insecure code.
114102
- Never submit AI-assisted code without running the test suite locally.
115103
- AI output often introduces inconsistent formatting, naming conventions, or unnecessary complexity. Match the style of the surrounding codebase.
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.
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.
117105
- Verify generated tests: AI may assert incorrect values or miss domain-specific edge cases entirely. Every generated test needs your sign-off.
118106
- Remove AI filler: phrases like "This function efficiently handles…" belong in marketing copy, not documentation. Be precise and direct.
119107

120108
## What contributors can expect from maintainers
121-
122109
Contribution is a two-way relationship. In return, you can expect the following from OSEA maintainers:
123-
124110
- If a week passes with no acknowledgement of your issue or PR, a polite reminder is welcome.
125111
- Reviews focus on the work, not the contributor. Comments aim to teach, not to gatekeep.
126112
- If a design decision in the codebase is not obvious, ask, and a maintainer will explain the reasoning behind it.
@@ -137,20 +123,36 @@ Maintainer reviews are about knowledge transfer, mentorship, and project coheren
137123
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.
138124

139125
## A note to new contributors
140-
141126
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.
142127

143128
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.
144129

145130
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.
146131

147132
## A note to reviewers
148-
149133
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.
150134
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.
151135

152-
## Style Guide & Further Information
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+
153157

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.
155158

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)