pstack-runtime
Skill17 starsChanged 17 days agoMITView on GitHub
How pstack-t3 skills delegate, pick models, isolate work, schedule, and verify inside T3 Code through the orchestrator V2 tools. Read before running any other pstack skill that spawns workers, picks a model, or schedules work.
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 4 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 71
Check a usage limit only for a failed child that did not return the brief's result.
- Very specific: line 124
Every brief whose child resolves seats or spawns carries the mode.
- Very specific: line 139
Before a light roles.py show or roles.py backup call, read roles.md.
- Distinctive: line 178
Create top-level threads only when the user asked for separate threads or invoked a playbook or skill that names them (Orchestrate, …
- Very specific: line 182
Follow a thread with t3_thread_wait and read it with t3_thread_read (use afterPosition to read only what is new).
- Very specific: line 218
Read watching.md before waiting on a PR with watch_pull_request.
- Distinctive: line 237
If neither the tools nor the ACP bridge exist, you are not running in T3.
- Distinctive: line 241
Before you write a child brief that needs a specific MCP server, read Skill locations.
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
pstack-t3 runtime
pstack-t3 runs inside T3 Code. Every provider T3 drives (Claude, Codex, Grok, Cursor, Pi, OpenCode, Muse, ACP agents) gets the same t3-code MCP server. This file maps each pstack concept onto those tools, so a skill works the same whatever model runs it.
Tool names may carry a harness prefix, such as mcp__t3-code__delegate_task or mcp__t3_code__delegate_task. The semantics are the same. If a T3 tool this skill names is not in your tool list, find it with the host's tool search when the host has one, and call it by the name the search returns. When the host has no tool search, call the tool directly. Start with orchestrator_capabilities, and do not conclude the tools are missing until a search or a direct call has failed. ACP agents that cannot see the tools use the terminal bridge in ACP fallback.
On-demand files
| File | Read when |
| roles.md | before resolving seats, weighing seat agreement, writing or validating a roles file, or when roles.py prints a note the section does not explain |
| waiting.md | before collecting child results or waiting on children |
| host.md | when a thread settles or snoozes, before you install or locate skills, before interpreting hasPendingChildRuns, hasPendingQuestion, or a mode: "wait" return, when a child's question wakes this thread, or for history notes |
| threads.md | before t3_thread_configure, t3_queue, t3_thread_transfer, run_scheduled_task_now, or pausing a finite program's schedule |
| webhooks.md | before creating a webhook schedule, asking for a signing secret, or choosing between a webhook and a polling schedule |
| secrets.md | before you ask the user for a secret, or before a shell command needs a token, deploy key, or password |
| light.md | before every spawn in light mode |
| gate-review.md | before reusing a gate verdict |
| failures.md | on usage limit or after restart |
| verification.md | before UI or device or CLI verification |
| delegation.md | before spawning a child task or writing its brief |
| modes.md | for the checks every mode keeps |
| isolation.md | before isolating a writing child or running a heavy command |
| watching.md | before linking a PR or waiting on its checks |
Vocabulary
| pstack says | In T3 |
| subagent, worker, delegate, reviewer, runner, judge | A child task created with delegate_task, owned by this thread. |
| cloud worker | A child task. T3 children run on this machine, so they can reach local files, browsers, and auth. |
background, run_in_background | delegate_task with mode: "async". |
| wait for a worker | A thread with a schedule of its own ends the turn, and its completions wake it. Any other thread keeps a bounded wait with t3_thread_wait. Call task_status for a result mid-turn. See waiting.md. |
| cancel a worker | task_cancel. |
| model slug, role model | A target {providerInstanceId, model, options} from orchestrator_capabilities, resolved through roles. See Roles. |
inherit-parent, auto | "inherit". Omit target so the child inherits this thread's provider, model, and options. |
| separate chat, coordinator chat, PR owner thread | A top-level thread from t3_thread_launch, only where Top-level threads allows it. |
| worktree for a worker | A worktree from delegate_task with isolation: "worktree", or a t3_thread_launch worktree binding for top-level threads. See Isolation. |
/loop, hourly tick, automation, scheduled wakeup | schedule_task. See Scheduling. |
scripts/watch-pr, a poll loop, waiting on CI | watch_pull_request on the thread that owns the PR. See Pull request watching. |
| transcript, chat history, cloud-agent URL | A T3 thread, read with t3_thread_search and t3_thread_read. |
| control-ui, browser MCP | T3 preview tools: preview_open, preview_snapshot, preview_act, preview_evaluate, preview_recording_start. preview_act takes one action: click, type, press, hover, drag, select, upload, or scroll. preview_dialog accepts or dismisses a browser dialog. |
ask the user (AskQuestion) | The host's question tool if it has one, otherwise a short question in the reply. |
| todolist | The host's todo tool if it has one, otherwise a checklist in the work log. |
| PR you opened or now drive | Register it with link_pull_request. |
| status page, dashboard, report table, chart | A page published with html_preview, then html_render, inside a reply already due. See Visual reports. |
Deadlines
A deadline or timebox sets the order of work. It never waives a step. This holds for Autopilot's early red-test-and-PR target, a brigade or Orchestrate timebox, and any "aim for N minutes" in a brief. Start the deliverable the deadline names first, then run every step the playbook prescribes before the next gate, such as CODE-READY or the final report. That includes How, Architect, investigation, and the code delegate. The clock is never a skip: reason. When the remaining steps cannot fit, stop at a verifiable point and report the steps that remain instead of skipping them. A step that the brief's Waived by mode: line names is not a skip, because the mode removed it before the attempt started.
Delegation
- A child starts with only its brief. It sees none of this conversation. Put the goal, the exact paths or SHAs, how to verify, and the report shape in the brief. Point at files instead of pasting large context. Write tool steps as plain verbs ("read", "search the repo", "run"), because the child may be a different provider with different tool names. When the role entry
roles.py showprinted for the child's seat hashaikuBrief, paste its paragraphs unchanged, in order, at the end of the brief, per Claude Haiku 5.5. A code-writing child inside a poteto-mode playbook opens with the poteto-agent persona body. Below it, paste unchanged the linespython3 <pstack-runtime>/scripts/roles.py mode --cwd "$PWD" --playbook <name> --attempt <kind> [--brief-mode <value> | --session-mode light]prints, per Modes. They start with thePlaybook: playbooks/<name>.mdline, such asPlaybook: playbooks/feature.md, and carry the requiredMode:line. Write noPlaybook:line of your own, because a second one fails the check. See Resolve and carry the mode for theAttempt:andWaived by mode:lines. Copy the printedMode:value into--brief-modeon theroles.py showcall that seats the delegate, and pass no other mode flag. Write that brief to a file and runpython3 <pstack-runtime>/scripts/roles.py check-brief <file>beforedelegate_task. Exit 1 names what is missing. Fix the brief, run the check again, and pass the checked text unchanged. A seat that matches this thread's model, or an edit that looks small, is not askip:reason for the code delegate.
Steps 1 to 3, 5, and 6 live in delegation.md.
Permissions
The permission modes live in delegation.md.
Failure handling
- A target is rejected: call
orchestrator_capabilities, then fall back per Roles, and say which seat changed and why. - A child fails or returns nothing usable: proceed with N-1 and record the dropout. Respawn once with a fresh child for a required slice. Never resume a failed child to fix its own work. When the failure carries a provider error, follow the next bullet before that respawn. A failure that reads
Killed: out of memory.is an out-of-memory kill that T3 reports. Lower the load before you respawn that child. Run fewer children at once, or run builds through the slot in Local command capacity. Report a second kill as a blocker. - Check a usage limit only for a failed child that did not return the brief's result. When a failed child's error names a usage limit, follow failures.md before you respawn it.
hasPendingChildRunsontask_statusdoes not mean the child is still running. It reports later turns on the child's thread, even after the task ended, and it does not reopen the task, including a turn you start witht3_thread_send. Decide completion byworkStatealone.- A stalled child (see Delegation step 5): first call
t3_pending_requestwithaction: "list"and the child'schildThreadIdasthreadId. A child with a question that blocks it waits on an answer and is not stalled. Answer it per Pending requests, and count its 10 minutes again from the answer. Otherwise read its last items. When its last assistant message holds the result the brief asked for, use that message as the result and calltask_cancelon the task. When its last item is an approval request that is still waiting, calltask_canceland respawn once with noruntimeMode. Otherwise calltask_canceland respawn once for a required slice.
Fresh children by default
The fresh-child rule lives in delegation.md.
Roles
Roles let one skill run on whatever providers the user has. A role value is a list of seats. Each seat is "inherit" or a target.
Where roles live
Role files and commands live in roles.md.
Role names
The role table lives in roles.md.
Built-in defaults
The unset-role policy lives in roles.md.
Excluded seats
The exclude rules live in roles.md.
Budget
The budget cap lives in roles.md.
Fallback
The fallback order lives in roles.md.
Claude Haiku 5.5
The Haiku brief rule lives in roles.md.
Modes
pstack-t3 runs each piece of work in full or light mode. Full mode runs every step as each skill says. Light mode keeps every check that decides whether code lands and cuts the fan-out around it. A skill or playbook that spawns links here. Its light behavior is the row in light.md that names it, and its full behavior is its own text.
Resolve and carry the mode
roles.py mode and roles.py show resolve one effective mode. The highest level present wins. The order is the brief, then the session, then the coordinator, then the project file .pstack/t3-roles.json, then the user file roles.json, then light.
- A brief's
Mode:line is the frozen decision. A child copies that line's bare value into--brief-modeon everyroles.py modeandroles.py showcall it makes, and passes no other mode flag. It never resolves the mode again. - The user's words set the session.
$poteto-mode light, "light mode", or "use light mode" in a request sets this thread to light. "full mode" sets it back. A light session passes--session-mode lighton everyroles.pycall that has no brief value, except the explicit reflect below. - With neither, pass no mode flag. The roles files decide. When neither file sets a mode, the default is
light. - A user's explicit reflect passes
--session-mode fullon everyroles.py showcall it makes, whatever the session or the roles files say. A call with no mode flag would fall through to a roles file that stores light. The session stays light after it.
Every brief whose child resolves seats or spawns carries the mode. Get the lines from roles.py mode, never from memory.
python3 <pstack-runtime>/scripts/roles.py mode --cwd "$PWD" [--playbook <name> --attempt <kind>] [--brief-mode <value> | --session-mode light]- A code delegate's brief passes
--playbook <name> --attempt <kind>.<kind>isfirstfor new work,fixafter a send-back, andbounceafter a queue bounce. Paste the printed lines unchanged under the persona body. They start with thePlaybook:line, so write noPlaybook:line of your own. The printed lines includeAttempt:. UnderMode: lightthey also include anyWaived by mode:line. UnderMode: fullthere is noWaived by mode:line, and the brief must not add one. See Delegation step 4. An owner, sub-coordinator, unit worker, visual-parity owner, or landing writer is not a code delegate. Run the command without
--playbookand--attempt, and paste itsMode:andMode source:lines into the brief or themessage. Right after them, paste the seat rule below unchanged. A launched thread has no parent to ask, and aMode source: sessionline reads like a session of its own without it.Seat rule. Copy the Mode value above into --brief-mode on every roles.py mode and roles.py show call you make, and pass no other mode flag. Never pass --session-mode. Mode source names where your launcher's decision came from. It does not make this thread a session.- A read-only leaf, such as a
howexplainer or a reviewer, gets noMode:line. It resolves no seat. - A light session with no brief runs the same command with
--playbook <name> --attempt firstfor its own playbook. ItsWaived by mode:line names the steps this thread skips.
Before a light roles.py show or roles.py backup call, read roles.md.
An explicit budget wins. Pass the live catalog and --parent on every light show call, per Roles, so a configured inherit seat of a capped role gets the cap.
Escalation only moves work toward full. roles.py mode prints Mode: full and Mode source: escalated: <reason> when a lease covers a pattern in the project's "escalate" list, at the second send-back, or when --escalated carries a recorded reason. A light thread that finds its design contested does not run interrogate. A thread whose brief has a Mode: line stops at a verifiable point and reports Contested: <reason> under its status. A thread whose mode came from the session or the roles files switches that work to full, announces the escalation, and runs the step full mode prescribes, such as interrogate. Nothing moves work from full to light mid-flight.
Light behavior
Light behavior lives in light.md.
Never cut
- Tests and the build. The worker runs the project's test command and build before every gate review, and the landing queue reruns them.
- The landing queue's checks.
- One review at every head SHA before merge, per Gate review, cross-family unless its same-family fallback applies.
- A review reads the whole diff against its base on round one. A later round reads the fix diff since the last reviewed SHA, per Rounds after the first.
- Owner fences. Leases,
--ownergenerations, worktrees, and the pass-at-head gate. - A fresh worker for every send-back, per Fresh children by default.
- The code delegate, with the persona, the
roles.py modelines, androles.py check-brief. - One executing fresh-child test per changed spawn or coordination behavior.
Gate review
The gate procedure lives in light.md.
Announcement
When light mode applies, say so once, at the start, in two or three short sentences. Name the source from the Mode source: line, what this work cuts, and what still runs, as in "Light mode is on, from this session. This change gets one design sketch and no separate comment review. Tests, the build, and review run, with a fallback if only the author's family can run." On an escalation, name the rule, as in "This change runs in full mode because its lease covers land.py." A worker's report repeats its brief's Mode: and Waived by mode: lines under its status. A step that line names is not a deviation. Name the mode again only when it changes.
Isolation
The isolation rules live in isolation.md.
Local command capacity
The slot rules live in isolation.md.
Top-level threads
Create top-level threads only when the user asked for separate threads or invoked a playbook or skill that names them (Orchestrate, Autopilot-full, Autopilot-stack, brigade). Invoking those is that request. Everything else uses child tasks.
The launch shape and the other fields live in threads.md.
- Follow a thread with
t3_thread_waitand read it witht3_thread_read(useafterPositionto read only what is new). Send follow-ups witht3_thread_send, interrupt witht3_thread_interrupt. - A thread launched with
t3_thread_launchhas no parent. Its finished turn does not wake the launcher. A launcher that needs a report names the message the launched thread sends witht3_thread_send. create_threadsmakes up to 20 threads sharing this checkout. Use it only for read-only fan-out the user wants visible as threads.
Forks
Forks live in threads.md.
Scheduling
schedule_task creates recurring work in T3's scheduler. It runs even when no turn is active, so it replaces /loop, Cursor automations, and hourly ticks.
The other schedule fields live in threads.md.
Local state
The state paths live in host.md.
Verification surfaces
A project verify-* skill beats all of these when one exists.
Visual reports
The page rules live in verification.md.
History
The history tools live in host.md.
Pull requests
The link rule lives in watching.md.
Pull request watching
Read watching.md before waiting on a PR with watch_pull_request. Call unwatch_pull_request when this thread stops driving the PR.
Pending requests
The pending-request tools live in host.md.
ACP fallback
Some ACP agents accept the injected MCP server but do not expose its tools. When the T3 tools are absent and T3_ACP_MCP_NODE is set, call the same tools through the terminal:
ELECTRON_RUN_AS_NODE=1 "$T3_ACP_MCP_NODE" ${T3_ACP_MCP_ENTRYPOINT:+"$T3_ACP_MCP_ENTRYPOINT"} acp-mcp-call orchestrator_capabilities '{}'
ELECTRON_RUN_AS_NODE=1 "$T3_ACP_MCP_NODE" ${T3_ACP_MCP_ENTRYPOINT:+"$T3_ACP_MCP_ENTRYPOINT"} acp-mcp-call delegate_task '{"task":"...","mode":"async","clientRequestId":"..."}'This is the supported transport, not a shell substitute for delegation.
Outside T3
If neither the tools nor the ACP bridge exist, you are not running in T3. Use the host's native subagents on inherited models, run panels sequentially if needed, and state that model diversity and scheduling were unavailable.
Skill locations
Before you write a child brief that needs a specific MCP server, read Skill locations.
Personas
agents/poteto-agent.mdis the persona for code-writing delegates inside a poteto-mode playbook. Paste its body at the top of the child's brief, paste theroles.py modelines, and runroles.py check-briefper Delegation step 4.agents/comment-sicko.mdis the persona for the no-comments review. Paste its body at the top of that reviewer's brief.- Paste the body only, without the frontmatter.
In this repository63 other files it gives its agents.
- AGENTS.mdAGENTS.md
- architectSkill
- arenaSkill
- automate-meSkill
- benchmark-checklistSkill
- blast-radiusSkill
- brigade-adminSkill
- brigadeSkill
- broSkill
- correctSkill
- create-formal-verification-skillSkill
- create-verification-skillSkill
- figure-it-outSkill
- howSkill
- interrogateSkill
- in-your-own-wordsSkill
- ketchupSkill
- ketchup-videoSkill
- landingSkill
- maintain-formal-verification-skillSkill
- maintain-verification-skillSkill
- make-bot-uiSkill
- no-commentsSkill
- poteto-helpSkill
- poteto-modeSkill
- principle-attack-the-premiseSkill
- principle-boundary-disciplineSkill
- principle-build-the-leverSkill
- principle-encode-lessons-in-structureSkill
- principle-exhaust-the-design-spaceSkill
- principle-experience-firstSkill
- principle-explain-the-numberSkill
- principle-fix-root-causesSkill
- principle-foundational-thinkingSkill
- principle-guard-the-context-windowSkill
- principle-laziness-protocolSkill
- principle-make-operations-idempotentSkill
- principle-migrate-callers-then-delete-legacy-apisSkill
- principle-minimize-reader-loadSkill
- principle-model-the-domainSkill
- principle-never-block-on-the-humanSkill
- principle-outcome-oriented-executionSkill
- principle-prove-it-worksSkill
- principle-redesign-from-first-principlesSkill
- principle-separate-before-serializing-shared-stateSkill
- principle-sequence-verifiable-unitsSkill
- principle-subtract-before-you-addSkill
- principle-test-behavior-not-implementationSkill
- principle-type-system-disciplineSkill
- pstack-author-skillSkill
- recallSkill
- reflectSkill
- setup-pstackSkill
- sharpenSkill
- show-me-your-workSkill
- statechartSkill
- swarmSkill
- tddSkill
- teachSkill
- technical-writingSkill
- The first 60 shown.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

