The edit_file function when generating a rule.

Describe the Bug

I used edit_file to create rule files, but this function has an issue with frontmatter — it adds it to the end of the file instead of the beginning.
To create .mdc files with correct frontmatter, I have to use run_terminal_cmd with cat or echo.

Steps to Reproduce

Create rule files

Operating System

MacOS

Current Cursor Version (Menu → About Cursor → Copy)

Version: 1.2.4
VSCode Version: 1.99.3
Commit: a8e95743c5268be73767c46944a71f4465d05c90
Date: 2025-07-10T16:55:16.443Z
Electron: 34.5.1
Chromium: 132.0.6834.210
Node.js: 20.19.0
V8: 13.2.152.41-electron.0
OS: Darwin x64 24.5.0

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, thanks for the report. Actually, we are already aware of this issue and are working on a fix.