agents-templated 1.2.2 → 1.2.3

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 CHANGED
@@ -120,7 +120,7 @@ When you run `agents-templated init`, you get:
120
120
  ```
121
121
  your-project/
122
122
  ├── agent-docs/ # 📚 Comprehensive documentation
123
- │ ├── AI_INSTRUCTIONS.md # Primary AI assistant guide
123
+ │ ├── AGENTS.md # AI assistant guide
124
124
  │ ├── ARCHITECTURE.md # Project architecture & tech stack
125
125
  │ ├── AGENTS.MD # Agent delegation patterns
126
126
  │ └── README.md # Human-readable setup guide
@@ -226,9 +226,9 @@ Open your AI assistant and it will automatically load the appropriate config:
226
226
 
227
227
  ### 3. Read the Documentation
228
228
 
229
- - **[agent-docs/AI_INSTRUCTIONS.md](agent-docs/AI_INSTRUCTIONS.md)** – Primary AI assistant guide
229
+ - **[AGENTS.md](AGENTS.md)** – AI assistant guide
230
230
  - **[agent-docs/ARCHITECTURE.md](agent-docs/ARCHITECTURE.md)** – Project architecture & tech stack guidance
231
- - **[agent-docs/AGENTS.MD](agent-docs/AGENTS.MD)** – Agent delegation patterns
231
+ - **[AGENTS.md](AGENTS.md)** – AI assistant guide
232
232
  - **[agents/rules/security.mdc](agents/rules/security.mdc)** – Security patterns (CRITICAL)
233
233
  - **[agents/rules/testing.mdc](agents/rules/testing.mdc)** – Testing strategy
234
234
 
@@ -276,7 +276,7 @@ Your AI will follow the enterprise patterns automatically!
276
276
  | **TestAgent** | Unit, integration, E2E, accessibility testing |
277
277
  | **SecurityAgent** | Input validation, authentication, OWASP compliance |
278
278
 
279
- **Reference**: [agent-docs/AGENTS.MD](agent-docs/AGENTS.MD)
279
+ **Reference**: [AGENTS.md](AGENTS.md)
280
280
 
281
281
  ---
282
282
 
package/bin/cli.js CHANGED
@@ -162,27 +162,27 @@ program
162
162
  );
163
163
  }
164
164
 
165
- // Install AI Agent instructions (Cursor, Copilot, VSCode, Gemini)
165
+ // Install AI Agent instructions (Cursor, Copilot, Claude, Gemini)
166
166
  if (installAll || choices.includes('github')) {
167
167
  console.log(chalk.yellow('Installing AI agent instructions...'));
168
168
  await fs.ensureDir(path.join(targetDir, '.github'));
169
169
  await copyFiles(templateDir, targetDir, [
170
170
  '.cursorrules',
171
171
  '.github/copilot-instructions.md',
172
- '.vscode-ai-rules.md',
173
- '.gemini-instructions.md'
172
+ 'CLAUDE.md',
173
+ 'GEMINI.md'
174
174
  ], options.force);
175
175
  console.log(chalk.gray(' ✓ Cursor (.cursorrules)'));
176
176
  console.log(chalk.gray(' ✓ GitHub Copilot (.github/copilot-instructions.md)'));
177
- console.log(chalk.gray(' ✓ VSCode (.vscode-ai-rules.md)'));
178
- console.log(chalk.gray(' ✓ Google Gemini (.gemini-instructions.md)'));
177
+ console.log(chalk.gray(' ✓ Claude (CLAUDE.md)'));
178
+ console.log(chalk.gray(' ✓ Google Gemini (GEMINI.md)'));
179
179
  }
180
180
 
181
181
  console.log(chalk.green.bold('\nInstallation complete!\n'));
182
182
  console.log(chalk.cyan('Next steps:'));
183
- console.log(chalk.white(' 1. Review agent-docs/AI_INSTRUCTIONS.md for AI assistance guide'));
183
+ console.log(chalk.white(' 1. Review AGENTS.md for generic AI assistant guide'));
184
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'));
185
+ console.log(chalk.white(' 3. Review AGENTS.md for AI assistant guide'));
186
186
  console.log(chalk.white(' 4. Configure your AI assistant (Cursor, Copilot, etc.)'));
187
187
  console.log(chalk.white(' 5. Adapt the rules to your technology stack\n'));
188
188
 
@@ -353,13 +353,15 @@ program
353
353
  await copyFiles(templateDir, targetDir, [
354
354
  '.cursorrules',
355
355
  '.github/copilot-instructions.md',
356
- '.vscode-ai-rules.md',
357
- '.gemini-instructions.md'
356
+ 'AGENTS.md',
357
+ 'CLAUDE.md',
358
+ 'GEMINI.md'
358
359
  ], options.force);
359
360
  console.log(chalk.gray(' ✓ Cursor (.cursorrules)'));
360
361
  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)'));
362
+ console.log(chalk.gray(' ✓ Generic AI (AGENTS.md)'));
363
+ console.log(chalk.gray(' ✓ Claude (CLAUDE.md)'));
364
+ console.log(chalk.gray(' ✓ Google Gemini (GEMINI.md)'));
363
365
  }
364
366
 
365
367
  // Step 4: Show recommendations
@@ -371,9 +373,9 @@ program
371
373
  if (techStack.database) console.log(chalk.white(` Database: ${techStack.database}`));
372
374
 
373
375
  console.log(chalk.cyan('\n📚 Next Steps:\n'));
374
- console.log(chalk.white(' 1. Review agent-docs/AI_INSTRUCTIONS.md for AI assistance guide'));
376
+ console.log(chalk.white(' 1. Review AGENTS.md for AI assistant guide'));
375
377
  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'));
378
+ console.log(chalk.white(' 3. Review AGENTS.md for AI assistant guide'));
377
379
  console.log(chalk.white(' 3. Customize agents/rules/*.mdc for your tech stack'));
378
380
 
379
381
  if (techStack.frontend || techStack.backend) {
@@ -452,7 +454,13 @@ program
452
454
  let passed = [];
453
455
 
454
456
  // Check documentation files
455
- const docFiles = ['AGENTS.MD', 'ARCHITECTURE.md', 'AI_INSTRUCTIONS.md'];
457
+ if (await fs.pathExists(path.join(targetDir, 'AGENTS.md'))) {
458
+ passed.push(`✓ AGENTS.md found`);
459
+ } else {
460
+ warnings.push(`⚠ AGENTS.md missing - run 'agents-templated init --docs'`);
461
+ }
462
+
463
+ const docFiles = ['ARCHITECTURE.md'];
456
464
  const docsDir = path.join(targetDir, 'agent-docs');
457
465
 
458
466
  if (await fs.pathExists(docsDir)) {
@@ -655,9 +663,9 @@ program
655
663
  // List potential updates
656
664
  const updates = [];
657
665
  const checkFiles = [
658
- { file: 'agent-docs/AGENTS.MD', component: 'docs' },
666
+ { file: 'AGENTS.md', component: 'root' },
659
667
  { file: 'agent-docs/ARCHITECTURE.md', component: 'docs' },
660
- { file: 'agent-docs/AI_INSTRUCTIONS.md', component: 'docs' },
668
+ { file: 'AGENTS.md', component: 'root' },
661
669
  { file: 'agents/rules/security.mdc', component: 'rules' },
662
670
  { file: 'agents/rules/testing.mdc', component: 'rules' },
663
671
  { file: 'agents/rules/core.mdc', component: 'rules' },
package/index.js CHANGED
@@ -26,9 +26,8 @@ async function install(targetDir, options = {}) {
26
26
  // Documentation files
27
27
  if (installAll || options.docs) {
28
28
  files.push(
29
- 'agent-docs/AGENTS.MD',
29
+ 'AGENTS.md',
30
30
  'agent-docs/ARCHITECTURE.md',
31
- 'agent-docs/AI_INSTRUCTIONS.md',
32
31
  'agent-docs/README.md'
33
32
  );
34
33
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agents-templated",
3
- "version": "1.2.2",
3
+ "version": "1.2.3",
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": {
@@ -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, agent-docs/ARCHITECTURE.md, and agent-docs/AGENTS.md updated
38
+ - **Documentation**: Keep README, agent-docs/ARCHITECTURE.md, and 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 agent-docs/AGENTS.md for details)
58
+ ## Agent Delegation (See AGENTS.md for details)
59
59
  - **UI/Design work** → FrontendAgent
60
60
  - **API/Business logic** → BackendAgent
61
61
  - **Database/Schema** → DatabaseAgent
@@ -4,8 +4,8 @@ This project follows enterprise-grade, technology-agnostic development patterns.
4
4
 
5
5
  ## Primary Documentation (Always Reference)
6
6
 
7
- - **`ARCHITECTURE.md`** - Overall project guidelines, architecture principles, and technology stack selection
8
- - **`AGENTS.md`** - Agent delegation patterns, responsibilities, and when to use each agent
7
+ - **`AGENTS.md`** - This file! AI instructions for working with AI assistants
8
+ - **`agent-docs/ARCHITECTURE.md`** - Overall project guidelines, architecture principles, and technology stack selection
9
9
 
10
10
  ## Detailed Rules (Reference When Relevant)
11
11
 
@@ -23,11 +23,10 @@ When implementing features, always check the relevant rule file:
23
23
 
24
24
  When implementing any feature:
25
25
 
26
- 1. **Check `AGENTS.md`** to determine which agent pattern applies (FrontendAgent, BackendAgent, DatabaseAgent, etc.)
27
- 2. **Reference `ARCHITECTURE.md`** for overall architecture and technology stack guidance
28
- 3. **Apply relevant rules** from `agents/rules/*.mdc` files based on the task
29
- 4. **Always apply security patterns** from `agents/rules/security.mdc`
30
- 5. **Always apply testing patterns** from `agents/rules/testing.mdc`
26
+ 1. **Reference `agent-docs/ARCHITECTURE.md`** for overall architecture and technology stack guidance
27
+ 2. **Apply relevant rules** from `agents/rules/*.mdc` files based on the task
28
+ 3. **Always apply security patterns** from `agents/rules/security.mdc`
29
+ 4. **Always apply testing patterns** from `agents/rules/testing.mdc`
31
30
 
32
31
  ## Critical Rules (Always Apply)
33
32
 
@@ -48,7 +47,7 @@ When implementing any feature:
48
47
  - **Type safety**: Use strong typing, validate at boundaries
49
48
  - **Performance**: Monitor bundle/binary size, implement lazy loading
50
49
  - **Accessibility**: WCAG 2.1 AA compliance for user-facing components
51
- - **Documentation**: Keep README, ARCHITECTURE.md, and AGENTS.md updated
50
+ - **Documentation**: Keep README, agent-docs/ARCHITECTURE.md, and AGENTS.md updated
52
51
 
53
52
  ## Architecture Principles
54
53
 
@@ -61,31 +60,26 @@ When implementing any feature:
61
60
  ## Quick Reference
62
61
 
63
62
  ### For UI/Design Work
64
- → Reference `AGENTS.md` → FrontendAgent section
65
63
  → Apply `agents/rules/frontend.mdc` patterns
66
64
  → Ensure accessibility compliance
67
65
 
68
66
  ### For API/Business Logic
69
- → Reference `AGENTS.md` → BackendAgent section
70
67
  → Apply `agents/rules/security.mdc` for authentication/validation
71
68
  → Apply `agents/rules/testing.mdc` for test coverage
72
69
 
73
70
  ### For Database Work
74
- → Reference `AGENTS.md` → DatabaseAgent section
75
71
  → Apply `agents/rules/database.mdc` patterns
76
72
  → Use ORM/ODM patterns, avoid raw queries
77
73
 
78
74
  ### For Security Reviews
79
- → Reference `AGENTS.md` → SecurityAgent section
80
75
  → Apply `agents/rules/security.mdc` comprehensively
81
76
  → Check OWASP Top 10 compliance
82
77
 
83
78
  ## When in Doubt
84
79
 
85
- 1. Check `AGENTS.md` for agent delegation guidance
86
- 2. Review `ARCHITECTURE.md` for architecture decisions
87
- 3. Reference the specific `agents/rules/*.mdc` file for detailed patterns
88
- 4. Always prioritize security and testing requirements
80
+ 1. Review `agent-docs/ARCHITECTURE.md` for architecture decisions
81
+ 2. Reference the specific `agents/rules/*.mdc` file for detailed patterns
82
+ 3. Always prioritize security and testing requirements
89
83
 
90
84
  ---
91
85
 
@@ -4,9 +4,9 @@ This project uses enterprise-grade, technology-agnostic development patterns for
4
4
 
5
5
  ## Quick Start
6
6
 
7
- - **AI Guide**: See `agent-docs/AI_INSTRUCTIONS.md` for comprehensive instructions
7
+ - **AI Guide**: See `AGENTS.md` for comprehensive instructions
8
8
  - **Architecture**: See `agent-docs/ARCHITECTURE.md` for project guidelines
9
- - **Agent Patterns**: See `agent-docs/AGENTS.md` for delegation patterns
9
+ - **AI Guide**: See `AGENTS.md` for AI assistant patterns
10
10
  - **Detailed Rules**: See `agents/rules/*.mdc` files
11
11
 
12
12
  ## Always Apply
@@ -22,7 +22,7 @@ This project uses enterprise-grade, technology-agnostic development patterns for
22
22
 
23
23
  ## Agent Delegation
24
24
 
25
- When implementing features, follow agent patterns from `agent-docs/AGENTS.md`:
25
+ When implementing features, reference `AGENTS.md`:
26
26
  - **UI/Design** → FrontendAgent patterns (`agents/rules/frontend.mdc`)
27
27
  - **API/Logic** → BackendAgent patterns (`agents/rules/security.mdc`)
28
28
  - **Database** → DatabaseAgent patterns (`agents/rules/database.mdc`)
@@ -41,9 +41,9 @@ When implementing features, follow agent patterns from `agent-docs/AGENTS.md`:
41
41
 
42
42
  ## Reference Files
43
43
 
44
- - `agent-docs/AI_INSTRUCTIONS.md` - Primary AI assistant guide
44
+ - `AGENTS.md` - Primary AI assistant guide
45
45
  - `agent-docs/ARCHITECTURE.md` - Architecture and technology stack guidance
46
- - `agent-docs/AGENTS.md` - Agent responsibilities and delegation
46
+ - `AGENTS.md` - AI assistant guide and patterns
47
47
  - `agents/rules/core.mdc` - Core principles
48
48
  - `agents/rules/security.mdc` - Security patterns (CRITICAL)
49
49
  - `agents/rules/testing.mdc` - Testing strategy (CRITICAL)
@@ -8,9 +8,9 @@ This project uses enterprise-grade, technology-agnostic development patterns for
8
8
 
9
9
  ## Quick Start
10
10
 
11
- - **AI Guide**: See `agent-docs/AI_INSTRUCTIONS.md` for comprehensive instructions
11
+ - **AI Guide**: See `AGENTS.md` for comprehensive instructions
12
12
  - **Architecture**: See `agent-docs/ARCHITECTURE.md` for project guidelines
13
- - **Agent Patterns**: See `agent-docs/AGENTS.md` for delegation patterns
13
+ - **AI Guide**: See `AGENTS.md` for AI assistant patterns
14
14
  - **Detailed Rules**: See `agents/rules/*.mdc` files
15
15
  - **Available Skills**: See `agents/skills/` directory
16
16
 
@@ -100,9 +100,9 @@ These patterns apply regardless of your tech stack. Adapt them to your chosen fr
100
100
 
101
101
  | File | Purpose | When to Use |
102
102
  |------|---------|------------|
103
- | `agent-docs/AI_INSTRUCTIONS.md` | Primary AI assistant guide | Always start here |
103
+ | `AGENTS.md` | Primary AI assistant guide | Always start here |
104
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 |
105
+ | `AGENTS.md` | AI assistant guide and patterns | How to work effectively with AI |
106
106
  | `agents/rules/core.mdc` | Core development principles | General development questions |
107
107
  | `agents/rules/security.mdc` | Security patterns and implementations | Building secure features |
108
108
  | `agents/rules/testing.mdc` | Testing strategy and best practices | Writing tests or test strategy |
@@ -113,9 +113,9 @@ These patterns apply regardless of your tech stack. Adapt them to your chosen fr
113
113
 
114
114
  ## Workflow Recommendations
115
115
 
116
- 1. **Read agent-docs/AI_INSTRUCTIONS.md** for comprehensive AI assistance guidance
116
+ 1. **Read AGENTS.md** for comprehensive AI assistance guidance
117
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
118
+ 3. **Reference AGENTS.md** for AI working patterns and guidance
119
119
  3. **Reference the appropriate rule file** for implementation patterns
120
120
  4. **Look in agents/skills/** for domain-specific guidance
121
121
  5. **Follow all critical rules** without exception
@@ -130,4 +130,4 @@ These patterns apply regardless of your tech stack. Adapt them to your chosen fr
130
130
 
131
131
  ---
132
132
 
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.
133
+ For best results with Gemini AI assistance, reference the appropriate context from `AGENTS.md`, `agent-docs/ARCHITECTURE.md`, and the relevant `agents/rules/*.mdc` files in your prompts.
@@ -116,7 +116,7 @@ When you run `agents-templated init`, you get:
116
116
  ```
117
117
  your-project/
118
118
  ├── agent-docs/ # 📚 Comprehensive documentation
119
- │ ├── AI_INSTRUCTIONS.md # Primary AI assistant guide
119
+ │ ├── AGENTS.md # AI assistant guide
120
120
  │ ├── ARCHITECTURE.md # Project architecture & tech stack
121
121
  │ ├── AGENTS.MD # Agent delegation patterns
122
122
  │ └── README.md # Human-readable setup guide
@@ -222,9 +222,9 @@ Open your AI assistant and it will automatically load the appropriate config:
222
222
 
223
223
  ### 3. Read the Documentation
224
224
 
225
- - **[agent-docs/AI_INSTRUCTIONS.md](agent-docs/AI_INSTRUCTIONS.md)** – Primary AI assistant guide
225
+ - **[AGENTS.md](AGENTS.md)** – AI assistant guide
226
226
  - **[agent-docs/ARCHITECTURE.md](agent-docs/ARCHITECTURE.md)** – Project architecture & tech stack guidance
227
- - **[agent-docs/AGENTS.MD](agent-docs/AGENTS.MD)** – Agent delegation patterns
227
+ - **[AGENTS.md](AGENTS.md)** – Working with AI assistants guide
228
228
  - **[agents/rules/security.mdc](agents/rules/security.mdc)** – Security patterns (CRITICAL)
229
229
  - **[agents/rules/testing.mdc](agents/rules/testing.mdc)** – Testing strategy
230
230
 
@@ -272,7 +272,7 @@ Your AI will follow the enterprise patterns automatically!
272
272
  | **TestAgent** | Unit, integration, E2E, accessibility testing |
273
273
  | **SecurityAgent** | Input validation, authentication, OWASP compliance |
274
274
 
275
- **Reference**: [agent-docs/AGENTS.MD](agent-docs/AGENTS.MD)
275
+ **Reference**: [AGENTS.md](AGENTS.md)
276
276
 
277
277
  ---
278
278
 
@@ -8,7 +8,7 @@ Depending on what you installed, you may have:
8
8
 
9
9
  - **AGENTS.MD**: Agent patterns and delegation guide
10
10
  - **ARCHITECTURE.md**: Project guidelines and architecture
11
- - **AI_INSTRUCTIONS.md**: Instructions for AI assistants
11
+ - **AGENTS.md**: Instructions for AI assistants
12
12
  - **agents/rules/**: Development rules and patterns (6 files)
13
13
  - **agents/skills/**: Reusable agent skills
14
14
  - **CLAUDE.md**: Claude AI configuration
@@ -41,7 +41,7 @@ agents-templated list
41
41
 
42
42
  ## Getting Started
43
43
 
44
- 1. Review AI_INSTRUCTIONS.md for AI assistance guidance
44
+ 1. Review AGENTS.md for AI assistance guidance
45
45
  2. Review ARCHITECTURE.md for overall project guidelines
46
46
  3. Review AGENTS.MD for agent patterns
47
47
  4. Adapt the rules to your specific technology stack
@@ -1,336 +0,0 @@
1
- ## Agents
2
-
3
- This file defines the different agents (MCP helpers) available in this **technology-agnostic development template** and when to use each one.
4
-
5
- - See `CLAUDE.md` for overall project guidelines.
6
- - Use this file as a quick reference for **which agent to call for which task**.
7
- - All agents support **security-first development** with comprehensive validation patterns.
8
- - Adapt the specific technologies and tools mentioned to match your chosen tech stack.
9
-
10
- ---
11
-
12
- ### FrontendAgent (UI/UX Developer)
13
-
14
- **FrontendAgent is your frontend developer.** For all UI/design work, use this MCP. Adapt tool descriptions to your chosen frontend framework.
15
-
16
- #### When to use FrontendAgent
17
-
18
- - New visual component (popup, card, section, etc.) → `snippet_frontend` or `create_frontend`
19
- - Redesign/restyle of existing UI → `modify_frontend`
20
- - Design system implementation → follow design integration patterns
21
- - Component library and design system work
22
- - Accessibility improvements and WCAG compliance
23
- - Pure logic or trivial tweaks → handle directly without delegating
24
-
25
- #### Enhanced Capabilities
26
-
27
- - **Security-aware components**: Automatically includes proper input sanitization
28
- - **Accessibility-first**: Components include ARIA attributes and keyboard navigation
29
- - **Performance-optimized**: Uses framework-specific optimization patterns
30
- - **Type-safe**: All components include proper type definitions (TypeScript/PropTypes/etc.)
31
-
32
- #### Framework Adaptations
33
-
34
- **React/Next.js/Vue/Svelte:**
35
- - Component-based architecture with proper state management
36
- - Framework-specific image optimization and lazy loading
37
- - CSS-in-JS, Tailwind, or styled-components patterns
38
-
39
- **Angular:**
40
- - Component + service architecture
41
- - RxJS reactive patterns
42
- - Angular Material or custom design system
43
-
44
- #### Critical Rules
45
-
46
- 1. If UI already exists and you need to redesign/restyle it → use `modify_frontend`, **not** `snippet_frontend`.
47
- 2. Tasks can be mixed (logic + UI). Handle logic yourself, delegate UI to FrontendAgent.
48
- 3. **Always include accessibility testing** patterns for new components.
49
- 4. **Follow security patterns** from `agents/rules/security.mdc` for user inputs.
50
-
51
- ---
52
-
53
- ### BackendAgent (API & Business Logic)
54
-
55
- #### Scope
56
-
57
- - Owns **API routes**, **business logic layers**, and **service functions**
58
- - **Authentication & Authorization** implementation
59
- - **Rate limiting** and **security middleware**
60
- - **Input validation** with schema validation libraries
61
-
62
- #### Enhanced Responsibilities
63
-
64
- - Implement secure API endpoints with comprehensive validation
65
- - Add authentication middleware and role-based access control
66
- - Integrate rate limiting for DoS protection
67
- - Create type-safe API responses and data fetching
68
- - Handle errors gracefully with proper logging
69
- - Move business logic into dedicated service functions (not in controllers/handlers)
70
- - Keep responses typed and consistent with shared interfaces
71
-
72
- #### Security Requirements
73
-
74
- - **Always validate input** at API boundaries using schema validation
75
- - **Implement rate limiting** for all public endpoints
76
- - **Apply OWASP Top 10** protection patterns
77
- - **Log security events** appropriately without exposing sensitive data
78
- - **Handle errors** gracefully with proper error responses
79
-
80
- #### Technology Adaptations
81
-
82
- **Node.js (Express/Fastify/Next.js API):**
83
- - RESTful or GraphQL API patterns
84
- - Middleware-based authentication and validation
85
- - Schema validation with Zod, Joi, or similar
86
-
87
- **Python (Django/FastAPI/Flask):**
88
- - Django REST Framework or FastAPI patterns
89
- - Pydantic models for validation
90
- - SQLAlchemy or Django ORM patterns
91
-
92
- **Other Stacks:**
93
- - Adapt patterns to your chosen backend framework
94
- - Maintain consistent validation, authentication, and error handling
95
-
96
- ---
97
-
98
- ### DatabaseAgent (Data Layer & Schema Management)
99
-
100
- #### Scope
101
-
102
- - Owns **database schema, migrations, and data access patterns**
103
- - **Technology-agnostic**: Supports various database and ORM approaches
104
-
105
- #### Enhanced Responsibilities
106
-
107
- - **Schema Design**: Create optimized, scalable database schemas
108
- - **Migration Management**: Handle schema evolution safely
109
- - **Query Optimization**: Prevent N+1 queries and performance issues
110
- - **Data Access Patterns**: Implement consistent, type-safe data access
111
- - **Security**: Access controls, input sanitization, and audit logging
112
-
113
- #### Database Strategy Support
114
-
115
- **SQL Databases (PostgreSQL/MySQL/SQLite):**
116
- - Schema design with proper relationships and constraints
117
- - Migration strategies with version control
118
- - ORM integration (Prisma, TypeORM, Sequelize, SQLAlchemy, etc.)
119
- - Connection pooling and optimization
120
-
121
- **NoSQL Databases (MongoDB/DynamoDB/Firestore):**
122
- - Document schema design and validation
123
- - Index optimization and query patterns
124
- - ODM integration (Mongoose, etc.)
125
-
126
- **Cloud-Native Solutions:**
127
- - Supabase, Firebase, AWS RDS, Azure SQL, etc.
128
- - Built-in authentication and real-time features
129
- - Row-level security policies
130
-
131
- #### Security Requirements
132
-
133
- - **Input validation**: All database inputs must be validated
134
- - **Access control**: Implement proper authorization checks
135
- - **Injection prevention**: Use ORM/ODM-only access, avoid raw queries
136
- - **Audit logging**: Track important data changes
137
- - **Data encryption**: Handle sensitive data appropriately
138
-
139
- #### Must
140
-
141
- - **Choose one approach** and maintain consistency throughout the project
142
- - Never run manual destructive queries in production code
143
- - Always keep schema + migrations in sync
144
- - **Test database operations** with appropriate test patterns
145
- - **Document schema decisions** and migration strategies
146
-
147
- ---
148
-
149
- ### TestAgent (Comprehensive Testing)
150
-
151
- #### Scope
152
-
153
- - Owns **complete testing strategy**: unit, integration, E2E, and accessibility testing
154
- - **Framework-agnostic**: Adapts to chosen testing tools and frameworks
155
-
156
- #### Enhanced Responsibilities
157
-
158
- - **Unit Testing**: Components, functions, utilities with >80% coverage
159
- - **Integration Testing**: API endpoints, database operations, authentication flows
160
- - **E2E Testing**: Critical user journeys across browsers/devices
161
- - **Accessibility Testing**: Automated WCAG compliance checking
162
- - **Performance Testing**: Load times, Core Web Vitals, and performance budgets
163
- - **Security Testing**: Input validation and authentication testing
164
-
165
- #### Testing Patterns
166
-
167
- - **Component/Unit Testing**: Framework-appropriate testing utilities
168
- - **API Testing**: Mock dependencies, test authentication and validation
169
- - **E2E Testing**: Page Object Model with stable selectors and user scenarios
170
- - **Accessibility Testing**: Automated scanning and keyboard navigation
171
- - **Visual Regression**: Screenshot comparison for critical UI components
172
-
173
- #### Quality Gates
174
-
175
- - **Code Coverage**: Maintain >80% coverage for business logic
176
- - **E2E Coverage**: All critical user flows must have E2E tests
177
- - **Accessibility**: All public interfaces must pass WCAG 2.1 AA standards
178
- - **Performance**: Meet performance thresholds for your platform
179
- - **Security**: Authentication and authorization flows fully tested
180
-
181
- #### Technology Adaptations
182
-
183
- **JavaScript/TypeScript:**
184
- - Jest, Vitest, or framework-specific test runners
185
- - Testing Library, Enzyme, or component testing utilities
186
- - Playwright, Cypress, or Selenium for E2E testing
187
-
188
- **Python:**
189
- - pytest, unittest with appropriate fixtures and mocking
190
- - Selenium or Playwright for browser testing
191
-
192
- **Other Languages:**
193
- - Adapt to language-specific testing frameworks
194
- - Maintain consistent testing patterns and quality gates
195
-
196
- ---
197
-
198
- ### SecurityAgent (Security & Compliance)
199
-
200
- #### Scope
201
-
202
- - **Security-first development** across all application layers
203
- - **OWASP Top 10** protection implementation
204
- - **Authentication & authorization** security patterns
205
- - **Input validation** and **output sanitization**
206
- - **Security monitoring** and **audit logging**
207
-
208
- #### Responsibilities
209
-
210
- - **Input Validation**: Implement schema validation for all user inputs
211
- - **Authentication Security**: Secure session management and multi-factor authentication
212
- - **Authorization**: Role-based access control (RBAC) implementation
213
- - **Rate Limiting**: DoS protection with appropriate algorithms
214
- - **Security Headers**: CSP, HSTS, and comprehensive security header configuration
215
- - **Data Protection**: Encryption, sanitization, and secure data handling
216
- - **Audit Logging**: Security event logging without exposing sensitive data
217
- - **Vulnerability Assessment**: Regular security pattern reviews
218
-
219
- #### Security Patterns
220
-
221
- - **Authentication**: Multi-provider authentication with secure session management
222
- - **Authorization**: Middleware-based route protection with role validation
223
- - **Input Validation**: Schema validation at every boundary
224
- - **Rate Limiting**: Technology-appropriate rate limiting implementation
225
- - **Error Handling**: Secure error responses that don't leak sensitive information
226
- - **Database Security**: ORM/ODM-only access with parameterized queries
227
- - **File Upload Security**: Content type validation and secure storage
228
-
229
- #### Technology Adaptations
230
-
231
- **Web Applications:**
232
- - JWT tokens with proper expiration and refresh patterns
233
- - HTTPS enforcement and security headers
234
- - CORS configuration and CSRF protection
235
-
236
- **API Security:**
237
- - API key management and OAuth2/OpenID Connect
238
- - Request signing and payload validation
239
- - Rate limiting per API consumer
240
-
241
- #### Must
242
-
243
- - **Validate all inputs** with appropriate schema validation
244
- - **Implement rate limiting** on authentication and public endpoints
245
- - **Apply security headers** to all responses
246
- - **Log security events** appropriately
247
- - **Never expose sensitive data** in error messages or logs
248
-
249
- ---
250
-
251
- ### ReviewerAgent (Code Review & Quality)
252
-
253
- #### Enhanced Scope
254
-
255
- - Reviews changes for **correctness, security, performance, and readability**
256
- - **Security vulnerability assessment** using OWASP guidelines
257
- - **Performance impact analysis** and optimization recommendations
258
- - **Test coverage verification** and quality assessment
259
- - **Accessibility compliance** checking
260
- - **Code quality standards** enforcement
261
-
262
- #### Security Review Focus
263
-
264
- - **Input validation**: Ensure all user inputs are properly validated
265
- - **Authentication flows**: Verify secure authentication implementation
266
- - **Authorization checks**: Validate role-based access controls
267
- - **Data exposure**: Check for sensitive data leaks in responses
268
- - **Error handling**: Ensure secure error message patterns
269
- - **Dependencies**: Review third-party package security
270
-
271
- #### Quality Standards
272
-
273
- - **Type Safety**: Strict typing without loose type usage
274
- - **Testing**: Appropriate test coverage for new functionality
275
- - **Performance**: Bundle/binary size impact and performance considerations
276
- - **Accessibility**: WCAG 2.1 AA compliance for user-facing features
277
- - **Security**: OWASP Top 10 protection patterns
278
- - **Documentation**: Clear code documentation and README updates
279
-
280
- #### Must
281
-
282
- - **Flag missing tests** for important logic and security flows
283
- - **Ensure security patterns** from `agents/rules/security.mdc` are followed
284
- - **Validate accessibility** for all user-facing components
285
- - **Check performance impact** of new dependencies and code changes
286
- - **Verify documentation** is updated for significant changes
287
- - **Ensure conventions** in `CLAUDE.md` are followed throughout
288
-
289
- ---
290
-
291
- ## Design Integration Patterns
292
-
293
- These rules define how to translate design inputs into code and must be followed for design-driven development.
294
-
295
- #### Required Design-to-Code Flow
296
-
297
- 1. **Analyze Design**: Extract design tokens, components, and interaction patterns
298
- 2. **Create Design System**: Establish consistent color, typography, and spacing tokens
299
- 3. **Component Architecture**: Break down designs into reusable components
300
- 4. **Responsive Patterns**: Ensure designs work across device sizes
301
- 5. **Accessibility Integration**: Include ARIA attributes and keyboard navigation
302
- 6. **Performance Optimization**: Implement lazy loading and efficient rendering
303
-
304
- #### Implementation Rules
305
-
306
- - **Design System First**: Create consistent tokens and reusable components
307
- - **Accessibility by Default**: Include ARIA labels, focus management, and keyboard navigation
308
- - **Performance Conscious**: Optimize images, fonts, and rendering patterns
309
- - **Responsive Design**: Mobile-first approach with appropriate breakpoints
310
- - **Type Safety**: Define proper interfaces for component props and data
311
- - **Testing Integration**: Include visual regression and accessibility testing
312
-
313
- #### Framework-Specific Patterns
314
-
315
- **Component-Based (React/Vue/Svelte):**
316
- - Atomic design principles with proper component hierarchy
317
- - Consistent prop interfaces and state management
318
- - Style composition with CSS modules, styled-components, or utility classes
319
-
320
- **Template-Based (Django/Rails/PHP):**
321
- - Consistent partial/template structure
322
- - Server-side rendering with progressive enhancement
323
- - Asset optimization and caching strategies
324
-
325
- ---
326
-
327
- ## Usage Guidelines
328
-
329
- 1. **Start with Security**: Always consider security implications first
330
- 2. **Choose Your Stack**: Adapt the specific technologies to your project needs
331
- 3. **Maintain Consistency**: Once you choose patterns, apply them consistently
332
- 4. **Test Everything**: Implement comprehensive testing at all levels
333
- 5. **Document Decisions**: Keep architectural decisions and patterns documented
334
- 6. **Review Regularly**: Use ReviewerAgent to maintain code quality
335
-
336
- This template provides the agent structure while remaining flexible for any technology stack you choose to implement.