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
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
## Project Guidelines
|
|
2
|
+
|
|
3
|
+
This is a **technology-agnostic development template** with enterprise-grade patterns for security, testing, and developer experience.
|
|
4
|
+
These guidelines are for both humans and AI assistants working with any technology stack.
|
|
5
|
+
|
|
6
|
+
- High-level **project and architecture** guidelines live here in `CLAUDE.md`.
|
|
7
|
+
- **Agent responsibilities** and MCP integration are documented in `AGENTS.MD`.
|
|
8
|
+
- **Detailed implementation rules** live in `agents/rules/*.mdc` files.
|
|
9
|
+
|
|
10
|
+
Read this file first to understand the architecture, then consult `AGENTS.md` for agent delegation.
|
|
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
|
+
---
|
|
102
|
+
|
|
103
|
+
## Core Architecture Principles
|
|
104
|
+
|
|
105
|
+
### Security-First Development
|
|
106
|
+
- **Input Validation**: Validate all user inputs at application boundaries
|
|
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
|
|
111
|
+
|
|
112
|
+
### Performance Optimization
|
|
113
|
+
- **Asset Optimization**: Compress images, minify code, implement caching
|
|
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
|
|
117
|
+
|
|
118
|
+
### Type Safety & Validation
|
|
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
|
|
123
|
+
|
|
124
|
+
### Testing Strategy
|
|
125
|
+
- **Unit Testing**: Test individual functions and components (80% of tests)
|
|
126
|
+
- **Integration Testing**: Test API endpoints and database operations (15% of tests)
|
|
127
|
+
- **End-to-End Testing**: Test critical user journeys (5% of tests)
|
|
128
|
+
- **Accessibility Testing**: Automated WCAG compliance checking
|
|
129
|
+
- **Security Testing**: Input validation and authentication flow testing
|
|
130
|
+
|
|
131
|
+
### Developer Experience
|
|
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
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## Project Structure Patterns
|
|
140
|
+
|
|
141
|
+
### Feature-Based Structure
|
|
142
|
+
Organize code by business domain rather than technical layer:
|
|
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
|
|
193
|
+
|
|
194
|
+
### Security Standards
|
|
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
|
|
200
|
+
|
|
201
|
+
### Testing Standards
|
|
202
|
+
- **Coverage**: Maintain >80% test coverage for business logic
|
|
203
|
+
- **Reliability**: Tests should be deterministic and fast
|
|
204
|
+
- **Maintainability**: Clear test organization and proper mocking patterns
|
|
205
|
+
- **Accessibility**: All user-facing features tested for WCAG compliance
|
|
206
|
+
|
|
207
|
+
### Documentation Standards
|
|
208
|
+
- **API Documentation**: Complete endpoint documentation with examples
|
|
209
|
+
- **Component Documentation**: Props, usage examples, accessibility notes
|
|
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
|
|
241
|
+
|
|
242
|
+
---
|
|
243
|
+
|
|
244
|
+
## Maintenance & Evolution
|
|
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.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Technology-Agnostic Development Template
|
|
2
|
+
|
|
3
|
+
This template has been installed by the agents-templated npm package.
|
|
4
|
+
|
|
5
|
+
## What's Included
|
|
6
|
+
|
|
7
|
+
Depending on what you installed, you may have:
|
|
8
|
+
|
|
9
|
+
- **AGENTS.MD**: Agent patterns and delegation guide
|
|
10
|
+
- **ARCHITECTURE.md**: Project guidelines and architecture
|
|
11
|
+
- **AI_INSTRUCTIONS.md**: Instructions for AI assistants
|
|
12
|
+
- **agents/rules/**: Development rules and patterns (6 files)
|
|
13
|
+
- **agents/skills/**: Reusable agent skills
|
|
14
|
+
- **CLAUDE.md**: Claude AI configuration
|
|
15
|
+
- **GEMINI.md**: Google Gemini configuration
|
|
16
|
+
- **.github/copilot-instructions.md**: GitHub Copilot configuration
|
|
17
|
+
- **.cursorrules**: Cursor IDE configuration
|
|
18
|
+
|
|
19
|
+
## Installation Options
|
|
20
|
+
|
|
21
|
+
If you're missing some components, you can install them:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
# Install everything
|
|
25
|
+
agents-templated init --all
|
|
26
|
+
|
|
27
|
+
# Or install specific components
|
|
28
|
+
agents-templated init --docs # Documentation files only
|
|
29
|
+
agents-templated init --rules # Agent rules only
|
|
30
|
+
agents-templated init --skills # Skills only
|
|
31
|
+
agents-templated init --github # GitHub Copilot config only
|
|
32
|
+
|
|
33
|
+
# List available components
|
|
34
|
+
agents-templated list
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Rules and Skills
|
|
38
|
+
|
|
39
|
+
- **Rules** (`agents/rules/*.mdc`): Markdown files with YAML frontmatter (`description`, `globs`, `alwaysApply`). AI agents use them to know when to apply each rule. Adapt the content to your stack.
|
|
40
|
+
- **Skills** (`agents/skills/*/SKILL.md`): Extend agent capabilities (e.g. find-skills, web-design-guidelines). Each has a name, description, and when to use.
|
|
41
|
+
|
|
42
|
+
## Getting Started
|
|
43
|
+
|
|
44
|
+
1. Review AI_INSTRUCTIONS.md for AI assistance guidance
|
|
45
|
+
2. Review ARCHITECTURE.md for overall project guidelines
|
|
46
|
+
3. Review AGENTS.MD for agent patterns
|
|
47
|
+
4. Adapt the rules to your specific technology stack
|
|
48
|
+
5. Configure your AI assistant (Cursor, Copilot, Claude, Gemini)
|
|
49
|
+
|
|
50
|
+
## Documentation
|
|
51
|
+
|
|
52
|
+
For full documentation, visit: https://github.com/rickandrew2/agents-projects-templated
|
|
53
|
+
|
|
@@ -1,111 +0,0 @@
|
|
|
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.
|
|
File without changes
|