diff --git a/AGENTS.md b/AGENTS.md index 675c9f83e33e..6330111a3058 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -4,6 +4,32 @@ CodeIgniter 4 is a mature open-source PHP framework. Framework production code lives in `system/`; its tests mirror that structure under `tests/system/`. +## Before opening a pull request + +Do not open a pull request unless the applicable pre-submission requirements +in [CONTRIBUTING.md](CONTRIBUTING.md) and +[Sending a Pull Request](contributing/pull_request.md) are met. + +- A human contributor must have reviewed and understood the complete diff + and taken responsibility for the submission. Agent review and passing + checks do not replace this human review. +- Verify the target branch, commit signing, relevant tests, and required + documentation. Follow the focused validation policy below. Do not run + the full CI matrix locally. +- Remind the user of the applicable open pull request limit before + submission. Check the contributor's open pull requests, including + drafts, when possible. If the limit or a maintainer-approved exemption + cannot be verified, clearly tell the user rather than claiming it has + been checked. +- If a requirement is unmet or cannot be verified, do not open the pull + request. Tell the user which requirements remain unmet or unverified + and what is needed before submission. Continue preparing the changes + and completing any checks that can be performed. An unverified PR + limit or exemption alone does not block submission; a known limit + violation without an exemption does. +- Report the checks performed, their results, and any validation left + to CI. Do not claim that checks passed unless they were actually run. + ## Before making changes Consult the relevant sections of: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3688517a265a..f102e30a7616 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -3,4 +3,42 @@ CodeIgniter is a community driven project and accepts contributions of code and documentation from the community. -If you'd like to contribute, please read the [Contributing to CodeIgniter](./contributing/README.md). +## Responsibility for Contributions + +AI-assisted contributions are welcome, but contributors remain responsible +for everything they submit. + +Before opening a pull request, you must: + +- Review and understand all proposed changes. +- Explain the problem being addressed and why the proposed solution is appropriate. +- Verify the changes, run relevant tests, and describe what you tested, + including any limitations. +- Be prepared to answer review questions and revise your contribution. + +These requirements apply regardless of the tools used. AI-generated +explanations and passing CI checks do not replace your own review. + +Automated submissions without meaningful human review are not accepted. +Project-approved automation, such as dependency update bots, is exempt +from this submission requirement. + +Maintainers may close pull requests without detailed code review when +the problem is unclear, the changes have not been adequately verified, +or the contributor cannot explain them. + +We do not require AI tool disclosures, prompts, or chat histories. + +## Open Pull Request Limit + +Contributors without write access may have up to three pull requests +open in this repository at the same time, including drafts. +Maintainers may grant exceptions to trusted contributors. + +Please address feedback on your existing pull requests before opening +additional ones. + +## Further Guidance + +For detailed contribution instructions, please read +[Contributing to CodeIgniter](./contributing/README.md). diff --git a/contributing/README.md b/contributing/README.md index 981b69169aca..0892c53cc544 100644 --- a/contributing/README.md +++ b/contributing/README.md @@ -12,6 +12,8 @@ specifically interested in at any point in time. Join the discussion for those i if you want to take the lead on one of them. - [Contributor Covenant Code of Conduct](../CODE_OF_CONDUCT.md) +- [Responsibility for Contributions](../CONTRIBUTING.md#responsibility-for-contributions) +- [Open Pull Request Limit](../CONTRIBUTING.md#open-pull-request-limit) - [Reporting a Bug](./bug_report.md) - [Sending a Pull Request](./pull_request.md) - [Configuring Upstream and Rebasing](./workflow.md#configuring-upstream-and-rebasing) diff --git a/contributing/pull_request.md b/contributing/pull_request.md index 9f1f8c28a24b..1264e3fbd7c7 100644 --- a/contributing/pull_request.md +++ b/contributing/pull_request.md @@ -2,6 +2,10 @@ ## Contributions +Before opening a pull request, read +[Responsibility for Contributions](../CONTRIBUTING.md#responsibility-for-contributions) +and the [Open Pull Request Limit](../CONTRIBUTING.md#open-pull-request-limit). + We expect the following in all Pull Requests (PRs). - PRs must be sent to the [appropriate branch](#branching) - All git commits must be [GPG-signed](#signing)