Use this skill after a code PR is merged to integrate approved specs, update the retrospective with learnings, and clean up branches. It now automatically summarizes the retrospective file to keep it concise. Triggers include "integrate change", "post-merge cleanup", or completing a feature implementation.
npx claudepluginhub joshuarweaver/cascade-code-devops-misc-1 --plugin bodangren-git-workflowThis skill uses the workspace's default tool permissions.
Perform post-merge integration tasks after a code PR is successfully merged. This skill completes the development cycle by moving approved specs from `docs/changes/` to `docs/specs/`, updating the retrospective with learnings, cleaning up feature branches, and updating project board status. It ensures the repository remains clean and the documentation reflects the current state.
Creates isolated Git worktrees for feature branches with prioritized directory selection, gitignore safety checks, auto project setup for Node/Python/Rust/Go, and baseline verification.
Executes implementation plans in current session by dispatching fresh subagents per independent task, with two-stage reviews: spec compliance then code quality.
Dispatches parallel agents to independently tackle 2+ tasks like separate test failures or subsystems without shared state or dependencies.
Perform post-merge integration tasks after a code PR is successfully merged. This skill completes the development cycle by moving approved specs from docs/changes/ to docs/specs/, updating the retrospective with learnings, cleaning up feature branches, and updating project board status. It ensures the repository remains clean and the documentation reflects the current state.
A key feature of this skill is the automated maintenance of RETROSPECTIVE.md. When the file grows too large, the script automatically uses the Gemini CLI to summarize older entries, keeping the document concise and readable while preserving key historical learnings.
Use this skill in the following situations:
gh CLI tool installed and authenticatedgemini CLI tool installed and authenticatedBefore running integration, confirm the PR was successfully merged:
gh pr view PR_NUMBER --json state,mergedAt
Ensure the state is "MERGED" and mergedAt timestamp is populated.
Determine what needs to be integrated:
docs/changes/?If using the automated script for integration:
bash scripts/integrate-change.sh -p PR_NUMBER -b BRANCH_NAME -i ITEM_ID -w "WENT_WELL" -l "LESSON" [-c CHANGE_DIR]
Parameters:
-p: PR number that was merged-b: Feature branch name (e.g., feat/45-restructure-doc-indexer)-i: Project board item ID-w: A quote about what went well.-l: A quote about the key lesson learned.-c: Optional path to change proposal directory (e.g., docs/changes/my-feature)The helper script automates these steps:
spec-delta.md to docs/specs/ and commits the change.RETROSPECTIVE.md exceeds a line limit (e.g., 150 lines), it automatically summarizes older sprint entries using the Gemini CLI to keep the file manageable.If not using the script, perform these steps manually:
git switch main
git pull
# Delete remote branch
git push origin --delete feat/45-restructure-doc-indexer
# Delete local branch
git branch -D feat/45-restructure-doc-indexor
If the feature had a spec proposal:
# Identify the change directory
ls docs/changes/
# Move spec-delta to specs
SPEC_NAME="my-feature"
cp docs/changes/$SPEC_NAME/spec-delta.md docs/specs/$SPEC_NAME.md
# Remove change directory
rm -r docs/changes/$SPEC_NAME
# Commit integration
git add docs/
git commit -m "docs: Integrate approved spec from feat/45-my-feature"
gh project item-edit \
--project-id PROJECT_ID \
--id ITEM_ID \
--field-id FIELD_ID \
--single-select-option-id DONE_OPTION_ID
Add learnings to RETROSPECTIVE.md following the established format. See the retrospective for examples.
# Edit RETROSPECTIVE.md to add entry
git add RETROSPECTIVE.md
git commit -m "docs: Add retrospective for PR #45"
git push
After integration completes:
# Verify branch deleted
git branch -a | grep feat/45
# Verify spec integrated (if applicable)
ls docs/specs/
# Verify retrospective updated
tail -20 RETROSPECTIVE.md
# Verify project board updated
gh project item-list PROJECT_NUMBER --owner @me
To prevent RETROSPECTIVE.md from becoming unmanageably long, the integrate-change.sh script includes an automated summarization feature powered by the Gemini CLI.
How it works:
RETROSPECTIVE.md.gemini CLI, and requests a concise summary that preserves key learnings and markdown structure.RETROSPECTIVE.md with the preserved header, a new "Summarized Sprints (via Gemini)" section, and the newly generated summary.This ensures that the file remains a valuable and readable source of information without requiring manual pruning.
Symptom: Script reports PR is not in MERGED state
Solution:
Symptom: Git reports branch doesn't exist
Solution:
|| echo "..."Symptom: Script cannot find change directory
Solution:
-c flag only when spec existsSymptom: GitHub API returns 403 error
Solution:
gh authentication: gh auth statusSymptom: The script fails during the "Updating retrospective..." step with an error related to the gemini command.
Solution:
gemini CLI is installed and in your system's PATH.gemini auth if needed.RETROSPECTIVE_MAX_LINES variable in the script to bypass the summarization and add your entry.Symptom: The automated summary has formatting problems or seems to have lost critical information.
Solution:
RETROSPECTIVE.md in git to find the previous version if you need to recover information.summarize_retrospective function in the script for better results in the future.The script uses these hardcoded configuration variables (lines 31-33):
PROJECT_ID="PVT_kwHOARC_Ns4BG9YU"
FIELD_ID="PVTSSF_lAHOARC_Ns4BG9YUzg32qas" # Workflow Stage
DONE_OPTION_ID="6bc77efe"
To adapt for your project:
gh project list --owner @megh api graphql -f query='...' (see GitHub docs)Note: A future version should detect these dynamically.