diff --git a/AGENTS.md b/AGENTS.md index 46d257a..b49cf54 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -73,10 +73,10 @@ Guide for LLM-based assistants (Codex/Copilot/ChatGPT, etc.) working in this rep **Git flow (no ad-hoc diffs):** -* Branch naming for issue-tied work: `GH-`, nothing appended. -* Commit subjects start with a capitalised imperative verb and carry a `GH-: ` prefix - when the commit belongs to an issue (`GH-55: Reject an enum value that does not match the backing - type`). No `feat:`/`fix:`/`chore:` prefixes. +- Commit subjects — and the pull-request title — are governed by the shared `commit-convention` gate; the normative rule and its full rationale live in `magicsunday/.github/.github/workflows/commit-convention.yml@main`, which self-tests a decision table before applying it. In short: a `GH-`-prefixed subject must match `^GH-\d+: [A-Z]`, every other subject `^[A-Z]` — a capitalised English imperative — and conventional-commit prefixes (`feat:`, `Fix:`, …) as well as path-like starts (`src/…: …`) are rejected whatever their case. It runs on every pull request via `.github/workflows/commit-lint.yml`, advisory until `commit-convention / Commit convention` is a required context in branch protection. +- Branches for an issue are named exactly `GH-`; the `GH-: ` prefix marks work that belongs to that issue, so a drive-by fix on the branch keeps its own unprefixed subject. +- The pull-request body closes the issue with `Closes #` — the `GH-: ` subject prefix is not a GitHub link and closes nothing. +- Never add a `Co-Authored-By:` trailer or any other AI attribution. * One concern per commit; keep formatting-only changes out of a behavioural commit. * Open PRs early, keep CI green, assign reviewers. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 06e06bc..10e4a91 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -27,8 +27,11 @@ CI at ≥ 90 %; run it locally with `composer ci:test:php:coverage:gate`. ## Commits and pull requests - Branch from `main`. Name an issue-tied branch exactly `GH-`. -- Commit subjects are English, imperative, and capitalised: `GH-: Add …` for issue-tied - work, or `Add …` for a free change. No `feat:`/`fix:` conventional-commit prefixes. +- Commit subjects — and the pull-request title — are governed by the shared + `commit-convention` gate; the normative rule lives in + `magicsunday/.github/.github/workflows/commit-convention.yml@main` and is summarised in + [`AGENTS.md`](AGENTS.md). In short: `GH-: Add …` for issue-tied work, or `Add …` + for a free change — a capitalised English imperative, no `feat:`/`fix:` prefixes. - Group changes into logical commits — one concern each; keep style-only fixes separate from behaviour changes. - Open the PR against `main`, describe the scope, the motivation, and how you verified it, and close