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-prompt-engineering

Comparison

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

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
  • + Prompt Engineering Templates
  • + Prompt Engineering Best Practices
  • + 1. Prompt Structure Templates
  • + 2. Prompt Versioning
  • + 3. Dynamic Prompt Generation
  • + 4. Context Management
  • + 5. Prompt Optimization Techniques
  • + 6. Testing and Validation

Commands

0 shared · 0 only in A · 1 only in B
  • + task: string,

Section tags

1 shared · 1 only in A · 2 only in B
  • − do-not
  • + test
  • + code-style
  •   architecture

Line diff

+64 added−27 removed13 unchanged16.9% 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/prompt-engineering.mdc
@@ +1 @@
1---
2description: "Prompt engineering templates and best practices for AI model interactions"
3alwaysApply: false
4---
5 
6# Prompt Engineering Templates
7 
8Guidelines and templates for effective AI prompt engineering. Use `@prompt-engineering` to include this rule.
9 
10## Prompt Engineering Best Practices
11 
12### 1. Prompt Structure Templates
13```typescript
14// System prompt template
15const SYSTEM_PROMPT = `
16You are an expert assistant specialized in [DOMAIN].
17Your responses should be:
18- Accurate and factual
19- Concise but comprehensive
20- Professional in tone
21- Focused on [SPECIFIC_GOAL]
22 
23Context: [CONTEXT_INFORMATION]
24`;
25 
26// User prompt template
27const createUserPrompt = (input: string, context?: string) => `
28Task: ${input}
29${context ? `Additional context: ${context}` : ''}
30 
31Please provide a response that follows the system guidelines.
32`;
33```
34 
35### 2. Prompt Versioning
36- Store prompts in separate configuration files
37- Version prompts for A/B testing
38- Track prompt performance and iterate
39- Document prompt changes and rationale
40 
41### 3. Dynamic Prompt Generation
42```typescript
43interface PromptConfig {
44 system: string;
45 temperature: number;
46 maxTokens: number;
47 stopSequences?: string[];
48}
49 
50const generatePrompt = (
51 task: string,
52 userInput: string,
53 config: PromptConfig
54) => {
55 // Build context-aware prompts
56 // Include relevant examples
57 // Optimize for token efficiency
58};
59```
60 
61### 4. Context Management
62- Implement conversation memory
63- Manage context window limits
64- Prioritize relevant information
65- Handle context overflow gracefully
66 
67### 5. Prompt Optimization Techniques
68- Use few-shot learning examples
69- Implement chain-of-thought prompting
70- Apply role-based prompting
71- Include output format specifications
72 
73### 6. Testing and Validation
74- Create test suites for prompt effectiveness
75- Measure response quality metrics
76- Compare different prompt versions
77- Monitor prompt performance in production
 
 
 
@@ −1 +1 @@
1−# Cline Rules for Megarepo
1+---
2+description: "Prompt engineering templates and best practices for AI model interactions"
3+alwaysApply: false
4+---
25  
3−This directory contains Cline Rules that provide system-level guidance for the Cline AI assistant when working on this AI setup repository.
6+# Prompt Engineering Templates
47  
5−## Rules Structure
8+Guidelines and templates for effective AI prompt engineering. Use `@prompt-engineering` to include this rule.
69  
7−The rules are organized into focused files that build upon each other:
10+## Prompt Engineering Best Practices
811  
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
12+### 1. Prompt Structure Templates
13+```typescript
14+// System prompt template
15+const SYSTEM_PROMPT = `
16+You are an expert assistant specialized in [DOMAIN].
17+Your responses should be:
18+- Accurate and factual
19+- Concise but comprehensive
20+- Professional in tone
21+- Focused on [SPECIFIC_GOAL]
1322  
14−## How Cline Uses These Rules
23+Context: [CONTEXT_INFORMATION]
24+`;
1525  
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.
26+// User prompt template
27+const createUserPrompt = (input: string, context?: string) => `
28+Task: ${input}
29+${context ? `Additional context: ${context}` : ''}
1730  
18−## Customization
31+Please provide a response that follows the system guidelines.
32+`;
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+### 2. Prompt Versioning
36+- Store prompts in separate configuration files
37+- Version prompts for A/B testing
38+- Track prompt performance and iterate
39+- Document prompt changes and rationale
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+### 3. Dynamic Prompt Generation
42+```typescript
43+interface PromptConfig {
44+ system: string;
45+ temperature: number;
46+ maxTokens: number;
47+ stopSequences?: string[];
48+}
2649  
27−## Rules Bank Approach
50+const generatePrompt = (
51+ task: string,
52+ userInput: string,
53+ config: PromptConfig
54+) => {
55+ // Build context-aware prompts
56+ // Include relevant examples
57+ // Optimize for token efficiency
58+};
59+```
2860  
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.
61+### 4. Context Management
62+- Implement conversation memory
63+- Manage context window limits
64+- Prioritize relevant information
65+- Handle context overflow gracefully
3066  
31−## Consistency with Other AI Assistants
67+### 5. Prompt Optimization Techniques
68+- Use few-shot learning examples
69+- Implement chain-of-thought prompting
70+- Apply role-based prompting
71+- Include output format specifications
3272  
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.
73+### 6. Testing and Validation
74+- Create test suites for prompt effectiveness
75+- Measure response quality metrics
76+- Compare different prompt versions
77+- Monitor prompt performance in production
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