Skip to content

feat: moved branch scope detection to scripts#159

Open
RuiMiguel wants to merge 1 commit intomainfrom
feat/extract-scope-detection-base-branch-to-scripts
Open

feat: moved branch scope detection to scripts#159
RuiMiguel wants to merge 1 commit intomainfrom
feat/extract-scope-detection-base-branch-to-scripts

Conversation

@RuiMiguel
Copy link
Copy Markdown
Contributor

Description

#145

Multiple skills contain inline bash commands for detecting the current branch and base branch. These are deterministic operations that don't need LLM reasoning.

  1. Detect base branch — checks for main, then master, then develop. Appears in:
    - rebase/SKILL.md (lines 26-28)
    - review/SKILL.md (lines 38-42)
    - create-branch/SKILL.md (line 29 — checks if current branch is one of these)
  2. Detect review scope — review/SKILL.md (lines 30-56) runs ~6 bash commands to detect branch, base branch, changed files, uncommitted changes, and deduplicates.

Plan:

  1. Create skills/shared/scripts/detect-base-branch.sh — outputs the default branch name, exits 1 if none found
  2. Create skills/shared/scripts/detect-review-scope.sh — outputs current branch, base branch, and deduplicated changed files
  3. Update rebase/SKILL.md — replace inline detection with script call
  4. Update review/SKILL.md — replace multi-step scope detection with script call
  5. Update create-branch/SKILL.md — replace inline base-branch list with script call
  6. Add symlinks in each skill's directory so paths stay local

Scripts encapsulate existing bash logic. Skills still own all decision-making.

Type of Change

  • New feature (feat)
  • Bug fix (fix)
  • Code refactor (refactor)
  • Documentation (docs)
  • CI change (ci)
  • Chore (chore)

@RuiMiguel RuiMiguel requested a review from a team as a code owner April 10, 2026 10:13
@RuiMiguel RuiMiguel self-assigned this Apr 10, 2026
@RuiMiguel RuiMiguel added the performance Changes that improve performance label Apr 10, 2026
Copy link
Copy Markdown
Contributor

@ryzizub ryzizub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

performance Changes that improve performance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants