Back to Skills

finishing-a-development-branch

verified

Use at development completion - guides branch integration with Shannon 3-tier validation (0.00-1.00 readiness score), MCP merge pattern analysis, and Serena risk assessment

View on GitHub

Marketplace

shannon-framework

krzemienski/shannon-framework

Plugin

shannon

Repository

krzemienski/shannon-framework
1stars

skills/finishing-a-development-branch/SKILL.md

Last Verified

January 21, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/krzemienski/shannon-framework/blob/main/skills/finishing-a-development-branch/SKILL.md -a claude-code --skill finishing-a-development-branch

Installation paths:

Claude
.claude/skills/finishing-a-development-branch/
Powered by add-skill CLI

Instructions

# Finishing a Development Branch (Shannon-Enhanced)

## Overview

**Structured branch completion with quantitative readiness validation.**

Verify → 3-tier validation → Present options → Execute → Cleanup.

Shannon enhancement: Numerical readiness scoring, merge pattern analysis via MCP, Serena risk assessment.

**Readiness Score (0.00-1.00):**
- 0.00-0.60: Not ready (tests failing, validation incomplete)
- 0.61-0.80: Mostly ready (minor issues, could proceed carefully)
- 0.81-0.95: Ready (validates on all tiers, low risk)
- 0.96-1.00: Excellent (perfect readiness)

## The 3-Tier Validation

### Tier 1: Test Validation

```bash
# Run full test suite
readiness_score_tier1 = 0.0

if test_suite_passes:
  readiness_score_tier1 = 1.0
  log to Serena: {test_count, coverage_pct, duration}
else:
  readiness_score_tier1 = (tests_passed / total_tests)
  log failures: "[list failing tests]"
  STOP: Cannot proceed with Tiers 2-3
```

**GATE:** If Tier 1 < 0.90, must fix before continuing.

### Tier 2: Code Quality Validation

```bash
# Metrics gathering (Serena)
code_quality = {
  files_modified: count,
  lines_added: count,
  lines_deleted: count,
  commits: count,
  test_coverage_change: delta_pct
}

# MCP pattern analysis: compare to historical merges
pattern_match = compare_to_historical_merges({
  scope_size: files_modified,
  change_magnitude: lines_added,
  test_coverage_delta: coverage_change
})

readiness_score_tier2 = pattern_match.risk_assessment_inverse
# 1.0 = safe pattern, 0.0 = high-risk pattern

Log to Serena:
  historical_similar_merges: N (count)
  avg_merge_success_rate: X.XX (from history)
  risk_level: "low|medium|high"
```

**GATE:** If Tier 2 < 0.75, alert but can override.

### Tier 3: Integration Readiness

```bash
# Final checklist validation
integration_checks = {
  base_branch_exists: bool,          # +0.1
  branch_synced_with_base: bool,     # +0.2
  no_conflicting_changes: bool,      # +0.3
  commit_messages_compliant: bool,   # +0.2
  no_breaking_

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
5959 chars