Configuration

Configure the Prodara compiler via prodara.config.json at your project root. All settings have sensible defaults — you only need to override what you want to change.

Configuration File

The compiler looks for prodara.config.json in the project root. Create one with prodara init or write it manually:

prodara.config.json
{
  "extends": ["@prodara/preset-strict"],
  "phases": {
    "discovery": { "enabled": true },
    "specTests": { "enabled": true }
  },
  "clarify": {
    "maxQuestions": 10,
    "priority": "high",
    "ambiguityThreshold": "medium",
    "autoResolve": false
  },
  "reviewers": {
    "architecture": { "enabled": true },
    "quality": { "enabled": true },
    "security": { "enabled": true },
    "adversarial": { "enabled": false },
    "edgeCase": { "enabled": false }
  },
  "reviewFix": {
    "maxAttempts": 3,
    "severity": "error",
    "autoFix": true
  },
  "validation": {
    "strict": false
  },
  "agent": {
    "platform": "copilot"
  },
  "audit": {
    "enabled": true,
    "retentionDays": 30
  }
}

Configuration Sections

phases

Control which compilation phases run and their behavior.

OptionTypeDefaultDescription
enabledbooleantrueEnable or disable a specific phase.
parallelbooleanfalseRun independent phases in parallel.

clarify

Configure the clarification phase for ambiguity detection.

OptionTypeDefaultDescription
maxQuestionsnumber10Maximum number of clarification questions.
priorityQuestionPriority"high"Minimum priority threshold for questions.
ambiguityThresholdAmbiguityThreshold"medium"Sensitivity for ambiguity detection.
autoResolvebooleanfalseAutomatically resolve common clarifications.

reviewers

Configure the reviewer pipeline. See Reviewers & Constitution for details.

OptionTypeDefaultDescription
<reviewer>.enabledbooleanvariesEnable or disable a specific reviewer.
<reviewer>.customobjectCustom reviewer definition with perspective and prompt.

reviewFix

Configure the automated fix loop after review.

OptionTypeDefaultDescription
maxAttemptsnumber3Maximum number of fix attempts per finding.
severityFixSeverity"error"Minimum severity that triggers a fix attempt.
autoFixbooleantrueWhether to automatically attempt fixes.

validation

Control which validation rules run during graph validation.

OptionTypeDefaultDescription
strictbooleanfalseEnable strict mode (warnings become errors).
rulesstring[][]Custom validation rules to enable.

agent

Configure agent-specific behavior for prompt file generation.

OptionTypeDefaultDescription
platformAgentPlatform"generic"Target AI agent platform.
providerApiProviderAI provider for the agent.

audit

Configure the audit trail for build tracking.

OptionTypeDefaultDescription
enabledbooleantrueEnable audit logging of builds.
retentionDaysnumber30Days to retain audit entries.

Resolution Order

Configuration is resolved in priority order. Later sources override earlier ones:

  1. Built-in defaults — Sensible values shipped with the compiler
  2. Presets — Shared configuration bundles from extends
  3. prodara.config.json — Project-level overrides
  4. CLI flags — Highest priority, override everything
ℹ️
Use resolveConfig() from the programmatic API to see the fully resolved configuration for a project, including all defaults and preset merges.

Programmatic API

import {
  loadConfig,
  resolveConfig,
  DEFAULT_CONFIG,
  CONFIG_FILENAME,
} from '@prodara/compiler';

// Load from file
const loaded = await loadConfig('./project');

// Resolve with defaults and presets
const resolved = resolveConfig(loaded.config);

// Access defaults
console.log(DEFAULT_CONFIG);
console.log(`Config file: ${CONFIG_FILENAME}`);

Next Steps

Learn about extensions and presets for shareable configuration, or reviewer customization for fine-tuning the review pipeline.