Context
The cortex-fix.yml workflow currently runs gh pr merge --squash --auto --delete-branch
immediately after creating the fix PR. This means AI-generated security/bug fixes can
land in main with no human review if branch protection rules allow it.
The question
Should the scaffold default to:
-
Open PR only — remove --auto, human reviews and merges. Safest.
Suitable for: security fixes, logic changes, any multi-file patch.
-
Auto-merge with score threshold — only auto-merge if the fix is
low-risk (single file, small diff, high-confidence scan result).
Requires scoring/classification logic in the workflow.
-
Draft PR — open as draft by default, forcing conscious human
promotion before merge is possible.
-
Configurable — scaffold asks during step 4 which policy the user wants.
Store in manifest, write to workflow env var.
Current leaning
Option 1 (open PR only) as the safe default. Auto-merge can be an opt-in
for users who understand the risk and have sufficient branch protection and CI
checks in place to gate it.
Related
can_approve_pull_request_reviews permission (separate from PR creation)
- Branch protection rule timing (see companion issue/discussion)
- Step 4 sets
default_workflow_permissions=write to enable PR creation
Context
The
cortex-fix.ymlworkflow currently runsgh pr merge --squash --auto --delete-branchimmediately after creating the fix PR. This means AI-generated security/bug fixes can
land in
mainwith no human review if branch protection rules allow it.The question
Should the scaffold default to:
Open PR only — remove
--auto, human reviews and merges. Safest.Suitable for: security fixes, logic changes, any multi-file patch.
Auto-merge with score threshold — only auto-merge if the fix is
low-risk (single file, small diff, high-confidence scan result).
Requires scoring/classification logic in the workflow.
Draft PR — open as draft by default, forcing conscious human
promotion before merge is possible.
Configurable — scaffold asks during step 4 which policy the user wants.
Store in manifest, write to workflow env var.
Current leaning
Option 1 (open PR only) as the safe default. Auto-merge can be an opt-in
for users who understand the risk and have sufficient branch protection and CI
checks in place to gate it.
Related
can_approve_pull_request_reviewspermission (separate from PR creation)default_workflow_permissions=writeto enable PR creation