$git clone https://github.com/madara88645/CompilerPrompt Compiler turns vague requests into structured prompts, execution plans, and policy-checked workflows — so you can go from idea to safe, usable AI output in seconds.
| 1 | # Prompt Compiler |
| 2 | |
| 3 |  |
| 4 |  |
| 5 | |
| 6 | <p align="center"> |
| 7 | <img src="docs/images/cover.jpg" alt="Prompt Compiler Cover" width="100%"> |
| 8 | </p> |
| 9 | |
| 10 | **Prompt Compiler** turns vague requests into structured prompts, execution plans, and policy-checked workflows — so you can go from idea to safe, usable AI output in seconds. |
| 11 | |
| 12 | It also ships a **PR Safety / Merge Readiness Layer**: paste an AI-agent PR and get a clear verdict — **merge, hold, split, or rebase** — before you merge it. |
| 13 | |
| 14 | <p align="center"> |
| 15 | <img src="docs/images/demo.gif" alt="Animated tour: a vague request is compiled into an expanded prompt, execution plan, and readiness check, ending with a PR Safety verdict" width="100%"> |
| 16 | </p> |
| 17 | |
| 18 | Try it now at [prcompiler.com](https://prcompiler.com) — or open [PR Safety](https://prcompiler.com/pr-safety) ([guide](docs/pr-safety.md)) · [VS Code extension](integrations/vscode-extension) · [GitHub artifacts](docs/pattern-library.md) |
| 19 | |
| 20 | **Jump to:** [What It Does](#what-it-does) · [Key Features](#key-features) · [Installation](#installation) · [Running the App](#running-the-app) · [How To Use](#how-to-use) · [Project Structure](#project-structure) · [Docs](#docs) · [License](#license) |
| 21 | |
| 22 | --- |
| 23 | |
| 24 | ## What It Does |
| 25 | |
| 26 | **Compile a request.** Type any request — a feature idea, a bug report, a research question — and Prompt Compiler produces: |
| 27 | |
| 28 | - **System Prompt** — persona, role, constraints, output format |
| 29 | - **User Prompt** — structured task definition |
| 30 | - **Execution Plan** — step-by-step decomposition of coordinated tasks |
| 31 | - **Expanded Prompt** — ready to paste into any LLM, with domain-aware **key considerations** and decisive follow-up questions for recognized scenarios |
| 32 | - **Policy Layer** — risk level, allowed tools, execution mode, data sensitivity |
| 33 | - **Readiness Check** — a self-describing traffic light that tells you whether the compiled prompt is ready to run, honoring the compiled safety policy |
| 34 | |
| 35 | The core pipeline is **offline and deterministic** — compilation needs no API key and no network — and is locked in place by a 1,700+ test suite with QA regression gates. Cloud features (optional) run server-side through OpenRouter only. |
| 36 | |
| 37 | **Check a pull request.** Paste an AI-agent PR's title, description, and changed files into **PR Safety** and get a deterministic merge-readiness report: |
| 38 | |
| 39 | - **Verdict** — `merge` · `hold` · `split` · `rebase` |
| 40 | - **Signals** — risky areas, test coverage, branch freshness, scope match |
| 41 | - **Recommendations** — plus a GitHub-ready Markdown export you can paste into the PR |
| 42 | |
| 43 | It runs fully offline (no GitHub API, no AI calls, no sign-in) and never blocks a merge — it's advice for the human in the loop. |
| 44 | |
| 45 | --- |
| 46 | |
| 47 | ## Key Features |
| 48 | |
| 49 | ### Core Prompt Compiler |
| 50 | |
| 51 | The engine analyzes your intent and produces the core output layers: |
| 52 | |
| 53 | - **System Prompt**: persona, role, constraints, and output format rules for the target AI |
| 54 | - **User Prompt**: structured task definition derived from your input |
| 55 | - **Execution Plan**: decomposed steps based on your request — coordinated tasks ("do X and then Y") are split into ordered steps |
| 56 | - **Expanded Prompt**: a combined prompt ready to paste into chat-based LLMs, enriched with hand-curated **Key considerations** for recognized scenarios (SQL performance, file uploads, auth flows, timezones, browser downloads, payments, and more) and **decisive follow-up questions** a competent engineer would actually ask |
| 57 | - **Readiness Check**: a traffic-light banner that says whether the compiled prompt is ready to run and what would make it safer — it honors the compiled safety policy, so risky requests are never waved through |
| 58 | |
| 59 | Switch between the output tabs in the UI to inspect each layer, and copy any result with one click. |
| 60 | |
| 61 | <p align="center"> |
| 62 | <img src="docs/images/comp1.PNG" alt="Prompt Compiler - Main View" width="100%"> |
| 63 | </p> |
| 64 | |
| 65 | --- |
| 66 | |
| 67 | ### Exploration Modes — adaptive latitude scheduling |
| 68 | |
| 69 | Most prompt tools |