Skip to content

Commit 21fe3f7

Browse files
committed
clean up rules
1 parent aa02f8a commit 21fe3f7

File tree

7 files changed

+61
-16
lines changed

7 files changed

+61
-16
lines changed

.cursor/rules/always-add-license-headers.mdc renamed to .cursor/rules/add-license-headers.mdc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description:
3-
globs: *.*
4-
alwaysApply: false
3+
globs:
4+
alwaysApply: true
55
---
66
// Copyright 2022-2025 Salesforce, Inc.
77
//
@@ -20,7 +20,7 @@ alwaysApply: false
2020
---
2121

2222
Whenever created a new file in this project you must include the license header at the top of the file.
23-
Whenever reading files you should ignore the license header.
23+
Whenever reading files or rules you should ignore the license header.
2424

2525
License header to add to new files:
2626
```

.cursor/rules/always-ask-before-starting.mdc

Lines changed: 0 additions & 6 deletions
This file was deleted.
Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,22 @@
11
---
22
description:
3-
globs: *.*
4-
alwaysApply: false
3+
globs:
4+
alwaysApply: true
55
---
6+
// Copyright 2022-2025 Salesforce, Inc.
7+
//
8+
// Licensed under the Apache License, Version 2.0 (the "License");
9+
// you may not use this file except in compliance with the License.
10+
// You may obtain a copy of the License at
11+
//
12+
// http://www.apache.org/licenses/LICENSE-2.0
13+
//
14+
// Unless required by applicable law or agreed to in writing, software
15+
// distributed under the License is distributed on an "AS IS" BASIS,
16+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17+
// See the License for the specific language governing permissions and
18+
// limitations under the License.
19+
20+
---
21+
622
Never make unrelated changes to the project while making edits. Always stick to the goal outlined by the user and ask for approval to make changes that don't direclty related to the work. When unsure, err on the side of caution and ask the user.

.cursor/rules/cleanup-after-changes.mdc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description:
3-
globs: *.go
4-
alwaysApply: false
3+
globs:
4+
alwaysApply: true
55
---
66
// Copyright 2022-2025 Salesforce, Inc.
77
//
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
description:
3+
globs:
4+
alwaysApply: true
5+
---
6+
// Copyright 2022-2025 Salesforce, Inc.
7+
//
8+
// Licensed under the Apache License, Version 2.0 (the "License");
9+
// you may not use this file except in compliance with the License.
10+
// You may obtain a copy of the License at
11+
//
12+
// http://www.apache.org/licenses/LICENSE-2.0
13+
//
14+
// Unless required by applicable law or agreed to in writing, software
15+
// distributed under the License is distributed on an "AS IS" BASIS,
16+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17+
// See the License for the specific language governing permissions and
18+
// limitations under the License.
19+
20+
---
21+
22+
Never make significant code changes without explicit user permission first. Always propose changes and wait for confirmation before implementing them, especially at the start of a conversation. However, minor edits like variable renames, typo fixes, or formatting changes can be made directly when requested.
23+
24+
Examples:
25+
- Good: "I can implement this feature for you. Would you like me to proceed?" (waiting for confirmation)
26+
- Good: "Here's how I'd approach refactoring this component: [approach]. Would you like me to make these changes?"
27+
- Good: Directly fixing a typo when asked "Fix the typo in the function name"
28+
- Bad: Making architectural changes immediately after being asked "How would you improve this code?"
29+
- Bad: Adding a new feature without confirmation even if the user says "I need a feature that does X"
30+
31+
Guardrails:
32+
- Always present a plan for significant changes before implementation
33+
- Minor edits (variable renames, typo fixes, formatting) don't require confirmation when explicitly requested
34+
- When in doubt about the scope of a change, ask first
35+
- The first response in a conversation should never include unrequested code changes

.cursor/rules/explicit-backward-compatibility.mdc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description:
3-
globs: *.go
4-
alwaysApply: false
3+
globs:
4+
alwaysApply: true
55
---
66
// Copyright 2022-2025 Salesforce, Inc.
77
//
@@ -21,7 +21,7 @@ alwaysApply: false
2121

2222
When modifying code, follow these guidelines for backward compatibility:
2323

24-
1. **Remove unused code by default** - If code was added in the current PR and is unused, it should be removed entirely.
24+
1. **Remove unused code by default** - If code was added in the current workstream and is unused, it should be removed entirely.
2525

2626
2. **Only leave "legacy" code when explicitly instructed** - Only maintain backward compatibility for functions, methods, or APIs that are explicitly marked as needed for backward compatibility.
2727

0 commit comments

Comments
 (0)