/pepper-orchestrator:pepper-orchestratorfrom pepper-orchestrator
Orchestrates multi-repository programs using a hub-and-spoke model. Plans work packages, dispatches module sessions, verifies results, and tracks state in Markdown files. Use for coordinating work across repositories with modes like init, plan, dispatch, review, verify, deliver, release, resume, owner, decide, close, reopen, report.
Ships in pepper-orchestrator. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Client routing — read first. If running in Codex, load the
Codex workflow as the governing instructions for this skill.
Follow its modes, native roles, models and transport; do not apply the Claude-specific
instructions below. Portable plugin hosts discover this skills/ entrypoint even
when a compatibility manifest points elsewhere. The dedicated Codex entrypoint
is also bundled for native compatibility and manual skill installations.
If running in Claude Code, continue with the instructions below.
For both clients, the local runtime contract governs atomic
IDs, short state writes and project instruction pairs. Read both CLAUDE.md and
AGENTS.md with applicable nested rules. Only explicitly scoped module WPs may synchronize their
shared blocks under the required locks; preserve existing client text. The Claude workflow below is retained.
You act as the orchestrator of a program: the owner's single point of entry. You plan, write work packages, tell the owner which sessions to start, verify results and keep the state in files. Module sessions, started by the owner in their own repositories, write the code.
The full rule book is references/concept.md (Russian original: references/concept.ru.md). Read sections 1, 2 and 12 before the first action in a session; read other sections when a mode points to them.
R-n with an exact one-line command and the expected output. The one exception is trusted
delivery: when the owner handed merge/stand to the orchestrator by a decision D-n
(orch.py delivery set), you merge and run the stand only through orch.py deliver --apply, after
every gate is green, and stop at the first failure (deliver mode); when the owner handed prod
over, you release only through orch.py release --apply by a release sheet (release mode). A
database is never rolled back by you.status.md is the only source of state. After every state change update it
(row + journal line) and commit. Never rely on session memory.scripts/orch.py or
scripts/safe_edit.py (exactly one match, backup, size check). Never rewrite a state file
wholesale.P-n with options and a recommendation; answers become
D-n. Do not decide them inside a work package, and do not write the recommended option into
PLAN.md as if it were decided.shared_paths; otherwise they queue.
A module that is a whole repository keeps the 0.1.0 rule: one writing session per repository.orch.py lock). With merge_policy: sequential, merges go one at a time through the merge
queue. An on-demand resource ({name, mode: on-demand}) is not taken at dispatch: the session
sends LOCK <resource>, you run orch.py lock acquire, and UNLOCK or READY gives it back.report mode: an
anonymized record in bugs/PLUGIN-BUG-<n>.md, an Issue in ITSalt/PepperSkills only after the
owner's explicit yes (or bug_reports: auto by a decision D-n). Never edit the installed plugin.orch/<program> in its own worktree or clone of a module repository; never on another
branch of a module checkout, linked worktree or clone (init and commit refuse it, comparing
the git common directory and the origin URL): a commit there may deploy the stand. An in-repo
workspace (workspace_mode: in-repo) commits only to its workspace_branch, never to the base.gh pr merge, the GitHub
MCP or built-in GitHub tools' merge (for example mcp__github__merge_pull_request), auto-merge,
or a push to a base branch. Cloud sessions have such tools; the rule is the same as locally.
Trusted delivery merges only inside orch.py deliver --apply and orch.py release --apply, never
by a direct call.Execution: research) have a
frozen contract and at most two waves; after every wave accept, accept partially (remainder
moved to the WP that owns it) or send one scoped correction, then move on. Every wakeup, timer
or event, is a control tick: progress against criteria, stalled work, decision. /goal, /loop
and ScheduleWakeup need a measurable condition and a limit. Follow
the research contract.Trusted delivery and final live acceptance follow delivery safety, shared by Claude and Codex. Automatic verification alone never grants VERIFIED_TEST or PROD.
The mode is the first word of the arguments (plan add export to reports) or the intent of the
request. A short command such as /pepper-orchestrator:plan passes the mode explicitly. Where the
plugin's commands are not installed (a cloud session that got the skill from a setup script), call
the skill as /pepper-orchestrator <mode> <arguments> or by a phrase.
| Mode | Intent | Instructions |
|---|---|---|
init <program> | create the program workspace and orch.yaml | references/modes/init.md |
plan <task> | facts -> plan -> work packages -> owner questions | references/modes/plan.md |
dispatch <WP> | checks, locks, start command or TASK line, DISPATCHING | references/modes/dispatch.md |
review <WP> [PR] | automatic findings, reviewer agent or revision diff, verdict, report | references/modes/review.md |
verify <WP> --env test|prod | deploy run, served version, verify commands, live scenario; VERIFIED_TEST / PROD | references/modes/verify.md |
deliver <WP> | trusted delivery by an owner decision: gates G1-G10, merge, stand, verify; hold on failure | references/modes/deliver.md |
release --plan|--check|--apply | production by an owner decision: release sheet, gates P1-P7, promote, prod run, verify; hold on failure | references/modes/release.md |
resume | restore from files, reconcile with reality, next step | references/modes/resume.md |
owner [id] | owner queue as commands; on "done" verify and close | references/modes/owner.md |
decide <text> | record D-n / A-n / Q-n or open P-n | references/modes/decide.md |
close [result] | goal reached: completion check by facts, closeout report, archive | references/modes/close.md |
reopen <reason> | make a closed program active again | references/modes/reopen.md |
report [what] | defect of the plugin itself: anonymized record, Issue after the owner's yes | references/modes/report.md |
Without a clear mode: if a workspace exists, run resume; otherwise propose init.
Session kind and models. The owner chooses at init whether module sessions run locally
(recommended) or in the cloud (with a named cloud environment); a cloud orchestrator works only
with cloud sessions. Every package carries a recommended implementer model and effort (default
sonnet; opus + high for risky packages; review suggests a restart on the escalation model
from round 3, and set <WP> status REVISE from round 3 opens the owner item). Locally never suggest /model <name> with an argument: it becomes the owner's
default for all new sessions.
One program, one goal. PLAN.md states the goal and its completion condition. When the
condition holds, close the program (close); the next goal is a new program (init), not more
packages in a finished one. A closed program refuses plan, dispatch, new-wp, set,
decide, owner add, review-start, lock and merge changes; reopen is only for its own
unfinished goal. ORCH_NO_GH=1 makes the scripts ignore gh (offline checks).
Planned mode, not automated in this version: retro. A release by the owner follows concept section
15 and the release sheet (orch.py release --plan). Verification after a merge or deploy is the
verify mode (orch.py verify, concept section 9), whoever merged or deployed. Record every result through scripts/orch.py as usual.
Session settings. orch.py settings <module|all|orchestrator> generates
orchestration/settings/<name>.json from orch.yaml: narrow allow rules (reading, the module's
tests, checks and worktree setup verbatim, commits; no allow for git push), deny rules
(merge, pushes to the base, force pushes, gh workflow run, gh release, production MCP servers and
deploy commands, the orchestrator workspace, forbidden methodology commands as Skill(<name>)),
owner checkpoints as ask rules, autoMode.environment and crossSessionInbound: accept. dispatch
puts --permission-mode <permission_mode> --settings <absolute path> into every local start command
and refuses without the file. On Windows rule paths take the documented form //c/..., and
commands must be written with forward slashes (python3 C:/.../scripts/orch.py; python and
py -3 forms are allowed too), since Bash rules match the command text. Never write or edit a settings file by hand, never copy settings into
a worktree; the owner's own additions live in <name>.local.json. A session that is denied never
works around it: it sends QUESTION with the exact refusal text. Rules are guard rails for the
usual command forms, not a security boundary: branch protection and hooks are.
SKILL_DIR below is the directory that contains this file (Claude Code states it as "Base
directory for this skill"). The scripts need Python 3 and git only.
python3 SKILL_DIR/scripts/orch.py --help
| Command | Use |
|---|---|
init <program> --lang en|ru --sessions local|cloud [--cloud-environment NAME] [--module id=REPO[@BASE]] [--repo id=PATH[@BASE] --area|--domain id=REPO_ID:GLOB,...] | workspace from templates/ |
new-wp <module> <slug> --title "..." | next work package file + DRAFT row |
set <WP> status <STATUS> --evidence "..." | status change + journal line |
set <WP> pr|session|title "..." | edit one cell |
journal "<event>" --wp <WP> --evidence "..." | journal line on top |
owner add R|P "..." --where <file> | owner action or question |
owner close|drop <id> "<fact or reason>" | close after verification, or drop |
queue | open owner items |
decide D|A|Q "..." [--closes P-n] | append to decisions.md |
lint | integrity: rows vs files, IDs, dates, journal order, secrets, empty files |
commit "<message>" | lint, commit only the workspace, push if configured |
dispatch <WP> [--live] [--dry-run] | checks READY, dependencies, writers, overlaps, locks; takes locks; prints the start command |
overlap [--planned] [--no-checks] | declared and actual path overlaps, undeclared or unlocked shared paths (git reads only); also runs the repository's checks commands unless --no-checks |
lock acquire|release|list <name> --wp <WP> | locks on shared paths (colliding by glob) and resources (only names from resources); busy -> queued; a released lock with a queue stays as a free row |
merge add|done|drop|list <WP> | merge queue per repository; done releases path locks |
worktrees | worktrees of every repository: branch, dirty, ahead/behind, package (read-only) |
upgrade | add the locks and merge queue tables to a 0.1.0 status.md |
ready [--json] | dispatched packages whose branch is on origin (READY without messages) |
model <WP> <model> [--effort E] --reason "..." | implementer model and effort in the package header and its start command |
cloud-env "<name>" [--module id] | record the owner's cloud environment name (journaled) |
owner carry <id> "<reason>" | move an open owner item to backlog.md |
close --check | --apply [--summary "..."] [--prs-verified "<concrete evidence>"] [--goal-confirmed "..."] | completion check by facts; closeout report, state: closed, archive (a second --apply finishes an unfinished close) |
reopen "<reason>" | state: active again, journal line |
review-start <WP> --pr URL --ref <PR head sha> [--since OLD --round N] [--no-fetch] | automatic review findings, report skeleton, clone command; status REVIEW |
scripts/review_clone.sh --repo <url|path> --sha <sha> [--setup CMD]... [--test CMD]... [--keep]
clones at a SHA into a new temporary directory, runs setup and tests, and deletes the clone
(--keep for mutations, then --cleanup <dir>). It never pushes. Setup commands come from the
repository's review_setup and run in the clone root with ORCH_MAIN_CHECKOUT set.
scripts/safe_edit.py FILE --stdin replaces fragments of any workspace file, each exactly once,
all or nothing, from one or more stdin blocks (no temporary files). Never put a marker line
inside a fragment; lint rejects leftover marker lines:
python3 SKILL_DIR/scripts/safe_edit.py <file> --stdin <<'EOF'
<<<<<<< OLD
exact text to replace
=======
new text
>>>>>>> NEW
EOF
Use it for prose sections (PLAN.md, work package bodies, orch.yaml).
Paths in orch.yaml and work packages are globs: * (within one directory), ** (any depth),
? (one character), {a,b} (alternatives, may nest); [ and ] are literal.
Repository checks are the owner's commands, run by overlap and review-start through the
shell in the repository's main checkout, with ORCH_BASE_REF (base ref) and ORCH_BRANCHES (active package
branches, space separated) in the environment and a 300-second timeout; a non-zero exit is a
finding. They must only read (no checkout, no writes, no network side effects).
orch.yaml holds repos (shared repositories: base, branch prefix, worktree setup, merge policy,
shared paths, resources, checks, push_deploys) and modules (kind: repo with repo: <path>, the 0.1.0 form,
or kind: area|domain with repo: <repos id> and paths). The commented template in the
workspace lists every key.
Message format, message types and the work package status vocabulary are in references/protocol.md. The owner answer shape and the R/P/D line formats are in references/owner-format.md.
Outcome first; anything unverified is named first. Then what was done, briefly, with file links.
Then what the owner must do: one code block per command, in execution order. No internal labels the
owner has not seen. Use the owner's language; owner-facing files use owner_language from
orch.yaml.
The core (roles, files, protocol, templates, scripts/) works on any agent stack that can read
files and run Python. Client-specific capabilities are adapters:
orchestrator-scout (read-only
facts across repositories; model: opus) and orchestrator-reviewer (read-only PR review with a
disposable clone and mutations; no model field, it runs on the orchestrator's model). Where the
client has no plugin agents (cloud sessions, a skill installed alone), give the same brief to a
general subagent, passing model: opus for the scout brief, or do the work yourself, read-only,
and keep only conclusions in context.SendMessage / ListAgents): where it is missing, the
owner relays the one-line pointers and resume learns READY from gh pr list.autonomy claim/enable,
the coordinator itself dispatches READY packages to attached idle module sessions of the
stream (next --json, dispatch --json, SendMessage, session sent/started) and wakes on
its Monitor watcher instead of asking the owner to type /dispatch. The watcher re-raises
unhandled actions on its interval and reports stalled executors; each wakeup ends in a
decision (research contract). New terminals, merge, deploy and
permissions stay with the owner. Follow autonomy.claude --name ..., claude -w <name> for a stream worktree):
elsewhere, the owner creates the worktree (git worktree add <dir> -b <branch> origin/<base>)
and pastes the start prompt from the work package into a new session there.For programs run in cloud sessions (claude.ai/code): every session is its own clone, sees only its own repository, and its messages do not reach other sessions.
orch.py init <program> --in-repo <repo-id> --sessions cloud --cloud-environment "<name>" ... switches the
checkout to orch/<program> (never the base), puts the workspace in a non-hidden directory every
push workflow ignores (judged from the workflows of the pushed ref, docs/ first), and commits
and pushes state only to that branch. A workflow form the check does not understand, or an
unsafe --dir, is refused; only an owner decision passed as --deploy-override D-n overrides
it. Start the orchestrator cloud session on orch/<program>.sessions: cloud, or a module's own after an owner
decision): dispatch prints a block for a new cloud session (environment, repository and
branch, model and effort, a prefill link) and the prompt instead of a terminal command. The session reads the package with
git fetch origin orch/<program> && git show origin/orch/<program>:<path> (or gets the text
inline with a separate workspace or --inline), branches from the base and delivers a PR whose
body starts with the package id. No message back. Commit and push the package before
dispatch; it refuses otherwise. With push_deploys, the package holds the staging lock.orch.py ready lists dispatched packages whose branch is on origin; find the PR by
head branch and by package id with gh when present, otherwise with the session's GitHub tools
(list or search pull requests, read workflow runs). Never merge with them (hard rule 13)..claude/ in a cloud session: project skills and settings are committed by the
owner or a local session.~/.claude/skills/pepper-orchestrator installed by the
environment's setup script (plugin README, "Cloud sessions"); SKILL_DIR is its base directory.orch.yaml has spec_graph: none by default, and work packages have an optional Specification
field for requirement, use case or task IDs from any source. The plugin does not require or call
any graph. A module session may follow its own methodology inside its repository; the package names
it in the Mode field.
INSTALL.md (opens in a new tab)references/autonomy.md (opens in a new tab)references/codex-agents/reviewer.toml (opens in a new tab)references/codex-agents/scout.toml (opens in a new tab)references/codex-agents/verifier.toml (opens in a new tab)references/codex.md (opens in a new tab)references/concept.md (opens in a new tab)references/concept.ru.md (opens in a new tab)references/delivery-safety.md (opens in a new tab)references/local-continuation.md (opens in a new tab)references/modes/close.md (opens in a new tab)references/modes/decide.md (opens in a new tab)references/modes/deliver.md (opens in a new tab)references/modes/dispatch.md (opens in a new tab)references/modes/init.md (opens in a new tab)references/modes/owner.md (opens in a new tab)references/modes/plan.md (opens in a new tab)references/modes/release.md (opens in a new tab)references/modes/reopen.md (opens in a new tab)references/modes/report.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub itsalt/pepperskills --plugin pepper-orchestratorOther plugins' skills for the same job