Skip to content

Conversation

@khaliqgant
Copy link
Collaborator

@khaliqgant khaliqgant commented Oct 15, 2025

Summary

This is a major release (v2.1) that transforms prmp from a simple package manager into a comprehensive prompt orchestration platform. This PR adds testing capabilities, role-based templates, runtime integration via MCP, and a complete package publishing ecosystem.

What's New

🧪 Prompt Testing Framework

Test your prompts with actual AI tools to validate effectiveness before deployment.

New Commands:

  • prmp test <path> --with <tool> - Test prompts with cursor, claude, aider, windsurf, or continue
  • prmp test list-tools - List available AI tools for testing
  • prmp test list-roles - Show available roles with test scenarios

Features:

  • Execute prompts against real AI tools (cursor, claude, aider, etc.)
  • Custom test scenarios via JSON files
  • Role-specific test scenarios (10+ roles)
  • Auto-detect role from filename/content
  • Verbose and isolated testing modes
  • Quality scoring and effectiveness measurement

Example:

# Test a code reviewer prompt
prmp test .claude/agents/reviewer.md --with claude --role code-reviewer

# Test with custom scenarios
prmp test .cursor/rules/my-rules.md --with cursor --scenarios scenarios.json

🎭 Role-Based Template System

10+ specialized roles for different development tasks, inspired by Zen MCP.

Available Roles:

  • Code Review: code-reviewer, security-reviewer
  • Development: planner, debugger, refactorer
  • Quality Assurance: tester, performance-optimizer
  • Design: api-designer, accessibility-reviewer
  • Documentation: documenter

Features:

  • Each role includes specialized system prompts and focus areas
  • Tool compatibility mapping
  • Example use cases per role
  • Integration with testing framework

Example:

# Create a security-focused code reviewer
prmp create security-reviewer --type claude --role security-reviewer

# List all available roles
prmp create --list-roles

🌐 MCP Server (Model Context Protocol)

Runtime prompt discovery and integration for AI tools.

New Commands:

  • prmp mcp start - Start MCP server on port 3000
  • prmp mcp info - Get server information
  • prmp mcp stop - Stop the MCP server

MCP Capabilities:

  • Resources: List and read installed prompts
  • Prompts: Query prompts with context injection
  • Tools: Search, validate, and get role suggestions

MCP Endpoints:

  • POST /mcp - JSON-RPC 2.0 endpoint
  • GET /health - Health check
  • GET /info - Server info
  • GET /prompts - List all prompts
  • GET /prompts/:id - Get specific prompt
  • GET /search?q=<query> - Search prompts
  • GET /roles - List available roles

Example:

# Start MCP server
prmp mcp start

# AI tools can now query: http://localhost:3000/mcp
# Search: {"jsonrpc":"2.0","method":"tools/call","params":{"name":"search_prompts","arguments":{"query":"security"}}}

📦 Package Publishing & Registry

Publish and share prompts with the community.

New Commands:

  • prmp publish - Publish package to registry
  • prmp install <package> - Install from registry
  • prmp search <query> - Search registry for packages
  • prmp registry info - Get registry information

Features:

  • Package validation before publishing
  • Semantic versioning support
  • Public and private packages
  • Download tracking and popularity metrics
  • Author profiles and package metadata

Example:

# Publish a package
prmp publish .cursor/rules/my-rules.md --name my-awesome-rules --version 1.0.0

# Install from registry
prmp install my-awesome-rules --as cursor

# Search for packages
prmp search "security review"

🔄 Format Conversion

Convert prompts between different AI tool formats.

New Command:

  • prmp convert <path> --from <type> --to <type> - Convert between formats
  • prmp convert list-compatible <type> - List compatible formats

Features:

  • Smart format adaptation (cursor ↔ claude ↔ windsurf, etc.)
  • Syntax and metadata conversion
  • Dry-run mode for preview
  • Compatibility warnings

Example:

# Convert Cursor rules to Claude agents
prmp convert .cursor/rules/my-rules.md --from cursor --to claude

# Preview conversion
prmp convert my-rules.md --from cursor --to windsurf --dry-run

Technical Changes

New Core Modules

  • src/core/cli-bridge.ts - Bridge to execute commands with AI tool CLIs
  • src/core/converter.ts - Package format conversion engine
  • src/core/filesystem.ts - Enhanced filesystem utilities
  • src/core/role-scenarios.ts - 717 lines of role-specific test scenarios
  • src/core/roles.ts - Role definitions and management
  • src/core/templates.ts - Enhanced template system with role support
  • src/core/test-runner.ts - Test execution and reporting
  • src/core/validator.ts - Enhanced package validation

New Commands

  • src/commands/convert.ts - Format conversion
  • src/commands/create.ts - Enhanced with role templates
  • src/commands/install.ts - Registry installation
  • src/commands/lint.ts - Validation and linting
  • src/commands/mcp.ts - MCP server management
  • src/commands/publish.ts - Package publishing
  • src/commands/registry.ts - Registry operations
  • src/commands/search.ts - Package search
  • src/commands/test.ts - Prompt testing

MCP Implementation

  • src/mcp/server.ts - Full MCP server with JSON-RPC 2.0
  • src/mcp/types.ts - MCP type definitions

Enhanced Functionality

  • src/commands/add.ts - Multi-tool installation support
  • src/types.ts - Extended type definitions
  • src/index.ts - Integrated all new commands
  • package.json - Added express, cors for MCP server

Documentation

  • README.md - Complete rewrite with all v2.1 features
  • Added v2.1 feature documentation
  • Usage examples for all new commands
  • Architecture and workflow documentation

Breaking Changes

None! This is a backward-compatible release. All existing functionality remains intact.

Testing

The PR includes:

  • ✅ 10+ specialized role definitions with test scenarios
  • ✅ MCP server with full JSON-RPC 2.0 implementation
  • ✅ CLI bridge for testing with real AI tools
  • ✅ Format conversion with validation
  • ✅ Enhanced package validation
  • ✅ Registry integration

To test:

# Install and build
npm install
npm run build

# Test prompt testing
npm run dev test .cursor/rules/example.md --with cursor

# Start MCP server
npm run dev mcp start

# Create role-based prompt
npm run dev create my-reviewer --type claude --role code-reviewer --list-roles

Migration Guide

No migration needed! New features are opt-in:

  1. Continue using prmp add as before
  2. Try new testing: prmp test <path> --with <tool>
  3. Create role-based prompts: prmp create --role <role>
  4. Start MCP server: prmp mcp start
  5. Publish packages: prmp publish

Files Changed

Statistics:

  • 25 files changed
  • 6,458 insertions, 84 deletions
  • 13 new command files
  • 8 new core modules
  • 2 new MCP modules

What's Next

This lays the foundation for:

  • Community package registry
  • AI-powered prompt recommendations
  • Automated testing in CI/CD
  • Enterprise features (private registry, team management)
  • Enhanced MCP capabilities

Generated with prmp v2.1 - The Universal Prompt Orchestration Platform

@khaliqgant khaliqgant changed the title add files v2.1: Add Testing Framework, Role System, MCP Server & Package Publishing Oct 15, 2025
@khaliqgant
Copy link
Collaborator Author

Test Status

Ran the test suite - 106 tests passing out of 117 total.

Passing Tests ✅

  • Core functionality (config, filesystem)
  • Command integration (list, remove)
  • Error handling
  • Most CLI functionality

Test Failures to Address 🔧

  1. New test file needs tests (src/commands/test.ts)

    • New file added in this PR, needs test coverage
  2. Updated test expectations needed:

    • Error messages changed (e.g., "Type must be either" → "Invalid type. Must be one of")
    • Version bumped from 0.1.0 → 2.3.0
    • Help text updated ("Prompt Package Manager" → "Universal AI Coding Prompt Manager")
  3. Test mocking issues:

    • tests/commands/add.test.ts - Filename generation mocks
    • tests/core/downloader.test.ts - Network mocking for download tests

Recommendation

These failures are expected for a major version bump and can be fixed by:

  1. Adding tests for new test.ts command
  2. Updating test expectations to match new error messages and help text
  3. Fixing mock return values in existing tests

The core functionality is solid with 90%+ test pass rate.

- Updated test expectations for new help text and version
- Fixed mock issues in add.test.ts with new filesystem functions
- Migrated downloader tests from node-fetch to global fetch mocking
- Created comprehensive test suite for test.ts command (8 tests)
- Updated jest.config.js to exclude src/ directory from test discovery

All 125 tests now passing (100% pass rate)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
khaliqgant added a commit that referenced this pull request Oct 18, 2025
🎯 New Features:

1. Claude Skills Support
   - Added 'claude-skill' package type
   - Complete documentation (docs/CLAUDE_SKILLS.md)
   - Claude Marketplace integration roadmap
   - Conversion tools between formats

2. Local Testing Infrastructure
   - Complete LOCAL_TESTING.md guide
   - Enhanced docker-compose.yml with MinIO (S3)
   - End-to-end test script (scripts/test-e2e.sh)
   - 15 automated tests covering full stack
   - Local development with hot reload

3. Simon Willison Outreach Strategy
   - Dedicated outreach document
   - Priority #1 author contact
   - Multi-channel approach (email, Twitter, HN)
   - Personal note referencing his Claude Skills article

📦 Docker Compose Updates:
- Added MinIO service (S3-compatible storage)
- Complete local registry stack:
  - PostgreSQL 15
  - Redis 7
  - MinIO (S3)
  - Registry API with hot reload
- All services with health checks
- Environment variables for local dev

🧪 Testing:
- Full E2E test script (bash)
- Tests: health, DB, Redis, S3, API, CLI, publish, install
- Color-coded output
- Automated cleanup
- CI-ready

📚 Documentation:
- Claude Skills guide with examples
- Local testing complete workflow
- Docker setup instructions
- Debugging tips
- Performance testing guide

🎯 Package Type Support:
- cursor (existing)
- claude (existing)
- claude-skill (NEW)
- continue (existing)
- windsurf (existing)
- generic (existing)

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
@khaliqgant khaliqgant closed this Oct 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants