From 2aabcb969a2572442ab2d947d892eff35d307b69 Mon Sep 17 00:00:00 2001 From: don Date: Sun, 29 Mar 2026 21:19:49 -0400 Subject: [PATCH] chore(cursor): require explicit user approval before git commit Add commit-and-review rule; align story-kickoff and git-workflow with it. Made-with: Cursor --- .cursor/rules/commit-and-review.md | 21 +++++++++++++++++++++ .cursor/rules/git-workflow.md | 2 ++ .cursor/rules/story-kickoff.md | 2 +- 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 .cursor/rules/commit-and-review.md diff --git a/.cursor/rules/commit-and-review.md b/.cursor/rules/commit-and-review.md new file mode 100644 index 0000000..70ca3c2 --- /dev/null +++ b/.cursor/rules/commit-and-review.md @@ -0,0 +1,21 @@ +--- +description: Never git commit without explicit user instruction; user reviews before any commit +alwaysApply: true +--- + +# Commits and review (Neon Sprawl) + +## No commits without explicit instruction + +- Do **not** run **`git commit`** (or equivalent, e.g. committing via tools) unless the user **explicitly** asks—clear wording such as “commit this”, “make a commit”, or “commit with message …”. +- Phrases like “implement X”, “begin work”, or “open a PR” are **not** implicit permission to commit. +- **Default after edits:** leave changes **uncommitted** (working tree or staged only if the user asked to stage). Summarize what changed and where so the user can review in the Git / diff UI, then wait for commit instructions. + +## Review before commit + +- 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). + +## Scope + +- Applies to **all** commits the agent might make, including **documentation-only** changes (e.g. `docs/plans/`, README), not only application source. diff --git a/.cursor/rules/git-workflow.md b/.cursor/rules/git-workflow.md index 8c31560..1d29d9c 100644 --- a/.cursor/rules/git-workflow.md +++ b/.cursor/rules/git-workflow.md @@ -5,6 +5,8 @@ alwaysApply: true # Git workflow (Neon Sprawl) +**Agent:** Never run `git commit` without explicit user instruction; the user reviews diffs first. See [commit-and-review](commit-and-review.md). + - **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. diff --git a/.cursor/rules/story-kickoff.md b/.cursor/rules/story-kickoff.md index 3588999..6a1ec21 100644 --- a/.cursor/rules/story-kickoff.md +++ b/.cursor/rules/story-kickoff.md @@ -24,7 +24,7 @@ When the user starts work on a **Jira story** (e.g. issue key `NS-14`, phrases l ## 4. Planning document - Add **`docs/plans/{JIRA_KEY}-implementation-plan.md`** (example: `docs/plans/NS-14-implementation-plan.md`). Create `docs/plans/` if it does not exist. -- Prefer committing this plan on **`main`** so it exists even before a feature branch; it counts as documentation-style work per [git workflow](git-workflow.md). +- **Do not** `git commit` the plan unless the user explicitly asks; see [commit-and-review](commit-and-review.md). When the user commits plan-only changes, use **`main`** per [git workflow](git-workflow.md). **Required sections** in that file: