pstack-claude-mirror 0.9.133 → 0.9.134
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/.claude-plugin/marketplace.json +1 -1
- package/CHANGES.md +8 -0
- package/README.md +23 -7
- package/UPSTREAM-README.md +6 -0
- package/bin/pstack-claude.mjs +278 -130
- package/docs/reference.md +4 -4
- package/package.json +27 -9
- package/plugins/pstack/.antigravity-plugin/plugin.json +1 -1
- package/plugins/pstack/.claude-plugin/plugin.json +1 -1
- package/plugins/pstack/.codex-plugin/plugin.json +1 -1
- package/plugins/pstack/.github/plugin/plugin.json +1 -1
- package/plugins/pstack/.grok-plugin/plugin.json +1 -1
- package/plugins/pstack/.muse-plugin/plugin.json +1 -1
- package/plugins/pstack/LICENSE +22 -0
- package/plugins/pstack/hooks/copilot-hooks.json +4 -2
- package/plugins/pstack/hooks/session-start.ps1 +76 -12
- package/plugins/pstack/hooks/session-start.sh +6 -0
- package/plugins/pstack/models.json +1 -1
- package/plugins/pstack/package.json +1 -1
- package/plugins/pstack/pi/slash.ts +19 -5
- package/plugins/pstack/skills/poteto-mode/SKILL.md +1 -0
- package/plugins/pstack/skills/poteto-mode/playbooks/bug-fix.md +17 -0
- package/plugins/pstack/skills/poteto-mode/references/agy-tools.md +5 -4
- package/plugins/pstack/skills/poteto-mode/references/codex-tools.md +3 -2
- package/plugins/pstack/skills/poteto-mode/references/copilot-tools.md +2 -1
- package/plugins/pstack/skills/poteto-mode/references/pi-tools.md +1 -1
- package/plugins/pstack/skills/poteto-mode/scripts/.prettierignore +1 -1
- package/plugins/pstack/skills/poteto-mode/scripts/codex-session-effort.mjs +35 -7
- package/plugins/pstack/skills/poteto-mode/scripts/watch-pr/github.port.test.ts +427 -0
- package/plugins/pstack/skills/poteto-mode/scripts/watch-pr/github.test.ts +3 -399
- package/plugins/pstack/skills/poteto-mode/scripts/watch-pr/policy.port.test.ts +708 -0
- package/plugins/pstack/skills/poteto-mode/scripts/watch-pr/policy.test.ts +7 -666
- package/plugins/pstack/skills/setup-pstack/SKILL.md +6 -4
- package/plugins/pstack/skills/setup-pstack/references/runtimes.md +1 -1
- package/tools/forks.json +5 -5
package/docs/reference.md
CHANGED
|
@@ -62,7 +62,7 @@ All runtimes share [one skills tree](../plugins/pstack/skills/). A skills-only i
|
|
|
62
62
|
| --- | --- |
|
|
63
63
|
| Claude Code | Install the marketplace plugin (Claude Code 2.1.292 or later). Skills use Claude tool names and model defaults; the plugin installs automatic routing. |
|
|
64
64
|
| Codex | Install the native plugin through the repository's marketplace and trust its hook through `/hooks`. The [Codex mapping](../plugins/pstack/skills/poteto-mode/references/codex-tools.md) translates Claude tools and model names. Shared skill symlinks were also detected in a live session. |
|
|
65
|
-
| Pi | Install the repository as a Pi package with `pi install`. The [Pi extension](../plugins/pstack/pi/index.ts) registers the subagent, question, and wake-up tools and `/loop`, and the [Pi mapping](../plugins/pstack/skills/poteto-mode/references/pi-tools.md) translates Claude tools and model names. The [equivalence table](pi-equivalence.md) records each Claude Code mechanism and how it was verified on Pi 1.1. |
|
|
65
|
+
| Pi | Install the repository as a Pi package with `pi install`. The [Pi extension](../plugins/pstack/pi/index.ts) registers the subagent, question, and wake-up tools and `/loop`, and the [Pi mapping](../plugins/pstack/skills/poteto-mode/references/pi-tools.md) translates Claude tools and model names. The [equivalence table](pi-equivalence.md) records each Claude Code mechanism and how it was verified on Pi 1.5.1. |
|
|
66
66
|
| GitHub Copilot | Install the plugin through the repository's marketplace; the CLI and the GitHub Copilot app share it. The [Copilot mapping](../plugins/pstack/skills/poteto-mode/references/copilot-tools.md) translates Claude tools, paths, and model roles, and maps app-only tools to CLI fallbacks. Install, routing, agent dispatch, and first-run setup are smoke-tested on the CLI; see [GitHub Copilot](#github-copilot). |
|
|
67
67
|
| Muse | Install the native plugin bundle with `muse plugins install`, then approve its hooks and agent definitions with `muse plugins approve pstack`. The [Muse mapping](../plugins/pstack/skills/poteto-mode/references/muse-tools.md) translates Claude tools, subagents, transcripts, and model roles. See [Muse](#muse). |
|
|
68
68
|
| OMP | Install through the marketplace as described in the [README](../README.md#install). The [OMP mapping](../plugins/pstack/skills/poteto-mode/references/omp-tools.md) covers tools and model roles. On OMP 18.16.0, installation from a local marketplace, skill access, and the routing toggle were verified with a synthetic provider; model compliance has not been tested. |
|
|
@@ -78,7 +78,7 @@ These checks cover skill discovery. Delegation remains unverified on Prime Agent
|
|
|
78
78
|
|
|
79
79
|
### Automatic routing
|
|
80
80
|
|
|
81
|
-
The Claude Code, Codex, and GitHub Copilot plugins load the same short [routing instruction](../plugins/pstack/hooks/session-start-context.md) on startup, resume, clear, and compact. The Kimi plugin contributes that instruction to the system prompt while enabled, with the limitations in its [mapping](../plugins/pstack/skills/poteto-mode/references/kimi-tools.md). The Muse plugin loads its [Muse wording](../plugins/pstack/hooks/session-start-muse.md) of the same instruction. MiniMax Code runs the Claude Code hook, which finds `MINIMAX_PLUGIN_ROOT` and loads the [MiniMax Code wording](../plugins/pstack/hooks/session-start-minimax.md) instead. The [POSIX hook](../plugins/pstack/hooks/session-start.sh) runs on Claude Code, POSIX Codex, and GitHub Copilot, where it prints the instruction as JSON `additionalContext` with a Copilot addendum, and on Muse, where it prints plain text. On Windows, Codex runs a [PowerShell adapter](../plugins/pstack/hooks/session-start.ps1) through its `commandWindows` override, and Muse runs the same adapter as a second SessionStart hook, so
|
|
81
|
+
The Claude Code, Codex, and GitHub Copilot plugins load the same short [routing instruction](../plugins/pstack/hooks/session-start-context.md) on startup, resume, clear, and compact. The Kimi plugin contributes that instruction to the system prompt while enabled, with the limitations in its [mapping](../plugins/pstack/skills/poteto-mode/references/kimi-tools.md). The Muse plugin loads its [Muse wording](../plugins/pstack/hooks/session-start-muse.md) of the same instruction. MiniMax Code runs the Claude Code hook, which finds `MINIMAX_PLUGIN_ROOT` and loads the [MiniMax Code wording](../plugins/pstack/hooks/session-start-minimax.md) instead. The [POSIX hook](../plugins/pstack/hooks/session-start.sh) runs on Claude Code, POSIX Codex, and POSIX GitHub Copilot, where it prints the instruction as JSON `additionalContext` with a Copilot addendum, and on Muse, where it prints plain text. On Windows, Codex runs a [PowerShell adapter](../plugins/pstack/hooks/session-start.ps1) through its `commandWindows` override, GitHub Copilot runs it through its `powershell` override, and Muse runs the same adapter as a second SessionStart hook, so none of them requires Bash. The adapter runs with `-ExecutionPolicy Bypass`, which a machine or user execution policy set by Group Policy overrides; on such machines the hook fails and no instruction loads. Codex requires the user to trust plugin hooks through `/hooks`. On OMP, the marketplace plugin adds its routing instruction before each main-agent turn; the global `session hook: off` setting disables it. On Pi, the [extension](../plugins/pstack/pi/prompt.ts) adds the same instruction to the system prompt at every agent start, so it survives compaction. The [OpenCode plugin](../plugins/pstack/opencode/index.js) adds its [routing instruction](../plugins/pstack/hooks/session-start-opencode.md) at each model step in root sessions, including after compaction. The instruction invokes `poteto-mode` when a task meets any of these conditions:
|
|
82
82
|
|
|
83
83
|
- It touches more than one file or changes a signature other files call.
|
|
84
84
|
- It involves a design or architecture choice.
|
|
@@ -86,7 +86,7 @@ The Claude Code, Codex, and GitHub Copilot plugins load the same short [routing
|
|
|
86
86
|
|
|
87
87
|
Smaller tasks proceed directly. The full skill loads when invoked, and explicit user instructions take precedence.
|
|
88
88
|
|
|
89
|
-
To disable routing on runtimes that support the session hook setting, run `setup-pstack` and turn it off, or write `session hook: off` in the runtime's sheet at the path in [setup-pstack's runtime table](../plugins/pstack/skills/setup-pstack/references/runtimes.md). In Claude Code, use `/pstack:setup-pstack`. Without the setting, routing stays on. On OMP this setting applies across profiles. On Kimi, disable the plugin to stop its routing instruction. Grok's routing hint is not controlled by the session hook setting.
|
|
89
|
+
To disable routing on runtimes that support the session hook setting, run `setup-pstack` and turn it off, or write `session hook: off` in the runtime's sheet at the path in [setup-pstack's runtime table](../plugins/pstack/skills/setup-pstack/references/runtimes.md). In Claude Code, use `/pstack:setup-pstack`. On Claude Code, a project's committed `.claude/pstack-models.md` replaces the user's sheet in that project, so `session hook: off` there turns routing off for that project alone. Without the setting, routing stays on. On OMP this setting applies across profiles. On Kimi, disable the plugin to stop its routing instruction. Grok's routing hint is not controlled by the session hook setting.
|
|
90
90
|
|
|
91
91
|
Skills-only installs and other runtimes do not include these integrations. Request `poteto-mode` explicitly, or add a standing instruction to the runtime's instruction file.
|
|
92
92
|
|
|
@@ -147,7 +147,7 @@ Family names such as `opus` resolve through the `pi` block of [`models.json`](..
|
|
|
147
147
|
|
|
148
148
|
The Copilot CLI reads the Claude Code [marketplace](../.claude-plugin/marketplace.json). For the plugin it looks for `.github/plugin/plugin.json` before `.claude-plugin/plugin.json`, so pstack ships a [Copilot manifest](../plugins/pstack/.github/plugin/plugin.json) whose `hooks` field names [`hooks/copilot-hooks.json`](../plugins/pstack/hooks/copilot-hooks.json). Copilot then skips the Claude Code `hooks/hooks.json`, so each hook runs once, and Claude Code keeps reading its own manifest. The GitHub Copilot app loads plugins installed into `~/.copilot`; a manual app check of routing, first-run setup, agent dispatch, `session hook: off`, and the app-only tools passed on 2026-09-25. To try a local checkout, pass its absolute path to `copilot plugin marketplace add`. Skills load by bare name through the `skill` tool, and a user types `/pstack:<skill>` in the CLI prompt; the agents keep their prefix, `pstack:poteto-agent` and `pstack:comment-sicko`.
|
|
149
149
|
|
|
150
|
-
Copilot's hook file runs the [SessionStart hook](../plugins/pstack/hooks/session-start.sh) with the `copilot` argument. It prints JSON `additionalContext`: the routing instruction plus a [Copilot addendum](../plugins/pstack/hooks/session-start-copilot.md). It reads the model sheet, which sits outside Copilot's path sandbox, and checks it with the [same POSIX `awk` validator](../plugins/pstack/skills/setup-pstack/scripts/sheet.awk) that `setup-pstack` runs through `check-sheet.sh` after it writes the sheet. A valid sheet adds one line per known role, rebuilt from the checked values, so no other sheet text reaches the context. An invalid sheet adds `sheet invalid:` with each problem, and a missing sheet adds a note; both tell the session to run `setup-pstack` first. A second hook, [`pre-tool-use.sh`](../plugins/pstack/hooks/pre-tool-use.sh) with the matcher `view|task|bash`, does three things on Copilot. It approves reads inside the plugin directory so playbooks and references load without a path-access prompt. It approves registered scripts with their declared argument contracts and matching interpreters, using a strict command form with no shell metacharacters. It checks path operands separately from prose fields; unknown scripts and argument forms take the normal permission flow. Setup, SessionStart, and PreToolUse share one sheet decoder, including UTF-16LE support. While the sheet is valid, it denies a `pstack:*` `task` call whose `model` is not one of the saved choices, with the saved IDs in the reason. It stays silent on everything else and always exits 0, because Copilot denies a tool call when the hook fails; an `awk` error still reaches stderr. Copilot runs plugin hooks on every session start, so the Claude matcher does not apply. The hook runs lazily, after the first message is submitted and before the first model turn, including when that message is a slash command such as `/pstack:arena`. A resumed session runs it again with source `resume`, and the model still sees one routing block. On CLI 1.0.87 through 1.0.92, the context of several plugins' session-start hooks merges ([github/copilot-cli#3589](https://github.com/github/copilot-cli/issues/3589) reported that only the last one survived). If a version drops the merge, use the standing instruction from `setup-pstack`. On 1.0.92, when the CLI's cached experiment assignment turns on computer use, `-p` sessions load no plugin skills while interactive sessions still do; the smoke test clears that cache before each `-p` probe.
|
|
150
|
+
Copilot's hook file runs the [SessionStart hook](../plugins/pstack/hooks/session-start.sh) with the `copilot` argument. It prints JSON `additionalContext`: the routing instruction plus a [Copilot addendum](../plugins/pstack/hooks/session-start-copilot.md). It reads the model sheet, which sits outside Copilot's path sandbox, and checks it with the [same POSIX `awk` validator](../plugins/pstack/skills/setup-pstack/scripts/sheet.awk) that `setup-pstack` runs through `check-sheet.sh` after it writes the sheet. A valid sheet adds one line per known role, rebuilt from the checked values, so no other sheet text reaches the context. An invalid sheet adds `sheet invalid:` with each problem, and a missing sheet adds a note; both tell the session to run `setup-pstack` first. A second hook, [`pre-tool-use.sh`](../plugins/pstack/hooks/pre-tool-use.sh) with the matcher `view|task|bash`, does three things on Copilot. It approves reads inside the plugin directory so playbooks and references load without a path-access prompt. It approves registered scripts with their declared argument contracts and matching interpreters, using a strict command form with no shell metacharacters. It checks path operands separately from prose fields; unknown scripts and argument forms take the normal permission flow. Setup, SessionStart, and PreToolUse share one sheet decoder, including UTF-16LE support. While the sheet is valid, it denies a `pstack:*` `task` call whose `model` is not one of the saved choices, with the saved IDs in the reason. It stays silent on everything else and always exits 0, because Copilot denies a tool call when the hook fails; an `awk` error still reaches stderr. On Windows, Copilot runs each hook's `powershell` string in place of its `command`. SessionStart then runs the PowerShell adapter, which checks the sheet with the rules and problem wording of `sheet.awk`. PreToolUse exits 0 with no decision, so on Windows a read inside the plugin asks for path access, registered scripts take the normal permission flow, and the `task` model check does not run. Copilot runs plugin hooks on every session start, so the Claude matcher does not apply. The hook runs lazily, after the first message is submitted and before the first model turn, including when that message is a slash command such as `/pstack:arena`. A resumed session runs it again with source `resume`, and the model still sees one routing block. On CLI 1.0.87 through 1.0.92, the context of several plugins' session-start hooks merges ([github/copilot-cli#3589](https://github.com/github/copilot-cli/issues/3589) reported that only the last one survived). If a version drops the merge, use the standing instruction from `setup-pstack`. On 1.0.92, when the CLI's cached experiment assignment turns on computer use, `-p` sessions load no plugin skills while interactive sessions still do; the smoke test clears that cache before each `-p` probe.
|
|
151
151
|
|
|
152
152
|
pstack ships no default Copilot models, because the models an account reaches depend on its plan and policy. The first skill that dispatches on role models runs `setup-pstack`. It asks one `ask_user` question per tier and panel slot, each a short list drawn from the `task` tool's models and grouped by vendor, and recommends no model. It then writes `${COPILOT_HOME:-~/.copilot}/pstack-models.md` and runs `check-sheet.sh`, and later sessions receive its choices from the hook. Choose panel models from distinct vendors. A role value's `@<level>` suffix and the sheet's `default effort` line map to the `task` tool's `reasoning_effort`.
|
|
153
153
|
|
package/package.json
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pstack-claude-mirror",
|
|
3
|
-
"version": "0.9.
|
|
4
|
-
"description": "[Unofficial GitHub mirror] Unmodified copy of https://github.com/michael-denyer/pstack-claude @ v0.9.
|
|
3
|
+
"version": "0.9.134",
|
|
4
|
+
"description": "[Unofficial GitHub mirror] Unmodified copy of https://github.com/michael-denyer/pstack-claude @ v0.9.134 (pstack skills/plugin for OMP, Claude Code, Pi), republished on npm for networks without GitHub access. Not published by or affiliated with the upstream author. Report mirror packaging and installer bugs to the mirror repository; report plugin-content bugs upstream.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://github.com/michael-denyer/pstack-claude",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
9
|
"url": "git+https://github.com/ZedRover/pstack-claude-mirror.git"
|
|
10
10
|
},
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/ZedRover/pstack-claude-mirror/issues"
|
|
13
|
+
},
|
|
11
14
|
"keywords": [
|
|
12
15
|
"pi-package",
|
|
13
16
|
"pstack",
|
|
@@ -43,13 +46,27 @@
|
|
|
43
46
|
".claude-plugin/",
|
|
44
47
|
"plugins/",
|
|
45
48
|
"bin/",
|
|
46
|
-
"LICENSE
|
|
47
|
-
"NOTICE*",
|
|
48
|
-
"CHANGES.md",
|
|
49
|
+
"LICENSE-mirror",
|
|
49
50
|
"UPSTREAM-README.md",
|
|
51
|
+
"LICENSE",
|
|
52
|
+
"LICENSE-cursor-team-kit",
|
|
53
|
+
"LICENSE-thermos",
|
|
54
|
+
"plugins/pstack/LICENSE",
|
|
55
|
+
"plugins/pstack/skills/poteto-mode/references/licenses/LICENSE",
|
|
56
|
+
"plugins/pstack/skills/poteto-mode/references/licenses/LICENSE-cursor-team-kit",
|
|
57
|
+
"plugins/pstack/skills/poteto-mode/references/licenses/LICENSE-thermos",
|
|
58
|
+
"NOTICE-skills.md",
|
|
59
|
+
"NOTICE.md",
|
|
60
|
+
"plugins/pstack/skills/poteto-mode/references/licenses/NOTICE.md",
|
|
61
|
+
"CHANGES.md",
|
|
50
62
|
"docs/reference.md",
|
|
51
|
-
"tools
|
|
63
|
+
"tools/substitutions.json",
|
|
64
|
+
"tools/forks.json",
|
|
65
|
+
"tools/upstream.json"
|
|
52
66
|
],
|
|
67
|
+
"dependencies": {
|
|
68
|
+
"cross-spawn": "7.0.6"
|
|
69
|
+
},
|
|
53
70
|
"pi": {
|
|
54
71
|
"skills": [
|
|
55
72
|
"./plugins/pstack/skills"
|
|
@@ -77,13 +94,14 @@
|
|
|
77
94
|
"pstackMirror": {
|
|
78
95
|
"notice": "Unofficial mirror. Content is copied unchanged from the upstream GitHub repository; only bin/, README.md, LICENSE-mirror and package.json are added by the mirror (MIT, see LICENSE-mirror). Upstream copyright and license notices are preserved unchanged.",
|
|
79
96
|
"upstream": "https://github.com/michael-denyer/pstack-claude.git",
|
|
97
|
+
"upstreamVersion": "0.9.134",
|
|
80
98
|
"upstreamAuthor": {
|
|
81
99
|
"name": "Michael Denyer",
|
|
82
100
|
"url": "https://github.com/michael-denyer"
|
|
83
101
|
},
|
|
84
|
-
"ref": "v0.9.
|
|
85
|
-
"commit": "
|
|
86
|
-
"commitDate": "2026-11-
|
|
102
|
+
"ref": "v0.9.134",
|
|
103
|
+
"commit": "a691bd30341289b9c7eae8e5b4da28a400ea2423",
|
|
104
|
+
"commitDate": "2026-11-10T17:42:12Z",
|
|
87
105
|
"marketplace": "pstack-claude",
|
|
88
106
|
"plugin": "pstack"
|
|
89
107
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pstack",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.134",
|
|
4
4
|
"description": "If you want to go fast, go deep first. pstack helps you write less, but higher quality code. rigorous agent workflows you can parallelize with confidence. Ported from cursor/plugins/pstack to Antigravity. Original pstack by Lauren Tan (poteto).",
|
|
5
5
|
"author": "Michael Denyer",
|
|
6
6
|
"logo": "assets/pstack-icon.png",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pstack",
|
|
3
3
|
"displayName": "pstack (Claude Code port)",
|
|
4
|
-
"version": "0.9.
|
|
4
|
+
"version": "0.9.134",
|
|
5
5
|
"description": "If you want to go fast, go deep first. pstack helps you write less, but higher quality code. rigorous agent workflows you can parallelize with confidence. Ported from cursor/plugins/pstack to Claude Code. Original pstack by Lauren Tan (poteto).",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Michael Denyer",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pstack",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.134",
|
|
4
4
|
"description": "If you want to go fast, go deep first. pstack helps you write less, but higher quality code. rigorous agent workflows you can parallelize with confidence. Codex port of the Claude Code plugin; skills are shared, tool names resolve via skills/poteto-mode/references/codex-tools.md. Original pstack by Lauren Tan (poteto).",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Michael Denyer",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pstack",
|
|
3
3
|
"displayName": "pstack (GitHub Copilot port)",
|
|
4
|
-
"version": "0.9.
|
|
4
|
+
"version": "0.9.134",
|
|
5
5
|
"description": "If you want to go fast, go deep first. pstack helps you write less, but higher quality code. rigorous agent workflows you can parallelize with confidence. Ported from cursor/plugins/pstack to GitHub Copilot CLI and app. Original pstack by Lauren Tan (poteto).",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Michael Denyer",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"name": "pstack",
|
|
4
4
|
"displayName": "pstack (Muse port)",
|
|
5
|
-
"version": "0.9.
|
|
5
|
+
"version": "0.9.134",
|
|
6
6
|
"description": "If you want to go fast, go deep first. pstack helps you write less, but higher quality code. Rigorous agent workflows you can parallelize with confidence. Muse port of the Claude Code plugin; skills are shared, tool names resolve via skills/poteto-mode/references/muse-tools.md. Original pstack by Lauren Tan (poteto).",
|
|
7
7
|
"compat": {
|
|
8
8
|
"source": "native",
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Lauren Tan
|
|
4
|
+
Copyright (c) 2026 Michael Denyer
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
SOFTWARE.
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
"hooks": [
|
|
7
7
|
{
|
|
8
8
|
"type": "command",
|
|
9
|
-
"command": "\"${COPILOT_PLUGIN_ROOT}/hooks/session-start.sh\" copilot"
|
|
9
|
+
"command": "sh \"${COPILOT_PLUGIN_ROOT}/hooks/session-start.sh\" copilot",
|
|
10
|
+
"powershell": "powershell.exe -NoProfile -ExecutionPolicy Bypass -File \"$env:COPILOT_PLUGIN_ROOT/hooks/session-start.ps1\" copilot"
|
|
10
11
|
}
|
|
11
12
|
]
|
|
12
13
|
}
|
|
@@ -17,7 +18,8 @@
|
|
|
17
18
|
"hooks": [
|
|
18
19
|
{
|
|
19
20
|
"type": "command",
|
|
20
|
-
"command": "\"${COPILOT_PLUGIN_ROOT}/hooks/pre-tool-use.sh\"",
|
|
21
|
+
"command": "sh \"${COPILOT_PLUGIN_ROOT}/hooks/pre-tool-use.sh\"",
|
|
22
|
+
"powershell": "exit 0",
|
|
21
23
|
"timeout": 5
|
|
22
24
|
}
|
|
23
25
|
]
|
|
@@ -19,32 +19,74 @@ function AsLines([string] $text) {
|
|
|
19
19
|
if ($text -and -not $text.EndsWith("`n", [System.StringComparison]::Ordinal)) { $text + "`n" } else { $text }
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
#
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
# copilot-context.awk's text() drops only the file's final newline.
|
|
23
|
+
function AsText([string] $text) {
|
|
24
|
+
if ($text.EndsWith("`n", [System.StringComparison]::Ordinal)) { $text.Substring(0, $text.Length - 1) } else { $text }
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
# sheet.awk's sheet_problems(), in its order and wording, and the role lines
|
|
28
|
+
# whose entries are all model IDs or aliases, each with an optional known
|
|
29
|
+
# effort, then a usable default effort, in models.json order. Muse keeps each
|
|
30
|
+
# usable line. Copilot takes the lines only from a sheet with no problems. A
|
|
31
|
+
# problem quotes no unchecked sheet text, since both reach the session context.
|
|
32
|
+
function ModelSheet([string[]] $lines) {
|
|
26
33
|
$models = [System.IO.File]::ReadAllText((Join-Path (Split-Path $PSScriptRoot -Parent) 'models.json'), [System.Text.Encoding]::UTF8) | ConvertFrom-Json
|
|
27
34
|
$efforts = @($models.efforts)
|
|
28
35
|
$value = [System.Collections.Generic.Dictionary[string, string]]::new([System.StringComparer]::Ordinal)
|
|
36
|
+
$anyVendor = $false
|
|
29
37
|
foreach ($line in $lines) {
|
|
30
38
|
$colon = $line.IndexOf(':')
|
|
31
39
|
if ($colon -lt 0 -or $line -cmatch '^[ \t]') { continue }
|
|
32
|
-
$
|
|
40
|
+
$key = $line.Substring(0, $colon).Trim([char[]]" `t")
|
|
41
|
+
$value[$key] = $line.Substring($colon + 1).Trim([char[]]" `t")
|
|
42
|
+
if ($key.Equals('panel vendors', [System.StringComparison]::Ordinal) -and $value[$key].Equals('any', [System.StringComparison]::Ordinal)) { $anyVendor = $true }
|
|
33
43
|
}
|
|
44
|
+
$problems = ''
|
|
34
45
|
foreach ($role in $models.roles.role) {
|
|
35
|
-
if (-not $value.ContainsKey($role)) {
|
|
46
|
+
if (-not $value.ContainsKey($role)) { $problems += "; missing role ``$role``" }
|
|
47
|
+
}
|
|
48
|
+
if ($value.ContainsKey('default effort') -and -not (HasOrdinal (@('session') + $efforts) $value['default effort'])) {
|
|
49
|
+
$problems += '; default effort is not session or a level'
|
|
50
|
+
}
|
|
51
|
+
$roleLines = @()
|
|
52
|
+
foreach ($role in $models.roles) {
|
|
53
|
+
$name = $role.role
|
|
54
|
+
if (-not $value.ContainsKey($name)) { continue }
|
|
55
|
+
if ($value[$name].Length -eq 0) {
|
|
56
|
+
$problems += "; no model in ``$name``"
|
|
57
|
+
continue
|
|
58
|
+
}
|
|
59
|
+
$vendors = [System.Collections.Generic.List[string]]::new()
|
|
60
|
+
$real = $false
|
|
36
61
|
$usable = $true
|
|
37
|
-
foreach ($raw in $value[$
|
|
62
|
+
foreach ($raw in $value[$name].Split(',')) {
|
|
38
63
|
$entry = $raw.Trim([char[]]" `t")
|
|
39
64
|
if ($entry -cmatch '[ \t]+@([a-z]+)$' -and (HasOrdinal $efforts $Matches[1])) {
|
|
40
65
|
$entry = $entry.Substring(0, $entry.Length - $Matches[0].Length)
|
|
41
66
|
}
|
|
42
|
-
|
|
67
|
+
if ($entry.Length -eq 0) {
|
|
68
|
+
$problems += "; an empty entry in ``$name``"
|
|
69
|
+
$usable = $false
|
|
70
|
+
continue
|
|
71
|
+
}
|
|
72
|
+
if (HasOrdinal @('inherit-parent', 'auto') $entry) { continue }
|
|
73
|
+
if ($entry -cnotmatch '^[a-z0-9][a-z0-9.-]*$') {
|
|
74
|
+
$problems += "; ``$name`` has an entry that is not a model ID"
|
|
75
|
+
$usable = $false
|
|
76
|
+
continue
|
|
77
|
+
}
|
|
78
|
+
$real = $true
|
|
79
|
+
$vendor = $entry -replace '-.*$', ''
|
|
80
|
+
if (-not $vendors.Contains($vendor)) { $vendors.Add($vendor) }
|
|
81
|
+
}
|
|
82
|
+
if ($usable) { $roleLines += "$($name): $($value[$name])" }
|
|
83
|
+
if ($role.models -ceq 'panel' -and $real -and $vendors.Count -lt 2 -and -not $anyVendor) {
|
|
84
|
+
$problems += "; ``$name`` has models from one vendor ($($vendors -join ', '))"
|
|
43
85
|
}
|
|
44
|
-
if ($usable) { "$($role): $($value[$role])" }
|
|
45
86
|
}
|
|
46
87
|
$effort = $value['default effort']
|
|
47
|
-
if (HasOrdinal (@('session') + $efforts) $effort) { "default effort: $effort" }
|
|
88
|
+
if (HasOrdinal (@('session') + $efforts) $effort) { $roleLines += "default effort: $effort" }
|
|
89
|
+
[pscustomobject]@{ Problems = $(if ($problems) { $problems.Substring(2) } else { '' }); RoleLines = $roleLines }
|
|
48
90
|
}
|
|
49
91
|
|
|
50
92
|
# Each runtime's hooks file passes its own name, as for session-start.sh.
|
|
@@ -68,8 +110,13 @@ switch -CaseSensitive ($Runtime) {
|
|
|
68
110
|
$sheet = Join-Path (Join-Path $sheetRoot 'muse') 'pstack-models.md'
|
|
69
111
|
$context = 'session-start-muse.md'
|
|
70
112
|
}
|
|
113
|
+
'copilot' {
|
|
114
|
+
$sheetRoot = if ($env:COPILOT_HOME) { $env:COPILOT_HOME } else { Join-Path $env:USERPROFILE '.copilot' }
|
|
115
|
+
$sheet = Join-Path $sheetRoot 'pstack-models.md'
|
|
116
|
+
$context = 'session-start-context.md'
|
|
117
|
+
}
|
|
71
118
|
default {
|
|
72
|
-
[Console]::Error.WriteLine("session-start.ps1: unknown runtime '$Runtime' (expected codex or muse)")
|
|
119
|
+
[Console]::Error.WriteLine("session-start.ps1: unknown runtime '$Runtime' (expected codex, copilot, or muse)")
|
|
73
120
|
exit 2
|
|
74
121
|
}
|
|
75
122
|
}
|
|
@@ -96,10 +143,27 @@ $output = ReadHookFile $context
|
|
|
96
143
|
# the mandate, as muse-context.awk prints them.
|
|
97
144
|
if ($Runtime -ceq 'muse') {
|
|
98
145
|
$output = AsLines $output
|
|
99
|
-
$roleLines = if ($null -eq $sheetLines) { @() } else { @(
|
|
146
|
+
$roleLines = if ($null -eq $sheetLines) { @() } else { @((ModelSheet $sheetLines).RoleLines) }
|
|
100
147
|
if ($roleLines.Count -gt 0) {
|
|
101
148
|
$output += "`n" + (AsLines (ReadHookFile 'session-start-muse-sheet.md')) + (($roleLines -join "`n") + "`n")
|
|
102
149
|
}
|
|
103
150
|
}
|
|
151
|
+
# Copilot reads one JSON object, as copilot-context.awk prints it: the mandate
|
|
152
|
+
# with the Copilot notes and the sheet's role lines or setup's note before its
|
|
153
|
+
# closing tag.
|
|
154
|
+
if ($Runtime -ceq 'copilot') {
|
|
155
|
+
$notes = AsText (ReadHookFile 'session-start-copilot.md')
|
|
156
|
+
$state = if ($null -eq $sheetLines) { $null } else { ModelSheet $sheetLines }
|
|
157
|
+
if ($null -ne $state -and $state.Problems.Length -eq 0) {
|
|
158
|
+
$notes += "`n`n" + (AsText (ReadHookFile 'session-start-copilot-sheet.md')) + "`n`n" + ($state.RoleLines -join "`n")
|
|
159
|
+
} else {
|
|
160
|
+
if ($null -ne $state) { $notes += "`n`nsheet invalid: $($state.Problems)" }
|
|
161
|
+
$notes += "`n`n" + (AsText (ReadHookFile 'session-start-copilot-setup.md'))
|
|
162
|
+
}
|
|
163
|
+
$output = AsText $output
|
|
164
|
+
$close = $output.IndexOf('</EXTREMELY_IMPORTANT>', [System.StringComparison]::Ordinal)
|
|
165
|
+
if ($close -ge 0) { $output = $output.Substring(0, $close) + "`n" + $notes + "`n" + $output.Substring($close) } else { $output += "`n" + $notes }
|
|
166
|
+
$output = (ConvertTo-Json -InputObject @{ additionalContext = $output + "`n" } -Compress) + "`n"
|
|
167
|
+
}
|
|
104
168
|
[Console]::OutputEncoding = [System.Text.UTF8Encoding]::new($false)
|
|
105
169
|
[Console]::Write($output)
|
|
@@ -17,6 +17,12 @@ case "$runtime" in
|
|
|
17
17
|
;;
|
|
18
18
|
claude)
|
|
19
19
|
sheet="${CLAUDE_CONFIG_DIR:-$HOME/.claude}/pstack-models.md"
|
|
20
|
+
# A sheet committed with the project replaces the user's in that project.
|
|
21
|
+
# Claude Code may start in a subdirectory, so look at the repository root.
|
|
22
|
+
if [ -n "${CLAUDE_PROJECT_DIR:-}" ]; then
|
|
23
|
+
root=$(git -C "$CLAUDE_PROJECT_DIR" rev-parse --show-toplevel 2>/dev/null) || root=$CLAUDE_PROJECT_DIR
|
|
24
|
+
[ ! -f "$root/.claude/pstack-models.md" ] || sheet="$root/.claude/pstack-models.md"
|
|
25
|
+
fi
|
|
20
26
|
reader="${CLAUDE_PLUGIN_ROOT}/skills/setup-pstack/scripts/read-sheet.sh"
|
|
21
27
|
;;
|
|
22
28
|
minimax)
|
|
@@ -2,7 +2,7 @@ import type { SlashCommandInfo } from "@earendil-works/pi-coding-agent";
|
|
|
2
2
|
import { readFileSync } from "node:fs";
|
|
3
3
|
|
|
4
4
|
// Pi expands "/skill:name args" and "/template args" only inside sendUserMessage, and its package exports
|
|
5
|
-
// none of the code that does it. This is that code from pi 1.
|
|
5
|
+
// none of the code that does it. This is that code from pi 1.5.1 (AgentSession._expandSkillCommand,
|
|
6
6
|
// dist/core/prompt-templates.js, and dist/utils/frontmatter.js), reading the files pi.getCommands() names,
|
|
7
7
|
// for text the extension sends as a custom message. tests/pi/slash.test.mjs checks it against the installed pi.
|
|
8
8
|
|
|
@@ -13,18 +13,26 @@ export function stripFrontmatter(content: string): string {
|
|
|
13
13
|
return endIndex === -1 ? normalized : normalized.slice(endIndex + 4).trim();
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
// Splits on whitespace outside quotes
|
|
16
|
+
// Splits on whitespace outside quotes. A quote opens only at the start of an argument, so an apostrophe inside a
|
|
17
|
+
// word is text, and ends at the next quote of the same kind. Inside it, a backslash before that kind of quote
|
|
18
|
+
// keeps the quote as text. A quote that never closes is text too, and "" is an argument.
|
|
17
19
|
export function parseCommandArgs(argsString: string): string[] {
|
|
18
20
|
const args: string[] = [];
|
|
19
21
|
let current = "";
|
|
20
22
|
let hasToken = false;
|
|
21
23
|
let inQuote: string | null = null;
|
|
22
|
-
|
|
24
|
+
let quoteStart = 0;
|
|
25
|
+
for (let i = 0; i < argsString.length; i++) {
|
|
26
|
+
const char = argsString.charAt(i);
|
|
23
27
|
if (inQuote) {
|
|
24
|
-
if (char ===
|
|
28
|
+
if (char === "\\" && argsString.charAt(i + 1) === inQuote) {
|
|
29
|
+
current += inQuote;
|
|
30
|
+
i++;
|
|
31
|
+
} else if (char === inQuote) inQuote = null;
|
|
25
32
|
else current += char;
|
|
26
|
-
} else if (char === '"' || char === "'") {
|
|
33
|
+
} else if ((char === '"' || char === "'") && !hasToken) {
|
|
27
34
|
inQuote = char;
|
|
35
|
+
quoteStart = i;
|
|
28
36
|
hasToken = true;
|
|
29
37
|
} else if (/\s/.test(char)) {
|
|
30
38
|
if (hasToken) {
|
|
@@ -36,6 +44,12 @@ export function parseCommandArgs(argsString: string): string[] {
|
|
|
36
44
|
current += char;
|
|
37
45
|
hasToken = true;
|
|
38
46
|
}
|
|
47
|
+
// The quote never closed: restart after it with the quote character as the argument's first character.
|
|
48
|
+
if (inQuote && i === argsString.length - 1) {
|
|
49
|
+
current = inQuote;
|
|
50
|
+
inQuote = null;
|
|
51
|
+
i = quoteStart;
|
|
52
|
+
}
|
|
39
53
|
}
|
|
40
54
|
if (hasToken) args.push(current);
|
|
41
55
|
return args;
|
|
@@ -24,6 +24,7 @@ Remaining triggers:
|
|
|
24
24
|
- About to `AskUserQuestion` on a "which approach", "how should I", or "what should this do" fork → classify it before you ask. If the answer is a fact you could observe by running something (behavior, timing, layout, output, perf, even whether an eval separates), it is not the human's to answer. Sketch it via the Prototype playbook (`playbooks/prototype.md`) and let the result decide. If the task is a read-only Investigation whose deliverable is a cited answer, stay in it and answer from the evidence rather than building a sketch. Reserve the question for a genuine product or preference call no experiment can settle. Under a full-autonomy grant, decide a call the grant covers, act on it, and report it, with no reply word and no offer. Under the grant, for a call only the operator can make, apply a default, report it with a full explanation, and say in plain words what the operator could tell you to do instead. The operator answers in their own words. Never give a shorthand token to type back. Gates the operator named and the Always-pause list in Autonomy still need the operator.
|
|
25
25
|
- Any code → name the data shape first, and choose its organizing structure per **principle-model-the-domain**.
|
|
26
26
|
- Code crossing a function boundary → the **architect** skill, parallel design exploration before implementing.
|
|
27
|
+
- For Bug fix only, check the [focused-fix exception](playbooks/bug-fix.md#focused-fix-exception) before the `how`, `why`, or `architect` fan-out. All other triggers still apply.
|
|
27
28
|
- Parallel fan-out → the **swarm** skill for coverage matrices, races, gauntlets, and exploration partitions. Use **arena** for design or code bakeoffs with base selection and grafting.
|
|
28
29
|
- Contested design → the **interrogate** skill (multi-model adversarial) before shipping.
|
|
29
30
|
- Nontrivial multi-step → write the throughput checkpoint (Feature step 3).
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
Be scientific. Every shipped line traces to runtime evidence. Belt-and-suspenders that "might help" is a hypothesis, not a fix. It does not ship. When evidence refutes a hypothesis, revert what it motivated. The smallest change the evidence justifies ships, nothing more.
|
|
6
6
|
|
|
7
|
+
Before the fan-out in steps 2–3, check the [focused-fix exception](#focused-fix-exception). Select known non-sensitive fields before printing diagnostic configuration or service responses; do not dump whole configurations or environments.
|
|
8
|
+
|
|
7
9
|
1. Reproduce it yourself on the matching surface via the driver skill (Non-negotiables), even when a debug or instrumentation protocol says to ask the user to reproduce. Ask the user only with a stated, specific reason the control surface cannot reach the target, and only after driving it as far as it goes. If it won't reproduce directly, synthesize the trigger, tighten conditions, or instrument until it fires.
|
|
8
10
|
2. Binary-search the cause. Form the candidate hypotheses, then rule them out until one survives. Seed them with `how` over the affected subsystem and the **why** skill for regression history. Each pass, take the split that cuts the most remaining problem space, get runtime evidence, eliminate. When program state is unclear, add instrumentation or logging and read it as the code runs. Don't guess. Drive a long or stubborn hunt with Claude Code's `loop` skill. Confirm the surviving *mechanism* with runtime evidence before the step-3 architect/interrogate fan-out.
|
|
9
11
|
3. Plan the fix. If it crosses a function boundary, `architect` first. Delegate implementation to a subagent using your configured bug-fix model (default in poteto-mode's Models section) with a specific scope.
|
|
@@ -12,4 +14,19 @@ Be scientific. Every shipped line traces to runtime evidence. Belt-and-suspender
|
|
|
12
14
|
This is the canonical **sequence-verifiable-units** principle skill, the failing test first and the fix on top.
|
|
13
15
|
6. Run **Opening a PR**.
|
|
14
16
|
|
|
17
|
+
For any bug fix, run `architect` in step 3 before implementing changes to interfaces, ownership, schema, migration behavior, concurrency or transaction guarantees, or deployment or routing contracts, even within one function. Before marking the fix merge-ready, require an independent correctness reviewer for changes to code that enforces a security or data-integrity invariant, including an atomic eligibility guard, even when the fix preserves that invariant. Follow the closed-review-gate rule in Subagents if a reviewer cannot run.
|
|
18
|
+
|
|
15
19
|
**Reply:** what was broken, root cause, fix, how you verified. Quote the decisive failing and passing output, trimmed to the assertion and the counts.
|
|
20
|
+
|
|
21
|
+
When publication or deployment is part of the task, also state what code was fixed and verified, what was published, what version and behavior the affected runtime actually served (through the authenticated path when relevant), and any blocker with the next action needed to resolve it. Missing or contradictory runtime evidence leaves the incident unresolved, even after a successful publication. Remove credentials and customer data from quoted evidence.
|
|
22
|
+
|
|
23
|
+
#### Focused-fix exception
|
|
24
|
+
|
|
25
|
+
One scoped bug-fix delegate may investigate the reproduced failure with a focused code and local-history read before invoking `how` or `why`. Skip those skills and step 3's `architect`, even across a function boundary, only when all of these hold:
|
|
26
|
+
|
|
27
|
+
- Runtime evidence establishes the cause in one subsystem.
|
|
28
|
+
- The correction preserves interfaces and state semantics, with no signature, ownership, schema, migration, security, concurrency, transaction, or deployment/routing change. Security changes include authentication, authorization, cryptography, and secret handling.
|
|
29
|
+
- A cheap regression check exercises the failure under the relevant runtime settings, and verification on the original surface is available.
|
|
30
|
+
- No competing design or contradictory evidence remains.
|
|
31
|
+
|
|
32
|
+
Record the evidence for these conditions in the existing checklist before the skip. The delegate implements the scoped fix; the lead still plans, reviews the diff, and verifies it. If any condition is false or remains unknown after the focused pass, or later evidence invalidates it, return to steps 2–3 without the exception. Every other step and any required independent review remain in force. Patch size alone never qualifies a fix.
|
|
@@ -28,10 +28,11 @@ The Antigravity CLI (`agy`) loads the native pstack plugin manifest, the skills,
|
|
|
28
28
|
|
|
29
29
|
poteto-mode's Subagents section sets Claude-specific defaults (`subagent_type: "pstack:poteto-agent"`, `run_in_background: true`). On Antigravity:
|
|
30
30
|
|
|
31
|
-
- The plugin's four
|
|
32
|
-
-
|
|
31
|
+
- The plugin's four agent files (`pstack:poteto-agent` or `poteto-agent`, `pstack:comment-sicko` or `comment-sicko`, `pstack:thermo-nuclear-review-subagent` or `thermo-nuclear-review-subagent`, and `pstack:thermo-nuclear-code-quality-review-subagent` or `thermo-nuclear-code-quality-review-subagent`) register in `<subagents>` without a `tools:` frontmatter list, so Antigravity loads them as read-only without `write_file`, `edit_file`, `run_command`, or MCP tools.
|
|
32
|
+
- `pstack:poteto-agent` and `general-purpose` map to `TypeName: "self"` when the subagent writes files, runs commands, or uses MCP tools. Use `TypeName: "poteto-agent"` or `TypeName: "research"` only for read-only work that needs no shell or MCP access.
|
|
33
|
+
- Give each `poteto-mode` delegate the installed path to `poteto-mode/SKILL.md` from the `<skills>` catalog. Expand `~` to the user's home directory and tell the subagent in `Prompt` to read the entire file with `read_file`, including the model and reasoning effort sections at the end.
|
|
33
34
|
- `invoke_subagent` always runs asynchronously in the background, so `run_in_background: true` needs no extra flag.
|
|
34
|
-
- `readonly: true` (reviewers, explorers, critics) maps to `TypeName: "research"` when no MCP or write tools are needed
|
|
35
|
+
- `readonly: true` (reviewers, explorers, critics) maps to `TypeName: "research"` or one of the read-only plugin agent types when no shell, MCP, or write tools are needed. When a read-only subagent needs `run_command` or MCP tools, use `TypeName: "self"` and tell it in `Prompt` not to write files.
|
|
35
36
|
- `isolation: "worktree"` maps to `Workspace: "share"` (creates a shared git worktree-style workspace) or `Workspace: "branch"` on `invoke_subagent`, or a manual `git worktree add` path named in `Prompt`.
|
|
36
37
|
- Keep the rest of the policy unchanged. Pass file pointers not inlined context, and review every subagent's diff yourself.
|
|
37
38
|
|
|
@@ -76,7 +77,7 @@ Most skills need only the tables above. These need one more mapping:
|
|
|
76
77
|
| `how` | The parallel explorers and the explainer map to `invoke_subagent` fan-out with the sheet's `how` role models. |
|
|
77
78
|
| `arena` | The parallel candidates and the cross-judge map to `invoke_subagent` calls with the sheet's panel lines. |
|
|
78
79
|
| `no-comments` | Dispatch `comment-sicko` via `invoke_subagent` with `TypeName: "comment-sicko"`. |
|
|
79
|
-
| `thermos` | Dispatch both review subagents via `invoke_subagent` with `TypeName: "thermo-nuclear-review-subagent"` and `"thermo-nuclear-code-quality-review-subagent"
|
|
80
|
+
| `thermos` | Dispatch both review subagents via `invoke_subagent` with `TypeName: "thermo-nuclear-review-subagent"` and `"thermo-nuclear-code-quality-review-subagent"`, with the full diff and file excerpts in `Prompt`, since both types are read-only. |
|
|
80
81
|
| `swarm` | Each worker is an `invoke_subagent` call; use `Workspace: "share"` or `git worktree add` for writing workers. |
|
|
81
82
|
| `teach` | Running `how` and `why` in parallel maps to two `invoke_subagent` calls in one response; image generation uses `image-generator` via `invoke_subagent`. |
|
|
82
83
|
| `why` | The parallel investigators and synthesizer map to `invoke_subagent` fan-out. |
|
|
@@ -19,7 +19,7 @@ pstack skills are written in Claude Code tool language (the `Skill` tool, the `A
|
|
|
19
19
|
| Free a finished subagent slot | `close_agent`, when the session exposes it. Some Codex hosts don't. |
|
|
20
20
|
| Track tasks (the todolist; `TaskCreate` / `TaskUpdate`, or `TodoWrite` on Claude Code) | `update_plan` |
|
|
21
21
|
| Ask the human a fixed-choice question (`AskUserQuestion`) | Ask in plain text and let the user answer. Codex has no structured-choice tool. |
|
|
22
|
-
| Read this workspace's session transcripts (Claude Code's `${CLAUDE_CONFIG_DIR:-$HOME/.claude}/projects/<encoded-cwd>/`) | Codex sessions live in `${CODEX_HOME:-~/.codex}/sessions/YYYY/MM/DD/rollout
|
|
22
|
+
| Read this workspace's session transcripts (Claude Code's `${CLAUDE_CONFIG_DIR:-$HOME/.claude}/projects/<encoded-cwd>/`) | Codex sessions live in `${CODEX_HOME:-~/.codex}/sessions/YYYY/MM/DD/`. Ordinary names end in `-<thread-id>.jsonl`; replacements after `thread/revert` end in `-<thread-id>_<rollout-id>.jsonl`. Revert keeps the old files. Resolve the current path from the state database's `threads.rollout_path`, matched by thread ID, rather than filename order or modification time. Archived sessions are in `${CODEX_HOME:-~/.codex}/archived_sessions/`. Older rollouts in both directories can end in `.jsonl.zst`; read those with `zstd -dc`. The first line of each rollout is a `session_meta` record. Keep only rollouts whose `payload.cwd` is the workspace or one of its worktrees. Never read other projects' sessions. |
|
|
23
23
|
|
|
24
24
|
Subagent dispatch needs `multi_agent` enabled. Add to `~/.codex/config.toml`:
|
|
25
25
|
|
|
@@ -39,6 +39,7 @@ poteto-mode's Subagents section sets Claude-specific defaults (`subagent_type: "
|
|
|
39
39
|
- There is no `poteto-agent` subagent type. Route an ad-hoc subagent through poteto-mode's style by dispatching a `spawn_agent` whose instructions tell it to read the `poteto-mode` skill in full first.
|
|
40
40
|
- `spawn_agent` calls already run concurrently with your turn, so `run_in_background: true` has no separate flag. Issue the dispatch and continue.
|
|
41
41
|
- For `session`, run `node <poteto-mode-dir>/scripts/codex-session-effort.mjs` before dispatching, with `<poteto-mode-dir>` resolved to this skill's directory. The [helper](../scripts/codex-session-effort.mjs) reads the active turn's effort from the exact runtime log identified by `CODEX_THREAD_ID`, under `$CODEX_HOME/sessions` (default `~/.codex/sessions`). It prints only the effort. Run it again on each turn; a UI effort change must not reuse the previous turn's value.
|
|
42
|
+
- The helper finds the current log through `threads.rollout_path` in `$CODEX_HOME/state_*.sqlite`, or a single `-<thread-id>.jsonl` log when no indexed path is available and no replacement exists; anything else makes effort unavailable.
|
|
42
43
|
- Apply poteto-mode's task adjustment to that starting level, or to the explicit role/default effort, then pass the final level as `reasoning_effort` on `spawn_agent`, including when a model is selected explicitly. An omitted effort can use a configured subagent effort or, when a model is selected, that model's default instead of the parent's level.
|
|
43
44
|
- Do not guess the session's effort from the model, a config default, or a previous turn. If the helper cannot identify the active turn's effort, ask for an explicit role or `default effort` level before dispatching. Do not substitute an omitted `reasoning_effort` for the missing starting level. Automatic `session` resolution depends on the host exposing the current thread's runtime log; it is not available on every Codex host.
|
|
44
45
|
- There is no `comment-sicko` subagent type either. The **no-comments** skill spawns it on Claude Code; on Codex dispatch a `spawn_agent` whose instructions tell it to read `poteto-mode/references/agents/comment-sicko.md` in full first.
|
|
@@ -96,7 +97,7 @@ Affected skill entry points point here. Most skills need only the tables above.
|
|
|
96
97
|
| `how` | The parallel explorers and the explainer map to `spawn_agent` fan-out; substitute your configured Codex models. |
|
|
97
98
|
| `reflect` | The three reviewers and the synthesizer map to `spawn_agent`; substitute your configured Codex models. The transcript finder reads Claude Code's layout under `${CLAUDE_CONFIG_DIR:-$HOME/.claude}/projects/`, so pass the session digest step 1 allows instead. |
|
|
98
99
|
| `recall` | Search this workspace's Codex rollouts (see Tool actions). Do not list or read `${CLAUDE_CONFIG_DIR:-$HOME/.claude}/projects/`. It holds Claude Code transcripts, not this session's history. In a rollout, chat messages are the `response_item` records whose `payload.type` is `message`, with the speaker in `payload.role`. Skip `developer` records, which are injected instructions. |
|
|
99
|
-
| `show-me-your-work` | Check the log against this run's Codex rollout
|
|
100
|
+
| `show-me-your-work` | Check the log against this run's current Codex rollout, using `CODEX_THREAD_ID` and the state index as described in Tool actions. A filename suffix alone cannot select the current file after revert. If the current path is unavailable or ambiguous, report that the audit could not run instead of guessing a rollout. Do not read Claude Code's projects directory. |
|
|
100
101
|
| `swarm` | Each worker is a `spawn_agent` call on your configured Codex model, and those calls already run concurrently; give each writing worker its own worktree or output directory (see Subagent policy above). |
|
|
101
102
|
| `why` | The parallel investigators and the synthesizer map to `spawn_agent`; substitute your configured Codex models. List MCP servers from the tools Codex exposes to the session, not from `.mcp.json` or `claude mcp list`. |
|
|
102
103
|
|
|
@@ -27,6 +27,7 @@ pstack skills are written in Claude Code tool language (the `Skill` tool, the `A
|
|
|
27
27
|
poteto-mode's Subagents section sets Claude-specific defaults (`subagent_type: "pstack:poteto-agent"`, `run_in_background: true`). On GitHub Copilot:
|
|
28
28
|
|
|
29
29
|
- The plugin's agents load as `task` agent types under their namespaced names, `pstack:poteto-agent`, `pstack:comment-sicko`, `pstack:thermo-nuclear-review-subagent`, and `pstack:thermo-nuclear-code-quality-review-subagent`. Pass the skill's `subagent_type` as `agent_type` unchanged.
|
|
30
|
+
- The VS Code agents window rejects those agent types as unknown. There, dispatch `agent_type: "general-purpose"` and tell it in the prompt to read its instructions in full first: the `poteto-mode` skill for `pstack:poteto-agent`, `poteto-mode/references/agents/comment-sicko.md` for `pstack:comment-sicko`, and the `thermo-nuclear-review` or `thermo-nuclear-code-quality-review` skill for the two reviewers.
|
|
30
31
|
- `subagent_type: "general-purpose"` maps to `agent_type: "general-purpose"`. Where a skill leaves the type unset, use `pstack:poteto-agent`.
|
|
31
32
|
- `readonly: true` (reviewers, explorers, critics) maps to a read-only agent type: `explore` for code reading, `code-review` for diff review. When a read-only role must run commands or reach MCP tools, use `general-purpose` and tell it in the prompt not to write files; review its diff anyway.
|
|
32
33
|
- `readonly: false`, or a role that needs MCP tools, maps to `general-purpose` or `pstack:poteto-agent`.
|
|
@@ -120,7 +121,7 @@ Affected skill entry points point here. Most skills need only the tables above.
|
|
|
120
121
|
| `swarm` | Workers are `task` calls with `mode: "background"`, each on its own worktree; in the app, `create_session` per worker. |
|
|
121
122
|
| `teach` | Running `how` and `why` in parallel maps to `task` fan-out; image generation uses whatever image tool you have, or skip it and say so. |
|
|
122
123
|
| `why` | Available MCP servers appear in your tool list; there is no `mcp__` prefix convention to scan for. |
|
|
123
|
-
| `reflect` | Run `find-transcript.mjs <session-state directory> '<opening prompt fragment>' <workspace directory>` with the absolute session-state path under `${COPILOT_HOME:-~/.copilot}`. The workspace defaults to the current directory when omitted. The finder checks the session header's `cwd` against that workspace before reading Copilot's `user.message` records, so matching prompts in other projects are skipped. For a conversation in a related worktree, pass that worktree's directory explicitly. Reviewer references that name `.claude/skills/` and `${CLAUDE_CONFIG_DIR:-$HOME/.claude}/` paths mean the Copilot skill locations below. |
|
|
124
|
+
| `reflect` | Run `find-transcript.mjs <session-state directory> '<opening prompt fragment>' <workspace directory>` with the absolute session-state path under `${COPILOT_HOME:-~/.copilot}`. That directory is outside the workspace, so the call takes the normal permission flow. The workspace defaults to the current directory when omitted. The finder checks the session header's `cwd` against that workspace before reading Copilot's `user.message` records, so matching prompts in other projects are skipped. For a conversation in a related worktree, pass that worktree's directory explicitly. Reviewer references that name `.claude/skills/` and `${CLAUDE_CONFIG_DIR:-$HOME/.claude}/` paths mean the Copilot skill locations below. |
|
|
124
125
|
| `recall` | Search Copilot session state scoped to the current workspace (Transcripts above), not `${CLAUDE_CONFIG_DIR:-$HOME/.claude}/projects/`. |
|
|
125
126
|
| `show-me-your-work` | The end-of-run check reads this session's `events.jsonl` (Transcripts above). |
|
|
126
127
|
| `automate-me` | Mode skills live in the Copilot skill locations below; transcripts come from Transcripts above; `plugin-dev:skill-development` resolves through the skills table. |
|
|
@@ -54,7 +54,7 @@ Skills name models by the Claude aliases in their Models sections. On Pi, pass t
|
|
|
54
54
|
| Alias | `anthropic` | `openai` | `openai-codex` |
|
|
55
55
|
| --- | --- | --- | --- |
|
|
56
56
|
| `opus` | `anthropic/claude-opus-5-5` | `openai/gpt-6.1-sol` | `openai-codex/gpt-6.1-sol` |
|
|
57
|
-
| `fable` | `anthropic/claude-fable-5-
|
|
57
|
+
| `fable` | `anthropic/claude-fable-5-2` | `openai/gpt-6-astra` | `openai-codex/gpt-6-astra` |
|
|
58
58
|
| `sonnet` | `anthropic/claude-sonnet-5-5` | `openai/gpt-6.1-sol` | `openai-codex/gpt-6.1-sol` |
|
|
59
59
|
| `haiku` | `anthropic/claude-haiku-5-5` | `openai/gpt-6-luna` | `openai-codex/gpt-6-luna` |
|
|
60
60
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Upstream's copies are not Prettier output, so formatting the port's copies
|
|
2
2
|
# would add lines to the fork.
|
|
3
3
|
bootstrap.ts
|
|
4
|
+
watch-pr/policy.test.ts
|
|
4
5
|
|
|
5
6
|
# The port added lines here that run past 80 columns; wrapping them grows the
|
|
6
7
|
# forked-line count.
|
|
7
|
-
watch-pr/policy.test.ts
|
|
8
8
|
watch-pr/types.compile.ts
|
|
9
9
|
|
|
10
10
|
# The check covers TypeScript. Upstream's check-plan.mjs uses tabs, and the
|