replace old .cursorrules with AGENTS.md (#4451)

* chore: remove .cursorrules file
feat: add AGENTS.md file to any newly created file

* move the copy of the tests
This commit is contained in:
Mike Plachta
2026-02-11 10:07:24 -08:00
committed by GitHub
parent 3a22e80764
commit 2882df5daf
7 changed files with 1104 additions and 1430 deletions

View File

@@ -143,6 +143,12 @@ def create_folder_structure(
(folder_path / "src" / folder_name).mkdir(parents=True)
(folder_path / "src" / folder_name / "tools").mkdir(parents=True)
(folder_path / "src" / folder_name / "config").mkdir(parents=True)
# Copy AGENTS.md to project root (top-level projects only)
package_dir = Path(__file__).parent
agents_md_src = package_dir / "templates" / "AGENTS.md"
if agents_md_src.exists():
shutil.copy2(agents_md_src, folder_path / "AGENTS.md")
return folder_path, folder_name, class_name

View File

@@ -1,3 +1,4 @@
import shutil
from pathlib import Path
import click
@@ -34,6 +35,11 @@ def create_flow(name):
package_dir = Path(__file__).parent
templates_dir = package_dir / "templates" / "flow"
# Copy AGENTS.md to project root
agents_md_src = package_dir / "templates" / "AGENTS.md"
if agents_md_src.exists():
shutil.copy2(agents_md_src, project_root / "AGENTS.md")
# List of template files to copy
root_template_files = [".gitignore", "pyproject.toml", "README.md"]
src_template_files = ["__init__.py", "main.py"]

File diff suppressed because it is too large Load Diff

View File

@@ -2,6 +2,7 @@ import base64
from json import JSONDecodeError
import os
from pathlib import Path
import shutil
import subprocess
import tempfile
from typing import Any
@@ -55,6 +56,11 @@ class ToolCommand(BaseCommand, PlusAPIMixin):
tree_find_and_replace(project_root, "{{folder_name}}", folder_name)
tree_find_and_replace(project_root, "{{class_name}}", class_name)
# Copy AGENTS.md to project root
agents_md_src = Path(__file__).parent.parent / "templates" / "AGENTS.md"
if agents_md_src.exists():
shutil.copy2(agents_md_src, project_root / "AGENTS.md")
old_directory = os.getcwd()
os.chdir(project_root)
try: