You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+39-41Lines changed: 39 additions & 41 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,13 +2,13 @@
2
2
3
3
Welcome to the Open Source and Energy Access (OSEA) contributors' guide.
4
4
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.
6
6
It is therefore essential to ensure that everyone adheres to our [Code of Conduct](./CODE_OF_CONDUCT.md).
7
7
8
8
## Getting Started
9
9
10
10
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.
12
12
Most documentation is currently written in Markdown, making it easy to add, modify, and delete content as necessary.
13
13
14
14
## Setting up your Environment
@@ -31,54 +31,63 @@ git switch -c update-fixture
31
31
32
32
## Creating a Pull Request
33
33
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.
37
37
38
38
### What makes a good PR?
39
+
39
40
Every good PR should contain one logical block of work. Unrelated changes should go into separate PRs.
40
41
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.
42
43
43
44
### Two ways to contribute
45
+
44
46
-**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/).
46
48
47
49
### Commits and Pull Request Titles
50
+
48
51
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
+
49
53
-**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.
50
54
-**PR title**: becomes the squashed commit message on main, so it must be clean and follow Conventional Commits.
| 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|
62
66
63
67
## Waiting for Review
68
+
64
69
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.
65
70
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.
66
71
67
72
## Using AI Tools as a Contributor
73
+
68
74
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.
69
75
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_.
71
78
72
79
## What AI use is appropriate
80
+
73
81
Use AI tools to support your understanding, not to replace it. For Example:
74
82
75
83
- Using AI to explain unfamiliar syntax, functions, or patterns before you implement something yourself
76
84
- Asking AI to review code you have already written for edge cases or clarity
77
85
- Using AI to help you draft a test scaffold, which you then review, correct, and extend
78
86
- Asking AI to help you structure a bug report or feature proposal in your own words
79
87
- Using AI to improve the grammar or clarity of the documentation you have already written
80
-
88
+
81
89
Uses that cross the line:
90
+
82
91
- Asking AI to implement a feature and submitting the output with minor changes
83
92
- Using AI to generate documentation for code you do not understand
84
93
- 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:
87
96
If you are unsure whether a specific use is appropriate, describe it in your PR, and the maintainer will let you know.
88
97
89
98
## Disclosure
99
+
90
100
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.
91
101
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"_
94
105
95
106
Undisclosed AI use that becomes apparent during review is treated as a trust issue, not just a policy issue.
96
107
97
108
## Your responsibility as a contributor
98
109
99
110
You are fully responsible for everything you submit, regardless of how you wrote it.
111
+
100
112
- 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.
101
113
- Review AI output critically: AI can produce plausible-looking but incorrect or insecure code.
102
114
- Never submit AI-assisted code without running the test suite locally.
103
115
- 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.
105
117
- Verify generated tests: AI may assert incorrect values or miss domain-specific edge cases entirely. Every generated test needs your sign-off.
106
118
- Remove AI filler: phrases like "This function efficiently handles…" belong in marketing copy, not documentation. Be precise and direct.
107
119
108
120
## What contributors can expect from maintainers
121
+
109
122
Contribution is a two-way relationship. In return, you can expect the following from OSEA maintainers:
123
+
110
124
- If a week passes with no acknowledgement of your issue or PR, a polite reminder is welcome.
111
125
- Reviews focus on the work, not the contributor. Comments aim to teach, not to gatekeep.
112
126
- 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
123
137
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.
124
138
125
139
## A note to new contributors
140
+
126
141
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.
127
142
128
143
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.
129
144
130
145
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.
131
146
132
147
## A note to reviewers
148
+
133
149
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.
134
150
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.
135
151
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
157
153
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.
158
155
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