This is an automated email from the ASF dual-hosted git repository. Xuanwo pushed a commit to branch xuanwo/update-ai-contribution-guidelines in repository https://gitbox.apache.org/repos/asf/opendal.git
commit b10a06a43eef89b21098b1023d68d1167cb7c993 Author: Xuanwo <[email protected]> AuthorDate: Thu Nov 19 09:47:22 2026 +0000 docs: update AI contribution and maintenance guidelines --- .github/pull_request_template.md | 8 ++-- AGENTS.md | 64 ++++++++++++++++++++++++---- CONTRIBUTING.md | 91 ++++++++++++++++++++++++++++------------ 3 files changed, 125 insertions(+), 38 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 95e3f66d76..e8204ff0e1 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -45,8 +45,8 @@ can migrate, or explain the removal and available alternatives. # AI Usage Statement <!-- -If AI materially assisted this PR, list each harness/model/effort combination -that materially contributed, and briefly describe its role: +If AI materially assisted or authored this PR, list each harness/model/effort +combination that materially contributed, and briefly describe its role: - Harness: Application or agent framework used to run the model. - Model: Model name or identifier shown by the harness, with version if available. @@ -55,6 +55,6 @@ that materially contributed, and briefly describe its role: Do not include routine command output or repeat information provided elsewhere. -The author remains responsible for every submitted claim and change. If AI did -not materially assist this PR, write "None". +The accountable human author remains responsible for every submitted claim and +change. If AI did not materially assist this PR, write "None". --> diff --git a/AGENTS.md b/AGENTS.md index f06b7eccd8..05b1df0992 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -11,12 +11,19 @@ Guidance for AI coding agents working in this repository. ## AI-Assisted Contributions -Follow [AI-Assisted Contributions](CONTRIBUTING.md#ai-assisted-contributions) +Follow the [AI-Assisted Contributions](CONTRIBUTING.md#ai-assisted-contributions) policy. -- Do not publish an Issue, Pull Request, Discussion, or review comment unless a - human has meaningfully reviewed the content and explicitly asked you to submit - it. +- Publish an Issue, Pull Request, Discussion, or review comment only within + explicit authorization from an accountable human contributor or maintainer. + Do not take unsolicited public actions or claim to speak on behalf of the + OpenDAL PMC. +- Clearly identify AI-authored comments, triage notes, and reviews as + AI-generated, including when posting under a contributor's or committer's + personal GitHub account. +- Verify every claim, code reference, API behavior, and test result against the + repository before posting. Never fabricate command output, claim unexecuted + checks passed, or post unedited LLM dumps. - Do not implement or submit a service-specific change based only on source-code analysis, a mock or emulator, a synthetic malformed response, or another service's implementation. Reproduce the problem against the actual service @@ -26,12 +33,53 @@ policy. maintainer has explicitly accepted it as a hardening or maintenance goal. - A test against a fabricated response can verify implementation behavior, but it does not establish that the change solves a real-world problem. +- Do not weaken, skip, or delete existing assertions, behavior tests, or lint + rules to make CI pass; fix the underlying bug or escalate when a contract + must change. +- Keep changes scoped to the agreed goal. Do not bundle unrelated refactors, + speculative abstractions, or capability claims unsupported by the + implementation. - In a Pull Request, disclose each materially contributing harness, model, and reasoning effort setting, along with AI's role and any assumptions or unknowns that affect review. Follow the AI Usage Statement requirements in - CONTRIBUTING.md. Do not repeat routine validation output. - -The human contributor remains responsible for every submitted claim and change. + `CONTRIBUTING.md`. Do not repeat routine validation output. + +The accountable human contributor or maintainer remains responsible for every +submitted claim, review, and change. + +## Maintenance and Review Agents + +Agents assisting with OpenDAL maintenance and code review must protect community +attention and uphold project quality. + +- **Governance boundaries:** Maintenance agents may triage issues, check for + duplicates and security boundaries (`SECURITY-THREAT-MODEL.md`), screen pull + requests for evidence and scope, review code, assist with reproduction, and + prepare routine maintenance pull requests. Every pull request requires at + least one human OpenDAL committer to review, approve, and merge it; do not + approve or merge PRs, declare PMC consensus, issue official security + decisions, or cast Apache release votes without explicit human committer or + PMC review and action. +- **Fast-fail screening:** Screen incoming Issues and Pull Requests in order: + duplicates, threat-model and project scope, linked issue or consensus, real + reproduction and evidence, change scope and contract alignment, and CI + status. Stop and report blocking prerequisite failures rather than spending + review cycles polishing an unverified or out-of-scope submission. +- **High-signal comments:** Post review comments only for concrete defects, + contract or capability mismatches, missing evidence, security risks, or + maintainability regressions backed by specific code references. Omit filler, + restatements of the diff, and style nitpicks already enforced by CI. +- **Bounded interaction and escalation:** Limit automated back-and-forth to at + most one or two rounds on a thread. If a discussion does not converge, or + touches public APIs (`core/core/src/types/`), portable specifications + (`core/core/src/docs/specs/`), breaking changes, new services or + dependencies, concurrency or consistency semantics, or security boundaries, + stop automated replies and escalate to a human maintainer. +- **Contract and test rigor:** Treat passing CI as necessary, not sufficient. + Verify that advertised `Capability` flags match implementation guarantees, + fallbacks preserve concurrency and retry semantics, and tests protect real + contracts. Flag or reject bloated mock tests that mirror implementation + details without proving real behavior. ## Helper Functions @@ -226,7 +274,7 @@ Operation wrappers implement `raw::Service`, store the inner `Servicer`, forward - Before opening a PR, search for similar open PRs, issues, and in-progress branches that already address the same problem. Prefer contributing to or coordinating with existing work over opening a duplicate. - Always use `.github/pull_request_template.md` when creating a PR. - Keep PR titles and descriptions factual and concise. -- Do not add AI-tool branding or co-author trailers. +- Do not add AI-tool marketing banners or AI co-author trailers to commits or PR descriptions; record AI usage in the AI Usage Statement section. - If public APIs or user-facing behavior change, update docs and call out the user-facing impact in the PR template. ## Important Notes diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 90d9adf554..fa92940834 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -5,9 +5,11 @@ First, thank you for contributing to OpenDAL! The goal of this document is to pr - [Contributing](#contributing) - [Your First Contribution](#your-first-contribution) - [AI-Assisted Contributions](#ai-assisted-contributions) - - [Human Involvement](#human-involvement) + - [Accountability and Agent Participation](#accountability-and-agent-participation) + - [AI Usage Statement](#ai-usage-statement) - [Bug Reports](#bug-reports) - [Code Changes](#code-changes) + - [AI-Assisted Maintenance](#ai-assisted-maintenance) - [Workflow](#workflow) - [Git Branches](#git-branches) - [GitHub Pull Requests](#github-pull-requests) @@ -32,31 +34,39 @@ First, thank you for contributing to OpenDAL! The goal of this document is to pr Attention is the scarcest resource in an open source community. We appreciate everyone who gives their attention to OpenDAL, and we ask contributors to -protect the attention of others. These standards apply to every contribution; -AI assistance does not lower them. - -### Human Involvement - -OpenDAL welcomes and encourages AI-assisted contributions when a human actively -guides the work and remains accountable for it. - -- Every Issue, Pull Request, Discussion, and review conversation must involve - meaningful human participation. Do not delegate project communication entirely - to an AI agent. -- Do not copy and paste LLM output into project conversations. Review, edit, and - verify AI-assisted analysis before sharing it with the community. -- Understand every submitted claim and change well enough to explain and defend - it during review. -- Disclose material AI involvement and any assumptions or unknowns that affect - review. - -The contributor, not the AI tool, is responsible for the accuracy, relevance, -and quality of every submission. +protect the attention of others. These standards apply to every contribution, +whether authored by a human or an AI agent; AI assistance does not lower them. + +### Accountability and Agent Participation + +OpenDAL welcomes AI-assisted contributions and authorized AI agents +participating in Issues, Pull Requests, Discussions, and code reviews, as long +as every submission has clear human accountability and meets our evidence and +quality standards. + +- **Accountable human owner:** Every AI-assisted submission or agent + interaction must have an identifiable human contributor or maintainer who + owns its accuracy, licensing compliance, and follow-through. When an agent + gets stuck, makes unsupported claims, or reaches a design disagreement, the + accountable human must step in. +- **Transparent AI attribution:** Clearly identify AI-authored comments, + triage notes, and reviews as AI-generated, including when posted under a + contributor's or committer's personal GitHub account. Pull requests must + disclose material AI involvement in the AI Usage Statement below. +- **Verified, high-signal communication:** Do not paste unverified LLM output, + filler, or repetitive summaries into project conversations. Verify claims + against the codebase and tests before posting, add concrete technical + evidence when replying, and stop rather than looping on unresolved + disagreements. + +The accountable human contributor or maintainer, not the AI tool, remains +responsible for the accuracy, relevance, license compliance, and quality of +every submission. ### AI Usage Statement -If AI materially assisted a Pull Request, include the following in its AI Usage -Statement: +If AI materially assisted or authored a Pull Request, include the following in +its AI Usage Statement: - **Harness:** The application or agent framework used to run the model. - **Model:** The model name or identifier shown by the harness, including its @@ -97,11 +107,38 @@ demonstrated problem or meet a concrete use case. - Verify a bug before fixing it, and add tests that demonstrate the failure and protect the intended behavior when practical. - Explain the user-facing, correctness, or maintenance value of the change. +- Keep changes focused on the stated goal; avoid unrelated refactors, + formatting churn, or speculative abstractions. +- Report only checks and tests that actually ran, and do not weaken or delete + existing tests or assertions to make CI pass. +- Avoid opening multiple concurrent speculative or low-effort pull requests; + address review feedback on existing submissions first. OpenDAL does not accept speculative fixes for unverified bugs or mechanical refactors without an agreed technical goal. Maintainers may close submissions -that lack meaningful human participation or are unverified, speculative, or -otherwise incomplete without performing a detailed technical review. +without a detailed technical review when they lack real reproduction or +evidence, misrepresent validation, duplicate existing work, expand scope +without consensus, fail to converge after feedback, or lack an accountable +human owner when human follow-up is required. + +### AI-Assisted Maintenance + +OpenDAL maintainers also use AI agents to help maintain the project, including +issue triage, initial pull request screening, code review, reproduction +assistance, release checks, and routine maintenance changes. + +- **Attribution:** Maintenance agents may post through a dedicated bot account + or under a committer's personal GitHub account with a clear AI label so + contributors can distinguish automated analysis from a maintainer's human + judgment or a formal PMC decision. +- **Committer and PMC authority:** Every pull request requires at least one + human OpenDAL committer to review, approve, and merge it. Public API changes, + specifications, architectural decisions, security vulnerability + classifications, and Apache release votes remain under human committer and + PMC accountability. +- **Human escalation:** Automated triage and review can be wrong. If an AI + maintenance agent misclassifies or closes an Issue or Pull Request, reply + with concrete technical evidence and request review from a human maintainer. ## Workflow @@ -129,7 +166,9 @@ refactor: Polish the implementation of webhdfs #### Reviews & Approvals -All pull requests should be reviewed by at least one OpenDAL committer. +All pull requests must be reviewed, approved, and merged by at least one human +OpenDAL committer. AI agents may assist with initial screening and technical +review, but they do not replace committer approval or merge accountability. #### Merge Style
