The plugins
This is the reference for what the CedarLoom plugins do without being asked. They do it through hooks: small scripts Claude Code runs before a command or when a session starts. A hook refuses the command or adds text to the session. The page covers each hook, its settings and its limits. Read it when you want to change a setting or need to know exactly what a guard refuses. To install CedarLoom, start with Get started; for the commands you type, see Skills.
It also covers which model each step uses (the model map), the workflow scripts and Code Mode. Last comes the filter for untrusted issue and pull request text.
| Plugin | Hooks | Settings |
|---|---|---|
cl-workflow | Terminal questions, role guard | mode |
cl-orchestration | dispatch guard | none |
cl-repo | none | none |
cl-skills | Working rules | rules |
Every hook runs node, so Node.js must be on the PATH, in a version the README names. Codex runs the working rules hook, but neither the terminal-questions hooks nor the role guard. Set options with /plugin (Installed tab, Configure options) or under pluginConfigs in $HOME/.claude/settings.json, then start a new session.
Working rules
- cl-skills adds the working rules in rules/global.md to the context of each session and subagent.
- Events:
SessionStarton startup,/clearand compaction (a resumed session keeps its earlier copy), andSubagentStartfor every agent type but the built-inExplore,Planandweb-fetch, which also start withoutCLAUDE.md(hooks reference). - cl-workflow and cl-repo depend on cl-skills (Dependencies): cl-workflow's skills and agents name a working-rules section where they need the rule instead of repeating it, and the cl-repo rules block in
AGENTS.mdholds only what the working rules leave to the project. - The option
rulesset tofalseturns them off in Claude Code. A missing or unreadable file adds nothing and never blocks a start: the hook shows a warning that names the file (systemMessage) and writes it to stderr. cl-workflow then runs without the rules its texts name, the risk classes among them. - An agent that reads the cl-repo block without cl-skills, or with
rulesoff, gets the block without the working rules. - Codex runs the same hook once you trust it in
/hooks, with anadditionalContextLimitof 4,000 tokens so the text arrives whole (Codex hooks); Codex has no plugin options, so leaving the hook untrusted turns the rules off there.
Terminal questions
With cl-workflow on, the agent may use the question tool (AskUserQuestion) and plan mode (EnterPlanMode) until you go away.
-
The option
modesets how a session starts:here(default) oraway; any other value starts away. A job or bot sets it in user settings or a--settingsfile (project settings do not set plugin options). Merge thepluginConfigskey into the existing settings object rather than replacing the file:{"pluginConfigs": { "cl-workflow@cedarloom": { "options": { "mode": "away" } } }} -
/cl-workflow:awaytakes every session of this plugin install on this machine away at once, bots' and workers' included, and each that starts or resumes meanwhile, until/cl-workflow:away off;30or30m(minutes),2horuntil 07:30(local time, the next such time) set an end, where the away ends on its own. A span that ends before the current away, or text it cannot read, changes nothing. Each away line names the folder and process that set it.offtyped in any interactive session, an Orca chat included, ends the away of every session, and the away the mode started that session in; a session the mode started away elsewhere stays away untiloffthere. The command sets the away in any session where it expands, a headless one too (claude -por a stream-json message); only anoffthat can set the answer flag (owner questions) ends it. The hook cannot tell a prompt you type from one a host types for you: a bot's or a worker's session reads as interactive too, so anoffthat reaches its prompt ends every session's away. The dispatch guard refuses handingoffto a session through Orca's CLI: anorcacommand that holds it, or a word the shell fills in (a variable, a command or process substitution, a here-document or here-string, a brace expansion, a glob pattern or wordsxargsadds) that could hold it (worker bounds). It reads command text only, not a file a command passes or text piped into it (--body-file -). A bot that hears you are leaving or back, such as an assistant bot that tracks the bot fleet, replies with the command (/cl-workflow:away 2h, oroff) for you to type there or in any session. -
While away, the
PreToolUsehook refuses both, giving the rule as its reason: open questions with recommendations go where the task brief sends them, else into one issue per task in the project's tracker, else the report; safe, reversible recommendations are taken and the work goes on; no chat-text interviews. It does the same in a session nobody answers in (owner questions), and when it cannot start (onFailure: "block"). -
/cl-workflow:away offcomes back and asks up to 5 owner questions, then says how many remain; when already here, it only asks them. -
A
SessionStarthook starts a new process or a resumed conversation in the mode and adds the state as one line;/clear, compaction and a fork keep it. AUserPromptExpansionhook sets the state when a prompt's command expands (hooks reference), so the same text in a scheduled task, a/loopiteration or another session's message sets nothing. -
The state is one machine-wide file (
ask/all.json) and one file per Claude Code process (ask/<CLAUDE_PID>.json: the answer flag, or the away the mode started it in) in the plugin's data folder,~/.claude/plugins/data/<id>/, one per plugin install and user account (plugins reference). A process file it cannot read, or none where the mode is nothere, means away until off; a machine-wide file it cannot read means away until off, none means no machine-wide away whatever the mode. A session under another OS user, in a container with its own home, with another Claude Code config folder (CLAUDE_CONFIG_DIR) or with a copy loaded by--plugin-dir(its own id,cl-workflow@inline) does not see the machine-wide file.CLAUDE_PIDis set in the Bash tool too, so a model could change the state by writing or deleting a file; the role guard refuses such writes. -
On Windows (untested) the hooks start
nodewithout a shell, sonode.exeitself must be on the PATH: with only a.cmdor.batshim,/cl-workflow:awaycannot keep its state. -
disableAllHooksturns the hooks off.
Owner questions
A repository's project bot files an owner question in the approval layout:
- as an issue labeled
cl:needs-humanin the repository, when it has issues on; - else in the local queue,
.cedarloom/questions/<project>-<n>.mdin the project bot's home, kept out of git: where a.gitignorepattern re-includes the queue folder,approval.mjs filefiles nothing and exits 2.
Use a private repository: on a public one the question is public, and the project bot warns before its first start and in its report.
| Label | Meaning |
|---|---|
cl:plan | CedarLoom may read and plan the issue and ask on it; no work starts |
cl:ready-for-agent | the project bot may start the issue (default startLabel); an answered question gets it, an approval never does (approvals) |
cl:needs-human | a question or approval waits for the owner |
cl:in-progress | a worker holds the issue, so it never starts twice; after a worker ended without a pull request (a host restart) it stays until you remove it: gh issue edit <number> -R <owner/repo> --remove-label cl:in-progress |
cl:deferred | parked by the owner: it does not start and the question queue skips it |
cl:follow-up | found during other work and reported by workers, reviewers and jobs; in a private repository the project bot files it (at the run's close and daily), elsewhere it lists it in the run report; you choose whether it starts |
cl:triage | filed through the issue template; read it before adding another label |
Rejected work is closed as not planned, with no label. /cl-repo:setup lists the labels the repository lacks and creates the ones you approve.
/cl-workflow:away off asks in batches this repository's cl:needs-human issues, then the local queue, where it writes the answer line the project bot reads. That line counts as the owner's, so the role guard refuses edit-tool writes to the queue and commands that reach it, in every subagent and every session except one where /cl-workflow:away off set the answer flag; a /cl-workflow:away drops every session's flag, so after it only an off grants one again, in the session where it is typed; the project bot files through approval.mjs file.
- No hook input tells a typed command from a piped one, so no flag is set outside
default,acceptEdits,plan,autoandbypassPermissionsmode, or whereCLAUDE_CODE_ENTRYPOINTis unset or starts withsdk-(Agent SDKs andclaude -p; a TypeScript SDK orclaude -pchild of an IDE session keeps its value); thereoffchanges nothing and the question tool and plan mode stay refused. - Each
offlogs a line in the plugin's data folder (ask/log/); a flagged run shows the runs since the last flagged one. - A command reaches the queue when its text names
.cedarloom/questionsor a word or redirection target, as the shell decodes it from the session folder and from each folder a priorcd,pushdorSet-Locationnames, lies in it (*,?and[...]match any name;*/*matches none). A session whose folder lies in the queue writes nothing there. - An
rm(with any option),rmdir,unlink,trashormvwhose operand, read the same way, or afindwith-delete, or with-exec,-execdir,-okor-okdirrunning one of those, whose starting point (.by default) is a.cedarloomfolder holdingquestions/, also as a pattern the shell expands to one (.ced*,*/.cedarloom, and in PowerShell*), is refused too; reading it (ls .cedarloom) passes. - Not prevented: a process on your account typing into a session in a mode above or writing the queue, state or log files; a command written to get around the check (
.c*/q*, braces, variables, bracket classes, look-alike letters,~user, a barecd,git -C) or one that acts on.cedarloomitself in another way or on a folder above it (rm -rf .). - In every session the guard also refuses writes to the state files of
/cl-workflow:away, commands that name them, and aclaudelaunch with/cl-workflow:away offor/away offin its command line, sinceclaude -pexpands such a command (headless mode); with cl-orchestration on, its hook refuses the same in anorcacommand, even one that only mentions both.
Role guard
The role guard keeps merges, releases and shared repository state out of every Claude Code session with cl-workflow on and out of every subagent, as far as a hook can: the project bot lands pull requests only through merge.mjs, and the owner takes the rest on GitHub or in a shell outside Claude Code (What each role may do). Its PreToolUse hook for Bash, Monitor and PowerShell (and the edit tools, for the local queue) denies these commands; a Monitor call on a WebSocket runs no command and passes:
- Merges and direct commits:
gh pr mergegh repo sync(also without a repository)- the merge,
merge-upstreamandcontentsendpoints ofgh apiwith a method other than GET - the merge and
createCommitOnBranchmutations ofgh apisent to thegraphqlendpoint in any case, with leading or trailing slashes, a query or a fragment, or as its full URL. A query from a file (-F query=@<file>,--input <file>) is denied, sinceghreads the file after the hook does and it may change in between: write the query inline (-f query='...'). A query the shell fills in (query="$Q",query="$(cat q.graphql)") is denied. Queries pass. A text with the wordmutationanywhere (in a query or another word of the line) is denied unless every query is oneresolveReviewThreadorunresolveReviewThreadwritten plainly:mutation [<name>][($id: ID!)] { resolveReviewThread(input: {threadId: $id}) { thread { isResolved } } }, with$idor a quoted id and a selection ofclientMutationIdorthread { id isResolved }; a comma, comment, alias, directive or second field is denied, since GraphQL ignores commas and comments between tokens. - the review dismissal endpoint of
gh api(pulls/<n>/reviews/<id>/dismissals) - for a bot role, a review post of any event, comment reviews included (
gh pr review, a write topulls/<n>/reviewsofgh api), and an edit of a review:merge.mjstakes thereview.reviewerlogin's review as the approval, so only the project bot'sapprove.mjsposts one. A session without a bot role, whose gh login may be that login, getsaskfor them instead, when no other rule refuses the command: a run nobody answers posts no review. A review post from a child process (node -e) passes unseen.
- Releases:
gh releaseexceptlist,view,downloadandverifygh workflow run- the
dispatchesendpoints ofgh api
- Tag pushes:
git push --tags,--follow-tags,--mirror,tag <name>, or a refspec underrefs/tags/, naming a tag of the repository, or naming a version such asv1.2.0that is no local branch. Git takes a unique prefix of a long option, so--tagcounts as--tags. - Pushes to the default branch,
--alland--branchesincluded:- The default branch is
main,master, the branchrefs/remotes/<remote>/HEADnames, or the current branch's push target for agit pushwithout a refspec. - A push to a remote whose default branch the hook cannot read is denied too: a URL, a path, or a remote without
refs/remotes/<remote>/HEAD(git remote set-head <remote> --autosets it). - A push that names no remote goes where git sends it: the branch's
pushRemote,remote.pushDefault, the branch's remote, the sole remote, elseorigin.
- The default branch is
- Repository settings and security:
gh repo edit,rename,archive,deleteanddeploy-keygh secretandgh variablewritesgh workflow enableanddisablegh apicalls other than GET to settings, rulesets, branch protection, secrets and security alerts
gh auth, gh's own config, aliases and keys.git configexcept its reads:--get,--list, andgit config <name>with a dotted name and only options that pick the file, the type or the output (--global,-f <file>,--show-origin). Alsogit -candgit stash.claude --bare: hooks do not run in bare mode, this one included, even for a plugin loaded with a flag (headless mode).
A session started from a guarded one is guarded while it runs hooks, and so is every subagent.
-
The hook reads the command as the shell splits it, with the backslash as escape character for Bash and Monitor and the backtick for PowerShell: line continuations join, quoted words stay whole, and each quoted word's text is read again as commands. So
bash -c "gh pr merge 1"is denied, and so isecho "gh pr merge 1". -
The value of a text option of
ghorgitis text, not read again:--body,--subject,--title,--message,--spec,--prompt,--question,--noteand--task-title,-band-tofgh,-mofgit; text for any other program that names a refused command goes in a file (an Orca message's--body-file).gh pr comment 12 --body 'merge after gh pr merge 11'passes. Such a value is still read:- when it holds a substitution in double quotes, which the shell runs (
--body "$(gh pr merge 12)"), - when any other command of the line is not
gh,git, a folder change (cd) or a plain reader or filter: an interpreter (python3 -c,node -e,fish,pwsh),find -exec, a script (./x.sh), a runner (sh,eval,xargs,source) or a pipe into one could run what it prints, - when the line expands a value again (
${x@P}, zsh's${(e)x},${!x},$((x)),$[x]), - and in a multi-line command with a
#,<<or PowerShell here-string, which could end its quote on another line.
- when it holds a substitution in double quotes, which the shell runs (
-
The quoted arguments of
grep,egrep,fgrepandrgare search text, not read again, in a one-line command that:- runs no text as commands (no backtick,
$(,eval,xargs,source,.,sh,bash,zsh,dashorksh), - has no redirect,
- and whose every other command runs such a reader or
head,tail,wc,sort,uniqorcut, each with only known-safe long options and no wrapper option or env assignment before it (sort --compress-program,rg --preandRIPGREP_CONFIG_PATHrun a program).
grep -n "gh release create" scripts/release.shandrg -n 'gh pr merge' . | wc -lpass, while a pipe into any other program (| tcsh,| awk,| tee) keeps the text read as commands. - runs no text as commands (no backtick,
-
Git questions (current branch, tags, the remote's default branch) go to the session's folder, the existing folder a leading
cd,pushdorSet-Locationmoves to, orgit -C <dir>:- A push from the repository
GIT_DIR(set anywhere in the command) orgit --git-dirnames is denied: push from its folder withgit -C <dir>. - After any other folder change (a variable, substitution, missing folder or
~target,cd -,popd,Pop-Location, acdafter the start of the command) git's folder is unknown: the push must name its branch (git push origin <branch>; none orHEADis denied), checked in the session's folder and each folder the command names, each needing a readablerefs/remotes/<remote>/HEAD. - A push without a refspec is denied where no current branch can be read (
git -Cto a missing folder, a detached HEAD), as is every push without git on the hook's PATH.
- A push from the repository
-
It stops a model that forgets its role, not one that works around it (a git or gh alias, a script,
node -eor another interpreter's own code, an MCP tool, text typed into another terminal, or a switch to the default branch before a push of the current branch in the same line:git checkout main && git merge feat/x && git push). A bot can also start a session without its role (env -u CEDARLOOM_ROLEorenv -i) in any other project folder, a clone inside its home included: that session takes the rules of a session without a role, which let it pointGH_CONFIG_DIRorGH_TOKENat any gh login it can read and post a review under it. The bound there is the file permissions of each bot's gh folder and the scopes of its token, not the guard. The binding layer is a GitHub token without those rights and rulesets on the default branch (pull requests required) and release tags, which you set up. -
Input the hook cannot read exits 2, which refuses the call, as does a hook that cannot start. The hook is not tested in
bypassPermissionsmode.
Bot roles
A bot role in CEDARLOOM_ROLE guards a session like any other and also refuses what its procedure does not need, for its subagents too. The hook reads the role from env in .claude/settings.json of the session's project folder (CLAUDE_PROJECT_DIR), which bot-settings.mjs writes into each bot home, and that value wins over the session's environment: a session started in a bot home keeps its role where folder trust, a --settings file or a cleared environment drop the variable. Elsewhere the environment names the role, or nothing does. The hook reads the role once per Claude Code process, at its first guarded call, and keeps it in the plugin's data folder (ask/role-<CLAUDE_PID>.json). The record only narrows the role, though Claude Code applies env again when the settings file is saved (environment variables):
- A session that rewrites its settings file to drop the role keeps the role it started with.
- One that rewrites it to name another role runs and writes nothing until a new session starts.
- A record that is missing, unreadable or
nullgives way to the role the settings file or the environment names now, so any program or script that writes or deletes the record moves the session at most to that role.
The guard also refuses the record's removal by the routes of the queue rule above, on its folder or any folder above it, and running the ask hook (ask.mjs) as a program or after node, a shell or env, since that hook writes the window files too. A new process, or a session that starts or resumes in the process, reads the settings file again, so a session started after a rewrite takes the role written. The bound for that is who can write the file; the token scopes and the repository rulesets bound the rest. A settings path that is no regular file of at most 1 MB, or a settings file that names the variable but is no JSON, refuses every call; any other set value (empty, no string, misspelled, builder-bot, worker-bot) runs and writes nothing.
No role runs:
- a
ghcommand orprverb the shell fills in (gh $c merge,gh p{r,} merge), evalwith a$or backtick, a shell's-ctext the shell fills in (bash -c "$c"),env -Stext (also grouped or joined:-vS "$c",-S"$c") or--split-stringtext with a$or backtick, and atmuxorscreencommand with a word the shell fills in (tmux send-keys "$c"), which the hook cannot read as commands,git commit --no-verify, which skips the commit hooks, in any spelling git takes:-n, grouped with other short options (-an,-nm <message>), or a prefix such as--no-veri, anywhere before the--or--end-of-optionsthat ends the options (-m --takes it as the message).
project-bot
The project bot lands pull requests only through merge.mjs, which runs the whole gate in code: the approval of the reviewed head, or the owner's yes on an Orca item for an owner-only, release or critical one, required checks, review threads, the default branch, the pre-merge command and the merge itself. A pull request no state file holds gets one first (Without a state file). Its own gh pr merge is refused, here and in its settings.
Also refused:
- a review post or edit: its approval goes only through
approve.mjs, from a review record of the head, and no other role runsapprove.mjs, - a push whose refspec names any branch but the one checked out where git runs (on both sides),
- a push after
git checkout,git switch,git rebase,git bisect,git symbolic-ref HEAD <ref>or a branch rename or copy in the same command, - a force or delete push (
--force,-f,--force-with-lease,--force-if-includes,--delete,-d,--prune, a refspec starting with+or:), - git in a line that may run text as commands, which can fill in a push the hook does not read, so a commit message goes in a file (
git commit -F):- a backtick,
$(,eval,xargs,source,.or a shell, - the word
gitbehind or in a quoted argument of a program other than git or a reader (caffeinate xargs git,fish -c 'git ...',echo git), - a pipe into a program other than a reader,
head,tail,wc,sort,uniqorcutwith only known-safe long options and no wrapper option or env assignment before it (git log | tee log.txtandgit log | sort --compress-program=share refused too),
- a backtick,
- a git subcommand that is no plain word (
git $p,git pu?h).
It pushes from a local branch named like its remote branch.
It may delete a head branch named <type>/<number>-<slug> (the shape fits release/2026-11 too) with gh api -X DELETE repos/<owner>/<repo>/git/refs/heads/<branch>; the hook does not check that the branch is merged or refuse gh pr close --delete-branch.
approval.mjs apply --card, the procedure's step that puts a goal card's labels on, gets ask: it runs on the owner's OK at that permission prompt, and a run nobody answers cannot approve a card. approval.mjs apply without --card runs unasked. The hook does not refuse the project bot's own label writes (gh issue edit --add-label), which other steps need, so the prompt is a procedure gate, not a boundary.
cleanup-bot
Also refused:
- every
git push, a delete push included, - every
ghcommand outside this table, a branch delete withgh api -X DELETEincluded, - every read of issue or pull request comments, reviews or review threads, whose text by trusted authors reaches the bot through
thread.mjs:gh issue vieworgh pr viewwith--comments(-c), a--jsonfieldcomments,reviewsorlatestReviewsongh issueorgh pr, agh apipath with acomments,reviewsortimelinesegment, and everygh api graphqlcall; the project bot and a session without a bot role keep these reads, - file tool writes outside its home (
CLAUDE_PROJECT_DIR), links resolved.
gh | Runs |
|---|---|
repo | clone, view, list |
pr | view, diff, list, checks, status |
issue | view, list, status |
run | view, list, watch |
search | every subcommand |
api | GET only, no graphql and no comment read (above) |
It deletes a merged branch only through delete-branch.mjs, which checks the policy, the merge and the head and runs gh as a child process the hook does not read.
Where the rules apply
- The
ghrules of the bot roles apply whereghruns as the command: first, or after env assignments, shell keywords (do,then) and wrappers such asenv,sudo,xargs,timeoutandeval; in PowerShell also after an assignment,&or., and first in a script block. Elsewhere, as ingrep gh, a guarded session's rules apply. - Merges go through
merge.mjs, whoseghchild process no hook sees, so no bot needs a merge exception.
What each role may do
| Step | project-bot | no role (workers, your own sessions) | cleanup-bot |
|---|---|---|---|
| Land a pull request | through merge.mjs only | no | no |
| Post or edit a pull request review | the approval through approve.mjs only | no | no |
Resolve review threads, gh api graphql queries | yes | yes | no |
| Push a branch | the branch checked out | any but the default | no |
| Push the default branch or tags, release | no | no | no |
| Repository or organization settings, rename, archive, transfer, delete | no | no | no |
gh auth, gh config, aliases, keys; git config writes, git -c, git stash | no | no | no |
git config reads | yes | yes | yes |
No Claude Code session takes the steps of the rows that say no in every column. The coordinate procedure gives landing a pull request to the project bot, through merge.mjs; the hook refuses a direct merge command in every session. Each step has its place outside a session:
- A merge: the project bot's
merge.mjs, which runs the gate in code and pins the merge to the reviewed head; a merge is undone with a revert. Its catch-up sweep takes a pull request without a state file once its checks pass, when it comes from no fork and its branch is<type>/<number>-<slug>, the type in lower-case letters, of an issue a trusted author opened, in a repository the bot serves, within its daily limits (Without a state file). Without a project bot, and for a pull request the policy leaves to you, merge it on GitHub. - A release: release-please opens the release pull request in CI, the owner merges it on GitHub or lets the project bot land it at the owner's Orca yes, and the release job tags and publishes (Releasing). A published version cannot be taken back.
- A push to the default branch skips the pull request, its review and its required checks: open a pull request. An empty repository gets its first commit from a person, outside Claude Code.
- Repository and organization settings, rulesets, secrets, rename, archive, transfer and delete,
gh auth, gh config and keys: yours, on GitHub or in a shell outside Claude Code. They change who may do what, or remove the repository for everyone.
The hook reads command text only: a script, an interpreter's own code or text typed into another terminal is out of its reach, so the binding layer is the token's scope and the repository's rulesets (required review and checks).
Model map
Every CedarLoom caller takes a session's or subagent's model and effort from one map: the bot runs, the workflow phases and the full workflow script.
node plugins/cl-workflow/skills/workflow/models.mjs [<project path> | --repository <file>] [--depth quick|standard|deep] [--risk routine|elevated|critical] [--json]
- It prints each task's model and effort with the row and file that set it, at standard depth and routine risk unless given.
- It reads three files, later ones overriding earlier ones entry by entry:
- The defaults:
plugins/cl-workflow/skills/workflow/models.json. - The user file:
$XDG_CONFIG_HOME/cedarloom/cedarloom.json(~/.config/cedarloom/cedarloom.jsonwhen that variable is unset or not absolute, XDG base directory spec), which holdsmodelsonly. - The repository file: the project's
cedarloom.jsonin the working tree, or the--repositoryfile (-reads it from stdin), and none without either.
- The defaults:
- The schema of the user file and the repository file is
cedarloom.json's. - The project bot passes
cedarloom.jsonas the policy reader read it from the default branch (git show <commit>:cedarloom.jsonwith thecommitthe reader printed, piped to--repository -), so a local edit, another checked-out branch or a moved ref does not change their lookup. models.rolesnames{ model, effort }pairs;models.tasksgives each task a role name or an inline pair.- A lookup takes, in order:
- the
tasksrow; - the
depthrow (quickordeep), which may lower or raise it when it comes from the same file as thetasksvalue or a later one (defaults, then user, then repository); - the
riskrowcritical, which only raises it.
- the
- The repository file may raise the
riskrow but not lower it: the resolver refuses it, naming the file and the row, when ariskvalue, directly or through a role the repository file redefines, ranks below the value the defaults and the user file give that row (the defaults alone without a user file). - Rank for raising: the model first (
haiku,sonnet,opus,fable), then the effort (low,medium,high,xhigh,max). implementandfixrun only onopus: the schema refuses an inline pair with another model there, and the resolver refuses any file whose rows or roles put them on another model at any depth and risk. It exits 1 and names the row and file for every refused file.--hookprints one line for a session's context, the roles and the command; the plugin's SessionStart hook runs it.- The plugin's agent files take their
modelandeffortfrom the defaults through the generator. The skill lint refuses a literal model value (--model opus,model: opus,"model": "opus", model`opus`, a model name next to an effort level) in the plugins outside the defaults file, the resolver, the schema, the agent files, tests and evals.
The defaults' efforts come from an effort sweep over the eval suites. Each task with a suite ran at medium and high (review also at xhigh); the depth rows ran plan, implement, fix and review together at one effort. Cost is in USD, over the arm's runs; Default is the value the map ships.
| Task | Arm | Cases with headroom | Runs | Pass rate | Cost | Default |
|---|---|---|---|---|---|---|
| implement | medium | 1 | 3 | 0/3 | 0.85 | opus medium (build-fast) |
| implement | high | 1 | 3 | 0/3 | 0.88 | opus medium (build-fast) |
| fix | none | 0 | 0 | - | - | opus high |
| review | medium | 1 | 3 | 0/3 | 0.97 | opus medium |
| review | high | 1 | 3 | 0/3 | 1.05 | opus medium |
| review | xhigh | 1 | 3 | 0/3 | 1.44 | opus medium |
| plan | none | 0 | 0 | - | - | opus high |
| depth quick | none | 0 | 0 | - | - | plan sonnet high (light) |
| depth deep | none | 0 | 0 | - | - | implement and fix opus high (build), review opus high (deep) |
| recheck | medium | 2 | 6 | 3/6 | 1.57 | opus high |
| recheck | high | 2 | 6 | 5/6 | 1.78 | opus high |
| verify | medium | 1 | 3 | 0/3 | 0.70 | opus high |
| verify | high | 1 | 3 | 1/3 | 0.68 | opus high |
| zoom-out | none | 0 | 0 | - | - | opus high (deep) |
| research | none | 0 | 0 | - | - | opus high |
| test | medium | 2 | 6 | 3/6 | 1.28 | sonnet high |
| test | high | 2 | 6 | 6/6 | 1.33 | sonnet high |
| gather | medium | 1 | 3 | 0/3 | 0.46 | sonnet medium |
| gather | high | 1 | 3 | 0/3 | 0.46 | sonnet medium |
| audit | medium | 1 | 3 | 2/3 | 0.49 | opus medium |
| audit | high | 1 | 3 | 1/3 | 0.53 | opus medium |
| digest | medium | 2 | 6 | 1/6 | 0.37 | sonnet medium |
| digest | high | 2 | 6 | 0/6 | 0.35 | sonnet medium |
| merge | medium | 2 | 6 | 0/6 | 0.49 | sonnet medium |
| merge | high | 2 | 6 | 0/6 | 0.51 | sonnet medium |
| coordinate (project bot) | medium | 36 | 108 | 6/108 | 14.45 | opus medium |
| coordinate (project bot) | high | 36 | 108 | 6/108 | 15.91 | opus medium |
Implement, review, merge and gather passed no run at any arm, and coordinate passed 6 of 108 at both medium and high: their medium default rests on no gain from high, not on a measured pass.
Method:
- Run: commit
96a96ff, judgehaiku(the eval default), 3 runs per case and arm. - Model:
claude-opus-5-5(digest and merge with--model sonnet, test and gather on their agents'sonnet), the main session at Opus 5.5's default effort,medium. - Headroom: a case that passed one
mediumrun left the sweep, and the rest ran 3 times per arm. - Baseline:
opus highfor every task except test, digest and merge (sonnet high) and gather (sonnet medium), with no depth rows. - Rule: a higher arm becomes the default when it passes at least 2 more runs than the baseline, a lower arm when it passes at least as many; a task without headroom keeps its baseline.
- Size: 571 sessions (probe, headroom pass, arms, and a run of the other cases at the map's values), 95.98 USD in total.
GitHub texts
Agents write GitHub texts as field values; one script fills the template of the text's kind, lints it and writes the file for --body-file.
node plugins/cl-workflow/skills/workflow/text.mts <kind> # the kind's fields and limits, as JSON
node plugins/cl-workflow/skills/workflow/text.mts <kind> <fields file> <out file> # fill, lint, write
node plugins/cl-workflow/skills/workflow/text.mts check <file> [<template file>] # lint a text from a project's own template
- Kinds:
goalandbug(issues),pr,review(findings or the answers to them),comment(item comments and reports),approval(owner approvals),question(the question tool and an item ask, as JSON with both forms),release. - Each kind opens with its summary: the result, decision or request. Then come what changed and why, the evidence, open points and reference detail.
- The
commentandreviewkinds takeagent:yesfor a comment posted under the owner's login, which then ends with the agent line. checkskips each line that the template file also holds: that text is the project's.- Exit 0 writes the file and prints its path; it never writes through a link. Exit 1 prints one line per problem and writes nothing. Exit 2 is a usage error or a file it cannot read.
- The lint refuses:
- a missing or unknown field, a list outside its item range, a value over its word limit;
- a sentence over 25 words (20 in a step), a value over 6 sentences (a summary over 3);
- AI attribution, an em dash, an emoji or emoticon;
- a
#numberwithoutowner/repobefore it; - a sentence of at least 6 content words said again word for word (case, spacing and closing punctuation aside).
- The lint warns, on a
warning:line that changes no exit code, about two sentences of at least 6 content words that share 80% of them: the same fact twice, or two opposite facts ("grants", "denies"). - Word counts skip code blocks; a code span or a URL counts as one word.
- The question kind also refuses a question over 140 characters and a
wherethat names the thing by an ID alone. It refuses an issue, commit or task ID in the question or an option label.
Workflows
A typed entry such as /cl-workflow:dev is generated from one JSON definition in plugins/cl-workflow/definitions/<name>.json: edit the definition, then run the generator. The generator is the only validator of the format and imports Node.js built-ins and the model map's resolver only.
| Field | Value |
|---|---|
schemaVersion | 2 |
name | kebab-case, not ending in -run: the command /<prefix>:<name> |
description | at most 250 characters, ending in a period |
when, writes | optional strings for the skill's metadata and Skills |
work | software, docs or research: the playbook |
depth | quick, standard or deep as a floor, or classify for the depth rules alone |
script | true writes a workflow script too; it needs work software and depth deep |
stages | [{ id, phases }], required for script: true and refused otherwise; a phase has id, run (session or agent) and an optional brief |
- A session phase has
step(settleorpull-request) and stands first or last in its stage. - An agent phase has
agent(a name such ascl-workflow:review, never a path),task(a task of the model map, whose model and effort the phase runs on), and optionallyloopandwith(a phase of the same stage that has a loop, run beside it once). - A
loophasfix(an earlier agent phase of the same stage),maxRounds(1 or 2; 1 wherefixis thecl-workflow:planagent),escalate(boolean; one more round on a stronger step where the model map leaves one, sofalsewherefixis thecl-workflow:planagent) and an optionalrecheckagent. - A scripted definition starts only the agents
cl-workflow:plan,implement,test,verify,reviewandrecheck; a phase withlooporwithand arecheckareverify,revieworrecheck, averify,revieworrecheckphase has alooporwith,fixis aplanorimplementphase, and atestphase stands before the loop phase of its stage (a failed test restarts the stage before that phase). - The design check (
cl-workflow:zoom-out, taskzoom-out) is a step of the software playbook's plan check for deep or risky work, not a phase:/cl-workflow:fullhas no zoom-out phase, and/cl-skills:zoom-outruns the same check on a plan on request. - The test phase (
cl-workflow:test) runs each test the change adds or changes on the base commit, in a scratch clone, and reports per testfails on base,passes on baseornot run on base(blocked by a build or load error from code only other tests use). A test that passes on base is flagged as not proving the change; it fails the phase only when the change claims to fix a bug that test covers.
node plugins/cl-workflow/generator/generate.mjs <definition>... [--prefix <plugin name>|--prefix ''] [--out <folder>] [--check] [--json]
- Defaults: prefix
cl-workflow, out the plugin folder. - Output:
- It writes
skills/<name>/SKILL.mdandskills/<name>/agents/openai.yamlunder the out folder, forscript: truealsoworkflows/<name>.js, and refuses to replace such a file that it did not generate. - Into the plugin folder it also writes the
modelandeffortof eachagents/<task>.mdfrom the model map's defaults. - For
script: falsethe entry names the playbook.
- It writes
- A script:
- It runs one stage per start, as the workflow
<prefix>:<name>-run, and holds the stage's order, review rounds, trial and stuck reruns in code. - It takes each phase's model and effort from
args.models, the resolver's--jsonoutput for the run's depth and risk class, remediations from thefixtask and separate re-reviews fromrecheck, and reruns a call that fails on another model once onopus. - The entry starts it and runs the session phases itself; where workflows are off or not allowed, it runs the phases as prose by the playbooks.
- It runs one stage per start, as the workflow
--checkwrites nothing and exits 1 when a generated file differs; the plugin tests run it over the shipped definitions.- A refusal names the file, the field and the rule, and exits 1; nothing is written. The field is the path to the value: keys joined by
., array positions from 0 in brackets, such asstages[1].phases[3].loop.maxRounds; an empty field means the whole file.--jsonprints the refusals to standard output as an array of{ "file", "field", "rule" }(empty when none). - A project's own workflow:
- Keep the definition in
.cedarloom/workflows/<name>.jsonand run the installed plugin's generator from the project's root with--prefix '' --out .claude(--prefix ''needs--out). - The generator of a plugin installed from this marketplace is
~/.claude/plugins/cache/cedarloom/cl-workflow/<version>/generator/generate.mjs(underCLAUDE_CODE_PLUGIN_CACHE_DIRinstead of~/.claude/pluginswhen that is set). - The entry is then
/<name>and a script/<name>-run; its header names.cedarloom/workflows/<name>.jsonwherever the generator read the file from. - The entry needs
cl-workflowinstalled and says so when it is not.
- Keep the definition in
Switch off per project
Every switch except one environment variable is a Claude Code setting: in .claude/settings.json it holds for everyone in the project, in .claude/settings.local.json for you alone, and managed settings override both (Settings files). A rule denied at one level cannot be allowed at another (Permissions).
- The plugin:
"cl-workflow@cedarloom": falseunderenabledPluginsremoves allcl-workflowskills and agents in the project (enabledPlugins).cl-orchestrationand the bundlecedarloomdepend on it, so they do not load either and report the dependency as disabled;cl-repokeeps working."cl-skills@cedarloom": falsedoes the same tocl-workflow,cl-repoand everything that depends on them (Dependencies). - A copy loaded with
--plugin-dirhas its own key,cl-workflow@inline, which the@cedarloomkey does not reach. With only"cl-workflow@inline": falsethe installed copy loads instead; set both keys tofalseto remove the plugin (CLI reference). - The
workflowskill:Skill(cl-workflow:workflow)blocks the skill by its plugin name,Skill(skill:workflow)by any of its names (Restrict Claude's skill access). It is the onlycl-workflowskill the model can call on its own./cl-workflow:dev,fullandresearchload it first and stop when that load is refused. - The typed entries
away,dev,full,lite,planandresearchsetdisable-model-invocation: true: the model cannot call them through the Skill tool, but typing the slash command still starts each, and aSkilldeny rule does not stop that. Switch them off withenabledPlugins; theworkflowskill deny stopsdev,fullandresearch, andliteonly for a task its gate sends to that skill, notawayandplan. - One phase agent:
Agent(cl-workflow:<agent>), with the agentsgather,implement,plan,recheck,research,review,test,verifyandzoom-out(Subagents). A denied call comes back to the model as a tool error naming the rule; a headless run does not list it inpermission_denials. - One workflow script:
Workflow(cl-workflow:full-run)blocks the script, also where an allow rule or--allowedTools Workflowallows the Workflow tool (Workflows). Until the workspace is trusted, the project file's allow rules are ignored and its deny rules apply (Project allow rules and workspace trust). - Every workflow script:
"disableWorkflows": trueremoves the Workflow tool and the plugin's scripts in any settings file, the project's included (disableWorkflows); the environment variableCLAUDE_CODE_DISABLE_WORKFLOWS=1does the same for one session (Turn workflows off)./cl-workflow:fullthen runs its phases as prose.
Code Mode (optional)
Code Mode is an experimental, default-off Claude Code feature in which Claude writes JavaScript that makes several tool calls in one step; it may change or be removed in any release.
- It needs Claude Code at the minimum version on the native build, an interactive terminal session and a supported model; its requirements list the models and the settings that block it.
- Turn it on: set
"CLAUDE_CODE_EXPERIMENTAL_CODE_MODE": "1"in theenvblock of$HOME/.claude/settings.json; Claude Code ignores it in a project's settings. A Code Mode session resumes only with it on. - The hooks of these plugins keep working: each tool call the code makes still reaches the
PreToolUsehooks, and a hook that fails or times out refuses that call.
Untrusted input
The project bot passes workers and reviewers only issue and pull request text by trusted authors: the repository owner, the policy's trustedAuthors, and members or collaborators with admin or write on the permission endpoint; a failed lookup passes nothing.
| Text | How it reaches an agent |
|---|---|
| Issue title, body and comments | thread.mjs writes the trusted thread and counts the comments left out; the spec's Thread: block carries it. A body or comment with the line <!-- cedarloom: agent -->, which every bot or worker post and every bot-written issue body but an approved goal card ends with since agents post under the owner's login, is headed Agent text, here and in review threads |
| Unresolved review threads | thread.mjs --pull writes each thread a trusted author opened, with its trusted comments, and counts the rest; the reviewer's brief and the worker's follow-up carry it. Access counts in the project's repository |
| Any other comment or review | not passed: the spec and rules/worker.md tell workers and reviewers to read none themselves |
Run unattended CedarLoom work only in an isolated environment: a dedicated machine or VM you can restore, or a dev container, with scoped tokens (README).