This project is an agentic system designed to automate the creation of high-fidelity Product Requirement Prompts (PRPs). It uses a multi-agent architecture powered by Google's Gemini API to analyze a user's goal, gather relevant context, and synthesize a complete and well-structured PRP based on a predefined schema.
The PRP Compiler operates through a sophisticated agentic workflow:
- Primitive Curation: The system organizes all agentic capabilities as versioned primitives in the
agent_primitives/directory. Each primitive is an Action, Knowledge, Pattern, or Schema, and is described by amanifest.yml. - Planning Agent (ReAct Loop): The
PlannerAgentuses a ReAct (Reason + Act) loop to iteratively select actions, retrieve knowledge, and assemble context for the user goal, using function-calling and introspective reasoning. - Orchestration: The
Orchestratorexecutes the ReAct loop, driving the planner and executing actions until the agent determines the context is complete. - Synthesizer Agent: The
SynthesizerAgentreceives the final assembled context and schema and produces a validated PRP JSON, strictly conforming to the chosen schema.
This project is managed with uv, a fast Python package installer and resolver.
To install the project and its dependencies, run the following command from the project root:
uv pip install -e .The compiler requires a Google Gemini API key to function.
- Create a file named
.envin the project root. - Add your API key to the file:
GEMINI_API_KEY="your_api_key_here"
The application will automatically load this key to configure the Gemini client.
Once installed and configured, you can run the compiler from your terminal. The main commands are:
prp-compiler compile "Create a command-line tool for managing a to-do list" --out my_todo_app_prp.jsonThis runs the full agentic workflow and writes the final PRP JSON to the specified file.
prp-compiler build-knowledge --primitives-path agent_primitives --vector-db-path chroma_dbThis command (re)builds the vector database used for retrieval-augmented generation (RAG) from all curated knowledge primitives.
prp-compiler serve --workers 4This starts a simple async queue processor that can handle multiple PRP compilation jobs concurrently.
New contributors can get up and running quickly using the uv command wrapper
defined in pyproject.toml.
uv run lint # style check via Ruff
uv run validate # static type analysis with mypy
uv run pytest # run the full test suiteRun uv sync whenever dependencies change to ensure your environment matches the
project configuration.
We welcome new primitives and improvements! See CONTRIBUTING.md for details on the curation workflow and development process.
For an in-depth look at the system architecture, see ARCHITECTURE.md.
The compiler now supports result caching and dynamic context resolution. Use repeated runs to benefit from cache hits and embed file contents or command output in patterns using the @() and !() syntax.