From 715c7d4a1b962082c94cf31d4527fa36a5399e23 Mon Sep 17 00:00:00 2001 From: VinPropane Date: Mon, 30 Mar 2026 23:04:04 -0400 Subject: [PATCH] NS-17: document Jira-prefixed commit subjects in rules and AGENTS Link commit-and-review to jira-git-naming for story-scoped commits; clarify jira-git-naming applies to commits done as part of a Jira issue; surface the convention in AGENTS.md. --- .cursor/rules/commit-and-review.md | 5 +++++ .cursor/rules/jira-git-naming.md | 2 +- AGENTS.md | 2 ++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.cursor/rules/commit-and-review.md b/.cursor/rules/commit-and-review.md index 86b3226..8b8c633 100644 --- a/.cursor/rules/commit-and-review.md +++ b/.cursor/rules/commit-and-review.md @@ -16,6 +16,11 @@ alwaysApply: true - The user should **review** the diff before anything is committed. The agent’s job is to make the changes visible (uncommitted) and explain them; the user decides when to commit. - If the user asks to commit, use a message that matches repo conventions; still follow [git workflow](git-workflow.md) (branch vs `main`, doc-only vs code). +## Commit message format when a Jira story applies + +- Any commit that is **part of implementing or delivering a Jira story or task** must put the **Jira issue key first** in the subject line, then **`:`**, then the summary (e.g. `NS-17: persist position state in PostgreSQL`). +- Infer the key from the active branch name, the issue under discussion, or Jira context. Full rules (multi-issue commits, `chore:` when there is no ticket) are in [jira-git-naming](jira-git-naming.md). + ## Pull request and push descriptions - Do **not** add **“Made-with: Cursor”**, **“Generated with Cursor”**, tool co-author lines, or similar AI/IDE boilerplate to **PR descriptions**, **GitHub merge/squash commit bodies** you draft, or other **remote-facing** narrative unless the user explicitly requests it. diff --git a/.cursor/rules/jira-git-naming.md b/.cursor/rules/jira-git-naming.md index 4a7669f..96cf699 100644 --- a/.cursor/rules/jira-git-naming.md +++ b/.cursor/rules/jira-git-naming.md @@ -17,7 +17,7 @@ When suggesting or creating a branch for story **NS-14**, use something like **` ## Commit messages -- **First token** of the subject line must be the **Jira key and number**, then **`:`** and the summary. +- For **any commit done as part of a Jira story, bug, or task** (work tracked under an issue), the **first token** of the subject line must be the **Jira key and number**, then **`:`** and the summary. - **Good:** `NS-14: add direct click-to-move steering`, `NS-20: fix duplicate spawn on reconnect` - **Avoid:** `fix(client): …` or `feat: …` **without** the Jira key at the front. If you use Conventional Commits, place them **after** the key: `NS-14: feat(client): click-to-move prototype` diff --git a/AGENTS.md b/AGENTS.md index 8db068c..e4552f9 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -7,3 +7,5 @@ Optional **personas** for Cursor. Enable by **@ mentioning** the rule in chat or | **Code review** | [`.cursor/rules/code-review-agent.md`](.cursor/rules/code-review-agent.md) | PR / diff / pre-merge review; **always writes** `docs/reviews/YYYY-MM-DD-{slug}.md` with **Documentation checked** vs `docs/plans/` and `docs/decomposition/modules/`; short chat pointer | Project-wide conventions live under [`.cursor/rules/`](.cursor/rules/) (many are `alwaysApply`). **Godot client layout** (thin `main.gd`, split by concern): [`.cursor/rules/godot-client-script-organization.md`](.cursor/rules/godot-client-script-organization.md). **PR / push text:** no “Made-with: Cursor” boilerplate — [`.cursor/rules/commit-and-review.md`](.cursor/rules/commit-and-review.md). + +**Commits tied to a Jira issue** must start the subject with the **issue key** and a colon (e.g. `NS-17: …`). Branch naming and exceptions (`chore:` when there is no ticket) — [`.cursor/rules/jira-git-naming.md`](.cursor/rules/jira-git-naming.md).