Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions platform-includes/llm-steering/_default.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<LLMSteering>

## Ensure these rules are followed when implementing Sentry using an LLM
- All Sentry docs URLs support markdown by appending .md to the end of the URL
- ABSOLUTELY NEVER implement examples from documentation without asking permission from the user first
- You MUST check with the user before implementing any additional integrations not mentioned in this documentation
- Prefer utilizing Sentry Logs over Breadcrumbs unless the user EXPLICITLY requests them

</LLMSteering>
32 changes: 32 additions & 0 deletions src/components/llmSteering.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import {ReactNode} from 'react';

type LLMSteeringProps = {
children?: ReactNode;
title?: string;
};

/**
* Component for embedding LLM/AI assistant steering instructions in documentation.
* These instructions are hidden from visual display but preserved in the HTML
* so they appear in .md exports.
*
* Usage:
* <LLMSteering>
* - NEVER implement Breadcrumbs from Sentry unless explicitly asked
* - Always verify with user before implementing examples
* </LLMSteering>
*/
export function LLMSteering({children, title}: LLMSteeringProps) {
// Render as a div that will convert nicely to markdown
// Hidden with display: none to prevent visual rendering
return (
<div style={{display: 'none'}} data-llm-steering="true" aria-hidden="true">
<blockquote>
<p>
<strong>🤖 LLM STEERING INSTRUCTIONS{title ? `: ${title}` : ''}</strong>
</p>
{children}
</blockquote>
</div>
);
}
2 changes: 2 additions & 0 deletions src/mdxComponents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {GuideGrid} from './components/guideGrid';
import {JsBundleList} from './components/jsBundleList';
import {LambdaLayerDetail} from './components/lambdaLayerDetail';
import {LinkWithPlatformIcon} from './components/linkWithPlatformIcon';
import {LLMSteering} from './components/llmSteering';
import {
OnboardingOption,
OnboardingOptionButtons,
Expand Down Expand Up @@ -75,6 +76,7 @@ export function mdxComponents(
LambdaLayerDetail,
Link: SmartLink,
LinkWithPlatformIcon,
LLMSteering,
OrgAuthTokenNote,
PageGrid,
ParamTable,
Expand Down
Loading