بنقرة واحدة
branch-close
Close a branch — final validation, PR creation, rules update, merge
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Close a branch — final validation, PR creation, rules update, merge
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Use when bringing the harness method to a NEW or non-sentropic repo — maps the repo's conventions into a harness profile so the same scope/branch/verify kernel applies anywhere.
Use before any creative/design work (a feature, a package, an evolution) — explores intent and design via the spec-ladder with multi-peer adversarial review BEFORE implementation.
Use on any bug, test failure, or unexpected behaviour BEFORE proposing a fix — runs the generic evidence-first root-cause loop.
Use when you have a spec/decisions and need an executable plan — writes a lot-based BRANCH.md from the template and completes with track for realization state.
Use when completing a feature, a design step, or before merging — runs a ≥2-peer consensus review and reconciles the findings, instead of a single rubber-stamp pass.
Use when adding or evolving tests for a feature/bugfix — applies the sentropic test-pyramid, scoped-test loop, environment isolation, and AI-flaky policy.
| name | branch-close |
| description | Close a branch — final validation, PR creation, rules update, merge |
| paths | **/BRANCH.md,PLAN.md |
| allowed-tools | Read Write Bash Edit Glob Grep |
Workflow skill to close a branch through final validation, PR creation, and merge.
Verify all lots complete Read BRANCH.md and verify:
[x] (except Lot N items about to be executed)## Feedback Loop items are resolved (closed, deferred with owner/date, or cancelled)/scope-check if available)Run final gate Execute the full quality gate sequence:
make typecheck-api ENV=<branch-env>
make typecheck-ui ENV=<branch-env>
make lint-api ENV=<branch-env>
make lint-ui ENV=<branch-env>
make test-api ENV=test-<branch-slug>
make test-ui ENV=test
make build-api build-ui-image API_PORT=<port> UI_PORT=<port> MAILDEV_UI_PORT=<port> ENV=e2e-<branch-slug>
make clean test-e2e API_PORT=<port> UI_PORT=<port> MAILDEV_UI_PORT=<port> ENV=e2e-<branch-slug>
For AI flaky tests: run scoped specs, document pass/fail signatures in BRANCH.md.
Create or update PR
git push origin <branch-name>
gh pr create --title "<branch title from BRANCH.md>" --body "$(cat BRANCH.md)"
Or if PR already exists:
gh pr edit <pr-number> --body "$(cat BRANCH.md)"
PR body is the exact text of BRANCH.md (source of truth).
Verify CI passes
gh run list --branch <branch-name> --limit 5
gh run view <run-id>
Wait for CI to complete. Resolve any failures before proceeding.
After UAT + CI OK: merge Once both UAT sign-off and CI are green:
cd tmp/<slug>
git rm BRANCH.md
make commit MSG="chore: remove BRANCH.md for merge"
git push origin <branch-name>
Then merge via GitHub (or gh pr merge).
Post-merge: update rules if needed If this branch introduced new patterns, conventions, or workflow changes:
/post-branch-update skill (if available)rules/*.md files to absorb learningsUpdate PLAN.md status
If PLAN.md exists, update the branch status to merged with date.
Clean up worktree:
git worktree remove tmp/<slug>