agents-templated 1.2.0 → 1.2.2
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 +246 -383
- package/bin/cli.js +47 -36
- package/index.js +7 -7
- package/package.json +1 -1
- package/templates/.cursorrules +2 -2
- package/templates/.github/copilot-instructions.md +7 -5
- package/templates/CLAUDE.md +40 -245
- package/templates/{.gemini-instructions.md → GEMINI.md} +10 -7
- package/templates/README.md +359 -30
- package/templates/{AI_INSTRUCTIONS.md → agent-docs/AI_INSTRUCTIONS.md} +4 -4
- package/templates/agent-docs/ARCHITECTURE.md +261 -0
- package/templates/agent-docs/README.md +53 -0
- package/templates/.vscode-ai-rules.md +0 -111
- /package/templates/{AGENTS.MD → agent-docs/AGENTS.MD} +0 -0
package/bin/cli.js
CHANGED
|
@@ -26,7 +26,7 @@ const program = new Command();
|
|
|
26
26
|
program
|
|
27
27
|
.name('agents-templated')
|
|
28
28
|
.description('Technology-agnostic development template with multi-AI agent support')
|
|
29
|
-
.version('1.2.
|
|
29
|
+
.version('1.2.1');
|
|
30
30
|
|
|
31
31
|
program
|
|
32
32
|
.command('init')
|
|
@@ -102,7 +102,7 @@ program
|
|
|
102
102
|
message: 'Select components to install:',
|
|
103
103
|
choices: [
|
|
104
104
|
{ name: 'All components', value: 'all' },
|
|
105
|
-
{ name: 'Documentation files (
|
|
105
|
+
{ name: 'Documentation files (agent-docs/)', value: 'docs' },
|
|
106
106
|
{ name: 'Agent rules (agents/rules/*.mdc)', value: 'rules' },
|
|
107
107
|
{ name: 'Skills (agents/skills/*)', value: 'skills' },
|
|
108
108
|
{ name: 'AI Agent instructions (Cursor, Copilot, VSCode, Gemini)', value: 'github' }
|
|
@@ -134,12 +134,10 @@ program
|
|
|
134
134
|
// Install documentation files
|
|
135
135
|
if (installAll || choices.includes('docs')) {
|
|
136
136
|
console.log(chalk.yellow('Installing documentation files...'));
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
'README.md'
|
|
142
|
-
], options.force);
|
|
137
|
+
const sourceDir = path.join(templateDir, 'agent-docs');
|
|
138
|
+
const targetDir = path.join(targetDir, 'agent-docs');
|
|
139
|
+
await fs.ensureDir(targetDir);
|
|
140
|
+
await copyDirectory(sourceDir, targetDir, options.force);
|
|
143
141
|
}
|
|
144
142
|
|
|
145
143
|
// Install agent rules
|
|
@@ -182,10 +180,11 @@ program
|
|
|
182
180
|
|
|
183
181
|
console.log(chalk.green.bold('\nInstallation complete!\n'));
|
|
184
182
|
console.log(chalk.cyan('Next steps:'));
|
|
185
|
-
|
|
186
|
-
console.log(chalk.white(' 2. Review
|
|
187
|
-
console.log(chalk.white(' 3.
|
|
188
|
-
console.log(chalk.white(' 4.
|
|
183
|
+
console.log(chalk.white(' 1. Review agent-docs/AI_INSTRUCTIONS.md for AI assistance guide'));
|
|
184
|
+
console.log(chalk.white(' 2. Review agent-docs/ARCHITECTURE.md for project guidelines'));
|
|
185
|
+
console.log(chalk.white(' 3. Review agent-docs/AGENTS.MD for agent patterns'));
|
|
186
|
+
console.log(chalk.white(' 4. Configure your AI assistant (Cursor, Copilot, etc.)'));
|
|
187
|
+
console.log(chalk.white(' 5. Adapt the rules to your technology stack\n'));
|
|
189
188
|
|
|
190
189
|
} catch (error) {
|
|
191
190
|
console.error(chalk.red('Error:'), error.message);
|
|
@@ -284,10 +283,10 @@ program
|
|
|
284
283
|
name: 'components',
|
|
285
284
|
message: 'Select components to install:',
|
|
286
285
|
choices: [
|
|
287
|
-
{ name: 'Documentation (
|
|
286
|
+
{ name: 'Documentation (agent-docs/)', value: 'docs', checked: true },
|
|
288
287
|
{ name: 'Agent Rules (security, testing, database, etc.)', value: 'rules', checked: true },
|
|
289
288
|
{ name: 'Skills (reusable agent capabilities)', value: 'skills', checked: true },
|
|
290
|
-
{ name: '
|
|
289
|
+
{ name: 'AI Agent instructions (Cursor, Copilot, VSCode, Gemini)', value: 'github', checked: true }
|
|
291
290
|
],
|
|
292
291
|
validate: (answer) => {
|
|
293
292
|
if (answer.length === 0) {
|
|
@@ -319,12 +318,10 @@ program
|
|
|
319
318
|
// Install documentation files
|
|
320
319
|
if (options.docs) {
|
|
321
320
|
console.log(chalk.yellow('Installing documentation files...'));
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
'README.md'
|
|
327
|
-
], options.force);
|
|
321
|
+
const sourceDocsDir = path.join(templateDir, 'agent-docs');
|
|
322
|
+
const targetDocsDir = path.join(targetDir, 'agent-docs');
|
|
323
|
+
await fs.ensureDir(targetDocsDir);
|
|
324
|
+
await copyDirectory(sourceDocsDir, targetDocsDir, options.force);
|
|
328
325
|
}
|
|
329
326
|
|
|
330
327
|
// Install agent rules
|
|
@@ -349,13 +346,20 @@ program
|
|
|
349
346
|
);
|
|
350
347
|
}
|
|
351
348
|
|
|
352
|
-
// Install
|
|
349
|
+
// Install AI Agent instructions (Cursor, Copilot, VSCode, Gemini)
|
|
353
350
|
if (options.github) {
|
|
354
|
-
console.log(chalk.yellow('Installing
|
|
351
|
+
console.log(chalk.yellow('Installing AI agent instructions...'));
|
|
355
352
|
await fs.ensureDir(path.join(targetDir, '.github'));
|
|
356
353
|
await copyFiles(templateDir, targetDir, [
|
|
357
|
-
'.
|
|
354
|
+
'.cursorrules',
|
|
355
|
+
'.github/copilot-instructions.md',
|
|
356
|
+
'.vscode-ai-rules.md',
|
|
357
|
+
'.gemini-instructions.md'
|
|
358
358
|
], options.force);
|
|
359
|
+
console.log(chalk.gray(' ✓ Cursor (.cursorrules)'));
|
|
360
|
+
console.log(chalk.gray(' ✓ GitHub Copilot (.github/copilot-instructions.md)'));
|
|
361
|
+
console.log(chalk.gray(' ✓ VSCode (.vscode-ai-rules.md)'));
|
|
362
|
+
console.log(chalk.gray(' ✓ Google Gemini (.gemini-instructions.md)'));
|
|
359
363
|
}
|
|
360
364
|
|
|
361
365
|
// Step 4: Show recommendations
|
|
@@ -367,8 +371,9 @@ program
|
|
|
367
371
|
if (techStack.database) console.log(chalk.white(` Database: ${techStack.database}`));
|
|
368
372
|
|
|
369
373
|
console.log(chalk.cyan('\n📚 Next Steps:\n'));
|
|
370
|
-
console.log(chalk.white(' 1. Review
|
|
371
|
-
console.log(chalk.white(' 2. Review
|
|
374
|
+
console.log(chalk.white(' 1. Review agent-docs/AI_INSTRUCTIONS.md for AI assistance guide'));
|
|
375
|
+
console.log(chalk.white(' 2. Review agent-docs/ARCHITECTURE.md for project guidelines'));
|
|
376
|
+
console.log(chalk.white(' 3. Review agent-docs/AGENTS.MD for agent patterns'));
|
|
372
377
|
console.log(chalk.white(' 3. Customize agents/rules/*.mdc for your tech stack'));
|
|
373
378
|
|
|
374
379
|
if (techStack.frontend || techStack.backend) {
|
|
@@ -418,10 +423,10 @@ program
|
|
|
418
423
|
.description('List available components and presets')
|
|
419
424
|
.action(() => {
|
|
420
425
|
console.log(chalk.blue.bold('\nAvailable Components:\n'));
|
|
421
|
-
console.log(chalk.yellow('docs') + ' - Documentation files (
|
|
426
|
+
console.log(chalk.yellow('docs') + ' - Documentation files (agent-docs/ directory)');
|
|
422
427
|
console.log(chalk.yellow('rules') + ' - Agent rules (core, database, frontend, security, testing, style)');
|
|
423
428
|
console.log(chalk.yellow('skills') + ' - Agent skills (find-skills, web-design-guidelines)');
|
|
424
|
-
console.log(chalk.yellow('github') + ' -
|
|
429
|
+
console.log(chalk.yellow('github') + ' - AI Agent instructions (Cursor, Copilot, VSCode, Gemini)');
|
|
425
430
|
console.log(chalk.yellow('all') + ' - All components');
|
|
426
431
|
|
|
427
432
|
console.log(chalk.blue.bold('\n\nAvailable Presets:\n'));
|
|
@@ -447,13 +452,19 @@ program
|
|
|
447
452
|
let passed = [];
|
|
448
453
|
|
|
449
454
|
// Check documentation files
|
|
450
|
-
const docFiles = ['AGENTS.MD', '
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
455
|
+
const docFiles = ['AGENTS.MD', 'ARCHITECTURE.md', 'AI_INSTRUCTIONS.md'];
|
|
456
|
+
const docsDir = path.join(targetDir, 'agent-docs');
|
|
457
|
+
|
|
458
|
+
if (await fs.pathExists(docsDir)) {
|
|
459
|
+
for (const file of docFiles) {
|
|
460
|
+
if (await fs.pathExists(path.join(docsDir, file))) {
|
|
461
|
+
passed.push(`✓ agent-docs/${file} found`);
|
|
462
|
+
} else {
|
|
463
|
+
warnings.push(`⚠ agent-docs/${file} missing`);
|
|
464
|
+
}
|
|
456
465
|
}
|
|
466
|
+
} else {
|
|
467
|
+
warnings.push(`⚠ agent-docs directory missing - run 'agents-templated init --docs'`);
|
|
457
468
|
}
|
|
458
469
|
|
|
459
470
|
// Check agent rules
|
|
@@ -644,9 +655,9 @@ program
|
|
|
644
655
|
// List potential updates
|
|
645
656
|
const updates = [];
|
|
646
657
|
const checkFiles = [
|
|
647
|
-
{ file: 'AGENTS.MD', component: 'docs' },
|
|
648
|
-
{ file: '
|
|
649
|
-
{ file: 'AI_INSTRUCTIONS.md', component: 'docs' },
|
|
658
|
+
{ file: 'agent-docs/AGENTS.MD', component: 'docs' },
|
|
659
|
+
{ file: 'agent-docs/ARCHITECTURE.md', component: 'docs' },
|
|
660
|
+
{ file: 'agent-docs/AI_INSTRUCTIONS.md', component: 'docs' },
|
|
650
661
|
{ file: 'agents/rules/security.mdc', component: 'rules' },
|
|
651
662
|
{ file: 'agents/rules/testing.mdc', component: 'rules' },
|
|
652
663
|
{ file: 'agents/rules/core.mdc', component: 'rules' },
|
package/index.js
CHANGED
|
@@ -26,10 +26,10 @@ async function install(targetDir, options = {}) {
|
|
|
26
26
|
// Documentation files
|
|
27
27
|
if (installAll || options.docs) {
|
|
28
28
|
files.push(
|
|
29
|
-
'AGENTS.MD',
|
|
30
|
-
'
|
|
31
|
-
'AI_INSTRUCTIONS.md',
|
|
32
|
-
'README.md'
|
|
29
|
+
'agent-docs/AGENTS.MD',
|
|
30
|
+
'agent-docs/ARCHITECTURE.md',
|
|
31
|
+
'agent-docs/AI_INSTRUCTIONS.md',
|
|
32
|
+
'agent-docs/README.md'
|
|
33
33
|
);
|
|
34
34
|
}
|
|
35
35
|
|
|
@@ -68,15 +68,15 @@ async function install(targetDir, options = {}) {
|
|
|
68
68
|
);
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
// AI Agent instructions (Cursor, Copilot,
|
|
71
|
+
// AI Agent instructions (Cursor, Copilot, Claude, Gemini)
|
|
72
72
|
if (installAll || options.github) {
|
|
73
73
|
await fs.ensureDir(path.join(targetDir, '.github'));
|
|
74
74
|
|
|
75
75
|
// Copy all AI agent config files
|
|
76
76
|
const agentConfigs = [
|
|
77
77
|
'.cursorrules',
|
|
78
|
-
'.
|
|
79
|
-
'.
|
|
78
|
+
'CLAUDE.md',
|
|
79
|
+
'GEMINI.md'
|
|
80
80
|
];
|
|
81
81
|
|
|
82
82
|
for (const config of agentConfigs) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agents-templated",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
4
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": {
|
package/templates/.cursorrules
CHANGED
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
- **Performance**: Monitor bundle/binary size, implement lazy loading patterns
|
|
36
36
|
- **Accessibility**: WCAG 2.1 AA compliance for user-facing components
|
|
37
37
|
- **Testing**: All business logic and user flows must have appropriate tests
|
|
38
|
-
- **Documentation**: Keep README,
|
|
38
|
+
- **Documentation**: Keep README, agent-docs/ARCHITECTURE.md, and agent-docs/AGENTS.md updated
|
|
39
39
|
|
|
40
40
|
## Technology Stack Adaptation
|
|
41
41
|
Choose your stack and apply these patterns consistently:
|
|
@@ -55,7 +55,7 @@ Choose your stack and apply these patterns consistently:
|
|
|
55
55
|
- **NoSQL**: MongoDB, DynamoDB with ODM patterns
|
|
56
56
|
- **Cloud**: Supabase, Firebase, managed database services
|
|
57
57
|
|
|
58
|
-
## Agent Delegation (See AGENTS.md for details)
|
|
58
|
+
## Agent Delegation (See agent-docs/AGENTS.md for details)
|
|
59
59
|
- **UI/Design work** → FrontendAgent
|
|
60
60
|
- **API/Business logic** → BackendAgent
|
|
61
61
|
- **Database/Schema** → DatabaseAgent
|
|
@@ -4,8 +4,9 @@ This project follows enterprise-grade, technology-agnostic development patterns.
|
|
|
4
4
|
|
|
5
5
|
## Quick Start
|
|
6
6
|
|
|
7
|
-
- **
|
|
8
|
-
- **
|
|
7
|
+
- **AI Guide**: See `agent-docs/AI_INSTRUCTIONS.md` for comprehensive instructions
|
|
8
|
+
- **Architecture**: See `agent-docs/ARCHITECTURE.md` for project guidelines
|
|
9
|
+
- **Agent Patterns**: See `agent-docs/AGENTS.md` for delegation patterns
|
|
9
10
|
- **Detailed Rules**: See `agents/rules/*.mdc` files
|
|
10
11
|
|
|
11
12
|
## Always Apply
|
|
@@ -21,7 +22,7 @@ This project follows enterprise-grade, technology-agnostic development patterns.
|
|
|
21
22
|
|
|
22
23
|
## Agent Delegation
|
|
23
24
|
|
|
24
|
-
When implementing features, follow agent patterns from `AGENTS.md`:
|
|
25
|
+
When implementing features, follow agent patterns from `agent-docs/AGENTS.md`:
|
|
25
26
|
- **UI/Design** → FrontendAgent patterns (`agents/rules/frontend.mdc`)
|
|
26
27
|
- **API/Logic** → BackendAgent patterns (`agents/rules/security.mdc`)
|
|
27
28
|
- **Database** → DatabaseAgent patterns (`agents/rules/database.mdc`)
|
|
@@ -40,8 +41,9 @@ When implementing features, follow agent patterns from `AGENTS.md`:
|
|
|
40
41
|
|
|
41
42
|
## Reference Files
|
|
42
43
|
|
|
43
|
-
- `
|
|
44
|
-
- `
|
|
44
|
+
- `agent-docs/AI_INSTRUCTIONS.md` - Primary AI assistant guide
|
|
45
|
+
- `agent-docs/ARCHITECTURE.md` - Architecture and technology stack guidance
|
|
46
|
+
- `agent-docs/AGENTS.md` - Agent responsibilities and delegation
|
|
45
47
|
- `agents/rules/core.mdc` - Core principles
|
|
46
48
|
- `agents/rules/security.mdc` - Security patterns (CRITICAL)
|
|
47
49
|
- `agents/rules/testing.mdc` - Testing strategy (CRITICAL)
|
package/templates/CLAUDE.md
CHANGED
|
@@ -1,261 +1,56 @@
|
|
|
1
|
-
|
|
1
|
+
# Claude AI Instructions
|
|
2
2
|
|
|
3
|
-
This
|
|
4
|
-
These guidelines are for both humans and AI assistants working with any technology stack.
|
|
3
|
+
This project uses enterprise-grade, technology-agnostic development patterns for Claude AI assistance.
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
- **Agent responsibilities** and MCP integration are documented in `AGENTS.MD`.
|
|
8
|
-
- **Detailed implementation rules** live in `agents/rules/*.mdc` files.
|
|
5
|
+
## Quick Start
|
|
9
6
|
|
|
10
|
-
|
|
7
|
+
- **AI Guide**: See `agent-docs/AI_INSTRUCTIONS.md` for comprehensive instructions
|
|
8
|
+
- **Architecture**: See `agent-docs/ARCHITECTURE.md` for project guidelines
|
|
9
|
+
- **Agent Patterns**: See `agent-docs/AGENTS.md` for delegation patterns
|
|
10
|
+
- **Detailed Rules**: See `agents/rules/*.mdc` files
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
## Technology Stack Selection
|
|
15
|
-
|
|
16
|
-
This template is designed to work with **any modern technology stack**. Choose the technologies that best fit your project requirements:
|
|
17
|
-
|
|
18
|
-
### Frontend Framework Options
|
|
19
|
-
|
|
20
|
-
#### Option A: React Ecosystem
|
|
21
|
-
- ✅ **Best for**: Complex UIs, large teams, extensive ecosystem
|
|
22
|
-
- ✅ **Variants**: Next.js (full-stack), Create React App, Vite + React
|
|
23
|
-
- ✅ **Use when**: Building complex SPAs or full-stack applications
|
|
24
|
-
|
|
25
|
-
#### Option B: Vue.js Ecosystem
|
|
26
|
-
- ✅ **Best for**: Progressive adoption, gentle learning curve
|
|
27
|
-
- ✅ **Variants**: Nuxt.js (full-stack), Vue CLI, Vite + Vue
|
|
28
|
-
- ✅ **Use when**: Migrating existing apps or rapid prototyping
|
|
29
|
-
|
|
30
|
-
#### Option C: Angular
|
|
31
|
-
- ✅ **Best for**: Enterprise applications, TypeScript-first development
|
|
32
|
-
- ✅ **Features**: Built-in TypeScript, comprehensive CLI, enterprise patterns
|
|
33
|
-
- ✅ **Use when**: Building large-scale enterprise applications
|
|
34
|
-
|
|
35
|
-
#### Option D: Svelte/SvelteKit
|
|
36
|
-
- ✅ **Best for**: Performance-critical applications, smaller bundle sizes
|
|
37
|
-
- ✅ **Features**: Compile-time optimization, minimal runtime overhead
|
|
38
|
-
- ✅ **Use when**: Performance is the primary concern
|
|
39
|
-
|
|
40
|
-
#### Option E: Traditional Server-Side
|
|
41
|
-
- ✅ **Best for**: SEO-critical sites, progressive enhancement
|
|
42
|
-
- ✅ **Variants**: Django templates, Rails views, PHP templates
|
|
43
|
-
- ✅ **Use when**: Building traditional web applications with SSR
|
|
44
|
-
|
|
45
|
-
### Backend Framework Options
|
|
46
|
-
|
|
47
|
-
#### Option A: Node.js
|
|
48
|
-
- ✅ **Frameworks**: Express, Fastify, Koa, Next.js API routes
|
|
49
|
-
- ✅ **Best for**: JavaScript/TypeScript full-stack development
|
|
50
|
-
- ✅ **Use when**: Team has JavaScript expertise, need API + frontend
|
|
51
|
-
|
|
52
|
-
#### Option B: Python
|
|
53
|
-
- ✅ **Frameworks**: Django, FastAPI, Flask
|
|
54
|
-
- ✅ **Best for**: Data-heavy applications, AI/ML integration, rapid development
|
|
55
|
-
- ✅ **Use when**: Building APIs with complex business logic
|
|
56
|
-
|
|
57
|
-
#### Option C: Go
|
|
58
|
-
- ✅ **Frameworks**: Gin, Echo, Fiber
|
|
59
|
-
- ✅ **Best for**: High-performance APIs, microservices
|
|
60
|
-
- ✅ **Use when**: Performance and concurrency are critical
|
|
61
|
-
|
|
62
|
-
#### Option D: Rust
|
|
63
|
-
- ✅ **Frameworks**: Actix-web, Warp, Rocket
|
|
64
|
-
- ✅ **Best for**: System-level performance, memory safety
|
|
65
|
-
- ✅ **Use when**: Building high-performance, secure backends
|
|
66
|
-
|
|
67
|
-
#### Option E: Java/Kotlin
|
|
68
|
-
- ✅ **Frameworks**: Spring Boot, Ktor, Quarkus
|
|
69
|
-
- ✅ **Best for**: Enterprise applications, existing Java ecosystem
|
|
70
|
-
- ✅ **Use when**: Working in enterprise Java environments
|
|
71
|
-
|
|
72
|
-
### Database Strategy Options
|
|
73
|
-
|
|
74
|
-
#### Option A: SQL Databases
|
|
75
|
-
- ✅ **Databases**: PostgreSQL, MySQL, SQLite
|
|
76
|
-
- ✅ **ORMs**: Prisma, TypeORM, Sequelize (JS), SQLAlchemy (Python), GORM (Go)
|
|
77
|
-
- ✅ **Best for**: Complex relationships, ACID transactions, reporting
|
|
78
|
-
|
|
79
|
-
#### Option B: NoSQL Databases
|
|
80
|
-
- ✅ **Databases**: MongoDB, DynamoDB, CouchDB
|
|
81
|
-
- ✅ **ODMs**: Mongoose, AWS SDK, PouchDB
|
|
82
|
-
- ✅ **Best for**: Flexible schemas, horizontal scaling, document storage
|
|
83
|
-
|
|
84
|
-
#### Option C: Cloud-Native Solutions
|
|
85
|
-
- ✅ **Options**: Supabase, Firebase, AWS RDS, Azure SQL, PlanetScale
|
|
86
|
-
- ✅ **Best for**: Rapid development, managed infrastructure, built-in features
|
|
87
|
-
- ✅ **Use when**: Want managed database with additional services
|
|
88
|
-
|
|
89
|
-
### Authentication Options
|
|
90
|
-
|
|
91
|
-
#### Option A: Self-Managed
|
|
92
|
-
- ✅ **Solutions**: NextAuth.js, Passport.js, Django Auth, custom JWT
|
|
93
|
-
- ✅ **Best for**: Custom requirements, full control, specific workflows
|
|
94
|
-
- ✅ **Use when**: Need custom authentication logic
|
|
95
|
-
|
|
96
|
-
#### Option B: Authentication as a Service
|
|
97
|
-
- ✅ **Solutions**: Auth0, Firebase Auth, AWS Cognito, Supabase Auth
|
|
98
|
-
- ✅ **Best for**: Rapid development, enterprise SSO, compliance requirements
|
|
99
|
-
- ✅ **Use when**: Want managed authentication with social providers
|
|
100
|
-
|
|
101
|
-
---
|
|
12
|
+
## Always Apply
|
|
102
13
|
|
|
103
|
-
|
|
14
|
+
1. **Security-first**: Validate inputs, authenticate endpoints, rate limit public APIs
|
|
15
|
+
- Reference: `agents/rules/security.mdc`
|
|
104
16
|
|
|
105
|
-
|
|
106
|
-
-
|
|
107
|
-
- **Authentication**: Implement secure session management and MFA where appropriate
|
|
108
|
-
- **Authorization**: Role-based access control with proper middleware
|
|
109
|
-
- **Data Protection**: Encrypt sensitive data, sanitize outputs, secure error handling
|
|
110
|
-
- **Rate Limiting**: Protect against DoS attacks with appropriate limiting strategies
|
|
17
|
+
2. **Testing**: Unit (80%), Integration (15%), E2E (5%) coverage
|
|
18
|
+
- Reference: `agents/rules/testing.mdc`
|
|
111
19
|
|
|
112
|
-
|
|
113
|
-
-
|
|
114
|
-
- **Loading Strategies**: Lazy loading, code splitting, progressive loading
|
|
115
|
-
- **Database Optimization**: Efficient queries, connection pooling, caching layers
|
|
116
|
-
- **Monitoring**: Performance metrics, error tracking, user experience monitoring
|
|
20
|
+
3. **Type Safety**: Strong typing with runtime validation at boundaries
|
|
21
|
+
- Reference: `agents/rules/core.mdc`
|
|
117
22
|
|
|
118
|
-
|
|
119
|
-
- **Static Typing**: Use TypeScript, Flow, or language-native typing systems
|
|
120
|
-
- **Runtime Validation**: Schema validation at API boundaries and form inputs
|
|
121
|
-
- **API Contracts**: OpenAPI/GraphQL schemas for API documentation and validation
|
|
122
|
-
- **Database Schemas**: Proper constraints and validation at the database level
|
|
23
|
+
## Agent Delegation
|
|
123
24
|
|
|
124
|
-
|
|
125
|
-
- **
|
|
126
|
-
- **
|
|
127
|
-
- **
|
|
128
|
-
- **
|
|
129
|
-
- **Security
|
|
25
|
+
When implementing features, follow agent patterns from `agent-docs/AGENTS.md`:
|
|
26
|
+
- **UI/Design** → FrontendAgent patterns (`agents/rules/frontend.mdc`)
|
|
27
|
+
- **API/Logic** → BackendAgent patterns (`agents/rules/security.mdc`)
|
|
28
|
+
- **Database** → DatabaseAgent patterns (`agents/rules/database.mdc`)
|
|
29
|
+
- **Testing** → TestAgent patterns (`agents/rules/testing.mdc`)
|
|
30
|
+
- **Security** → SecurityAgent patterns (`agents/rules/security.mdc`)
|
|
130
31
|
|
|
131
|
-
|
|
132
|
-
- **Development Tools**: Hot reload, debugging tools, comprehensive logging
|
|
133
|
-
- **Code Quality**: Linting, formatting, pre-commit hooks, automated quality gates
|
|
134
|
-
- **Documentation**: API docs, component storybooks, architectural decision records
|
|
135
|
-
- **Deployment**: CI/CD pipelines, environment management, rollback strategies
|
|
32
|
+
## Critical Rules
|
|
136
33
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
```
|
|
145
|
-
src/
|
|
146
|
-
├── features/
|
|
147
|
-
│ ├── auth/
|
|
148
|
-
│ │ ├── components/
|
|
149
|
-
│ │ ├── services/
|
|
150
|
-
│ │ ├── types/
|
|
151
|
-
│ │ └── tests/
|
|
152
|
-
│ └── dashboard/
|
|
153
|
-
│ ├── components/
|
|
154
|
-
│ ├── services/
|
|
155
|
-
│ ├── types/
|
|
156
|
-
│ └── tests/
|
|
157
|
-
├── shared/
|
|
158
|
-
│ ├── components/
|
|
159
|
-
│ ├── utilities/
|
|
160
|
-
│ ├── types/
|
|
161
|
-
│ └── constants/
|
|
162
|
-
└── tests/
|
|
163
|
-
├── integration/
|
|
164
|
-
└── e2e/
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
### Technology-Specific Adaptations
|
|
168
|
-
|
|
169
|
-
**React/Vue/Angular Projects:**
|
|
170
|
-
- Component-based architecture with proper state management
|
|
171
|
-
- Shared component library with consistent design tokens
|
|
172
|
-
- Custom hooks/composables for reusable logic
|
|
173
|
-
|
|
174
|
-
**Backend API Projects:**
|
|
175
|
-
- Service layer for business logic
|
|
176
|
-
- Repository pattern for data access
|
|
177
|
-
- Middleware for cross-cutting concerns
|
|
178
|
-
|
|
179
|
-
**Full-Stack Projects:**
|
|
180
|
-
- Shared types between frontend and backend
|
|
181
|
-
- API route organization matching frontend features
|
|
182
|
-
- Consistent error handling patterns
|
|
183
|
-
|
|
184
|
-
---
|
|
185
|
-
|
|
186
|
-
## Quality Standards
|
|
187
|
-
|
|
188
|
-
### Code Quality
|
|
189
|
-
- **Consistency**: Follow established patterns throughout the codebase
|
|
190
|
-
- **Readability**: Clear naming, proper documentation, logical organization
|
|
191
|
-
- **Maintainability**: Modular design, separation of concerns, SOLID principles
|
|
192
|
-
- **Performance**: Efficient algorithms, appropriate caching, resource optimization
|
|
34
|
+
- Validate ALL user inputs with schema validation
|
|
35
|
+
- Authenticate and authorize protected endpoints
|
|
36
|
+
- Rate limit public endpoints
|
|
37
|
+
- Write tests for all business logic
|
|
38
|
+
- Ensure WCAG 2.1 AA accessibility compliance
|
|
39
|
+
- Use ORM/ODM patterns, avoid raw queries
|
|
40
|
+
- Never expose sensitive data in errors/logs
|
|
193
41
|
|
|
194
|
-
|
|
195
|
-
- **OWASP Top 10**: Address all major web application security risks
|
|
196
|
-
- **Input Validation**: Comprehensive validation with appropriate error handling
|
|
197
|
-
- **Authentication**: Secure session management with proper token handling
|
|
198
|
-
- **Authorization**: Granular permissions with proper access control
|
|
199
|
-
- **Data Protection**: Encryption at rest and in transit, secure data handling
|
|
42
|
+
## Reference Files
|
|
200
43
|
|
|
201
|
-
|
|
202
|
-
-
|
|
203
|
-
-
|
|
204
|
-
-
|
|
205
|
-
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
-
|
|
209
|
-
-
|
|
210
|
-
- **Architecture Documentation**: Decision records, system diagrams, setup guides
|
|
211
|
-
- **User Documentation**: Feature guides, troubleshooting, FAQ
|
|
212
|
-
|
|
213
|
-
---
|
|
214
|
-
|
|
215
|
-
## Getting Started
|
|
216
|
-
|
|
217
|
-
### 1. Choose Your Stack
|
|
218
|
-
Review the options above and select technologies that fit your:
|
|
219
|
-
- **Team expertise** and learning preferences
|
|
220
|
-
- **Project requirements** and performance needs
|
|
221
|
-
- **Deployment environment** and infrastructure constraints
|
|
222
|
-
- **Timeline** and development velocity requirements
|
|
223
|
-
|
|
224
|
-
### 2. Adapt the Template
|
|
225
|
-
- Update `agents/rules/*.mdc` files with technology-specific patterns
|
|
226
|
-
- Modify `.cursorrules` to include your chosen stack details
|
|
227
|
-
- Update this `CLAUDE.md` file with stack-specific guidelines
|
|
228
|
-
- Create appropriate configuration files for your chosen tools
|
|
229
|
-
|
|
230
|
-
### 3. Implement Core Patterns
|
|
231
|
-
- Set up your chosen security patterns (validation, auth, rate limiting)
|
|
232
|
-
- Implement testing tools and maintain quality gates
|
|
233
|
-
- Configure development tools (linting, formatting, debugging)
|
|
234
|
-
- Set up deployment pipelines and environment management
|
|
235
|
-
|
|
236
|
-
### 4. Follow Agent Patterns
|
|
237
|
-
- Use the agents defined in `AGENTS.MD` for specialized tasks
|
|
238
|
-
- Maintain consistency with established patterns
|
|
239
|
-
- Regular code reviews using `ReviewerAgent` patterns
|
|
240
|
-
- Document architectural decisions as you build
|
|
44
|
+
- `agent-docs/AI_INSTRUCTIONS.md` - Primary AI assistant guide
|
|
45
|
+
- `agent-docs/ARCHITECTURE.md` - Architecture and technology stack guidance
|
|
46
|
+
- `agent-docs/AGENTS.md` - Agent responsibilities and delegation
|
|
47
|
+
- `agents/rules/core.mdc` - Core principles
|
|
48
|
+
- `agents/rules/security.mdc` - Security patterns (CRITICAL)
|
|
49
|
+
- `agents/rules/testing.mdc` - Testing strategy (CRITICAL)
|
|
50
|
+
- `agents/rules/frontend.mdc` - Frontend patterns
|
|
51
|
+
- `agents/rules/database.mdc` - Database patterns
|
|
52
|
+
- `agents/rules/style.mdc` - Code style guidelines
|
|
241
53
|
|
|
242
54
|
---
|
|
243
55
|
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
### Regular Reviews
|
|
247
|
-
- **Security audits**: Regular dependency updates and vulnerability scanning
|
|
248
|
-
- **Performance monitoring**: Track metrics and optimize bottlenecks
|
|
249
|
-
- **Code quality**: Regular refactoring and technical debt management
|
|
250
|
-
- **Documentation**: Keep docs current with code changes
|
|
251
|
-
|
|
252
|
-
### Technology Updates
|
|
253
|
-
- **Dependencies**: Regular updates with proper testing
|
|
254
|
-
- **Framework versions**: Planned upgrades with migration strategies
|
|
255
|
-
- **Security patches**: Immediate application of critical security updates
|
|
256
|
-
- **Performance improvements**: Adoption of new optimization techniques
|
|
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
|
-
|
|
261
|
-
This template provides a solid foundation while remaining flexible for any technology stack you choose to implement.
|
|
56
|
+
**Note**: This is technology-agnostic. Adapt patterns to your chosen stack while maintaining security and quality standards.
|
|
@@ -8,8 +8,9 @@ This project uses enterprise-grade, technology-agnostic development patterns for
|
|
|
8
8
|
|
|
9
9
|
## Quick Start
|
|
10
10
|
|
|
11
|
-
- **
|
|
12
|
-
- **
|
|
11
|
+
- **AI Guide**: See `agent-docs/AI_INSTRUCTIONS.md` for comprehensive instructions
|
|
12
|
+
- **Architecture**: See `agent-docs/ARCHITECTURE.md` for project guidelines
|
|
13
|
+
- **Agent Patterns**: See `agent-docs/AGENTS.md` for delegation patterns
|
|
13
14
|
- **Detailed Rules**: See `agents/rules/*.mdc` files
|
|
14
15
|
- **Available Skills**: See `agents/skills/` directory
|
|
15
16
|
|
|
@@ -99,8 +100,9 @@ These patterns apply regardless of your tech stack. Adapt them to your chosen fr
|
|
|
99
100
|
|
|
100
101
|
| File | Purpose | When to Use |
|
|
101
102
|
|------|---------|------------|
|
|
102
|
-
| `
|
|
103
|
-
| `
|
|
103
|
+
| `agent-docs/AI_INSTRUCTIONS.md` | Primary AI assistant guide | Always start here |
|
|
104
|
+
| `agent-docs/ARCHITECTURE.md` | Architecture and technology stack decisions | Need architectural guidance |
|
|
105
|
+
| `agent-docs/AGENTS.md` | Agent responsibilities and delegation | Deciding who should implement a feature |
|
|
104
106
|
| `agents/rules/core.mdc` | Core development principles | General development questions |
|
|
105
107
|
| `agents/rules/security.mdc` | Security patterns and implementations | Building secure features |
|
|
106
108
|
| `agents/rules/testing.mdc` | Testing strategy and best practices | Writing tests or test strategy |
|
|
@@ -111,8 +113,9 @@ These patterns apply regardless of your tech stack. Adapt them to your chosen fr
|
|
|
111
113
|
|
|
112
114
|
## Workflow Recommendations
|
|
113
115
|
|
|
114
|
-
1. **Read
|
|
115
|
-
2. **
|
|
116
|
+
1. **Read agent-docs/AI_INSTRUCTIONS.md** for comprehensive AI assistance guidance
|
|
117
|
+
2. **Read agent-docs/ARCHITECTURE.md** to understand the overall architecture
|
|
118
|
+
3. **Check agent-docs/AGENTS.md** to identify which agent should lead the implementation
|
|
116
119
|
3. **Reference the appropriate rule file** for implementation patterns
|
|
117
120
|
4. **Look in agents/skills/** for domain-specific guidance
|
|
118
121
|
5. **Follow all critical rules** without exception
|
|
@@ -127,4 +130,4 @@ These patterns apply regardless of your tech stack. Adapt them to your chosen fr
|
|
|
127
130
|
|
|
128
131
|
---
|
|
129
132
|
|
|
130
|
-
For best results with Gemini AI assistance, reference the appropriate rules files and provide the relevant context from `
|
|
133
|
+
For best results with Gemini AI assistance, reference the appropriate rules files and provide the relevant context from `agent-docs/AI_INSTRUCTIONS.md`, `agent-docs/ARCHITECTURE.md`, and `agent-docs/AGENTS.md` in your prompts.
|