promptscript  by mrwogu

Compile prompts for 37+ AI coding agents

Created 6 months ago
577 stars

Top 55.2% on SourcePulse

GitHubView on GitHub
Project Summary

PromptScript addresses the challenge of managing disparate AI coding assistant instructions across numerous repositories and tools. It offers a unified "Prompt-as-Code" system, enabling standardization, auditing, and deployment of AI instructions for developers and enterprises. The primary benefit is a single source of truth that compiles into native configurations for over 37 AI coding agents, ensuring consistency and simplifying updates.

How It Works

PromptScript utilizes a declarative .prs file format to define AI agent instructions, prompts, and configurations. This source file is then compiled into native, idiomatic formats required by various AI coding assistants. This approach provides a single point of truth, allowing changes to propagate automatically across all integrated agents. Key advantages include hierarchical inheritance for composing standards, parameterized templates for reusable configurations, and automated validation, audit trails, and version pinning.

Quick Start & Requirements

Installation is typically done via npm: npm install -g @promptscript/cli. Core commands include prs init for project setup, prs compile to generate agent-specific configurations, and prs hooks install --all to enable auto-recompilation on file save and prevent AI agents from overwriting generated outputs. Docker is also available for CI/CD.

Highlighted Details

  • Broad Agent Support: Compiles to native formats for 37+ AI coding agents including GitHub Copilot, Claude Code, Cursor, Gemini CLI, and more.
  • Hierarchical Inheritance: Enables composing standards from organization-wide to team and project-specific levels, similar to code inheritance.
  • Parameterized Templates: Define reusable configuration stacks with typed parameters, akin to Infrastructure as Code.
  • Skills & Sub-agents: Define reusable AI skills with contracts, permissions, and specialized sub-agents.
  • Registry Resolver: Import standards from Git repositories with versioning and lockfile support for reproducible builds; includes a vendor mode for offline environments.
  • AI-Assisted Migration & Management: Supports automatic migration from existing AI configurations and allows AI agents to manage .prs files directly.

Maintenance & Community

The project features CI/CD integration via GitHub Actions and code coverage reporting via Codecov. Package versioning is tracked via npm. Community and documentation resources include a playground, official documentation, and an issue tracker.

Licensing & Compatibility

PromptScript is released under the MIT License, which is permissive and generally compatible with commercial use and closed-source linking.

Limitations & Caveats

The README does not explicitly detail limitations, alpha status, or known bugs. The "Zero Learning Curve" claim for AI agents implies a dependency on the AI's ability to interpret and act upon the compiled PromptScript syntax.

Health Check
Last Commit

4 days ago

Responsiveness

Inactive

Pull Requests (30d)
17
Issues (30d)
6
Star History
566 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.