بنقرة واحدة
branch-init
Initialize a new branch with worktree, BRANCH.md from template, and environment setup
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Initialize a new branch with worktree, BRANCH.md from template, and environment setup
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Close a branch — final validation, PR creation, merge, archive plan file
Run a source adapter against fixture data and verify the extracted output
Run lot gate checks — typecheck, lint, and scoped tests for the current lot
Update rules and skills after a branch merges — absorb learnings, refine patterns
Verify modified files against branch allowed/forbidden/conditional paths
Bootstrap a new source-feasibility spike in packages/radar-sources/src/sources/_spikes/
| name | branch-init |
| description | Initialize a new branch with worktree, BRANCH.md from template, and environment setup |
| allowed-tools | Read Write Bash Glob |
Workflow skill to initialize a new branch with a clean worktree, a plan/NN-BRANCH_<slug>.md from the template, and a unique port mapping.
Pick the next branch number from PLAN.md and the type (feat / fix / chore / refacto / docs).
Create the worktree
git worktree add tmp/<slug> -b <type>/<slug> main
Verify the branch
git -C tmp/<slug> branch --show-current
Must output <type>/<slug>. Abort if mismatch.
Read the template
Read plan/BRANCH_TEMPLATE.md in full. This is the formatting contract.
Create the branch plan file
Write plan/NN-BRANCH_<type>-<slug>.md from the template with:
Makefile, docker-compose*.yml, rules/**, CLAUDE.md, AGENTS.md, GEMINI.md, plan/NN-BRANCH_*.md (other branches).BRxx-EXn.Allocate ports based on branch index
API_PORT=88<nn> (e.g., 8801, 8802, …).UI_PORT=53<nn> (e.g., 5301, 5302, …).MAILDEV_UI_PORT=11<nn> (e.g., 1101, 1102, …).
Record the allocation in the branch plan file (Lot 0). Check PLAN.md to avoid collisions with active branches.Commit
cd tmp/<slug>
git add plan/NN-BRANCH_<type>-<slug>.md
make commit MSG="chore: init branch plan for <type>/<slug>"
git add . or git add -A.ENV must be last argument in all make commands.plan/BRANCH_TEMPLATE.md structure exactly — no ### headers, no prose dumps, checkbox-only tasks.