

Also from Kynth Studios


Also from Kynth Studios


Also from Kynth Studios
123456# PRPM Development Core Principles78You are developing PRPM (Prompt Package Manager), a universal package manager for AI prompts, agents, and cursor rules across all AI code editors.910## Mission1112Build the npm/cargo/pip equivalent for AI development artifacts. Enable developers to discover, install, share, and manage prompts across Cursor, Claude Code, Continue, Windsurf, and future AI editors.1314## Core Architecture Principles1516### 1. Universal Format Philosophy17- **Canonical Format**: All packages stored in a universal canonical format18- **Smart Conversion**: Server-side format conversion with quality scoring19- **Zero Lock-In**: Users can convert between any format without data loss20- **Format-Specific Optimization**: IDE-specific variants (e.g., Claude MCP integrations)2122### 2. Package Manager Best Practices23- **Semantic Versioning**: Strict semver for all packages24- **Dependency Resolution**: Smart conflict resolution like npm/cargo25- **Lock Files**: Reproducible installs with version locking26- **Registry-First**: All operations through central registry API27- **Caching**: Redis caching for converted packages (1-hour TTL)2829### 3. Developer Experience30- **One Command Install**: `prpm install @collection/nextjs-pro` gets everything31- **Auto-Detection**: Detect IDE from directory structure (.cursor/, .claude/)32- **Format Override**: `--as claude` to force specific format33- **Telemetry Opt-Out**: Privacy-first with easy opt-out34- **Beautiful CLI**: Clear progress indicators and colored output3536### 4. Registry Design37- **GitHub OAuth**: Single sign-on, no password management38- **Full-Text Search**: PostgreSQL GIN indexes + optional Elasticsearch39- **Package Discovery**: Trending, featured, categories, tags40- **Quality Metrics**: Download counts, stars, verified badges41- **Analytics**: Track usage patterns while respecting privacy4243### 5. Collections System44- **Curated Bundles**: Official collections maintained by PRPM team45- **IDE-Specific**: Different package variants per editor46- **Required + Optional**: Core packages + optional enhancements47- **Installation Order**: Sequential or parallel package installation48- **Reason Documentation**: Every package explains why it's included4950## Technical Stack5152### CLI (TypeScript + Node.js)53- **Commander.js**: CLI framework for commands54- **Fastify Client**: HTTP client for registry API55- **Tar**: Package tarball creation/extraction56- **Chalk**: Terminal colors and formatting57- **Ora**: Spinners for async operations5859### Registry (TypeScript + Fastify + PostgreSQL)60- **Fastify**: High-performance web framework61- **PostgreSQL**: Primary database with triggers, views, GIN indexes62- **Redis**: Caching layer for converted packages63- **GitHub OAuth**: Authentication provider64- **Docker**: Containerized deployment6566### Testing67- **Vitest**: Unit and integration tests68- **100% Coverage Goal**: Especially for format converters69- **Round-Trip Tests**: Ensure conversion quality70- **Fixtures**: Real-world package examples7172## Quality Standards7374### Code Quality75- **TypeScript Strict Mode**: No implicit any, strict null checks76- **Error Handling**: Proper error messages with context77- **Retry Logic**: Exponential backoff for network requests78- **Input Validation**: Validate all user inputs and API responses7980### Format Conversion81- **Lossless When Possible**: Preserve all semantic information82- **Quality Scoring**: 0-100 score for conversion quality83- **Warnings**: Clear warnings about lossy conversions84- **Round-Trip Testing**: Test canonical → format → canonical8586### Security87- **No Secrets in DB**: Never store GitHub tokens, use session IDs88- **SQL Injection**: Parameterized queries only89- **Rate Limiting**: Prevent abuse of registry API90- **Content Security**: Validate package contents before publishing9192## Development Workflow9394### When Adding Features951. **Check Existing Patterns**: Look at similar commands/routes962. **Update Types First**: TypeScript interfaces drive implementation973. **Write Tests**: Create test fixtures and cases984. **Document**: Update README and relevant docs995. **Telemetry**: Add tracking for new commands (with privacy)100101### When Fixing Bugs1021. **Write Failing Test**: Reproduce the bug in a test1032. **Fix Minimally**: Smallest change that fixes the issue1043. **Check Round-Trip**: Ensure conversions still work1054. **Update Fixtures**: Add bug case to test fixtures106107### When Designing APIs108- **REST Best Practices**: Use proper HTTP methods and status codes109- **Versioning**: All routes under `/api/v1/`110- **Pagination**: Limit/offset for list endpoints111- **Filtering**: Support query params for filtering112- **OpenAPI**: Document with Swagger/OpenAPI specs113114## Common Patterns115116### CLI Command Structure117```typescript118export async function handleCommand(args: Args, options: Options) {119 const startTime = Date.now();120 try {121 // 1. Load config122 const config = await loadUserConfig();123 const client = getRegistryClient(config);124125 // 2. Fetch data126 const result = await client.fetchData();127128 // 3. Display results129 console.log('✅ Success');130131 // 4. Track telemetry132 await telemetry.track({ command: 'name', success: true });133 } catch (error) {134 console.error('❌ Failed:', error.message);135 await telemetry.track({ command: 'name', success: false });136 process.exit(1);137 }138}139```140141### Registry Route Structure142```typescript143export async function routes(server: FastifyInstance) {144 server.get('/:id', {145 schema: { /* OpenAPI schema */ },146 }, async (request, reply) => {147 const { id } = request.params;148149 // 1. Validate input150 if (!id) return reply.code(400).send({ error: 'Missing ID' });151152 // 2. Query database153 const result = await server.pg.query('SELECT...');154155 // 3. Return response156 return result.rows[0];157 });158}159```160161### Format Converter Structure162```typescript163export function toFormat(pkg: CanonicalPackage): ConversionResult {164 const warnings: string[] = [];165 let qualityScore = 100;166167 // Convert each section168 const content = convertSections(pkg.content.sections, warnings);169170 // Track lossy conversions171 const lossyConversion = warnings.some(w => w.includes('not supported'));172 if (lossyConversion) qualityScore -= 10;173174 return { content, format: 'target', warnings, qualityScore, lossyConversion };175}176```177178## Naming Conventions179180- **Files**: kebab-case (`registry-client.ts`, `to-cursor.ts`)181- **Types**: PascalCase (`CanonicalPackage`, `ConversionResult`)182- **Functions**: camelCase (`getPackage`, `convertToFormat`)183- **Constants**: UPPER_SNAKE_CASE (`DEFAULT_REGISTRY_URL`)184- **Database**: snake_case (`package_id`, `created_at`)185186## Documentation Standards187188- **Inline Comments**: Explain WHY, not WHAT189- **JSDoc**: Required for public APIs190- **README**: Keep examples up-to-date191- **Markdown Docs**: Use code blocks with language tags192- **Changelog**: Follow Keep a Changelog format193194## Performance Considerations195196- **Batch Operations**: Use Promise.all for independent operations197- **Database Indexes**: GIN for full-text, B-tree for lookups198- **Caching Strategy**: Cache converted packages, not raw data199- **Lazy Loading**: Don't load full package data until needed200- **Connection Pooling**: Reuse PostgreSQL connections201202Remember: PRPM is infrastructure. It must be rock-solid, fast, and trustworthy like npm or cargo.203
One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| pr-pm/prpm.cursor/rules/testing-patterns.mdc · 121 | Cursor rules | testlint-formatstyletesting-strategy | 77/100 | 14 days ago | |
| pr-pm/prpm.cursor/rules/beanstalk-deploy.mdc · 121 | Cursor rules | teststyletypes | 62/100 | 14 days ago | |
| pr-pm/prpm.cursor/rules/creating-agents-md.mdc · 121 | Cursor rules | testlint-formatstylearch+7 | 92/100 | 14 days ago | |
| pr-pm/prpm.cursor/rules/creating-cursor-rules.mdc · 121 | Cursor rules | testlint-formatstylearch+5 | 76/100 | 14 days ago | |
| pr-pm/prpm.cursor/rules/creating-skills.mdc · 121 | Cursor rules | stylearchtesting-strategydo-not+1 | 61/100 | 14 days ago | |
| pr-pm/prpm.cursor/rules/github-actions-testing.mdc · 121 | Cursor rules | setupbuildstylearch+4 | 93/100 | 14 days ago | |
| pr-pm/prpm.cursor/rules/karen-repo-reviewer.mdc · 121 | Cursor rules | archgit | 58/100 | 14 days ago | |
| pr-pm/prpm.cursor/rules/prpm-json-best-practices.mdc · 121 | Cursor rules | setuplint-formatstylearch+5 | 73/100 | 14 days ago | |
| pr-pm/prpm.cursor/rules/self-improve-cursor.mdc · 121 | Cursor rules | setuptestarchdependencies+3 | 69/100 | 14 days ago | |
| pr-pm/prpm.cursor/rules/typescript-type-safety.mdc · 121 | Cursor rules | buildstylearchtypes+2 | 89/100 | 14 days ago | |
| pr-pm/prpm.cursor/rules/typescript-type-specialist.mdc · 121 | Cursor rules | styletypesdo-notagent-behaviour | 65/100 | 14 days ago | |
| pr-pm/prpmAGENTS.md · 121 | AGENTS.md | setupbuildtestlint-format+12 | 84/100 | 14 days ago | |
| pr-pm/prpmCLAUDE.md · 121 | CLAUDE.md | teststylegitapi+2 | 69/100 | 14 days ago | |
| pr-pm/prpm.cursor/rules/creating-kiro-agents.mdc · 121 | Cursor rules | setupbuildteststyle+5 | 76/100 | 14 days ago | |
| pr-pm/prpm.cursor/rules/format-conversion.mdc · 121 | Cursor rules | testlint-formatstyledo-not+1 | 63/100 | 14 days ago |
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| hiromaily/go-crypto-wallet.cursor/rules/typescript.mdc · 126 | Cursor rules | setupbuildtestlint-format+6 | 100/100 | 14 days ago | |
| TechSquidTV/Hermes.cursor/rules/10-hermes-api.mdc · 46 | Cursor rules | testlint-formatstylearch+5 | 100/100 | 14 days ago | |
| Allymahmoud/case-intake-platform.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 14 days ago | |
| dodgecfr/combatfilms-webapp.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 14 days ago | |
| deifos/clipmira-subtitles.cursor/rules/frontend.mdc · 1 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 14 days ago | |
| markstev/mark-starter.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+6 | 99/100 | 14 days ago | |
| langflow-ai/langflow.cursor/rules/docs_development.mdc · 153k | Cursor rules | setupbuildtestlint-format+7 | 97/100 | 14 days ago | |
| bybren-llc/safe-agentic-workflow.cursor/rules/10-backend-python.mdc · 399 | Cursor rules | testlint-formatstylegit+4 | 97/100 | today |
A badge carrying the measured quality of the strongest agent config file in this repository, out of 100. It reads from this index every time somebody loads your page, so it changes when the measurement changes and there is nothing to keep up to date. Free, no account, and the value is not something you or we can set by hand.
[](https://rulestack.kynth.studio/configs/pr-pm-prpm-cursor-rules-core-principles)Would rather not hotlink us? Every badge is also served in shields.io’s endpoint schema, so shields renders the image and your readers never talk to our domain:
Published by Toolproof, the masthead over this index and eight others. The method behind the number is at toolproof.kynth.studio/methodology, and the whole thing is readable as JSON with no key at /api.