From 696901453212aa43cff2400a75cfc6629e79939e Mon Sep 17 00:00:00 2001 From: Trevin Chow Date: Fri, 13 Mar 2026 15:26:18 -0700 Subject: [PATCH] fix(skills): enforce branch creation when committing on main The model was offering "commit to current branch" on main instead of "create a branch and PR." Added explicit branch detection step and "Do NOT commit directly to main" instruction. --- .../skills/ce-compound-refresh/SKILL.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/plugins/compound-engineering/skills/ce-compound-refresh/SKILL.md b/plugins/compound-engineering/skills/ce-compound-refresh/SKILL.md index e2ec303..1806b23 100644 --- a/plugins/compound-engineering/skills/ce-compound-refresh/SKILL.md +++ b/plugins/compound-engineering/skills/ce-compound-refresh/SKILL.md @@ -493,20 +493,22 @@ Stage only the files that compound-refresh modified — not other dirty files in ### Interactive mode -Present options based on context. Stage only compound-refresh files regardless of which option the user picks. +First, run `git branch --show-current` to determine the current branch. Then present the correct options based on the result. Stage only compound-refresh files regardless of which option the user picks. -**On main/master (clean or dirty):** +**If the current branch is main, master, or the repo's default branch:** + +Do NOT offer to commit directly to main. Always offer a branch first: 1. Create a branch, commit, and open a PR (recommended) 2. Don't commit — I'll handle it -**On a feature branch, clean working tree:** +**If the current branch is a feature branch, clean working tree:** 1. Commit to this branch as a separate commit (recommended) 2. Create a separate branch and commit 3. Don't commit -**On a feature branch, dirty working tree (other uncommitted changes):** +**If the current branch is a feature branch, dirty working tree (other uncommitted changes):** 1. Commit only the compound-refresh changes to this branch (selective staging — other dirty files stay untouched) 2. Don't commit