pi-t3-bridge 0.3.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (138) hide show
  1. package/overlay/overlay.json +118 -0
  2. package/package.json +14 -6
  3. package/pstack/skills/architect/SKILL.md +1 -1
  4. package/pstack/skills/arena/SKILL.md +1 -1
  5. package/pstack/skills/how/SKILL.md +1 -1
  6. package/pstack/skills/interrogate/SKILL.md +1 -1
  7. package/pstack/skills/poteto-help/SKILL.md +1 -1
  8. package/pstack/skills/poteto-mode/SKILL.md +4 -4
  9. package/pstack/skills/poteto-mode/brief.md +4 -4
  10. package/pstack/skills/poteto-mode/playbooks/autopilot-full.md +1 -1
  11. package/pstack/skills/poteto-mode/playbooks/orchestrate.md +1 -1
  12. package/pstack/skills/poteto-mode/scripts/node_modules/commander/LICENSE +22 -0
  13. package/pstack/skills/poteto-mode/scripts/node_modules/commander/Readme.md +1172 -0
  14. package/pstack/skills/poteto-mode/scripts/node_modules/commander/index.js +21 -0
  15. package/pstack/skills/poteto-mode/scripts/node_modules/commander/lib/argument.js +147 -0
  16. package/pstack/skills/poteto-mode/scripts/node_modules/commander/lib/command.js +2790 -0
  17. package/pstack/skills/poteto-mode/scripts/node_modules/commander/lib/error.js +36 -0
  18. package/pstack/skills/poteto-mode/scripts/node_modules/commander/lib/help.js +731 -0
  19. package/pstack/skills/poteto-mode/scripts/node_modules/commander/lib/option.js +377 -0
  20. package/pstack/skills/poteto-mode/scripts/node_modules/commander/lib/suggestSimilar.js +99 -0
  21. package/pstack/skills/poteto-mode/scripts/node_modules/commander/package-support.json +19 -0
  22. package/pstack/skills/poteto-mode/scripts/node_modules/commander/package.json +64 -0
  23. package/pstack/skills/poteto-mode/scripts/node_modules/commander/typings/index.d.ts +1113 -0
  24. package/pstack/skills/reflect/SKILL.md +1 -1
  25. package/pstack/skills/setup-pstack/SKILL.md +3 -3
  26. package/pstack/skills/statechart/scripts/node_modules/.package-lock.json +46 -0
  27. package/pstack/skills/statechart/scripts/node_modules/fast-check/LICENSE +21 -0
  28. package/pstack/skills/statechart/scripts/node_modules/fast-check/README.md +263 -0
  29. package/pstack/skills/statechart/scripts/node_modules/fast-check/lib/cjs/fast-check.d.ts +5165 -0
  30. package/pstack/skills/statechart/scripts/node_modules/fast-check/lib/cjs/fast-check.js +12147 -0
  31. package/pstack/skills/statechart/scripts/node_modules/fast-check/lib/cjs/package.json +3 -0
  32. package/pstack/skills/statechart/scripts/node_modules/fast-check/lib/cjs/types57/fast-check.d.ts +5165 -0
  33. package/pstack/skills/statechart/scripts/node_modules/fast-check/lib/fast-check.d.ts +5165 -0
  34. package/pstack/skills/statechart/scripts/node_modules/fast-check/lib/fast-check.js +12011 -0
  35. package/pstack/skills/statechart/scripts/node_modules/fast-check/lib/rolldown-runtime-D7D4PA-g.js +13 -0
  36. package/pstack/skills/statechart/scripts/node_modules/fast-check/lib/types57/fast-check.d.ts +5165 -0
  37. package/pstack/skills/statechart/scripts/node_modules/fast-check/package.json +94 -0
  38. package/pstack/skills/statechart/scripts/node_modules/pure-rand/LICENSE +21 -0
  39. package/pstack/skills/statechart/scripts/node_modules/pure-rand/README.md +168 -0
  40. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/RandomGenerator-DcXj09Ch.d.ts +14 -0
  41. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/distribution/uniformBigInt.d.ts +15 -0
  42. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/distribution/uniformBigInt.js +38 -0
  43. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/distribution/uniformFloat32.d.ts +15 -0
  44. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/distribution/uniformFloat32.js +18 -0
  45. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/distribution/uniformFloat64.d.ts +15 -0
  46. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/distribution/uniformFloat64.js +22 -0
  47. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/distribution/uniformInt.d.ts +15 -0
  48. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/distribution/uniformInt.js +134 -0
  49. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/RandomGenerator-DcXj09Ch.d.ts +14 -0
  50. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/distribution/uniformBigInt.d.ts +15 -0
  51. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/distribution/uniformBigInt.js +37 -0
  52. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/distribution/uniformFloat32.d.ts +15 -0
  53. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/distribution/uniformFloat32.js +17 -0
  54. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/distribution/uniformFloat64.d.ts +15 -0
  55. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/distribution/uniformFloat64.js +21 -0
  56. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/distribution/uniformInt.d.ts +15 -0
  57. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/distribution/uniformInt.js +133 -0
  58. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/generator/congruential32.d.ts +7 -0
  59. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/generator/congruential32.js +44 -0
  60. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/generator/mersenne.d.ts +7 -0
  61. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/generator/mersenne.js +90 -0
  62. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/generator/xoroshiro128plus.d.ts +7 -0
  63. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/generator/xoroshiro128plus.js +80 -0
  64. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/generator/xorshift128plus.d.ts +7 -0
  65. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/generator/xorshift128plus.js +78 -0
  66. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/package.json +3 -0
  67. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/types/JumpableRandomGenerator.d.ts +16 -0
  68. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/types/JumpableRandomGenerator.js +0 -0
  69. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/types/RandomGenerator.d.ts +2 -0
  70. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/types/RandomGenerator.js +0 -0
  71. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/utils/generateN.d.ts +6 -0
  72. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/utils/generateN.js +8 -0
  73. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/utils/purify.d.ts +12 -0
  74. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/utils/purify.js +9 -0
  75. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/utils/skipN.d.ts +6 -0
  76. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/esm/utils/skipN.js +6 -0
  77. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/generator/congruential32.d.ts +7 -0
  78. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/generator/congruential32.js +46 -0
  79. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/generator/mersenne.d.ts +7 -0
  80. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/generator/mersenne.js +92 -0
  81. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/generator/xoroshiro128plus.d.ts +7 -0
  82. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/generator/xoroshiro128plus.js +82 -0
  83. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/generator/xorshift128plus.d.ts +7 -0
  84. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/generator/xorshift128plus.js +80 -0
  85. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/types/JumpableRandomGenerator.d.ts +16 -0
  86. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/types/JumpableRandomGenerator.js +0 -0
  87. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/types/RandomGenerator.d.ts +2 -0
  88. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/types/RandomGenerator.js +0 -0
  89. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/utils/generateN.d.ts +6 -0
  90. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/utils/generateN.js +9 -0
  91. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/utils/purify.d.ts +12 -0
  92. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/utils/purify.js +10 -0
  93. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/utils/skipN.d.ts +6 -0
  94. package/pstack/skills/statechart/scripts/node_modules/pure-rand/lib/utils/skipN.js +7 -0
  95. package/pstack/skills/statechart/scripts/node_modules/pure-rand/package.json +133 -0
  96. package/pstack/skills/statechart/scripts/run.ts +1 -1
  97. package/pstack/skills/swarm/SKILL.md +1 -1
  98. package/pstack/skills/why/SKILL.md +1 -1
  99. package/src/bridge/accounts.ts +2 -2
  100. package/src/bridge/ask.ts +2 -2
  101. package/src/bridge/bash-timeout.ts +1 -1
  102. package/src/bridge/bridge-trim.ts +16 -21
  103. package/src/bridge/config.ts +2 -2
  104. package/src/bridge/plan.ts +1 -1
  105. package/src/bridge/resume.ts +2 -2
  106. package/src/bridge/state.ts +2 -2
  107. package/src/bridge/steer-judge.ts +2 -2
  108. package/src/bridge/steer-transcript.ts +1 -1
  109. package/src/bridge/steer.ts +1 -1
  110. package/src/bridge/t3-json.ts +2 -2
  111. package/src/bridge/tasks.ts +2 -2
  112. package/src/bridge/thread.ts +1 -1
  113. package/src/bridge/transcript.ts +2 -2
  114. package/src/pstack/brief.ts +1 -1
  115. package/src/pstack/child.ts +1 -1
  116. package/src/pstack/models.ts +2 -2
  117. package/src/pstack/overlay.ts +251 -0
  118. package/src/pstack/resources.ts +16 -2
  119. package/src/pstack/results.ts +1 -1
  120. package/src/pstack/sandbox.ts +1 -1
  121. package/src/pstack/session.ts +4 -24
  122. package/tstack/LICENSE +21 -0
  123. package/tstack/README.md +53 -0
  124. package/tstack/skills/babysit-pr/SKILL.md +117 -0
  125. package/tstack/skills/babysit-pr/scripts/pr-wait +556 -0
  126. package/tstack/skills/council/SKILL.md +56 -0
  127. package/tstack/skills/file-pr/SKILL.md +50 -0
  128. package/tstack/skills/full-send/SKILL.md +123 -0
  129. package/tstack/skills/full-send/agents/openai.yaml +4 -0
  130. package/tstack/skills/full-stop/SKILL.md +47 -0
  131. package/tstack/skills/full-stop/agents/openai.yaml +4 -0
  132. package/tstack/skills/leaving-pr-comments/SKILL.md +44 -0
  133. package/tstack/skills/leaving-pr-comments/agents/openai.yaml +4 -0
  134. package/tstack/skills/modernize/SKILL.md +102 -0
  135. package/tstack/skills/modernize/agents/openai.yaml +4 -0
  136. package/tstack/skills/sol-loop/SKILL.md +119 -0
  137. package/tstack/skills/takeover/SKILL.md +42 -0
  138. package/tstack.ts +21 -0
@@ -0,0 +1,118 @@
1
+ {
2
+ "version": 1,
3
+ "global": [
4
+ {
5
+ "find": "~/.config/t3-pstack/models.md",
6
+ "replace": "~/.config/pi-t3-bridge/models.md"
7
+ },
8
+ {
9
+ "find": "$XDG_CONFIG_HOME/t3-pstack/models.md",
10
+ "replace": "$XDG_CONFIG_HOME/pi-t3-bridge/models.md"
11
+ },
12
+ {
13
+ "find": "${XDG_STATE_HOME:-~/.local/state}/t3-pstack/",
14
+ "replace": "${XDG_STATE_HOME:-~/.local/state}/pi-t3-bridge/"
15
+ },
16
+ {
17
+ "find": "~/.local/state/t3-pstack/ledger.jsonl",
18
+ "replace": "~/.local/state/pi-t3/ledger.jsonl"
19
+ },
20
+ {
21
+ "find": "\"Checked by t3-pstack\"",
22
+ "replace": "\"Checked by pi-t3-bridge\""
23
+ },
24
+ {
25
+ "find": "t3-pstack's session-start hook",
26
+ "replace": "pi-t3-bridge's session-start hook"
27
+ }
28
+ ],
29
+ "shared": [
30
+ {
31
+ "files": [
32
+ "skills/architect/SKILL.md",
33
+ "skills/arena/SKILL.md",
34
+ "skills/how/SKILL.md",
35
+ "skills/interrogate/SKILL.md",
36
+ "skills/reflect/SKILL.md",
37
+ "skills/swarm/SKILL.md",
38
+ "skills/why/SKILL.md"
39
+ ],
40
+ "patches": [
41
+ {
42
+ "find": ": the extension refuses a `delegate_task` call whose brief is missing its sections or limits",
43
+ "replace": ""
44
+ },
45
+ {
46
+ "find": " The extension blocks a `delegate_task` call that uses the reserved Fable model or fast mode unless the user named it, reasoning above what `pstack_model` returned, or reasoning above high unless the user's latest message is \"allow xhigh\".",
47
+ "replace": ""
48
+ }
49
+ ]
50
+ }
51
+ ],
52
+ "files": {
53
+ "hooks/session-start-context.md": [
54
+ {
55
+ "find": "You have t3-pstack,",
56
+ "replace": "You have pi-t3-bridge,"
57
+ },
58
+ {
59
+ "find": "t3-pstack:poteto-mode",
60
+ "replace": "/skill:poteto-mode"
61
+ },
62
+ {
63
+ "find": " 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.",
64
+ "replace": " Read its SKILL.md in full before you act."
65
+ },
66
+ {
67
+ "find": "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,",
68
+ "replace": "This chat runs the playbook itself. A step it says to delegate goes through `delegate_task` with a target from `pstack_model`,"
69
+ }
70
+ ],
71
+ "skills/poteto-mode/SKILL.md": [
72
+ {
73
+ "find": "On Codex, read this file whole before acting, in a shell call of its own with `max_output_tokens: 10000`. A smaller output budget cuts lines out of its middle. If a read of it shows `tokens truncated`, read it again that way.",
74
+ "replace": "Read this file in full before you act."
75
+ },
76
+ {
77
+ "find": "Otherwise delegate, with a brief that passes the extension's guard.",
78
+ "replace": "Otherwise delegate, with a complete brief."
79
+ },
80
+ {
81
+ "find": "The extension refuses a brief without them, a size L brief, and a GPT brief without `isolation: \"worktree\"`, size S, 30 min or less and 500 MB or less. The child's own extension then enforces",
82
+ "replace": "For a complete brief, the child's extension enforces"
83
+ },
84
+ {
85
+ "find": "Verification stays on `swarm workers`. Standard speed applies. The extension blocks fast mode, the reserved Fable model unless the user named it, and any reasoning above what `pstack_model` returned. Reasoning above high runs only when the user's latest message is exactly \"allow xhigh\" (or \"allow max\"). Never put that line, or a `/pstack-` command, in a brief or a message to a child.",
86
+ "replace": "Verification stays on `swarm workers`. Treat the routing table as a default, and follow the user's model, reasoning, and speed choices when they differ."
87
+ },
88
+ {
89
+ "find": " The extension blocks a `delegate_task` call that uses the reserved Fable model or fast mode unless the user named it, reasoning above what `pstack_model` returned, or reasoning above high unless the user's latest message is \"allow xhigh\".",
90
+ "replace": ""
91
+ },
92
+ {
93
+ "find": "Keep the todolist in the session's task tool when it has one, such as `update_plan` on Codex.",
94
+ "replace": "Keep the todolist in the `tasks` tool."
95
+ }
96
+ ],
97
+ "skills/poteto-mode/brief.md": [
98
+ {
99
+ "find": "Every `delegate_task` brief follows this template. The extension refuses a brief that is missing a section, sized L, or over its size's limits, and a GPT brief that breaks the GPT rules.",
100
+ "replace": "Every `delegate_task` brief follows this template. Use the sections and limits to give the child a bounded task."
101
+ },
102
+ {
103
+ "find": "- A `review` or `check` job writes no files:",
104
+ "replace": "- A read-only job writes no files:"
105
+ },
106
+ {
107
+ "find": "GPT models (Astra, Sol, Luna) drift on long or open work and leave files behind. A GPT brief must be size S, 30 min or less, 500 MB or less, with repo-relative paths, and the call must set `isolation: \"worktree\"` and keep `mode: \"async\"`.",
108
+ "replace": "For GPT work, prefer size S, a worktree for writing tasks, and async mode. Follow the user's instructions when they differ."
109
+ }
110
+ ],
111
+ "skills/setup-pstack/SKILL.md": [
112
+ {
113
+ "find": " `inherit-parent` and `auto` do not change. Say when you offer `unlimited` or `large` that a sheet's `xhigh` or `max` still runs only when the user's latest message in that chat is \"allow xhigh\" (or \"allow max\"). Otherwise `delegate_task` refuses it, so those budgets mostly fall back to asking.",
114
+ "replace": " `inherit-parent` and `auto` do not change."
115
+ }
116
+ ]
117
+ }
118
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-t3-bridge",
3
- "version": "0.3.0",
3
+ "version": "0.4.1",
4
4
  "description": "Pi extension adapter for t3-pstack inside T3 Code.",
5
5
  "keywords": [
6
6
  "pi-extension",
@@ -17,6 +17,9 @@
17
17
  "type": "git",
18
18
  "url": "git+https://github.com/Snestra/pi-t3-bridge.git"
19
19
  },
20
+ "workspaces": [
21
+ "pstack/skills/statechart/scripts"
22
+ ],
20
23
  "files": [
21
24
  "bridge.ts",
22
25
  "pstack.ts",
@@ -32,7 +35,10 @@
32
35
  "!pstack/**/*.test.ts",
33
36
  "!pstack/**/*.test-helper.ts",
34
37
  "!pstack/**/test-utils",
35
- "LICENSE"
38
+ "overlay",
39
+ "LICENSE",
40
+ "tstack.ts",
41
+ "tstack"
36
42
  ],
37
43
  "type": "module",
38
44
  "scripts": {
@@ -40,7 +46,7 @@
40
46
  "fix": "ultracite fix",
41
47
  "doctor": "ultracite doctor",
42
48
  "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"
49
+ "typecheck": "tsc --project tsconfig.json && tsc --project pstack/skills/poteto-mode/scripts/watch-pr/tsconfig.json && tsc --project pstack/skills/statechart/scripts/tsconfig.json"
44
50
  },
45
51
  "dependencies": {
46
52
  "commander": "^15.0.0",
@@ -48,8 +54,8 @@
48
54
  "pele": "1.13.0"
49
55
  },
50
56
  "devDependencies": {
51
- "@earendil-works/pi-ai": "1.4.0",
52
- "@earendil-works/pi-coding-agent": "1.4.0",
57
+ "@earendil-works/pi-ai": "1.5.0",
58
+ "@earendil-works/pi-coding-agent": "1.5.0",
53
59
  "@types/node": "^26.6.5",
54
60
  "oxfmt": "^0.74.0",
55
61
  "oxlint": "^1.89.0",
@@ -74,10 +80,12 @@
74
80
  "pi": {
75
81
  "extensions": [
76
82
  "./bridge.ts",
83
+ "./tstack.ts",
77
84
  "./pstack.ts"
78
85
  ]
79
86
  },
80
87
  "upstreams": {
81
- "t3": "0.1.5-nightly.20261029.3877"
88
+ "t3": "0.1.5-nightly.20261029.3877",
89
+ "tstack": "1085050f3baed1ac724caa4a8166145fb2ac88af"
82
90
  }
83
91
  }
@@ -80,6 +80,6 @@ The caller's usage is written first and the type sketch derived from it. One fil
80
80
 
81
81
  ## Models
82
82
 
83
- Get every target from the `pstack_model` tool. Pass the role name plus the job type and size from the routing table in poteto-mode's Subagents section. This skill's spawns are `design` jobs. Write every brief from `<plugin root>/skills/poteto-mode/brief.md`. Without a job, pass the complexity: `groundwork` for cheap mechanical work, `bounded` for involved but bounded work, `general` for work that needs substantial judgment. The tool reads the role's line in the model sheet (`~/.config/pi-t3-bridge/models.md`, written by `/setup-pstack`). A line naming a model is used as written, moved to a provider T3 can run right now when needed. A role with no line, or `inherit-parent` or `auto`, is routed by this extension's `models.json`: the parent's model family, sized and reasoned by complexity, and for panels one seat per family. Pass each returned target as `delegate_task`'s `target`. `inherit-parent` means omit `target`. `blocked` means the panel cannot reach two model families on this T3, so record its reason.
83
+ Get every target from the `pstack_model` tool. Pass the role name plus the job type and size from the routing table in poteto-mode's Subagents section. This skill's spawns are `design` jobs. Write every brief from `<plugin root>/skills/poteto-mode/brief.md`: the extension refuses a `delegate_task` call whose brief is missing its sections or limits. Without a job, pass the complexity: `groundwork` for cheap mechanical work, `bounded` for involved but bounded work, `general` for work that needs substantial judgment. The tool reads the role's line in the model sheet (`~/.config/t3-pstack/models.md`, written by `/setup-pstack`). A line naming a model is used as written, moved to a provider T3 can run right now when needed. A role with no line, or `inherit-parent` or `auto`, is routed by this extension's `models.json`: the parent's model family, sized and reasoned by complexity, and for panels one seat per family. The extension blocks a `delegate_task` call that uses the reserved Fable model or fast mode unless the user named it, reasoning above what `pstack_model` returned, or reasoning above high unless the user's latest message is "allow xhigh". Pass each returned target as `delegate_task`'s `target`. `inherit-parent` means omit `target`. `blocked` means the panel cannot reach two model families on this T3, so record its reason.
84
84
 
85
85
  - architect runners: panel, one seat per model family
@@ -49,7 +49,7 @@ One synthesized artifact, with a short synthesis note alongside naming the base
49
49
 
50
50
  ## Models
51
51
 
52
- Get every target from the `pstack_model` tool. Pass the role name plus the job type and size from the routing table in poteto-mode's Subagents section. This skill's spawns are `design` jobs, and the cross-judge a `review` job. Write every brief from `<plugin root>/skills/poteto-mode/brief.md`. Without a job, pass the complexity: `groundwork` for cheap mechanical work, `bounded` for involved but bounded work, `general` for work that needs substantial judgment. The tool reads the role's line in the model sheet (`~/.config/pi-t3-bridge/models.md`, written by `/setup-pstack`). A line naming a model is used as written, moved to a provider T3 can run right now when needed. A role with no line, or `inherit-parent` or `auto`, is routed by this extension's `models.json`: the parent's model family, sized and reasoned by complexity, and for panels one seat per family. Pass each returned target as `delegate_task`'s `target`. `inherit-parent` means omit `target`. `blocked` means the panel cannot reach two model families on this T3, so record its reason.
52
+ Get every target from the `pstack_model` tool. Pass the role name plus the job type and size from the routing table in poteto-mode's Subagents section. This skill's spawns are `design` jobs, and the cross-judge a `review` job. Write every brief from `<plugin root>/skills/poteto-mode/brief.md`: the extension refuses a `delegate_task` call whose brief is missing its sections or limits. Without a job, pass the complexity: `groundwork` for cheap mechanical work, `bounded` for involved but bounded work, `general` for work that needs substantial judgment. The tool reads the role's line in the model sheet (`~/.config/t3-pstack/models.md`, written by `/setup-pstack`). A line naming a model is used as written, moved to a provider T3 can run right now when needed. A role with no line, or `inherit-parent` or `auto`, is routed by this extension's `models.json`: the parent's model family, sized and reasoned by complexity, and for panels one seat per family. The extension blocks a `delegate_task` call that uses the reserved Fable model or fast mode unless the user named it, reasoning above what `pstack_model` returned, or reasoning above high unless the user's latest message is "allow xhigh". Pass each returned target as `delegate_task`'s `target`. `inherit-parent` means omit `target`. `blocked` means the panel cannot reach two model families on this T3, so record its reason.
53
53
 
54
54
  - arena runners: panel, one seat per model family
55
55
  - arena cross-judge pool: panel, one seat per model family
@@ -37,7 +37,7 @@ The explanation uses the sections defined in `references/explainer-prompt.md`, d
37
37
 
38
38
  ## Models
39
39
 
40
- Get every target from the `pstack_model` tool. Pass the role name plus the job type and size from the routing table in poteto-mode's Subagents section. This skill's spawns are `research` jobs, size S or M. Write every brief from `<plugin root>/skills/poteto-mode/brief.md`. Without a job, pass the complexity: `groundwork` for cheap mechanical work, `bounded` for involved but bounded work, `general` for work that needs substantial judgment. The tool reads the role's line in the model sheet (`~/.config/pi-t3-bridge/models.md`, written by `/setup-pstack`). A line naming a model is used as written, moved to a provider T3 can run right now when needed. A role with no line, or `inherit-parent` or `auto`, is routed by this extension's `models.json`: the parent's model family, sized and reasoned by complexity, and for panels one seat per family. Pass each returned target as `delegate_task`'s `target`. `inherit-parent` means omit `target`. `blocked` means the panel cannot reach two model families on this T3, so record its reason.
40
+ Get every target from the `pstack_model` tool. Pass the role name plus the job type and size from the routing table in poteto-mode's Subagents section. This skill's spawns are `research` jobs, size S or M. Write every brief from `<plugin root>/skills/poteto-mode/brief.md`: the extension refuses a `delegate_task` call whose brief is missing its sections or limits. Without a job, pass the complexity: `groundwork` for cheap mechanical work, `bounded` for involved but bounded work, `general` for work that needs substantial judgment. The tool reads the role's line in the model sheet (`~/.config/t3-pstack/models.md`, written by `/setup-pstack`). A line naming a model is used as written, moved to a provider T3 can run right now when needed. A role with no line, or `inherit-parent` or `auto`, is routed by this extension's `models.json`: the parent's model family, sized and reasoned by complexity, and for panels one seat per family. The extension blocks a `delegate_task` call that uses the reserved Fable model or fast mode unless the user named it, reasoning above what `pstack_model` returned, or reasoning above high unless the user's latest message is "allow xhigh". Pass each returned target as `delegate_task`'s `target`. `inherit-parent` means omit `target`. `blocked` means the panel cannot reach two model families on this T3, so record its reason.
41
41
 
42
42
  - how explorer: one target
43
43
  - how explainer: one target
@@ -32,6 +32,6 @@ Skip arena Phases C, D, and E. Adversaries find different failures, so the verdi
32
32
 
33
33
  ## Models
34
34
 
35
- Get every target from the `pstack_model` tool. Pass the role name plus the job type and size from the routing table in poteto-mode's Subagents section. This skill's spawns are `review` jobs, size S or M. Write every brief from `<plugin root>/skills/poteto-mode/brief.md`. Without a job, pass the complexity: `groundwork` for cheap mechanical work, `bounded` for involved but bounded work, `general` for work that needs substantial judgment. The tool reads the role's line in the model sheet (`~/.config/pi-t3-bridge/models.md`, written by `/setup-pstack`). A line naming a model is used as written, moved to a provider T3 can run right now when needed. A role with no line, or `inherit-parent` or `auto`, is routed by this extension's `models.json`: the parent's model family, sized and reasoned by complexity, and for panels one seat per family. Pass each returned target as `delegate_task`'s `target`. `inherit-parent` means omit `target`. `blocked` means the panel cannot reach two model families on this T3, so record its reason.
35
+ Get every target from the `pstack_model` tool. Pass the role name plus the job type and size from the routing table in poteto-mode's Subagents section. This skill's spawns are `review` jobs, size S or M. Write every brief from `<plugin root>/skills/poteto-mode/brief.md`: the extension refuses a `delegate_task` call whose brief is missing its sections or limits. Without a job, pass the complexity: `groundwork` for cheap mechanical work, `bounded` for involved but bounded work, `general` for work that needs substantial judgment. The tool reads the role's line in the model sheet (`~/.config/t3-pstack/models.md`, written by `/setup-pstack`). A line naming a model is used as written, moved to a provider T3 can run right now when needed. A role with no line, or `inherit-parent` or `auto`, is routed by this extension's `models.json`: the parent's model family, sized and reasoned by complexity, and for panels one seat per family. The extension blocks a `delegate_task` call that uses the reserved Fable model or fast mode unless the user named it, reasoning above what `pstack_model` returned, or reasoning above high unless the user's latest message is "allow xhigh". Pass each returned target as `delegate_task`'s `target`. `inherit-parent` means omit `target`. `blocked` means the panel cannot reach two model families on this T3, so record its reason.
36
36
 
37
37
  - interrogate reviewers: panel, one seat per model family
@@ -24,7 +24,7 @@ Infer the need from the message and the conversation. A named situation, such as
24
24
 
25
25
  Check the state that changes the answer, and mention it only when it does:
26
26
 
27
- - No model sheet (`~/.config/pi-t3-bridge/models.md`, see `/setup-pstack`) means `/setup-pstack` hasn't run for this user, so every role uses its default model.
27
+ - No model sheet (`~/.config/t3-pstack/models.md`, see `/setup-pstack`) means `/setup-pstack` hasn't run for this user, so every role uses its default model.
28
28
  - No `verify-*` skill or other app harness in the project means agents have no scripted way to drive the app. Mention `/create-verification-skill` when the question is about proving a change works.
29
29
  - No formal verification skill in the project means no property is checked past what tests reach. Mention `/create-formal-verification-skill` when the question is about a race, an invariant, or another case tests rarely hit. When one exists and the code it covers changed after the commit it records as last in sync, mention `/maintain-formal-verification-skill` if the question touches that code.
30
30
 
@@ -94,13 +94,13 @@ Read the leaf skill in full for any principle you apply. Each entry names when i
94
94
 
95
95
  **Brief any subagent you spawn inside a playbook step as a `poteto-agent`** (code-writing delegates, ad-hoc helpers). The chat that receives `/poteto-mode` runs the playbook. Never spawn a `poteto-agent` to run the playbook itself. Routed workflow skills (`how`, `why`, `interrogate`, `reflect`, `swarm`) set their own brief and role for diverse-model review. Respect what the skill prescribes, don't override to `poteto-agent`.
96
96
 
97
- **Do it yourself, or delegate.** Do the work in this chat when any of these holds: you can't write an acceptance command that fails on wrong work (judgment, a design choice, prose for the user, a call only the user can make); the brief would take longer than the work (one file, under about 15 minutes or 50 changed lines); the work needs context from this chat that isn't in a file yet; you are checking a child's result; or a child already failed the same task twice, so the third attempt is yours or a split into smaller tasks. Otherwise delegate, with a complete brief.
97
+ **Do it yourself, or delegate.** Do the work in this chat when any of these holds: you can't write an acceptance command that fails on wrong work (judgment, a design choice, prose for the user, a call only the user can make); the brief would take longer than the work (one file, under about 15 minutes or 50 changed lines); the work needs context from this chat that isn't in a file yet; you are checking a child's result; or a child already failed the same task twice, so the third attempt is yours or a split into smaller tasks. Otherwise delegate, with a brief that passes the extension's guard.
98
98
 
99
- **Every brief follows `<plugin root>/skills/poteto-mode/brief.md`.** It has a header with the job type, size (S or M), time limit and disk limit, then Goal, Acceptance command, Files you may write, Non-goals, Context, Stop conditions and Report. For a complete brief, the child's extension enforces the file list, a write sandbox, the time and disk limits, and red before green, and appends a report block written from commands it ran. Check a result by running its acceptance command, `git status --porcelain` against the file list, and `du -sk` yourself. Never judge a result by rereading the work.
99
+ **Every brief follows `<plugin root>/skills/poteto-mode/brief.md`.** It has a header with the job type, size (S or M), time limit and disk limit, then Goal, Acceptance command, Files you may write, Non-goals, Context, Stop conditions and Report. The extension refuses a brief without them, a size L brief, and a GPT brief without `isolation: "worktree"`, size S, 30 min or less and 500 MB or less. The child's own extension then enforces the file list, a write sandbox, the time and disk limits, and red before green, and appends a report block written from commands it ran. Check a result by running its acceptance command, `git status --porcelain` against the file list, and `du -sk` yourself. Never judge a result by rereading the work.
100
100
 
101
101
  **Defaults for every `delegate_task` call.** `mode: "async"` (a steer or resume of a running child, a `t3_thread_send`, gets no `t3_thread_wait` either, because a waiting call holds your turn while other reports wait), full tool access (a read-only child gets "inspect only, change no file" in its brief), file pointers not inlined context, a `target` from `pstack_model` per job (see [Models](#models)). Code delegates tier by job type and size from the routing table: the hardest changes (cross-cutting design, gnarly concurrency, subtle algorithms) are job `hard`, and trivial mechanical edits are job `mechanical`. Per-role lines in the model sheet that `/setup-pstack` writes override these defaults and the model choices in the routed skills (`how`, `why`, `arena`, `swarm`, `architect`, `interrogate`, `reflect`). A role with no line keeps its default, and a role line of `inherit-parent` or `auto` runs that role on the parent chat model (omit `target`). Each code playbook's configured model comes from its line (`feature, refactoring`, `bug-fix`, `perf-issue`, or `hillclimb`), and the hardest changes read `hardest tasks`. Prose and judgment read `judgment and prose`.
102
102
 
103
- **Match the model to the job.** Before each spawn, call `pstack_model` with the role, the job type and the size. The routing table picks the tier, model and reasoning, routes around accounts that are out of usage, and keeps a panel's families diverse. Verification stays on `swarm workers`. Treat the routing table as a default, and follow the user's model, reasoning, and speed choices when they differ.
103
+ **Match the model to the job.** Before each spawn, call `pstack_model` with the role, the job type and the size. The routing table picks the tier, model and reasoning, routes around accounts that are out of usage, and keeps a panel's families diverse. Verification stays on `swarm workers`. Standard speed applies. The extension blocks fast mode, the reserved Fable model unless the user named it, and any reasoning above what `pstack_model` returned. Reasoning above high runs only when the user's latest message is exactly "allow xhigh" (or "allow max"). Never put that line, or a `/pstack-` command, in a brief or a message to a child.
104
104
 
105
105
  | Job | S | M |
106
106
  |---|---|---|
@@ -176,7 +176,7 @@ A large or cross-cutting effort (a migration across many call sites, an ambitiou
176
176
 
177
177
  ## Models
178
178
 
179
- Get every target from the `pstack_model` tool. Pass the role name, the job type and the size from the routing table under [Subagents](#subagents). Without a job, pass the complexity instead: `groundwork` for cheap mechanical work, `bounded` for involved but bounded work, `general` for work that needs substantial judgment. The tool reads the role's line in the model sheet (`~/.config/pi-t3-bridge/models.md`, written by `/setup-pstack`). A line naming a model is used as written, moved to a provider T3 can run right now when needed. When that line names no reasoning level, the job's complexity sets it, as for routed roles. A role with no line, or `inherit-parent` or `auto`, is routed by this extension's `models.json`: the parent's model family, sized and reasoned by complexity, and for panels one seat per family. Pass each returned target as `delegate_task`'s `target`. `inherit-parent` means omit `target`. `blocked` means the panel cannot reach two model families on this T3, so record its reason.
179
+ Get every target from the `pstack_model` tool. Pass the role name, the job type and the size from the routing table under [Subagents](#subagents). Without a job, pass the complexity instead: `groundwork` for cheap mechanical work, `bounded` for involved but bounded work, `general` for work that needs substantial judgment. The tool reads the role's line in the model sheet (`~/.config/t3-pstack/models.md`, written by `/setup-pstack`). A line naming a model is used as written, moved to a provider T3 can run right now when needed. When that line names no reasoning level, the job's complexity sets it, as for routed roles. A role with no line, or `inherit-parent` or `auto`, is routed by this extension's `models.json`: the parent's model family, sized and reasoned by complexity, and for panels one seat per family. The extension blocks a `delegate_task` call that uses the reserved Fable model or fast mode unless the user named it, reasoning above what `pstack_model` returned, or reasoning above high unless the user's latest message is "allow xhigh". Pass each returned target as `delegate_task`'s `target`. `inherit-parent` means omit `target`. `blocked` means the panel cannot reach two model families on this T3, so record its reason.
180
180
 
181
181
  - feature, refactoring: one target
182
182
  - bug-fix: one target
@@ -1,6 +1,6 @@
1
1
  # Delegation brief
2
2
 
3
- Every `delegate_task` brief follows this template. Use the sections and limits to give the child a bounded task. A persona line ("Read `<plugin root>/agents/<name>.md` in full and act as it says") may come before `# Task:`.
3
+ Every `delegate_task` brief follows this template. The extension refuses a brief that is missing a section, sized L, or over its size's limits, and a GPT brief that breaks the GPT rules. A persona line ("Read `<plugin root>/agents/<name>.md` in full and act as it says") may come before `# Task:`.
4
4
 
5
5
  Fill each `<...>`. Keep the headings exactly as written.
6
6
 
@@ -53,7 +53,7 @@ ISSUES or BLOCKED: one line each with file:line and the command that shows it
53
53
 
54
54
  - For `mechanical`, `implement` and `hard` jobs it must fail before the change. The child's extension runs it first. If it already passes, the child stops with BLOCKED, because the command checks nothing.
55
55
  - It must fail on wrong work, not only on a crash. A script that compares nothing and exits 0 is not an acceptance command. Pass the arguments it needs, and assert on its output when it prints a verdict.
56
- - A read-only job writes no files: list `- none` under "Files you may write". Its acceptance command checks the report exists or reruns the commands under review.
56
+ - A `review` or `check` job writes no files: list `- none` under "Files you may write". Its acceptance command checks the report exists or reruns the commands under review.
57
57
  - Allow the tool caches the command needs. A brief that forbids `~/.cache/uv` stops `uv sync`.
58
58
 
59
59
  ## What the child's extension enforces
@@ -63,8 +63,8 @@ The child's own pstack extension reads this brief from its first message and enf
63
63
  - Every shell command runs in a macOS sandbox that can write only to the workdir, its git directory, the tool caches and the system temp folder.
64
64
  - `write` and `edit` only touch the listed files and `.scratch/`.
65
65
  - Shell timeouts stop at the time limit. After it, or past the disk limit, every tool is refused and the child can only report.
66
- - When the child ends its turn, the extension reruns the acceptance command, `git status` and `du`, and appends a "Checked by pi-t3-bridge" block with the real exit codes and STATUS. It also writes a ledger line to `~/.local/state/pi-t3/ledger.jsonl`.
66
+ - When the child ends its turn, the extension reruns the acceptance command, `git status` and `du`, and appends a "Checked by t3-pstack" block with the real exit codes and STATUS. It also writes a ledger line to `~/.local/state/t3-pstack/ledger.jsonl`.
67
67
 
68
68
  ## GPT rules
69
69
 
70
- For GPT work, prefer size S, a worktree for writing tasks, and async mode. Follow the user's instructions when they differ.
70
+ GPT models (Astra, Sol, Luna) drift on long or open work and leave files behind. A GPT brief must be size S, 30 min or less, 500 MB or less, with repo-relative paths, and the call must set `isolation: "worktree"` and keep `mode: "async"`.
@@ -9,7 +9,7 @@ A verdict covers one patch and green CI covers one head. Step 4 runs a full swar
9
9
 
10
10
  Open the PR early so CI and bots run alongside the work. The code is ready only after the slop-strip (the **deslop** skill, `/deslop`) and the `/no-comments` pass, so the full swarm runs on finished code. Then rebase onto current trunk and report the code-ready head before self-proof, so verification runs on the base the patch lands on. Report every later head, and merge-ready once self-proof, CI, and babysit are done. Fix rounds stay on that base unless trunk conflicts, breaks CI, or lands a known concurrent change to the same files, because each rebase restarts CI. Run the repo's checks for the touched paths on the committed head before the code-ready push and before a later push that needs a verifier.
11
11
 
12
- Assume the owner's session dies. Soon after starting, push and start a decision trail in the root's store, `${XDG_STATE_HOME:-~/.local/state}/pi-t3-bridge/` (T3 names no agent store), per the **show-me-your-work** skill, then push each finished unit before you start the next. Whoever spawns a subagent records its id, state, and a stuck-after runtime from past runs of its kind in that store, so the root can probe it if the parent dies. Force-push only your own branch, with `--force-with-lease` pinned to the SHA you last pushed or took over, and on any push you did not make, stop and report to the root.
12
+ Assume the owner's session dies. Soon after starting, push and start a decision trail in the root's store, `${XDG_STATE_HOME:-~/.local/state}/t3-pstack/` (T3 names no agent store), per the **show-me-your-work** skill, then push each finished unit before you start the next. Whoever spawns a subagent records its id, state, and a stuck-after runtime from past runs of its kind in that store, so the root can probe it if the parent dies. Force-push only your own branch, with `--force-with-lease` pinned to the SHA you last pushed or took over, and on any push you did not make, stop and report to the root.
13
13
  3. **Run owners in parallel off trunk, never stacked,** so each PR lands on its own.
14
14
  4. **Swarm-verify once.** A full swarm runs once, at the code-ready head. Another full swarm runs only for new behavior, a redesign, or a large new diff. A rebase, a merge-conflict resolution, or a minor fix gets a single verifier at the new head, and a wording-only change gets none. Fan out independent verifiers at the code-ready SHA per the **swarm** skill, as `delegate_task` children assigned round-robin over the `interrogate reviewers` entries, so the lanes span model families. They re-run the gates, prove the load-bearing behavior live on the real surface through its control skill (see poteto-mode's Non-negotiables) or a named driver, and audit the diff. The verdict is not clean without the live lane, or before you audit the merge-ready report's receipts, because no lane trusts a claim it has not checked.
15
15
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  **You run the program, never the code. Decide which agent does each piece of work, then check what each one produces.** For a standing project handed to one coordinator chat: multi-day, many stacked PRs, dozens to hundreds of subagents, few human turns. One task driven to a predicate is Autonomous run. One ambitious run that needs a bespoke workflow is figure-it-out. Work that one agent could finish inside the session's budget is not a program.
4
4
 
5
- Run it with your own tools. Spawn workers with `delegate_task`. Keep the program's state in `${XDG_STATE_HOME:-~/.local/state}/pi-t3-bridge/orchestrate/<project-slug>/`, with the tracker in its `notes.md`. Watch each PR with `watch_pull_request` when this thread has it. It wakes this thread on failed checks, passed required checks, new comments or reviews, and conflicts. Call no scripts, run no polling loops, and never relay messages or status between agents.
5
+ Run it with your own tools. Spawn workers with `delegate_task`. Keep the program's state in `${XDG_STATE_HOME:-~/.local/state}/t3-pstack/orchestrate/<project-slug>/`, with the tracker in its `notes.md`. Watch each PR with `watch_pull_request` when this thread has it. It wakes this thread on failed checks, passed required checks, new comments or reviews, and conflicts. Call no scripts, run no polling loops, and never relay messages or status between agents.
6
6
 
7
7
  #### Topology
8
8
 
@@ -0,0 +1,22 @@
1
+ (The MIT License)
2
+
3
+ Copyright (c) 2011 TJ Holowaychuk <tj@vision-media.ca>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ 'Software'), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
20
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.