From shannon
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
npx claudepluginhub krzemienski/shannon-framework --plugin shannonThis skill uses the workspace's default tool permissions.
**Structured branch completion with quantitative readiness validation.**
Generates design tokens/docs from CSS/Tailwind/styled-components codebases, audits visual consistency across 10 dimensions, detects AI slop in UI.
Records polished WebM UI demo videos of web apps using Playwright with cursor overlay, natural pacing, and three-phase scripting. Activates for demo, walkthrough, screen recording, or tutorial requests.
Delivers idiomatic Kotlin patterns for null safety, immutability, sealed classes, coroutines, Flows, extensions, DSL builders, and Gradle DSL. Use when writing, reviewing, refactoring, or designing Kotlin code.
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):
# 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.
# 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.
# 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_changes_detected: bool # +0.2
}
readiness_score_tier3 = sum(passing_checks) / total_checks
# Range: 0.0-1.0
GATE: If Tier 3 < 0.80, prompt for manual fixes.
readiness_score = (
readiness_score_tier1 * 0.5 + # Tests are mandatory
readiness_score_tier2 * 0.25 + # Code quality important
readiness_score_tier3 * 0.25 # Integration critical
)
Range: 0.00-1.00
Interpretation:
# Run project's full test suite
npm test / cargo test / pytest / go test ./...
If tests_fail:
readiness_score = test_pass_rate
Report: "[N failing tests]"
STOP - Cannot proceed to Tiers 2-3
Else:
readiness_score_tier1 = 1.0
Continue to Tier 2
# MCP pattern analysis
git diff base_branch...HEAD | MCP analyze
scope_size: files_modified count
magnitude: lines_added + lines_deleted
coverage: test coverage delta
# Serena historical comparison
Find similar merges in history
readiness_score_tier2 = inverse(risk_score)
Log alert if tier2 < 0.75
# Base branch check
git merge-base HEAD main || git merge-base HEAD master
# Sync check
git status | grep "ahead|behind"
# Conflict check
git merge --no-commit --no-ff base_branch
# Commit message check (conventional commits)
git log base_branch...HEAD --format="%B"
# Calculate tier3_score from checks
Overall readiness_score = [calculated above]
If readiness_score >= 0.90:
"✓ READY TO INTEGRATE"
Else:
"⚠ CAUTION NEEDED [score: X.XX]"
Alert on which tier failed
Present 4 options:
1. Merge back to <base-branch> locally
2. Push and create a Pull Request
3. Keep the branch as-is
4. Discard this work
Option 1: Merge Locally
git checkout <base-branch>
git pull
git merge <feature-branch>
<test-command> # Re-verify Tier 1
git branch -d <feature-branch>
# Cleanup worktree
Option 2: Push and Create PR
git push -u origin <feature-branch>
# Create PR with readiness_score in description
gh pr create --title "[readiness: X.XX] Title" \
--body "Readiness: Tier1=X.XX Tier2=X.XX Tier3=X.XX"
# Keep worktree
Option 3: Keep As-Is
Report: "Keeping branch. Readiness: X.XX"
# Don't cleanup
Option 4: Discard
# Confirm first (typed confirmation: "discard")
git checkout <base-branch>
git branch -D <feature-branch>
# Cleanup worktree
❌ Skip test verification ✅ Always Tier 1 first
❌ Merge with failing tests ✅ Tier 1 must be 1.0
❌ Ignore readiness_score ✅ Alert if score < 0.90
❌ Force push without reason ✅ Only if explicitly requested
Track across all branches:
Use to improve future predictions.
Called by:
Pairs with:
Example branch completion: