RuleStack

Configs

Stacks

Compare

Diff

RuleStack

Configs

Stacks

Compare

Diff

Read API

RuleStack

Configs

Stacks

Compare

Diff

Read API

Diff/herringtondarkholme-megarepo-clinerules-readme ↔ herringtondarkholme-megarepo-cursor-rules-security

Comparison

A · Cline rules · HerringtonDarkholme/megarepoB · Cursor rules · HerringtonDarkholme/megarepo
What each file covers, counted
DimensionSharedOnly in AOnly in BOverlap
Sections06110%
Commands000—
Section tags0250%

What each file covers

Sections

0 shared · 6 only in A · 11 only in B
  • − Cline Rules for Megarepo
  • − Rules Structure
  • − How Cline Uses These Rules
  • − Customization
  • − Rules Bank Approach
  • − Consistency with Other AI Assistants
  • + Security & API Key Management
  • + Core Security Principles
  • + 1. API Key and Credential Management
  • + 2. Environment Variable Patterns
  • + AI Service Keys
  • + Application Settings
  • + Database (if needed)
  • + 3. Data Privacy Guidelines
  • + 4. API Security Best Practices
  • + 5. Error Handling Security
  • + 6. Rate Limiting and Monitoring

Commands

neither file has any

Section tags

0 shared · 2 only in A · 5 only in B
  • − architecture
  • − do-not
  • + setup
  • + code-style
  • + security
  • + database
  • + api

Line diff

+55 added−29 removed11 unchanged16.7% identical
HerringtonDarkholme/megarepo · .clinerules/README.md
@@ −1 @@
1# Cline Rules for Megarepo
 
 
 
 
2 
3This directory contains Cline Rules that provide system-level guidance for the Cline AI assistant when working on this AI setup repository.
4 
5## Rules Structure
6 
7The rules are organized into focused files that build upon each other:
8 
91. **`01-core-principles.md`** - Fundamental principles including minimal change philosophy and AI-first development
102. **`02-development.md`** - Development guidelines for Node.js/Next.js AI projects
113. **`03-documentation.md`** - Documentation requirements and standards
124. **`04-security.md`** - Security guidelines for AI projects and API key management
 
 
13 
14## How Cline Uses These Rules
 
 
 
 
 
15 
16Cline automatically processes all Markdown files in this directory, combining them into a unified set of rules. The numeric prefixes help organize the files in a logical sequence, ensuring core principles are established before specific guidelines.
 
 
17 
18## Customization
 
 
19 
20These rules are tailored specifically for the Megarepo AI setup repository and should be updated as the project evolves. The rules emphasize:
 
 
 
 
21 
22- **Minimal Changes**: Surgical, precise modifications that respect the repository's intentional simplicity
23- **AI-First Development**: Patterns and practices optimized for AI service integrations
24- **Security Best Practices**: Safe handling of API keys and sensitive data
25- **Node.js/Next.js Patterns**: Guidelines specific to the target technology stack
 
26 
27## Rules Bank Approach
 
 
 
 
 
 
 
 
 
 
 
 
 
28 
29This repository follows the "active rules" pattern where the `.clinerules/` directory contains only the rules that should be active. For projects with multiple contexts, consider creating a `clinerules-bank/` directory with additional rule sets that can be activated as needed.
30 
31## Consistency with Other AI Assistants
32 
33These rules are designed to work alongside other AI assistant configurations in this repository:
34- GitHub Copilot (`.github/copilot-instructions.md`)
35- Claude AI (`CLAUDE.md`)
36- Cursor AI (`.cursorrules`)
37- Gemini CLI (`GEMINI.md`)
38- Universal AI guidelines (`AGENT.md`, `AGENTS.md`)
39 
40All configurations share common principles while being optimized for each assistant's specific capabilities.
HerringtonDarkholme/megarepo · .cursor/rules/security.mdc
@@ +1 @@
1---
2description: "Security guidelines and API key management best practices"
3globs: ["**/*.env*", "**/*.config.*", "src/lib/**/*", "app/api/**/*"]
4alwaysApply: true
5---
6 
7# Security & API Key Management
8 
9Critical security guidelines for AI development in this repository.
10 
11## Core Security Principles
12 
13### 1. API Key and Credential Management
14- **NEVER** commit API keys, secrets, or credentials to version control
15- Always use environment variables for sensitive data
16- Create `.env.example` files to document required environment variables
17- Implement proper API key rotation and management patterns
18- Use secure storage solutions for production deployments
19 
20### 2. Environment Variable Patterns
21Create `.env.local` with these patterns:
22```env
23# AI Service Keys
24OPENAI_API_KEY=your_openai_key_here
25ANTHROPIC_API_KEY=your_anthropic_key_here
26 
27# Application Settings
28NEXT_PUBLIC_APP_URL=http://localhost:3000
29NODE_ENV=development
30 
31# Database (if needed)
32DATABASE_URL=your_database_url_here
33```
34 
35### 3. Data Privacy Guidelines
36- Avoid sending sensitive user data to AI services
37- Implement data anonymization where possible
38- Follow GDPR and privacy regulations
39- Document data usage and retention policies
40 
41### 4. API Security Best Practices
42- Validate all inputs before sending to AI services
43- Implement proper CORS settings
44- Use HTTPS for all AI API communications
45- Regularly rotate API keys and secrets
46 
47### 5. Error Handling Security
48```javascript
49// Secure error handling - don't expose sensitive details
50try {
51 const response = await aiClient.complete(prompt);
52 return response;
53} catch (error) {
54 // Log detailed error internally
55 logger.error('AI service error', { error, userId: user.id });
56
57 // Return generic error to client
58 throw new Error('AI service temporarily unavailable');
59}
60```
61 
62### 6. Rate Limiting and Monitoring
63- Implement proper rate limiting for AI API endpoints
64- Monitor API usage and costs
65- Track unusual usage patterns
66- Implement health checks for AI services
 
 
 
 
 
 
 
@@ −1 +1 @@
1−# Cline Rules for Megarepo
1+---
2+description: "Security guidelines and API key management best practices"
3+globs: ["**/*.env*", "**/*.config.*", "src/lib/**/*", "app/api/**/*"]
4+alwaysApply: true
5+---
26  
3−This directory contains Cline Rules that provide system-level guidance for the Cline AI assistant when working on this AI setup repository.
7+# Security & API Key Management
48  
5−## Rules Structure
9+Critical security guidelines for AI development in this repository.
610  
7−The rules are organized into focused files that build upon each other:
11+## Core Security Principles
812  
9−1. **`01-core-principles.md`** - Fundamental principles including minimal change philosophy and AI-first development
10−2. **`02-development.md`** - Development guidelines for Node.js/Next.js AI projects
11−3. **`03-documentation.md`** - Documentation requirements and standards
12−4. **`04-security.md`** - Security guidelines for AI projects and API key management
13+### 1. API Key and Credential Management
14+- **NEVER** commit API keys, secrets, or credentials to version control
15+- Always use environment variables for sensitive data
16+- Create `.env.example` files to document required environment variables
17+- Implement proper API key rotation and management patterns
18+- Use secure storage solutions for production deployments
1319  
14−## How Cline Uses These Rules
20+### 2. Environment Variable Patterns
21+Create `.env.local` with these patterns:
22+```env
23+# AI Service Keys
24+OPENAI_API_KEY=your_openai_key_here
25+ANTHROPIC_API_KEY=your_anthropic_key_here
1526  
16−Cline automatically processes all Markdown files in this directory, combining them into a unified set of rules. The numeric prefixes help organize the files in a logical sequence, ensuring core principles are established before specific guidelines.
27+# Application Settings
28+NEXT_PUBLIC_APP_URL=http://localhost:3000
29+NODE_ENV=development
1730  
18−## Customization
31+# Database (if needed)
32+DATABASE_URL=your_database_url_here
33+```
1934  
20−These rules are tailored specifically for the Megarepo AI setup repository and should be updated as the project evolves. The rules emphasize:
35+### 3. Data Privacy Guidelines
36+- Avoid sending sensitive user data to AI services
37+- Implement data anonymization where possible
38+- Follow GDPR and privacy regulations
39+- Document data usage and retention policies
2140  
22−- **Minimal Changes**: Surgical, precise modifications that respect the repository's intentional simplicity
23−- **AI-First Development**: Patterns and practices optimized for AI service integrations
24−- **Security Best Practices**: Safe handling of API keys and sensitive data
25−- **Node.js/Next.js Patterns**: Guidelines specific to the target technology stack
41+### 4. API Security Best Practices
42+- Validate all inputs before sending to AI services
43+- Implement proper CORS settings
44+- Use HTTPS for all AI API communications
45+- Regularly rotate API keys and secrets
2646  
27−## Rules Bank Approach
47+### 5. Error Handling Security
48+```javascript
49+// Secure error handling - don't expose sensitive details
50+try {
51+ const response = await aiClient.complete(prompt);
52+ return response;
53+} catch (error) {
54+ // Log detailed error internally
55+ logger.error('AI service error', { error, userId: user.id });
56+
57+ // Return generic error to client
58+ throw new Error('AI service temporarily unavailable');
59+}
60+```
2861  
29−This repository follows the "active rules" pattern where the `.clinerules/` directory contains only the rules that should be active. For projects with multiple contexts, consider creating a `clinerules-bank/` directory with additional rule sets that can be activated as needed.
30− 
31−## Consistency with Other AI Assistants
32− 
33−These rules are designed to work alongside other AI assistant configurations in this repository:
34−- GitHub Copilot (`.github/copilot-instructions.md`)
35−- Claude AI (`CLAUDE.md`)
36−- Cursor AI (`.cursorrules`)
37−- Gemini CLI (`GEMINI.md`)
38−- Universal AI guidelines (`AGENT.md`, `AGENTS.md`)
39− 
40−All configurations share common principles while being optimized for each assistant's specific capabilities.
62+### 6. Rate Limiting and Monitoring
63+- Implement proper rate limiting for AI API endpoints
64+- Monitor API usage and costs
65+- Track unusual usage patterns
66+- Implement health checks for AI services
RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack