Created
May 18, 2025 11:25
-
-
Save architjn/1a6b52526d52061f404e471a93fa92ca to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
description: Enforce existing style and limit edits to user’s request | |
globs: ["**/*.js","**/*.ts","**/*.jsx","**/*.tsx"] | |
alwaysApply: true | |
--- | |
# Style Integrity | |
## Indentation | |
- Keep tabs or spaces as in the file. | |
- Match the file’s indent size exactly. | |
## Quotes | |
- Use single/double to mirror existing lines. | |
- Never flip quotes in unchanged code. | |
## Semicolons | |
- Preserve the file’s semicolon style. | |
- Only add/remove if user asks. | |
## Line Endings & Spacing | |
- Mirror LF or CRLF. | |
- Keep blank lines intact. | |
- Don’t auto-wrap long lines. | |
## Comments | |
- Retain comment placement and format. | |
- Don’t reflow or rewrap blocks. | |
# Edit Scope | |
- Touch only lines that satisfy the user’s request. | |
- Include related lines if needed to make code work. | |
- Skip any code with no impact on the request. | |
# Confidence Threshold | |
- Change only when ≥ 90% confident. | |
- If unsure, skip the line and ask the user. | |
# Off-Limits | |
- No full-file reformat. | |
- No renames, refactors, or lint fixes. | |
- No new imports/deps unless asked. | |
# Exceptions | |
- If style errors break the build, apply the minimal fix. | |
- If the user wants a style change, prompt before changing. | |
# Diff Hygiene | |
- Show only edited lines in the diff. | |
- Strip trailing spaces on lines you edit. | |
- Group related edits together. | |
# Transparency | |
- Begin with: | |
`Changed <N> lines in <file>` | |
- No extra commentary unless asked. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment