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-ai-development

Comparison

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

What each file covers

Sections

0 shared · 6 only in A · 8 only in B
  • − Cline Rules for Megarepo
  • − Rules Structure
  • − How Cline Uses These Rules
  • − Customization
  • − Rules Bank Approach
  • − Consistency with Other AI Assistants
  • + AI Development Best Practices
  • + AI-First Development Principles
  • + 1. API Integration Patterns
  • + 2. Preferred AI Integration Pattern
  • + 3. Recommended AI Dependencies
  • + 4. Response Handling Best Practices
  • + 5. Performance Optimization
  • + 6. User Experience Guidelines

Commands

neither file has any

Section tags

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

Line diff

+48 added−30 removed10 unchanged17.2% 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/ai-development.mdc
@@ +1 @@
1---
2description: "Core AI development patterns and best practices for the Megarepo AI setup repository"
3globs: ["src/**/*", "app/**/*", "pages/**/*"]
4alwaysApply: true
5---
6 
7# AI Development Best Practices
8 
9You are working on an AI-focused development project. Follow these core principles for AI integration:
10 
11## AI-First Development Principles
12 
13### 1. API Integration Patterns
14- Use modern async/await patterns for all AI API calls
15- Implement comprehensive error handling for AI service failures
16- Consider token usage and model performance optimization
17- Design for scalability with AI workloads
18 
19### 2. Preferred AI Integration Pattern
20```javascript
21const aiResponse = await fetch('/api/ai-service', {
22 method: 'POST',
23 headers: {
24 'Content-Type': 'application/json',
25 'Authorization': `Bearer ${process.env.AI_API_KEY}`
26 },
27 body: JSON.stringify({ prompt, options })
28});
29 
30if (!aiResponse.ok) {
31 throw new Error(`AI service error: ${aiResponse.status}`);
32}
33```
34 
35### 3. Recommended AI Dependencies
36When adding AI functionality, prefer these established packages:
37- `openai` - Official OpenAI API client
38- `@langchain/core` - LangChain framework
39- `@vercel/ai` - Vercel AI SDK
40- `@huggingface/inference` - Hugging Face API client
41 
42### 4. Response Handling Best Practices
43- Always validate AI responses before using them
44- Implement fallback mechanisms for failed requests
45- Log AI interactions for debugging and monitoring
46- Handle streaming responses appropriately
47 
48### 5. Performance Optimization
49- Cache AI responses when appropriate
50- Implement request debouncing for user inputs
51- Use background processing for long-running AI tasks
52- Consider edge functions for AI API proxying
53 
54### 6. User Experience Guidelines
55- Provide clear loading indicators for AI operations
56- Implement progressive disclosure for complex AI features
57- Give users control over AI behavior and settings
58- Provide feedback mechanisms for AI output quality
 
 
 
 
 
 
 
 
 
@@ −1 +1 @@
1−# Cline Rules for Megarepo
1+---
2+description: "Core AI development patterns and best practices for the Megarepo AI setup repository"
3+globs: ["src/**/*", "app/**/*", "pages/**/*"]
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+# AI Development Best Practices
48  
5−## Rules Structure
9+You are working on an AI-focused development project. Follow these core principles for AI integration:
610  
7−The rules are organized into focused files that build upon each other:
11+## AI-First Development 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 Integration Patterns
14+- Use modern async/await patterns for all AI API calls
15+- Implement comprehensive error handling for AI service failures
16+- Consider token usage and model performance optimization
17+- Design for scalability with AI workloads
1318  
14−## How Cline Uses These Rules
19+### 2. Preferred AI Integration Pattern
20+```javascript
21+const aiResponse = await fetch('/api/ai-service', {
22+ method: 'POST',
23+ headers: {
24+ 'Content-Type': 'application/json',
25+ 'Authorization': `Bearer ${process.env.AI_API_KEY}`
26+ },
27+ body: JSON.stringify({ prompt, options })
28+});
1529  
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.
30+if (!aiResponse.ok) {
31+ throw new Error(`AI service error: ${aiResponse.status}`);
32+}
33+```
1734  
18−## Customization
35+### 3. Recommended AI Dependencies
36+When adding AI functionality, prefer these established packages:
37+- `openai` - Official OpenAI API client
38+- `@langchain/core` - LangChain framework
39+- `@vercel/ai` - Vercel AI SDK
40+- `@huggingface/inference` - Hugging Face API client
1941  
20−These rules are tailored specifically for the Megarepo AI setup repository and should be updated as the project evolves. The rules emphasize:
42+### 4. Response Handling Best Practices
43+- Always validate AI responses before using them
44+- Implement fallback mechanisms for failed requests
45+- Log AI interactions for debugging and monitoring
46+- Handle streaming responses appropriately
2147  
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
48+### 5. Performance Optimization
49+- Cache AI responses when appropriate
50+- Implement request debouncing for user inputs
51+- Use background processing for long-running AI tasks
52+- Consider edge functions for AI API proxying
2653  
27−## Rules Bank Approach
28− 
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.
54+### 6. User Experience Guidelines
55+- Provide clear loading indicators for AI operations
56+- Implement progressive disclosure for complex AI features
57+- Give users control over AI behavior and settings
58+- Provide feedback mechanisms for AI output quality
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