Practicing AI programming for two and a half years, sharing three essential top-level prompts, suggesting to manually add them regardless of the development tool.
In actual development, the biggest pain point of AI is often not that code cannot be written, but that **documents are misplaced, design solutions are fleeting, and what changes have been made to the code is completely untraceable**.
Rendering...
In the two and a half years of using AI-assisted programming, I have tried various AI code assistants (such as Codex, Cursor, Windsurf, etc.), and have also gone through a process of adjustment from "AI writing messy code" to "efficient human-machine collaboration." In actual development, the biggest pain points of AI are often not that it can't write code, but rather **documents are misplaced, design proposals vanish quickly, and code modifications are completely untraceable**. To make AI behave well and maintain an extremely rigorous project structure in the root directory, I have summarized **three essential top-level prompts (System Prompt / Instructions)**. I recommend that no matter which development tool you use, you manually add them to your user-level custom instructions! ### 1: General Documentation AI often generates instructions such as environment configuration, deployment steps, and API call guides based on our requests. Without restrictions, they either get printed directly in the chat box and become lost, or are randomly dumped in the project root directory. This prompt forces AI to uniformly organize all instructional documents, creating a comprehensive `docs` asset library for the project. **English Prompt:** > If I ask you to provide some instructions or guides, please save them to the "docs" folder in the root directory. **Chinese Translation:** > 如果我要求你提供一些操作说明或指南,请将它们保存到根目录下的 "docs" 文件夹中。 ### 2: Design Documents Before writing code, excellent developers always conduct architectural design and solution reviews. When asking AI to generate a design proposal, we need to solidify it into a document for later verification or team collaboration. This prompt ensures that all core design ideas, database schema designs, interface definitions, etc., are traceable. **English Prompt:** > If I ask you to provide some design proposal documents, please save them to the "design" folder in the root directory. **Chinese Translation:** > 如果我要求你提供一些设计方案文档,请将它们保存到根目录下的 "design" 文件夹中。 ### 3: Change Log This is the one I have benefited the most from after intensive use of AI programming! AI modifies code very quickly; sometimes it changes several files in a row, and later even I forget what logic it altered. This instruction requires AI to automatically generate numbered change records (e.g., `001-fix-auth-bug.md`) in chronological order within the `changelog` directory after each code modification. This not only makes the project's evolution clear at a glance but also serves as the perfect reference for review and rollback when AI occasionally "goes off track." **English Prompt:** > Each time code is modified, a new document is created to record the changes in chronological order. Filenames begin with a sort number for easy organization. These documents are saved to the `changelog` folder in the root directory. **Chinese Translation:** > 每次修改代码时,都会创建一个新文档,按时间顺序记录这些变更。为了便于整理,文件名以排序数字开头。这些文档保存在根目录下的 `changelog` 文件夹中。 ### How to Use Them? **Cursor**: Go to `Settings -> Features`, and directly fill in **`Rules for AI`**. **Claude Code**: Modify **`~/.clauderc`** in the user home directory (or configure global instructions via the `claude config set` command). **Windsurf**: Go to `Settings`, search for and fill in **`Global Rules for AI`**. **Claude Code**: Modify **`~/.claude/settings.json** in the user directory (add in the `globalInstructions` field), or create a global **`~/.claude/CLAUDE.md`** in the root directory. **VS Code General Plugins (e.g., Continue)**: Open the global `settings.json`, and modify the **`systemPrompt`** field for the corresponding plugin. ### Conclusion Two years of AI programming experience have taught me: **Treating AI as a programmer is less effective than treating AI as a "junior developer in need of strict institutional constraints."** Excellent top-level prompts are the ultimate specification for the project—without you having to say much, it can keep the project's documents, designs, and logs well-organized. Go ahead and add them to your development tools!
Comments
Please login to view and post comments
Go to Login