fix: dynamic base branch detection across all SKILL templates (v0.3.10)#81
Open
fix: dynamic base branch detection across all SKILL templates (v0.3.10)#81
Conversation
DRY placeholder for dynamic base branch detection across PR-targeting skills. Detects via gh pr view (existing PR base) → gh repo view (repo default) → fallback to main. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replaces ~14 hardcoded 'main' references with dynamic detection via
{{BASE_BRANCH_DETECT}}. Fixes stacked branches and Conductor workspaces
targeting non-main branches. Adds --base <base> to gh pr create.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Same pattern as ship: replaces hardcoded 'main' with {{BASE_BRANCH_DETECT}}.
Also cleans up qa bash-isms (REPORT_DIR variable, port chaining).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Retro queries commit history (not PR targets), so uses simpler detection: gh repo view defaultBranchRef. Replaces ~11 origin/main refs with origin/<default>. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Bash blocks are self-contained, but cross-block variable references (INSTALL_DIR from Step 2) were implicit. Adds prose making them explicit. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds "Writing SKILL templates" section to CLAUDE.md explaining that templates are prompts, not scripts. Adds validation test catching hardcoded 'main' in git commands, and resolver content test. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add {{BASE_BRANCH_DETECT}} to ARCHITECTURE.md placeholder list.
Cross-reference CLAUDE.md template authoring guidance from CONTRIBUTING.md.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
patovaldezf
approved these changes
Mar 16, 2026
Takes main's v0.4.1 version, PREAMBLE/QA_METHODOLOGY/qa-only additions, contributor mode, and session tracking. Reapplies BASE_BRANCH_DETECT resolver and dynamic base branch detection across all templates. Regenerates all 11 SKILL.md files. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- /review: verifies Step 0 detection + git diff against detected base
- /ship: truncated dry-run (Steps 0-1 only, no push/PR), asserts no
destructive actions
- /retro: verifies default branch detection for git log queries
Covers the {{BASE_BRANCH_DETECT}} resolver path (review), the ship
template's dual abort check, and retro's inline detection pattern.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
{{BASE_BRANCH_DETECT}}resolver — DRY placeholder in gen-skill-docs.ts for dynamic base branch detection (PR base → repo default → fallback to main)main. Fixes stacked branches and Conductor workspaces targeting non-main branches.mainvsmaster)Pre-Landing Review
No issues found. All changes are markdown templates, documentation, and test additions — no SQL, no security surfaces.
Eval Results
No prompt-related files changed — evals skipped.
Test plan
🤖 Generated with Claude Code