mcp-sap-docs / rules
Cursor rule243 starsChanged 6 months agoApache-2.0View on GitHub
When changing output formatting or test stability. @file test/tools/run-tests.js @file test/utils/parseResults.js @file test/utils/httpClient.js @file test/tools/search.smoke.js @file test/tools/sapdocssearch/search-cap-docs.js @file test/tools/sapdocssearch/search-cloud-sdk-js.js @file test/tools/sapdocssearch/search-sapui5-docs.js @file docs/TESTS.md @file docs/DEV.md
We split this 30-tests-and-output.mdc into the rules it gives an agent
3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 3
When changing output formatting or test stability.
- Distinctive: line 19
Search Tests: Verify query results and context detection
- Distinctive: line 20
Retrieval Tests: Document fetching and formatting
≈ “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
# Tests & Expected Output (Rule)
When changing output formatting or test stability.
## Test Architecture
- **Test Runner**: `test/tools/run-tests.js` - Unified test execution
- **HTTP Client**: `test/_utils/httpClient.js` - Server interaction utilities
- **Result Parser**: `test/_utils/parseResults.js` - Output format validation
- **Smoke Tests**: `test/tools/search.smoke.js` - Quick functionality validation
## Expected Output Format (BM25-Only)
```
⭐️ **<document-id>** (Score: <final-score>)
<description-preview>
Use in sap_docs_get
```
## Test Categories
- **Search Tests**: Verify query results and context detection
- **Retrieval Tests**: Document fetching and formatting
- **Integration Tests**: End-to-end MCP tool functionality
- **Performance Tests**: Response time and resource usage
## Test Data Structure
```javascript
{
name: 'Test Name',
tool: 'sap_docs_search',
query: 'search term',
expectIncludes: ['/expected/document/id'],
validate: (results) => { /* custom validation */ }
}
```
## Output Validation
- **Score Format**: Numeric scores with 2 decimal places
- **Context Indicators**: Emoji-based context detection (🎨🏗️🧪)
- **Source Attribution**: Clear library identification
- **Result Limits**: Configurable via `CONFIG.RETURN_K` (default: 25)
## Test Execution
- **Fast Tests**: `npm run test:fast` - Skip build, use existing artifacts
- **Full Tests**: `npm run test` - Build + test complete pipeline
- **Smoke Tests**: `npm run test:smoke` - Quick validation only
- **Community Tests**: `npm run test:community` - SAP Community search functionality
- **MCP Inspector**: `npm run inspect` - Debug MCP protocol interactions
@file test/tools/run-tests.js
@file test/_utils/parseResults.js
@file test/_utils/httpClient.js
@file test/tools/search.smoke.js
@file test/tools/sap_docs_search/search-cap-docs.js
@file test/tools/sap_docs_search/search-cloud-sdk-js.js
@file test/tools/sap_docs_search/search-sapui5-docs.js
@file docs/TESTS.md
@file docs/DEV.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/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
- .cursor/rules/80-abap-integration.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.

