Destynova2/cli-code-skills / cli-forge-chef
cli-forge-chef
VerifiedGenerate a multi-agent orchestrator for any project using the Brigade de Cuisine pattern: Chef (plans, decides), Sous-Chef (validates, merges), Commis (execute). Clients order via a Menu (PERT), the kitchen delivers Plats (merged features). Creates tmuxinator config, prompts, shared-state memory, quality gates, and permissions. Uses Claude Code Agent Teams (TeamCreate + SendMessage) with visible tmux panes. Use when the user wants to parallelize work across multiple Claude Code agents, orchestrate a multi-agent sprint, or says 'boss', 'multi-agent', 'orchestrate', 'parallelize agents', 'team of claudes', 'sprint multi-agent', 'brigade', 'chef'. Also triggers on 'swarm', 'agent team', 'parallel workers', 'PERT multi-agent'.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 51.4 KB |
| references/anti-patterns-chef.md | markdown | 2.7 KB |
| references/apply-quorum.md | markdown | 9.3 KB |
| references/brigade-setup-worktrees.shexecutable | script | 4.7 KB |
| references/ccheck-prompt-template.md | markdown | 4.2 KB |
| references/chef-prompt-template.md | markdown | 37.6 KB |
| references/conflict-resolution.md | markdown | 10.1 KB |
| references/contre-chef-inter-prompt-template.md | markdown | 8.9 KB |
| references/gotchas-chef.md | markdown | 38.0 KB |
| references/maitre-dhotel.md | markdown | 14.4 KB |
| references/parallel-exploration.md | markdown | 9.1 KB |
| references/permissions-template.md | markdown | 16.7 KB |
| references/pert-computation.md | markdown | 17.5 KB |
| references/quality-gates.md | markdown | 1.9 KB |
| references/raw-tmux-fallback.md | markdown | 3.3 KB |
| references/shared-state-template.md | markdown | 8.4 KB |
| references/simplified-model.md | markdown | 9.8 KB |
| references/sprint-persistence.md | markdown | 7.0 KB |
| references/sprint-report-template.md | markdown | 8.0 KB |
| references/templates.md | markdown | 762 B |
| references/tmuxinator-template.md | markdown | 7.4 KB |
references/brigade-setup-worktrees.sh
View on GitHub#!/usr/bin/env bash
# brigade-setup-worktrees.sh — idempotent worktree + permissions setup
#
# Generated by cli-forge-chef skill. Template — the skill writes this to
# {project}/scripts/brigade-setup-worktrees.sh at Phase 2 and the tmuxinator
# `on_project_start` hook calls it.
#
# Usage:
# brigade-setup-worktrees.sh <project_root> <session_name>
#
# What it does:
# 1. For each role (gate, maitre, apply, vote-scope, vote-secu, vote-qualite,
# commis-<name>) — idempotently create the worktree on its own branch.
# 2. Copy the matching .claude/settings.local.json from
# {project}/.claude/permissions-brigade/<role>/ into the worktree.
# 3. Recover from orphan state (dir exists but git doesn't know).
#
# Why not inline in the tmuxinator YAML (G35):
# The previous pattern `git worktree add ... 2>&1 | head -1` under `set -o pipefail`
# triggered SIGPIPE on git AFTER head -1 closed its stdin. Git received SIGPIPE,
# aborted, and the worktree was not created. Orphan dirs accumulated across reruns.
# Here we redirect to /dev/null and report with a plain echo — no pipe to close early.
#
# Why one branch per commis (G36):
# `git worktree add <path> <branch>` fails if <branch> is already checked out in
# another worktree. Sharing a branch across N commis means N-1 failures (silent
# under `|| true`). Each commis gets a unique branch; the Sous-Chef Merge consolidates
# them onto the integration branch at merge time.
set -eu # NOT pipefail — see G35
ROOT="${1:?Usage: $0 <project_root> <session>}"
SESSION="${2:?Usage: $0 <project_root> <session>}"
cd "${ROOT}"
echo "=== Brigade worktrees setup (${SESSION}) ==="
# add_worktree <path> <branch>
# - If path exists as a registered worktree → skip
# - If path exists as orphan dir → prune + remove
# - If branch exists → attach; else create branch
add_worktree() {
local wt_path="$1"
local branch="$2"
if git worktree list --porcelain 2>/dev/null | grep -q "^worktree ${wt_path}$"; then
echo " = ${wt_path} (already registered)"
return 0
fi
# Orphan: dir exists but not in git's worktree list
if [[ -d "${wt_path}" ]]; then
echo " ! orphan dir ${wt_path} — removing"
rm -rf "${wt_path}"
git worktree prune >/dev/null 2>&1 || true
fi
if git show-ref --verify --quiet "refs/heads/${branch}"; then
git worktree add "${wt_path}" "${branch}" >/dev/null 2>&1 \
&& echo " + ${wt_path} → ${branch}" \
|| echo " ! FAILED ${wt_path} → ${branch}" >&2
else
git worktree add "${wt_path}" -b "${branch}" >/dev/null 2>&1 \
&& echo " + ${wt_path} → ${branch} (new branch)" \
|| echo " ! FAILED ${wt_path} -b ${branch}" >&2
fi
}
# copy_perms <role> <wt_path>
# Copy the per-role settings.local.json into the worktree, non-destructively.
copy_perms() {
local role="$1"
local wt_path="$2"
local src="${ROOT}/.claude/permissions-brigade/${role}/settings.local.json"
local dst="${wt_path}/.claude/settings.local.json"
if [[ ! -f "${src}" ]]; then
echo " ! MISSING permissions file: ${src}" >&2
return 1
fi
mkdir -p "${wt_path}/.claude"
if [[ ! -f "${dst}" ]]; then
cp "${src}" "${dst}"
echo " + perms copied to ${dst}"
else
echo " = perms already at ${dst}"
fi
}
# --- Standalone role worktrees ---
for role in gate maitre apply vote-scope vote-secu vote-qualite; do
add_worktree "${ROOT}-wt-${role}" "wt/${role}"
copy_perms "${role}" "${ROOT}-wt-${role}" || true
done
# --- Apply pane is optional (only if infra present) ---
# Skip silently if the permissions file is absent — the generator omits it for
# projects without infra tooling.
if [[ ! -f "${ROOT}/.claude/permissions-brigade/apply/settings.local.json" ]]; then
echo " ~ apply pane skipped (no infra detected)"
fi
# --- Commis worktrees ---
# The list of commis is injected by the generator via COMMIS_LIST env var
# (space-separated role names: "bootstrap scaleway k8s-day1 docs em").
# Each commis gets its own branch: {base_branch}-{commis_name}
BASE_BRANCH="${BASE_BRANCH:-chore/phase-a-${SESSION}}"
COMMIS_LIST="${COMMIS_LIST:-}"
if [[ -z "${COMMIS_LIST}" ]]; then
echo " ! COMMIS_LIST env var is empty — no commis worktrees to set up" >&2
else
for commis in ${COMMIS_LIST}; do
add_worktree "${ROOT}-wt-commis-${commis}" "${BASE_BRANCH}-${commis}"
copy_perms "commis-${commis}" "${ROOT}-wt-commis-${commis}" || true
done
# Integration branch (Sous-Chef Merge consolidates the per-commis branches onto this one)
if ! git show-ref --verify --quiet "refs/heads/${BASE_BRANCH}"; then
git branch "${BASE_BRANCH}" >/dev/null 2>&1 \
&& echo " + integration branch ${BASE_BRANCH}" \
|| echo " ! FAILED to create integration branch ${BASE_BRANCH}" >&2
fi
fi
echo "=== Done ==="
git worktree list | sed 's/^/ /'
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 467k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |