mirror of
https://github.com/jparkerweb/plan2code.git
synced 2026-07-21 18:33:22 -07:00
v1.5.4
This commit is contained in:
+19
-31
@@ -10,24 +10,23 @@ Start all CREATE AGENTS MODE responses with '💡'
|
||||
╰───╯
|
||||
```
|
||||
|
||||
Please analyze this codebase and create an `AGENTS.md` file, which gives future AI coding agents (like Claude Code, Codex, or Gemini CLI) a simple set of rules to operate in this project.
|
||||
Analyze this codebase and create `AGENTS.md` to guide future AI coding agents (Claude Code, Codex, Gemini CLI, etc.).
|
||||
|
||||
What to add:
|
||||
## Content
|
||||
|
||||
1. Commands that will be commonly used, such as how to build, lint, and run tests. Include the necessary commands to develop in this codebase, such as how to run a single test.
|
||||
2. High-level code architecture and structure so that future instances can be productive more quickly. Focus on the "big picture" architecture that requires reading multiple files to understand
|
||||
1. **Commands**: Build, lint, test, run single test, and other common development tasks
|
||||
2. **Architecture**: High-level "big picture" structure requiring multi-file context to understand
|
||||
3. **Git Commit Messages**: Always append `AI Assisted` as the last line of every git commit message, separated from the rest of the message body with a blank line
|
||||
|
||||
Usage notes:
|
||||
## Rules
|
||||
|
||||
- If there's already an `./AGENTS.md`, suggest improvements to it vs creating a new file.
|
||||
- If `AGENTS.md` does NOT exist but `CLAUDE.md` does exist, read and use `CLAUDE.md` content as context when generating the new `AGENTS.md`. This ensures existing project knowledge is preserved and migrated.
|
||||
- When you make the initial `./AGENTS.md` do not repeat yourself and do not include obvious instructions like "Provide helpful error messages to users", "Write unit tests for all new utilities", "Never include sensitive information (API keys, tokens) in code or commits"
|
||||
- Avoid listing every component or file structure that can be easily discovered
|
||||
- Don't include generic development practices
|
||||
- If there are Cursor rules (in .cursor/rules/ or .cursorrules), GEMINI.md or Copilot rules (in .github/copilot-instructions.md), make sure to include the important parts.
|
||||
- If there is a README.md, PROJECT.md, make sure to include the important parts.
|
||||
- Do not make up information such as "Common Development Tasks", "Tips for Development", "Support and Documentation" unless this is expressly included in other files that you read.
|
||||
- Be sure to prefix the file with the following text:
|
||||
- If `AGENTS.md` exists: suggest improvements instead of creating new
|
||||
- If only `CLAUDE.md` exists: migrate its content to the new `AGENTS.md`
|
||||
- Include relevant content from: `README.md`, `PROJECT.md`, `.cursorrules`, `.cursor/rules/`, `GEMINI.md`, `.github/copilot-instructions.md`
|
||||
- Omit: obvious instructions, generic dev practices, easily discoverable file structures, made-up sections
|
||||
- Keep under 500 lines with focused, actionable, scoped rules
|
||||
|
||||
Prefix the file with:
|
||||
|
||||
```
|
||||
# AGENTS.md
|
||||
@@ -35,20 +34,11 @@ Usage notes:
|
||||
This file provides guidance to AI coding agents like Claude Code (claude.ai/code), Cursor AI, Codex, Gemini CLI, GitHub Copilot, and other AI coding assistants when working with code in this repository.
|
||||
```
|
||||
|
||||
Best practices:
|
||||
|
||||
* Good rules are focused, actionable, and scoped.
|
||||
* Keep rules under 500 lines
|
||||
* Avoid vague guidance. Write rules like clear internal docs
|
||||
* Reuse rules when repeating prompts in chat
|
||||
|
||||
---
|
||||
|
||||
## AI Agent File Sync
|
||||
|
||||
After creating `AGENTS.md`, check for other AI agent config files and offer to replace them with references.
|
||||
|
||||
### Files to Detect
|
||||
After creating `AGENTS.md`, check for these files and offer to replace with references:
|
||||
|
||||
| File | Title | Path |
|
||||
|------|-------|------|
|
||||
@@ -59,11 +49,11 @@ After creating `AGENTS.md`, check for other AI agent config files and offer to r
|
||||
| `.cursor/rules/*.md` | Project Rules | `../../AGENTS.md` |
|
||||
| `.windsurf/rules/*.md` | Project Rules | `../../AGENTS.md` |
|
||||
|
||||
For directory configs (`.cursor/rules/`, `.windsurf/rules/`): delete all existing `.md` files and create a single `reference.md`.
|
||||
For `.cursor/rules/` and `.windsurf/rules/`: delete existing `.md` files, create single `reference.md`.
|
||||
|
||||
### User Confirmation
|
||||
### Confirmation Prompt
|
||||
|
||||
If any files are found, show the mascot and list what was found:
|
||||
If files found, show:
|
||||
|
||||
```
|
||||
⋅
|
||||
@@ -78,12 +68,10 @@ I found these AI agent configuration files:
|
||||
Update them to reference AGENTS.md? (Yes / Select / No)
|
||||
```
|
||||
|
||||
Only modify files the user confirms.
|
||||
Only modify confirmed files.
|
||||
|
||||
### Reference Template
|
||||
|
||||
Replace file content with (using Title and Path from table above):
|
||||
|
||||
```markdown
|
||||
# [Title]
|
||||
|
||||
@@ -93,4 +81,4 @@ See [AGENTS.md]([Path]) for complete project documentation including:
|
||||
- Environment variables
|
||||
- Testing patterns
|
||||
- Deployment guides
|
||||
```
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user