Skip to content

docs: add ai contributing policy#3437

Open
chaokunyang wants to merge 2 commits intoapache:mainfrom
chaokunyang:ai_contributing_policy
Open

docs: add ai contributing policy#3437
chaokunyang wants to merge 2 commits intoapache:mainfrom
chaokunyang:ai_contributing_policy

Conversation

@chaokunyang
Copy link
Collaborator

@chaokunyang chaokunyang commented Feb 28, 2026

Why?

Apache Fory is aperformance-critical foundational serialization framework.
As AI-assisted contributions increase, we need a project policy that keeps review quality high, protects legal/provenance safety, and preserves long-term maintainability.

This policy is intended to:

  • keep human accountability as the core rule
  • reduce low-signal or unverified AI-generated changes
  • require verifiable testing/performance evidence for sensitive paths
  • align contribution practice with ASF legal and governance expectations

What does this PR do?

  • Adds a new top-level policy document: AI_CONTRIBUTION_POLICY.md.
  • Defines requirements for AI-assisted contributions, including:
    • contributor responsibility and line-by-line self review
    • privacy-safe disclosure expectations
    • verification requirements (tests/spec/perf evidence where applicable)
    • licensing/provenance requirements
    • quality gate and maintainer enforcement process
  • Updates .github/pull_request_template.md to add an AI contribution checklist for PR authors.

Related issues

N/A

Does this PR introduce any user-facing change?

  • Does this PR introduce any public API change?
  • Does this PR introduce any binary protocol compatibility change?

Benchmark

N/A (documentation and PR template change only)

- Scope of assistance (for example: design drafting, code drafting, refactor suggestions, tests, docs)
- Affected files or subsystems (high-level)
- Human verification performed (commands/tests/benchmarks executed)
- Provenance and license confirmation (see Section 6)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you mention license confirmation as a core principle?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added a point:

  • License/provenance confirmation: contributors MUST confirm submitted material is legally compatible and traceable, and MUST comply with ASF Generative Tooling Guidance.


## 2. Disclosure (Privacy-Safe)

For substantial AI assistance, PR descriptions MUST include a short `AI Usage Disclosure` section.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How many lines of code, how large a change, or to what extent of AI involvement counts as substantial? It could be as simple as adding a single function, or just revising a short comment. Could we further define and clarify this specification?

Copy link
Collaborator Author

@chaokunyang chaokunyang Feb 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is indeed ambiguous. I added some clarification:

Definition of substantial AI assistance:

  • Substantial means AI materially influenced technical content, not only writing style.
  • Contributors MUST mark AI assistance as substantial (yes) if any of the following apply:
    • AI generated or rewrote non-trivial code/test logic (even for a small change or a single function).
    • AI-generated or AI-refactored content is about 20 or more added/changed lines in aggregate.
    • AI materially influenced API, protocol, type mapping, performance, memory, or architecture decisions.
    • AI produced substantive technical text used in PR rationale (beyond grammar/translation cleanup).
  • Contributors MAY mark substantial AI assistance as no for minor or narrow assistance only, such as spelling/grammar fixes, formatting, trivial comment wording edits, or other non-technical edits with no behavior impact.

Required disclosure fields:

  • Whether substantial AI assistance was used (yes or no)
  • Scope of assistance (for example: design drafting, code drafting, refactor suggestions, tests, docs)
  • Affected files or subsystems (high-level)
  • Human verification performed (checks run locally or in CI, and results reviewed by the contributor)
  • Provenance and license confirmation (see Section 6)

Standard disclosure template (recommended):

AI Usage Disclosure
- substantial_ai_assistance: yes
- scope: <design drafting | code drafting | refactor suggestions | tests | docs | other>
- affected_files_or_subsystems: <high-level paths/modules>
- human_verification: <checks run locally or in CI + pass/fail summary + contributor reviewed results>
- performance_verification: <N/A or benchmark/regression evidence summary>
- provenance_license_confirmation: <Apache-2.0-compatible provenance confirmed; no incompatible third-party code introduced>

@chaokunyang chaokunyang force-pushed the ai_contributing_policy branch from 94e6b82 to 646b992 Compare February 28, 2026 13:58
@chaokunyang chaokunyang force-pushed the ai_contributing_policy branch from 646b992 to 8b8c41a Compare February 28, 2026 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants