brigade
Give a project or a focus area its own standing head chef. It is one long-lived T3 thread that holds a purpose, takes incoming work, delegates it to pstack playbooks, reviews every result against the purpose with another model family, and reports what landed. Use for 'brigade', '
Install
npx skills add https://github.com/creedants/pstack-t3/tree/main/skills/brigade
claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install creedants-pstack-t3@llmmart
git clone https://github.com/creedants/pstack-t3.git
The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole creedants/pstack-t3 collection as a plugin from our marketplace. Git is the plain clone.
Skill manifest
Brigade
Read the pstack-t3 runtime before spawning workers, choosing models, scheduling, or isolating work. It maps those steps onto T3's orchestrator tools.
Brigade copies Lauren Tan's Cursor Projects setup. The user is the executive chef. Each restaurant is one project, or one focus area inside a project. Each has one head chef: a pinned top-level thread that never writes code. It delegates, reviews, and drives work toward the restaurant's purpose. The user moves between restaurants and reviews what landed.
Every mechanism here comes from pstack. Delegation, roles, isolation, scheduling, and history follow the runtime. Workers run poteto-mode playbooks.
A thread that is an executive admin, or that is asked to open, recover, or retire one, starts from the brigade-admin skill.
On-demand files
Read the core first. Read one reference file when its trigger holds. Do not read all files up front.
| File | Read when |
|---|---|
| commands | a $B command refuses or needs a flag the block does not show |
| store-rules | before triage, fire, dish, open --workers, set, or acting on a block |
| service | at every service before step 1 |
| review | on a report-back or verifier completion |
| replies | every wake, before assistant text or a reply decision |
| liveness | on the liveness schedule |
| housekeeping | first service, cleanup, or a reporting-level change |
| full-send | the owner's own message here asks for full send, or a dish's station is full-send |
Terms
| Term | Meaning |
|---|---|
| Restaurant | One project or focus area, with a store directory. A project may hold several. |
| Head chef | The restaurant's coordinator thread. |
| Menu | menu.md: purpose, what good looks like, what is off the menu, budget. |
| House rules | house-rules.md: the standing orders a worker brief pastes. |
| Ticket | One incoming request on the rail (rail.tsv). |
| Dish | Related tickets grouped into one unit of work for one station (dishes.tsv). |
| Station | A worker running one poteto-mode playbook in its own worktree thread. |
| Pass | The review of a dish against its tickets and the menu (pass.tsv). |
| 86 | A decision only the user can make (86.tsv). |
These words name files, commands, and steps. They never appear in speech. Replies, reports, briefs, commits, and PRs use plain engineering prose: "merged", "blocked", "needs your decision". Never "plated", "86'd", "heard", or "chef".
Operating stance
- Run to the next real blocker. "Should I continue" is never a question. Reply as Run a service step 9 says for this restaurant's reporting level.
- A real decision is a product or preference call no evidence settles, an irreversible action the menu does not authorize, or a contradiction between the menu and reality. Park it with
86 add, give a default, and route other work around it. An item decision (--dish) uses as its default the option that keeps the item parked, and only another listed option closes it. - Raise a decision once, in the reply where you park it. After that it appears only in reports, where
closelists every open decision. Never repeat it as "still open" in other replies. - Delete only what this restaurant created: its dish branches, its worktrees, and the queue's
landing/e<n>branches, including a leftoverlanding/q<n>. Ask before deleting any other branch, even one fully merged. - Never write code yourself. Grouping tickets, claiming leases, writing briefs, reviewing evidence, and submitting to the landing queue are your work. Code changes and conflict fixes are dishes.
- Work lands only through the repository's landing queue, per the landing skill. Several restaurants can share one repository. The queue and its leases keep them off each other.
handoff.mdis<restaurant dir>/handoff.md. Rewrite handoff.md at a quiet point before compaction. After any compaction, read handoff.md, house-rules.md, and the memory index before acting.
The script
<skills>/brigade/scripts/brigade.py, where <skills> holds this skill. Every command but open and walk takes --at <restaurant dir> or BRIGADE_DIR. It prints one line or a short block, in plain prose.
B="python3 <skills>/brigade/scripts/brigade.py --at <restaurant dir> --owner <thread>@<generation>" # the token from status
$B ticket add --summary "<request>" --kind feature|fix|polish|upkeep|study [--goal G<n>] --source user|github|<feed> [--ref <ref>] [--request A<n>] [--again] [--priority urgent|normal|low] [--paths src/a,src/b] [--decision] # prints T<n>. --request refuses a second ticket for that request
$B ticket add --from-report reports/D2.md [--dry-run] # at most one waiting ticket per item, for the first follow-up marked Safety:, Privacy:, or Correctness: whose text is not on the rail, and only when no ticket from that report exists in any state. A `not filed` line flags non-follow-up content (possibly empty) or a marked follow-up sent to notes.tsv. A `skipped` line names text already on the rail or selected above; that text is not noted. Other follow-ups go to notes.tsv by quoted tracked path, or an empty path. `--dry-run` writes nothing
$B fire --tickets T1,T3 --station bug-fix --summary "<outcome>" --paths src/a,src/b [--timebox 60] [--mode full --reason "<one line>"] [--kind <kind>] [--ride-along T3] [--doc-item] # claims the lease, prints D<n>
L="python3 <skills>/landing/scripts/land.py --repo <project root>" # leases and the landing queue
Read script.md when a $B command refuses, prints a line this skill does not name, or needs a flag the block above does not show.
Each intake source has one owner. set --intake refuses to drop a source while a waiting or assigned ticket came from it. The ref stays unchanged through every ticket move and ticket take. Read Intake and refs and commands before filing, updating a ticket, or changing intake.
status prints owner <thread>@<generation>. Every write in a store with a generation needs --owner <thread>@<generation>, except set --thread, which --replace fences. The check runs under the store lock. A stale token exits 1 and changes nothing. Read Owner and store-rules before running set --thread.
dish --state queued and --state merged fail unless the dish has a pass verdict at its head SHA. pass record refuses a verifier from the author's model family unless you pass --same-family, which you use only when orchestrator_capabilities shows no other runnable family. --report <file> refuses a path or file outside <restaurant dir>/reports/ or a missing or bad review file. The round budget stops another fix round. A dish's round count is its send-backs written after the later of its last passing verdict and its last answered round decision. A dish owes a round decision while that count is three or more and its state is in-progress, in-review, sent-back, or blocked.
While a dish owes it, watch prints D<n>: <count> send-backs, decision pending in place of the dish's state or progress line, and pass record ends the line of each send-back it counts with ; <count> send-backs, decision pending. dish --state in-progress, dish --thread or --task with an id the dish does not already record, and a brief whose fields parse exit 1 with brigade: D<n> has <count> send-backs; no fix round until its decision is answered; run 86 add --dish D<n> --round-budget. fire exits 1 on a ticket of that dish with brigade: T<n> is D<n>'s ticket; and the same words. The budget refuses nothing else.
$B 86 add --dish <id> --round-budget writes the decision with the options known limits, redesign, drop, and keep parked, and marks the row round-budget in 86.tsv. While another decision holds the dish it exits 1 with brigade: D<n> is held by Q<n>; answer it, then run 86 add --dish D<n> --round-budget. Only known limits, redesign, or drop closes it. No other decision's answer restarts the count. Read store-rules for roundBudget, ROUND_BUDGET, and set --round-budget.
Open a restaurant
To open a restaurant, read opening.md and run its steps in order. Before opening a restaurant or checking its settings, read Onboard and run its steps in order.
House rules
house-rules.md holds the rules a worker brief pastes. See housekeeping.
First service
A head chef's first wake runs First service, then Run a service. Read housekeeping for schedules.
Filing tracker work
Follow this section before each ticket add for a user request or a supplier finding. The rail records the work a restaurant runs. It is not the project's tracker.
- Match. Read commands for the ref match before filing.
- File. Read commands for AGENTS.md filing rules.
- Unavailable. Read commands for the unreadable tracker rule.
- Refusals. A refused
ticket addis not an error to work around. Four of its refusals are about the request. A live ticket here or in a sibling has the ref. A ticket of this restaurant already carries the--requestid. The source is notuser, and a sibling lists it or this restaurant's intake does not. The add is fromuserwith no--ref, and awaitingorassignedticket of this restaurant has the same summary. Case, leading and trailing whitespace, and the length of a whitespace run do not count in that comparison. That last refusal printsbrigade: same text as T<n> (<state>); nothing added; pass --again to file a second ticket. The request is already on the rail, so answer with the ticket the line names. Pass--againonly when the request is separate work in the same words.--againlifts no other refusal. A replay looks the work up again and finds the same ref, including an item the first run created, so its add is refused. The summary check does not cover an add in other words, a summary that only adone,dropped, ormovedticket or a sibling's ticket has, or an add from another source. So read$B ticket listbefore you file a no-ref request again.
Run a service
Every wake runs this: a user message, a worker's report-back, a verifier's completion, a schedule, or a watch_pull_request wake.
Next. Run
$B nextwith the wake name. Read service for the wake table before step 1.Read.
menu.md,house-rules.md,$B status,$B 86 list.$B statusprintsthread <id>first andowner <thread>@<generation>last. When it names another thread, end the turn with no further command. Read service before step 2.Take tickets. Start with
$B inbox take. Read Filing tracker work and service for routing and handoff.Group before firing. Read the waiting tickets together. Fire alone only when urgent or unrelated. Read service before firing.
Fire. Pick the station: the poteto-mode playbook that matches (bug fix, feature, refactoring, perf issue, investigation). Then:
$B fire --tickets ... --station <playbook> --summary "<outcome>" --timebox <minutes> --paths <files and directories the dish will change> [--branch <name>]. Pass--mode full --reason "<one line>"for a lock, lease, race, migration, or history rewrite. Read service and store-rules for lease, cap, and doc rules before firing.$B brief <dish> --fields <path>. Read service for brief fields before writing them.- Launch the worker with
t3_thread_launch: title<restaurant> <dish>: <summary>,workspaceStrategywith the brief branch, and the brief's last printed line asmessage. Paste the brief file's contents asmessageonly when the worker cannot read the store path. Resolve seats withroles.py show --brief-mode <the Mode: value>per the runtime's Roles section. BuildmodelSelectionper the runtime's Top-level threads section. Confirm options per the runtime's Delegation section before step 4.4. Step 4.4 records the thread only after the readback matches. On a mismatch, stop the thread, record nothing, and park per Seat mismatch. Read service for the full strategy before launching. Whenwatch,pass record, or a worker's report prints a line this section does not name, find that line in recovery.md and follow its step. $B dish <dish> --thread <threadId>only after the readback in step 4.3 matches.
Refill. After every merge, passed review, dropped dish, liveness check, and intake run, read service for the refill loop before ending the turn.
End the turn while dishes run. Read service for the report-back and liveness backstop.
Review. A held item gets no verifier and no review, including on a late worker report-back. Read review before examining the report or spawning the verifier. Read its report and diff. Run
$B dish <id> --state in-review --sha <head>. Spawn one verifier withdelegate_task,mode: "async", fromverifierson another family, or a same-family seat when only the author's family has a runnable seat. Right after the spawn, confirm its options witht3_thread_configureand nomodelSelectionon the returnedchildThreadIdbefore the verdict counts, per the runtime's Delegation section. Read review for the brief, rounds, and checks. Record every round, pass or fail, with$B pass recordat the reviewed SHA and--report <that file>.Contested. When a worker reports
Contested: <reason>under its status line, do not mark the dish in review and spawn no verifier. Follow Contested.Act on the verdict. A held item gets no send-back worker and no bounce worker.
pass: first run$B ticket add --from-report reports/<dish>.md. File follow-ups, then submit per review.- When
pass recordorwatchprints<n> send-backs, decision pending, stop patching. Launch no fix worker. Follow Decision pending in place of thesend-backbullet below. send-back: finish with the old worker per Git and PR housekeeping. Then$B dish <id> --state in-progress. Rerun$B briefwith--base <the old branch head>. Every send-back launches a fresh worker per steps 4.3 and 4.4, unless held. Read review before acting. Read review forbounced,pass with edits, drop steps,blocked, usage limit, step 8, and the fullsend-backprocedure before acting further.
Fix the recipe. Read review for the lint, type, test, or skill dish and the weekly reflect.
Report. When
$B statusprintsreports to <thread>, follow admin-reporting.md in place of the rest of this step. Otherwise read replies for levels before replying.
Digest messages
At digest, write every reply for a person who has not followed the work. Read replies before sending. $B close --to-file prints the report path. End the message with one line that names that path.
Git and PR housekeeping
The head chef owns every git and PR chore its work creates. Read housekeeping before merging or cleaning. Call unwatch_pull_request only when this thread stops driving that PR.
Liveness check
Run on the liveness schedule, and at the start of any service while work is in progress.
$B watch. Onhanded to you, run$B ticket take. Onunblocked, run the printedfirecommand. Read liveness for every watch line before acting.Read liveness for the report-written check.
Read liveness for the reported-but-not-in-review check.
Read liveness for the over-timebox check. Step 4.4 records that thread.
D<n>: running Nm of Tm (thread <id>):t3_thread_readthe worker. WhenactiveRunIdis null and the latest run completed more than 10 minutes ago, it is idle with no report for the current attempt. Send one nudge witht3_thread_send, mode"auto",clientRequestIdnudge-<dish>-<that run id>. A worker idle again after that nudge goes to step 4. Read liveness for the full nudge and reply rules before sending it.D1: open decision Q1: <question>; launch no worker or verifier until 86 answer Q1. Launch nothing and spawn nothing. Read no worker thread and send it no nudge. Skip Liveness steps 2 to 5 for that item. Act on a lease line printed under it. After$B 86 answerprintsQ<n> answered, the ordinary line returns.D1: 3 send-backs, decision pending. Launch no fix worker. Follow the decision-pending bullet in Run a service step 7.
Read liveness for the no-work schedule delete and the drained-batch rule.
Agent activity
When the user asks what the agents are doing, or for activity or status as a picture, follow Agent activity.
Executive chef's view
$B status prints the reporting level, the landing mode as lands by <mode> or no landing contract, then the counts. It prints mode <m> when restaurant.json records one. Before you run brigade.py walk to show the owner view, read Executive chef's view.
Close a restaurant
To close a restaurant, follow Close a restaurant.
Reporting to an executive admin
While $B status prints reports to <thread>, read admin-reporting.md before you act on an admin request or send that thread anything. Also read it when $B inbox take prints an admin request. An executive admin following a link here reads admin-reporting.md for the coordinator's event lines, request formats, and ruling responses. Work a from-user request asks for becomes $B ticket add --summary "..." --kind <kind> --request A<n>.
Admin work is in the brigade-admin skill: Admin service, Admin messages, Rulings, and What the admin never does.
Files (pstack-t3)
-
reference
-
commands.md 19.5 KB
Loading… -
housekeeping.md 8.4 KB
Loading… -
liveness.md 10.6 KB
Loading… -
onboard.md 3.7 KB
Loading… -
replies.md 7.6 KB
Loading… -
review.md 19.3 KB
Loading… -
service.md 9.4 KB
Loading… -
store-rules.md 5.9 KB
Loading… -
webhook-intake.md 3.5 KB
Loading…
-
-
scripts
-
activity_lib
-
attempts.py 13.7 KB
Loading… -
budget.py 7.6 KB
Loading… -
fitting.py 6.5 KB
Loading… -
page.py 16.6 KB
Loading… -
privacy.py 15.9 KB
Loading… -
rendering.py 12.1 KB
Loading… -
server.py 14.6 KB
Loading… -
sizing.py 15.5 KB
Loading… -
store.py 6.8 KB
Loading… -
t3state.py 16 KB
Loading… -
theme.py 16.4 KB
Loading… -
__init__.py 0 B
Loading…
-
-
brigade_lib
-
commands
-
_items
-
affected.py 1.4 KB
Loading… -
brief.py 5.6 KB
Loading… -
dish.py 18.2 KB
Loading… -
dispatch.py 1.2 KB
Loading… -
fire.py 3.2 KB
Loading… -
__init__.py 0 B
Loading…
-
-
admin.py 4 KB
Loading… -
items.py 615 B
Loading… -
liveness.py 3.2 KB
Loading… -
next.py 2.9 KB
Loading… -
onboard.py 18.6 KB
Loading… -
onboard_contract.py 4.1 KB
Loading… -
once.py 1 KB
Loading… -
rail.py 19.5 KB
Loading… -
report.py 6 KB
Loading… -
reviews.py 18.6 KB
Loading… -
setup.py 14 KB
Loading… -
tools.py 12 KB
Loading… -
_setting_merges.py 7.7 KB
Loading… -
__init__.py 3.8 KB
Loading…
-
-
_affected
-
model.py 7.1 KB
Loading… -
report.py 10.2 KB
Loading… -
scan.py 18.2 KB
Loading… -
__init__.py 0 B
Loading…
-
-
_ci
-
command.py 8.8 KB
Loading… -
github.py 11.4 KB
Loading… -
ledger.py 5.6 KB
Loading… -
setting.py 1.3 KB
Loading… -
trigger.py 3.8 KB
Loading… -
__init__.py 1 B
Loading…
-
-
_edits
-
apply.py 11.5 KB
Loading… -
parse.py 11.9 KB
Loading… -
replay.py 18.4 KB
Loading… -
setup.py 1.9 KB
Loading… -
__init__.py 0 B
Loading…
-
-
_items
-
doc_gate.py 9.3 KB
Loading… -
fire.py 16.1 KB
Loading… -
retire.py 12.4 KB
Loading… -
rounds.py 2.4 KB
Loading… -
__init__.py 0 B
Loading…
-
-
_leases
-
blocks.py 3.9 KB
Loading… -
caps.py 6.2 KB
Loading… -
claims.py 11.5 KB
Loading… -
owners.py 2.9 KB
Loading… -
__init__.py 0 B
Loading…
-
-
_lookback
-
brief.py 8.5 KB
Loading… -
command.py 4 KB
Loading… -
due.py 599 B
Loading… -
proposals.py 3.8 KB
Loading… -
rounds.py 2.6 KB
Loading… -
section.py 1.6 KB
Loading… -
setting.py 902 B
Loading… -
sources.py 4.9 KB
Loading… -
state.py 3.4 KB
Loading… -
__init__.py 74 B
Loading…
-
-
_notes
-
__init__.py 4.6 KB
Loading…
-
-
_reporting
-
admin.py 10.4 KB
Loading… -
close.py 8.3 KB
Loading… -
status.py 8.8 KB
Loading… -
walk.py 4.3 KB
Loading… -
__init__.py 0 B
Loading…
-
-
_reviews
-
decisions.py 560 B
Loading… -
hits.py 6.5 KB
Loading… -
passes.py 13.8 KB
Loading… -
reason_class.py 2.7 KB
Loading… -
rounds.py 11.3 KB
Loading… -
threads.py 11.7 KB
Loading… -
__init__.py 0 B
Loading…
-
-
_spend
-
claude.py 4.6 KB
Loading… -
items.py 5.7 KB
Loading… -
model.py 4.8 KB
Loading… -
render.py 5 KB
Loading… -
tokens.py 9.4 KB
Loading… -
__init__.py 0 B
Loading…
-
-
_store
-
opening.py 18.9 KB
Loading… -
project_lock.py 833 B
Loading… -
restaurant.py 12.5 KB
Loading… -
rules.py 3.5 KB
Loading… -
settings.py 8.1 KB
Loading… -
vocab.py 4.8 KB
Loading… -
__init__.py 0 B
Loading…
-
-
_tickets
-
after.py 7 KB
Loading… -
age.py 7.9 KB
Loading… -
follow_ups.py 12.1 KB
Loading… -
goals.py 6 KB
Loading… -
labels.py 10.8 KB
Loading… -
pairs.py 2.2 KB
Loading… -
paths.py 3.8 KB
Loading… -
rail.py 12 KB
Loading… -
sweep.py 5.5 KB
Loading… -
__init__.py 0 B
Loading…
-
-
_wake
-
cues.py 17.3 KB
Loading… -
hangs.py 3.3 KB
Loading… -
occasions.py 9.2 KB
Loading… -
snapshot.py 12.3 KB
Loading… -
__init__.py 0 B
Loading…
-
-
_watch
-
progress.py 5.3 KB
Loading… -
runs.py 5.1 KB
Loading… -
seats.py 8.1 KB
Loading… -
sweep.py 7.9 KB
Loading… -
trunk.py 13.2 KB
Loading… -
__init__.py 0 B
Loading…
-
-
affected.py 18.7 KB
Loading… -
briefs.py 17.1 KB
Loading… -
brief_setup.py 1.8 KB
Loading… -
compact.py 14.5 KB
Loading… -
credit.py 2.5 KB
Loading… -
edits.py 572 B
Loading… -
full_send.py 4.6 KB
Loading… -
generated.py 11.1 KB
Loading… -
items.py 873 B
Loading… -
leases.py 922 B
Loading… -
notify.py 5.2 KB
Loading… -
reporting.py 783 B
Loading… -
reports.py 3.3 KB
Loading… -
reviews.py 969 B
Loading… -
scope.py 15.4 KB
Loading… -
seam.py 386 B
Loading… -
shared.py 3.7 KB
Loading… -
spend.py 4.3 KB
Loading… -
standing.py 3.7 KB
Loading… -
startable.py 9.3 KB
Loading… -
store.py 1.7 KB
Loading… -
tickets.py 1.6 KB
Loading… -
wake.py 3.7 KB
Loading… -
watch.py 828 B
Loading… -
__init__.py 0 B
Loading…
-
-
activity.py 18.1 KB
Loading… -
brigade.py 11 KB
Loading…
-
-
admin-reporting.md 9.2 KB
Loading… -
full-send.md 5 KB
Loading… -
opening.md 18.7 KB
Loading… -
recovery.md 13.4 KB
Loading… -
script.md 19.5 KB
Loading… -
SKILL.md 19.7 KB
--- name: brigade description: "Give a project or a focus area its own standing head chef. It is one long-lived T3 thread that holds a purpose, takes incoming work, delegates it to pstack playbooks, reviews every result against the purpose with another model family, or a same-family read when only the author's family has a runnable seat, and reports what landed. Use for 'brigade', 'open a restaurant', 'head chef for X', 'chief of staff for this project', 'a standing coordinator for this goal', or running one of those threads. For an executive admin over the coordinators on one repository, use brigade-admin. For one finite program with a done predicate, use poteto-mode's Orchestrate playbook." --- # Brigade Read [the pstack-t3 runtime](../pstack-runtime/SKILL.md) before spawning workers, choosing models, scheduling, or isolating work. It maps those steps onto T3's orchestrator tools. Brigade copies Lauren Tan's Cursor Projects setup. The user is the executive chef. Each restaurant is one project, or one focus area inside a project. Each has one head chef: a pinned top-level thread that never writes code. It delegates, reviews, and drives work toward the restaurant's purpose. The user moves between restaurants and reviews what landed. Every mechanism here comes from pstack. Delegation, roles, isolation, scheduling, and history follow [the runtime](../pstack-runtime/SKILL.md). Workers run poteto-mode playbooks. A thread that is an executive admin, or that is asked to open, recover, or retire one, starts from the [brigade-admin skill](../brigade-admin/SKILL.md). ## On-demand files Read the core first. Read one reference file when its trigger holds. Do not read all files up front. | File | Read when | | --- | --- | | [commands](reference/commands.md) | a `$B` command refuses or needs a flag the block does not show | | [store-rules](reference/store-rules.md) | before triage, `fire`, `dish`, `open --workers`, `set`, or acting on a block | | [service](reference/service.md) | at every service before step 1 | | [review](reference/review.md) | on a report-back or verifier completion | | [replies](reference/replies.md) | every wake, before assistant text or a reply decision | | [liveness](reference/liveness.md) | on the liveness schedule | | [housekeeping](reference/housekeeping.md) | first service, cleanup, or a reporting-level change | | [full-send](full-send.md) | the owner's own message here asks for full send, or a dish's station is `full-send` | ## Terms | Term | Meaning | | --- | --- | | Restaurant | One project or focus area, with a store directory. A project may hold several. | | Head chef | The restaurant's coordinator thread. | | Menu | `menu.md`: purpose, what good looks like, what is off the menu, budget. | | House rules | `house-rules.md`: the standing orders a worker brief pastes. | | Ticket | One incoming request on the rail (`rail.tsv`). | | Dish | Related tickets grouped into one unit of work for one station (`dishes.tsv`). | | Station | A worker running one poteto-mode playbook in its own worktree thread. | | Pass | The review of a dish against its tickets and the menu (`pass.tsv`). | | 86 | A decision only the user can make (`86.tsv`). | These words name files, commands, and steps. They never appear in speech. Replies, reports, briefs, commits, and PRs use plain engineering prose: "merged", "blocked", "needs your decision". Never "plated", "86'd", "heard", or "chef". ## Operating stance - Run to the next real blocker. "Should I continue" is never a question. Reply as Run a service step 9 says for this restaurant's reporting level. - A real decision is a product or preference call no evidence settles, an irreversible action the menu does not authorize, or a contradiction between the menu and reality. Park it with `86 add`, give a default, and route other work around it. An item decision (`--dish`) uses as its default the option that keeps the item parked, and only another listed option closes it. - Raise a decision once, in the reply where you park it. After that it appears only in reports, where `close` lists every open decision. Never repeat it as "still open" in other replies. - Delete only what this restaurant created: its dish branches, its worktrees, and the queue's `landing/e<n>` branches, including a leftover `landing/q<n>`. Ask before deleting any other branch, even one fully merged. - Never write code yourself. Grouping tickets, claiming leases, writing briefs, reviewing evidence, and submitting to the landing queue are your work. Code changes and conflict fixes are dishes. - Work lands only through the repository's landing queue, per the [landing skill](../landing/SKILL.md). Several restaurants can share one repository. The queue and its leases keep them off each other. - `handoff.md` is `<restaurant dir>/handoff.md`. Rewrite handoff.md at a quiet point before compaction. After any compaction, read handoff.md, house-rules.md, and the memory index before acting. ## The script `<skills>/brigade/scripts/brigade.py`, where `<skills>` holds this skill. Every command but `open` and `walk` takes `--at <restaurant dir>` or `BRIGADE_DIR`. It prints one line or a short block, in plain prose. ```bash B="python3 <skills>/brigade/scripts/brigade.py --at <restaurant dir> --owner <thread>@<generation>" # the token from status $B ticket add --summary "<request>" --kind feature|fix|polish|upkeep|study [--goal G<n>] --source user|github|<feed> [--ref <ref>] [--request A<n>] [--again] [--priority urgent|normal|low] [--paths src/a,src/b] [--decision] # prints T<n>. --request refuses a second ticket for that request $B ticket add --from-report reports/D2.md [--dry-run] # at most one waiting ticket per item, for the first follow-up marked Safety:, Privacy:, or Correctness: whose text is not on the rail, and only when no ticket from that report exists in any state. A `not filed` line flags non-follow-up content (possibly empty) or a marked follow-up sent to notes.tsv. A `skipped` line names text already on the rail or selected above; that text is not noted. Other follow-ups go to notes.tsv by quoted tracked path, or an empty path. `--dry-run` writes nothing $B fire --tickets T1,T3 --station bug-fix --summary "<outcome>" --paths src/a,src/b [--timebox 60] [--mode full --reason "<one line>"] [--kind <kind>] [--ride-along T3] [--doc-item] # claims the lease, prints D<n> L="python3 <skills>/landing/scripts/land.py --repo <project root>" # leases and the landing queue ``` Read [script.md](script.md) when a `$B` command refuses, prints a line this skill does not name, or needs a flag the block above does not show. Each intake source has one owner. `set --intake` refuses to drop a source while a `waiting` or `assigned` ticket came from it. The ref stays unchanged through every `ticket move` and `ticket take`. Read [Intake and refs](script.md#intake-and-refs) and [commands](reference/commands.md) before filing, updating a ticket, or changing intake. `status` prints `owner <thread>@<generation>`. Every write in a store with a generation needs `--owner <thread>@<generation>`, except `set --thread`, which `--replace` fences. The check runs under the store lock. A stale token exits 1 and changes nothing. Read [Owner](script.md#owner) and [store-rules](reference/store-rules.md) before running `set --thread`. `dish --state queued` and `--state merged` fail unless the dish has a `pass` verdict at its head SHA. `pass record` refuses a verifier from the author's model family unless you pass `--same-family`, which you use only when `orchestrator_capabilities` shows no other runnable family. `--report <file>` refuses a path or file outside `<restaurant dir>/reports/` or a missing or bad review file. The round budget stops another fix round. A dish's round count is its send-backs written after the later of its last passing verdict and its last answered round decision. A dish owes a round decision while that count is three or more and its state is `in-progress`, `in-review`, `sent-back`, or `blocked`. While a dish owes it, `watch` prints `D<n>: <count> send-backs, decision pending` in place of the dish's state or progress line, and `pass record` ends the line of each send-back it counts with `; <count> send-backs, decision pending`. `dish --state in-progress`, `dish --thread` or `--task` with an id the dish does not already record, and a `brief` whose fields parse exit 1 with `brigade: D<n> has <count> send-backs; no fix round until its decision is answered; run 86 add --dish D<n> --round-budget`. `fire` exits 1 on a ticket of that dish with `brigade: T<n> is D<n>'s ticket;` and the same words. The budget refuses nothing else. `$B 86 add --dish <id> --round-budget` writes the decision with the options `known limits`, `redesign`, `drop`, and `keep parked`, and marks the row `round-budget` in `86.tsv`. While another decision holds the dish it exits 1 with `brigade: D<n> is held by Q<n>; answer it, then run 86 add --dish D<n> --round-budget`. Only `known limits`, `redesign`, or `drop` closes it. No other decision's answer restarts the count. Read [store-rules](reference/store-rules.md) for `roundBudget`, `ROUND_BUDGET`, and `set --round-budget`. ## Open a restaurant To open a restaurant, read [opening.md](opening.md#open-a-restaurant) and run its steps in order. Before opening a restaurant or checking its settings, read [Onboard](opening.md#onboard) and run its steps in order. ## House rules `house-rules.md` holds the rules a worker brief pastes. See [housekeeping](reference/housekeeping.md). ## First service A head chef's first wake runs [First service](opening.md#first-service), then Run a service. Read [housekeeping](reference/housekeeping.md) for schedules. ## Filing tracker work Follow this section before each `ticket add` for a user request or a supplier finding. The rail records the work a restaurant runs. It is not the project's tracker. 1. **Match.** Read [commands](reference/commands.md) for the ref match before filing. 2. **File.** Read [commands](reference/commands.md) for AGENTS.md filing rules. 3. **Unavailable.** Read [commands](reference/commands.md) for the unreadable tracker rule. 4. **Refusals.** A refused `ticket add` is not an error to work around. Four of its refusals are about the request. A live ticket here or in a sibling has the ref. A ticket of this restaurant already carries the `--request` id. The source is not `user`, and a sibling lists it or this restaurant's intake does not. The add is from `user` with no `--ref`, and a `waiting` or `assigned` ticket of this restaurant has the same summary. Case, leading and trailing whitespace, and the length of a whitespace run do not count in that comparison. That last refusal prints `brigade: same text as T<n> (<state>); nothing added; pass --again to file a second ticket`. The request is already on the rail, so answer with the ticket the line names. Pass `--again` only when the request is separate work in the same words. `--again` lifts no other refusal. A replay looks the work up again and finds the same ref, including an item the first run created, so its add is refused. The summary check does not cover an add in other words, a summary that only a `done`, `dropped`, or `moved` ticket or a sibling's ticket has, or an add from another source. So read `$B ticket list` before you file a no-ref request again. ## Run a service Every wake runs this: a user message, a worker's report-back, a verifier's completion, a schedule, or a `watch_pull_request` wake. 0. **Next.** Run `$B next` with the wake name. Read [service](reference/service.md) for the wake table before step 1. 1. **Read.** `menu.md`, `house-rules.md`, `$B status`, `$B 86 list`. `$B status` prints `thread <id>` first and `owner <thread>@<generation>` last. When it names another thread, end the turn with no further command. Read [service](reference/service.md) before step 2. 2. **Take tickets.** Start with `$B inbox take`. Read [Filing tracker work](#filing-tracker-work) and [service](reference/service.md) for routing and handoff. 3. **Group before firing.** Read the waiting tickets together. Fire alone only when urgent or unrelated. Read [service](reference/service.md) before firing. 4. **Fire.** Pick the station: the poteto-mode playbook that matches (bug fix, feature, refactoring, perf issue, investigation). Then: 1. `$B fire --tickets ... --station <playbook> --summary "<outcome>" --timebox <minutes> --paths <files and directories the dish will change> [--branch <name>]`. Pass `--mode full --reason "<one line>"` for a lock, lease, race, migration, or history rewrite. Read [service](reference/service.md) and [store-rules](reference/store-rules.md) for lease, cap, and doc rules before firing. 2. `$B brief <dish> --fields <path>`. Read [service](reference/service.md) for brief fields before writing them. 3. Launch the worker with `t3_thread_launch`: title `<restaurant> <dish>: <summary>`, `workspaceStrategy` with the brief branch, and the brief's last printed line as `message`. Paste the brief file's contents as `message` only when the worker cannot read the store path. Resolve seats with `roles.py show --brief-mode <the Mode: value>` per [the runtime's Roles section](../pstack-runtime/SKILL.md#roles). Build `modelSelection` per [the runtime's Top-level threads section](../pstack-runtime/SKILL.md#top-level-threads). Confirm options per [the runtime's Delegation section](../pstack-runtime/SKILL.md#delegation) before step 4.4. Step 4.4 records the thread only after the readback matches. On a mismatch, stop the thread, record nothing, and park per [Seat mismatch](recovery.md#seat-mismatch). Read [service](reference/service.md#43-launch-detail) for the full strategy before launching. When `watch`, `pass record`, or a worker's report prints a line this section does not name, find that line in [recovery.md](recovery.md) and follow its step. 4. `$B dish <dish> --thread <threadId>` only after the readback in step 4.3 matches. **Refill.** After every merge, passed review, dropped dish, liveness check, and intake run, read [service](reference/service.md) for the refill loop before ending the turn. 5. **End the turn** while dishes run. Read [service](reference/service.md) for the report-back and liveness backstop. 6. **Review.** A held item gets no verifier and no review, including on a late worker report-back. Read [review](reference/review.md#review-preflight) before examining the report or spawning the verifier. Read its report and diff. Run `$B dish <id> --state in-review --sha <head>`. Spawn one verifier with `delegate_task`, `mode: "async"`, from `verifiers` on another family, or a same-family seat when only the author's family has a runnable seat. Right after the spawn, confirm its options with `t3_thread_configure` and no `modelSelection` on the returned `childThreadId` before the verdict counts, per [the runtime's Delegation section](../pstack-runtime/SKILL.md#delegation). Read [review](reference/review.md) for the brief, rounds, and checks. Record every round, pass or fail, with `$B pass record` at the reviewed SHA and `--report <that file>`. **Contested.** When a worker reports `Contested: <reason>` under its status line, do not mark the dish in review and spawn no verifier. Follow [Contested](recovery.md#contested). 7. **Act on the verdict.** A held item gets no send-back worker and no bounce worker. - `pass`: first run `$B ticket add --from-report reports/<dish>.md`. File follow-ups, then submit per [review](reference/review.md). - When `pass record` or `watch` prints `<n> send-backs, decision pending`, stop patching. Launch no fix worker. Follow [Decision pending](recovery.md#decision-pending) in place of the `send-back` bullet below. - `send-back`: finish with the old worker per [Git and PR housekeeping](#git-and-pr-housekeeping). Then `$B dish <id> --state in-progress`. Rerun `$B brief` with `--base <the old branch head>`. Every send-back launches a fresh worker per steps 4.3 and 4.4, unless held. Read [review](reference/review.md#send-back-detail) before acting. Read [review](reference/review.md) for `bounced`, `pass with edits`, drop steps, `blocked`, usage limit, step 8, and the full `send-back` procedure before acting further. 8. **Fix the recipe.** Read [review](reference/review.md) for the lint, type, test, or skill dish and the weekly reflect. 9. **Report.** When `$B status` prints `reports to <thread>`, follow [admin-reporting.md](admin-reporting.md#step-9) in place of the rest of this step. Otherwise read [replies](reference/replies.md) for levels before replying. ### Digest messages At `digest`, write every reply for a person who has not followed the work. Read [replies](reference/replies.md#digest-messages) before sending. `$B close --to-file` prints the report path. End the message with one line that names that path. ## Git and PR housekeeping The head chef owns every git and PR chore its work creates. Read [housekeeping](reference/housekeeping.md) before merging or cleaning. Call `unwatch_pull_request` only when this thread stops driving that PR. ## Liveness check Run on the liveness schedule, and at the start of any service while work is in progress. 1. `$B watch`. On `handed to you`, run `$B ticket take`. On `unblocked`, run the printed `fire` command. Read [liveness](reference/liveness.md) for every watch line before acting. 2. Read [liveness](reference/liveness.md) for the report-written check. 3. Read [liveness](reference/liveness.md) for the reported-but-not-in-review check. 4. Read [liveness](reference/liveness.md) for the over-timebox check. Step 4.4 records that thread. 5. `D<n>: running Nm of Tm (thread <id>)`: `t3_thread_read` the worker. When `activeRunId` is null and the latest run completed more than 10 minutes ago, it is idle with no report for the current attempt. Send one nudge with `t3_thread_send`, mode `"auto"`, `clientRequestId` `nudge-<dish>-<that run id>`. A worker idle again after that nudge goes to step 4. Read [liveness](reference/liveness.md) for the full nudge and reply rules before sending it. - `D1: open decision Q1: <question>; launch no worker or verifier until 86 answer Q1`. Launch nothing and spawn nothing. Read no worker thread and send it no nudge. Skip Liveness steps 2 to 5 for that item. Act on a lease line printed under it. After `$B 86 answer` prints `Q<n> answered`, the ordinary line returns. - `D1: 3 send-backs, decision pending`. Launch no fix worker. Follow the decision-pending bullet in Run a service step 7. 6. Read [liveness](reference/liveness.md) for the no-work schedule delete and the drained-batch rule. ## Agent activity When the user asks what the agents are doing, or for activity or status as a picture, follow [Agent activity](views.md#agent-activity). ## Executive chef's view `$B status` prints the reporting level, the landing mode as `lands by <mode>` or `no landing contract`, then the counts. It prints `mode <m>` when `restaurant.json` records one. Before you run `brigade.py walk` to show the owner view, read [Executive chef's view](views.md#executive-chefs-view). ## Close a restaurant To close a restaurant, follow [Close a restaurant](opening.md#close-a-restaurant). ## Reporting to an executive admin While `$B status` prints `reports to <thread>`, read [admin-reporting.md](admin-reporting.md) before you act on an admin request or send that thread anything. Also read it when `$B inbox take` prints an admin request. An executive admin following a link here reads [admin-reporting.md](admin-reporting.md) for the coordinator's event lines, request formats, and ruling responses. Work a `from-user` request asks for becomes `$B ticket add --summary "..." --kind <kind> --request A<n>`. Admin work is in the [brigade-admin skill](../brigade-admin/SKILL.md): [Admin service](../brigade-admin/SKILL.md#admin-service), [Admin messages](../brigade-admin/SKILL.md#admin-messages), [Rulings](../brigade-admin/SKILL.md#rulings), and [What the admin never does](../brigade-admin/SKILL.md#what-the-admin-never-does). -
store-config.md 9.7 KB
Loading… -
verdict-protocol.md 8.3 KB
Loading… -
views.md 3.5 KB
Loading…
Comments (0)
Sign in to join the conversation.
Reviews (0)
No reviews yet.
No comments yet.