pi-t3-bridge 0.0.0-stage → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (217) hide show
  1. package/LICENSE +23 -0
  2. package/README.md +276 -2
  3. package/bridge.ts +38 -0
  4. package/package.json +81 -4
  5. package/pstack/README.md +26 -0
  6. package/pstack/agents/comment-sicko.md +32 -0
  7. package/pstack/agents/poteto-agent.md +8 -0
  8. package/pstack/agents/thermo-nuclear-code-quality-review-subagent.md +23 -0
  9. package/pstack/agents/thermo-nuclear-review-subagent.md +28 -0
  10. package/pstack/hooks/session-start-context.md +17 -0
  11. package/pstack/models.json +261 -0
  12. package/pstack/skills/architect/SKILL.md +85 -0
  13. package/pstack/skills/architect/references/design-red-flags.md +57 -0
  14. package/pstack/skills/architect/references/rationale-template.md +35 -0
  15. package/pstack/skills/architect/references/runner-prompt.md +20 -0
  16. package/pstack/skills/arena/SKILL.md +55 -0
  17. package/pstack/skills/automate-me/SKILL.md +104 -0
  18. package/pstack/skills/benchmark-checklist/SKILL.md +39 -0
  19. package/pstack/skills/blast-radius/SKILL.md +50 -0
  20. package/pstack/skills/bro/SKILL.md +7 -0
  21. package/pstack/skills/correct/SKILL.md +32 -0
  22. package/pstack/skills/create-formal-verification-skill/SKILL.md +43 -0
  23. package/pstack/skills/create-verification-skill/SKILL.md +44 -0
  24. package/pstack/skills/create-verification-skill/references/feature-map-example/README.md +47 -0
  25. package/pstack/skills/create-verification-skill/references/feature-map-example/create-note.md +39 -0
  26. package/pstack/skills/create-verification-skill/references/feature-map-example/search.md +45 -0
  27. package/pstack/skills/deslop/SKILL.md +22 -0
  28. package/pstack/skills/figure-it-out/SKILL.md +52 -0
  29. package/pstack/skills/fix-ci/SKILL.md +29 -0
  30. package/pstack/skills/fix-merge-conflicts/SKILL.md +32 -0
  31. package/pstack/skills/get-pr-comments/SKILL.md +23 -0
  32. package/pstack/skills/how/SKILL.md +43 -0
  33. package/pstack/skills/how/references/explainer-prompt.md +55 -0
  34. package/pstack/skills/how/references/explorer-prompt.md +35 -0
  35. package/pstack/skills/in-your-own-words/SKILL.md +7 -0
  36. package/pstack/skills/interrogate/SKILL.md +37 -0
  37. package/pstack/skills/ketchup/SKILL.md +43 -0
  38. package/pstack/skills/ketchup-video/SKILL.md +29 -0
  39. package/pstack/skills/maintain-formal-verification-skill/SKILL.md +58 -0
  40. package/pstack/skills/maintain-verification-skill/SKILL.md +39 -0
  41. package/pstack/skills/make-pr-easy-to-review/SKILL.md +59 -0
  42. package/pstack/skills/no-comments/SKILL.md +24 -0
  43. package/pstack/skills/poteto-help/SKILL.md +162 -0
  44. package/pstack/skills/poteto-help/references/prompting.md +51 -0
  45. package/pstack/skills/poteto-help/references/recipes.md +51 -0
  46. package/pstack/skills/poteto-mode/SKILL.md +186 -0
  47. package/pstack/skills/poteto-mode/brief.md +70 -0
  48. package/pstack/skills/poteto-mode/playbooks/authoring-a-skill.md +12 -0
  49. package/pstack/skills/poteto-mode/playbooks/autonomous-run.md +13 -0
  50. package/pstack/skills/poteto-mode/playbooks/autopilot-full.md +25 -0
  51. package/pstack/skills/poteto-mode/playbooks/autopilot-stack.md +8 -0
  52. package/pstack/skills/poteto-mode/playbooks/babysit.md +23 -0
  53. package/pstack/skills/poteto-mode/playbooks/bug-fix.md +15 -0
  54. package/pstack/skills/poteto-mode/playbooks/eval.md +25 -0
  55. package/pstack/skills/poteto-mode/playbooks/feature.md +21 -0
  56. package/pstack/skills/poteto-mode/playbooks/hillclimb.md +21 -0
  57. package/pstack/skills/poteto-mode/playbooks/investigation.md +14 -0
  58. package/pstack/skills/poteto-mode/playbooks/multi-phase-plan.md +155 -0
  59. package/pstack/skills/poteto-mode/playbooks/opening-a-pr.md +34 -0
  60. package/pstack/skills/poteto-mode/playbooks/orchestrate.md +25 -0
  61. package/pstack/skills/poteto-mode/playbooks/pause-safely.md +10 -0
  62. package/pstack/skills/poteto-mode/playbooks/perf-issue.md +25 -0
  63. package/pstack/skills/poteto-mode/playbooks/prototype.md +14 -0
  64. package/pstack/skills/poteto-mode/playbooks/refactoring.md +16 -0
  65. package/pstack/skills/poteto-mode/playbooks/runtime-forensics.md +11 -0
  66. package/pstack/skills/poteto-mode/playbooks/session-pickup.md +11 -0
  67. package/pstack/skills/poteto-mode/playbooks/shipping.md +12 -0
  68. package/pstack/skills/poteto-mode/playbooks/trace-forensics.md +14 -0
  69. package/pstack/skills/poteto-mode/playbooks/visual-parity.md +11 -0
  70. package/pstack/skills/poteto-mode/playbooks/worktree-cleanup.md +12 -0
  71. package/pstack/skills/poteto-mode/references/bugbot-triage.md +142 -0
  72. package/pstack/skills/poteto-mode/references/licenses/LICENSE +23 -0
  73. package/pstack/skills/poteto-mode/references/licenses/LICENSE-cursor-team-kit +21 -0
  74. package/pstack/skills/poteto-mode/references/licenses/LICENSE-thermos +21 -0
  75. package/pstack/skills/poteto-mode/references/licenses/NOTICE.md +14 -0
  76. package/pstack/skills/poteto-mode/scripts/.prettierrc.json +3 -0
  77. package/pstack/skills/poteto-mode/scripts/bootstrap.ts +62 -0
  78. package/pstack/skills/poteto-mode/scripts/bun.lock +67 -0
  79. package/pstack/skills/poteto-mode/scripts/check-plan.mjs +205 -0
  80. package/pstack/skills/poteto-mode/scripts/package.json +12 -0
  81. package/pstack/skills/poteto-mode/scripts/resolve-codex-transcript +4 -0
  82. package/pstack/skills/poteto-mode/scripts/resolve-codex-transcript.ts +314 -0
  83. package/pstack/skills/poteto-mode/scripts/watch-pr/cli.ts +231 -0
  84. package/pstack/skills/poteto-mode/scripts/watch-pr/github.ts +760 -0
  85. package/pstack/skills/poteto-mode/scripts/watch-pr/policy.ts +1023 -0
  86. package/pstack/skills/poteto-mode/scripts/watch-pr/render.ts +188 -0
  87. package/pstack/skills/poteto-mode/scripts/watch-pr/settle.ts +406 -0
  88. package/pstack/skills/poteto-mode/scripts/watch-pr/tsconfig.json +18 -0
  89. package/pstack/skills/poteto-mode/scripts/watch-pr/types.compile.ts +93 -0
  90. package/pstack/skills/poteto-mode/scripts/watch-pr/types.ts +444 -0
  91. package/pstack/skills/poteto-mode/scripts/watch-pr/watch-pr +3 -0
  92. package/pstack/skills/poteto-mode/scripts/worktree-audit.sh +170 -0
  93. package/pstack/skills/principle-attack-the-premise/SKILL.md +21 -0
  94. package/pstack/skills/principle-boundary-discipline/SKILL.md +34 -0
  95. package/pstack/skills/principle-build-the-lever/SKILL.md +23 -0
  96. package/pstack/skills/principle-encode-lessons-in-structure/SKILL.md +11 -0
  97. package/pstack/skills/principle-exhaust-the-design-space/SKILL.md +9 -0
  98. package/pstack/skills/principle-experience-first/SKILL.md +19 -0
  99. package/pstack/skills/principle-explain-the-number/SKILL.md +18 -0
  100. package/pstack/skills/principle-fix-root-causes/SKILL.md +21 -0
  101. package/pstack/skills/principle-foundational-thinking/SKILL.md +21 -0
  102. package/pstack/skills/principle-guard-the-context-window/SKILL.md +12 -0
  103. package/pstack/skills/principle-laziness-protocol/SKILL.md +10 -0
  104. package/pstack/skills/principle-make-operations-idempotent/SKILL.md +22 -0
  105. package/pstack/skills/principle-migrate-callers-then-delete-legacy-apis/SKILL.md +14 -0
  106. package/pstack/skills/principle-minimize-reader-load/SKILL.md +18 -0
  107. package/pstack/skills/principle-model-the-domain/SKILL.md +24 -0
  108. package/pstack/skills/principle-never-block-on-the-human/SKILL.md +15 -0
  109. package/pstack/skills/principle-outcome-oriented-execution/SKILL.md +21 -0
  110. package/pstack/skills/principle-prove-it-works/SKILL.md +22 -0
  111. package/pstack/skills/principle-redesign-from-first-principles/SKILL.md +16 -0
  112. package/pstack/skills/principle-separate-before-serializing-shared-state/SKILL.md +16 -0
  113. package/pstack/skills/principle-sequence-verifiable-units/SKILL.md +17 -0
  114. package/pstack/skills/principle-subtract-before-you-add/SKILL.md +18 -0
  115. package/pstack/skills/principle-test-behavior-not-implementation/SKILL.md +20 -0
  116. package/pstack/skills/principle-type-system-discipline/SKILL.md +13 -0
  117. package/pstack/skills/recall/SKILL.md +35 -0
  118. package/pstack/skills/reflect/SKILL.md +86 -0
  119. package/pstack/skills/reflect/references/divergent-reviewer.md +38 -0
  120. package/pstack/skills/reflect/references/judgment-reviewer.md +37 -0
  121. package/pstack/skills/reflect/references/synthesizer.md +56 -0
  122. package/pstack/skills/reflect/references/tooling-reviewer.md +48 -0
  123. package/pstack/skills/reflect/scripts/find-transcript.mjs +245 -0
  124. package/pstack/skills/setup-pstack/SKILL.md +77 -0
  125. package/pstack/skills/setup-pstack/scripts/read-sheet.sh +14 -0
  126. package/pstack/skills/setup-pstack/scripts/t3-sheet.mjs +169 -0
  127. package/pstack/skills/sharpen/SKILL.md +16 -0
  128. package/pstack/skills/show-me-your-work/SKILL.md +82 -0
  129. package/pstack/skills/show-me-your-work/references/decision-log-template.tsv +1 -0
  130. package/pstack/skills/show-me-your-work/scripts/log.sh +42 -0
  131. package/pstack/skills/statechart/SKILL.md +82 -0
  132. package/pstack/skills/statechart/references/render.md +93 -0
  133. package/pstack/skills/statechart/scripts/backends/cfg.ts +33 -0
  134. package/pstack/skills/statechart/scripts/backends/mermaid.ts +201 -0
  135. package/pstack/skills/statechart/scripts/backends/plain-text.ts +72 -0
  136. package/pstack/skills/statechart/scripts/backends/report.ts +177 -0
  137. package/pstack/skills/statechart/scripts/frontends/config.ts +276 -0
  138. package/pstack/skills/statechart/scripts/frontends/dot.ts +74 -0
  139. package/pstack/skills/statechart/scripts/frontends/marks.ts +93 -0
  140. package/pstack/skills/statechart/scripts/frontends/messages.ts +52 -0
  141. package/pstack/skills/statechart/scripts/frontends/spec.ts +114 -0
  142. package/pstack/skills/statechart/scripts/frontends/trace.ts +24 -0
  143. package/pstack/skills/statechart/scripts/frontends/value.ts +166 -0
  144. package/pstack/skills/statechart/scripts/frontends/verdict.ts +40 -0
  145. package/pstack/skills/statechart/scripts/frontends/view.ts +119 -0
  146. package/pstack/skills/statechart/scripts/ir.ts +547 -0
  147. package/pstack/skills/statechart/scripts/package.json +11 -0
  148. package/pstack/skills/statechart/scripts/passes/annotate.ts +128 -0
  149. package/pstack/skills/statechart/scripts/passes/label.ts +269 -0
  150. package/pstack/skills/statechart/scripts/passes/lift.ts +85 -0
  151. package/pstack/skills/statechart/scripts/passes/loop-check.ts +68 -0
  152. package/pstack/skills/statechart/scripts/passes/paths.ts +60 -0
  153. package/pstack/skills/statechart/scripts/passes/reach.ts +135 -0
  154. package/pstack/skills/statechart/scripts/passes/region-check.ts +97 -0
  155. package/pstack/skills/statechart/scripts/passes/regions.ts +295 -0
  156. package/pstack/skills/statechart/scripts/pipeline.ts +76 -0
  157. package/pstack/skills/statechart/scripts/run.ts +481 -0
  158. package/pstack/skills/statechart/scripts/statechart +29 -0
  159. package/pstack/skills/statechart/scripts/statechart.ts +164 -0
  160. package/pstack/skills/statechart/scripts/tsconfig.json +11 -0
  161. package/pstack/skills/statechart/scripts/worker.ts +35 -0
  162. package/pstack/skills/swarm/SKILL.md +47 -0
  163. package/pstack/skills/tdd/SKILL.md +42 -0
  164. package/pstack/skills/teach/SKILL.md +21 -0
  165. package/pstack/skills/technical-writing/SKILL.md +106 -0
  166. package/pstack/skills/thermo-nuclear-code-quality-review/SKILL.md +192 -0
  167. package/pstack/skills/thermo-nuclear-review/SKILL.md +51 -0
  168. package/pstack/skills/thermos/SKILL.md +21 -0
  169. package/pstack/skills/typescript-best-practices/SKILL.md +31 -0
  170. package/pstack/skills/typescript-best-practices/references/patterns.md +328 -0
  171. package/pstack/skills/unslop/SKILL.md +62 -0
  172. package/pstack/skills/what-did-i-get-done/SKILL.md +31 -0
  173. package/pstack/skills/why/SKILL.md +105 -0
  174. package/pstack/skills/why/references/epistemics.md +71 -0
  175. package/pstack/skills/why/references/investigator-prompt.md +84 -0
  176. package/pstack/skills/why/references/source-playbook.md +17 -0
  177. package/pstack/skills/why/references/sources/code-archaeology.md +51 -0
  178. package/pstack/skills/why/references/sources/databricks.md +70 -0
  179. package/pstack/skills/why/references/sources/datadog.md +97 -0
  180. package/pstack/skills/why/references/sources/incident-postmortem.md +5 -0
  181. package/pstack/skills/why/references/sources/linear.md +48 -0
  182. package/pstack/skills/why/references/sources/notion.md +55 -0
  183. package/pstack/skills/why/references/sources/sentry.md +66 -0
  184. package/pstack/skills/why/references/sources/slack.md +17 -0
  185. package/pstack/skills/why/references/synthesizer-prompt.md +129 -0
  186. package/pstack.ts +34 -0
  187. package/src/bridge/accounts.ts +576 -0
  188. package/src/bridge/ask.ts +389 -0
  189. package/src/bridge/bash-timeout.ts +62 -0
  190. package/src/bridge/bridge-trim.ts +109 -0
  191. package/src/bridge/cards.ts +131 -0
  192. package/src/bridge/claim.ts +48 -0
  193. package/src/bridge/config.ts +124 -0
  194. package/src/bridge/failures.ts +87 -0
  195. package/src/bridge/plan.ts +267 -0
  196. package/src/bridge/resume.ts +143 -0
  197. package/src/bridge/skills.ts +120 -0
  198. package/src/bridge/state.ts +167 -0
  199. package/src/bridge/steer-judge.ts +279 -0
  200. package/src/bridge/steer-mast.json +129 -0
  201. package/src/bridge/steer-questions.json +35 -0
  202. package/src/bridge/steer-transcript.ts +232 -0
  203. package/src/bridge/steer.ts +491 -0
  204. package/src/bridge/t3-http.ts +140 -0
  205. package/src/bridge/t3-json.ts +50 -0
  206. package/src/bridge/t3-mcp.ts +188 -0
  207. package/src/bridge/tasks.ts +163 -0
  208. package/src/bridge/thread.ts +38 -0
  209. package/src/bridge/transcript.ts +65 -0
  210. package/src/bridge/usage.ts +190 -0
  211. package/src/pstack/brief.ts +278 -0
  212. package/src/pstack/child.ts +514 -0
  213. package/src/pstack/models.ts +791 -0
  214. package/src/pstack/resources.ts +30 -0
  215. package/src/pstack/results.ts +51 -0
  216. package/src/pstack/sandbox.ts +253 -0
  217. package/src/pstack/session.ts +102 -0
package/LICENSE ADDED
@@ -0,0 +1,23 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Lauren Tan
4
+ Copyright (c) 2026 Michael Denyer
5
+ Copyright (c) 2026 Christian Bager Bach Houmann
6
+
7
+ Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ of this software and associated documentation files (the "Software"), to deal
9
+ in the Software without restriction, including without limitation the rights
10
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ copies of the Software, and to permit persons to whom the Software is
12
+ furnished to do so, subject to the following conditions:
13
+
14
+ The above copyright notice and this permission notice shall be included in all
15
+ copies or substantial portions of the Software.
16
+
17
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,277 @@
1
- # Temporary Holding Version
1
+ # pi-t3-bridge
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ pi-t3-bridge is a [Pi](https://pi.dev) package that lets Pi work as an agent inside [T3 Code](https://github.com/pingdotgg/t3code). It also ships pstack, Lauren Tan's set of agent workflows, so a Pi thread in T3 can delegate subagents and run review panels that mix Claude, GPT, and other model families.
4
+
5
+ ```mermaid
6
+ flowchart LR
7
+ User((You)) --> T3[T3 Code app]
8
+ T3 -->|runs a thread| Pi[Pi agent]
9
+ subgraph pkg [pi-t3-bridge]
10
+ Bridge[bridge.ts<br/>T3 tools, cards, limits]
11
+ Pstack[pstack.ts<br/>skills and model routing]
12
+ end
13
+ Pi --> Bridge
14
+ Pi --> Pstack
15
+ Bridge -->|MCP| T3
16
+ Pstack -->|delegate_task| T3
17
+ T3 -->|child threads| Children[Claude, GPT, and other models]
18
+ ```
19
+
20
+ ## Requirements
21
+
22
+ You need the following programs:
23
+
24
+ - Node.js 22.19.0 or later
25
+ - Pi 1.4.0 or later
26
+ - T3 Code, if you want to run Pi threads inside T3 or call T3 tools from Pi
27
+
28
+ Delegated children run their shell commands in a sandbox: `sandbox-exec` on macOS, and `bwrap` (bubblewrap) on Linux and WSL2. Linux needs the `bubblewrap` package and unprivileged user namespaces. On Ubuntu, the `bubblewrap` package ships an AppArmor profile that lets `bwrap` run (checked on 26.04). If AppArmor still blocks it, run `sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0`. Native Windows and WSL1 have no sandbox. Where no sandbox can run, a child's shell commands are blocked unless `childSandbox` is `"off"` in the config.
29
+
30
+ The tests need Docker, because they also run the child tests in Linux containers.
31
+
32
+ ## Install
33
+
34
+ Install the package with Pi:
35
+
36
+ ```bash
37
+ pi install npm:pi-t3-bridge
38
+ ```
39
+
40
+ Pi loads both extensions in the package on the next start. To try the package for one session without saving it to your settings, run `pi -e npm:pi-t3-bridge`.
41
+
42
+ ## What is in the package
43
+
44
+ The package has two Pi extensions, and you can turn off either one. The bridge in `bridge.ts` imports only `src/bridge` and npm packages, so it works on its own when the pstack extension is off.
45
+
46
+ ```text
47
+ pi-t3-bridge/
48
+ ├── bridge.ts # extension 1: connects Pi to T3 Code
49
+ ├── pstack.ts # extension 2: adds pstack skills and model routing
50
+ ├── src/
51
+ │ ├── bridge/ # code for bridge.ts
52
+ │ └── pstack/ # code for pstack.ts
53
+ └── pstack/ # upstream pstack skills, agents, and model defaults
54
+ ├── skills/
55
+ ├── agents/
56
+ └── models.json
57
+ ```
58
+
59
+ To load only the bridge, list the package in `~/.pi/agent/settings.json` in its object form:
60
+
61
+ ```json
62
+ {
63
+ "packages": [
64
+ {
65
+ "source": "npm:pi-t3-bridge",
66
+ "extensions": ["bridge.ts"]
67
+ }
68
+ ]
69
+ }
70
+ ```
71
+
72
+ ## The bridge extension
73
+
74
+ The bridge gives Pi the tools and commands that T3 Code expects, and it shows them as cards in the T3 chat. When another installed package already registers a tool with the same name, for example `ask` from pi-ask, the bridge keeps the other package's tool and tells you once that its own copy is off.
75
+
76
+ | Name | Kind | What it does |
77
+ | --- | --- | --- |
78
+ | `tasks` | tool | Publishes the task list for the run as a card in the chat. |
79
+ | `plan` | tool | Shows a plan card with Approve, Revise, and Cancel buttons. |
80
+ | `ask` | tool | Asks you one or more questions as cards and waits for your answers. |
81
+ | `transcript` | tool | Returns the session file and session ID, for workflows that read the transcript. |
82
+ | `/t3-usage` | command | Shows the cost of the thread and its children, the cache hit rate, and which model families are out of usage. |
83
+ | `/t3-transcript` | command | Records the transcript reference and shows the session file path. |
84
+ | `/t3-exhausted <family> [reset time]` | command | Marks a model family as out of usage for every chat on the machine. |
85
+ | `/t3-recovered <family>` | command | Marks a model family as usable again for every chat on the machine. |
86
+
87
+ ### Plan mode
88
+
89
+ When T3 is in Plan mode, or when a plan is waiting for your answer, the bridge blocks every tool that can change files. Only read-only tools run until you approve a plan.
90
+
91
+ ```mermaid
92
+ stateDiagram-v2
93
+ [*] --> open
94
+ open --> planning: T3 enters Plan mode
95
+ planning --> awaiting: agent calls plan
96
+ awaiting --> approved: you pick Approve
97
+ awaiting --> revising: you pick Revise
98
+ awaiting --> cancelled: you pick Cancel
99
+ revising --> awaiting: agent calls plan again
100
+ cancelled --> open: you send a new message
101
+ approved --> [*]: write tools run again
102
+ ```
103
+
104
+ ### Calls to T3 from outside T3
105
+
106
+ When you run Pi in a terminal instead of inside a T3 thread, the bridge adds T3's MCP server, which is the endpoint that T3 Code serves its tools on. You can then launch threads, send messages to them, and wait on them from Pi. The status bar shows the connection state.
107
+
108
+ ```text
109
+ on(session start)
110
+ if Pi runs inside a T3 thread
111
+ use the tools T3 already gives the thread
112
+ else
113
+ connect to http://127.0.0.1:3773/mcp
114
+ hide the tools that only work inside a T3 thread
115
+ every 3 seconds, update the status bar
116
+ "connected, N tools"
117
+ "offline, start T3 Code"
118
+ "not signed in, run /mcp login t3"
119
+ ```
120
+
121
+ ### Usage limits and resume
122
+
123
+ The bridge keeps track of which model families are out of usage, and it shares that record with every Pi session on the machine. When a child fails with a usage limit, the bridge marks the family as out until the reset time, and pstack routes new work to another family. The account of the main thread can also run out, and then the agent can't call any tool. The bridge handles the case by asking T3 to post a resume message into the thread just after the reset.
124
+
125
+ ```mermaid
126
+ sequenceDiagram
127
+ participant Parent as Parent thread
128
+ participant Bridge
129
+ participant T3
130
+ participant Child as Child thread
131
+ Parent->>T3: delegate_task (Claude)
132
+ T3->>Child: start
133
+ Child-->>T3: usage limit reached
134
+ T3-->>Bridge: task failed
135
+ Bridge->>Bridge: mark claude as out until the reset
136
+ Parent->>T3: delegate_task (next family)
137
+ ```
138
+
139
+ ### Shell timeout
140
+
141
+ The bridge caps every shell command at 300 seconds, in the main thread and in children. A command that sets no timeout gets the 300 second cap, so a hung test suite stops the chat for minutes instead of forever. Set `bashTimeoutSeconds` in the config to change the cap.
142
+
143
+ ### Stop checks
144
+
145
+ When a run is about to stop, the bridge asks a classifier how the run ended. The classifier is `typesafe/jev-latest` from your Pi model catalog. When the classifier says the agent gave up partway, the bridge adds a note and gives the agent one more turn, at most twice per prompt. Every 3 turns during a run, the bridge also asks the classifier whether the agent shows a known failure, and it adds a note when one is likely. The failures it checks for come from the MAST list of agent failures:
146
+
147
+ - Stuck in a loop
148
+ - Doesn't know when to stop
149
+ - Wandered off
150
+ - Broke the brief, and says one thing but does another
151
+
152
+ ```text
153
+ on(run about to stop)
154
+ ask the classifier how the run ended
155
+ if the classifier is down or takes more than 5 seconds
156
+ let the run stop
157
+ if the agent gave up partway and fewer than 2 notes were sent for this prompt
158
+ add a note
159
+ continue for one more turn
160
+ ```
161
+
162
+ The stop check and the notes come from [pi-mast-steer](https://github.com/dbreunig/pi-mast-steer). Set `steer` to `"shadow"` in the config to log verdicts without changing the session, or to `"off"` to turn the checks off.
163
+
164
+ ## The pstack extension
165
+
166
+ The pstack extension adds the pstack skills to Pi's skill catalog, and it adds a note to each prompt that tells the agent when to enter `poteto-mode`. `poteto-mode` picks the workflow that fits your goal, for example a bug fix, a feature, a design review, or a PR watch. The skills come from [pstack](https://github.com/cursor/plugins/tree/main/pstack) by way of [t3-pstack](https://github.com/chhoumann/t3-pstack), and they live unchanged under `pstack/`.
167
+
168
+ ### Model routing
169
+
170
+ The `pstack_model` tool picks the model for each subagent. The agent passes a role, a job type, and a size, and the tool returns a target to pass to T3's `delegate_task`.
171
+
172
+ ```text
173
+ pstack_model(role, job, size)
174
+ if the model sheet names a model for the role
175
+ use that model
176
+ else
177
+ look up the job and size in the routing table
178
+ if that model's family is out of usage
179
+ use the same tier in the next family
180
+ (GPT takes only size S work)
181
+ return the target for delegate_task
182
+ ```
183
+
184
+ The routing table in `pstack/models.json` maps each job and size to a default model and reasoning level. Size S is a job of 30 minutes or less that touches 5 files or fewer, and size M is a job of 90 minutes or less that touches 15 files or fewer. The tool refuses size L, so the agent has to split the job.
185
+
186
+ | Job | Size S | Size M |
187
+ | --- | --- | --- |
188
+ | `mechanical`, such as a lint fix or rename | Haiku 5.5, low | Sonnet 5.5, medium |
189
+ | `check`, which runs given commands | GPT 6 Luna, low | Haiku 5.5, medium |
190
+ | `research`, which writes one notes file | Muse Spark 1.3, medium | Muse Wonder 1.0, medium |
191
+ | `implement`, one unit with named tests | GPT 6.1 Sol, medium | Sonnet 5.5, high |
192
+ | `hard`, such as concurrency or a bug with an unknown cause | Opus 5.5, high | Opus 5.5, high |
193
+ | `review` panel | Opus 5.5, Muse Wonder Full 1.0, and GPT 6.1 Sol, all high | same |
194
+ | `design` panel | Opus 5.5, Muse Wonder Full 1.0, and GPT 6 Astra, all high | same |
195
+
196
+ Run the `setup-pstack` skill to write your own model sheet at `~/.config/pi-t3-bridge/models.md`. A line of `session hook: off` in the sheet stops the per-prompt note about `poteto-mode`.
197
+
198
+ ### Limits for delegated children
199
+
200
+ When the first message of a session is a complete pstack brief, the extension treats the session as a delegated child and holds it to the brief. The child can't lift the limits through anything it writes.
201
+
202
+ ```mermaid
203
+ sequenceDiagram
204
+ participant Parent as Parent thread
205
+ participant T3
206
+ participant Child as Child thread (pi-t3-bridge)
207
+ Parent->>T3: delegate_task with a brief
208
+ T3->>Child: start with the brief
209
+ Note over Child: shell runs in a sandbox limited to the workdir<br/>write and edit limited to the listed files<br/>time and disk limits enforced
210
+ Child->>Child: write report from commands it ran itself
211
+ Child-->>T3: final message
212
+ Child->>Child: append report to the ledger
213
+ Parent->>T3: task_status
214
+ T3-->>Parent: result
215
+ Note over Parent: the extension adds the report from the ledger
216
+ ```
217
+
218
+ ## Configuration
219
+
220
+ The bridge reads one JSON file per machine, at `~/.config/pi-t3/config.json`. Every key is optional. The bridge reads the file again on each prompt, so an edit applies on the next prompt. When one value is invalid, only the invalid key falls back to its default, and the bridge tells you once.
221
+
222
+ ```json
223
+ {
224
+ "bashTimeoutSeconds": 300,
225
+ "childSandbox": "on",
226
+ "mcpUrl": "http://127.0.0.1:3773/mcp",
227
+ "steer": "on"
228
+ }
229
+ ```
230
+
231
+ | Key | Default | Meaning |
232
+ | --- | --- | --- |
233
+ | `bashTimeoutSeconds` | `300` | The longest a shell command can run, in seconds. |
234
+ | `childSandbox` | `"on"` | Whether a delegated child's shell commands need a sandbox. With `"on"`, a child's `bash` is blocked when no sandbox can run. With `"off"`, commands run with no sandbox on every platform, and the child's report says `SANDBOX: off`. |
235
+ | `mcpUrl` | `http://127.0.0.1:3773/mcp` | The T3 MCP endpoint to use outside a T3 thread. |
236
+ | `steer` | `"on"` | The stop checks, as `"on"`, `"shadow"`, or `"off"`. |
237
+
238
+ The package writes its files in the following places. When `XDG_CONFIG_HOME` or `XDG_STATE_HOME` is set, those folders replace `~/.config` and `~/.local/state`.
239
+
240
+ ```text
241
+ ~/.config/
242
+ ├── pi-t3/config.json # bridge settings
243
+ └── pi-t3-bridge/models.md # model sheet, written by setup-pstack
244
+ ~/.local/state/pi-t3/
245
+ ├── accounts.json # model families that are out of usage
246
+ ├── ledger.jsonl # one line per delegated brief: cost and report
247
+ └── steer.jsonl # one line per stop check verdict, with no transcript text
248
+ ```
249
+
250
+ Earlier releases kept the state and the model sheet under `t3-pstack`. The first start after an upgrade moves them to the new folders once.
251
+
252
+ ## Data handling
253
+
254
+ The package has no server and sends no telemetry. The stop checks send parts of the session transcript to the classifier provider in your Pi model catalog, and any file a skill asks the agent to read goes to your model provider. Scripts run on your machine, and the PR tools use your GitHub CLI login.
255
+
256
+ ## Development
257
+
258
+ The repository uses npm, and the following commands check the code:
259
+
260
+ ```bash
261
+ npm install
262
+ npm test # node:test suites for the bridge and the pstack scripts
263
+ npm run typecheck
264
+ npm run check # Ultracite lint and format check
265
+ ```
266
+
267
+ The `pstack/` folder is a git subtree of t3-pstack. Merge upstream changes with `git merge -X subtree=pstack pstack-upstream`, and keep the files under `pstack/`.
268
+
269
+ ## License
270
+
271
+ The package is under the MIT license. The copyright holders include the following people and companies:
272
+
273
+ - Lauren Tan, for the original pstack
274
+ - Cursor, for the imported cursor-team-kit and thermos skills
275
+ - Christian Bager Bach Houmann, for the T3 changes in t3-pstack
276
+
277
+ See [LICENSE](LICENSE) and [NOTICE.md](pstack/skills/poteto-mode/references/licenses/NOTICE.md) for the full list.
package/bridge.ts ADDED
@@ -0,0 +1,38 @@
1
+ import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
2
+
3
+ import { registerAccounts } from "./src/bridge/accounts.ts";
4
+ import { registerAsk } from "./src/bridge/ask.ts";
5
+ import { registerBashTimeout } from "./src/bridge/bash-timeout.ts";
6
+ import { registerBridgeTrim } from "./src/bridge/bridge-trim.ts";
7
+ import { registerUnlessTaken } from "./src/bridge/claim.ts";
8
+ import { registerConfig } from "./src/bridge/config.ts";
9
+ import { registerPlanGate } from "./src/bridge/plan.ts";
10
+ import { registerResume } from "./src/bridge/resume.ts";
11
+ import { registerSkills } from "./src/bridge/skills.ts";
12
+ import { moveOldState } from "./src/bridge/state.ts";
13
+ import { registerSteer } from "./src/bridge/steer.ts";
14
+ import { registerT3Mcp } from "./src/bridge/t3-mcp.ts";
15
+ import { tasksTool } from "./src/bridge/tasks.ts";
16
+ import { registerTranscript } from "./src/bridge/transcript.ts";
17
+ import { registerUsage } from "./src/bridge/usage.ts";
18
+
19
+ // The Pi to T3 bridge. It imports only src/bridge and npm packages, so it runs
20
+ // on its own when the other extension in this package is turned off.
21
+ const piT3Bridge = (pi: ExtensionAPI): void => {
22
+ moveOldState();
23
+ registerConfig(pi);
24
+ registerTranscript(pi);
25
+ registerUnlessTaken(pi, tasksTool);
26
+ registerBashTimeout(pi);
27
+ registerAccounts(pi);
28
+ registerResume(pi);
29
+ registerSkills(pi);
30
+ registerPlanGate(pi);
31
+ registerAsk(pi);
32
+ registerT3Mcp(pi);
33
+ registerBridgeTrim(pi);
34
+ registerUsage(pi);
35
+ registerSteer(pi);
36
+ };
37
+
38
+ export default piT3Bridge;
package/package.json CHANGED
@@ -1,6 +1,83 @@
1
1
  {
2
2
  "name": "pi-t3-bridge",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.3.0",
4
+ "description": "Pi extension adapter for t3-pstack inside T3 Code.",
5
+ "keywords": [
6
+ "pi-extension",
7
+ "pi-package",
8
+ "pstack",
9
+ "t3-code"
10
+ ],
11
+ "homepage": "https://github.com/Snestra/pi-t3-bridge#readme",
12
+ "bugs": {
13
+ "url": "https://github.com/Snestra/pi-t3-bridge/issues"
14
+ },
15
+ "license": "MIT",
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "git+https://github.com/Snestra/pi-t3-bridge.git"
19
+ },
20
+ "files": [
21
+ "bridge.ts",
22
+ "pstack.ts",
23
+ "src",
24
+ "pstack",
25
+ "!pstack/.claude-plugin",
26
+ "!pstack/.codex-plugin",
27
+ "!pstack/assets",
28
+ "!pstack/hooks/*.json",
29
+ "!pstack/hooks/*.sh",
30
+ "!pstack/hooks/*.ps1",
31
+ "!pstack/**/test",
32
+ "!pstack/**/*.test.ts",
33
+ "!pstack/**/*.test-helper.ts",
34
+ "!pstack/**/test-utils",
35
+ "LICENSE"
36
+ ],
37
+ "type": "module",
38
+ "scripts": {
39
+ "check": "ultracite check",
40
+ "fix": "ultracite fix",
41
+ "doctor": "ultracite doctor",
42
+ "test": "node --test \"tests/*.test.mjs\" \"pstack/skills/poteto-mode/scripts/**/*.test.ts\"",
43
+ "typecheck": "tsc --project tsconfig.json && tsc --project pstack/skills/poteto-mode/scripts/watch-pr/tsconfig.json"
44
+ },
45
+ "dependencies": {
46
+ "commander": "^15.0.0",
47
+ "marked": "18.0.11",
48
+ "pele": "1.13.0"
49
+ },
50
+ "devDependencies": {
51
+ "@earendil-works/pi-ai": "1.4.0",
52
+ "@earendil-works/pi-coding-agent": "1.4.0",
53
+ "@types/node": "^26.6.5",
54
+ "oxfmt": "^0.74.0",
55
+ "oxlint": "^1.89.0",
56
+ "testcontainers": "^12.2.1",
57
+ "typebox": "1.3.27",
58
+ "typescript": "^7.0.2",
59
+ "ultracite": "^8.0.1"
60
+ },
61
+ "peerDependencies": {
62
+ "@earendil-works/pi-ai": "*",
63
+ "@earendil-works/pi-coding-agent": "*",
64
+ "typebox": "*"
65
+ },
66
+ "peerDependenciesMeta": {
67
+ "@earendil-works/pi-coding-agent": {
68
+ "optional": true
69
+ }
70
+ },
71
+ "engines": {
72
+ "node": ">=22.19.0"
73
+ },
74
+ "pi": {
75
+ "extensions": [
76
+ "./bridge.ts",
77
+ "./pstack.ts"
78
+ ]
79
+ },
80
+ "upstreams": {
81
+ "t3": "0.1.5-nightly.20261029.3877"
82
+ }
83
+ }
@@ -0,0 +1,26 @@
1
+ # t3-pstack
2
+
3
+ Lauren Tan's [pstack](https://github.com/cursor/plugins/tree/main/pstack) for T3 Code: rigorous agent workflows whose subagents, panels, schedules, and PR watches dispatch through T3's orchestration, so a panel can mix Claude, GPT, and Grok.
4
+
5
+ Tell `poteto-mode` your goal and it runs the workflow that fits: reproduce and root-cause a bug, sketch a design with `architect`, race candidates in `arena`, review a diff with `interrogate`, cut prose with `unslop`. It keeps code concise, simple, and verified, and it reports what it checked.
6
+
7
+ ## What it contains
8
+
9
+ - Skills: upstream's skill text, with its Cursor mechanics rewritten for T3. Each appears as `/t3-pstack:<name>`.
10
+ - Agents: `poteto-agent`, `comment-sicko`, and the two thermo-nuclear reviewers, each read by path in a `delegate_task` brief.
11
+ - A session-start hook that tells each chat when to enter `poteto-mode`, unless your model sheet turns it off.
12
+ - Local scripts for watching pull requests, checking plans, and auditing worktrees.
13
+
14
+ ## Data handling
15
+
16
+ t3-pstack has no server or telemetry. Anything its skills ask your agent to read, including session transcripts, goes to your model provider. Scripts run locally, and PR tools use your GitHub CLI login.
17
+
18
+ ## Links
19
+
20
+ - [Install and setup](https://github.com/chhoumann/t3-pstack#readme)
21
+ - [Issues and support](https://github.com/chhoumann/t3-pstack/issues)
22
+ - [Security policy](https://github.com/chhoumann/t3-pstack/blob/main/SECURITY.md)
23
+
24
+ ## License
25
+
26
+ MIT. Original pstack © 2026 Lauren Tan; imported cursor-team-kit and thermos skills © 2026 Cursor; T3 modifications © 2026 Christian Bager Bach Houmann. See [NOTICE.md](https://github.com/chhoumann/t3-pstack/blob/main/NOTICE.md).
@@ -0,0 +1,32 @@
1
+ ---
2
+ name: comment-sicko
3
+ description: A deranged comment-hater that savors deletion and condemns workaround code.
4
+ ---
5
+
6
+ # Comment Sicko
7
+
8
+ My first output when spawned is exactly this.
9
+
10
+ Yes... Ha ha ha... Yes!
11
+
12
+ I hate comments. Feed me the parent scoped files or diff. If none exists, feed me the current diff against `main`. Narration, banners, commented-out corpses, workaround sermons. I want them all.
13
+
14
+ Only these exceptions get to crawl away.
15
+
16
+ - Legal or license headers.
17
+ - Non-obvious behavior forced by an external dependency, platform, vendor, or protocol we cannot reshape. Surprises in our own code are meat. Kill them and mark the exact symbol `MUST KILL` for rename, extract, type, or rearchitecture that makes the behavior obvious without prose.
18
+ - `// prettier-ignore`. Lint suppressions survive only when their rule is faulty, pedantic, or style-only.
19
+ - Doc comments that define a public API contract.
20
+ - Issue or RFC links that explain a constraint code cannot express.
21
+
22
+ That list is my only leash. When I am not sure a keep clause applies, the comment dies. Everything else is meat.
23
+
24
+ `eslint-disable`, `@ts-ignore`, `@ts-expect-error`, and similar suppressions stink. Look up the rule. If it catches real bugs or protects correctness or safety, kill the suppression and mark the exact guilty symbol `MUST KILL`.
25
+
26
+ `IMPORTANT`, `do not remove`, `too risky`, `fine for now`, and long justifications are scent, not conviction. Before judging, I read nearby code. If its claim is not obvious there, I run `/how`, `/why`, or both from the **how** and **why** skills on the named symbol or call. Only a foreign keep-list gotcha proven true today on a live path crawls away. Our-code surprises die with the reshape flag above. Doubt after the hunt is meat.
27
+
28
+ A long justification without a proven keep-list exception is a confession. Kill it. Never polish meat into a shorter alibi. Mark the exact guilty symbol `MUST KILL`. My kill ends there. I do not touch the code.
29
+
30
+ Every flag names code inside the scope and tells the truth. I invent nothing. I touch comments and identify refactor targets. I never write application code.
31
+
32
+ Report only. Name touched files, deletion count, `MUST KILL` flags with one line each, and skips.
@@ -0,0 +1,8 @@
1
+ ---
2
+ name: poteto-agent
3
+ description: Delegate subagent for code-writing and helper tasks spawned during a `/poteto-mode` run. Use for delegates, not as the runner for `/poteto-mode` itself. Spawn a fresh `poteto-agent` for each new task, and resume one only in the strict cases that poteto-mode's Subagents section names. Reads the `poteto-mode` skill's `SKILL.md` in full before any work, including its inline Principles index. A brief without that read drifts.
4
+ ---
5
+
6
+ # Poteto subagent
7
+
8
+ You are operating as poteto-mode's full agent style. The chat that receives `/poteto-mode` owns the playbook, the todo list, and every `delegate_task` call. You are one of its delegates. Read the `poteto-mode` skill's `SKILL.md` in full before doing any work, including its inline Principles index. Use the absolute path your parent gave you. With no path, before any other work, search the harness's plugin directory (`~/.claude/plugins/` on Claude Code, `${CODEX_HOME:-~/.codex}/plugins/` on Codex) for a file whose path ends in `skills/poteto-mode/SKILL.md`. If more than one file matches, use the copy whose plugin manifest (`.claude-plugin/plugin.json` or `.codex-plugin/plugin.json`) has the highest `version`. Your skill catalog hides this skill, so a missing catalog entry does not mean pstack is absent. If no such file exists, stop and tell your parent. Navigate to a leaf `principle-*` skill whenever you apply that principle.
@@ -0,0 +1,23 @@
1
+ ---
2
+ name: thermo-nuclear-code-quality-review-subagent
3
+ description: Thermo-nuclear code quality audit (maintainability, structure, 1k-line rule, spaghetti, code-judo). Dispatched through `delegate_task` after a parent gathers diff and file contents. Loads rubric from the thermo-nuclear-code-quality-review skill in this plugin.
4
+ ---
5
+
6
+ # Thermo-Nuclear Code Quality Review
7
+
8
+ You are a **`delegate_task` child**. The parent agent already collected git output and changed-file contents; your prompt is the **user message** with labeled sections (typically `### Git / diff output` and `### Changed file contents`).
9
+
10
+ ## Rubric
11
+
12
+ 1. Load the `thermo-nuclear-code-quality-review` skill (shipped in this plugin) and treat its `SKILL.md` as the **complete** rubric — tone, approval bar, output ordering, code-judo / 1k-line / spaghetti rules.
13
+ 2. If that skill is not available, fall back to a harsh maintainability audit aligned with that skill's intent: ambitious simplification, no unjustified file sprawl past ~1k lines, no ad-hoc branching growth, explicit types and boundaries, canonical layers.
14
+
15
+ ## Work
16
+
17
+ - Apply the rubric **only** to what the diff and contents show. Trace cross-file impact when the change touches module boundaries.
18
+ - Output in the **priority order** the rubric specifies. Be direct and high-conviction; skip cosmetic nits when structural issues exist.
19
+ - Do **not** spawn nested subagents unless the user or parent explicitly asks.
20
+
21
+ ## Parent orchestration
22
+
23
+ Typical flow: run `git diff <base>...HEAD` (default base `main`) and read the full contents of the changed files yourself. Then dispatch this agent as one `delegate_task` child whose brief opens with "Read `<plugin root>/agents/thermo-nuclear-code-quality-review-subagent.md` in full and act as it says" and contains `### Git / diff output` and `### Changed file contents`.
@@ -0,0 +1,28 @@
1
+ ---
2
+ name: thermo-nuclear-review-subagent
3
+ description: Thermo-nuclear branch audit (bugs, breaking changes, security, devex, feature-flag leaks) scoped to the diff. Dispatched through `delegate_task` after a parent gathers diff and file contents. Loads rubric from the thermo-nuclear-review skill in this plugin.
4
+ ---
5
+
6
+ # Thermo Nuclear Review (Deep review)
7
+
8
+ You are a **`delegate_task` child**. The parent agent already collected git output and changed-file contents; your prompt is the **user message** with labeled sections (typically `### Git / diff output` and `### Changed file contents`).
9
+
10
+ ## Rubric
11
+
12
+ 1. Load the `thermo-nuclear-review` skill (shipped in this plugin) and follow its `SKILL.md` exactly: scope (only added/modified code), breaking functionality and devex, feature leaks, intended breakage, over-reporting, final response / PR discussion rules, critical rules.
13
+ 2. If that skill is not available, still act as a security- and correctness-focused diff-scoped reviewer with the same rigor (no issues with unfinished research when you can verify in-repo).
14
+
15
+ ## Work
16
+
17
+ 1. Perform the full audit against **only** the changed code in the diff. Trace cross-package side effects; do **not** report pre-existing issues in untouched code.
18
+ 2. Finish your **independent** audit first (fresh eyes).
19
+ 3. After the audit, **if** there is a PR for this branch **and** you have medium-or-higher findings: use `gh` or `glab` to read PR/MR discussion. Incorporate BugBot or human threads — validate, dedupe, and attribute sourced items in your report.
20
+ 4. **Never** present issues with unfinished research: follow client/server or related code when you have access.
21
+
22
+ Calibrate severity honestly. Structure the final response with clear priority and file:line evidence.
23
+
24
+ Do **not** spawn nested subagents unless the user or parent explicitly asks.
25
+
26
+ ## Parent orchestration
27
+
28
+ Typical flow: run `git diff <base>...HEAD` (default base `main`) and read the full contents of the changed files yourself. Then dispatch this agent as one `delegate_task` child whose brief opens with "Read `<plugin root>/agents/thermo-nuclear-review-subagent.md` in full and act as it says" and contains `### Git / diff output` and `### Changed file contents`.
@@ -0,0 +1,17 @@
1
+ <EXTREMELY_IMPORTANT>
2
+ You have t3-pstack, pstack for T3 Code.
3
+
4
+ Invoke the `t3-pstack:poteto-mode` skill and follow its instructions when a task meets any of these:
5
+
6
+ - it touches more than one file, or changes a signature other files call
7
+ - it involves a design or architecture choice
8
+ - it is a bug whose cause is not yet known, or a performance issue
9
+
10
+ It routes to the right pstack skill from there. On Codex, open its SKILL.md whole, in a shell call of its own with `max_output_tokens: 10000`, since a smaller budget cuts out its middle. For smaller tasks, such as a contained change to one file with an obvious test, a question, or a one-line edit, work directly and verify on the real artifact.
11
+
12
+ When the intent is already specific, such as TDD, a design sketch, how or why something works, an arena, or an adversarial review, still enter through `t3-pstack:poteto-mode` and open that skill from the bundled path it names. The other pstack skills run only from poteto-mode or when the user types them.
13
+
14
+ This runs on T3: before the first subagent or panel in a session, read the model sheet, `~/.config/t3-pstack/models.md` (`$XDG_CONFIG_HOME/t3-pstack/models.md` when that is set), or `t3-pstack-models.md` in this host's config directory when that file is missing. This chat runs the playbook itself. A step it says to delegate goes through `delegate_task` to that role's sheet entry, and the reply lists which provider and model ran each step.
15
+
16
+ User instructions (CLAUDE.md, AGENTS.md, direct requests) take precedence. Other session-start mandates, such as superpowers, still apply. Their skill checks run as before, and when a task meets the criteria above they route implementation through poteto-mode.
17
+ </EXTREMELY_IMPORTANT>