-
Notifications
You must be signed in to change notification settings - Fork 46
feat: add prompt library #77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…egies (#73) Extract common scaffolding from Single and Multi file strategies into reusable builders module. This reduces code duplication and ensures consistent formatting across both strategies. Key changes: - Created markdown-builders module with shared utilities - Extracted project header, empty state, and library section rendering - Unified iteration logic over layer/stack/library structure - Simplified both strategies to use shared builders Benefits: - Guarantees consistent formatting across strategies - Reduces effort when adding new strategies - Single source of truth for markdown generation logic - Easier maintenance and testing 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Claude <noreply@anthropic.com>
* refactor: centralize keyboard activation handling * test: add coverage for useKeyboardActivation hook
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting
✅ All checks have passed successfully!
Coverage reports have been uploaded as artifacts. |
Description
Complete implementation of a feature-flagged, organization-based prompt library system for curated content sharing within the 10xDevs community.
Core Features
🔐 Multi-tenant Access Control
PROMPT_LIBRARY_ENABLED
(disabled by default)📝 Prompt Management
.md
files🔗 Invite System
🎨 User Interfaces
Admin (
/prompts/admin
):Member (
/prompts
):Database Schema
New tables (all with RLS):
API Routes
Admin (
/api/prompts/admin/*
):GET/POST /prompts
- List/createGET/PUT/DELETE /prompts/:id
- ManagePOST /prompts/:id/publish
- Publish/unpublishGET/POST /invites
- Invite managementGET /invites/:id/stats
- AnalyticsMember (
/api/prompts/*
):GET /prompts
- List publishedGET /collections
- Browse collectionsGET /collections/:id/segments
- Browse segmentsSecurity
Testing
✅ Unit Tests (8 suites):
✅ Integration Tests (3 flows):
Key Refactors
Collections Disambiguation: Renamed existing "collections" to "rule collections" to avoid naming conflicts
collectionsStore
→ruleCollectionsStore
/api/collections
→/api/rule-collections
Shared Markdown Builders: Extracted common markdown generation logic into reusable module
Test Infrastructure: Comprehensive Supabase client mocking with chainable query builders
Known Limitations
Review Focus Areas
supabase/migrations/20251004000000_consolidated_rls.sql
src/middleware/index.ts
src/store/promptsStore.ts
Pre-Merge Checklist