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-testing-advanced

Comparison

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

What each file covers

Sections

0 shared · 6 only in A · 9 only in B
  • − Cline Rules for Megarepo
  • − Rules Structure
  • − How Cline Uses These Rules
  • − Customization
  • − Rules Bank Approach
  • − Consistency with Other AI Assistants
  • + Advanced AI Testing Patterns
  • + AI-Specific Testing Approaches
  • + 1. AI Service Mocking
  • + 2. Integration Testing Patterns
  • + 3. Performance Testing
  • + 4. End-to-End Testing
  • + 5. Error Scenario Testing
  • + 6. Data Quality Testing
  • + 7. Accessibility Testing

Commands

neither file has any

Section tags

0 shared · 2 only in A · 4 only in B
  • − architecture
  • − do-not
  • + test
  • + code-style
  • + testing-strategy
  • + performance

Line diff

+72 added−29 removed11 unchanged13.3% 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/testing-advanced.mdc
@@ +1 @@
1---
2description: "Advanced testing patterns for AI applications including mocking, integration tests, and performance monitoring"
3globs: ["**/*.test.*", "**/*.spec.*", "tests/**/*", "__tests__/**/*"]
4alwaysApply: false
5---
6 
7# Advanced AI Testing Patterns
8 
9Comprehensive testing strategies for AI-powered applications.
10 
11## AI-Specific Testing Approaches
12 
13### 1. AI Service Mocking
14```typescript
15// Mock AI service responses for consistent testing
16const mockAIService = {
17 complete: jest.fn(),
18 stream: jest.fn(),
19 embed: jest.fn()
20};
21 
22beforeEach(() => {
23 mockAIService.complete.mockResolvedValue({
24 content: 'Mocked AI response',
25 usage: { prompt_tokens: 10, completion_tokens: 20 }
26 });
27});
28```
29 
30### 2. Integration Testing Patterns
31```typescript
32describe('AI Integration Tests', () => {
33 it('handles real AI service responses', async () => {
34 // Use test API keys for integration tests
35 // Test with actual AI services in staging
36 // Validate response formats and data
37 // Handle rate limiting and timeouts
38 });
39
40 it('gracefully handles AI service outages', async () => {
41 // Test failure scenarios
42 // Validate fallback behaviors
43 // Ensure user experience remains smooth
44 });
45});
46```
47 
48### 3. Performance Testing
49- Monitor AI response times
50- Test under concurrent load
51- Measure token usage and costs
52- Validate memory usage patterns
53 
54### 4. End-to-End Testing
55```typescript
56// Test complete AI workflows
57describe('AI Chat Flow', () => {
58 it('completes full conversation cycle', async () => {
59 // Send user message
60 // Receive AI response
61 // Validate UI updates
62 // Test conversation history
63 });
64});
65```
66 
67### 5. Error Scenario Testing
68- Test API rate limit handling
69- Validate quota exceeded scenarios
70- Test network failure recovery
71- Verify error message display
72 
73### 6. Data Quality Testing
74- Validate AI response formats
75- Test prompt injection prevention
76- Verify content filtering
77- Check for appropriate responses
78 
79### 7. Accessibility Testing
80- Test screen reader compatibility
81- Validate keyboard navigation
82- Check color contrast compliance
83- Test with assistive technologies
 
 
 
 
 
 
 
@@ −1 +1 @@
1−# Cline Rules for Megarepo
1+---
2+description: "Advanced testing patterns for AI applications including mocking, integration tests, and performance monitoring"
3+globs: ["**/*.test.*", "**/*.spec.*", "tests/**/*", "__tests__/**/*"]
4+alwaysApply: false
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+# Advanced AI Testing Patterns
48  
5−## Rules Structure
9+Comprehensive testing strategies for AI-powered applications.
610  
7−The rules are organized into focused files that build upon each other:
11+## AI-Specific Testing Approaches
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. AI Service Mocking
14+```typescript
15+// Mock AI service responses for consistent testing
16+const mockAIService = {
17+ complete: jest.fn(),
18+ stream: jest.fn(),
19+ embed: jest.fn()
20+};
1321  
14−## How Cline Uses These Rules
22+beforeEach(() => {
23+ mockAIService.complete.mockResolvedValue({
24+ content: 'Mocked AI response',
25+ usage: { prompt_tokens: 10, completion_tokens: 20 }
26+ });
27+});
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+### 2. Integration Testing Patterns
31+```typescript
32+describe('AI Integration Tests', () => {
33+ it('handles real AI service responses', async () => {
34+ // Use test API keys for integration tests
35+ // Test with actual AI services in staging
36+ // Validate response formats and data
37+ // Handle rate limiting and timeouts
38+ });
39+
40+ it('gracefully handles AI service outages', async () => {
41+ // Test failure scenarios
42+ // Validate fallback behaviors
43+ // Ensure user experience remains smooth
44+ });
45+});
46+```
1747  
18−## Customization
48+### 3. Performance Testing
49+- Monitor AI response times
50+- Test under concurrent load
51+- Measure token usage and costs
52+- Validate memory usage patterns
1953  
20−These rules are tailored specifically for the Megarepo AI setup repository and should be updated as the project evolves. The rules emphasize:
54+### 4. End-to-End Testing
55+```typescript
56+// Test complete AI workflows
57+describe('AI Chat Flow', () => {
58+ it('completes full conversation cycle', async () => {
59+ // Send user message
60+ // Receive AI response
61+ // Validate UI updates
62+ // Test conversation history
63+ });
64+});
65+```
2166  
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
67+### 5. Error Scenario Testing
68+- Test API rate limit handling
69+- Validate quota exceeded scenarios
70+- Test network failure recovery
71+- Verify error message display
2672  
27−## Rules Bank Approach
73+### 6. Data Quality Testing
74+- Validate AI response formats
75+- Test prompt injection prevention
76+- Verify content filtering
77+- Check for appropriate responses
2878  
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.
79+### 7. Accessibility Testing
80+- Test screen reader compatibility
81+- Validate keyboard navigation
82+- Check color contrast compliance
83+- Test with assistive technologies
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