docs: update contributing.md to include AI disclosure (#8498)

**Motivation**

Recently, we have been experiencing many instances of AI generated slop
submitted by first time contributors and a policy rework is needed to
ensure our time is respected whilst allowing an external contributor
freely contribute to further enhancing this project. This proposal
ensures that new contributors self-disclose any use of AI technologies
as part of their submission to minimize time waste and allow issues to
be resolved with thorough understanding of the output at hand.

**Description**

This PR:
- Adds an AI Assistance Notice to contribution.md
- Moves important context for first time contributors to the top of the
document
- Corrects minor grammar

Additional credit to @nflaig and [Ghostly's
policy](https://github.com/ghostty-org/ghostty/blob/main/CONTRIBUTING.md#ai-assistance-notice)
to approach minimizing this problem.

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
Phil Ngo
2025-10-06 14:47:52 -04:00
committed by GitHub
parent f45a2be721
commit f2a741bbe4

View File

@@ -2,6 +2,57 @@
Thanks for your interest in contributing to Lodestar. It's people like you that push the Ethereum ecosystem forward.
## New Contributor?
Unsure where to begin contributing to Lodestar? Here are some ideas!
- :mag_right: Look through our [good first issues](https://github.com/ChainSafe/lodestar/issues?q=state%3Aopen%20label%3A%22good%20first%20issue%22).
- :speech_balloon: Join our [Discord chat](https://discord.gg/aMxzVcr)!
[![Discord](https://img.shields.io/discord/593655374469660673.svg?label=Discord&logo=discord)](https://discord.gg/aMxzVcr)
### AI Assistance Notice
> [!IMPORTANT]
>
> If you are using **any kind of AI assistance** to contribute to Lodestar, **this must be disclosed in the pull request** to maintainers
> along with the extent to which AI assistance was used (e.g. docs only vs. code generation).
> If PR responses are being generated by an AI, disclose that as well.
> As a small exception, trivial tab-completion doesn't need to be disclosed, so long as it is limited to single keywords or short phrases.
An example disclosure:
> This PR was written primarily by Claude Code.
> I consulted Claude Code to understand the codebase, but the solution was fully authored manually by myself.
Failure to disclose this is first and foremost, rude to the human maintainers on the other end of the pull request and it makes it difficult to determine how much scrutiny to apply to the contribution.
In a perfect world, AI assistance would produce equal or higher quality of work than any human. This is currently not the case and most of the time is generating AI slop which is noticeable in patterns and lack of context to solving the problem. We say this as heavy users of AI to help maintain this project (with careful supervision).
When using AI assistance, we expect contributors to understand the code that is produced and be able to answer critical questions about what was submitted. It isn't a maintainer's job to review a PR so broken that it requires significant rework to be acceptable.
Most of all, it is disrespectful to our time. Please be respectful to our maintainers and **disclose AI assistance.** Using AI without a thorough review and understanding of the output does not enhance your reputation as a valuable contributor or increase the likelihood of future opportunities on this project.
## Reporting A Bug?
- :spiral_notepad: [Create a new issue!](https://github.com/ChainSafe/lodestar/issues/new/choose) Select the type of issue that best fits, and please fill out as much of the information as you can.
## Contribution Process
1. Make sure you're familiar with our contribution guidelines _(this document)_!
2. Create your [own fork](https://github.com/ChainSafe/lodestar/fork) of this repository.
3. Make your changes in your local fork.
4. If you've made a code change, make sure to lint and test your changes (`yarn lint`, `yarn check-types` and `yarn test:unit`).
5. Make an open pull request when you're ready for it to be reviewed. We review PRs on a regular basis. See Pull request etiquette for more information.
> [!IMPORTANT]
> Please note that trivial, non-code contributions such as spelling, grammar, typos, corrections, comments and link fixes are not acceptable pull requests.
> Although we appreciate the effort to fix these valid concerns, it is not practical for us to run our CI systems to accommodate minor external contributions which generate minimal value for the purpose of contribution/airdrop farming.
> It would be appreciated for you to open up an issue instead for our team to aggregate these types of contributions into a batch commit.
## Lodestar Monorepo
We currently host the majority of lodestar packages and support packages in [this repository](https://github.com/ChainSafe/lodestar) as a [monorepo](https://en.wikipedia.org/wiki/Monorepo). We're using [Lerna](https://lerna.js.org/) to manage the packages. See [packages/](https://github.com/ChainSafe/lodestar/tree/unstable/packages) for a list of packages hosted in this repository.
## Prerequisites
- :gear: [NodeJS](https://nodejs.org/) (LTS)
@@ -114,29 +165,6 @@ Run a local beacon with `--metrics` enabled. Then start Prometheus + Grafana wit
./docker/docker-compose.local_dev.sh
```
## First Time Contributor?
Unsure where to begin contributing to Lodestar? Here are some ideas!
- :pencil2: See any typos? See any verbiage that should be changed or updated? Go for it! Github makes it easy to make contributions right from the browser.
- :mag_right: Look through our [outstanding unassigned issues](https://github.com/ChainSafe/lodestar/issues?q=is%3Aopen+is%3Aissue+no%3Aassignee). (Hint: look for issues labeled `good first issue` or `help-wanted`!)
- :speech_balloon: Join our [Discord chat](https://discord.gg/aMxzVcr)!
[![Discord](https://img.shields.io/discord/593655374469660673.svg?label=Discord&logo=discord)](https://discord.gg/aMxzVcr)
## Reporting A Bug?
- :spiral_notepad: [Create a new issue!](https://github.com/ChainSafe/lodestar/issues/new/choose) Select the type of issue that best fits, and please fill out as much of the information as you can.
## Contribution Process
1. Make sure you're familiar with our contribution guidelines _(this document)_!
2. Create your [own fork](https://github.com/ChainSafe/lodestar/fork) of this repository.
3. Make your changes in your local fork.
4. If you've made a code change, make sure to lint and test your changes (`yarn lint` and `yarn test:unit`).
5. Make an open pull request when you're ready for it to be reviewed. We review PRs on a regular basis. See Pull request etiquette for more information.
Please note that trivial, non-code contributions such as spelling, grammar, typos, corrections, comments and link fixes are not acceptable pull requests. Although we appreciate the effort to fix these valid concerns, it is not practical for us to run our CI systems to accommodate minor external contributions which generate minimal value for the purpose of contribution/airdrop farming. It would be appreciated for you to open up an issue instead for our team to aggregate these types of contributions into a batch commit.
## Github Style Guide
**Branch Naming**
@@ -165,11 +193,7 @@ For example:
- If your pull request is fixable and needs additional changes or commits within a short period of time, switch your pull request into a draft until it's ready.
- Otherwise, close your pull request and [create a new issue instead.](https://github.com/ChainSafe/lodestar/issues/new/choose)
## Lodestar Monorepo
We're currently experimenting with hosting the majority of lodestar packages and support packages in this repository as a [monorepo](https://en.wikipedia.org/wiki/Monorepo). We're using [Lerna](https://lerna.js.org/) to manage the packages. See [packages/](https://github.com/ChainSafe/lodestar/tree/unstable/packages) for a list of packages hosted in this repository.
## Style Guide
## Lodestar Code Style Guide
- Lodestar has migrated to using ES modules.
- Many module class constructors have the following signature: `(options, dependencies)`
@@ -202,7 +226,7 @@ We're currently experimenting with hosting the majority of lodestar packages and
- Metric code variables on the other hand should not be suffixed, i.e. `Sec`-suffix should be omitted
- Time-based metrics must use seconds as the unit
## Tests style guide
## Tests Style Guide
Test must not depend on external live resources, such that running tests for a commit must be deterministic:
@@ -266,7 +290,7 @@ If the PR introduces large-scale changes, affecting multiple areas of the codeba
- Some corner cases can be observed while testing on feature group. If any such issue is identified which was not brainstormed earlier must be bring to attention of the team.
- If and when possible try to release big features under opt-in feature flags.
## Logging policy
## Logging Policy
### Logging Levels
@@ -277,7 +301,7 @@ Contributors must choose the log level carefully to ensure a consistent experien
- `info`: General sporadic informational about the node's state. Examples include initialization messages, infrequent periodic status updates, or high-level progress reports.
- `debug`: Detailed diagnostic information that can help developers or users troubleshoot specific issues. Examples include individual request logs for every REST API, networking interactions, or internal components status changes. Alias to `verbose`.
### Logging guidelines
### Logging Guidelines
- Avoid excessive logging. Log messages should be clear and concise, providing enough information to understand the context and severity of the issue.
- Do not log sensitive data, such as private keys, user credentials, or personal information.
@@ -345,7 +369,3 @@ A simple indicator of issue prioritization. It mainly applies to issues.
###### `spec.*` Ethereum Consensus Spec Version Target
Issues that target a specific version of the Ethereum consensus spec, shall be tagged accordingly.
## Community
Come chat with us on [Discord](https://discord.gg/aMxzVcr) and join our public weekly planning meetings!