pi-btw 0.4.1 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-btw",
3
- "version": "0.4.1",
3
+ "version": "0.6.0",
4
4
  "description": "A pi extension for parallel side conversations with /btw",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -22,6 +22,7 @@
22
22
  ],
23
23
  "files": [
24
24
  "extensions",
25
+ "skills",
25
26
  "docs",
26
27
  "README.md",
27
28
  "LICENSE"
@@ -30,7 +31,8 @@
30
31
  "access": "public"
31
32
  },
32
33
  "scripts": {
33
- "test": "vitest --run"
34
+ "test": "vitest --run",
35
+ "typecheck": "tsc --noEmit"
34
36
  },
35
37
  "pi": {
36
38
  "extensions": [
@@ -42,11 +44,14 @@
42
44
  "image": "https://raw.githubusercontent.com/dbachelder/pi-btw/main/docs/btw-overlay.png"
43
45
  },
44
46
  "peerDependencies": {
45
- "@earendil-works/pi-ai": ">=0.74.0 <1",
46
- "@earendil-works/pi-coding-agent": ">=0.74.0 <1",
47
- "@earendil-works/pi-tui": ">=0.74.0 <1"
47
+ "@earendil-works/pi-ai": ">=0.85.1 <1",
48
+ "@earendil-works/pi-coding-agent": ">=0.85.1 <1",
49
+ "@earendil-works/pi-tui": ">=0.85.1 <1"
48
50
  },
49
51
  "devDependencies": {
52
+ "@earendil-works/pi-ai": "0.85.1",
53
+ "@earendil-works/pi-coding-agent": "0.85.1",
54
+ "@earendil-works/pi-tui": "0.85.1",
50
55
  "typescript": "^6.0.2",
51
56
  "vitest": "^4.1.0"
52
57
  }
@@ -0,0 +1,200 @@
1
+ ---
2
+ name: btw
3
+ description: Helps you use the /btw side-conversation workflow effectively. Use when you want to think in parallel, ask side questions without interrupting ongoing work, or inject a side thread back into the main agent.
4
+ ---
5
+
6
+ # BTW
7
+
8
+ Use this skill when the user wants to work in parallel with the main agent instead of derailing the current turn.
9
+
10
+ ## When to use BTW
11
+
12
+ Prefer the BTW workflow when the user wants to:
13
+
14
+ - ask a side question while the main agent keeps working
15
+ - brainstorm or compare options without interrupting the current run
16
+ - prepare a plan or summary before handing it back to the main agent
17
+ - keep exploratory discussion out of the main transcript/context
18
+
19
+ ## Commands
20
+
21
+ Use these commands in your guidance to the user:
22
+
23
+ ```text
24
+ /btw <question>
25
+ /side <question>
26
+ /btw --save <question>
27
+ /btw:new [question]
28
+ /btw:tangent <question>
29
+ /btw:tangent --save <question>
30
+ /btw:ask <question>
31
+ /btw:ask --save <question>
32
+ /btw:clear
33
+ /btw:model [<provider> <model> <api> | clear]
34
+ /btw:thinking [<level> | clear]
35
+ /btw:inject [instructions]
36
+ /btw:summarize [instructions]
37
+ ```
38
+
39
+ `/side` is an alias for `/btw` and shares the same thread, overlay, and settings. `/btw` is canonical; the lifecycle commands stay in the `/btw:*` namespace.
40
+
41
+ ## How to guide the user
42
+
43
+ ### For a quick side question
44
+
45
+ Recommend:
46
+
47
+ ```text
48
+ /btw <question>
49
+ ```
50
+
51
+ Use this when the user wants an immediate aside and does not need a visible saved note.
52
+
53
+ Users coming from Codex may reach for `/side` instead; it is an alias for `/btw` and can be used anywhere `/btw` is used.
54
+
55
+ ### For a saved one-off note
56
+
57
+ Recommend:
58
+
59
+ ```text
60
+ /btw --save <question>
61
+ ```
62
+
63
+ Use this when the user wants the exchange to appear as a visible BTW note in the session transcript.
64
+
65
+ ### For a fresh side thread
66
+
67
+ Recommend:
68
+
69
+ ```text
70
+ /btw:new
71
+ ```
72
+
73
+ or
74
+
75
+ ```text
76
+ /btw:new <question>
77
+ ```
78
+
79
+ Use this when the previous BTW discussion is no longer relevant, but you still want the new side thread to inherit the current main-session context.
80
+
81
+ ### For a contextless tangent thread
82
+
83
+ Recommend:
84
+
85
+ ```text
86
+ /btw:tangent <question>
87
+ ```
88
+
89
+ or
90
+
91
+ ```text
92
+ /btw:tangent --save <question>
93
+ ```
94
+
95
+ Use this when the user wants a side conversation that does not include the current main-session context.
96
+
97
+ ### For an enforced read-only side question
98
+
99
+ Recommend:
100
+
101
+ ```text
102
+ /btw:ask <question>
103
+ ```
104
+
105
+ or
106
+
107
+ ```text
108
+ /btw:ask --save <question>
109
+ ```
110
+
111
+ Use this when the user wants a side question that inherits the current main-session context but must not be able to change anything. The read-only thread only has `read`, `grep`, `find`, and `ls`; it never has `bash`, `edit`, or `write`.
112
+
113
+ ### To hand the full thread back to the main agent
114
+
115
+ Recommend:
116
+
117
+ ```text
118
+ /btw:inject <instructions>
119
+ ```
120
+
121
+ Use this when the exact discussion matters and the user wants the main agent to act on it.
122
+
123
+ ### To hand back a condensed version
124
+
125
+ Recommend:
126
+
127
+ ```text
128
+ /btw:summarize <instructions>
129
+ ```
130
+
131
+ Use this when the thread is long and only the distilled outcome should go back into the main agent.
132
+
133
+ ### To make BTW cheaper or faster than the main thread
134
+
135
+ Recommend:
136
+
137
+ ```text
138
+ /btw:model <provider> <model> <api>
139
+ /btw:thinking <level>
140
+ ```
141
+
142
+ Use these when the main thread should keep its current model or thinking level, but BTW should run with a different cost/speed profile.
143
+
144
+ ## Recommendation rules
145
+
146
+ - Prefer `/btw` over normal chat when the user explicitly wants a side conversation.
147
+ - Prefer `/btw:tangent` when the user wants that side conversation to be contextless.
148
+ - Prefer `/btw:ask` when the user wants a side conversation that cannot modify the workspace.
149
+ - Prefer `/btw:summarize` over `/btw:inject` for long exploratory threads.
150
+ - Prefer `/btw:inject` when precise wording, detailed tradeoffs, or a full plan matters.
151
+ - Suggest `/btw:new` before starting a totally unrelated side topic when main-session context is still useful.
152
+ - Suggest `/btw:clear` when the widget/thread should be dismissed.
153
+ - Suggest `/btw:model` or `/btw:thinking` when the user wants BTW to be cheaper, faster, or less deliberative than the main thread.
154
+
155
+ ## Response style
156
+
157
+ When helping the user use BTW:
158
+
159
+ - give the exact slash command to run
160
+ - explain briefly why that command fits
161
+ - keep the guidance short and operational
162
+
163
+ ## Examples
164
+
165
+ ### Example: brainstorm while coding continues
166
+
167
+ ```text
168
+ /btw what are the risks of switching this to optimistic updates?
169
+ ```
170
+
171
+ ### Example: create a clean new thread
172
+
173
+ ```text
174
+ /btw:new sketch a safer migration plan
175
+ ```
176
+
177
+ ### Example: start a contextless tangent
178
+
179
+ ```text
180
+ /btw:tangent think through this from first principles without using the current chat context
181
+ ```
182
+
183
+ ### Example: ask a read-only side question
184
+
185
+ ```text
186
+ /btw:ask what does the token refresh path do without changing anything?
187
+ ```
188
+
189
+ ### Example: send the result back
190
+
191
+ ```text
192
+ /btw:summarize implement the recommended migration plan
193
+ ```
194
+
195
+ ### Example: make BTW cheaper than the main thread
196
+
197
+ ```text
198
+ /btw:model openai gpt-5-mini openai-responses
199
+ /btw:thinking low
200
+ ```