# Production operation

Bound unattended work with policies, budgets, cooldowns, and required checks.

## Start conservative

```
{
  "policies": {
    "allowedUpdateTypes": ["patch", "minor"],
    "packageAllowlist": ["stripe", "@aws-sdk/client-s3"],
    "packageDenylist": [],
    "maxConcurrentMigrations": 1,
    "maxRunsPerCycle": 5,
    "cooldownMinutes": 60,
    "draftPullRequests": true,
    "maxRetries": 1
  }
}
```

## Run one poll cycle

Use one-cycle mode in a scheduler first. It is easier to observe and gives the scheduler ownership of restarts.

```
npm run patchflow -- watch --once
```

## Then run continuously

- Set requiredChecks for every production repository.
- Keep draftPullRequests enabled.
- Use maxRunsPerCycle as the hard agent-run budget.
- Increase concurrency only after CI and rate limits are understood.
- Review inferred and major migrations more carefully.

```
npm run patchflow -- watch
```

> Local state supports concurrent migrations inside one PatchFlow process. It is not a distributed lease system; do not run multiple watch processes against the same state directory.
