pi-bro 0.37.1 → 0.38.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/CHANGELOG.md +12 -0
- package/README.md +6 -8
- package/docs/examples.md +1 -1
- package/docs/feature-map.md +2 -3
- package/docs/features/explain.md +16 -20
- package/docs/features/show.md +9 -15
- package/docs/getting-started.md +4 -4
- package/docs/piG-agent-shell-qualification.md +1 -1
- package/docs/reference/commands.md +14 -29
- package/docs/reference/data-and-permissions.md +4 -4
- package/docs/reference/settings.md +3 -3
- package/docs/reference/troubleshooting.md +1 -1
- package/docs/user-guide.md +2 -2
- package/package.json +2 -1
- package/src/architecture.ts +1 -1
- package/src/bro.ts +47 -185
- package/src/btw.ts +10 -199
- package/src/composer-modal.ts +197 -0
- package/src/explain-modal.ts +24 -75
- package/src/grill.ts +3 -2
- package/src/remember.ts +3 -2
- package/src/session-state.ts +46 -28
- package/src/simplify-engine.ts +50 -24
- package/src/simplify-ui.ts +165 -126
- package/src/sources.ts +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to pi-bro are documented here.
|
|
4
4
|
|
|
5
|
+
## [0.38.0] - 2026-11-24
|
|
6
|
+
|
|
7
|
+
### Highlights
|
|
8
|
+
|
|
9
|
+
- Use one Simplify window to read a plain-language explanation or draw recent conversation turns with `/show`. `/bro` reopens the latest result without calling a model.
|
|
10
|
+
- Retry or copy either result from the same window. Browser diagrams can be rebuilt from the saved result without another model call.
|
|
11
|
+
|
|
12
|
+
### Breaking
|
|
13
|
+
|
|
14
|
+
- Use `/bro simplify show|text|file|url …` in place of `/bro show|text|file|url …`, and `/bro simplify latest` in place of `/bro text` without arguments. Those direct commands also work headless.
|
|
15
|
+
- Use `/bro` or `/bro simplify` instead of `/bro open`. Pick an explicit source command instead of passing a path, URL, or text directly to `/bro`. Retired shortcuts give migration instructions and do not call a model.
|
|
16
|
+
|
|
5
17
|
## [0.37.1] - 2026-11-24
|
|
6
18
|
|
|
7
19
|
### Improved
|
package/README.md
CHANGED
|
@@ -39,17 +39,16 @@ GitHub, use `pi install git:github.com/tranhoangnguyen03/pi-bro`.
|
|
|
39
39
|
On first use, Bro picks the active physical Pi model if one is selected. No extra CLI is needed. Existing Bro settings stay as they are. Try this in Pi:
|
|
40
40
|
|
|
41
41
|
```text
|
|
42
|
-
/bro text A request limit means a service allows only a certain number of calls in a given time.
|
|
42
|
+
/bro simplify text A request limit means a service allows only a certain number of calls in a given time.
|
|
43
43
|
```
|
|
44
44
|
|
|
45
45
|
**Expected:** Bro opens a separate window and explains that sentence in plain words. Close with **Esc**. Nothing is sent to your main agent's conversation. The exact words depend on your selected model.
|
|
46
46
|
|
|
47
47
|
| After that | What happens |
|
|
48
48
|
| --- | --- |
|
|
49
|
-
| `/bro` |
|
|
49
|
+
| `/bro` | Opens Simplify and shows the saved result or help. Run `/simplify` inside to explain the latest reply or `/show` to draw recent conversation turns. |
|
|
50
50
|
| `/bro copy` | Edit and preview the raw Markdown of the last assistant reply before copying |
|
|
51
51
|
| `/bro btw What is a race condition?` | Asks a private side question |
|
|
52
|
-
| `/bro show` | Draws the current session's recent conversation, if any |
|
|
53
52
|
| `/bro architecture` | Creates or refreshes `docs/architecture/` for this project |
|
|
54
53
|
| `/bro grill-me Should agents talk freely to each other?` | Questions your assumptions privately, one at a time |
|
|
55
54
|
| `/bro overthink` | Get a private second look with Ctrl+R; automatic checks are opt-in |
|
|
@@ -62,8 +61,7 @@ File and webpage examples need your own real path or URL; see [how to explain th
|
|
|
62
61
|
| Command | What you get |
|
|
63
62
|
| --- | --- |
|
|
64
63
|
| `/bro copy` | **[Copy Markdown](docs/features/copy.md).** Edit, preview and copy the last completed reply as Markdown, without a model call or saved file. |
|
|
65
|
-
| `/bro`, `/bro
|
|
66
|
-
| `/bro show` | **[Show](docs/features/show.md#bro-show).** The last few turns drawn as a shape (call tree, file tree, diff, pseudocode, a sequence diagram, or an HTML layout) instead of prose. |
|
|
64
|
+
| `/bro`, `/bro simplify` | **Simplify.** Understand one source at a time: [plain-language explanations](docs/features/explain.md) of replies, text, files, or webpages, or [diagrams of recent turns](docs/features/show.md#bro-show) with `/show` inside the same window. |
|
|
67
65
|
| `/bro architecture [focus]` | **[Architecture Docs](docs/features/architecture.md).** Inspects the project and writes Markdown, diagrams and an offline interactive `architecture.html` under `docs/architecture/`. Uses BTW model settings. |
|
|
68
66
|
| `/bro elevate` or **Ctrl+Shift+E** | **[Elevate](docs/features/elevate.md).** Discover missing expert considerations, select useful improvements, and rewrite your task without submitting it. Shares BTW backend settings. |
|
|
69
67
|
| `/bro remember-me [thought]` | **[Remember Me](docs/features/remember-me.md).** Privately clarify and approve short personal memories with unfoldable background. Agents can call `about_user` to read summaries and expand IDs. |
|
|
@@ -121,7 +119,7 @@ which may keep it under their own policies. Paths below are under
|
|
|
121
119
|
|
|
122
120
|
Session-scoped Bro entries live **inside Pi's session file**. They stay out of the model's conversation, but are not secret from someone who can read, back up, export, or share that file. Check the session content before sharing it; this feature does not encrypt or redact exports.
|
|
123
121
|
|
|
124
|
-
`/bro url` also connects straight to the website, which sees your IP address.
|
|
122
|
+
`/bro simplify url` also connects straight to the website, which sees your IP address.
|
|
125
123
|
Bro runs each CLI as you, with your environment. It never reads or copies an
|
|
126
124
|
external CLI's provider credentials, but a CLI signs in its own way, which can
|
|
127
125
|
include API keys set in your environment. The built-in **Pi** backend is the
|
|
@@ -150,11 +148,11 @@ and [Privacy and safety](docs/reference/data-and-permissions.md#privacy-and-safe
|
|
|
150
148
|
- Documents: `.md`, `.markdown`, `.txt`, `.pdf`, `.docx` only, no OCR, up to 10 MiB.
|
|
151
149
|
→ Run OCR elsewhere first.
|
|
152
150
|
- Webpages: one public HTML page; no logins, paywalls, page JavaScript or
|
|
153
|
-
proxy settings. → Save the page as PDF or text and use `/bro file`.
|
|
151
|
+
proxy settings. → Save the page as PDF or text and use `/bro simplify file`.
|
|
154
152
|
- No fallback: if the chosen backend, model or effort fails, Bro shows that
|
|
155
153
|
backend's error instead of switching. → Run `/bro doctor`.
|
|
156
154
|
- Elevate runs fresh restricted calls through the BTW model setting. Restricted does not always mean sandboxed; see [access and retention](docs/reference/data-and-permissions.md). The shortcut may not work in all terminals: use `/bro elevate` instead.
|
|
157
|
-
- BTW, Grill Me and
|
|
155
|
+
- BTW, Grill Me and Simplify's latest result use private session entries; they survive normal Pi reload/resume. A new session starts fresh and later fork changes stay separate. Abrupt crashes during active calls are not guaranteed.
|
|
158
156
|
- Guided Review runs in local interactive Pi only and does not post to
|
|
159
157
|
GitHub.
|
|
160
158
|
|
package/docs/examples.md
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
|
|
21
21
|
[](https://raw.githubusercontent.com/tranhoangnguyen03/pi-bro/main/docs/images/bro-file-before.png)
|
|
22
22
|
|
|
23
|
-
**After `/bro file <path>`**
|
|
23
|
+
**After `/bro simplify file <path>`**
|
|
24
24
|
|
|
25
25
|
[](https://raw.githubusercontent.com/tranhoangnguyen03/pi-bro/main/docs/images/bro-file-after.png)
|
|
26
26
|
|
package/docs/feature-map.md
CHANGED
|
@@ -4,8 +4,7 @@ These are **human intentions**, not modes. Run any feature directly. Bare `/bro`
|
|
|
4
4
|
|
|
5
5
|
| I need to… | Feature | What will I get? |
|
|
6
6
|
| --- | --- | --- |
|
|
7
|
-
| **Understand what already exists:** make sense of an answer or
|
|
8
|
-
| Understand the shape of the discussion | `/bro show` | Diagram, structure, or outline of conversation text |
|
|
7
|
+
| **Understand what already exists:** make sense of an answer, file, or discussion | Simplify (`/bro`) | A plain-language explanation or, with `/show` inside the same window, a diagram of the discussion |
|
|
9
8
|
| Understand a repository | `/bro architecture` | Architecture docs and offline visualization |
|
|
10
9
|
| **Explore what could exist:** ask a side question | `/bro btw` | A flexible private conversation |
|
|
11
10
|
| Challenge a proposal or form a decision | `/bro grill-me` | Reasoned discussion and optional decision brief |
|
|
@@ -22,7 +21,7 @@ These are **human intentions**, not modes. Run any feature directly. Bare `/bro`
|
|
|
22
21
|
## Shared interactions, distinct workflows
|
|
23
22
|
|
|
24
23
|
- **Copy is a shared text handoff, not a separate intent state.** Native Pi `/copy` copies immediately; `/bro copy` lets users edit and preview the last reply before copying. It never edits Pi's draft, submits a message or writes to GitHub. You decide where to paste and when to submit. BTW supports latest/all; Grill Me copies its latest reply or brief; Elevate copies a revised assignment; Guided Review copies findings. Retired `/insert` commands tell users to copy instead.
|
|
25
|
-
- **Resume** restores feature-owned state where needed, not a shared chat engine.
|
|
24
|
+
- **Resume** restores feature-owned state where needed, not a shared chat engine. The latest Simplify result, BTW and Grill Me restore from private Pi session entries on reload, restart, resume and `/tree`; saved Guided Review, approved Remember Me and steering already have durable state.
|
|
26
25
|
- **Clear / Reset / Delete** belong to each feature: BTW resets its thread; Grill Me starts a new interview; Guided Review deletes a specific saved review once cleanup ships; Remember Me deletes a named approved memory; Overthink resets its question defaults.
|
|
27
26
|
- **Retry / Regenerate** repeats a step without silently losing prior accepted work. Guided Review's regenerate (same captured source) is not update revision (new source).
|
|
28
27
|
- **Help / Close** share meanings, but a short viewer needs fewer controls than a review or interview.
|
package/docs/features/explain.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[Docs home](../README.md) · [All commands](../reference/commands.md) · [Safety and permissions](../reference/data-and-permissions.md)
|
|
4
4
|
|
|
5
|
-
Opening `/bro` or `/bro simplify` shows your saved
|
|
5
|
+
**Simplify** turns one source into something easier to understand, in plain words or as a [diagram of recent conversation](show.md#bro-show). Opening `/bro` or `/bro simplify` shows your saved result, or command help if none exists. It does not call the model. Run `/simplify` inside the modal (or `/bro simplify latest` directly) to explain the latest completed assistant reply.
|
|
6
6
|
|
|
7
7
|
## Explanation modes
|
|
8
8
|
|
|
@@ -25,20 +25,18 @@ next mode without saving it:
|
|
|
25
25
|
- **Mouse wheel / trackpad**: Scroll in regular or fullscreen mode
|
|
26
26
|
- **↑ / ↓**: Scroll in any mode
|
|
27
27
|
- **PgUp / PgDn**: Scroll a page at a time (also in btw)
|
|
28
|
-
- **C
|
|
29
|
-
- **R**:
|
|
30
|
-
|
|
31
|
-
- **
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
- **O**: Open the diagram (an HTML layout or a rendered sequence diagram) when a show reply contains one
|
|
36
|
-
- **Esc**: From `/help`, return to the saved explanation without rerunning it. If there is no saved explanation, or you are already reading it, close the modal. While Bro is working, cancel and close.
|
|
28
|
+
- **C** or `/copy`: Copy the complete result
|
|
29
|
+
- **R**: Retry the same captured source
|
|
30
|
+
- **M**: Re-simplify the captured source in the next mode (brief → balanced → faithful → brief), without changing the saved default
|
|
31
|
+
- **O**: Open the browser diagram when a `/show` result has one
|
|
32
|
+
- **Esc**: Return from help to the saved result, or close (and cancel any active request)
|
|
33
|
+
|
|
34
|
+
Use the single-letter shortcuts with the composer empty.
|
|
37
35
|
|
|
38
36
|
The modal header shows the model and reasoning effort the explanation or
|
|
39
37
|
drawing used (`default` when the model's own effort applies), followed by the
|
|
40
38
|
explanation mode, and `prefs` when your [preferences](../reference/settings.md#preferences) shaped the
|
|
41
|
-
result;
|
|
39
|
+
result; reopening Simplify keeps the original labels, mode, and tag.
|
|
42
40
|
|
|
43
41
|
Bro temporarily captures mouse input while its modal is open. Native mouse
|
|
44
42
|
selection may be unavailable or visually extend outside the modal depending on
|
|
@@ -49,25 +47,23 @@ your terminal mode; press **C** to copy the complete explanation reliably.
|
|
|
49
47
|
Paste text directly after the command:
|
|
50
48
|
|
|
51
49
|
```text
|
|
52
|
-
/bro text OAuth refresh tokens are rotated after every successful use.
|
|
50
|
+
/bro simplify text OAuth refresh tokens are rotated after every successful use.
|
|
53
51
|
```
|
|
54
52
|
|
|
55
|
-
|
|
56
|
-
after `/bro text`, it falls back to the latest completed reply. Press **R**
|
|
57
|
-
to simplify the same captured text again.
|
|
53
|
+
Inside Simplify, use `/text <text>` for the same action. Press **R** to simplify the same captured text again.
|
|
58
54
|
|
|
59
55
|
## Explain a document
|
|
60
56
|
|
|
61
57
|
Use a relative or absolute path, including files outside Pi's current workspace. Symlinks are followed; normal OS file permissions apply:
|
|
62
58
|
|
|
63
59
|
```text
|
|
64
|
-
/bro file "docs/incident review.pdf"
|
|
60
|
+
/bro simplify file "docs/incident review.pdf"
|
|
65
61
|
```
|
|
66
62
|
|
|
67
63
|
Paths may contain spaces; matching single or double quotes are also accepted.
|
|
68
64
|
Bro extracts text locally, then sends that text through the same explanation
|
|
69
65
|
flow used by `/bro`. Pressing **R** retries the extracted snapshot; running a
|
|
70
|
-
new `/bro file <path>`
|
|
66
|
+
new `/file <path>` command inside Simplify (or `/bro simplify file <path>` directly) reads it again.
|
|
71
67
|
|
|
72
68
|
Files are limited to 10 MiB and 100,000 extracted characters. Scanned PDFs are
|
|
73
69
|
not supported because Bro does not perform OCR.
|
|
@@ -77,13 +73,13 @@ not supported because Bro does not perform OCR.
|
|
|
77
73
|
Pass one public HTTP or HTTPS page:
|
|
78
74
|
|
|
79
75
|
```text
|
|
80
|
-
/bro url https://example.com/complicated-article
|
|
76
|
+
/bro simplify url https://example.com/complicated-article
|
|
81
77
|
```
|
|
82
78
|
|
|
83
79
|
Bro fetches the page, extracts its main readable text locally, and sends only
|
|
84
80
|
that text through the existing explanation flow. The completed modal shows the
|
|
85
81
|
final website and page title. Pressing **R** retries the captured page without
|
|
86
|
-
fetching again; running
|
|
82
|
+
fetching again; running `/url <url>` inside Simplify fetches a fresh copy.
|
|
87
83
|
|
|
88
84
|
The first version is intentionally limited to one public, text-based page. It
|
|
89
85
|
does not use browser cookies, sign in, run page JavaScript, bypass paywalls or
|
|
@@ -91,4 +87,4 @@ bot protection, load complete discussion threads, follow pagination, or
|
|
|
91
87
|
understand images and video. Pages that depend on those features may fail.
|
|
92
88
|
|
|
93
89
|
If Bro cannot read a page, copy its content into a `.txt` or `.md` file, or save
|
|
94
|
-
it as a PDF, then use `/bro file <path>`.
|
|
90
|
+
it as a PDF, then use `/bro simplify file <path>`.
|
package/docs/features/show.md
CHANGED
|
@@ -4,14 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
## Bro show
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
changes the form: it draws what you and the assistant said in the last few
|
|
7
|
+
Inside [Simplify](explain.md), run `/show` to understand recent conversation as a diagram or outline instead of a plain-language explanation. It draws what you and the assistant said in the last few
|
|
9
8
|
session turns as a shape instead of paragraphs. Capture keeps only user and
|
|
10
9
|
assistant conversation text, including every intermediate assistant message in
|
|
11
10
|
a turn — tool calls, tool results, reasoning, and images never leave the
|
|
12
|
-
session.
|
|
13
|
-
in the same modal, never touching your conversation. `/bro show` uses its own
|
|
14
|
-
draw prompt; the explanation modes do not affect it. Your
|
|
11
|
+
session. The drawing replaces the previous Simplify result without touching your conversation. Show keeps its own backend settings and draw prompt; explanation modes do not affect it. Your
|
|
15
12
|
[preferences](../reference/settings.md#preferences) can change only its wording and language, never
|
|
16
13
|
which shapes it draws or its rules.
|
|
17
14
|
|
|
@@ -33,29 +30,27 @@ one Mermaid `sequenceDiagram`. The modal keeps its source visible with
|
|
|
33
30
|
`[Diagram saved — press O to render]`; **O** opens a page that draws it with
|
|
34
31
|
the Mermaid copy bundled in Bro. Any other Mermaid stays plain text.
|
|
35
32
|
|
|
36
|
-
Pressing **R** redraws the same captured turns; running `/bro show
|
|
37
|
-
captures the latest turns afresh. `/bro show <n-turns>` overrides the default turn
|
|
38
|
-
count for a single run.
|
|
33
|
+
Pressing **R** redraws the same captured turns; running `/show` again captures recent turns afresh. `/show <n-turns>` overrides the default turn count. Outside the modal, the direct form is `/bro simplify show [n-turns] [query]`.
|
|
39
34
|
|
|
40
35
|
Add a query to steer what the shapes focus on, either after a turn count or on
|
|
41
|
-
its own: `/
|
|
36
|
+
its own: `/show what changed in the auth flow`, or `/show 3 what
|
|
42
37
|
changed in the auth flow`. The query is used as a lens on the captured turns,
|
|
43
38
|
not as additional evidence, and its casing is preserved as typed. Pressing
|
|
44
39
|
**R** retries with the same turn count and query.
|
|
45
40
|
|
|
46
41
|
Any leading whitespace-delimited word that looks like a number is treated as the
|
|
47
|
-
requested turn count: for example, `/
|
|
48
|
-
and steers on "what changed", while `/
|
|
42
|
+
requested turn count: for example, `/show 3 what changed` captures 3 turns
|
|
43
|
+
and steers on "what changed", while `/show 404 handler` parses "404" as the
|
|
49
44
|
turn count and "handler" as the steering query. To steer on a phrase that starts
|
|
50
45
|
with digits while choosing a turn count, specify the turn count explicitly
|
|
51
|
-
first: `/
|
|
46
|
+
first: `/show 1 404 handler` captures 1 turn and steers on "404 handler".
|
|
52
47
|
If the first word is not a number, the whole input is treated as the steering
|
|
53
48
|
query using the saved `showTurns` default.
|
|
54
49
|
|
|
55
50
|
### A slow session-create, traced
|
|
56
51
|
|
|
57
52
|
The agent followed a two-second delay from the handler down to the worker.
|
|
58
|
-
`/
|
|
53
|
+
`/show` drew the chain:
|
|
59
54
|
|
|
60
55
|
```text
|
|
61
56
|
handleCreateSession(req)
|
|
@@ -70,8 +65,7 @@ handleCreateSession(req)
|
|
|
70
65
|
|
|
71
66
|
### The shape of code before it exists
|
|
72
67
|
|
|
73
|
-
A design discussion agreed on the data model ahead of implementation. `/
|
|
74
|
-
show` kept just the shape:
|
|
68
|
+
A design discussion agreed on the data model ahead of implementation. `/show` kept just the shape:
|
|
75
69
|
|
|
76
70
|
```typescript
|
|
77
71
|
interface Item { id: ItemId; parentId: ItemId | null }
|
package/docs/getting-started.md
CHANGED
|
@@ -23,7 +23,7 @@ Restart Pi (or run `/reload`). Then run:
|
|
|
23
23
|
Copy this complete command into Pi:
|
|
24
24
|
|
|
25
25
|
```text
|
|
26
|
-
/bro text A request limit means a service allows only a certain number of calls in a given time.
|
|
26
|
+
/bro simplify text A request limit means a service allows only a certain number of calls in a given time.
|
|
27
27
|
```
|
|
28
28
|
|
|
29
29
|
**Expected:** A Bro window opens and explains the sentence in simpler words. The exact answer depends on the backend. Use the arrow keys to scroll, **C** to copy, or **Esc** to close. Bro doesn't insert this result into your main agent's context.
|
|
@@ -36,9 +36,9 @@ This step makes a **real model call**, which may use your backend account's quot
|
|
|
36
36
|
| --- | --- |
|
|
37
37
|
| Understand the last agent answer | Open `/bro`, then run `/simplify` inside |
|
|
38
38
|
| Ask a side question | `/bro btw What is a race condition?` |
|
|
39
|
-
| Visualize what we discussed | `/bro show` (after at least one user turn) |
|
|
40
|
-
| Explain a local file | `/bro file docs/my-report.md` (**replace with an existing path**) |
|
|
41
|
-
| Explain an actual public webpage | `/bro url https://your-public-page.example` (**replace with a real URL**) |
|
|
39
|
+
| Visualize what we discussed | `/bro simplify show` (after at least one user turn) |
|
|
40
|
+
| Explain a local file | `/bro simplify file docs/my-report.md` (**replace with an existing path**) |
|
|
41
|
+
| Explain an actual public webpage | `/bro simplify url https://your-public-page.example` (**replace with a real URL**) |
|
|
42
42
|
|
|
43
43
|
See the [docs home](README.md) for detailed workflows.
|
|
44
44
|
|
|
@@ -48,7 +48,7 @@ These tests load the extension from its source checkout in the **real PiG host**
|
|
|
48
48
|
|
|
49
49
|
Build the exact PiG-Agent PR #2 source with the Bro PR head pinned. Install it into **two fresh independent homes** `A` and `B` using `shell-reference install --home DIR`. Run `doctor` for each and record actual PiG/Node/Bro/CLI versions, commit SHA, installed archive SHA256, platform and where `getAgentDir()` resolves.
|
|
50
50
|
|
|
51
|
-
1. **TUI, not RPC:** Run `shell-reference new --home A` in a real terminal. Use a real authorized backend and try `/bro`, `/bro simplify` (inside it `/text`, `/url`, `/file`, `/copy`, `/clear`, `/help`), `/bro config`, `/bro preferences`, `/bro btw`, and `/bro remember-me`. Exercise text input, selection, scrolling, resize, Esc/cancel and clipboard. Verify a real final backend answer. Check `/bro guided-review`, `/bro advisor`, `/bro elevate`, `/bro grill-me`, `/bro show`, `/bro overthink`, `/bro architecture`, and `/bro doctor`; mark unexercised paths **NOT RUN**, not PASS.
|
|
51
|
+
1. **TUI, not RPC:** Run `shell-reference new --home A` in a real terminal. Use a real authorized backend and try `/bro`, `/bro simplify` (inside it `/text`, `/url`, `/file`, `/show`, `/copy`, `/clear`, `/help`), `/bro config`, `/bro preferences`, `/bro btw`, and `/bro remember-me`. Exercise text input, selection, scrolling, resize, Esc/cancel and clipboard. Verify a real final backend answer. Check `/bro guided-review`, `/bro advisor`, `/bro elevate`, `/bro grill-me`, `/bro simplify show`, `/bro overthink`, `/bro architecture`, and `/bro doctor`; mark unexercised paths **NOT RUN**, not PASS.
|
|
52
52
|
2. **Cleanup:** During a long real Claude/Codex/Pi request, use cancel, `/reload` and exit, then inspect child PIDs/grandchildren. A terminal exit must not leave an active backend. Test the same with a fast failure, slow backend and missing executable.
|
|
53
53
|
3. **Models:** Start with no `A/.pi/models.json`, check built-ins. Add an agent-local custom provider with a harmless locally controlled test endpoint; confirm picker listing, unchanged provider/model ID, request URL, configured credentials and metadata overrides in a real result. Break its key and definition and confirm useful failure with no fallback. Edit model file; check the host's supported reload/new session. Test enabled-model scopes and default settings separately.
|
|
54
54
|
4. **Accounts:** With an already-authorized host Claude login, run with `CLAUDE_CONFIG_DIR` inherited and then with the shell-selected profile and `PI_BRO_CLAUDE_AUTH_SOURCE=subscription`. Confirm non-secret CLI account/method and actual answer. Repeat Codex with `CODEX_HOME` and `PI_BRO_CODEX_AUTH_SOURCE=subscription`. Test inherited API key collisions, missing/expired login, forced method and parent API env retention. For two distinct authorized accounts, test concurrent A/B routing; otherwise mark the second live account **NOT RUN**.
|
|
@@ -4,37 +4,30 @@
|
|
|
4
4
|
|
|
5
5
|
## What Bro can explain
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
**Simplify** helps you understand one source in plain words or as a diagram. `/bro` and `/bro simplify` open the last result (or help) without calling a model.
|
|
8
|
+
|
|
9
|
+
| Source | Inside Simplify | Direct command (also headless) |
|
|
8
10
|
| --- | --- | --- |
|
|
9
|
-
| Latest assistant reply | `/simplify`
|
|
10
|
-
| Pasted text | `/
|
|
11
|
-
| Local
|
|
12
|
-
| Public webpage | `/
|
|
13
|
-
| Recent
|
|
14
|
-
|
|
11
|
+
| Latest completed assistant reply | `/simplify` | `/bro simplify latest` |
|
|
12
|
+
| Pasted text | `/text <text>` | `/bro simplify text <text>` |
|
|
13
|
+
| Local Markdown, text, PDF, or DOCX file | `/file <path>` | `/bro simplify file <path>` |
|
|
14
|
+
| Public webpage | `/url <url>` | `/bro simplify url <url>` |
|
|
15
|
+
| Recent user and assistant conversation text only | `/show [n-turns] [query]` | `/bro simplify show [n-turns] [query]` |
|
|
16
|
+
|
|
17
|
+
A new result replaces the previous one. Headless runs keep the result in private session state rather than sending an assistant reply. RPC clients may still receive the custom session entry event. Use an existing saved session to reopen the result after exit. In a fresh session, Pi keeps the result only in memory until the first user or assistant message creates the session file.
|
|
15
18
|
|
|
16
|
-
|
|
17
|
-
**M** re-simplifies it in the next mode. These commands capture a
|
|
18
|
-
new source: `/bro text`, `/bro file`, `/bro url`, and `/bro show`. Giving `/bro` a URL, path, or
|
|
19
|
-
text directly captures a new source the same way.
|
|
19
|
+
The old top-level shortcuts `/bro show`, `/bro text`, `/bro file`, `/bro url`, and `/bro open` now point to their replacements without running them. `/bro <input>` no longer guesses the source: choose an explicit command.
|
|
20
20
|
|
|
21
21
|
## Default command suggestions
|
|
22
22
|
|
|
23
|
-
Typing `/bro `
|
|
23
|
+
Typing `/bro ` suggests `simplify`, `btw`, `guided-review`, `architecture`, `elevate`, `grill-me`, `remember-me`, `overthink`, and `config`. Type `/bro simplify ` for the source options, or a prefix such as `/bro doc` for other commands.
|
|
24
24
|
|
|
25
25
|
## Commands
|
|
26
26
|
|
|
27
27
|
| Command | Description |
|
|
28
28
|
| --- | --- |
|
|
29
|
-
| `/bro` |
|
|
30
|
-
| `/bro simplify` | Reopen the last Simplify screen within this Pi session, without a new model call. |
|
|
29
|
+
| `/bro`, `/bro simplify` | Reopen the last private explanation or diagram on this session branch. No model call. |
|
|
31
30
|
| `/bro copy` | Edit and preview the latest completed assistant reply as raw Markdown. Ctrl+D switches views; Ctrl+C copies Markdown; F1 opens Help. No backend call or saved draft. Native Pi `/copy` copies immediately. [Guide](../features/copy.md). |
|
|
32
|
-
| `/bro text [text]` | Explain pasted text, or the latest completed assistant reply when text is omitted. |
|
|
33
|
-
| `/bro <input>` | Explain it directly: a lone URL runs the webpage reader, an existing local file with a supported extension runs the document reader, and anything else is pasted text. A quoted path with spaces is routed too when the file exists. |
|
|
34
|
-
| `/bro file <path>` | Explain a local `.md`, `.markdown`, `.txt`, `.pdf`, or `.docx` file. |
|
|
35
|
-
| `/bro url <url>` | Explain one public, text-based webpage. |
|
|
36
|
-
| `/bro open` | Legacy compatibility shortcut to the last result. No `/open` command inside Simplify. |
|
|
37
|
-
| `/bro show [n-turns] [query]` | Draw recent session turns (default last 1) as shapes instead of prose, from user and assistant conversation text only — tool calls, tool results, reasoning, and images are omitted. An optional query steers what the shapes focus on, with or without a leading turn count. |
|
|
38
31
|
| `/bro doctor` | Check Bro's settings, preferences, and each selected backend, with the effective backend/model/effort per feature. |
|
|
39
32
|
| `/bro mode [brief\|balanced\|faithful]` | View or choose the explanation mode. |
|
|
40
33
|
| `/bro preferences` | View or edit what Bro knows about you and how you like answers; see [Preferences](settings.md#preferences). |
|
|
@@ -52,14 +45,6 @@ Typing `/bro ` displays ten task-level suggestions: `simplify`, `show`, `btw`, `
|
|
|
52
45
|
| `/bro advisor-steer` | View, edit, save, or clear the one persistent steering brief the advisor always sees. |
|
|
53
46
|
| `/bro help` | Open the built-in quick reference. |
|
|
54
47
|
|
|
55
|
-
Giving `/bro` the input directly works the same way:
|
|
56
|
-
|
|
57
|
-
```text
|
|
58
|
-
/bro https://example.com/article
|
|
59
|
-
/bro docs/report.pdf
|
|
60
|
-
/bro any other text is explained as pasted text
|
|
61
|
-
```
|
|
62
|
-
|
|
63
48
|
## Simplify modal (single-source explanation)
|
|
64
49
|
|
|
65
|
-
|
|
50
|
+
Use `/copy` to copy the current result, `/clear` to forget it, and `/help` for commands. With the composer empty, **R** reruns the captured source, **M** changes the one-off Brief/Balanced/Faithful mode on explanations, and **O** opens a browser diagram when available. **Esc** goes back from help or closes. Only the latest result is saved; this is not a chat. See [plain-language explanations](../features/explain.md) and [conversation diagrams](../features/show.md#bro-show).
|
|
@@ -69,8 +69,8 @@ When resolving backend, model, and reasoning effort:
|
|
|
69
69
|
3. **Backend-specific normalization**: Agy selections are mapped against its installed catalog (suffixed variants, fixed-effort models); Pi selections are `<provider>/<id>` physical models resolved against your Pi registry.
|
|
70
70
|
4. **Initial file creation only**: `PI_BRO_MODEL` has no effect once the settings file exists.
|
|
71
71
|
|
|
72
|
-
When resolving turn count for `/
|
|
73
|
-
1. **Command argument**: an explicit count like `/
|
|
72
|
+
When resolving turn count for `/show` inside Simplify:
|
|
73
|
+
1. **Command argument**: an explicit count like `/show 3` or `/bro simplify show 1 query` overrides for that run.
|
|
74
74
|
2. **Saved setting**: `showTurns` (defaults to 1).
|
|
75
75
|
|
|
76
76
|
When shaping an answer, each part has one owner:
|
|
@@ -131,10 +131,10 @@ See [feature guide](../features/architecture.md).
|
|
|
131
131
|
- **Private session continuity**: completed BTW and Grill Me turns, modes, drafts, the latest Simplify state and the last Show result are saved as Pi `custom` entries inside the current session file. They survive normal reload/restart and are never added to the main model or Advisor snapshot. A fork initially inherits earlier entries; later updates stay on its own branch. This is local disk storage, not a global memory store or an abrupt-crash guarantee. Backend-native sessions may persist independently.
|
|
132
132
|
Standing Advisor priorities are stored in `~/.pi/agent/bro-advisor.md`, and
|
|
133
133
|
the session steering brief uses another `custom` entry (`bro-advisor-steering`). Session entries remain readable to anyone with the session file; export/sharing may include them. The private boundary is model-context isolation, not encrypted storage or export redaction.
|
|
134
|
-
- **File access**: `/bro file` reads regular files at the selected relative or
|
|
134
|
+
- **File access**: `/bro simplify file` reads regular files at the selected relative or
|
|
135
135
|
absolute path, including outside Pi's current workspace and through symlinks.
|
|
136
136
|
Normal OS permissions apply. Bro's extractor does not modify the files.
|
|
137
|
-
- **Web requests**: `/bro url` connects directly to the target website. The site
|
|
137
|
+
- **Web requests**: `/bro simplify url` connects directly to the target website. The site
|
|
138
138
|
sees your IP address and Bro's user agent. Bro sends no browser cookies,
|
|
139
139
|
authorization, or referrer information, and it refuses local, private, and
|
|
140
140
|
reserved network destinations, including redirects. Avoid private or signed
|
|
@@ -87,7 +87,7 @@ Bro reads the file again before each request, so manual edits apply next time. I
|
|
|
87
87
|
Explicit Pi efforts are clamped to the model's supported reasoning levels; the
|
|
88
88
|
picker's own step 1 chooses the backend and step 2 the model.
|
|
89
89
|
- `mode` is `brief`, `balanced` (the default), or `faithful`. `showTurns` is
|
|
90
|
-
the default number of turns `/
|
|
90
|
+
the default number of turns `/show` draws inside Simplify (default 1); `/bro simplify show
|
|
91
91
|
<n-turns>` overrides it for one run.
|
|
92
92
|
- `PI_BRO_MODEL` explicitly selects Agy and its model when Bro creates a missing
|
|
93
93
|
settings file, for example `PI_BRO_MODEL=gemini-3.7-flash-low pi`.
|
|
@@ -168,7 +168,7 @@ for the versioned real-CLI/local-server evidence.
|
|
|
168
168
|
## Preferences
|
|
169
169
|
|
|
170
170
|
Tell Bro about yourself and how you like answers. Bro adds what you write to
|
|
171
|
-
every
|
|
171
|
+
every Explain, Show, `/bro btw`, `/bro elevate`, and Guided Review prompt as a labelled section,
|
|
172
172
|
alongside its own instructions. It never replaces them: modes, **M**, and the
|
|
173
173
|
source rules keep working. The advisor never receives your preferences; use
|
|
174
174
|
`/bro advisor-steer` for it.
|
|
@@ -201,7 +201,7 @@ that is set):
|
|
|
201
201
|
means no preferences, and Bro's prompts are then exactly the built-in ones.
|
|
202
202
|
- **What preferences can change**: wording, tone, technical depth, length in
|
|
203
203
|
BTW, and the answer language. If you name a language, code, commands, paths,
|
|
204
|
-
names, and numbers still stay exactly as written. In
|
|
204
|
+
names, and numbers still stay exactly as written. In Show and `/bro overthink`,
|
|
205
205
|
preferences only change wording/tone and language. Guided Review also receives preferences for explanation/answer wording; they do not override its evidence or review rules. A per-run choice (the mode,
|
|
206
206
|
**M**, a Show steering query, or what a BTW/review question asks for) wins over a
|
|
207
207
|
standing preference.
|
|
@@ -30,7 +30,7 @@ succeed.
|
|
|
30
30
|
|
|
31
31
|
If an explanation fails, run `/bro doctor` first. If a webpage cannot be
|
|
32
32
|
extracted, copy its content into a supported text file or save it as a PDF and
|
|
33
|
-
use `/bro file`. If a PDF contains only scanned images, run OCR with another
|
|
33
|
+
use `/bro simplify file`. If a PDF contains only scanned images, run OCR with another
|
|
34
34
|
tool before giving it to Bro.
|
|
35
35
|
|
|
36
36
|
- An unsupported model, effort, or missing backend fails with that backend's
|
package/docs/user-guide.md
CHANGED
|
@@ -166,8 +166,8 @@ See [Troubleshooting and current limits](reference/troubleshooting.md#troublesho
|
|
|
166
166
|
|
|
167
167
|
## Simplify modal
|
|
168
168
|
|
|
169
|
-
`/bro` and `/bro simplify` open the
|
|
169
|
+
`/bro` and `/bro simplify` open the latest result or help without calling a model. Explain a source in plain words with `/simplify` (latest reply), `/text`, `/file` or `/url`. Draw recent conversation turns with `/show [n-turns] [query]` in the same window. `/copy`, `/clear` and `/help` work for both. With an empty composer, **R** retries the captured source, **M** changes the mode for this explanation only, and **O** opens a browser diagram when available. Only the latest result is saved, in private Pi session entries that stay out of the main model's context. See the [command reference](reference/commands.md#what-bro-can-explain) for direct and headless forms.
|
|
170
170
|
|
|
171
171
|
## Bro command discovery and Config navigation
|
|
172
172
|
|
|
173
|
-
The
|
|
173
|
+
The `/bro ` menu offers one `simplify` entry for both explanations and diagrams. Type `/bro simplify ` for source options or a prefix such as `/bro doc` to find other commands. `/bro config` starts with **Global** (default, Preferences editor, Doctor on demand) and **Features** (per-feature settings). Esc goes back.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-bro",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.38.0",
|
|
4
4
|
"description": "A sidekick for you and your Pi agent: plain-language explanations, side questions, diagrams, PR review and second opinions, without cluttering the agent's context.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -78,6 +78,7 @@
|
|
|
78
78
|
"src/config-navigation.ts",
|
|
79
79
|
"src/ui-capabilities.ts",
|
|
80
80
|
"src/modal-kit.ts",
|
|
81
|
+
"src/composer-modal.ts",
|
|
81
82
|
"src/backend.ts",
|
|
82
83
|
"src/cli-auth.ts",
|
|
83
84
|
"src/prompt.ts",
|
package/src/architecture.ts
CHANGED
|
@@ -136,7 +136,7 @@ export async function openArchitectureDocs(ctx: ExtensionCommandContext, focus:
|
|
|
136
136
|
await showBroModal(ctx, {
|
|
137
137
|
loadingText: "Documenting the current project…",
|
|
138
138
|
retryLabel: "build docs again",
|
|
139
|
-
run: (signal,
|
|
139
|
+
run: (signal, progress) => {
|
|
140
140
|
running = generateArchitecture(ctx, focus, signal, progress);
|
|
141
141
|
return running;
|
|
142
142
|
},
|