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
45 changes: 37 additions & 8 deletions .cursor/rules/commit-rules.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,32 @@ Leave one **blank line** after the subject before the body.
## Body (detailed description)

- Wrap lines at about **72 characters** (including the bullet prefix and space).
- Use **bullet lines** for the explanation. Each bullet must start with exactly one of:
- **πŸ“–** β€” use when the change **adds** something new: new files, new sections, new features, new headers, net-new lines, or other greenfield content.
- **✏️** β€” use when the change **modifies** existing work: edits to existing lines, updates to existing sections, refactors of existing code, or changes to current content.
- Use **bullet lines** for the explanation. Each bullet must start with exactly one of these markers:

Apply **πŸ“–** or **✏️** to every body bullet so it is clear what was introduced versus what was altered.
### `πŸ“–` (adds)

Use when the change **adds** something new: new files, new sections, new features, new headers, net-new lines, or other greenfield content.

### `✏️` (modifies)

Use when the change **modifies** existing work: edits to existing lines, updates to existing sections, refactors of existing code, or changes to current content.

### `πŸ†•` (TOC / feature registration)

Use the single character **πŸ†•** when the change **adds an entry** to a repository **table of contents** or **navigation config** file (for example `TOC.md`, `config.md`, or similar) that **registers a new feature, topic, or page**. This usually means a new item appears in the doc or site nav because of that edit.

### `πŸ—‘οΈ` (removes)

Use the single character **πŸ—‘οΈ** when **entire content is removed** from a page or fileβ€”not a light edit, but a full deletion. Typical cases:

- A **section** removed (content under a heading marked with `#` through `######`)
- An **image** removed (for example `![…](…)` or asset reference dropped entirely)
- A **code block** removed (fenced or indented block gone completely)
- A **component** or include removed (for example Experience League shortcodes, includes, or custom MDX-style blocks)

Do **not** use **πŸ—‘οΈ** for small wording tweaks inside a section; use **✏️** for those. Use **πŸ—‘οΈ** when the heading (and everything under it), the image, the block, or the component no longer appears at all.

Apply **πŸ“–**, **✏️**, **πŸ†•**, or **πŸ—‘οΈ** to every body bullet that matches the definitions above.

## Template

Expand All @@ -34,11 +55,19 @@ Fill in the placeholders (do not leave angle brackets in the final message):
characters with bullets. >
```

## Example
## Examples

```text
Add AJO for GenStudio extensibility topic

- πŸ“– Add journey-optimizer-for-genstudio.md and screenshot assets.
- πŸ†• Add Journey Optimizer for GenStudio to help/extensibility/TOC.md.
- ✏️ Link the topic from use-templates.md and extensibility home.md.
```
Add refresh token rotation to auth flow

- πŸ“– Add refresh_tokens table and Alembic migration for schema v3.
- ✏️ Update session middleware to rotate secrets and revoke old tokens.
```text
Trim obsolete troubleshooting page

- πŸ—‘οΈ Remove duplicate H2 β€œKnown issues” and its bullets from activation/troubleshooting.md.
- πŸ—‘οΈ Drop outdated screenshot help/assets/legacy-flow.png from the repo.
```
33 changes: 9 additions & 24 deletions .cursor/rules/pr-rules.mdc
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
description: PR title, body, and post-create Jira comment conventions for this repo
description: PR title, body, and Jira-link conventions for this repo
alwaysApply: true
---
# Pull requests (PRs)

When you draft, review, or **create** a pull request title or description (for example in GitHub/GitLab or when asked in Agent chat), follow these conventions.
When you draft or review a pull request title or description (for example in GitHub/GitLab or when asked in Agent chat), follow these conventions.

## Deriving the Jira issue

Expand Down Expand Up @@ -40,14 +40,18 @@ Example:
- **feat** β€” adds a new feature. When a new TOC item is added or the JIRA is connected to another `feat`- labeled Jira.
- **fix** β€” fixes a bug
- **refactor** β€” rewrites/restructures code without changing behavior
- **perf** β€” improves performance (special refactor)
- **style** β€” formatting/whitespace only; no meaning change. Only edits
- **perf** β€” improves code performance (special refactor)
- **style** β€” formatting/whitespace changes or refactoring the content architecture; no meaning change. Only edits
- **test** β€” adds or corrects tests
- **docs** β€” New content added. documentation only
- **docs** β€” new content added; documentation only
- **build** β€” build tools, CI, dependencies, project version, etc.
- **ops** β€” infrastructure, deployment, backup, recovery, etc.
- **chore** β€” miscellaneous (e.g. `.gitignore`)

## Link in Jira

When a Jira ticket has been identified for the work, add a comment that includes the PR link once it has been created.

## PR body β€” required sections

Use **exactly these top-level sections** (Markdown headings):
Expand Down Expand Up @@ -98,25 +102,6 @@ Replace the key and URL with the actual ticket. If multiple tickets apply, list
No ticket
```

## Creating a PR β€” workflow

When the user asks you to **create** a pull request, run this sequence:

1. Inspect branch state (`git status`, diffs vs base, commit history) and draft the title and body using the conventions above.
2. Push the branch to the remote with `-u` when it is not already published.
3. Create the PR with `gh pr create` (HEREDOC body). Return the PR URL to the user.
4. **Comment on linked Jira ticket(s)** β€” final step; do not skip when a ticket applies:
- **When** the branch name includes a Jira issue ID (or the PR `# Context` β†’ `## Jira` section links one or more tickets): add a comment on **each** linked ticket with the PR URL.
- **When** `## Jira` is `No ticket`: skip this step.
- **Comment body** (one line; adjust only the PR URL):

```text
Pull request: https://github.com/<org>/<repo>/pull/<number>
```

- Prefer the **Jira MCP server** (`user-jira`) to post the comment when it is available and authenticated.
- If Jira MCP is unavailable or the comment fails, tell the user which ticket(s) still need the PR link and include the URL so they can add it manually.

## Example (full PR description)

```markdown
Expand Down