AI Agent Integration

Prodara is designed to be driven by AI coding agents. Most users never write Prodara by hand - they describe what they want in natural language, and their AI agent writes and iterates on the .prd specification using the compiler as a feedback loop.

Compatible AI Providers

GitHub CopilotClaude CodeOpenCodeCursorWindsurfCodexGeminiKiroJulesAmpRooAiderClineContinueZedBoltAideTraeAugmentSourcegraphTabnineSupermavenVoidPearDoubleGeneric

Any AI agent that can read files, write files, and run terminal commands works with Prodara.

How It Works

The agent-driven workflow is a three-party loop between You (the human), Your AI Agent, and the Prodara Compiler:

1

You describe what you want

Tell your AI agent in natural language what your product should do - entities, workflows, rules, screens.

2

Agent writes .prd files

The agent creates or modifies Prodara specification files based on your description.

3

Agent compiles with the CLI

The agent runs `prodara build --format json` and reads the structured output.

4

Agent fixes errors

If the compiler reports diagnostics, the agent reads the suggested fixes and applies them automatically.

5

You review the result

The VS Code extension shows you the spec with syntax highlighting and diagnostics. Approve or request changes.

6

Repeat

Continue the loop - describe a new feature, the agent writes it, the compiler validates, you review.

VS Code Extension

The Prodara VS Code extension enhances the agent workflow with real-time feedback:

  • Syntax Highlighting - Full TextMate grammar for .prd files so you can review agent output at a glance
  • Real-Time Diagnostics - Errors and warnings appear inline as the agent writes, without needing to run the CLI
  • LSP Integration - Go-to-definition, hover info, and symbol navigation across modules
  • Agent-Friendly - AI agents running in VS Code (Copilot, Cursor, etc.) can see diagnostics directly in the editor context
ℹ️
Install the VS Code extension from the Extensions Marketplace - search for Prodara. See the Quick Start for setup instructions.

CLI Contract

The CLI is the agent's interface to the compiler. It's designed to be non-interactive, deterministic, and machine-readable:

  • Non-interactive - No prompts, no user input required
  • Deterministic - Same input always produces the same output
  • JSON output - --format json on every command
  • Clean exit codes - 0 for success, 1 for errors
  • stdout/stderr separation - JSON on stdout, logs on stderr

Agent Workflow Commands

A typical agent workflow follows this sequence:

# 1. Validate the spec
prodara validate --format json ./project

# 2. If errors, apply fixes and re-validate
# (the agent reads diagnostics and fixes automatically)

# 3. Emit the Product Graph
prodara graph --format json ./project

# 4. Generate incremental plan
prodara plan --format json ./project

# 5. Run spec tests
prodara test --format json ./project

Iterative Fix Loop

When validation fails, diagnostics include fix.suggestions with exact file locations and machine-applicable text edits. The agent reads the diagnostic, applies the fix, and re-validates until the spec compiles cleanly.

diagnostic with fix suggestion
{
  "code": "PRD0301",
  "severity": "error",
  "message": "Type mismatch: expected 'money', got 'string'",
  "location": {
    "file": "billing.prd",
    "line": 12,
    "column": 10
  },
  "fix": {
    "description": "Change field type to money",
    "edits": [
      { "line": 12, "oldText": "total: string", "newText": "total: money" }
    ]
  }
}

Four JSON Outputs

Diagnostics

Errors, warnings, and machine-applicable fix suggestions with exact source locations.

Product Graph

The compiled semantic model - all nodes, edges, and metadata as JSON.

Plan Artifact

Incremental change analysis with impact propagation and actionable tasks.

Test Results

Spec test pass/fail status for transitions, authorization, and validation rules.

Example Agent Prompt

Here's an example prompt you can give your AI agent to create a Prodara spec:

agent prompt
I have a Prodara project in ./my-project. Create a billing module with:
- An invoice entity with customer reference, line items, total, status
- Workflows: create_invoice, issue_invoice, pay_invoice
- A dashboard surface for viewing all invoices
- Authorization: only accountants can create invoices
- Tests for the status transitions

Run `prodara build --format json ./my-project` after writing the spec
to validate it. Fix any errors the compiler reports.

Next Steps

Learn about the single AI prompt file generated for each agent, try interactive modes like Explore, Help, and Party, or configure custom reviewers for the review pipeline.