Docs: contribution guidelines for people and AI agents #209

Merged
1bugproof merged 1 commit from upstream-pr/212 into main 2026-11-23 21:56:34 +00:00
1bugproof commented 2026-11-23 21:07:15 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by 1bugproof on 2026-11-23T21:07:15Z.


The repository has no contribution guidelines, and many PRs are written with AI tools. This adds rules that keep PRs easy to review without turning AI away. Most of them write down what the history already does: Area: commit subjects, PR descriptions that name the hardware tested and what was not tested, skip_test for GPU tests, and the GPL-2.0-only rules from HANDOFF.md.

What is in it

  • CONTRIBUTING.md:
    • check for an open PR or issue before starting
    • one logical change per PR, about 400 changed lines at most, stacked PRs when one depends on another
    • no repo-wide cargo fmt, since the tree is not rustfmt-clean
    • a PR description outline (Tested / Not tested / AI use)
    • commits: Area: outcome, each one builds, fixups squashed
    • where tests go, and GPU and game-data tests that skip when there is nothing to run them on
    • licence and provenance
    • HANDOFF.md / docs/specs/ are left to the maintainer
    • an AI policy: name the tool and model, the author answers for every line, tests are actually run, AI test reports are welcome
  • AGENTS.md: the same rules written as instructions for coding agents, plus build and test commands, known pitfalls (Windows only, PowerShell UTF-8) and a list of things an agent never does.
  • CLAUDE.md: loads AGENTS.md and CONTRIBUTING.md for Claude Code.

Tested

  • Docs only, no code changes. The test commands, paths and the gpu::recomp::runner::skip_test helper they name were checked against the tree at eaa36b6.

Not tested

  • The size limits (~400 / ~800 lines) and the "maintainer's notes" rule for HANDOFF.md are proposals. Adjust them as you see fit.

AI use

  • Written with Claude Code (Claude Opus 5.5) from a look at the repo's commits and PRs; reviewed and directed by me.

🤖 Generated with Claude Code

<!-- greyfinch-sync:ivall/xcl:issue:6568849840 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/212). Originally posted by [1bugproof](https://github.com/1bugproof) on 2026-11-23T21:07:15Z. --- The repository has no contribution guidelines, and many PRs are written with AI tools. This adds rules that keep PRs easy to review without turning AI away. Most of them write down what the history already does: `Area:` commit subjects, PR descriptions that name the hardware tested and what was not tested, `skip_test` for GPU tests, and the GPL-2.0-only rules from `HANDOFF.md`. **What is in it** - `CONTRIBUTING.md`: - check for an open PR or issue before starting - one logical change per PR, about 400 changed lines at most, stacked PRs when one depends on another - no repo-wide `cargo fmt`, since the tree is not rustfmt-clean - a PR description outline (Tested / Not tested / AI use) - commits: `Area: outcome`, each one builds, fixups squashed - where tests go, and GPU and game-data tests that skip when there is nothing to run them on - licence and provenance - `HANDOFF.md` / `docs/specs/` are left to the maintainer - an AI policy: name the tool and model, the author answers for every line, tests are actually run, AI test reports are welcome - `AGENTS.md`: the same rules written as instructions for coding agents, plus build and test commands, known pitfalls (Windows only, PowerShell UTF-8) and a list of things an agent never does. - `CLAUDE.md`: loads `AGENTS.md` and `CONTRIBUTING.md` for Claude Code. **Tested** - Docs only, no code changes. The test commands, paths and the `gpu::recomp::runner::skip_test` helper they name were checked against the tree at `eaa36b6`. **Not tested** - The size limits (~400 / ~800 lines) and the "maintainer's notes" rule for `HANDOFF.md` are proposals. Adjust them as you see fit. **AI use** - Written with Claude Code (Claude Opus 5.5) from a look at the repo's commits and PRs; reviewed and directed by me. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
upstream-sync closed this pull request 2026-11-24 06:57:40 +00:00
ivall commented 2026-11-24 07:04:28 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by ivall on 2026-11-23T21:57:53Z.


Merged (163b55e), thanks - this is the base of the contribution rules now. On top of it (63b9930): a What a PR needs to be merged section in CONTRIBUTING.md (both required checks green, the whole suite run on a GPU with its counts, and for a runtime change two xcl-smoke blocks from the new scripts/smoke.ps1, built from main and from the PR's head commit, with no device removal or crash), a PR template with a Regression run section, and a PR checks workflow that refuses a description without them. One change to your text: AI use is disclosed in the PR's AI use section; the Co-Authored-By trailer is welcome but no longer required (CLAUDE.md, AGENTS.md).

<!-- greyfinch-sync:ivall/xcl:comment:7115150156 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/212#issuecomment-7115150156). Originally posted by [ivall](https://github.com/ivall) on 2026-11-23T21:57:53Z. --- Merged (163b55e), thanks - this is the base of the contribution rules now. On top of it (63b9930): a **What a PR needs to be merged** section in CONTRIBUTING.md (both required checks green, the whole suite run on a GPU with its counts, and for a runtime change two `xcl-smoke` blocks from the new `scripts/smoke.ps1`, built from main and from the PR's head commit, with no device removal or crash), a PR template with a **Regression run** section, and a `PR checks` workflow that refuses a description without them. One change to your text: AI use is disclosed in the PR's **AI use** section; the `Co-Authored-By` trailer is welcome but no longer required (CLAUDE.md, AGENTS.md).
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl!209
No description provided.