بنقرة واحدة
orca-code
Code workflow for Orca lead. Parallel implementation + merge/commit + optimize.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Code workflow for Orca lead. Parallel implementation + merge/commit + optimize.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
| name | orca-code |
| description | Code workflow for Orca lead. Parallel implementation + merge/commit + optimize. |
For lead only. If $ORCA_ROLE != lead, ignore this workflow.
Activated via --workflow code or invoke orca-code skill manually.
Break the user's request into independent sub-tasks. Each task must:
Confirm breakdown with user before dispatching.
For each task, up to N workers (from $ORCA_WORKERS):
When ORCA_WORKTREE=1, create a worktree first:
worktree_path=$(orca-worktree create task-1)
When ORCA_WORKTREE=0, skip worktree creation — workers use $ORCA_ROOT directly and must not commit. The lead reviews and commits the final diff.
# Short tasks: inline in message
tmux-bridge read <worker> 5 && \
tmux-bridge message <worker> "Task: <description>
Workdir: cd $worktree_path # or $ORCA_ROOT when worktree is off
Scope: <files to change>
Criteria: <what done looks like>
When done: /review, build, test. Fix issues, then report back." && \
tmux-bridge read <worker> 5 && \
tmux-bridge keys <worker> Enter
# Long-context tasks: write file, send pointer
plan_path="/tmp/orca-handoff-task-1-$(date +%s).md"
cat > "$plan_path" <<PLAN
[full plan with all context, constraints, file refs]
PLAN
tmux-bridge message <worker> "Read $plan_path and execute.
Workdir: cd $worktree_path # or $ORCA_ROOT when worktree is off
When done: /review, build, test, then report back."
Replace <worker> with specific label from $ORCA_WORKERS.
If more tasks than workers: queue remaining, dispatch when a worker reports done.
Say "Dispatched N workers, waiting." and end turn.
Worker reports arrive via tmux-bridge message (push). Idle notifications surface on next tool use via heartbeat hook. Idle = no tool calls in 30s — could mean done, stuck, or waiting. Check worker pane to confirm.
For each completed worker:
ORCA_WORKTREE=1)# Detect base branch
base_branch=$(git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@')
base_branch="${base_branch:-main}"
# Review changes
git -C .orca/worktree/task-1 log --oneline "$base_branch..HEAD"
git -C .orca/worktree/task-1 diff "$base_branch"
# Merge into current branch
git merge --no-commit orca-task-1
# Inspect staged changes. If clean:
git commit -m "merge: task-1 from worker"
# Clean up
orca-worktree remove task-1
ORCA_WORKTREE=0)Workers edit $ORCA_ROOT directly and do not commit.
# Review the shared working tree
git diff
git status --short
# Run /simplify on changed files, then inspect again.
git diff
# If clean:
git add <changed-files>
git commit -m "<type>: <description>"
Conflict handling (worktree mode only):
--no-commit to inspect before finalizing/review on the integrated result before optimizingRun /simplify on all files changed across workers.
Summarize to user: