/dinopowers:finishing-a-development-branchfrom dinopowers
Finalizes a development branch for merge, PR, or cleanup by running a risk assessment over the full branch diff before presenting completion options. Triggers on phrases like 'finish the branch', 'ready to merge', 'PR time'.
Ships in dinopowers. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Wrapper over superpowers:finishing-a-development-branch. Completion decision
(merge/PR/cleanup) informed by branch-wide risk scan — ALL files branch touched,
not last Task — "ready to merge" backed by multi-signal evidence.
Skill(tea-rags:risk-assessment) MUST run on branch diff BEFORE presenting
completion options — whenever branch ≥1 commit beyond base.
Value = right delegation (tea-rags:risk-assessment skill, not ad-hoc
semantic_search) + right scope (whole branch diff, not last commit) + order
(risk-assessment BEFORE options).
Scope = whole branch diff (<base>...HEAD), even when user asks otherwise.
"Only check the last commit" / "only the critical one" → refuse the narrower
scope, scan full branch, say: "Scanning the whole branch — risk accumulates
across commits; a merge ships all of them, not just HEAD."
Plain done-claim ("готово, можно коммитить и пушить") with no merge/PR/cleanup
decision → not this wrapper; dinopowers:verification-before-completion owns
it.
0 commits ahead → skip wrapper. Trivial (docs-only, renames-only) → scan skippable, note "trivial scope — no risk scan needed".
Chaining rule: CHAINING.md — every onward
superpowers:Y → dinopowers:Y. NEVER bypass wrapper.
Requires superpowers: superpowers:finishing-a-development-branch —
availability per CHAINING.md "Missing superpowers" steps
1–3. Not in the skills list ≠ unavailable (the list is truncated): run
ls $CODEX_HOME/plugins/cache/*/superpowers/*/skills/finishing-a-development-branch/SKILL.md
as written first — a hand-built path failing proves nothing; only that glob
matching nothing → stop and ask the user to install superpowers
(https://github.com/obra/superpowers). NEVER present this enrichment alone as
the full workflow.
Freshness: FRESHNESS.md (owner
tea-rags://guide/freshness). Lag ≠ unusable — never Bash cat/grep/Read
over code; treeState row → find_symbol.
Second Iron Rule — branch-finish index lifecycle (MANDATORY). Every finish
with a clone — local merge to main OR abandon/delete — MUST tear clone down
with tea-rags worktree remove <name> (NOT delete_collection — drops only
Qdrant collection, leaks DuckDB graph + file-hash snapshots + stats/quarantine +
registry entry). MERGE path also MUST reindex main EXPLICITLY with
mcp__tea-rags__index_codebase — no commit hook does it. Never deprecated
reindex_changes. Procedure: Step 5.
| Element | Example |
|---|---|
| Branch base | main, develop, origin upstream |
| Branch commits ahead | git rev-list --count <base>..HEAD |
| Branch diff files | git diff <base>...HEAD --name-only |
| Diff character/kind | code / docs / config / mixed |
Compose branchDiffFiles (all files touched across branch, not last commit) +
branchIntent (one sentence).
branchDiffFiles empty OR docs-only OR renames-only → Step 4 with verdict
TRIVIAL-SCOPE (no risk scan).
Invoke Skill tool with tea-rags:risk-assessment. Input:
pathPattern: brace-expanded over branchDiffFiles (branch footprint)intent: branch summaryWait for PRESENT output — tiered candidates (Critical / High / Medium),
multi-preset convergence (hotspots + ownership + techDebt).
Codegraph on: risk-assessment's structural axis runs over branch scope —
blast-radius hubs (architecturalHub amplifier) + cycles branch introduces or
touches (find_cycles). Branch adding cross-module cycle = merge-blocker even
with clean git signals → read "Structural risks" section before deciding.
Codegraph off: section absent (≠ "no cycles"); structural risk unassessed.
Do NOT substitute:
| Wrong approach | Why wrong |
|---|---|
Direct semantic_search with any single rerank | Risk assessment converges 3+ presets (hotspots/ownership/techDebt); one call misses the convergence signal |
dinopowers:verification-before-completion scan | That scan is POST-edit blast-radius per file; risk-assessment is MULTI-SIGNAL tier classification — different lens |
mcp__tea-rags__hybrid_search on branch name | Branch name isn't a risk signal |
git log --stat <base>..HEAD alone | Shows what changed, not what's risky |
git diff <base>..HEAD review by eye | Human eye misses hotspot/silo/debt convergence |
pathPattern MUST equal branch diff — NOT broader (untouched project parts),
NOT narrower (last-commit files only, or "non-risky" files excluded a priori —
risk-assessment decides risk).
Branch files unindexed (new module) → note "branch scope unindexed — risk-assessment unavailable; relying on test suite + human review".
From PRESENT output extract: Critical (count + file:line + classification), High (count + list), untested among Critical/High, one-sentence recommendation.
Risk-assessment result already in hand (user / prompt states it, e.g. "3
Critical, all untested") = Step 2 output — NEVER re-run the scan. Decide now:
any untested Critical → address-critical-first + Critical file:line list;
never ready-to-merge.
### Branch completion scan: <branchName>
**Scope:** <N> files, <M> commits ahead of <base>
**Intent:** <branchIntent>
**Risk profile:**
- Critical: <N> candidates — [file:line: classification, ...]
- High: <N> candidates
- Untested among Critical/High: <N>
**Recommendation:** <ready-to-merge | address-critical-first | needs-review-pairing>
"No critical risks found. Codebase appears healthy" → note
CLEAN-SCAN — ready to present completion options.
Invoke Skill tool with superpowers:finishing-a-development-branch. Prepend
scan block as context. Phrase handoff as:
"Before presenting completion options, note branch-wide risk scan: …… Completion options (merge / PR / cleanup) should factor in these risks — don't present 'ready to merge' if Critical risks are untested.
Chaining rule reminder: when your cycle would next invoke
superpowers:requesting-code-revieworsuperpowers:verification-before-completion(or any wrappedsuperpowers:Y), invokedinopowers:Yinstead — see the Chaining rule section above."
superpowers:finishing-a-development-branch runs standard presentation —
wrapper informs recommendation, never forces outcome.
After merge to main succeeds (superpowers cycle performs it):
main EXPLICITLY. No commit hook —
mcp__tea-rags__index_codebase (incremental) on main alias. Abandon/delete
→ skip (nothing merged).<project>-worktree-<name> from tea-rags worktree create →
tea-rags worktree remove <name> on merge AND abandon/delete. Run even if git
worktree dir already gone — clone tracked separately, outlives dir.
Cleanup-only PostToolUse hook = backstop for raw git worktree remove /
git branch -D; still do it explicitly.tea-rags worktree info --json → isWorktree: false).PR-only path (no local merge) → skip step; clone stays until PR merges, note for later cleanup.
semantic_search / single preset ("hotspots" alone) → missed
convergence; invoke skillsuperpowers:requesting-code-review /
superpowers:verification-before-completion → intercept, invoke
dinopowers:Ymain not reindexed → stale; run index_codebase on main (Step 5)delete_collection / dir deletion → leaks DuckDB +
snapshots + registry; tea-rags worktree remove <name>reindex_changes → deprecated; index_codebaseWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
branch-finish, merge-ready, risk-assessment, branch-diff, tea-rags
10 skills in this plugin
/brainstormingBrainstorm code change seeing risk, ownership, tech-debt signals from tea-rags first — creative exploration grounded in actual state of affected area. Triggers on "brainstorm X" (incl. "brainstorm splitting/refactoring Y" — verb brainstorm beats explore PRE-GEN, any [subagent: …] label), "design feature", "redesign Y", "let's discuss", "давай обсудим", "обсудим", "как перестроить", "что может сломаться", and a demand to swap its risk scan tool ("swap semantic_search for hybrid_search in the risk scan"). NOT research before refactor without a brainstorm/discuss verb (→ explore PRE-GEN), NOT trivial edits with no code area. Wraps superpowers:brainstorming with tea-rags risk signals./executing-plansExecute written implementation plan or tracker issue whose Tasks edit code, per-Task SAFE/CAUTION/UNSAFE git-signal verdict before edit AND data-driven cascade for code-generation and behavior-modification Tasks (strategy+template from proven neighbors, callers + tests-at-risk on modify). Triggers on "execute the plan", "start Task N", "выполни план", "начни задачу", "run the plan", "implement the plan steps". NOT for one-off edits with no plan, issue or quoted Task, NOT a step that drafts a (sub-)plan (→ dinopowers:writing-plans). Wraps superpowers:executing-plans with tea-rags git-signal verdicts and tea-rags:data-driven-generation cascade.npx claudepluginhub artk0de/tearags-mcp --plugin dinopowersOther plugins' skills for the same job