From ca54375517acbf333522e6c315c0568581c65484 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20M=2E=20Wo=C5=BAniak?= Date: Sat, 31 Oct 2026 12:55:00 +0100 Subject: [PATCH] Use T3's browser for requested browser work and background waits for post-merge events --- .claude-plugin/marketplace.json | 2 +- package.json | 2 +- plugins/pstack/.claude-plugin/plugin.json | 2 +- plugins/pstack/.codex-plugin/plugin.json | 2 +- plugins/pstack/skills/poteto-mode/references/t3-adapter.md | 3 ++- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 3915f6f..3861292 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -9,7 +9,7 @@ "name": "pstack", "source": "./plugins/pstack", "description": "Cursor pstack for T3 Code: poteto-mode, principles, and the verified agent workflows, adapted to T3 orchestration for Claude and Codex.", - "version": "0.13.3", + "version": "0.13.4", "author": { "name": "Lauren Tan (pstack), pmwoz (T3 Code port)" }, diff --git a/package.json b/package.json index 8c44bce..824ebf8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "t3-pstack", - "version": "0.13.3", + "version": "0.13.4", "private": true, "type": "module", "scripts": { diff --git a/plugins/pstack/.claude-plugin/plugin.json b/plugins/pstack/.claude-plugin/plugin.json index 159c561..5698561 100644 --- a/plugins/pstack/.claude-plugin/plugin.json +++ b/plugins/pstack/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "name": "pstack", "displayName": "pstack", - "version": "0.13.3", + "version": "0.13.4", "description": "Cursor pstack for T3 Code: poteto-mode, principles, and the verified agent workflows, adapted to T3 orchestration for Claude and Codex.", "author": { "name": "Lauren Tan (pstack), pmwoz (T3 Code port)" diff --git a/plugins/pstack/.codex-plugin/plugin.json b/plugins/pstack/.codex-plugin/plugin.json index b559125..981c3c0 100644 --- a/plugins/pstack/.codex-plugin/plugin.json +++ b/plugins/pstack/.codex-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "pstack", - "version": "0.13.3", + "version": "0.13.4", "description": "Cursor pstack for T3 Code: poteto-mode, principles, and the verified agent workflows, adapted to T3 orchestration for Claude and Codex.", "author": { "name": "Lauren Tan (pstack), pmwoz (T3 Code port)" diff --git a/plugins/pstack/skills/poteto-mode/references/t3-adapter.md b/plugins/pstack/skills/poteto-mode/references/t3-adapter.md index df1bc67..66c974a 100644 --- a/plugins/pstack/skills/poteto-mode/references/t3-adapter.md +++ b/plugins/pstack/skills/poteto-mode/references/t3-adapter.md @@ -19,6 +19,7 @@ A skill that names another one ("the **how** skill", "run `/deslop`", "the **pro - Principle skills live at `skills/principle-/SKILL.md`. - `deslop`, `control-ui`, and `control-cli` come from Cursor's team kit and ship in `skills/`. - The control skill for native mobile ("whatever simulator-driving skill the repo has") is T3's device tools when the session has them, driven as T3's device instructions say. A repo skill for the simulator still gives the build, install, and launch-prep steps. Save evidence screenshots and recordings into the work dir (Worktrees section) with the `agent-device` command that `device_open` returns. +- The control skill for a web UI (`control-ui`) is T3's browser when the current request asks for browser work, such as checking the change in a browser, screenshots, or a video of it. Drive `preview_*` as T3's browser instructions say instead of building a harness. Save each screenshot with `preview_snapshot` and `save: true`, and copy it and the file that `preview_recording_stop` returns into the work dir. Without such a request, T3 forbids `preview_*` for your own edit, so `control-ui` builds its local harness as written. - A user who types `/pstack:` (Claude) or `$pstack:` (Codex) starts the skill directly. That path is unchanged. - A `create-skill` step uses the `skill-creator` skill when the session has it. Otherwise follow `playbooks/authoring-a-skill.md`. @@ -92,7 +93,7 @@ T3 has no cloud agents. Every lane is a `delegate_task` child on this machine or - **`/loop` around a PR.** This covers babysit drive and background, shipping, orchestrate's PR and CI event subscriptions, and autonomous-run events. The root calls `watch_pull_request` and ends the turn. T3 wakes it on checks, reviews, and conflicts. On each wake, take the verdict from `/skills/poteto-mode/scripts/watch-pr/watch-pr --status-only --pr `, run in the PR's checkout (or the playbook's `origin` or `gh pr view` read), act, and keep the watch armed across push waves. Call `unwatch_pull_request` before handing back to the user. `scripts/watch-pr` stays the verdict oracle. - **`/loop` on a fixed cadence** (`/loop 1h`, audit ticks, heartbeats). The root calls `schedule_task` with `{type: "interval", everyMs: 3600000}` bound to its own thread, reports `nextRunAt`, and calls `delete_scheduled_task` when the run closes. Schedule from the root, because a child's schedule posts into the child's thread. - **`/loop until X`** with no outside event: keep iterating within the run. Add a schedule only when the work must survive turn ends. -- **Events a PR watch cannot see.** T3 refuses to watch a PR that is already merged, and it cannot watch a ref, a branch without a PR, or a post-merge CI run. For these (an autonomous run waiting on a ref) and for a heartbeat fallback, the root calls `schedule_task` with an interval bound to its own thread. The prompt states the check and the exit condition. Call `delete_scheduled_task` once the condition holds. +- **Events a PR watch cannot see.** T3 refuses to watch a PR that is already merged, and it cannot watch a ref, a branch without a PR, or a post-merge CI run. On Claude, wait on an event that a command can wait for, such as a post-merge CI run (`gh run watch --exit-status`) or a deploy (its CLI's wait command), by running that command as a long shell command (Claude item below). For an event no command waits on (an autonomous run waiting on a ref), on Codex, and for a heartbeat fallback, the root calls `schedule_task` with an interval bound to its own thread. The prompt states the check and the exit condition. Call `delete_scheduled_task` once the condition holds. - **Long shell commands on Claude.** Run a long command, such as a gate, a test suite, or a build, with `run_in_background` and end the turn. Its exit wakes you, and so does each delegated task that finishes. Before you end the turn, pass the task ID that Claude Code shows when the command starts to `t3_background_wait`. The thread then stays in the user's Working list instead of their inbox, T3 does not settle it while the command runs, and a T3 restart that kills the command wakes you with a note. Mark only a command whose result you will act on, never a dev server or a watcher you leave running. Do not wait in a foreground loop while children run, because a child's completion can stay queued until your turn ends. A command you start with `run_in_background` already wakes you when it exits, so do not add a waiter loop for it. Use an `until [ -s x.exit ]` loop, itself run with `run_in_background`, only for an exit file that a process you did not start that way writes. A foreground call stops at 600000 ms whatever its `timeout`. The pstack hook blocks a foreground `until` or `while` loop that sleeps. - **Long shell commands on Codex.** Never end a turn that waits only on a background shell command. It dies when the user settles the thread or the session ends, and then nothing wakes you. Write the reply first. Report what is still pending as a next step. - **Stacks.** `list_thread_pull_requests` reports linked PRs and their stack chains.