merge-helper
npx skills add https://github.com/davjdk/thermocalcbot --skill merge-helper
Agent 安装分布
Skill 文档
Merge Helper Skill
You guide the process of merging a completed feature branch into main.
When to Use This Skill
- All stages in spec are â ÐавеÑÑÑн
- User asks to “merge to main” or “меÑж в main”
- Feature is ready for integration
- PR needs to be prepared
Prerequisites
Before merge:
- All spec stages must be â
- All tests must pass
- No uncommitted changes
- Branch is up to date with main
Workflow
Step 1: Verify Feature Completion
Load spec file and check:
branch=$(git branch --show-current)
spec_file=".ai/specs/${branch}.md"
Verify all stages are â :
Checking feature completion...
Spec: .ai/specs/{branch}.md
Stages: 5/5 â
All stages complete. Proceeding with merge preparation.
If incomplete stages exist:
â ï¸ Ð¤Ð¸Ñа не завеÑÑена
ÐезавеÑÑÑннÑе ÑÑапÑ:
- ÐÑап 3: API endpoints (ð Ð ÑабоÑе)
- ÐÑап 4: UI templates (⬠Ðе наÑаÑ)
ÐавеÑÑиÑе вÑе ÑÑÐ°Ð¿Ñ Ð¿ÐµÑед меÑжем.
STOP â do not proceed.
Step 2: Run Quality Checks
# Run all tests
uv run pytest
# Check for uncommitted changes
git status
# Check if branch is behind main
git fetch origin main
git log HEAD..origin/main --oneline
If tests fail:
â ТеÑÑÑ Ð½Ðµ пÑоÑ
одÑÑ
Failed: 3, Passed: 47
ÐÑпÑавÑÑе ÑеÑÑÑ Ð¿ÐµÑед меÑжем.
STOP
If uncommitted changes:
â ï¸ ÐÑÑÑ Ð½ÐµÐ·Ð°ÐºÐ¾Ð¼Ð¼Ð¸ÑеннÑе изменениÑ
Modified files:
- src/module/file.py
- tests/test_file.py
ÐакоммиÑÑÑе или оÑмениÑе изменениÑ.
STOP
If behind main:
â ï¸ ÐеÑка оÑÑÑаÑÑ Ð¾Ñ main
Commits behind: 5
ÐбновиÑе веÑкÑ:
git rebase origin/main
# или
git merge origin/main
Step 3: Update CHANGELOG
Read .ai/CHANGELOG.md and add release entry:
## [Unreleased]
### Added - {Feature Name}
- [path/to/file1.py](../path/to/file1.py): Description
- Detail 1
- Detail 2
### Changed
- [path/to/file2.py](../path/to/file2.py): What changed
### Fixed
- [path/to/file3.py](../path/to/file3.py): What was fixed
Collect changes from all commits in branch:
git log main..HEAD --oneline
Step 4: Update ARCHITECTURE (if needed)
Check if architectural changes were made:
- New modules added?
- New services/dependencies?
- Database schema changes?
- API surface changes?
If yes, update .ai/ARCHITECTURE.md:
- Add new components to diagrams
- Update module descriptions
- Document new patterns
Step 5: Final Spec Update
Update spec file status:
# [Feature Name] - Feature Specification
> **ÐаÑа ÑозданиÑ:** 2026-01-05
> **ÐаÑа завеÑÑениÑ:** 2026-01-07 â Add this
> **ÐеÑка:** `feature/name`
> **СÑаÑÑÑ:** â
ÐавеÑÑÑн â Change from ð¡
Add final history entry:
| 2026-01-07 | MERGE | abc1234 | Feature merged to main |
Step 6: Prepare Merge
Option A: Squash Merge (recommended)
git checkout main
git pull origin main
git merge --squash feature/{name}
git commit -m "feat: {feature description}
- Stage 1: {description}
- Stage 2: {description}
- ...
Closes #{issue-number}"
Option B: Rebase Merge
git checkout main
git pull origin main
git rebase feature/{name}
Step 7: Post-Merge Cleanup
After successful merge:
# Delete local branch
git branch -d feature/{name}
# Delete remote branch (if applicable)
git push origin --delete feature/{name}
Archive spec file (optional):
mv .ai/specs/{branch}.md .ai/specs/archive/{branch}.md
Step 8: Report Completion
â
Merge завеÑÑÑн
ð ФиÑа: {Feature Name}
ð¿ ÐеÑка: feature/{name} â main
ð ÐоммиÑ: {commit-hash}
ð ÐбновлÑннÑе докÑменÑÑ:
- .ai/CHANGELOG.md â
- .ai/ARCHITECTURE.md â
(еÑли пÑименимо)
- .ai/specs/{branch}.md â archived
ð§¹ Cleanup:
- ÐокалÑÐ½Ð°Ñ Ð²ÐµÑка Ñдалена â
- Remote веÑка Ñдалена â
ФиÑа ÑÑпеÑно инÑегÑиÑована в main!
Pre-Merge Checklist
Before proceeding with merge, verify:
- All spec stages â
- All tests pass
- No uncommitted changes
- Branch up to date with main
- CHANGELOG updated
- ARCHITECTURE updated (if needed)
- Spec marked as complete
- User confirmed merge
Merge Strategies
When to Squash
- Feature has many small commits
- Commit history is messy
- Want clean single commit in main
When to Rebase
- Commits are well-structured
- Want to preserve commit history
- Each commit is atomic and meaningful
References
See commit-helper for commit conventions. See changelog_templates.md for CHANGELOG format.
NOTE: This is the ONLY place where CHANGELOG.md should be updated. Individual commits do NOT update CHANGELOG.