بنقرة واحدة
branch-init
Initialize a new feature branch with worktree, BRANCH.md from template, and environment setup
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Initialize a new feature branch with worktree, BRANCH.md from template, and environment setup
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
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.
استنادا إلى تصنيف SOC المهني
| name | branch-init |
| description | Initialize a new feature branch with worktree, BRANCH.md from template, and environment setup |
| allowed-tools | Read Write Bash Glob |
Workflow skill to initialize a new feature branch with proper worktree, BRANCH.md, and environment.
Create worktree
git worktree add tmp/<slug> -b <branch-type>/<slug> main
Where <branch-type> is one of: feat, fix, boot, doc, refactor.
Where <slug> is a short kebab-case identifier for the branch.
Verify branch
git -C tmp/<slug> branch --show-current
Must output <branch-type>/<slug>. Abort if mismatch.
Read template
Read plan/BRANCH_TEMPLATE.md in full. This is the formatting contract for BRANCH.md.
Create BRANCH.md from template Fill in the template with:
Makefile, docker-compose*.yml, .cursor/rules/**, plan/NN-BRANCH_*.mdBRxx-EXn exceptionBRANCH.md must follow plan/BRANCH_TEMPLATE.md strictly:
### headers## Feedback LoopAllocate ports based on branch index Convention for port allocation:
API_PORT=87<nn> (e.g., 8788, 8789, 8790...)UI_PORT=51<nn> (e.g., 5174, 5175, 5176...)MAILDEV_UI_PORT=10<nn> (e.g., 1084, 1085, 1086...)
Record port allocation in BRANCH.md Lot 0.
If PLAN.md exists, check existing branch port allocations to avoid conflicts.Commit
cd tmp/<slug>
git add BRANCH.md
make commit MSG="chore: init BRANCH.md for <branch-type>/<slug>"
git add . or git add -AENV must be last argument in all make commandsplan/BRANCH_TEMPLATE.md structure exactly — do not reinvent