Skip to content

Conversation

@khaliqgant
Copy link
Collaborator

@khaliqgant khaliqgant commented Nov 19, 2025

Summary

This PR adds two major features:

  1. Complete Ruler integration following proposals V2 #2, workflow clean up #4, and S3 fixes #5
  2. Tag autocomplete search with real-time suggestions

🎯 Ruler Integration

Overview

Positions PRPM as essential infrastructure for Ruler users by adding native format support, verified collections, and discovery capabilities.

Strategic Position: "Ruler is to PRPM what yarn is to npm"

  • Ruler handles local .ruler/ management and distribution
  • PRPM provides the registry, discovery, and versioning

Features Implemented

1. Native Ruler Format Support (Proposal #2) ✅

  • Converters: to-ruler.ts and from-ruler.ts
  • Format: Plain markdown without frontmatter
  • Metadata: HTML comments for package info
  • Schema: ruler.schema.json for validation
  • Tests: Comprehensive test suites
  • Usage: prpm install @user/package --as ruler

2. Verified Ruler Collections (Proposal #4) ✅

Created 4 production-ready collections in docs/examples/:

  • ruler-typescript: TypeScript strict, testing, code quality, ESLint
  • ruler-react: Hooks, performance, a11y, testing, Tailwind
  • ruler-python: PEP 8, pytest, type hints, FastAPI
  • ruler-nodejs: Express, REST API, security, databases

Each includes required + optional packages with detailed README.

3. Registry as Discovery Layer (Proposal #5) ✅

  • Added Ruler to webapp format filter dropdown
  • Updated FORMAT_ENUM in search routes
  • Users can browse: prpm.dev/search?format=ruler
  • Filter by subtypes: rule, agent, tool

Files Changed (Ruler)

New Files (11):

  • 2 converters (to-ruler.ts, from-ruler.ts)
  • 2 test files
  • 1 JSON schema
  • 4 collection examples
  • 2 documentation files

Modified Files (5):

  • Type definitions (packages/types/src/package.ts)
  • Validation logic (packages/converters/src/validation.ts)
  • Converter exports (packages/converters/src/index.ts)
  • Webapp search UI (packages/webapp/src/app/(app)/search/SearchClient.tsx)
  • Search routes (packages/registry/src/routes/search.ts)

Documentation

  • docs/RULER_INTEGRATION.md: Complete user guide (installation, publishing, collections, FAQ)
  • docs/RULER_INTEGRATION_IMPLEMENTATION.md: Technical implementation details

🔍 Tag Autocomplete Search

Overview

Users can now search for tags with real-time autocomplete suggestions showing package counts.

Features

API Endpoint

  • Route: GET /api/v1/search/tags/autocomplete?q={prefix}
  • Query: Prefix-based LIKE search on tag arrays
  • Response: Tag name + package count
  • Caching: 5 minutes for performance
  • Limit: Configurable (default 10, max 50)

UI Component

  • Real-time autocomplete with 200ms debounce
  • Keyboard navigation: Arrow keys, Enter, Escape
  • Selected tags display with remove buttons
  • Package counts shown for each suggestion
  • Popular tags remain for quick access
  • Dropdown styling matches existing PRPM dark theme

User Flow

  1. Type in tag search box
  2. See suggestions with counts
  3. Use keyboard or mouse to select
  4. Tag added to selected list
  5. Search updates automatically

Files Changed (Tag Autocomplete)

Modified Files (3):

  • Registry search routes: Added /tags/autocomplete endpoint
  • Webapp API client: Added getTagSuggestions() function
  • Search UI: Added autocomplete state and component

🧪 Testing

Automated Tests

  • to-ruler.test.ts: Conversion, metadata, quality scoring
  • from-ruler.test.ts: Parsing, metadata extraction, sections

Manual Testing Needed

  • Install package with --as ruler
  • Verify .ruler/*.md file created
  • Test tag autocomplete on search page
  • Verify keyboard navigation works
  • Check format dropdown includes Ruler
  • Search with format=ruler filter

📈 Impact

For Ruler Users

  • Access to 7,500+ packages compatible with Ruler
  • Centralized discovery at prpm.dev
  • Version management and updates
  • Quality scores for compatibility

For PRPM Users

  • Expanded audience (Ruler's user base)
  • Better tag discovery
  • Enhanced search UX
  • Ecosystem growth

For Both Communities

  • Shared infrastructure
  • Reduced duplication
  • Interoperability

🚀 Next Steps (Future)

Short Term

  • CLI integration for --as ruler flag
  • Auto-detection of .ruler/ directory
  • Batch import of .ruler/*.md files

Medium Term

  • Publish verified @prpm/ruler-* packages
  • Quality dashboard for Ruler compatibility
  • Auto-tag high-compatibility packages

Long Term

  • Direct Ruler CLI integration
  • PRPM MCP server for Ruler
  • Co-marketing initiatives

📝 Breaking Changes

None. All changes are additive.


🔗 Related Issues

  • Closes #TBD (Ruler integration)
  • Closes #TBD (Tag autocomplete)

📸 Screenshots

Tag Autocomplete

Shows real-time suggestions with package counts

Ruler Format Filter

Ruler appears in format dropdown on search page

Selected Tags

Tags display as removable pills


✅ Checklist

  • Code follows PRPM style guidelines
  • Tests added for new features
  • Documentation updated
  • No breaking changes
  • Commit message follows format
  • All files staged and committed

khaliqgant and others added 20 commits November 19, 2025 22:33
## Ruler Integration (Proposals #2, #4, #5)

### Native Ruler Format Support
- Add to-ruler.ts and from-ruler.ts converters
- Support plain markdown format for .ruler/ directory
- Add ruler.schema.json for validation
- Update Format type to include 'ruler'
- Create comprehensive test suites

### Verified Ruler Collections
- ruler-typescript: TypeScript, testing, code quality
- ruler-react: React, hooks, performance, a11y
- ruler-python: PEP 8, pytest, type hints
- ruler-nodejs: Express, REST APIs, security

### Registry as Discovery Layer
- Add Ruler to webapp format filter dropdown
- Update FORMAT_ENUM in search routes
- Enable prpm.dev/search?format=ruler filtering

### Documentation
- RULER_INTEGRATION.md: Complete user guide
- RULER_INTEGRATION_IMPLEMENTATION.md: Technical details
- 4 collection examples with detailed README

## Tag Autocomplete Search

### API Endpoint
- Add /api/v1/search/tags/autocomplete endpoint
- Prefix-based search with LIKE query
- Returns suggestions with package counts
- Cached for 5 minutes

### UI Component
- Real-time tag autocomplete dropdown
- Keyboard navigation (arrows, enter, escape)
- Selected tags display with remove buttons
- Package count shown for each suggestion
- 200ms debounce for API calls

### Integration
- Add getTagSuggestions() to API client
- Update SearchClient with tag autocomplete state
- Maintain existing popular tags functionality
- Clear tag input on selection

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

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
## Kiro Agent Support

### Converters
- Add to-kiro-agent.ts: Convert canonical to Kiro agent JSON
- Add from-kiro-agent.ts: Parse Kiro agent JSON to canonical
- Add kiro-agent.schema.json: Validation schema
- Update validation.ts: Add kiro:agent subtype mapping
- Export converters in index.ts

### CLI Updates
- Update filesystem.ts: Add .kiro/agents/ directory for agent subtype
- Update convert.ts:
  - Import toKiroAgent and fromKiroAgent
  - Handle agent subtype in destination path
  - Auto-detect agent format vs steering file
  - Use toKiroAgent when subtype is agent

### Agent Configuration Support
Kiro agents are JSON files with:
- name, description, prompt
- tools, toolsSettings, allowedTools
- mcpServers: MCP server configurations
- resources: Project documentation
- hooks: Lifecycle commands
- model: AI model specification

### File Locations
- .kiro/agents/*.json: Custom agent configurations
- .kiro/steering/*.md: Steering files (rules)
- .kiro/hooks/*.kiro.hook: Hook configurations

### Documentation & Examples

#### Claude Skill: Kiro Agent Creator
- Expert skill for creating Kiro agents
- Complete configuration reference
- Design patterns and best practices
- Tool configuration guidelines
- Lifecycle hooks examples
- Security and restrictions
- Integration with PRPM

#### Cursor Rule: Kiro Agent Development
- Quick reference for agent structure
- Common patterns (backend, frontend, test writer, etc.)
- Tool configuration examples
- MCP server integration
- Best practices checklist
- Troubleshooting guide

### Usage

Install Kiro agent:
```bash
prpm install @user/agent --as kiro --subtype agent
# Creates: .kiro/agents/<name>.json
```

Convert to Kiro agent:
```bash
prpm convert --to kiro --subtype agent package.md
```

Import existing agent:
```bash
prpm import .kiro/agents/my-agent.json --format kiro --subtype agent
```

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

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
- Add to-kiro-agent.test.ts: 7 tests for toKiroAgent converter
- Add from-kiro-agent.test.ts: 10 tests for fromKiroAgent parser
- Export KiroAgentConfig type from converters index
- Test coverage includes:
  - Basic conversion canonical → Kiro agent JSON
  - Tool extraction and configuration
  - MCP server handling
  - Hooks and lifecycle commands
  - Prompt parsing and structuring
  - Error handling for invalid JSON
  - Quality scoring and warnings

All types properly exported for external use.

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

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
- Add comprehensive Kiro Agents format specification (kiro-agents.md)
  - JSON configuration structure with MCP servers, tools, and hooks
  - Multiple real-world examples and use cases
  - Complete conversion notes and migration tips

- Add comprehensive Ruler format specification (ruler.md)
  - Plain markdown format without frontmatter
  - Examples covering React, TypeScript, API, and testing guidelines
  - PRPM integration and tool compatibility details

- Add Format Matrix to converters README
  - Overview table with all 8 formats and their subtypes
  - Direct links to official provider documentation
  - High-level descriptions for quick reference

- Fix workspace dependencies configuration
  - Use workspace:* for private packages (registry, webapp)
  - Use version refs for published packages (cli, converters, registry-client)

🤖 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>
Merged changes while preserving the ruler format added in bold-canyon branch.

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

Co-Authored-By: Claude <noreply@anthropic.com>
@khaliqgant khaliqgant merged commit 1519e1d into main Nov 20, 2025
9 checks passed
@khaliqgant khaliqgant deleted the bold-canyon branch November 20, 2025 20:33
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