Merge pull request #1 from VinPropane/feature/ns-14-click-to-move

chore: add Cursor rule for Jira-prefixed branches and commits
pull/2/head
VinPropane 2026-03-29 22:26:13 -04:00 committed by GitHub
commit 4c8b396ac2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 32 additions and 1 deletions

View File

@ -9,6 +9,6 @@ alwaysApply: true
- **Documentation-only work** — Commit directly on **`main`**. This means Markdown (`.md`) under `docs/`, root and nested `README.md` files, `neon_sprawl_vision.plan.md`, and other prose docs. No feature branch required. - **Documentation-only work** — Commit directly on **`main`**. This means Markdown (`.md`) under `docs/`, root and nested `README.md` files, `neon_sprawl_vision.plan.md`, and other prose docs. No feature branch required.
- **Code or implementation changes** — Use a **branch** (e.g. `feature/…`, `fix/…`), then merge to `main` when ready. This includes application source (**C#**, **GDScript**), Godot scenes and project files, `docker-compose.yml`, `.csproj` / build config, CI workflows, **JSON/YAML game data** under `content/`, and JSON Schema when it ships with data pipelines—not standalone doc prose. - **Code or implementation changes** — Use a **branch**, then merge to `main` when ready. **Branch names must start with the Jira key** (e.g. `NS-14-click-to-move`); **commit subjects must start with the same key** (e.g. `NS-14: …`). See [jira-git-naming](jira-git-naming.md). This includes application source (**C#**, **GDScript**), Godot scenes and project files, `docker-compose.yml`, `.csproj` / build config, CI workflows, **JSON/YAML game data** under `content/`, and JSON Schema when it ships with data pipelines—not standalone doc prose.
When a change mixes documentation and code, treat it as a **code change** (use a branch). When a change mixes documentation and code, treat it as a **code change** (use a branch).

View File

@ -0,0 +1,31 @@
---
description: Branch names and commit messages must lead with the Jira issue key
alwaysApply: true
---
# Jira keys in branches and commits (Neon Sprawl)
Project key in Jira is **`NS`** unless a different key is used for the issue (match the issue you are implementing).
## Branch names
- Put the **Jira key first**, then a short **kebab-case** slug (and optional type). The key must be the **first path segment** of the branch name.
- **Good:** `NS-14-click-to-move`, `NS-20-fix-health-desync`, `NS-14/feature/terrain-spike` (key still first segment if using slashes).
- **Avoid:** `feature/click-to-move` with no key, or `fix/ns-14-foo` with the key not at the start.
When suggesting or creating a branch for story **NS-14**, use something like **`NS-14-<slug>`**, not `feature/ns-14-…` with the key buried after a prefix.
## Commit messages
- **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`
**Multi-issue commits:** Prefer one issue per commit; if unavoidable, list keys: `NS-14, NS-18: shared nav refactor`.
**No Jira issue (rare):** Maintenance or repo-only changes with no ticket — use **`chore:`** as the prefix (e.g. `chore: update .gitignore`). Do not invent fake keys.
## Agent behavior
- When creating a **branch** or **commit** for tracked work, **infer the key** from the current story (e.g. user says NS-14), the branch already in use, or the Jira issue fetched via MCP.
- Follow [git workflow](git-workflow.md) (branch vs `main`) and [commit-and-review](commit-and-review.md) (no commit until the user asks).