npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

prompter-framework

v1.0.0

Published

Meta-framework for generating structured AI agent prompts with built-in context switching, validation checkpoints, and failure recovery strategies

Downloads

21

Readme

Prompter Framework

A meta-framework for generating structured AI agent prompts with built-in context switching, validation checkpoints, and failure recovery strategies.

Features

  • Multiple Task Types: Implementation, Debugging, Analysis, Code Review, Documentation, Performance Optimization, Testing, and Refactoring
  • Meta-Framework Architecture: Consistent structure across all task types with adaptive complexity
  • Context Switching Prompts: Built-in guidance for maintaining focus across different work phases
  • Validation Checkpoints: Phase-specific validation questions to ensure quality
  • Failure Recovery Strategies: Predetermined approaches for common failure scenarios
  • Multiple Interfaces: CLI tool, programmatic API, and web components
  • Plugin System: Extensible architecture for custom task types and templates

Quick Start

Installation

npm install prompter-framework

CLI Usage

# List available task types
prompter generate --list-types

# Generate a prompt
prompter generate \
  --type implementation \
  --title "Add Multi-Factor Authentication" \
  --requirements "TOTP support" "SMS backup" \
  --constraints "Must integrate with existing auth system"

# Generate from JSON template
prompter template --type implementation --output my-task.json
prompter generate --json my-task.json

Programmatic Usage

import { PromptGenerator } from 'prompter-framework';

const generator = new PromptGenerator();

const prompt = generator.generate({
  taskTitle: 'Add Multi-Factor Authentication',
  requirements: ['TOTP support', 'SMS backup'],
  constraints: ['Must integrate with existing auth system']
}, 'implementation');

console.log(prompt);

Plugin System

import { PromptGenerator, createPlugin } from 'prompter-framework';

const securityPlugin = createPlugin({
  name: 'security-audit',
  taskTypes: {
    'security-audit': 'Security Audit'
  },
  templates: {
    'security-audit': {
      contextSwitches: [
        'Before assessment: Review security requirements and compliance standards',
        'During audit: Focus on vulnerability identification and risk assessment'
      ],
      checkpoints: {
        'Before Assessment': [
          'Do I understand the security requirements?',
          'Have I identified all attack vectors?'
        ]
      },
      failures: {
        'If Vulnerabilities Are Complex': [
          'Document findings clearly',
          'Prioritize by risk level',
          'Recommend immediate mitigations'
        ]
      }
    }
  }
});

const generator = new PromptGenerator();
generator.use(securityPlugin);

// Now you can use the custom task type
const prompt = generator.generate({
  taskTitle: 'Security Assessment',
  requirements: ['Penetration testing', 'Code review']
}, 'security-audit');

Available Task Types

  • implementation: Feature development and system building
  • debugging: Issue investigation and resolution
  • analysis: Data examination and insight generation
  • code_review: Quality assessment and feedback
  • documentation: Content creation and maintenance
  • performance: System performance improvement
  • testing: Test creation and execution
  • refactoring: Code improvement and restructuring

Project Structure

prompter-framework/
├── src/
│   ├── core/
│   │   ├── builders/        # Prompt generation logic
│   │   ├── templates/       # Task type definitions and templates
│   │   └── validators/      # Input validation
│   ├── cli/                 # Command-line interface
│   ├── web/                 # Web components (React)
│   └── plugins/             # Plugin system
├── lib/                     # Built distribution files
├── bin/                     # CLI executables
├── docs/                    # Documentation
├── examples/                # Usage examples
└── test/                    # Test files

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Add your enhancement
  4. Write tests
  5. Submit a pull request

License

MIT License - see LICENSE file for details.