pi-t3-bridge 0.0.0-stage → 0.2.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.
- package/LICENSE +23 -0
- package/README.md +272 -2
- package/bridge.ts +38 -0
- package/package.json +80 -4
- package/pstack/README.md +26 -0
- package/pstack/agents/comment-sicko.md +32 -0
- package/pstack/agents/poteto-agent.md +8 -0
- package/pstack/agents/thermo-nuclear-code-quality-review-subagent.md +23 -0
- package/pstack/agents/thermo-nuclear-review-subagent.md +28 -0
- package/pstack/hooks/session-start-context.md +17 -0
- package/pstack/models.json +261 -0
- package/pstack/skills/architect/SKILL.md +85 -0
- package/pstack/skills/architect/references/design-red-flags.md +57 -0
- package/pstack/skills/architect/references/rationale-template.md +35 -0
- package/pstack/skills/architect/references/runner-prompt.md +20 -0
- package/pstack/skills/arena/SKILL.md +55 -0
- package/pstack/skills/automate-me/SKILL.md +104 -0
- package/pstack/skills/benchmark-checklist/SKILL.md +39 -0
- package/pstack/skills/blast-radius/SKILL.md +50 -0
- package/pstack/skills/bro/SKILL.md +7 -0
- package/pstack/skills/correct/SKILL.md +32 -0
- package/pstack/skills/create-formal-verification-skill/SKILL.md +43 -0
- package/pstack/skills/create-verification-skill/SKILL.md +44 -0
- package/pstack/skills/create-verification-skill/references/feature-map-example/README.md +47 -0
- package/pstack/skills/create-verification-skill/references/feature-map-example/create-note.md +39 -0
- package/pstack/skills/create-verification-skill/references/feature-map-example/search.md +45 -0
- package/pstack/skills/deslop/SKILL.md +22 -0
- package/pstack/skills/figure-it-out/SKILL.md +52 -0
- package/pstack/skills/fix-ci/SKILL.md +29 -0
- package/pstack/skills/fix-merge-conflicts/SKILL.md +32 -0
- package/pstack/skills/get-pr-comments/SKILL.md +23 -0
- package/pstack/skills/how/SKILL.md +43 -0
- package/pstack/skills/how/references/explainer-prompt.md +55 -0
- package/pstack/skills/how/references/explorer-prompt.md +35 -0
- package/pstack/skills/in-your-own-words/SKILL.md +7 -0
- package/pstack/skills/interrogate/SKILL.md +37 -0
- package/pstack/skills/ketchup/SKILL.md +43 -0
- package/pstack/skills/ketchup-video/SKILL.md +29 -0
- package/pstack/skills/maintain-formal-verification-skill/SKILL.md +58 -0
- package/pstack/skills/maintain-verification-skill/SKILL.md +39 -0
- package/pstack/skills/make-pr-easy-to-review/SKILL.md +59 -0
- package/pstack/skills/no-comments/SKILL.md +24 -0
- package/pstack/skills/poteto-help/SKILL.md +162 -0
- package/pstack/skills/poteto-help/references/prompting.md +51 -0
- package/pstack/skills/poteto-help/references/recipes.md +51 -0
- package/pstack/skills/poteto-mode/SKILL.md +186 -0
- package/pstack/skills/poteto-mode/brief.md +70 -0
- package/pstack/skills/poteto-mode/playbooks/authoring-a-skill.md +12 -0
- package/pstack/skills/poteto-mode/playbooks/autonomous-run.md +13 -0
- package/pstack/skills/poteto-mode/playbooks/autopilot-full.md +25 -0
- package/pstack/skills/poteto-mode/playbooks/autopilot-stack.md +8 -0
- package/pstack/skills/poteto-mode/playbooks/babysit.md +23 -0
- package/pstack/skills/poteto-mode/playbooks/bug-fix.md +15 -0
- package/pstack/skills/poteto-mode/playbooks/eval.md +25 -0
- package/pstack/skills/poteto-mode/playbooks/feature.md +21 -0
- package/pstack/skills/poteto-mode/playbooks/hillclimb.md +21 -0
- package/pstack/skills/poteto-mode/playbooks/investigation.md +14 -0
- package/pstack/skills/poteto-mode/playbooks/multi-phase-plan.md +155 -0
- package/pstack/skills/poteto-mode/playbooks/opening-a-pr.md +34 -0
- package/pstack/skills/poteto-mode/playbooks/orchestrate.md +25 -0
- package/pstack/skills/poteto-mode/playbooks/pause-safely.md +10 -0
- package/pstack/skills/poteto-mode/playbooks/perf-issue.md +25 -0
- package/pstack/skills/poteto-mode/playbooks/prototype.md +14 -0
- package/pstack/skills/poteto-mode/playbooks/refactoring.md +16 -0
- package/pstack/skills/poteto-mode/playbooks/runtime-forensics.md +11 -0
- package/pstack/skills/poteto-mode/playbooks/session-pickup.md +11 -0
- package/pstack/skills/poteto-mode/playbooks/shipping.md +12 -0
- package/pstack/skills/poteto-mode/playbooks/trace-forensics.md +14 -0
- package/pstack/skills/poteto-mode/playbooks/visual-parity.md +11 -0
- package/pstack/skills/poteto-mode/playbooks/worktree-cleanup.md +12 -0
- package/pstack/skills/poteto-mode/references/bugbot-triage.md +142 -0
- package/pstack/skills/poteto-mode/references/licenses/LICENSE +23 -0
- package/pstack/skills/poteto-mode/references/licenses/LICENSE-cursor-team-kit +21 -0
- package/pstack/skills/poteto-mode/references/licenses/LICENSE-thermos +21 -0
- package/pstack/skills/poteto-mode/references/licenses/NOTICE.md +14 -0
- package/pstack/skills/poteto-mode/scripts/.prettierrc.json +3 -0
- package/pstack/skills/poteto-mode/scripts/bootstrap.ts +62 -0
- package/pstack/skills/poteto-mode/scripts/bun.lock +67 -0
- package/pstack/skills/poteto-mode/scripts/check-plan.mjs +205 -0
- package/pstack/skills/poteto-mode/scripts/package.json +12 -0
- package/pstack/skills/poteto-mode/scripts/resolve-codex-transcript +4 -0
- package/pstack/skills/poteto-mode/scripts/resolve-codex-transcript.ts +314 -0
- package/pstack/skills/poteto-mode/scripts/watch-pr/cli.ts +231 -0
- package/pstack/skills/poteto-mode/scripts/watch-pr/github.ts +760 -0
- package/pstack/skills/poteto-mode/scripts/watch-pr/policy.ts +1023 -0
- package/pstack/skills/poteto-mode/scripts/watch-pr/render.ts +188 -0
- package/pstack/skills/poteto-mode/scripts/watch-pr/settle.ts +406 -0
- package/pstack/skills/poteto-mode/scripts/watch-pr/tsconfig.json +18 -0
- package/pstack/skills/poteto-mode/scripts/watch-pr/types.compile.ts +93 -0
- package/pstack/skills/poteto-mode/scripts/watch-pr/types.ts +444 -0
- package/pstack/skills/poteto-mode/scripts/watch-pr/watch-pr +3 -0
- package/pstack/skills/poteto-mode/scripts/worktree-audit.sh +170 -0
- package/pstack/skills/principle-attack-the-premise/SKILL.md +21 -0
- package/pstack/skills/principle-boundary-discipline/SKILL.md +34 -0
- package/pstack/skills/principle-build-the-lever/SKILL.md +23 -0
- package/pstack/skills/principle-encode-lessons-in-structure/SKILL.md +11 -0
- package/pstack/skills/principle-exhaust-the-design-space/SKILL.md +9 -0
- package/pstack/skills/principle-experience-first/SKILL.md +19 -0
- package/pstack/skills/principle-explain-the-number/SKILL.md +18 -0
- package/pstack/skills/principle-fix-root-causes/SKILL.md +21 -0
- package/pstack/skills/principle-foundational-thinking/SKILL.md +21 -0
- package/pstack/skills/principle-guard-the-context-window/SKILL.md +12 -0
- package/pstack/skills/principle-laziness-protocol/SKILL.md +10 -0
- package/pstack/skills/principle-make-operations-idempotent/SKILL.md +22 -0
- package/pstack/skills/principle-migrate-callers-then-delete-legacy-apis/SKILL.md +14 -0
- package/pstack/skills/principle-minimize-reader-load/SKILL.md +18 -0
- package/pstack/skills/principle-model-the-domain/SKILL.md +24 -0
- package/pstack/skills/principle-never-block-on-the-human/SKILL.md +15 -0
- package/pstack/skills/principle-outcome-oriented-execution/SKILL.md +21 -0
- package/pstack/skills/principle-prove-it-works/SKILL.md +22 -0
- package/pstack/skills/principle-redesign-from-first-principles/SKILL.md +16 -0
- package/pstack/skills/principle-separate-before-serializing-shared-state/SKILL.md +16 -0
- package/pstack/skills/principle-sequence-verifiable-units/SKILL.md +17 -0
- package/pstack/skills/principle-subtract-before-you-add/SKILL.md +18 -0
- package/pstack/skills/principle-test-behavior-not-implementation/SKILL.md +20 -0
- package/pstack/skills/principle-type-system-discipline/SKILL.md +13 -0
- package/pstack/skills/recall/SKILL.md +35 -0
- package/pstack/skills/reflect/SKILL.md +86 -0
- package/pstack/skills/reflect/references/divergent-reviewer.md +38 -0
- package/pstack/skills/reflect/references/judgment-reviewer.md +37 -0
- package/pstack/skills/reflect/references/synthesizer.md +56 -0
- package/pstack/skills/reflect/references/tooling-reviewer.md +48 -0
- package/pstack/skills/reflect/scripts/find-transcript.mjs +245 -0
- package/pstack/skills/setup-pstack/SKILL.md +77 -0
- package/pstack/skills/setup-pstack/scripts/read-sheet.sh +14 -0
- package/pstack/skills/setup-pstack/scripts/t3-sheet.mjs +169 -0
- package/pstack/skills/sharpen/SKILL.md +16 -0
- package/pstack/skills/show-me-your-work/SKILL.md +82 -0
- package/pstack/skills/show-me-your-work/references/decision-log-template.tsv +1 -0
- package/pstack/skills/show-me-your-work/scripts/log.sh +42 -0
- package/pstack/skills/statechart/SKILL.md +82 -0
- package/pstack/skills/statechart/references/render.md +93 -0
- package/pstack/skills/statechart/scripts/backends/cfg.ts +33 -0
- package/pstack/skills/statechart/scripts/backends/mermaid.ts +201 -0
- package/pstack/skills/statechart/scripts/backends/plain-text.ts +72 -0
- package/pstack/skills/statechart/scripts/backends/report.ts +177 -0
- package/pstack/skills/statechart/scripts/frontends/config.ts +276 -0
- package/pstack/skills/statechart/scripts/frontends/dot.ts +74 -0
- package/pstack/skills/statechart/scripts/frontends/marks.ts +93 -0
- package/pstack/skills/statechart/scripts/frontends/messages.ts +52 -0
- package/pstack/skills/statechart/scripts/frontends/spec.ts +114 -0
- package/pstack/skills/statechart/scripts/frontends/trace.ts +24 -0
- package/pstack/skills/statechart/scripts/frontends/value.ts +166 -0
- package/pstack/skills/statechart/scripts/frontends/verdict.ts +40 -0
- package/pstack/skills/statechart/scripts/frontends/view.ts +119 -0
- package/pstack/skills/statechart/scripts/ir.ts +547 -0
- package/pstack/skills/statechart/scripts/package.json +11 -0
- package/pstack/skills/statechart/scripts/passes/annotate.ts +128 -0
- package/pstack/skills/statechart/scripts/passes/label.ts +269 -0
- package/pstack/skills/statechart/scripts/passes/lift.ts +85 -0
- package/pstack/skills/statechart/scripts/passes/loop-check.ts +68 -0
- package/pstack/skills/statechart/scripts/passes/paths.ts +60 -0
- package/pstack/skills/statechart/scripts/passes/reach.ts +135 -0
- package/pstack/skills/statechart/scripts/passes/region-check.ts +97 -0
- package/pstack/skills/statechart/scripts/passes/regions.ts +295 -0
- package/pstack/skills/statechart/scripts/pipeline.ts +76 -0
- package/pstack/skills/statechart/scripts/run.ts +481 -0
- package/pstack/skills/statechart/scripts/statechart +29 -0
- package/pstack/skills/statechart/scripts/statechart.ts +164 -0
- package/pstack/skills/statechart/scripts/tsconfig.json +11 -0
- package/pstack/skills/statechart/scripts/worker.ts +35 -0
- package/pstack/skills/swarm/SKILL.md +47 -0
- package/pstack/skills/tdd/SKILL.md +42 -0
- package/pstack/skills/teach/SKILL.md +21 -0
- package/pstack/skills/technical-writing/SKILL.md +106 -0
- package/pstack/skills/thermo-nuclear-code-quality-review/SKILL.md +192 -0
- package/pstack/skills/thermo-nuclear-review/SKILL.md +51 -0
- package/pstack/skills/thermos/SKILL.md +21 -0
- package/pstack/skills/typescript-best-practices/SKILL.md +31 -0
- package/pstack/skills/typescript-best-practices/references/patterns.md +328 -0
- package/pstack/skills/unslop/SKILL.md +62 -0
- package/pstack/skills/what-did-i-get-done/SKILL.md +31 -0
- package/pstack/skills/why/SKILL.md +105 -0
- package/pstack/skills/why/references/epistemics.md +71 -0
- package/pstack/skills/why/references/investigator-prompt.md +84 -0
- package/pstack/skills/why/references/source-playbook.md +17 -0
- package/pstack/skills/why/references/sources/code-archaeology.md +51 -0
- package/pstack/skills/why/references/sources/databricks.md +70 -0
- package/pstack/skills/why/references/sources/datadog.md +97 -0
- package/pstack/skills/why/references/sources/incident-postmortem.md +5 -0
- package/pstack/skills/why/references/sources/linear.md +48 -0
- package/pstack/skills/why/references/sources/notion.md +55 -0
- package/pstack/skills/why/references/sources/sentry.md +66 -0
- package/pstack/skills/why/references/sources/slack.md +17 -0
- package/pstack/skills/why/references/synthesizer-prompt.md +129 -0
- package/pstack.ts +34 -0
- package/src/bridge/accounts.ts +576 -0
- package/src/bridge/ask.ts +389 -0
- package/src/bridge/bash-timeout.ts +62 -0
- package/src/bridge/bridge-trim.ts +109 -0
- package/src/bridge/cards.ts +131 -0
- package/src/bridge/claim.ts +48 -0
- package/src/bridge/config.ts +116 -0
- package/src/bridge/failures.ts +87 -0
- package/src/bridge/plan.ts +267 -0
- package/src/bridge/resume.ts +143 -0
- package/src/bridge/skills.ts +120 -0
- package/src/bridge/state.ts +167 -0
- package/src/bridge/steer-judge.ts +279 -0
- package/src/bridge/steer-mast.json +129 -0
- package/src/bridge/steer-questions.json +35 -0
- package/src/bridge/steer-transcript.ts +232 -0
- package/src/bridge/steer.ts +491 -0
- package/src/bridge/t3-http.ts +140 -0
- package/src/bridge/t3-json.ts +50 -0
- package/src/bridge/t3-mcp.ts +188 -0
- package/src/bridge/tasks.ts +163 -0
- package/src/bridge/thread.ts +38 -0
- package/src/bridge/transcript.ts +65 -0
- package/src/bridge/usage.ts +190 -0
- package/src/pstack/brief.ts +278 -0
- package/src/pstack/child.ts +539 -0
- package/src/pstack/models.ts +791 -0
- package/src/pstack/resources.ts +30 -0
- package/src/pstack/results.ts +51 -0
- 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,273 @@
|
|
|
1
|
-
#
|
|
1
|
+
# pi-t3-bridge
|
|
2
2
|
|
|
3
|
-
|
|
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
|
+
The child sandbox uses the macOS `sandbox-exec` command, so the shell sandbox for delegated children works on macOS only.
|
|
29
|
+
|
|
30
|
+
## Install
|
|
31
|
+
|
|
32
|
+
Install the package with Pi:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
pi install npm:pi-t3-bridge
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
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`.
|
|
39
|
+
|
|
40
|
+
## What is in the package
|
|
41
|
+
|
|
42
|
+
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.
|
|
43
|
+
|
|
44
|
+
```text
|
|
45
|
+
pi-t3-bridge/
|
|
46
|
+
├── bridge.ts # extension 1: connects Pi to T3 Code
|
|
47
|
+
├── pstack.ts # extension 2: adds pstack skills and model routing
|
|
48
|
+
├── src/
|
|
49
|
+
│ ├── bridge/ # code for bridge.ts
|
|
50
|
+
│ └── pstack/ # code for pstack.ts
|
|
51
|
+
└── pstack/ # upstream pstack skills, agents, and model defaults
|
|
52
|
+
├── skills/
|
|
53
|
+
├── agents/
|
|
54
|
+
└── models.json
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
To load only the bridge, list the package in `~/.pi/agent/settings.json` in its object form:
|
|
58
|
+
|
|
59
|
+
```json
|
|
60
|
+
{
|
|
61
|
+
"packages": [
|
|
62
|
+
{
|
|
63
|
+
"source": "npm:pi-t3-bridge",
|
|
64
|
+
"extensions": ["bridge.ts"]
|
|
65
|
+
}
|
|
66
|
+
]
|
|
67
|
+
}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## The bridge extension
|
|
71
|
+
|
|
72
|
+
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.
|
|
73
|
+
|
|
74
|
+
| Name | Kind | What it does |
|
|
75
|
+
| --- | --- | --- |
|
|
76
|
+
| `tasks` | tool | Publishes the task list for the run as a card in the chat. |
|
|
77
|
+
| `plan` | tool | Shows a plan card with Approve, Revise, and Cancel buttons. |
|
|
78
|
+
| `ask` | tool | Asks you one or more questions as cards and waits for your answers. |
|
|
79
|
+
| `transcript` | tool | Returns the session file and session ID, for workflows that read the transcript. |
|
|
80
|
+
| `/t3-usage` | command | Shows the cost of the thread and its children, the cache hit rate, and which model families are out of usage. |
|
|
81
|
+
| `/t3-transcript` | command | Records the transcript reference and shows the session file path. |
|
|
82
|
+
| `/t3-exhausted <family> [reset time]` | command | Marks a model family as out of usage for every chat on the machine. |
|
|
83
|
+
| `/t3-recovered <family>` | command | Marks a model family as usable again for every chat on the machine. |
|
|
84
|
+
|
|
85
|
+
### Plan mode
|
|
86
|
+
|
|
87
|
+
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.
|
|
88
|
+
|
|
89
|
+
```mermaid
|
|
90
|
+
stateDiagram-v2
|
|
91
|
+
[*] --> open
|
|
92
|
+
open --> planning: T3 enters Plan mode
|
|
93
|
+
planning --> awaiting: agent calls plan
|
|
94
|
+
awaiting --> approved: you pick Approve
|
|
95
|
+
awaiting --> revising: you pick Revise
|
|
96
|
+
awaiting --> cancelled: you pick Cancel
|
|
97
|
+
revising --> awaiting: agent calls plan again
|
|
98
|
+
cancelled --> open: you send a new message
|
|
99
|
+
approved --> [*]: write tools run again
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### Calls to T3 from outside T3
|
|
103
|
+
|
|
104
|
+
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.
|
|
105
|
+
|
|
106
|
+
```text
|
|
107
|
+
on(session start)
|
|
108
|
+
if Pi runs inside a T3 thread
|
|
109
|
+
use the tools T3 already gives the thread
|
|
110
|
+
else
|
|
111
|
+
connect to http://127.0.0.1:3773/mcp
|
|
112
|
+
hide the tools that only work inside a T3 thread
|
|
113
|
+
every 3 seconds, update the status bar
|
|
114
|
+
"connected, N tools"
|
|
115
|
+
"offline, start T3 Code"
|
|
116
|
+
"not signed in, run /mcp login t3"
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### Usage limits and resume
|
|
120
|
+
|
|
121
|
+
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.
|
|
122
|
+
|
|
123
|
+
```mermaid
|
|
124
|
+
sequenceDiagram
|
|
125
|
+
participant Parent as Parent thread
|
|
126
|
+
participant Bridge
|
|
127
|
+
participant T3
|
|
128
|
+
participant Child as Child thread
|
|
129
|
+
Parent->>T3: delegate_task (Claude)
|
|
130
|
+
T3->>Child: start
|
|
131
|
+
Child-->>T3: usage limit reached
|
|
132
|
+
T3-->>Bridge: task failed
|
|
133
|
+
Bridge->>Bridge: mark claude as out until the reset
|
|
134
|
+
Parent->>T3: delegate_task (next family)
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### Shell timeout
|
|
138
|
+
|
|
139
|
+
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.
|
|
140
|
+
|
|
141
|
+
### Stop checks
|
|
142
|
+
|
|
143
|
+
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:
|
|
144
|
+
|
|
145
|
+
- Stuck in a loop
|
|
146
|
+
- Doesn't know when to stop
|
|
147
|
+
- Wandered off
|
|
148
|
+
- Broke the brief, and says one thing but does another
|
|
149
|
+
|
|
150
|
+
```text
|
|
151
|
+
on(run about to stop)
|
|
152
|
+
ask the classifier how the run ended
|
|
153
|
+
if the classifier is down or takes more than 5 seconds
|
|
154
|
+
let the run stop
|
|
155
|
+
if the agent gave up partway and fewer than 2 notes were sent for this prompt
|
|
156
|
+
add a note
|
|
157
|
+
continue for one more turn
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
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.
|
|
161
|
+
|
|
162
|
+
## The pstack extension
|
|
163
|
+
|
|
164
|
+
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/`.
|
|
165
|
+
|
|
166
|
+
### Model routing
|
|
167
|
+
|
|
168
|
+
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`.
|
|
169
|
+
|
|
170
|
+
```text
|
|
171
|
+
pstack_model(role, job, size)
|
|
172
|
+
if the model sheet names a model for the role
|
|
173
|
+
use that model
|
|
174
|
+
else
|
|
175
|
+
look up the job and size in the routing table
|
|
176
|
+
if that model's family is out of usage
|
|
177
|
+
use the same tier in the next family
|
|
178
|
+
(GPT takes only size S work)
|
|
179
|
+
return the target for delegate_task
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
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.
|
|
183
|
+
|
|
184
|
+
| Job | Size S | Size M |
|
|
185
|
+
| --- | --- | --- |
|
|
186
|
+
| `mechanical`, such as a lint fix or rename | Haiku 5.5, low | Sonnet 5.5, medium |
|
|
187
|
+
| `check`, which runs given commands | GPT 6 Luna, low | Haiku 5.5, medium |
|
|
188
|
+
| `research`, which writes one notes file | Muse Spark 1.3, medium | Muse Wonder 1.0, medium |
|
|
189
|
+
| `implement`, one unit with named tests | GPT 6.1 Sol, medium | Sonnet 5.5, high |
|
|
190
|
+
| `hard`, such as concurrency or a bug with an unknown cause | Opus 5.5, high | Opus 5.5, high |
|
|
191
|
+
| `review` panel | Opus 5.5, Muse Wonder Full 1.0, and GPT 6.1 Sol, all high | same |
|
|
192
|
+
| `design` panel | Opus 5.5, Muse Wonder Full 1.0, and GPT 6 Astra, all high | same |
|
|
193
|
+
|
|
194
|
+
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`.
|
|
195
|
+
|
|
196
|
+
### Limits for delegated children
|
|
197
|
+
|
|
198
|
+
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.
|
|
199
|
+
|
|
200
|
+
```mermaid
|
|
201
|
+
sequenceDiagram
|
|
202
|
+
participant Parent as Parent thread
|
|
203
|
+
participant T3
|
|
204
|
+
participant Child as Child thread (pi-t3-bridge)
|
|
205
|
+
Parent->>T3: delegate_task with a brief
|
|
206
|
+
T3->>Child: start with the brief
|
|
207
|
+
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
|
|
208
|
+
Child->>Child: write report from commands it ran itself
|
|
209
|
+
Child-->>T3: final message
|
|
210
|
+
Child->>Child: append report to the ledger
|
|
211
|
+
Parent->>T3: task_status
|
|
212
|
+
T3-->>Parent: result
|
|
213
|
+
Note over Parent: the extension adds the report from the ledger
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
## Configuration
|
|
217
|
+
|
|
218
|
+
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.
|
|
219
|
+
|
|
220
|
+
```json
|
|
221
|
+
{
|
|
222
|
+
"bashTimeoutSeconds": 300,
|
|
223
|
+
"mcpUrl": "http://127.0.0.1:3773/mcp",
|
|
224
|
+
"steer": "on"
|
|
225
|
+
}
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
| Key | Default | Meaning |
|
|
229
|
+
| --- | --- | --- |
|
|
230
|
+
| `bashTimeoutSeconds` | `300` | The longest a shell command can run, in seconds. |
|
|
231
|
+
| `mcpUrl` | `http://127.0.0.1:3773/mcp` | The T3 MCP endpoint to use outside a T3 thread. |
|
|
232
|
+
| `steer` | `"on"` | The stop checks, as `"on"`, `"shadow"`, or `"off"`. |
|
|
233
|
+
|
|
234
|
+
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`.
|
|
235
|
+
|
|
236
|
+
```text
|
|
237
|
+
~/.config/
|
|
238
|
+
├── pi-t3/config.json # bridge settings
|
|
239
|
+
└── pi-t3-bridge/models.md # model sheet, written by setup-pstack
|
|
240
|
+
~/.local/state/pi-t3/
|
|
241
|
+
├── accounts.json # model families that are out of usage
|
|
242
|
+
├── ledger.jsonl # one line per delegated brief: cost and report
|
|
243
|
+
└── steer.jsonl # one line per stop check verdict, with no transcript text
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
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.
|
|
247
|
+
|
|
248
|
+
## Data handling
|
|
249
|
+
|
|
250
|
+
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.
|
|
251
|
+
|
|
252
|
+
## Development
|
|
253
|
+
|
|
254
|
+
The repository uses npm, and the following commands check the code:
|
|
255
|
+
|
|
256
|
+
```bash
|
|
257
|
+
npm install
|
|
258
|
+
npm test # node:test suites for the bridge and the pstack scripts
|
|
259
|
+
npm run typecheck
|
|
260
|
+
npm run check # Ultracite lint and format check
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
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/`.
|
|
264
|
+
|
|
265
|
+
## License
|
|
266
|
+
|
|
267
|
+
The package is under the MIT license. The copyright holders include the following people and companies:
|
|
268
|
+
|
|
269
|
+
- Lauren Tan, for the original pstack
|
|
270
|
+
- Cursor, for the imported cursor-team-kit and thermos skills
|
|
271
|
+
- Christian Bager Bach Houmann, for the T3 changes in t3-pstack
|
|
272
|
+
|
|
273
|
+
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,82 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-t3-bridge",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.2.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
|
+
"typebox": "1.3.27",
|
|
57
|
+
"typescript": "^7.0.2",
|
|
58
|
+
"ultracite": "^8.0.1"
|
|
59
|
+
},
|
|
60
|
+
"peerDependencies": {
|
|
61
|
+
"@earendil-works/pi-ai": "*",
|
|
62
|
+
"@earendil-works/pi-coding-agent": "*",
|
|
63
|
+
"typebox": "*"
|
|
64
|
+
},
|
|
65
|
+
"peerDependenciesMeta": {
|
|
66
|
+
"@earendil-works/pi-coding-agent": {
|
|
67
|
+
"optional": true
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"engines": {
|
|
71
|
+
"node": ">=22.19.0"
|
|
72
|
+
},
|
|
73
|
+
"pi": {
|
|
74
|
+
"extensions": [
|
|
75
|
+
"./bridge.ts",
|
|
76
|
+
"./pstack.ts"
|
|
77
|
+
]
|
|
78
|
+
},
|
|
79
|
+
"upstreams": {
|
|
80
|
+
"t3": "0.1.5-nightly.20261029.3877"
|
|
81
|
+
}
|
|
82
|
+
}
|
package/pstack/README.md
ADDED
|
@@ -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>
|