Skip to content

Commit 222af4f

Browse files
authored
feat: improve template workflow and README handling (#6)
- Clarify GitHub template vs clone workflows in README and rules - Abstract README template to .cursor/templates/project_readme.md - Rename preserved README to how_to_use_this_template.md - Minimize workflow rules by extracting template content - Better organization and maintainability
1 parent 58ff033 commit 222af4f

3 files changed

Lines changed: 55 additions & 13 deletions

File tree

.cursor/rules/workflow.mdc

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@ alwaysApply: true
55
---
66

77
## Template Setup Workflow
8-
- **Agent-Driven Initialization**: When a user prompts "initialize the repo" or similar, I will automatically handle template setup:
8+
- **Agent-Driven Initialization**: When a user prompts "set up the template" or "initialize the repo" (for cloned templates), I will automatically handle template setup:
99
1. **Copy `.cursor/.mcp.json.example` to `.cursor/mcp.json`** and prompt user for their API keys
1010
2. **Optionally copy `.env.example` to `.env`** only if they plan to use TaskMaster CLI (not needed for MCP workflow)
1111
3. **Remove template-specific content** and customize for their project:
12-
- Replace `README.md` with their project-specific README
12+
- **Move `README.md` to `docs/how_to_use_this_template.md`** to preserve template documentation
13+
- **Create new project-specific `README.md`** using the template from `.cursor/templates/project_readme.md`
14+
- Replace `[Project Name]` placeholder with user-provided name or "My Project"
1315
- Update `SECURITY.md` to remove template references
1416
- Remove or update any hardcoded paths in configuration files
1517
- **Environment File Distinction**:
@@ -46,7 +48,9 @@ alwaysApply: true
4648
## Git Workflow
4749

4850
### Repository Initialization
49-
When you request to "initialize git repo", I will perform the following steps:
51+
**Note**: This is only needed when cloning the template directly. When using this as a GitHub template (recommended), a fresh repository is automatically created.
52+
53+
When you request to "initialize git repo" (only needed for cloned templates), I will perform the following steps:
5054
1. **Clear template git history**: Remove the existing `.git` directory to start fresh (`rm -rf .git`).
5155
2. Initialize a local Git repository (`git init`).
5256
3. Create a `.gitignore` file with at least the following entries:
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# [Project Name]
2+
3+
> Brief description of what this project does
4+
5+
## 🚀 Getting Started
6+
7+
### Prerequisites
8+
- List any dependencies or requirements
9+
10+
### Installation
11+
```bash
12+
# Add installation commands
13+
```
14+
15+
## 📖 Usage
16+
17+
Describe how to use your project
18+
19+
## 🤝 Contributing
20+
21+
Guidelines for contributing to this project
22+
23+
## 📄 License
24+
25+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

README.md

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,34 @@ A comprehensive project template for **vibe coding** in Cursor with pre-configur
1515

1616
## 🚀 Quick Start
1717

18-
### 1. Template Setup (After Cloning)
19-
20-
**Agent-Driven Setup (Recommended)**
18+
### 1. Create Your Project
19+
20+
**Recommended: Use as GitHub Template**
21+
1. Click "Use this template" button on GitHub
22+
2. Create your new repository from the template
23+
3. Clone your new repository:
24+
```bash
25+
git clone git@github.com:yourusername/your-project-name.git
26+
cd your-project-name
27+
cursor .
28+
```
29+
4. Prompt the AI agent: `"Set up the template for my new project"`
30+
31+
**Alternative: Clone Template Directly**
2132
```bash
22-
# After cloning the template to your project folder
33+
# If you cloned the template repository directly
34+
git clone git@github.com:your-org/project_template.git my-new-project
2335
cd my-new-project
24-
25-
# Open in Cursor
2636
cursor .
2737

2838
# Then prompt the AI agent:
2939
# "Initialize the repo for my new project"
3040
```
3141

32-
The AI agent will automatically handle all template setup including:
42+
The AI agent will automatically handle template setup including:
3343
- Setting up your MCP configuration
3444
- Customizing files for your project
35-
- Initializing git repository and GitHub repo
45+
- Initializing git repository and GitHub repo (only needed for cloned templates)
3646

3747
**Manual Setup (If Preferred)**
3848
```bash
@@ -57,7 +67,8 @@ cp .env.example .env # Optional
5767
### 2. Start Vibe Coding
5868
```bash
5969
cursor .
60-
# Then prompt: "Initialize the repo for my new project"
70+
# For GitHub template usage: "Set up the template for my new project"
71+
# For cloned templates: "Initialize the repo for my new project"
6172
```
6273

6374
## ✨ Features
@@ -115,9 +126,11 @@ project_template/
115126
This template is optimized for **vibe coding** - a development style that balances structure with creative flow using controlled MCP workflows.
116127

117128
### 🚀 Initialize Git Repository
129+
**Note:** Only needed when cloning the template directly. When using as a GitHub template (recommended), your repository is already initialized.
130+
118131
**Prompt:** `"Initialize git repo"` or `"Initialize the repo for my new project"`
119132

120-
The AI agent automatically follows this workflow:
133+
For cloned templates, the AI agent automatically follows this workflow:
121134
1. **Template Cleanup** - Removes template-specific `.git` history
122135
2. **Local Git Setup** - Initializes fresh repository with proper `.gitignore`
123136
3. **GitHub Repository** - Creates private repo with issues enabled via GitHub CLI

0 commit comments

Comments
 (0)