@@ -87,6 +87,58 @@ Rules for paid-org copy: |
| 87 | 87 | | Data residency/compliance | Deferred | Deferred | Later Enterprise feature | |
| 88 | 88 | | Billing support | Basic instance support | Billing support after runbook exists | Contact sales | |
| 89 | 89 | |
| 90 | +## Pro v1 user-tier matrix (PRO07) |
| 91 | + |
| 92 | +Pro is the user-tier paid plan (single seat, $4/month). PRO01 ratified |
| 93 | +the v1 feature set; PRO07 wires the enforcement matrix. CODEOWNERS is a |
| 94 | +registered placeholder with a no-op enforce path until the parser ships. |
| 95 | + |
| 96 | +| Capability | Free | Pro | |
| 97 | +| --- | --- | --- | |
| 98 | +| Public/private personal repos | Included | Included | |
| 99 | +| Required reviewers on private personal repos | Upgrade | Included | |
| 100 | +| Multi-reviewer (>1 approvals) on private personal repos | Upgrade | Included | |
| 101 | +| Advanced branch protection on private personal repos | Upgrade | Included | |
| 102 | +| CODEOWNERS review | Deferred | Deferred | |
| 103 | +| Profile pins | 6 | 100 | |
| 104 | + |
| 105 | +Multi-reviewer is **not** a separate feature constant — the numeric |
| 106 | +threshold lives in the deny payload of `FeatureRequiredReviewers`. |
| 107 | + |
| 108 | +### Per-feature enforcement flags |
| 109 | + |
| 110 | +PRO05 plumbed user-kind report-only logging through every gating site. |
| 111 | +PRO07 lights up the gates one feature at a time via |
| 112 | +`billing.enforce.*` in the operator's config. Defaults are all false |
| 113 | +(report-only). Each flag is a one-way deploy that operators can roll |
| 114 | +back without code changes. |
| 115 | + |
| 116 | +| Config key | Gate site | Default | |
| 117 | +| --- | --- | --- | |
| 118 | +| `billing.enforce.user_required_reviewers` | `internal/web/handlers/repo/settings_branches.go` | false | |
| 119 | +| `billing.enforce.user_advanced_branch_protection` | `internal/web/handlers/repo/settings_branches.go` | false | |
| 120 | +| `billing.enforce.user_profile_pins_beyond_free` | `internal/web/handlers/profile/pins.go` | false | |
| 121 | + |
| 122 | +Rollout discipline: |
| 123 | + |
| 124 | +1. Deploy with all flags false. Run the report-only telemetry query |
| 125 | + for 7 days. Confirm zero unexpected user-kind would-denies. |
| 126 | +2. Flip one feature flag in staging. Soak 7 days. |
| 127 | +3. Flip the same feature flag in production. |
| 128 | +4. Repeat per feature. |
| 129 | + |
| 130 | +PRO07's pitfall doc explicitly forbids enforcing a feature without an |
| 131 | +unenforce path. New gating sites land with their own flag; do not |
| 132 | +share flags across features. |
| 133 | + |
| 134 | +### Downgrade preservation |
| 135 | + |
| 136 | +`users.plan = 'free'` after cancellation grandfather's existing gated |
| 137 | +state — required-reviewer rules, profile pins above 6, advanced flags |
| 138 | +on existing rules. The gate refuses to **create** new gated state on |
| 139 | +Free, but never deletes prior configuration. This is the same |
| 140 | +contract as the org-tier downgrade. |
| 141 | + |
| 90 | 142 | ## Current capability audit |
| 91 | 143 | |
| 92 | 144 | Already present and safe to gate: |