Compile Spec
AI-generatedSummary
Compile the provided Product Requirements Document (PRD) project JSON into a machine-readable technical specification using an AI agent model.
Inputs
- Project JSON (required) — The current PRD project JSON string to be compiled into a specification.
- Project Name (required) — The name of the project for which the PRD specification is being compiled.
- PRD Output Directory — Optional filesystem directory path to save the resulting PRD markdown files; leave empty to skip saving files.
- Working Directory — Optional directory path where the Claude CLI command will be executed.
- Additional Options — Optional settings including maximum AI agent turns (default 5), verbosity for detailed logs, and choice of Claude model alias (sonnet, opus, or haiku).
Output shape
a JSON object containing the compilation response, optionally including the parsed specification, the AI session ID, usage information, number of agent turns taken, and — if saving is enabled — the path of the saved markdown file.
The response includes both raw and parsed JSON from the AI agent. If 'PRD Output Directory' is specified, markdown files are saved there and the saved file path is returned. Verbose mode outputs detailed message logs. Errors during execution are surfaced unless 'continueOnFail' is enabled.
Examples
Example 1: Compile a PRD JSON for a project named 'UserProfileUpgrade' and save output to '/docs/prd', with verbose logging enabled.
Set 'Project JSON' with the PRD content, 'Project Name' to 'UserProfileUpgrade', 'PRD Output Directory' to '/docs/prd', and under 'Additional Options' set 'Verbose' to true.