diff --git a/.github/hooks/prepare-commit-msg b/.github/hooks/prepare-commit-msg new file mode 100755 index 0000000..df610d9 --- /dev/null +++ b/.github/hooks/prepare-commit-msg @@ -0,0 +1,9 @@ +#!/bin/sh +# Opt-in AI-assistance trailer. Off unless PDPP_AI_ASSISTED=1. +# Install: git config core.hooksPath .github/hooks + +[ "${PDPP_AI_ASSISTED:-0}" = "1" ] || exit 0 +MSG_FILE="$1" +grep -qi '^Assisted-by:' "$MSG_FILE" && exit 0 +case "$2" in merge|squash) exit 0 ;; esac +printf '\nAssisted-by: AI\n' >> "$MSG_FILE" diff --git a/AGENTS.md b/AGENTS.md index 6e6275d..ff9aece 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -57,3 +57,14 @@ Use skills only when the task matches; explore the code first. - Patch-first debugging: invoke patch-first-debugging for normal bug fixes, regressions, or surgical code changes where the main need is narrow scope, minimal diffs, and targeted verification. - Test-fix harnesses: invoke test-fix-loop when the user wants a constrained failing-test repair loop, minimal-patch harness, or automated test-fix workflow; use this for loop orchestration, not ordinary bug fixing. - Committing: invoke committing skill only when user explicitly asks to commit. + +### Contributing + +Policy: [CONTRIBUTING.md](./CONTRIBUTING.md). + +- Sign off commits (`git commit -s`); unsigned are blocked. +- Disclose AI assistance: `Assisted-by: AI` trailer (opt-in hook: `PDPP_AI_ASSISTED=1`). +- Prose (PRs, issues, comments): technical, no filler, no emojis. What changed and why, briefly. +- Reject verbose summaries. Concise unless the change is a refactor, break, or architecture. +- Claims about the code need a file path or a reason. +- One change per PR. Run the repo's checks first. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 595566d..c89c053 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,3 +2,11 @@ By submitting a contribution (including code, documentation, or other materials), you agree that your contribution is licensed under the Apache License, Version 2.0, as described in the LICENSE file. You represent that you have the right to submit the contribution and that it does not infringe third-party rights. + +## AI assistance + +Building with AI is welcome. If AI helped meaningfully, add an `Assisted-by: AI` +trailer to the commit so reviewers can calibrate their scrutiny; a local hook can +add it for you (`.github/hooks/prepare-commit-msg`). It is vendor-neutral and sits +alongside your DCO sign-off. We review contributions on whether they are good, not +how they were made.