mcp-sap-docs / rules
Cursor rule243 starsChanged 6 months agoApache-2.0View on GitHub
Guide for understanding ABAP documentation integration in the standard search system. ABAP documentation is fully integrated into the standard search tool with intelligent version management. No specialized ABAP tools needed - everything works through the unified search interface. Result: 4-5 focused results including latest ABAP docs, Clean ABAP guidelines, and cheat sheets. Result: 5-8 targeted results with dramatically boosted scores for requested version.
We split this 80-abap-integration.mdc into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 13
No separate abap_search or abap_get tools
- Distinctive: line 110
Every ABAP file includes:
- Distinctive: line 131
Clean results: - no sifting through duplicate versions
≈ “Common” is an estimate: at least 1 in 5 of the 6,350 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
# ABAP Integration (Rule)
**Guide for understanding ABAP documentation integration in the standard search system.**
## Overview
ABAP documentation is **fully integrated** into the standard `search` tool with intelligent version management. No specialized ABAP tools needed - everything works through the unified search interface.
## Key Features
### **Standard Integration (No Special Tools)**
- Uses standard `search` tool like UI5, CAP, wdi5
- No separate `abap_search` or `abap_get` tools
- Same proven architecture as other documentation sources
- Consistent experience across all SAP development
### **ABAP Language Version Support**
- **Standard** (default) - `/abap-docs-standard` - Most current *Standard ABAP* documentation
- **Cloud** - `/abap-docs-cloud` - Most current *ABAP Cloud* documentation
- **Total**: 13,186+ curated ABAP files
### **Intelligent Version Filtering**
- **Latest by default**: General queries show latest Standard ABAP version
- **Cloud on request**: Queries including "cloud" show ABAP Cloud version
- **Smart result limiting**: 4-5 focused results vs 25 crowded duplicates
- **Context boosting**: Requested versions get 2.0x score multiplier
## Usage Patterns
### **General ABAP Queries (Latest Version)**
```
search: "inline declarations" # → Latest ABAP + style guides + cheat sheets
search: "SELECT statements" # → Latest ABAP + best practices
search: "exception handling" # → Latest ABAP TRY/CATCH + clean code
search: "class definition" # → Latest ABAP OOP + examples
```
**Result**: 4-5 focused results including latest ABAP docs, Clean ABAP guidelines, and cheat sheets.
### **ABAP Cloud-Specific Queries**
```
search: "Cloud LOOP" # → ABAP Cloud only + related sources
search: "SELECT statements cloud" # → ABAP Cloud only + related sources
search: "exception handling latest" # → Latest ABAP explicitly
```
**Result**: 5-8 targeted results with dramatically boosted scores for requested version.
### **Cross-Source Discovery**
```
search: "ABAP class definition best practices"
# Returns:
# ✅ Official ABAP docs (version-specific)
# ✅ Clean ABAP style guides
# ✅ ABAP cheat sheets with examples
# ✅ Related content across sources
```
## Technical Implementation
### **Metadata Configuration**
Located in `src/metadata.json`:
```json
{
"sources": [
{ "id": "abap-docs-standard", "boost": 1.0 }, // Highest priority
{ "id": "abap-docs-cloud", "boost": 0.8 }, // Background availability
// ...
],
"contextBoosts": {
"ABAP": {
"/abap-docs-standard": 1.0,
"/abap-docs-cloud": 0.8,
"/abap-cheat-sheets": 0.8,
"/sap-styleguides": 0.7,
"/dsag-abap-leitfaden": 0.6,
"/cap": 0.2
},
"ABAP Cloud": {
"/abap-docs-cloud": 1.5,
"/abap-docs-standard": 0.3,
"/abap-cheat-sheets": 0.6,
"/cap": 0.4
},
"Standard ABAP": {
"/abap-docs-standard": 1.5,
"/abap-docs-cloud": 0.2,
"/abap-cheat-sheets": 0.6,
"/dsag-abap-leitfaden": 0.5
},
// ...
}
}
```
### **URL Generation (src/lib/url-generation/abap.ts)**
Automatic version-specific URL generation:
```typescript
"/abap-docs-cloud/abenloop.md"
→ "https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/abenloop.htm"
"/abap-docs-standard/abenselect.md"
→ "https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/abenselect.htm"
```
## Content Quality
### **Rich Frontmatter**
Every ABAP file includes:
- **title**: Meaningful document title
- **description**: Actual explanations (not just filenames)
- **keywords**: Searchable terms and concepts
- **category**: Document classification
- **version**: ABAP version identifier
### **Filtered Noise**
- Removed 2,156+ irrelevant `abennews` files
- Focused on actionable documentation
- Quality over quantity approach
### **YAML-Safe Generation**
- Proper escaping for complex ABAP syntax
- Valid frontmatter for all documents
- Error-resilient content processing
## Benefits for Users
### **Simplified Experience**
- **One tool** for all SAP development (ABAP + UI5 + CAP + testing)
- **Clean results** - no sifting through duplicate versions
- **Intelligent defaults** - latest ABAP unless otherwise specified
### **Comprehensive Coverage**
- **13,186+ ABAP files** with rich, searchable content
- **2 ABAP variants** (Standard + Cloud) available with smart targeting
- **Cross-source intelligence** - related content across all documentation
### **Perfect LLM Integration**
- **Rich content snippets** with actual explanations
- **Optimal file sizes** (3-8KB) for context windows
- **Structured metadata** for better AI understanding
- **Official attribution** with direct SAP documentation links
## Statistics
| Metric | Value |
|--------|-------|
| **Total ABAP Files** | 13,186+ (curated) |
| **Versions Supported** | 2 (cloud + latest standard) |
| **Database Size** | ~33MB (includes all sources) |
| **Default Results** | 4-5 focused (vs 25 crowded) |
| **Noise Reduction** | 80%+ cleaner results |
## Migration Notes
### **From Old System (Specialized Tools)**
**Before:**
```
abap_search: "inline declarations"
abap_get: "abap-7.58-individual-abeninline_declarations"
```
**After:**
```
search: "inline declarations" # → Latest Standard ABAP + context
search: "inline declarations cloud" # → ABAP Cloud specific
fetch: "/abap-docs-standard/abeninline_declarations"
```
### **Benefits of Migration**
- ✅ **Simpler interface** - one tool for all SAP development
- ✅ **Better results** - intelligent filtering and cross-source discovery
- ✅ **Rich content** - meaningful descriptions and context
- ✅ **Version flexibility** - automatic management with manual override
## Future Extensibility
The standard integration architecture makes it easy to:
- **Add new ABAP versions** - just update metadata and rebuild index
- **Add new sources** - same standard integration process
- **Adjust version priorities** - modify boost values in metadata
- **Enhance filtering** - extend version detection patterns
## Common Scenarios
### **Learning ABAP (Latest)**
```
search: "inline declarations"
search: "SELECT statements"
search: "class definition"
# Always returns latest ABAP + best practices
```
### **Troubleshooting & Best Practices**
```
search: "exception handling" # ABAP + Clean ABAP guidelines
search: "SELECT performance" # ABAP syntax + optimization tips
# Cross-source intelligence finds all relevant content
```
## Related Files
@file src/metadata.json
@file src/lib/localDocs.ts
@file src/lib/search.ts
@file src/lib/url-generation/abap.ts
@file scripts/build-index.ts
@file docs/ABAP-INTEGRATION-SUMMARY.md
@file docs/ABAP-MULTI-VERSION-INTEGRATION.md
@file docs/ABAP-USAGE-GUIDE.md
@file docs/ABAP-STANDARD-INTEGRATION.mdWhere files are headingNew Cursor rule files have more rules about planning and tracking tasks, and fewer about code style.
Of the Cursor rule files we read, the 3,978 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository10 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .cursor/rules/00-overview.mdcCursor rule
- .cursor/rules/10-search-stack.mdcCursor rule
- .cursor/rules/20-tools-and-apis.mdcCursor rule
- .cursor/rules/30-tests-and-output.mdcCursor rule
- .cursor/rules/40-deploy.mdcCursor rule
- .cursor/rules/50-metadata-config.mdcCursor rule
- .cursor/rules/60-adding-github-sources.mdcCursor rule
- .cursor/rules/70-tool-usage-guide.mdcCursor rule
- ui5-version-upgradeSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

