mirror of
https://github.com/supabase/supabase.git
synced 2026-12-06 08:29:01 +00:00
## Problem We need a place to host a post-quantum security agent prompt which will act as a CTA for users when we provide advice on how to keep their projects secure. ## Solution Add to https://supabase.com/docs/guides/ai-tools/ai-prompts as a short term solution to get this live today, with the longer term goal of rolling it into our [agent skill](https://github.com/supabase/agent-skills). ## Additional context `/ai-prompts` pages weren't rendering with the `*.md` extension, so I added a tiny bit of logic to include them. Also modernized the AI prompts sections as a whole which was quite outdated (pre-skill era). ## Review priority - [ ] Critical: needs a review as soon as possible - [x] Urgent: the feature ships soon, or it's blocking something else - [ ] Moderate: good to have soon, not urgent - [ ] Low: get to it when you can ## Review instructions Provide a clear numbered procedure that the PR reviewer can walk through. 1. Open [`/docs/guides/ai-tools/ai-prompts`](https://docs-git-docs-post-quantum-security-checkup-supabase.vercel.app/docs/guides/ai-tools/ai-prompts) and review the overview. See the new post-quantum checkup item. 2. Open [`/docs/guides/ai-tools/ai-prompts/post-quantum-security-checkup`](https://docs-git-docs-post-quantum-security-checkup-supabase.vercel.app/docs/guides/ai-tools/ai-prompts/post-quantum-security-checkup) to review the new prompt 3. Open [`/docs/guides/ai-tools/ai-prompts/post-quantum-security-checkup.md`](https://docs-git-docs-post-quantum-security-checkup-supabase.vercel.app/docs/guides/ai-tools/ai-prompts/post-quantum-security-checkup.md) to confirm the `*.md` version renders ## Checklist Check all before review: - [x] I have read [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) - [ ] If I wrote a new docs topic or edited an existing topic, I used the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs [style guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide)
22 lines
687 B
TypeScript
22 lines
687 B
TypeScript
import { describe, expect, it } from 'vitest'
|
|
|
|
import { guideSlug, promptSlug } from './markdown-sources'
|
|
|
|
describe('promptSlug', () => {
|
|
it('places a prompt under ai-tools/ai-prompts by its file name', () => {
|
|
expect(promptSlug('../../examples/prompts/use-realtime.md')).toBe(
|
|
'ai-tools/ai-prompts/use-realtime'
|
|
)
|
|
})
|
|
})
|
|
|
|
describe('guideSlug', () => {
|
|
it('strips the content/guides prefix and .mdx extension, keeping nested path', () => {
|
|
expect(guideSlug('content/guides/ai/vector-columns.mdx')).toBe('ai/vector-columns')
|
|
})
|
|
|
|
it('handles a top-level guide', () => {
|
|
expect(guideSlug('content/guides/getting-started.mdx')).toBe('getting-started')
|
|
})
|
|
})
|