| Dimension | Shared | Only in A | Only in B | Overlap |
|---|---|---|---|---|
| Sections | 0 | 6 | 14 | 0% |
| Commands | 0 | 0 | 3 | 0% |
| Section tags | 1 | 1 | 6 | 13% |
What each file covers
Sections
0 shared · 6 only in A · 14 only in B- − Cline Rules for Megarepo
- − Rules Structure
- − How Cline Uses These Rules
- − Customization
- − Rules Bank Approach
- − Consistency with Other AI Assistants
- + Development Guidelines
- + Technology Stack
- + When Source Code is Added
- + Always verify package.json exists first
- + Install dependencies with appropriate timeout
- + Build with extended timeout for AI projects
- + Run tests with adequate time
- + Build with reasonable timeout for most projects
- + AI Integration Best Practices
- + Preferred AI Dependencies
- + Code Organization
- + Error Handling Pattern
- + File Structure Standards
- + Development Workflow
Commands
0 shared · 0 only in A · 3 only in B- + npm install
- + npm run build
- + npm test
Section tags
1 shared · 1 only in A · 6 only in B- − do-not
- + setup
- + build
- + test
- + code-style
- + dependencies
- + agent-behaviour
- architecture
Line diff
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 · .clinerules/02-development.md
@@ +1 @@
1# Development Guidelines
2
3## Technology Stack
4This repository is pre-configured for **Node.js/Next.js development** with AI integrations.
5
6### When Source Code is Added
7Follow these patterns based on existing repository guidelines:
8
9```bash
10# Always verify package.json exists first
11test -f package.json && echo "Node.js project detected" || echo "No package.json found"
12
13# Install dependencies with appropriate timeout
14npm install # Allow 10+ minutes for completion
15
16# Build with extended timeout for AI projects
17npm run build # Allow 60+ minutes - AI projects can have complex builds
18
19# Run tests with adequate time
20npm test # Allow 30+ minutes for comprehensive test suites
21```
22# Build with reasonable timeout for most projects
23npm run build # Allow 15-30 minutes for most Node.js/Next.js builds with AI integrations
24
25# Run tests with adequate time
26npm test # Allow 30+ minutes for comprehensive test suites
27## AI Integration Best Practices
28
29### Preferred AI Dependencies
30When adding AI functionality, use these established packages:
31- `openai` - Official OpenAI API client
32- `@langchain/core` - LangChain framework for AI workflows
33- `@vercel/ai` - Vercel AI SDK for streaming and UI integration
34- `@huggingface/inference` - Hugging Face API client
35- `@anthropic-ai/sdk` - Anthropic Claude API client
36
37### Code Organization
38- Place AI client configurations in `src/lib/` directory
39- Create reusable AI components in `src/components/ai/`
40- Implement API routes for AI services in `src/app/api/` (Next.js App Router)
41- Define TypeScript types for AI responses in `src/types/`
42
43### Error Handling Pattern
44```javascript
45// Implement comprehensive error handling for AI services
46try {
47 const response = await aiClient.chat.completions.create({
48 model: "gpt-4",
49 messages: [{ role: "user", content: prompt }]
50 });
51 return response.choices[0].message.content;
52} catch (error) {
53 if (error.code === 'rate_limit_exceeded') {
54 throw new AIRateLimitError('Rate limit exceeded, please try again later');
55 }
56 if (error.code === 'insufficient_quota') {
57 throw new AIQuotaError('API quota exceeded');
58 }
59 throw new AIServiceError(`AI service failed: ${error.message}`);
60}
61```
62
63## File Structure Standards
64Follow the established minimal structure and expand thoughtfully:
65
66```
67.
68├── .clinerules/ # Cline AI rules (this directory)
69├── .github/ # GitHub workflows and Copilot instructions
70├── .kiro/steering/ # Kiro AI steering files
71├── .cursorrules # Cursor AI development rules
72├── CLAUDE.md # Claude AI specific configuration
73├── GEMINI.md # Gemini CLI configuration
74├── AGENT.md # Universal AI agent instructions
75├── package.json # Dependencies and scripts (when added)
76├── src/ # Source code (when added)
77│ ├── lib/ # AI clients and utilities
78│ ├── components/ # React components including AI components
79│ ├── app/ # Next.js App Router (pages and API routes)
80│ └── types/ # TypeScript definitions
81└── public/ # Static assets
82```
83
84## Development Workflow
851. **Before Changes**: Check repository state and existing patterns
862. **During Development**: Follow TypeScript best practices and AI patterns
873. **Testing**: Include AI service mocks and error scenario testing
884. **Documentation**: Update relevant AI configuration files as needed
@@ −1 +1 @@
1−# Cline Rules for Megarepo
1+# Development Guidelines
22
3−This directory contains Cline Rules that provide system-level guidance for the Cline AI assistant when working on this AI setup repository.
3+## Technology Stack
4+This repository is pre-configured for **Node.js/Next.js development** with AI integrations.
45
5−## Rules Structure
6+### When Source Code is Added
7+Follow these patterns based on existing repository guidelines:
68
7−The rules are organized into focused files that build upon each other:
9+```bash
10+# Always verify package.json exists first
11+test -f package.json && echo "Node.js project detected" || echo "No package.json found"
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+# Install dependencies with appropriate timeout
14+npm install # Allow 10+ minutes for completion
1315
14−## How Cline Uses These Rules
16+# Build with extended timeout for AI projects
17+npm run build # Allow 60+ minutes - AI projects can have complex builds
1518
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.
19+# Run tests with adequate time
20+npm test # Allow 30+ minutes for comprehensive test suites
21+```
22+# Build with reasonable timeout for most projects
23+npm run build # Allow 15-30 minutes for most Node.js/Next.js builds with AI integrations
1724
18−## Customization
25+# Run tests with adequate time
26+npm test # Allow 30+ minutes for comprehensive test suites
27+## AI Integration Best Practices
1928
20−These rules are tailored specifically for the Megarepo AI setup repository and should be updated as the project evolves. The rules emphasize:
29+### Preferred AI Dependencies
30+When adding AI functionality, use these established packages:
31+- `openai` - Official OpenAI API client
32+- `@langchain/core` - LangChain framework for AI workflows
33+- `@vercel/ai` - Vercel AI SDK for streaming and UI integration
34+- `@huggingface/inference` - Hugging Face API client
35+- `@anthropic-ai/sdk` - Anthropic Claude API client
2136
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
37+### Code Organization
38+- Place AI client configurations in `src/lib/` directory
39+- Create reusable AI components in `src/components/ai/`
40+- Implement API routes for AI services in `src/app/api/` (Next.js App Router)
41+- Define TypeScript types for AI responses in `src/types/`
2642
27−## Rules Bank Approach
43+### Error Handling Pattern
44+```javascript
45+// Implement comprehensive error handling for AI services
46+try {
47+ const response = await aiClient.chat.completions.create({
48+ model: "gpt-4",
49+ messages: [{ role: "user", content: prompt }]
50+ });
51+ return response.choices[0].message.content;
52+} catch (error) {
53+ if (error.code === 'rate_limit_exceeded') {
54+ throw new AIRateLimitError('Rate limit exceeded, please try again later');
55+ }
56+ if (error.code === 'insufficient_quota') {
57+ throw new AIQuotaError('API quota exceeded');
58+ }
59+ throw new AIServiceError(`AI service failed: ${error.message}`);
60+}
61+```
2862
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.
63+## File Structure Standards
64+Follow the established minimal structure and expand thoughtfully:
3065
31−## Consistency with Other AI Assistants
66+```
67+.
68+├── .clinerules/ # Cline AI rules (this directory)
69+├── .github/ # GitHub workflows and Copilot instructions
70+├── .kiro/steering/ # Kiro AI steering files
71+├── .cursorrules # Cursor AI development rules
72+├── CLAUDE.md # Claude AI specific configuration
73+├── GEMINI.md # Gemini CLI configuration
74+├── AGENT.md # Universal AI agent instructions
75+├── package.json # Dependencies and scripts (when added)
76+├── src/ # Source code (when added)
77+│ ├── lib/ # AI clients and utilities
78+│ ├── components/ # React components including AI components
79+│ ├── app/ # Next.js App Router (pages and API routes)
80+│ └── types/ # TypeScript definitions
81+└── public/ # Static assets
82+```
3283
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.
84+## Development Workflow
85+1. **Before Changes**: Check repository state and existing patterns
86+2. **During Development**: Follow TypeScript best practices and AI patterns
87+3. **Testing**: Include AI service mocks and error scenario testing
88+4. **Documentation**: Update relevant AI configuration files as needed
