{
  "schemaVersion": 2,
  "preset": "node-service",
  "workflow": {
    "planDefaults": {
      "allowedPaths": [
        "src/",
        "lib/",
        "test/",
        "tests/"
      ],
      "requiredCommands": [
        "npm test"
      ],
      "evidencePaths": [
        ".agent-guardrails/evidence/current-task.md"
      ]
    },
    "readBeforeWrite": [
      "AGENTS.md",
      "docs/PROJECT_STATE.md",
      "README.md (if it exists)",
      "src",
      "test"
    ],
    "constraints": [
      "Follow existing service and data-access patterns before adding new layers.",
      "Keep endpoint and domain changes bounded to the smallest working slice.",
      "Prefer extending current validation and logging conventions over introducing a parallel path."
    ],
    "definitionOfDone": [
      "Behavior changes have test coverage.",
      "The change stays within the configured file budget.",
      "Project state is still accurate after the task."
    ]
  },
  "checks": {
    "maxChangedFilesPerTask": 20,
    "requireTestsWithSourceChanges": true,
    "allowedPaths": [],
    "consistency": {
      "maxChangedFilesPerTask": 20,
      "maxTopLevelEntries": 3,
      "maxBreadthMultiplier": 2,
      "warnOnBroadChanges": true
    },
    "correctness": {
      "requireTestsWithSourceChanges": true,
      "requireCommandsReported": true,
      "requireEvidenceFiles": true
    },
    "risk": {
      "requireReviewNotesForProtectedAreas": true,
      "warnOnInterfaceChangesWithoutContract": true,
      "warnOnConfigOrMigrationChanges": true
    },
    "sourceRoots": [
      "src",
      "lib"
    ],
    "sourceExtensions": [
      ".js",
      ".mjs",
      ".cjs",
      ".ts"
    ],
    "testRoots": [
      "test",
      "tests"
    ],
    "testExtensions": [
      ".js",
      ".ts"
    ],
    "testFileSignals": [
      ".test.",
      ".spec."
    ],
    "mutation": {
      "enabled": false,
      "survivalThreshold": 50,
      "maxMutations": 20,
      "timeoutMs": 15000
    },
    "scope": {
      "violationSeverity": "error",
      "violationBudget": 5
    }
  },
  "protectedAreas": [
    {
      "path": "src/auth/",
      "label": "auth flows",
      "minimumRiskLevel": "high",
      "requiresReviewNotes": true
    },
    {
      "path": "src/billing/",
      "label": "billing logic",
      "minimumRiskLevel": "high",
      "requiresReviewNotes": true
    },
    {
      "path": "infra/",
      "label": "infra configuration",
      "minimumRiskLevel": "medium",
      "requiresReviewNotes": true
    },
    {
      "path": "src/contracts/",
      "label": "shared contracts",
      "minimumRiskLevel": "medium",
      "requiresReviewNotes": true
    }
  ],
  "productionProfiles": {
    "default-service": {
      "focus": [
        "correctness",
        "reliability",
        "maintainability",
        "observability"
      ],
      "validationProfile": "standard"
    },
    "high-throughput-api": {
      "focus": [
        "performance",
        "concurrency",
        "reliability",
        "observability"
      ],
      "validationProfile": "strict"
    }
  },
  "nfrPolicies": {
    "security": {
      "evidenceHint": "Mention auth, secrets, permissions, and sensitive-data handling explicitly."
    },
    "dependency": {
      "evidenceHint": "Mention new or upgraded packages, lockfile changes, and dependency impact explicitly."
    },
    "performance": {
      "evidenceHint": "Mention latency, throughput, or hotspot validation in evidence."
    },
    "concurrency": {
      "evidenceHint": "Mention concurrency, contention, or load validation in evidence."
    },
    "understanding": {
      "evidenceHint": "Explain the main tradeoffs so future maintainers can follow the change."
    },
    "continuity": {
      "evidenceHint": "Mention reuse targets and any deliberate continuity break in evidence."
    },
    "observability": {
      "evidenceHint": "Mention logs, metrics, tracing, or monitoring impact in evidence."
    }
  },
  "languagePlugins": {
    "javascript": [
      "@agent-guardrails/plugin-ts"
    ]
  },
  "criticalPaths": [
    "src/auth/",
    "src/billing/",
    "src/contracts/"
  ],
  "runtimeSurfaces": [
    "src/",
    "infra/"
  ],
  "performanceSensitiveAreas": [
    "src/billing/",
    "src/cache/",
    "src/queue/"
  ],
  "review": {
    "includeEvidenceSummary": true
  }
}
