# Rollout and Operations Plan

## 1. Rollout Strategy

Use staged enablement behind feature flags to protect existing production flow operations.

## 2. Feature Flags

1. `ai_flow_proposals_enabled`
2. `ai_flow_publish_wrapper_enabled`

Default:
- Both disabled in production until release readiness is approved.

## 3. Rollout Stages

## Stage 1: Internal Admin Only

Scope:
1. Enable proposal generation and lifecycle for internal admins
2. Keep publish wrapper disabled if needed

Success Criteria:
1. Stable API and validation metrics
2. No manual flow path regressions

## Stage 2: Controlled Tenant Pilot

Scope:
1. Enable for 1-2 low-risk tenants
2. Monitor proposal quality and approval behavior

Success Criteria:
1. No production incidents linked to proposal path
2. Approval and publish quality acceptable

## Stage 3: Expanded Tenant Allow-list

Scope:
1. Gradually expand by tenant cohort
2. Maintain weekly quality reviews

Success Criteria:
1. Sustained stability and no policy bypass incidents

## 4. Monitoring Plan

Track:
1. Proposal generation success rate
2. Validation failure distribution by reason
3. Approval to publish conversion
4. Unauthorized action attempts
5. Manual flow path error trend (must remain stable)

## 5. Operational Alerts

1. Spike in validation failures
2. Any unauthorized approve/publish attempt
3. Any regression trend in existing manual flow operations

## 6. Rollback Plan

Trigger conditions:
1. Proposal-path induced regression in manual flow operations
2. Security or policy bypass incident
3. Persistent high-severity defects

Rollback actions:
1. Disable feature flags immediately
2. Restrict API access to internal engineering users only
3. Pause tenant rollout
4. Incident review and remediation plan

## 7. Runbook Checklist

Pre-Release:
1. Feature flags configured per environment
2. API authz validated
3. Migration status verified
4. Dashboard and alerts verified

Release Day:
1. Enable flags for internal cohort
2. Validate smoke tests
3. Observe metrics and logs for one full cycle

Post-Release:
1. Daily review in first week
2. Weekly quality report
3. Go or hold decision for next rollout stage
