Contributing to Salesforce RAG Repository
Thank you for your interest in contributing to the Salesforce RAG knowledge repository. This document provides guidelines for contributing content, ensuring consistency and quality.
Contribution Process
- Review Existing Content: Check if similar content already exists
- Follow Structure Standards: Use templates in
meta/templates/ - Maintain Consistency: Follow style guide and terminology standards
- Add Cross-References: Link to related patterns
- Include Q&A: Add Q&A section for RAG retrieval
- Test Examples: Ensure code examples work and follow best practices
File Structure Requirements
All new files must include:
- YAML Frontmatter:
```yaml
—
title: “File Title”
level: “Beginner|Intermediate|Advanced”
tags:
- tag1
- tag2 last_reviewed: “YYYY-MM-DD” — ```
- Standard Sections:
- Overview
- When to Use (for pattern files)
- Prerequisites
- Core Concepts
- Implementation (or Patterns)
- Best Practices
- Common Pitfalls
- Q&A (10+ questions)
- Related Patterns
- Edge Cases and Limitations (when applicable)
Content Standards
Voice and Tone
- Use third-person, declarative voice: “X is used when Y” or “Use X when Y”
- Avoid first-person (“we”, “I”) unless in examples
- Be clear and concise
- Assume audience is Salesforce architects, developers, or advanced admins
Terminology
- Follow
../website/meta/terminology-mapping.mdfor standard terms - Use “Experience Cloud” not “Communities”
- Use “Permission Set” not “Perm Set”
- Use “Record-Triggered Flow” not “RTF”
- Include deprecation warnings for deprecated features
Code Examples
- All code must follow user’s coding standards (see user_rules)
- Include ApexDoc comments for Apex code
- Test all code examples before including
- Explain code examples with context
- Include error handling patterns
Q&A Sections
- Include 8-10 common questions
- Questions should be natural language queries
- Answers should be comprehensive but concise
- Use format: “### Q: [Question]?” followed by “A: [Answer]”
Quality Checklist
Before submitting:
- File follows template structure
- Frontmatter includes all required fields
- Terminology matches standard mapping
- Code examples tested and documented
- Q&A section included (8+ questions)
- Related Patterns section included
- Cross-references updated in related files
- No broken links
- Spelling and grammar checked
- Deprecation warnings included where applicable
Adding New Files
- Choose Location: Place file in appropriate domain folder
- Use Template: Start with
meta/templates/knowledge-file-template.md - Update Index: Add entry to
rag-index.md - Update Metadata: Add entry to
rag-library.json - Add Cross-References: Link from related files
Updating Existing Files
- Maintain Structure: Keep existing structure unless improving it
- Update Last Reviewed: Update
last_reviewedin frontmatter - Preserve Q&A: Don’t remove existing Q&A, enhance it
- Update Cross-References: Update links in related files if needed
- Document Changes: Note significant changes in commit message
Code Example Guidelines
Apex Code
- Use
with sharingorwithout sharingexplicitly - Include error handling
- Follow bulkification patterns
- Include ApexDoc comments
- Use descriptive variable names
LWC Code
- Include error handling
- Use
@wireappropriately - Handle loading states
- Include accessibility attributes
- Follow LWC best practices
Flow Examples
- Document entry criteria
- Explain decision logic
- Include error handling
- Note bulk considerations
Review Process
- Self-Review: Check against quality checklist
- Terminology Check: Verify against terminology mapping
- Link Validation: Check all internal links work
- Code Testing: Test all code examples
- Structure Validation: Verify follows template
Questions?
- Review
../website/meta/style-guide.mdfor detailed style guidelines - Check
../website/meta/terminology-mapping.mdfor terminology standards - Look at existing files for examples of good structure
- Review
MAINTENANCE.mdfor maintenance procedures
Thank You
Your contributions help make this repository a valuable resource for the Salesforce community. Thank you for taking the time to contribute!