Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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-<issue number>`, nothing appended.
* Commit subjects start with a capitalised imperative verb and carry a `GH-<issue number>: ` 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-<N>`; the `GH-<N>: ` 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 #<N>` — the `GH-<N>: ` 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.

Expand Down
7 changes: 5 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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-<number>`.
- Commit subjects are English, imperative, and capitalised: `GH-<number>: 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-<number>: 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
Expand Down