agents-templated 1.1.1 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +209 -132
- package/bin/cli.js +13 -6
- package/index.js +23 -5
- package/package.json +2 -2
- package/templates/.cursorrules +70 -0
- package/templates/.gemini-instructions.md +130 -0
- package/templates/.vscode-ai-rules.md +111 -0
- package/templates/AI_INSTRUCTIONS.md +1 -0
- package/templates/CLAUDE.md +5 -2
- package/templates/README.md +6 -1
- package/templates/agents/rules/core.mdc +10 -2
- package/templates/agents/rules/workflows.mdc +49 -0
- package/templates/presets/django-react.json +1 -0
- package/templates/presets/express-api.json +1 -0
- package/templates/presets/fastapi.json +1 -0
- package/templates/presets/go-api.json +1 -0
- package/templates/presets/nextjs.json +1 -0
package/README.md
CHANGED
|
@@ -13,17 +13,17 @@ This template provides proven development patterns and guidelines that work with
|
|
|
13
13
|
|
|
14
14
|
## Key Features
|
|
15
15
|
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
- **Technology-Agnostic
|
|
21
|
-
- **AI Assistant Ready**: Pre-configured
|
|
22
|
-
- **Security-First
|
|
23
|
-
- **Testing Strategy**: Defined
|
|
24
|
-
- **Agent-Based Architecture**:
|
|
25
|
-
- **Type-Safe Development**:
|
|
26
|
-
- **Accessibility Guidelines**: WCAG 2.1 AA compliance patterns built
|
|
16
|
+
- **Quick Start Presets** (v1.1.0): Fast-track setup with popular tech stack presets
|
|
17
|
+
- **Interactive Wizard** (v1.1.0): Guided setup with personalized recommendations
|
|
18
|
+
- **Project Validation** (v1.1.0): Automated checks for configuration and best practices
|
|
19
|
+
- **Template Updates** (v1.1.0): Keep your templates in sync with latest improvements
|
|
20
|
+
- **Technology-Agnostic**: Patterns and structure that work with any tech stack
|
|
21
|
+
- **AI Assistant Ready**: Pre-configured for Cursor, GitHub Copilot, and other AI coding tools
|
|
22
|
+
- **Security-First**: Built-in OWASP Top 10 protection patterns and security guidelines
|
|
23
|
+
- **Testing Strategy**: Defined approach with unit, integration, and E2E coverage targets
|
|
24
|
+
- **Agent-Based Architecture**: Specialized agents for frontend, backend, database, testing, security
|
|
25
|
+
- **Type-Safe Development**: Validation patterns applicable to any language
|
|
26
|
+
- **Accessibility Guidelines**: WCAG 2.1 AA compliance patterns built-in
|
|
27
27
|
|
|
28
28
|
## What's New in v1.1.0
|
|
29
29
|
|
|
@@ -38,175 +38,236 @@ agents-templated init --preset=go-api # Go API server
|
|
|
38
38
|
```
|
|
39
39
|
|
|
40
40
|
Each preset includes:
|
|
41
|
-
- Recommended package lists
|
|
42
|
-
-
|
|
41
|
+
- Recommended package lists for your tech stack
|
|
42
|
+
- Stack-specific configuration templates
|
|
43
43
|
- Optimized .gitignore patterns
|
|
44
|
-
-
|
|
44
|
+
- Pre-configured agent rules
|
|
45
45
|
|
|
46
46
|
### 🧙 Interactive Setup Wizard
|
|
47
|
-
|
|
47
|
+
|
|
48
|
+
Guided setup experience with smart recommendations:
|
|
49
|
+
|
|
48
50
|
```bash
|
|
49
51
|
agents-templated wizard
|
|
50
52
|
```
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
-
|
|
54
|
-
-
|
|
53
|
+
|
|
54
|
+
**Features:**
|
|
55
|
+
- Choose project type: fullstack, frontend, backend, CLI, package, or custom
|
|
56
|
+
- Select frameworks and databases interactively
|
|
57
|
+
- Receive personalized package recommendations
|
|
58
|
+
- Install only the components you need
|
|
59
|
+
- Get next-step guidance tailored to your stack
|
|
55
60
|
|
|
56
61
|
### ✅ Validation & Health Checks
|
|
62
|
+
|
|
57
63
|
Ensure your project follows best practices:
|
|
64
|
+
|
|
58
65
|
```bash
|
|
59
66
|
agents-templated validate # Quick validation of setup
|
|
60
|
-
agents-templated doctor # Comprehensive health check
|
|
67
|
+
agents-templated doctor # Comprehensive health check with recommendations
|
|
61
68
|
```
|
|
62
69
|
|
|
70
|
+
**Checks include:**
|
|
71
|
+
- Required documentation files present
|
|
72
|
+
- Agent rules properly configured
|
|
73
|
+
- AI assistant configurations valid
|
|
74
|
+
- Security patterns implemented
|
|
75
|
+
- Testing structure in place
|
|
76
|
+
|
|
63
77
|
### 🔄 Keep Templates Updated
|
|
78
|
+
|
|
64
79
|
Stay current with latest improvements:
|
|
80
|
+
|
|
65
81
|
```bash
|
|
66
|
-
agents-templated update # Apply updates
|
|
82
|
+
agents-templated update # Apply updates with backup
|
|
67
83
|
agents-templated update --check-only # Check without installing
|
|
68
84
|
```
|
|
69
85
|
|
|
86
|
+
**Features:**
|
|
87
|
+
- Automatic backup creation before updates
|
|
88
|
+
- Preview changes before applying
|
|
89
|
+
- Selective file updates
|
|
90
|
+
- Preserves your customizations
|
|
91
|
+
|
|
70
92
|
### 🧪 Comprehensive Testing
|
|
71
|
-
All features now include automated tests with Jest for reliability.
|
|
72
93
|
|
|
73
|
-
|
|
94
|
+
All core functionality includes automated tests:
|
|
95
|
+
- 10+ unit tests covering install operations
|
|
96
|
+
- Jest test framework with coverage reporting
|
|
97
|
+
- Tested on Windows, macOS, and Linux
|
|
98
|
+
- CI/CD ready with `npm run test:ci`
|
|
99
|
+
|
|
100
|
+
## 🤖 Multi-AI Agent Support (v1.2.0)
|
|
74
101
|
|
|
75
|
-
|
|
102
|
+
**Agents Templated v1.2.0 now supports 4 major AI agents with auto-discovered configuration files:**
|
|
76
103
|
|
|
77
|
-
|
|
104
|
+
### Supported AI Agents
|
|
78
105
|
|
|
79
|
-
|
|
106
|
+
| Agent | Config File | Auto-Discovery | Best For |
|
|
107
|
+
|-------|-------------|-----------------|----------|
|
|
108
|
+
| **Cursor IDE** | `.cursorrules` | ✅ Auto-loaded | Full IDE with native agent support |
|
|
109
|
+
| **GitHub Copilot** | `.github/copilot-instructions.md` | ✅ Auto-loaded | Code completion and generation in any editor |
|
|
110
|
+
| **VSCode AI Extensions** | `.vscode-ai-rules.md` | ✅ Auto-loaded | Copilot Chat and other VSCode AI tools |
|
|
111
|
+
| **Google Gemini** | `.gemini-instructions.md` | ✅ Auto-loaded | Google Gemini API and IDE plugins |
|
|
112
|
+
|
|
113
|
+
### How It Works
|
|
114
|
+
|
|
115
|
+
1. **Run `npx agents-templated init`** to create all 4 config files
|
|
116
|
+
2. **Each AI agent auto-discovers its config file** in the project root
|
|
117
|
+
3. **All agents read from the same ruleset**: `agents/rules/` and `agents/skills/`
|
|
118
|
+
4. **No duplication**: Rules and guidelines live in one place
|
|
119
|
+
|
|
120
|
+
### Example: Setup and Use
|
|
80
121
|
|
|
81
122
|
```bash
|
|
82
|
-
#
|
|
83
|
-
|
|
123
|
+
# Initialize project with all 4 AI agent configs
|
|
124
|
+
npx agents-templated init --preset=nextjs
|
|
125
|
+
|
|
126
|
+
# Or choose components manually
|
|
127
|
+
npx agents-templated init --all
|
|
128
|
+
|
|
129
|
+
# Now open your project in any AI-enabled editor:
|
|
130
|
+
# - Open in Cursor → .cursorrules loads automatically
|
|
131
|
+
# - Open in VSCode with Copilot Chat → .vscode-ai-rules.md loads automatically
|
|
132
|
+
# - Use Gemini API → .gemini-instructions.md loads automatically
|
|
133
|
+
# - Use GitHub Copilot → .github/copilot-instructions.md loads automatically
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### Unified Rules System
|
|
137
|
+
|
|
138
|
+
All 4 AI agents read from the same source of truth:
|
|
139
|
+
|
|
140
|
+
```
|
|
141
|
+
agents/
|
|
142
|
+
├── rules/
|
|
143
|
+
│ ├── core.mdc # Core development principles
|
|
144
|
+
│ ├── security.mdc # Security patterns (CRITICAL)
|
|
145
|
+
│ ├── testing.mdc # Testing strategy
|
|
146
|
+
│ ├── frontend.mdc # Frontend patterns
|
|
147
|
+
│ ├── database.mdc # Database patterns
|
|
148
|
+
│ └── style.mdc # Code style guidelines
|
|
149
|
+
└── skills/
|
|
150
|
+
├── find-skills/ # Domain-specific guidance
|
|
151
|
+
└── web-design-guidelines/
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
Every AI agent, regardless of the tool, follows the same:
|
|
155
|
+
- Security patterns (OWASP Top 10)
|
|
156
|
+
- Testing strategy (80/15/5)
|
|
157
|
+
- Code quality standards
|
|
158
|
+
- Architecture principles
|
|
159
|
+
|
|
160
|
+
### Adding New Agents in the Future
|
|
161
|
+
|
|
162
|
+
Future v1.3+ can add more agents by simply creating new config files that point to the same `agents/rules/` directory. The unified architecture makes this trivial—no duplicate rules needed.
|
|
84
163
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
164
|
+
## 🚀 Quick Start
|
|
165
|
+
|
|
166
|
+
### Installation
|
|
167
|
+
|
|
168
|
+
**Global Installation (Recommended)**
|
|
169
|
+
|
|
170
|
+
```bash
|
|
171
|
+
npm install -g agents-templated
|
|
172
|
+
cd your-project
|
|
173
|
+
agents-templated init --preset=nextjs # or use wizard
|
|
88
174
|
```
|
|
89
175
|
|
|
90
|
-
|
|
176
|
+
**Local Installation (Per Project)**
|
|
91
177
|
|
|
92
178
|
```bash
|
|
93
|
-
# Install as dev dependency
|
|
94
179
|
npm install --save-dev agents-templated
|
|
95
|
-
|
|
96
|
-
# Initialize templates
|
|
97
|
-
npx agents-templated init
|
|
180
|
+
npx agents-templated init --preset=nextjs
|
|
98
181
|
```
|
|
99
182
|
|
|
100
|
-
**
|
|
183
|
+
**Using npx (No Installation)**
|
|
101
184
|
|
|
102
185
|
```bash
|
|
103
|
-
|
|
104
|
-
|
|
186
|
+
cd your-project
|
|
187
|
+
npx agents-templated@latest init --preset=nextjs
|
|
105
188
|
```
|
|
106
189
|
|
|
107
|
-
### CLI
|
|
190
|
+
### 📋 CLI Commands
|
|
108
191
|
|
|
192
|
+
**Setup Commands:**
|
|
109
193
|
```bash
|
|
110
|
-
# Quick start with presets
|
|
194
|
+
# Quick start with presets
|
|
111
195
|
agents-templated init --preset=nextjs # Next.js full-stack
|
|
112
196
|
agents-templated init --preset=django-react # Django + React
|
|
113
197
|
agents-templated init --preset=express-api # Express.js API
|
|
114
198
|
agents-templated init --preset=fastapi # FastAPI
|
|
115
199
|
agents-templated init --preset=go-api # Go API
|
|
116
200
|
|
|
117
|
-
# Interactive
|
|
118
|
-
agents-templated wizard
|
|
119
|
-
|
|
120
|
-
# Install all components
|
|
121
|
-
agents-templated init --all
|
|
201
|
+
# Interactive wizard
|
|
202
|
+
agents-templated wizard # Guided setup
|
|
122
203
|
|
|
123
|
-
#
|
|
124
|
-
agents-templated init --
|
|
125
|
-
agents-templated init --
|
|
126
|
-
agents-templated init --
|
|
127
|
-
agents-templated init --
|
|
204
|
+
# Manual component selection
|
|
205
|
+
agents-templated init --all # All components
|
|
206
|
+
agents-templated init --docs # Documentation only
|
|
207
|
+
agents-templated init --rules # Agent rules only
|
|
208
|
+
agents-templated init --skills # Skills only
|
|
209
|
+
agents-templated init --github # GitHub Copilot config
|
|
128
210
|
|
|
129
|
-
# Force overwrite
|
|
130
|
-
agents-templated init --all --force
|
|
211
|
+
# Force overwrite
|
|
212
|
+
agents-templated init --all --force # Overwrite existing files
|
|
213
|
+
```
|
|
131
214
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
215
|
+
**Maintenance Commands:**
|
|
216
|
+
```bash
|
|
217
|
+
# Validation
|
|
218
|
+
agents-templated validate # Quick setup validation
|
|
219
|
+
agents-templated doctor # Comprehensive health check
|
|
135
220
|
|
|
136
|
-
#
|
|
137
|
-
agents-templated update
|
|
138
|
-
agents-templated update --check-only
|
|
221
|
+
# Updates
|
|
222
|
+
agents-templated update # Apply template updates
|
|
223
|
+
agents-templated update --check-only # Check without installing
|
|
139
224
|
|
|
140
|
-
#
|
|
141
|
-
agents-templated list
|
|
225
|
+
# Information
|
|
226
|
+
agents-templated list # Show components and presets
|
|
142
227
|
```
|
|
143
228
|
|
|
144
|
-
###
|
|
229
|
+
### Install Your Technology Stack
|
|
145
230
|
|
|
146
|
-
After
|
|
231
|
+
After initializing the template, install your chosen framework and dependencies. The template provides patterns but does **not** install packages for you.
|
|
147
232
|
|
|
148
|
-
**Frontend
|
|
233
|
+
**Frontend:**
|
|
149
234
|
- React/Next.js, Vue/Nuxt, Angular, Svelte/SvelteKit, or traditional SSR
|
|
150
235
|
|
|
151
|
-
**Backend
|
|
152
|
-
- Node.js (Express/Fastify), Python (Django/FastAPI), Go, Rust, Java/Spring
|
|
153
|
-
|
|
154
|
-
**Database Options:**
|
|
155
|
-
- PostgreSQL/MySQL with ORM, MongoDB/NoSQL, or cloud solutions like Supabase
|
|
156
|
-
|
|
157
|
-
**Note:** You must install these packages yourself—the template doesn't include them.
|
|
158
|
-
|
|
159
|
-
### Configure AI Assistants
|
|
160
|
-
|
|
161
|
-
The template includes configuration files for multiple AI assistants:
|
|
162
|
-
|
|
163
|
-
- **Cursor**: Uses `.cursorrules` and `agents/rules/*.mdc` files (auto-loaded)
|
|
164
|
-
- **GitHub Copilot**: Uses `.github/copilot-instructions.md` (auto-loaded)
|
|
165
|
-
- **Other AI Tools**: Reference `AI_INSTRUCTIONS.md` in your prompts
|
|
236
|
+
**Backend:**
|
|
237
|
+
- Node.js (Express/Fastify/Nest.js), Python (Django/FastAPI/Flask), Go, Rust, Java/Spring Boot, Ruby on Rails, PHP (Laravel)
|
|
166
238
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
Once the template is initialized, install your chosen framework and dependencies:
|
|
239
|
+
**Database:**
|
|
240
|
+
- PostgreSQL, MySQL, MongoDB, SQLite, or cloud solutions (Supabase, Firebase, PlanetScale)
|
|
170
241
|
|
|
242
|
+
**Example installations:**
|
|
171
243
|
```bash
|
|
172
|
-
#
|
|
173
|
-
npm
|
|
174
|
-
npm install react next typescript
|
|
244
|
+
# Next.js
|
|
245
|
+
npm install next react react-dom typescript
|
|
175
246
|
|
|
176
|
-
#
|
|
177
|
-
pip install django djangorestframework
|
|
178
|
-
django-admin startproject myproject .
|
|
247
|
+
# Django
|
|
248
|
+
pip install django djangorestframework python-dotenv
|
|
179
249
|
|
|
180
|
-
#
|
|
181
|
-
|
|
182
|
-
go get github.com/gin-gonic/gin
|
|
250
|
+
# Express API
|
|
251
|
+
npm install express typescript zod prisma
|
|
183
252
|
```
|
|
184
253
|
|
|
185
|
-
|
|
254
|
+
### 🤖 Configure AI Assistants
|
|
186
255
|
|
|
187
|
-
|
|
256
|
+
The template includes configuration files for multiple AI coding assistants:
|
|
188
257
|
|
|
189
|
-
|
|
258
|
+
**Cursor:**
|
|
259
|
+
- Auto-loads `.cursorrules` and `agents/rules/*.mdc` files
|
|
260
|
+
- No additional configuration needed
|
|
190
261
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
// Install all components
|
|
195
|
-
await agentsTemplated.install('./my-project', {
|
|
196
|
-
force: true
|
|
197
|
-
});
|
|
262
|
+
**GitHub Copilot:**
|
|
263
|
+
- Auto-loads `.github/copilot-instructions.md`
|
|
264
|
+
- Works in VS Code,VS Code Insiders, and github.com
|
|
198
265
|
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
rules: true,
|
|
203
|
-
skills: false,
|
|
204
|
-
github: true,
|
|
205
|
-
force: false
|
|
206
|
-
});
|
|
207
|
-
```
|
|
266
|
+
**Other AI Tools:**
|
|
267
|
+
- Reference `AI_INSTRUCTIONS.md` explicitly in your prompts
|
|
268
|
+
- Copy relevant rules from `agents/rules/` as needed
|
|
208
269
|
|
|
209
|
-
## What Gets Installed
|
|
270
|
+
## \ud83d\udce6 What Gets Installed
|
|
210
271
|
|
|
211
272
|
When you run `agents-templated init`, you get:
|
|
212
273
|
|
|
@@ -231,30 +292,46 @@ When you run `agents-templated init`, you get:
|
|
|
231
292
|
└── README.md # Project documentation
|
|
232
293
|
```
|
|
233
294
|
|
|
234
|
-
##
|
|
295
|
+
## \ud83d\udce6 Programmatic API
|
|
296
|
+
|
|
297
|
+
Use agents-templated programmatically in build scripts or automation:
|
|
298
|
+
|
|
299
|
+
```javascript
|
|
300
|
+
const agentsTemplated = require('agents-templated');
|
|
301
|
+
|
|
302
|
+
// Install all components
|
|
303
|
+
await agentsTemplated.install('./my-project', {
|
|
304
|
+
force: true
|
|
305
|
+
});
|
|
306
|
+
|
|
307
|
+
// Install specific components
|
|
308
|
+
await agentsTemplated.install('./my-project', {
|
|
309
|
+
docs: true,
|
|
310
|
+
rules: true,
|
|
311
|
+
skills: false,
|
|
312
|
+
github: true,
|
|
313
|
+
force: false
|
|
314
|
+
});
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
## \ud83d\udcda Core Configuration Files
|
|
318
|
+
\ud83e\udd16 Agent-Based Development
|
|
235
319
|
|
|
236
|
-
|
|
320
|
+
This template uses specialized agents for different aspects of development:
|
|
237
321
|
|
|
238
|
-
|
|
239
|
-
- **`AGENTS.md`** - Agent delegation patterns, responsibilities, and when to use each agent
|
|
240
|
-
- **`AI_INSTRUCTIONS.md`** - Universal instructions for any AI assistant (reference explicitly)
|
|
322
|
+
**FrontendAgent:**\nHandles UI/UX development, component creation, design system implementation, and accessibility compliance.
|
|
241
323
|
|
|
242
|
-
|
|
324
|
+
**BackendAgent:**\nManages API development, business logic, authentication, authorization, rate limiting, and security middleware.
|
|
243
325
|
|
|
244
|
-
|
|
245
|
-
- **`.github/copilot-instructions.md`** - GitHub Copilot instructions (auto-loaded)
|
|
246
|
-
- **`agents/rules/*.mdc`** - Detailed rules with `alwaysApply: true` for auto-loading in Cursor
|
|
326
|
+
**DatabaseAgent:**\nOwns database schema design, migrations, query optimization, and data access patterns.
|
|
247
327
|
|
|
248
|
-
|
|
328
|
+
**TestAgent:**\nImplements comprehensive testing strategy across unit, integration, E2E, accessibility, and security testing.
|
|
249
329
|
|
|
250
|
-
-
|
|
251
|
-
- **`agents/rules/security.mdc`** - Security patterns, OWASP Top 10 protection
|
|
252
|
-
- **`agents/rules/testing.mdc`** - Testing strategy, coverage targets, patterns
|
|
253
|
-
- **`agents/rules/frontend.mdc`** - Frontend development patterns and accessibility
|
|
254
|
-
- **`agents/rules/database.mdc`** - Database schema design and query optimization
|
|
255
|
-
- **`agents/rules/style.mdc`** - Code style guidelines and formatting rules
|
|
330
|
+
**SecurityAgent:**\nEnsures security-first development with input validation, authentication patterns, authorization checks, and OWASP compliance.
|
|
256
331
|
|
|
257
|
-
|
|
332
|
+
**ReviewerAgent:**\nPerforms code reviews focusing on correctness, security, performance, test coverage, and accessibility.
|
|
333
|
+
|
|
334
|
+
## \ud83d\udd12 Agent-Based Development
|
|
258
335
|
|
|
259
336
|
This template uses specialized agents for different aspects of development:
|
|
260
337
|
|
|
@@ -309,7 +386,7 @@ Performs code reviews focusing on correctness, security, performance, test cover
|
|
|
309
386
|
|
|
310
387
|
```typescript
|
|
311
388
|
// TypeScript with Zod
|
|
312
|
-
|
|
389
|
+
imp\ud83d\udd12 ort { z } from 'zod'
|
|
313
390
|
|
|
314
391
|
const userSchema = z.object({
|
|
315
392
|
email: z.string().email().toLowerCase(),
|
|
@@ -345,7 +422,7 @@ const authLimiter = rateLimit({
|
|
|
345
422
|
- **Unit Tests**: 80% coverage for business logic
|
|
346
423
|
- **Integration Tests**: 15% coverage for API endpoints and database operations
|
|
347
424
|
- **E2E Tests**: 5% coverage for critical user journeys
|
|
348
|
-
|
|
425
|
+
\ud83e\uddea
|
|
349
426
|
### Testing Tools by Technology
|
|
350
427
|
|
|
351
428
|
**JavaScript/TypeScript:**
|
|
@@ -369,7 +446,7 @@ const authLimiter = rateLimit({
|
|
|
369
446
|
Rules are automatically loaded from:
|
|
370
447
|
- `.cursorrules` file
|
|
371
448
|
- `agents/rules/*.mdc` files with `alwaysApply: true`
|
|
372
|
-
-
|
|
449
|
+
- `\ud83e\udd16 AGENTS.md` and `CLAUDE.md` (via workspace rules)
|
|
373
450
|
|
|
374
451
|
### GitHub Copilot
|
|
375
452
|
Instructions are automatically loaded from:
|
|
@@ -381,7 +458,7 @@ Reference `AI_INSTRUCTIONS.md` explicitly in your prompts:
|
|
|
381
458
|
- "Check `AGENTS.md` for agent delegation"
|
|
382
459
|
- "Apply security patterns from `agents/rules/security.mdc`"
|
|
383
460
|
|
|
384
|
-
## Usage Examples
|
|
461
|
+
## \ud83d\udcdd Usage Examples
|
|
385
462
|
|
|
386
463
|
### Frontend Development
|
|
387
464
|
```
|
package/bin/cli.js
CHANGED
|
@@ -25,8 +25,8 @@ const program = new Command();
|
|
|
25
25
|
|
|
26
26
|
program
|
|
27
27
|
.name('agents-templated')
|
|
28
|
-
.description('Technology-agnostic development template with AI
|
|
29
|
-
.version('1.
|
|
28
|
+
.description('Technology-agnostic development template with multi-AI agent support')
|
|
29
|
+
.version('1.2.0');
|
|
30
30
|
|
|
31
31
|
program
|
|
32
32
|
.command('init')
|
|
@@ -105,7 +105,7 @@ program
|
|
|
105
105
|
{ name: 'Documentation files (AGENTS.MD, CLAUDE.md, etc.)', value: 'docs' },
|
|
106
106
|
{ name: 'Agent rules (agents/rules/*.mdc)', value: 'rules' },
|
|
107
107
|
{ name: 'Skills (agents/skills/*)', value: 'skills' },
|
|
108
|
-
{ name: '
|
|
108
|
+
{ name: 'AI Agent instructions (Cursor, Copilot, VSCode, Gemini)', value: 'github' }
|
|
109
109
|
],
|
|
110
110
|
default: ['all']
|
|
111
111
|
},
|
|
@@ -164,13 +164,20 @@ program
|
|
|
164
164
|
);
|
|
165
165
|
}
|
|
166
166
|
|
|
167
|
-
// Install
|
|
167
|
+
// Install AI Agent instructions (Cursor, Copilot, VSCode, Gemini)
|
|
168
168
|
if (installAll || choices.includes('github')) {
|
|
169
|
-
console.log(chalk.yellow('Installing
|
|
169
|
+
console.log(chalk.yellow('Installing AI agent instructions...'));
|
|
170
170
|
await fs.ensureDir(path.join(targetDir, '.github'));
|
|
171
171
|
await copyFiles(templateDir, targetDir, [
|
|
172
|
-
'.
|
|
172
|
+
'.cursorrules',
|
|
173
|
+
'.github/copilot-instructions.md',
|
|
174
|
+
'.vscode-ai-rules.md',
|
|
175
|
+
'.gemini-instructions.md'
|
|
173
176
|
], options.force);
|
|
177
|
+
console.log(chalk.gray(' ✓ Cursor (.cursorrules)'));
|
|
178
|
+
console.log(chalk.gray(' ✓ GitHub Copilot (.github/copilot-instructions.md)'));
|
|
179
|
+
console.log(chalk.gray(' ✓ VSCode (.vscode-ai-rules.md)'));
|
|
180
|
+
console.log(chalk.gray(' ✓ Google Gemini (.gemini-instructions.md)'));
|
|
174
181
|
}
|
|
175
182
|
|
|
176
183
|
console.log(chalk.green.bold('\nInstallation complete!\n'));
|
package/index.js
CHANGED
|
@@ -68,14 +68,32 @@ async function install(targetDir, options = {}) {
|
|
|
68
68
|
);
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
//
|
|
71
|
+
// AI Agent instructions (Cursor, Copilot, VSCode, Gemini)
|
|
72
72
|
if (installAll || options.github) {
|
|
73
73
|
await fs.ensureDir(path.join(targetDir, '.github'));
|
|
74
|
-
const sourcePath = path.join(templateDir, '.github', 'copilot-instructions.md');
|
|
75
|
-
const targetPath = path.join(targetDir, '.github', 'copilot-instructions.md');
|
|
76
74
|
|
|
77
|
-
|
|
78
|
-
|
|
75
|
+
// Copy all AI agent config files
|
|
76
|
+
const agentConfigs = [
|
|
77
|
+
'.cursorrules',
|
|
78
|
+
'.vscode-ai-rules.md',
|
|
79
|
+
'.gemini-instructions.md'
|
|
80
|
+
];
|
|
81
|
+
|
|
82
|
+
for (const config of agentConfigs) {
|
|
83
|
+
const sourcePath = path.join(templateDir, config);
|
|
84
|
+
const targetPath = path.join(targetDir, config);
|
|
85
|
+
|
|
86
|
+
if (await fs.pathExists(sourcePath)) {
|
|
87
|
+
await fs.copy(sourcePath, targetPath, { overwrite: options.force });
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// Copy GitHub Copilot instructions
|
|
92
|
+
const sourceGithubPath = path.join(templateDir, '.github', 'copilot-instructions.md');
|
|
93
|
+
const targetGithubPath = path.join(targetDir, '.github', 'copilot-instructions.md');
|
|
94
|
+
|
|
95
|
+
if (await fs.pathExists(sourceGithubPath)) {
|
|
96
|
+
await fs.copy(sourceGithubPath, targetGithubPath, { overwrite: options.force });
|
|
79
97
|
}
|
|
80
98
|
}
|
|
81
99
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agents-templated",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "Technology-agnostic development template with AI
|
|
3
|
+
"version": "1.2.0",
|
|
4
|
+
"description": "Technology-agnostic development template with multi-AI agent support (Cursor, Copilot, VSCode, Gemini), security-first patterns, and comprehensive testing guidelines",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
7
7
|
"agents-templated": "bin/cli.js"
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Cursor Rules - Technology-Agnostic Development Template
|
|
2
|
+
# This is a flexible development template that adapts to any technology stack with enterprise-grade patterns.
|
|
3
|
+
# Detailed rules are in agents/rules/*.mdc files - refer to those for implementation patterns.
|
|
4
|
+
|
|
5
|
+
## Developer Identity & Communication
|
|
6
|
+
- AI assistant should provide clear, step-by-step solutions with actionable examples
|
|
7
|
+
- Focus on security, performance, and maintainability in all recommendations
|
|
8
|
+
- Adapt patterns to the chosen technology stack
|
|
9
|
+
|
|
10
|
+
## Core Principles
|
|
11
|
+
- **Security-first development**: Always validate inputs, authenticate users, implement appropriate rate limiting
|
|
12
|
+
- **Type safety**: Use strong typing systems available in chosen language/framework
|
|
13
|
+
- **Performance optimization**: Monitor resource usage, implement caching, optimize assets
|
|
14
|
+
- **Testing strategy**: Comprehensive testing at unit, integration, and E2E levels
|
|
15
|
+
- **Accessibility**: WCAG 2.1 AA compliance for all user-facing interfaces
|
|
16
|
+
- **Documentation**: Keep project documentation updated and comprehensive
|
|
17
|
+
|
|
18
|
+
## Architecture Principles
|
|
19
|
+
- **Technology-agnostic**: This template adapts to your chosen stack
|
|
20
|
+
- **Security patterns**: Input validation, authentication, authorization, rate limiting
|
|
21
|
+
- **Performance patterns**: Caching, lazy loading, bundle optimization
|
|
22
|
+
- **Testing patterns**: Unit (80%), Integration (15%), E2E (5%) coverage target
|
|
23
|
+
- **Feature-oriented structure**: Group by domain/feature, not just technical layer
|
|
24
|
+
|
|
25
|
+
## Security Requirements (CRITICAL)
|
|
26
|
+
- **Input validation**: All user inputs MUST be validated with appropriate schema validation
|
|
27
|
+
- **Authentication**: Implement secure authentication flows with session management
|
|
28
|
+
- **Rate limiting**: Public endpoints MUST have rate limiting protection
|
|
29
|
+
- **Authorization**: Role-based access control with proper middleware
|
|
30
|
+
- **Error handling**: Never expose sensitive data in error responses
|
|
31
|
+
- **Database access**: Use ORM/ODM patterns, avoid raw queries unless performance-critical
|
|
32
|
+
|
|
33
|
+
## Code Quality Standards
|
|
34
|
+
- **Type Safety**: Use strict typing, avoid loose type usage
|
|
35
|
+
- **Performance**: Monitor bundle/binary size, implement lazy loading patterns
|
|
36
|
+
- **Accessibility**: WCAG 2.1 AA compliance for user-facing components
|
|
37
|
+
- **Testing**: All business logic and user flows must have appropriate tests
|
|
38
|
+
- **Documentation**: Keep README, CLAUDE.md, and AGENTS.md updated
|
|
39
|
+
|
|
40
|
+
## Technology Stack Adaptation
|
|
41
|
+
Choose your stack and apply these patterns consistently:
|
|
42
|
+
|
|
43
|
+
### Frontend Options
|
|
44
|
+
- **React/Next.js/Vue/Svelte**: Component-based with proper state management
|
|
45
|
+
- **Angular**: Component + service architecture with TypeScript
|
|
46
|
+
- **Traditional**: Server-side rendering with progressive enhancement
|
|
47
|
+
|
|
48
|
+
### Backend Options
|
|
49
|
+
- **Node.js**: Express, Fastify, or framework API routes
|
|
50
|
+
- **Python**: Django, FastAPI, Flask with proper ORM patterns
|
|
51
|
+
- **Other**: Adapt patterns to your chosen backend technology
|
|
52
|
+
|
|
53
|
+
### Database Options
|
|
54
|
+
- **SQL**: PostgreSQL, MySQL with ORM (Prisma, TypeORM, SQLAlchemy)
|
|
55
|
+
- **NoSQL**: MongoDB, DynamoDB with ODM patterns
|
|
56
|
+
- **Cloud**: Supabase, Firebase, managed database services
|
|
57
|
+
|
|
58
|
+
## Agent Delegation (See AGENTS.md for details)
|
|
59
|
+
- **UI/Design work** → FrontendAgent
|
|
60
|
+
- **API/Business logic** → BackendAgent
|
|
61
|
+
- **Database/Schema** → DatabaseAgent
|
|
62
|
+
- **Testing implementation** → TestAgent
|
|
63
|
+
- **Security reviews** → SecurityAgent
|
|
64
|
+
- **Code quality** → ReviewerAgent
|
|
65
|
+
|
|
66
|
+
## Usage Instructions
|
|
67
|
+
1. Choose your technology stack
|
|
68
|
+
2. Adapt the patterns in agents/rules/*.mdc to your chosen technologies
|
|
69
|
+
3. Update this .cursorrules file with stack-specific details
|
|
70
|
+
4. Begin development following the established patterns
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
# Google Gemini AI Instructions
|
|
2
|
+
|
|
3
|
+
This project uses enterprise-grade, technology-agnostic development patterns for all Google Gemini AI assistants, whether used through:
|
|
4
|
+
- Google AI Studio (aistudio.google.com)
|
|
5
|
+
- Gemini IDE extensions
|
|
6
|
+
- Gemini API integration
|
|
7
|
+
- Other Gemini-powered tools
|
|
8
|
+
|
|
9
|
+
## Quick Start
|
|
10
|
+
|
|
11
|
+
- **Project Guidelines**: See `CLAUDE.md`
|
|
12
|
+
- **Agent Patterns**: See `AGENTS.md`
|
|
13
|
+
- **Detailed Rules**: See `agents/rules/*.mdc` files
|
|
14
|
+
- **Available Skills**: See `agents/skills/` directory
|
|
15
|
+
|
|
16
|
+
## Core Development Patterns
|
|
17
|
+
|
|
18
|
+
Follow these enterprise-grade patterns for all development work:
|
|
19
|
+
|
|
20
|
+
### 1. Security-First Approach
|
|
21
|
+
- **Validate all inputs**: Use schema validation for all user inputs and API requests
|
|
22
|
+
- **Authentication**: Implement secure session management and authentication flows
|
|
23
|
+
- **Authorization**: Apply role-based access control with proper middleware
|
|
24
|
+
- **Rate limiting**: Protect public endpoints from abuse with appropriate rate limiting
|
|
25
|
+
- **Error handling**: Never expose sensitive data in error messages or logs
|
|
26
|
+
- **Database safety**: Use ORM/ODM patterns exclusively, avoid raw SQL queries
|
|
27
|
+
- Reference: `agents/rules/security.mdc`
|
|
28
|
+
|
|
29
|
+
### 2. Testing Requirements
|
|
30
|
+
- **Unit tests**: Target 80% coverage for business logic
|
|
31
|
+
- **Integration tests**: 15% coverage for API and database operations
|
|
32
|
+
- **E2E tests**: 5% coverage for critical user journeys
|
|
33
|
+
- All business logic must have appropriate test cases
|
|
34
|
+
- Reference: `agents/rules/testing.mdc`
|
|
35
|
+
|
|
36
|
+
### 3. Type Safety & Validation
|
|
37
|
+
- Use strong typing systems available in your language of choice
|
|
38
|
+
- Implement runtime validation at all API boundaries
|
|
39
|
+
- Apply schema validation to form inputs and API requests
|
|
40
|
+
- Reference: `agents/rules/core.mdc`
|
|
41
|
+
|
|
42
|
+
### 4. Code Quality Standards
|
|
43
|
+
- **Readability**: Clear variable names, proper documentation, logical organization
|
|
44
|
+
- **Type safety**: Strict typing throughout, no loose type usage
|
|
45
|
+
- **Performance**: Monitor resource usage, implement caching, optimize queries
|
|
46
|
+
- **Maintainability**: Modular design, separation of concerns, SOLID principles
|
|
47
|
+
- **Accessibility**: WCAG 2.1 AA compliance for all user-facing interfaces
|
|
48
|
+
- Reference: `agents/rules/style.mdc`
|
|
49
|
+
|
|
50
|
+
## Agent-Based Development
|
|
51
|
+
|
|
52
|
+
This project follows an agent-based pattern where different roles handle different aspects:
|
|
53
|
+
|
|
54
|
+
| Agent | Responsibility | Reference |
|
|
55
|
+
|-------|-----------------|-----------|
|
|
56
|
+
| **FrontendAgent** | UI/Design, components, accessibility, responsive layouts | `agents/rules/frontend.mdc` |
|
|
57
|
+
| **BackendAgent** | API routes, business logic, authentication, services | `agents/rules/security.mdc` |
|
|
58
|
+
| **DatabaseAgent** | Schema design, migrations, data access, optimization | `agents/rules/database.mdc` |
|
|
59
|
+
| **TestAgent** | Testing strategy, coverage, test organization | `agents/rules/testing.mdc` |
|
|
60
|
+
| **SecurityAgent** | Security patterns, validation, rate limiting, access control | `agents/rules/security.mdc` |
|
|
61
|
+
| **ReviewerAgent** | Code quality, performance, accessibility, architecture | All rules |
|
|
62
|
+
|
|
63
|
+
When implementing features, identify which agent responsibility applies and refer to the appropriate rules file.
|
|
64
|
+
|
|
65
|
+
## Technology Stack Independence
|
|
66
|
+
|
|
67
|
+
These patterns apply regardless of your tech stack. Adapt them to your chosen framework:
|
|
68
|
+
|
|
69
|
+
### Frontend Frameworks
|
|
70
|
+
- **React/Next.js/Vue/Svelte**: Component-based architecture with state management
|
|
71
|
+
- **Angular**: Component + service pattern with TypeScript
|
|
72
|
+
- **Traditional/Server-rendered**: Progressive enhancement with server-side rendering
|
|
73
|
+
|
|
74
|
+
### Backend Frameworks
|
|
75
|
+
- **Node.js**: Express, Fastify, Koa, or Next.js API routes
|
|
76
|
+
- **Python**: Django, FastAPI, Flask with ORM patterns
|
|
77
|
+
- **Go**: Gin, Echo, Fiber for high-performance APIs
|
|
78
|
+
- **Other languages**: Apply patterns to your chosen framework
|
|
79
|
+
|
|
80
|
+
### Database Technologies
|
|
81
|
+
- **SQL**: PostgreSQL, MySQL, SQLite with ORM (Prisma, TypeORM, SQLAlchemy, etc.)
|
|
82
|
+
- **NoSQL**: MongoDB, DynamoDB with schema validation
|
|
83
|
+
- **Cloud-native**: Supabase, Firebase with built-in security
|
|
84
|
+
|
|
85
|
+
## Critical Rules (Never Skip These)
|
|
86
|
+
|
|
87
|
+
1. **Input Validation**: ALL user inputs must be validated with schema validation libraries
|
|
88
|
+
2. **Authentication**: Implement secure authentication with proper session management
|
|
89
|
+
3. **Rate Limiting**: Public endpoints MUST have rate limiting to prevent abuse
|
|
90
|
+
4. **Authorization**: Role-based access control with verified permissions
|
|
91
|
+
5. **Data Safety**: Never expose sensitive information in error responses
|
|
92
|
+
6. **Database Access**: Use ORM/ODM exclusively, never raw queries for user data
|
|
93
|
+
7. **Test Coverage**: Minimum 80% coverage for business logic
|
|
94
|
+
8. **Accessibility**: WCAG 2.1 AA compliance for all user interfaces
|
|
95
|
+
9. **Documentation**: Keep guides updated; code should be self-documenting
|
|
96
|
+
10. **Performance**: Monitor metrics, implement caching, optimize critical paths
|
|
97
|
+
|
|
98
|
+
## File Reference Guide
|
|
99
|
+
|
|
100
|
+
| File | Purpose | When to Use |
|
|
101
|
+
|------|---------|------------|
|
|
102
|
+
| `CLAUDE.md` | Architecture and technology stack decisions | Need architectural guidance |
|
|
103
|
+
| `AGENTS.md` | Agent responsibilities and delegation | Deciding who should implement a feature |
|
|
104
|
+
| `agents/rules/core.mdc` | Core development principles | General development questions |
|
|
105
|
+
| `agents/rules/security.mdc` | Security patterns and implementations | Building secure features |
|
|
106
|
+
| `agents/rules/testing.mdc` | Testing strategy and best practices | Writing tests or test strategy |
|
|
107
|
+
| `agents/rules/frontend.mdc` | Frontend patterns and components | Building UI features |
|
|
108
|
+
| `agents/rules/database.mdc` | Database and data access patterns | Working with data layers |
|
|
109
|
+
| `agents/rules/style.mdc` | Code style and formatting | Code style questions |
|
|
110
|
+
| `agents/skills/` | Domain-specific implementations | Looking for reusable patterns |
|
|
111
|
+
|
|
112
|
+
## Workflow Recommendations
|
|
113
|
+
|
|
114
|
+
1. **Read CLAUDE.md** first to understand the overall architecture
|
|
115
|
+
2. **Check AGENTS.md** to identify which agent should lead the implementation
|
|
116
|
+
3. **Reference the appropriate rule file** for implementation patterns
|
|
117
|
+
4. **Look in agents/skills/** for domain-specific guidance
|
|
118
|
+
5. **Follow all critical rules** without exception
|
|
119
|
+
6. **Apply patterns consistently** across the codebase
|
|
120
|
+
|
|
121
|
+
## Additional Context
|
|
122
|
+
|
|
123
|
+
- This template is **completely technology-agnostic** and works with any programming language
|
|
124
|
+
- All patterns are **framework and language-independent**
|
|
125
|
+
- The rules can be adapted to your specific tech stack while maintaining the security and quality principles
|
|
126
|
+
- Skills in `agents/skills/` provide specific, actionable implementations
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
For best results with Gemini AI assistance, reference the appropriate rules files and provide the relevant context from `CLAUDE.md` and `AGENTS.md` in your prompts.
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# VSCode AI Rules
|
|
2
|
+
|
|
3
|
+
This project uses enterprise-grade, technology-agnostic development patterns for all AI-powered development tools in VSCode, including:
|
|
4
|
+
- GitHub Copilot Chat
|
|
5
|
+
- IntelliCode
|
|
6
|
+
- Other VSCode AI extensions
|
|
7
|
+
|
|
8
|
+
## Quick References
|
|
9
|
+
|
|
10
|
+
- **Project Guidelines**: See `CLAUDE.md`
|
|
11
|
+
- **Agent Patterns**: See `AGENTS.md`
|
|
12
|
+
- **Detailed Rules**: See `agents/rules/*.mdc` files
|
|
13
|
+
- **Available Skills**: See `agents/skills/` directory
|
|
14
|
+
|
|
15
|
+
## Core Rules for VSCode AI Assistants
|
|
16
|
+
|
|
17
|
+
### 1. Security-First Development
|
|
18
|
+
- Validate ALL user inputs with appropriate schema validation
|
|
19
|
+
- Implement secure authentication flows with proper session management
|
|
20
|
+
- Apply rate limiting to public API endpoints
|
|
21
|
+
- Use role-based access control for authorization
|
|
22
|
+
- Never expose sensitive data in error responses or logs
|
|
23
|
+
- Reference: `agents/rules/security.mdc`
|
|
24
|
+
|
|
25
|
+
### 2. Testing Strategy
|
|
26
|
+
- Unit tests: 80% coverage of business logic
|
|
27
|
+
- Integration tests: 15% coverage of API/database interactions
|
|
28
|
+
- E2E tests: 5% coverage of critical user journeys
|
|
29
|
+
- All business logic must have appropriate tests
|
|
30
|
+
- Reference: `agents/rules/testing.mdc`
|
|
31
|
+
|
|
32
|
+
### 3. Type Safety & Validation
|
|
33
|
+
- Use strong typing available in your chosen language
|
|
34
|
+
- Implement runtime validation at API boundaries
|
|
35
|
+
- Apply schema validation to all form inputs and API requests
|
|
36
|
+
- Reference: `agents/rules/core.mdc`
|
|
37
|
+
|
|
38
|
+
## Agent Delegation Pattern
|
|
39
|
+
|
|
40
|
+
When implementing features, follow the agent patterns from `AGENTS.md`:
|
|
41
|
+
|
|
42
|
+
- **FrontendAgent**: UI/Design components, accessibility, responsive layouts
|
|
43
|
+
- **BackendAgent**: API routes, business logic, authentication
|
|
44
|
+
- **DatabaseAgent**: Schema design, migrations, data access patterns
|
|
45
|
+
- **TestAgent**: Testing strategy, coverage, test organization
|
|
46
|
+
- **SecurityAgent**: Security patterns, input validation, access control
|
|
47
|
+
- **ReviewerAgent**: Code quality, performance, accessibility compliance
|
|
48
|
+
|
|
49
|
+
## Technology Stack Adaptation
|
|
50
|
+
|
|
51
|
+
These rules apply regardless of your chosen tech stack. Adapt them to your specific framework:
|
|
52
|
+
|
|
53
|
+
### Frontend
|
|
54
|
+
- **React/Next.js/Vue/Svelte**: Component-based with proper state management
|
|
55
|
+
- **Angular**: Component + service architecture
|
|
56
|
+
- **Traditional**: Server-side rendering with progressive enhancement
|
|
57
|
+
|
|
58
|
+
### Backend
|
|
59
|
+
- **Node.js**: Express, Fastify, or framework-specific patterns
|
|
60
|
+
- **Python**: Django, FastAPI, Flask with ORM patterns
|
|
61
|
+
- **Go**: Gin, Echo, or similar frameworks
|
|
62
|
+
- **Other**: Adapt patterns to your chosen framework
|
|
63
|
+
|
|
64
|
+
### Database
|
|
65
|
+
- **SQL**: PostgreSQL, MySQL with ORM/migrations
|
|
66
|
+
- **NoSQL**: MongoDB, DynamoDB with document validation
|
|
67
|
+
- **Cloud**: Firebase, Supabase with row-level security
|
|
68
|
+
|
|
69
|
+
## Critical Rules (MUST FOLLOW)
|
|
70
|
+
|
|
71
|
+
1. **Input Validation**: ALL user inputs must be validated with schema validation
|
|
72
|
+
2. **Authentication**: Implement secure, tested authentication flows
|
|
73
|
+
3. **Rate Limiting**: Public endpoints MUST have rate limiting
|
|
74
|
+
4. **Authorization**: Role-based access control with proper checks
|
|
75
|
+
5. **Error Handling**: Never expose sensitive information in errors
|
|
76
|
+
6. **Database**: Use ORM/ODM patterns, avoid raw queries
|
|
77
|
+
7. **Testing**: All business logic must have appropriate test coverage
|
|
78
|
+
8. **Accessibility**: WCAG 2.1 AA compliance for user-facing components
|
|
79
|
+
9. **Documentation**: Keep README, CLAUDE.md, and AGENTS.md updated
|
|
80
|
+
10. **Performance**: Monitor bundle size, implement lazy loading, optimize assets
|
|
81
|
+
|
|
82
|
+
## Code Quality Standards
|
|
83
|
+
|
|
84
|
+
- **Type Safety**: Strict typing, no loose type usage
|
|
85
|
+
- **Readability**: Clear names, proper documentation, logical organization
|
|
86
|
+
- **Performance**: Efficient algorithms, appropriate caching
|
|
87
|
+
- **Maintainability**: Modular design, separation of concerns, SOLID principles
|
|
88
|
+
|
|
89
|
+
## When to Reference Each File
|
|
90
|
+
|
|
91
|
+
- **CLAUDE.md**: For architecture decisions and technology stack guidance
|
|
92
|
+
- **AGENTS.md**: For agent responsibilities and when to delegate
|
|
93
|
+
- **agents/rules/*.mdc**: For specific implementation patterns:
|
|
94
|
+
- `core.mdc`: Core principles and architecture
|
|
95
|
+
- `security.mdc`: Security patterns and best practices
|
|
96
|
+
- `testing.mdc`: Testing strategy and patterns
|
|
97
|
+
- `frontend.mdc`: Frontend development patterns
|
|
98
|
+
- `database.mdc`: Database and data access patterns
|
|
99
|
+
- `style.mdc`: Code style and formatting guidelines
|
|
100
|
+
- **agents/skills/**: For reusable domain-specific implementations
|
|
101
|
+
|
|
102
|
+
## For More Information
|
|
103
|
+
|
|
104
|
+
Explore the `agents/skills/` directory for domain-specific guidance on common tasks:
|
|
105
|
+
- Each skill provides specific, actionable guidance
|
|
106
|
+
- Reference skills when implementing similar features
|
|
107
|
+
- Skills build on the core rules above
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
All AI assistants in VSCode should follow these rules consistently to maintain code quality, security, and maintainability across the project.
|
|
@@ -17,6 +17,7 @@ When implementing features, always check the relevant rule file:
|
|
|
17
17
|
- **`agents/rules/frontend.mdc`** - Frontend development patterns, component architecture, accessibility
|
|
18
18
|
- **`agents/rules/database.mdc`** - Database schema design, migrations, query optimization
|
|
19
19
|
- **`agents/rules/style.mdc`** - Code style guidelines, formatting rules, naming conventions
|
|
20
|
+
- **`agents/rules/workflows.mdc`** - Development workflow (validate, doctor, pre-commit)
|
|
20
21
|
|
|
21
22
|
## Usage Workflow
|
|
22
23
|
|
package/templates/CLAUDE.md
CHANGED
|
@@ -4,7 +4,7 @@ This is a **technology-agnostic development template** with enterprise-grade pat
|
|
|
4
4
|
These guidelines are for both humans and AI assistants working with any technology stack.
|
|
5
5
|
|
|
6
6
|
- High-level **project and architecture** guidelines live here in `CLAUDE.md`.
|
|
7
|
-
- **Agent responsibilities** and MCP integration are documented in `AGENTS.
|
|
7
|
+
- **Agent responsibilities** and MCP integration are documented in `AGENTS.MD`.
|
|
8
8
|
- **Detailed implementation rules** live in `agents/rules/*.mdc` files.
|
|
9
9
|
|
|
10
10
|
Read this file first to understand the architecture, then consult `AGENTS.md` for agent delegation.
|
|
@@ -234,7 +234,7 @@ Review the options above and select technologies that fit your:
|
|
|
234
234
|
- Set up deployment pipelines and environment management
|
|
235
235
|
|
|
236
236
|
### 4. Follow Agent Patterns
|
|
237
|
-
- Use the agents defined in `AGENTS.
|
|
237
|
+
- Use the agents defined in `AGENTS.MD` for specialized tasks
|
|
238
238
|
- Maintain consistency with established patterns
|
|
239
239
|
- Regular code reviews using `ReviewerAgent` patterns
|
|
240
240
|
- Document architectural decisions as you build
|
|
@@ -255,4 +255,7 @@ Review the options above and select technologies that fit your:
|
|
|
255
255
|
- **Security patches**: Immediate application of critical security updates
|
|
256
256
|
- **Performance improvements**: Adoption of new optimization techniques
|
|
257
257
|
|
|
258
|
+
### How We Improve This Package (Maintainers)
|
|
259
|
+
When improving the agents-templated package itself, maintainers use **NotebookLM** (research and best-practice discourse) and **Context7** (up-to-date library and framework docs) to gather insights. Use both to improve the **system itself**—templates, rules, and skills—by querying Cursor rules best practices, agent-rules patterns, and template/scaffolding guides, then refining rules, skills, and template content. Run the audit dimensions (docs, rules, CLI, presets, validate/doctor, tests), prioritize changes, then validate with `agents-templated validate` and `doctor`. See the README section "Improvement and Maintenance" for the full process.
|
|
260
|
+
|
|
258
261
|
This template provides a solid foundation while remaining flexible for any technology stack you choose to implement.
|
package/templates/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
# Technology-Agnostic Development Template
|
|
2
2
|
|
|
3
3
|
This template has been installed by the agents-templated npm package.
|
|
4
4
|
|
|
@@ -31,6 +31,11 @@ agents-templated init --github # GitHub Copilot config only
|
|
|
31
31
|
agents-templated list
|
|
32
32
|
```
|
|
33
33
|
|
|
34
|
+
## Rules and Skills
|
|
35
|
+
|
|
36
|
+
- **Rules** (`agents/rules/*.mdc`): Markdown files with YAML frontmatter (`description`, `globs`, `alwaysApply`). Cursor and other tools use them to know when to apply each rule. Adapt the content to your stack.
|
|
37
|
+
- **Skills** (`agents/skills/*/SKILL.md`): Extend agent capabilities (e.g. find-skills, web-design-guidelines). Each has a name, description, and when to use.
|
|
38
|
+
|
|
34
39
|
## Getting Started
|
|
35
40
|
|
|
36
41
|
1. Review CLAUDE.md for overall project guidelines
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
2
|
title: "Core Project Guidelines"
|
|
3
3
|
description: "Enterprise-grade architecture and best practices for technology-agnostic development"
|
|
4
4
|
alwaysApply: true
|
|
@@ -151,6 +151,14 @@ This template is technology-agnostic. Choose your stack based on:
|
|
|
151
151
|
- **Feature adoption** - stay current with language/framework improvements
|
|
152
152
|
- **Deprecation management** - handle deprecated APIs and patterns
|
|
153
153
|
|
|
154
|
+
## Documentation and Research
|
|
155
|
+
|
|
156
|
+
When deciding what to recommend or implement:
|
|
157
|
+
|
|
158
|
+
- **Local rules** (this file and other `agents/rules/*.mdc`): Use as the primary source for architecture, security, testing, and style. Follow these when the stack is generic or already covered.
|
|
159
|
+
- **Context7 MCP**: Use for **up-to-date library and framework documentation**. When suggesting or implementing patterns for a specific stack (e.g. Next.js, Express, React), query Context7 (`resolve-library-id` then `query-docs`) so recommendations match current APIs and official guidance.
|
|
160
|
+
- **NotebookLM MCP**: Use for **research and best-practice discourse** (e.g. OWASP, building-systems advice, template design). Query when adding or changing guidelines, or when the audit/planning needs external best practices. Not for real-time API docs—use Context7 for that.
|
|
161
|
+
|
|
154
162
|
## Communication & Collaboration
|
|
155
163
|
|
|
156
164
|
- When providing solutions, be explicit about what to change
|
|
@@ -162,4 +170,4 @@ This template is technology-agnostic. Choose your stack based on:
|
|
|
162
170
|
---
|
|
163
171
|
|
|
164
172
|
Remember: This template adapts to **any modern technology stack** while maintaining **enterprise-grade quality standards**.
|
|
165
|
-
Choose your technologies wisely, apply these principles consistently, and keep your codebase maintainable.
|
|
173
|
+
Choose your technologies wisely, apply these principles consistently, and keep your codebase maintainable.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Development Workflow Guidelines"
|
|
3
|
+
description: "Optional development workflow: project health checks and pre-commit quality gates"
|
|
4
|
+
alwaysApply: false
|
|
5
|
+
version: "1.0.0"
|
|
6
|
+
tags: ["workflow", "quality", "validation", "commit"]
|
|
7
|
+
globs:
|
|
8
|
+
- "**/*"
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Development Workflow Guidelines
|
|
12
|
+
|
|
13
|
+
Technology-agnostic suggestions for keeping the project healthy and maintaining quality before commits.
|
|
14
|
+
|
|
15
|
+
## When This Rule Applies
|
|
16
|
+
|
|
17
|
+
Use this guidance when the user asks about workflow, pre-commit checks, or keeping the project validated. Do not force these steps on every change—treat them as recommended practices.
|
|
18
|
+
|
|
19
|
+
## Project Health (agents-templated)
|
|
20
|
+
|
|
21
|
+
If this project was scaffolded with agents-templated:
|
|
22
|
+
|
|
23
|
+
- **Periodically**: Run `agents-templated validate` to ensure required docs and rules are present; run `agents-templated doctor` for environment and configuration recommendations.
|
|
24
|
+
- **After pulling template updates**: Run `agents-templated update --check-only` to see available updates, then `agents-templated update` if you want to apply them (with backup).
|
|
25
|
+
|
|
26
|
+
These commands help keep agent rules, documentation, and security patterns in sync.
|
|
27
|
+
|
|
28
|
+
## Pre-Commit Quality Gates
|
|
29
|
+
|
|
30
|
+
Before committing, consider running (in order):
|
|
31
|
+
|
|
32
|
+
1. **Lint** – Your stack’s linter (e.g. ESLint, Pylint, golangci-lint) to catch style and simple issues.
|
|
33
|
+
2. **Type check** – If applicable (TypeScript, mypy, etc.) to catch type errors.
|
|
34
|
+
3. **Tests** – At least the fast test suite (e.g. unit tests) so regressions are caught early.
|
|
35
|
+
4. **Project validation** – For agents-templated projects, `agents-templated validate` can confirm setup is intact.
|
|
36
|
+
|
|
37
|
+
Do not commit with failing lint or tests unless the user explicitly requests a WIP commit (e.g. with `--no-verify` or a clear “work in progress” message).
|
|
38
|
+
|
|
39
|
+
## Commit Messages
|
|
40
|
+
|
|
41
|
+
- Prefer clear, descriptive messages (e.g. conventional commits: `feat:`, `fix:`, `docs:`).
|
|
42
|
+
- Reference issues or tickets when relevant (e.g. “Closes #123”).
|
|
43
|
+
- Keep the body focused on what changed and why, not how.
|
|
44
|
+
|
|
45
|
+
## Summary
|
|
46
|
+
|
|
47
|
+
- Use **agents-templated validate** and **doctor** to maintain project setup and get recommendations.
|
|
48
|
+
- Run **lint**, **type check**, and **tests** before committing when possible.
|
|
49
|
+
- Write clear commit messages and reference issues where applicable.
|